Plugin Directory

Changeset 3843768


Ignore:
Timestamp:
12/04/2026 05:28:07 AM (less than one hour ago)
Author:
getwpkit
Message:

Release 1.6.0: help center, My Account support tab, custom form questions, setup, translations

Location:
deskovi/trunk
Files:
29 added
24 edited

Legend:

Unmodified
Added
Removed
  • deskovi/trunk/assets/admin/index-rtl.css

    r3803408 r3843768  
    1 .itsdesk-admin{--dk-ink:#102a33;--dk-ink-soft:#1e4a57;--dk-accent:#0f766e;--dk-accent-hover:#0d5f59;--dk-accent-soft:#e6f4f2;--dk-warn:#8a5a00;--dk-warn-soft:#fcf4e3;--dk-danger:#b42318;--dk-danger-soft:#fef3f2;--dk-ok:#067647;--dk-ok-soft:#ecfdf3;--dk-line:#e4e7ec;--dk-muted:#475467;--dk-label:#344054;--dk-surface:#fff;--dk-canvas:#f4f6f8;--dk-radius:12px;--dk-shadow:0 1px 2px rgba(16,42,51,.06);--dk-shadow-hover:0 8px 24px rgba(16,42,51,.08);--dk-font:"Inter","Hind Siliguri",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans Bengali","Nirmala UI","Helvetica Neue",sans-serif;--dk-font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;--dk-text-xs:12px;--dk-text-sm:13px;--dk-text-md:14px;--dk-text-lg:16px;--dk-text-xl:20px;--dk-text-hero:28px;--dk-leading-body:1.5;--dk-leading-title:1.25;color:var(--dk-ink);font-family:var(--dk-font);font-optical-sizing:auto;font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:8px 0 48px 20px;max-width:1360px;position:relative;-webkit-font-smoothing:antialiased}.itsdesk-admin:lang(bn){--dk-leading-body:1.7;--dk-leading-title:1.4}.itsdesk-admin:lang(bn) *,.itsdesk-admin:lang(bn) :after,.itsdesk-admin:lang(bn) :before{letter-spacing:normal!important}.itsdesk-admin *,.itsdesk-admin :after,.itsdesk-admin :before{box-sizing:border-box}.itsdesk-admin-wrap>h1{display:none}.itsdesk-admin__shell{align-items:start;display:grid;gap:20px;grid-template-columns:224px minmax(0,1fr)}.itsdesk-admin__side{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:var(--dk-radius);box-shadow:var(--dk-shadow);display:flex;flex-direction:column;gap:14px;padding:14px 10px 16px;position:sticky;top:48px}.itsdesk-admin__main{min-width:0}.itsdesk-admin__brand{align-items:center;display:flex;gap:10px;padding:2px 8px 0}.itsdesk-admin__logo{background:var(--dk-ink);border-radius:9px;color:#fff;display:grid;flex-shrink:0;height:34px;place-items:center;width:34px}.itsdesk-admin__brand h1{color:var(--dk-ink);font-size:var(--dk-text-lg);font-weight:600;letter-spacing:-.01em;line-height:var(--dk-leading-title);margin:0;padding:0}.itsdesk-admin__version{color:var(--dk-muted);display:block;font-size:var(--dk-text-xs);line-height:1.2}.itsdesk-admin__nav{display:flex;flex-direction:column;gap:14px}.itsdesk-admin__nav-group{display:flex;flex-direction:column;gap:2px}.itsdesk-admin__nav-label{color:var(--dk-muted);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.05em;padding:0 10px 4px;text-transform:uppercase}.itsdesk-admin__nav-btn{align-items:center;background:transparent;border:0;border-radius:8px;color:var(--dk-label);cursor:pointer;display:flex;font-family:inherit;font-size:var(--dk-text-md);font-weight:500;gap:10px;line-height:1.3;padding:7px 10px;text-align:start;transition:background .15s ease,color .15s ease;width:100%}.itsdesk-admin__nav-btn:hover{background:var(--dk-canvas);color:var(--dk-ink)}.itsdesk-admin__nav-btn:focus-visible{outline:2px solid var(--dk-accent);outline-offset:-2px}.itsdesk-admin__nav-btn.is-active{background:var(--dk-accent-soft);color:var(--dk-accent-hover);font-weight:600}.itsdesk-admin__nav-btn svg{flex-shrink:0;height:17px;opacity:.85;width:17px}.itsdesk-admin__nav-btn.is-active svg{opacity:1}@media (max-width:1100px){.itsdesk-admin__shell{gap:14px;grid-template-columns:minmax(0,1fr)}.itsdesk-admin__side{align-items:center;flex-direction:row;gap:10px;padding:8px 10px;position:static}.itsdesk-admin__brand{display:none}.itsdesk-admin__nav{flex:1;flex-direction:row;gap:4px;min-width:0;overflow-x:auto;padding-bottom:2px;scrollbar-width:thin}.itsdesk-admin__nav-group{align-items:center;border-inline-end:1px solid var(--dk-line);flex-direction:row;flex-shrink:0;gap:2px;margin-inline-end:2px;padding-inline-end:6px}.itsdesk-admin__nav-label{display:none}.itsdesk-admin__nav-btn{white-space:nowrap;width:auto}}.itsdesk-admin__panel{animation:itsdesk-fade-in .22s ease;background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:var(--dk-radius);box-shadow:var(--dk-shadow);overflow:hidden;padding:0}.itsdesk-admin__panel-inner{padding:24px 28px 28px}@media (max-width:600px){.itsdesk-admin__panel-inner{padding:16px 14px 20px}.itsdesk-admin{margin-left:10px}}@keyframes itsdesk-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.itsdesk-admin__row{align-items:center;display:flex;flex-wrap:wrap;gap:10px}.itsdesk-admin__spacer{flex:1}.itsdesk-admin h2{font-size:var(--dk-text-lg);font-weight:600;letter-spacing:-.01em;line-height:var(--dk-leading-title);margin:0}.itsdesk-admin h3.itsdesk-admin__section{color:var(--dk-label);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;margin:24px 0 12px;text-transform:uppercase}.itsdesk-admin__muted{color:var(--dk-muted);font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:6px 0 0}.itsdesk-btn{align-items:center;border:1px solid transparent;border-radius:9px;cursor:pointer;display:inline-flex;font-size:var(--dk-text-md);font-weight:600;gap:8px;justify-content:center;line-height:1.3;min-height:36px;padding:9px 16px;text-decoration:none;transition:background .15s ease,border-color .15s ease,color .15s ease,transform .12s ease}.itsdesk-btn:active:not(:disabled){transform:translateY(1px)}.itsdesk-btn:disabled{cursor:not-allowed;opacity:.55}.itsdesk-btn--primary{background:var(--dk-accent);border-color:var(--dk-accent);color:#fff}.itsdesk-btn--primary:hover:not(:disabled){background:var(--dk-accent-hover);border-color:var(--dk-accent-hover);color:#fff}.itsdesk-btn--secondary{background:#fff;border-color:var(--dk-line);color:var(--dk-ink)}.itsdesk-btn--secondary:hover:not(:disabled){background:var(--dk-canvas);border-color:#c8ced6;color:var(--dk-ink)}.itsdesk-btn--ghost{background:transparent;border-color:transparent;color:var(--dk-accent);padding-right:8px;padding-left:8px}.itsdesk-btn--ghost:hover:not(:disabled){background:var(--dk-accent-soft)}.itsdesk-btn--danger{background:#fff;border-color:#fecdca;color:var(--dk-danger)}.itsdesk-admin__actions{align-items:center;display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.itsdesk-pagination{align-items:center;border-top:1px solid var(--dk-line);display:flex;gap:8px;justify-content:center;margin-top:12px;padding-top:12px}.itsdesk-bulk-bar{align-items:center;background:var(--dk-accent-soft);border:1px solid var(--dk-accent);border-radius:10px;display:flex;gap:10px;padding:8px 12px}.itsdesk-badge{align-items:center;border:1px solid transparent;border-radius:999px;display:inline-flex;font-size:var(--dk-text-sm);font-weight:600;gap:6px;line-height:1.3;padding:5px 11px}.itsdesk-badge__dot{background:currentColor;border-radius:50%;flex-shrink:0;height:7px;width:7px}.itsdesk-badge__dot.is-pulse{animation:itsdesk-pulse 1.8s ease infinite;box-shadow:0 0 0 0 currentColor}@keyframes itsdesk-pulse{0%{box-shadow:0 0 0 0 rgba(6,118,71,.45)}70%{box-shadow:0 0 0 7px rgba(6,118,71,0)}to{box-shadow:0 0 0 0 rgba(6,118,71,0)}}.itsdesk-badge--ok{background:var(--dk-ok-soft);border-color:#abefc6;color:var(--dk-ok)}.itsdesk-badge--warn{background:var(--dk-warn-soft);border-color:#f5d565;color:var(--dk-warn)}.itsdesk-badge--danger{background:var(--dk-danger-soft);border-color:#fecdca;color:var(--dk-danger)}.itsdesk-badge--info{background:#eff8ff;border-color:#b2ddff;color:#175cd3}.itsdesk-badge--neutral{background:#f2f4f7;border-color:#d0d5dd;color:#344054}.itsdesk-metrics{display:grid;gap:14px;grid-template-columns:repeat(4,minmax(0,1fr));margin:18px 0}@media (max-width:960px){.itsdesk-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}.itsdesk-metric{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:10px;color:inherit;font:inherit;padding:14px 16px;text-align:right;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease,background .15s ease;width:100%}.itsdesk-metric.is-clickable{cursor:pointer}.itsdesk-metric.is-clickable:hover{border-color:#c5d0d4;box-shadow:var(--dk-shadow-hover)}.itsdesk-metric--ok{border-color:#abefc6}.itsdesk-metric--ok .itsdesk-metric__value{color:var(--dk-ok)}.itsdesk-metric--warn{border-color:#f5d565}.itsdesk-metric--warn .itsdesk-metric__value{color:var(--dk-warn)}.itsdesk-metric--danger{border-color:#fecdca}.itsdesk-metric--danger .itsdesk-metric__value{color:var(--dk-danger)}.itsdesk-metric__top{align-items:center;display:flex;gap:8px;justify-content:space-between;margin-bottom:10px}.itsdesk-metric__label{color:var(--dk-label);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;text-transform:uppercase}.itsdesk-metric__icon{color:var(--dk-ink-soft);opacity:.9}.itsdesk-metric__icon svg{height:18px;width:18px}.itsdesk-metric__value{color:var(--dk-ink);font-size:var(--dk-text-hero);font-variant-numeric:tabular-nums;font-weight:600;letter-spacing:-.02em;line-height:var(--dk-leading-title)}.itsdesk-metric__hint{color:var(--dk-muted);font-size:var(--dk-text-sm);line-height:1.4;margin-top:6px}.itsdesk-hero{background:var(--dk-ink);border:1px solid #0b2229;border-radius:14px;color:#fff;display:grid;gap:22px;grid-template-columns:1.35fr 1fr;margin-bottom:20px;overflow:hidden;padding:24px;position:relative}.itsdesk-hero:after{background:var(--dk-accent);border-radius:50%;content:"";height:180px;opacity:.18;pointer-events:none;position:absolute;left:-40px;top:-40px;width:180px}@media (max-width:860px){.itsdesk-hero{grid-template-columns:1fr}}.itsdesk-hero__eyebrow{align-items:center;display:inline-flex;font-size:var(--dk-text-xs);font-weight:600;gap:6px;letter-spacing:.05em;margin-bottom:10px;opacity:.9;text-transform:uppercase}.itsdesk-hero h2{color:#fff;font-size:var(--dk-text-hero);font-weight:600;letter-spacing:-.03em;line-height:var(--dk-leading-title);margin:0 0 10px}.itsdesk-hero p{color:hsla(0,0%,100%,.9);font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0 0 18px;max-width:460px}.itsdesk-hero__actions{display:flex;flex-wrap:wrap;gap:10px}.itsdesk-hero .itsdesk-btn--primary{background:#fff;border-color:#fff;color:var(--dk-ink)}.itsdesk-hero .itsdesk-btn--primary:hover:not(:disabled){background:#eef7f6;border-color:#eef7f6;color:var(--dk-ink)}.itsdesk-hero .itsdesk-btn--secondary{background:transparent;border-color:hsla(0,0%,100%,.35);color:#fff}.itsdesk-hero .itsdesk-btn--secondary:hover:not(:disabled){background:hsla(0,0%,100%,.1);border-color:hsla(0,0%,100%,.55);color:#fff}.itsdesk-checklist{background:hsla(0,0%,100%,.08);border:1px solid hsla(0,0%,100%,.14);border-radius:12px;padding:16px 16px 12px}.itsdesk-checklist__title{font-size:var(--dk-text-sm);font-weight:600;letter-spacing:.04em;margin-bottom:12px;opacity:.88;text-transform:uppercase}.itsdesk-checklist__item{align-items:flex-start;border-top:1px solid hsla(0,0%,100%,.1);display:flex;gap:10px;padding:10px 0}.itsdesk-checklist__item:first-of-type{border-top:none}.itsdesk-checklist__mark{align-items:center;border:1.5px solid hsla(0,0%,100%,.4);border-radius:50%;box-sizing:border-box;color:inherit;display:inline-flex;flex-shrink:0;font-family:var(--dk-font);font-size:var(--dk-text-xs);font-style:normal;font-weight:600;height:24px;justify-content:center;letter-spacing:0;line-height:1;margin-top:1px;opacity:1;width:24px}.itsdesk-checklist__mark svg{display:block;flex-shrink:0}.itsdesk-checklist__item.is-done .itsdesk-checklist__mark{background:hsla(0,0%,100%,.95);border-color:transparent;color:var(--dk-accent)}.itsdesk-checklist__item>div{min-width:0}.itsdesk-checklist__item strong{display:block;font-family:var(--dk-font);font-size:var(--dk-text-md);font-weight:600;margin-bottom:3px}.itsdesk-checklist__item>div>span{display:block;font-family:var(--dk-font);font-size:var(--dk-text-sm);line-height:1.45;opacity:.88}.itsdesk-health{align-items:flex-start;background:var(--dk-accent-soft);border:1px solid #b7e4de;border-radius:12px;display:flex;gap:12px;margin:16px 0;padding:16px 18px}.itsdesk-health--warn{background:var(--dk-warn-soft);border-color:#f5d565}.itsdesk-health__icon{color:var(--dk-accent);margin-top:2px}.itsdesk-health--warn .itsdesk-health__icon{color:var(--dk-warn)}.itsdesk-health strong{display:block;font-size:var(--dk-text-md);font-weight:600;margin-bottom:4px}.itsdesk-health p{color:var(--dk-muted);font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0}.itsdesk-table{border:1px solid var(--dk-line);border-collapse:separate;border-radius:12px;border-spacing:0;margin:8px 0 0;overflow:hidden;width:100%}.itsdesk-table td,.itsdesk-table th{border-bottom:1px solid var(--dk-line);font-size:var(--dk-text-md);line-height:1.4;padding:12px 16px;text-align:right;vertical-align:middle}.itsdesk-table tr:last-child td{border-bottom:none}.itsdesk-table th{background:var(--dk-canvas);color:var(--dk-label);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;padding:10px 16px;text-transform:uppercase}.itsdesk-table tbody tr{transition:background .12s ease}.itsdesk-table tbody tr:hover{background:#fafbfc}.itsdesk-table__area{color:var(--dk-ink);font-weight:600}.itsdesk-grid-2{display:grid;gap:14px;grid-template-columns:1fr 1fr;margin:16px 0}@media (max-width:780px){.itsdesk-grid-2{grid-template-columns:1fr}}.itsdesk-card{background:#fff;border:1px solid var(--dk-line);border-radius:10px;padding:16px 18px}.itsdesk-card__head{align-items:center;display:flex;gap:8px;justify-content:space-between;margin-bottom:12px}.itsdesk-card h3{color:var(--dk-label);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;margin:0;text-transform:uppercase}.itsdesk-card h3.itsdesk-card__title{color:var(--dk-ink);font-size:var(--dk-text-lg);font-weight:600;letter-spacing:-.01em;line-height:var(--dk-leading-title);margin:0;text-transform:none}.itsdesk-card p{font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0 0 8px}.itsdesk-mono{background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:8px;font-family:var(--dk-font-mono);font-size:var(--dk-text-xs);line-height:1.4;padding:8px 10px;word-break:break-all}.itsdesk-field{margin-bottom:14px}.itsdesk-field label{color:var(--dk-label);display:block;font-size:var(--dk-text-sm);font-weight:600;margin-bottom:6px}.itsdesk-admin select.itsdesk-select,.itsdesk-field select.itsdesk-select{appearance:none;background-color:#fff;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2712%27 height=%278%27 fill=%27none%27%3E%3Cpath stroke=%27%23475467%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%271.75%27 d=%27m1 1.5 5 5 5-5%27/%3E%3C/svg%3E");background-position:left 12px center;background-repeat:no-repeat;background-size:12px 8px;border:1px solid var(--dk-line);border-radius:9px;box-shadow:none;color:var(--dk-ink);cursor:pointer;display:block;font-size:var(--dk-text-md);font-weight:500;height:38px;line-height:38px;margin:0;max-height:38px;max-width:280px;min-height:38px;padding:0 12px 0 36px;vertical-align:middle;width:100%}.itsdesk-admin select.itsdesk-select:hover:not(:disabled),.itsdesk-field select.itsdesk-select:hover:not(:disabled){border-color:#c5d0d4}.itsdesk-admin select.itsdesk-select:focus,.itsdesk-field select.itsdesk-select:focus{border-color:var(--dk-accent);outline:2px solid var(--dk-accent-soft);outline-offset:1px}.itsdesk-admin select.itsdesk-select:disabled,.itsdesk-field select.itsdesk-select:disabled{background-color:var(--dk-canvas);cursor:not-allowed;opacity:.55}.itsdesk-btn--danger:disabled,.itsdesk-btn--secondary:disabled{background:var(--dk-canvas);border-color:var(--dk-line);color:var(--dk-muted);opacity:.45}.itsdesk-toggle{align-items:center;border-bottom:1px solid #f0f2f5;display:flex;gap:16px;justify-content:space-between;padding:12px 0}.itsdesk-toggle:last-child{border-bottom:none}.itsdesk-toggle.is-disabled{opacity:.55}.itsdesk-toggle__label{color:var(--dk-ink);cursor:pointer;font-size:var(--dk-text-md);font-weight:600}.itsdesk-toggle__desc{color:var(--dk-muted);font-size:var(--dk-text-sm);line-height:1.4;margin:3px 0 0}.itsdesk-switch{background:#d0d5dd;border:none;border-radius:999px;cursor:pointer;flex-shrink:0;height:24px;padding:0;position:relative;transition:background .15s ease;width:42px}.itsdesk-switch.is-on{background:var(--dk-accent)}.itsdesk-switch__thumb{background:#fff;border-radius:50%;box-shadow:0 1px 2px rgba(16,24,40,.2);height:18px;right:3px;position:absolute;top:3px;transition:transform .15s ease;width:18px}.itsdesk-switch.is-on .itsdesk-switch__thumb{transform:translateX(-18px)}.itsdesk-toast{align-items:center;animation:itsdesk-fade-in .2s ease;background:var(--dk-ink);border-radius:10px;bottom:28px;box-shadow:0 12px 32px rgba(16,42,51,.25);color:#fff;display:flex;font-size:var(--dk-text-md);font-weight:500;gap:10px;padding:12px 14px;position:fixed;left:28px;z-index:100000}.itsdesk-toast--danger{background:var(--dk-danger)}.itsdesk-toast__close{background:transparent;border:none;color:inherit;cursor:pointer;font-size:var(--dk-text-lg);line-height:1;opacity:.88;padding:0 4px 0 0}.itsdesk-skeleton{padding:22px 24px}.itsdesk-skeleton__block,.itsdesk-skeleton__hero,.itsdesk-skeleton__row span{animation:itsdesk-shimmer 1.2s ease infinite;background:linear-gradient(-90deg,#eef1f4 25%,#f7f8fa 50%,#eef1f4 75%);background-size:200% 100%;border-radius:10px}.itsdesk-skeleton__hero{height:148px;margin-bottom:16px}.itsdesk-skeleton__row{display:grid;gap:12px;grid-template-columns:repeat(4,1fr);margin-bottom:16px}.itsdesk-skeleton__row span{display:block;height:88px}.itsdesk-skeleton__block{height:56px;margin-bottom:12px}.itsdesk-skeleton__block--short{height:120px;width:70%}@keyframes itsdesk-shimmer{0%{background-position:0% 0}to{background-position:200% 0}}.itsdesk-admin__error{color:var(--dk-danger);padding:20px 24px}.itsdesk-divider{border:none;border-top:1px solid var(--dk-line);margin:20px 0}.itsdesk-features{display:grid;gap:14px;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:20px}@media (max-width:780px){.itsdesk-features{grid-template-columns:1fr}}.itsdesk-feature{background:#fff;border:1px solid var(--dk-line);border-radius:12px;padding:16px}.itsdesk-feature__icon{background:var(--dk-accent-soft);border-radius:8px;color:var(--dk-accent);display:grid;height:34px;margin-bottom:10px;place-items:center;width:34px}.itsdesk-feature strong{display:block;font-size:var(--dk-text-md);font-weight:600;margin-bottom:4px}.itsdesk-feature p{color:var(--dk-muted);font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0}.itsdesk-workspace-list{display:grid;gap:8px;margin:14px 0}.itsdesk-workspace{align-items:flex-start;background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:10px;color:inherit;cursor:pointer;display:flex;flex-direction:column;font:inherit;gap:2px;padding:12px 14px;text-align:right;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease;width:100%}.itsdesk-workspace:hover:not(:disabled){background:#fff;border-color:#c5d0d4}.itsdesk-workspace.is-selected{background:var(--dk-accent-soft);border-color:var(--dk-accent);box-shadow:0 0 0 1px var(--dk-accent)}.itsdesk-workspace strong{font-size:var(--dk-text-md);font-weight:600}.itsdesk-workspace span{color:var(--dk-muted);font-family:var(--dk-font-mono);font-size:var(--dk-text-xs)}.itsdesk-checkline{align-items:flex-start;color:var(--dk-muted);cursor:pointer;display:flex;font-size:var(--dk-text-md);gap:8px;line-height:var(--dk-leading-body);margin:8px 0 4px}.itsdesk-checkline input{margin-top:2px}.itsdesk-devtools{border-top:1px dashed var(--dk-line);margin-top:16px;padding-top:12px}.itsdesk-devtools summary{color:var(--dk-label);cursor:pointer;font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;text-transform:uppercase;-webkit-user-select:none;user-select:none}.itsdesk-devtools[open] summary{margin-bottom:10px}.itsdesk-input,.itsdesk-textarea{background:#fff;border:1px solid var(--dk-line);border-radius:9px;box-shadow:none;color:var(--dk-ink);display:block;font-family:inherit;font-size:var(--dk-text-md);max-width:100%;min-height:38px;padding:9px 12px;width:100%}.itsdesk-textarea{line-height:var(--dk-leading-body);min-height:96px;resize:vertical}.itsdesk-input:focus,.itsdesk-textarea:focus{border-color:var(--dk-accent);outline:2px solid var(--dk-accent-soft);outline-offset:1px}.itsdesk-tickets{align-items:start;display:grid;gap:16px;grid-template-columns:minmax(min(300px,100%),380px) minmax(0,1fr);margin-top:16px}@media (max-width:900px){.itsdesk-tickets{grid-template-columns:minmax(0,1fr)}}.itsdesk-tickets__list{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:10px;display:flex;flex-direction:column;max-height:720px;overflow:auto}.itsdesk-ticket-row{align-items:flex-start;background:transparent;border:0;border-bottom:1px solid var(--dk-line);border-inline-start:3px solid transparent;color:inherit;display:flex;font:inherit;gap:10px;padding:12px 12px 12px 14px;text-align:right;transition:background .15s ease;width:100%}.itsdesk-ticket-row:last-child{border-bottom:0}.itsdesk-ticket-row input[type=checkbox]{flex-shrink:0;margin-top:3px}.itsdesk-ticket-row__content{cursor:pointer;flex:1;min-width:0}.itsdesk-ticket-row:hover{background:var(--dk-canvas)}.itsdesk-ticket-row.is-active{background:var(--dk-accent-soft);border-inline-start-color:var(--dk-accent)}.itsdesk-ticket-row__meta,.itsdesk-ticket-row__top{align-items:center;display:flex;flex-wrap:wrap;gap:6px 8px}.itsdesk-ticket-row__meta{justify-content:space-between}.itsdesk-ticket-row__top strong{flex:1 1 100%;font-size:var(--dk-text-md);font-weight:600;line-height:1.35;overflow-wrap:anywhere}.itsdesk-ticket-row__meta{color:var(--dk-muted);font-size:var(--dk-text-sm);margin-top:6px}.itsdesk-tickets__empty{border:1px dashed var(--dk-line);border-radius:12px;padding:40px 16px;text-align:center}.itsdesk-thread{border-top:1px solid var(--dk-line);display:flex;flex-direction:column;gap:10px;margin-top:16px;padding-top:14px}.itsdesk-bubble{background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:10px;padding:12px 14px}.itsdesk-bubble--agent{background:#fff;border-color:#c5d0d4}.itsdesk-bubble.is-internal{background:var(--dk-warn-soft);border-color:#f5d565}.itsdesk-bubble__meta{align-items:center;color:var(--dk-muted);display:flex;flex-wrap:wrap;font-weight:500;gap:8px;margin-bottom:6px}.itsdesk-bubble__meta,.itsdesk-bubble__meta strong{font-size:var(--dk-text-xs);letter-spacing:0;text-transform:none}.itsdesk-bubble__meta strong{color:var(--dk-label);font-weight:600}.itsdesk-bubble__time{color:var(--dk-muted);font-size:var(--dk-text-xs)}.itsdesk-bubble p{font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0;white-space:pre-wrap}.itsdesk-attachment-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}.itsdesk-attachment-chip{align-items:center;background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:999px;color:var(--dk-label);display:inline-flex;font-size:var(--dk-text-xs);gap:5px;line-height:1.4;max-width:280px;padding:4px 6px 4px 8px}.itsdesk-attachment-chip__remove{align-items:center;background:transparent;border:none;border-radius:50%;color:var(--dk-muted);cursor:pointer;display:inline-flex;flex-shrink:0;font-size:var(--dk-text-md);height:16px;justify-content:center;line-height:1;margin-right:2px;padding:0;transition:background .12s ease,color .12s ease;width:16px}.itsdesk-attachment-chip__remove:hover{background:var(--dk-danger-soft);color:var(--dk-danger)}.itsdesk-attachment-chip--link{text-decoration:none;transition:border-color .15s ease,background .15s ease}.itsdesk-attachment-chip--link:hover{background:var(--dk-accent-soft);border-color:var(--dk-accent);color:var(--dk-accent)}.itsdesk-attachment-list{border-top:1px solid var(--dk-line);display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;padding-top:10px}.itsdesk-attachment-name{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.itsdesk-attachment-size{color:var(--dk-muted);flex-shrink:0;font-size:var(--dk-text-xs)}.itsdesk-attachment-thumb{border-radius:6px;display:block;flex-shrink:0;height:40px;object-fit:cover;width:40px}.itsdesk-attach-btn{padding-right:10px;padding-left:12px}.itsdesk-admin .itsdesk-page-title{font-size:var(--dk-text-xl);letter-spacing:-.01em}.itsdesk-callout{align-items:center;background:var(--dk-warn-soft);border:1px solid #f5d565;border-radius:10px;display:flex;gap:16px;justify-content:space-between;margin:16px 0 0;padding:14px 16px}.itsdesk-callout p{color:var(--dk-label);margin:2px 0 0}.itsdesk-two{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr));margin:14px 0}.itsdesk-box{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:10px;padding:16px 18px}.itsdesk-box h3{color:var(--dk-ink);font-size:var(--dk-text-md);font-weight:600;margin:0 0 12px}.itsdesk-box__head{align-items:baseline;display:flex;gap:10px;justify-content:space-between}.itsdesk-link{background:none;border:0;color:var(--dk-accent);cursor:pointer;font:inherit;font-size:var(--dk-text-sm);font-weight:500;padding:0;white-space:nowrap}.itsdesk-link:hover{color:var(--dk-accent-hover);text-decoration:underline}.itsdesk-week{align-items:end;display:grid;gap:8px;grid-template-columns:repeat(7,1fr);height:150px}.itsdesk-week__col{align-items:center;display:flex;flex-direction:column;gap:4px;height:100%;justify-content:flex-end}.itsdesk-week__n{color:var(--dk-muted);font-size:var(--dk-text-xs);font-variant-numeric:tabular-nums}.itsdesk-week__bar{align-items:flex-end;display:flex;flex:1;max-width:44px;width:100%}.itsdesk-week__bar i{background:var(--dk-accent);border-radius:5px 5px 2px 2px;display:block;width:100%}.itsdesk-week__d{color:var(--dk-muted);font-size:var(--dk-text-xs)}.itsdesk-list{list-style:none;margin:0;padding:0}.itsdesk-list li+li{border-top:1px solid var(--dk-line)}.itsdesk-list button{align-items:center;background:none;border:0;border-radius:6px;color:inherit;cursor:pointer;display:flex;font:inherit;gap:12px;justify-content:space-between;padding:9px 4px;text-align:start;width:100%}.itsdesk-list button:hover{background:var(--dk-canvas)}.itsdesk-list__main{display:flex;flex-direction:column;min-width:0}.itsdesk-list__main span,.itsdesk-list__main strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.itsdesk-list__main span{color:var(--dk-muted);font-size:var(--dk-text-sm)}.itsdesk-status-list{list-style:none;margin:0 0 8px;padding:0}.itsdesk-status-list li{align-items:center;display:flex;gap:12px;padding:10px 0}.itsdesk-status-list li+li{border-top:1px solid var(--dk-line)}.itsdesk-status-list__icon{background:var(--dk-canvas);border-radius:8px;color:var(--dk-ink-soft);display:grid;flex-shrink:0;height:30px;place-items:center;width:30px}.itsdesk-status-list__text{display:flex;flex:1;flex-direction:column;min-width:0}.itsdesk-status-list__text span{color:var(--dk-muted);font-size:var(--dk-text-sm)}.itsdesk-meta-bar{display:grid;gap:0 14px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));margin-top:14px}.itsdesk-meta-bar .itsdesk-field select.itsdesk-select{max-width:none}.itsdesk-inline-form{align-items:flex-end;display:flex;gap:10px}.itsdesk-inline-form .itsdesk-field{flex:1;margin-bottom:0}.itsdesk-segmented{border:1px solid var(--dk-line);border-radius:9px;display:inline-flex;gap:0;margin-top:4px;overflow:hidden}.itsdesk-segmented .itsdesk-btn{border:0;border-radius:0;min-height:34px;padding:7px 16px}.itsdesk-segmented .itsdesk-btn+.itsdesk-btn{border-inline-start:1px solid var(--dk-line)}.itsdesk-segmented .itsdesk-btn--primary:disabled{cursor:default;opacity:1}.itsdesk-tabs{border-bottom:1px solid var(--dk-line);display:flex;gap:4px;margin:14px 0 16px;overflow-x:auto;overflow-y:hidden}.itsdesk-tab{background:none;border:0;border-bottom:2px solid transparent;color:var(--dk-muted);cursor:pointer;font:inherit;font-size:var(--dk-text-md);font-weight:500;margin-bottom:-1px;padding:8px 12px;white-space:nowrap}.itsdesk-tab:hover{color:var(--dk-ink)}.itsdesk-tab.is-active{border-bottom-color:var(--dk-accent);color:var(--dk-accent-hover);font-weight:600}.itsdesk-tab:focus-visible{border-radius:4px;outline:2px solid var(--dk-accent);outline-offset:-2px}.itsdesk-pro-tag{background:var(--dk-accent-soft);border-radius:99px;color:var(--dk-accent-hover);display:inline-block;font-size:var(--dk-text-xs);font-weight:600;margin-inline-start:8px;padding:1px 7px;vertical-align:middle}.itsdesk-feature.is-locked{background:var(--dk-canvas);border-style:dashed}.itsdesk-feature__list{color:var(--dk-muted);font-size:var(--dk-text-sm);margin:8px 0 0;padding-inline-start:18px}.itsdesk-feature .itsdesk-link{margin-top:8px}.itsdesk-filters{align-items:center;display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.itsdesk-filters .itsdesk-select{max-width:200px;min-width:130px;width:auto}.itsdesk-views{align-items:center;display:flex;flex-wrap:wrap;gap:6px 8px;margin-top:8px}.itsdesk-views:empty{display:none}.itsdesk-views__chip{align-items:center;background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:99px;display:inline-flex;font-size:var(--dk-text-sm)}.itsdesk-views__chip button{background:none;border:0;color:var(--dk-label);cursor:pointer;font:inherit;padding:4px 12px 4px 6px}.itsdesk-views__chip button:hover{color:var(--dk-accent-hover)}.itsdesk-views__chip .itsdesk-views__x{color:var(--dk-muted);padding:4px 2px 4px 10px}.itsdesk-views__new{align-items:center;display:inline-flex;gap:6px}.itsdesk-views__new .itsdesk-input{width:220px}.itsdesk-ticket-row__content:focus-visible{border-radius:6px;outline:2px solid var(--dk-accent);outline-offset:2px}.itsdesk-merge{margin:10px 0 0}.itsdesk-merge__panel{background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:10px;margin-top:8px;padding:12px 14px}.itsdesk-merge__panel label{color:var(--dk-label);display:block;font-size:var(--dk-text-sm);font-weight:600;margin-bottom:6px}.itsdesk-merge__panel .itsdesk-list{background:var(--dk-surface);border-radius:8px;margin-top:8px}.itsdesk-split{font-size:12px;margin-top:6px}.itsdesk-split__panel{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:6px;display:grid;gap:6px;margin-top:6px;padding:10px}.itsdesk-split__panel label{font-weight:500}.itsdesk-split__panel .itsdesk-btn{justify-self:start}
     1.itsdesk-admin{--dk-ink:#102a33;--dk-ink-soft:#1e4a57;--dk-accent:#0f766e;--dk-accent-hover:#0d5f59;--dk-accent-soft:#e6f4f2;--dk-warn:#8a5a00;--dk-warn-soft:#fcf4e3;--dk-danger:#b42318;--dk-danger-soft:#fef3f2;--dk-ok:#067647;--dk-ok-soft:#ecfdf3;--dk-line:#e4e7ec;--dk-muted:#475467;--dk-label:#344054;--dk-surface:#fff;--dk-canvas:#f4f6f8;--dk-radius:12px;--dk-shadow:0 1px 2px rgba(16,42,51,.06);--dk-shadow-hover:0 8px 24px rgba(16,42,51,.08);--dk-font:"Inter","Hind Siliguri",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans Bengali","Nirmala UI","Helvetica Neue",sans-serif;--dk-font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;--dk-text-xs:12px;--dk-text-sm:13px;--dk-text-md:14px;--dk-text-lg:16px;--dk-text-xl:20px;--dk-text-hero:28px;--dk-leading-body:1.5;--dk-leading-title:1.25;color:var(--dk-ink);font-family:var(--dk-font);font-optical-sizing:auto;font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:8px 0 48px 20px;max-width:1360px;position:relative;-webkit-font-smoothing:antialiased}.itsdesk-admin:lang(bn){--dk-leading-body:1.7;--dk-leading-title:1.4}.itsdesk-admin:lang(bn) *,.itsdesk-admin:lang(bn) :after,.itsdesk-admin:lang(bn) :before{letter-spacing:normal!important}.itsdesk-admin *,.itsdesk-admin :after,.itsdesk-admin :before{box-sizing:border-box}.itsdesk-admin-wrap>h1{display:none}.itsdesk-admin__shell{align-items:start;display:grid;gap:20px;grid-template-columns:224px minmax(0,1fr)}.itsdesk-admin__side{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:var(--dk-radius);box-shadow:var(--dk-shadow);display:flex;flex-direction:column;gap:14px;padding:14px 10px 16px;position:sticky;top:48px}.itsdesk-admin__main{min-width:0}.itsdesk-admin__brand{align-items:center;display:flex;gap:10px;padding:2px 8px 0}.itsdesk-admin__logo{background:var(--dk-ink);border-radius:9px;color:#fff;display:grid;flex-shrink:0;height:34px;place-items:center;width:34px}.itsdesk-admin__brand h1{color:var(--dk-ink);font-size:var(--dk-text-lg);font-weight:600;letter-spacing:-.01em;line-height:var(--dk-leading-title);margin:0;padding:0}.itsdesk-admin__version{color:var(--dk-muted);display:block;font-size:var(--dk-text-xs);line-height:1.2}.itsdesk-admin__nav{display:flex;flex-direction:column;gap:14px}.itsdesk-admin__nav-group{display:flex;flex-direction:column;gap:2px}.itsdesk-admin__nav-label{color:var(--dk-muted);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.05em;padding:0 10px 4px;text-transform:uppercase}.itsdesk-admin__nav-btn{align-items:center;background:transparent;border:0;border-radius:8px;color:var(--dk-label);cursor:pointer;display:flex;font-family:inherit;font-size:var(--dk-text-md);font-weight:500;gap:10px;line-height:1.3;padding:7px 10px;text-align:start;transition:background .15s ease,color .15s ease;width:100%}.itsdesk-admin__nav-btn:hover{background:var(--dk-canvas);color:var(--dk-ink)}.itsdesk-admin__nav-btn:focus-visible{outline:2px solid var(--dk-accent);outline-offset:-2px}.itsdesk-admin__nav-btn.is-active{background:var(--dk-accent-soft);color:var(--dk-accent-hover);font-weight:600}.itsdesk-admin__nav-btn svg{flex-shrink:0;height:17px;opacity:.85;width:17px}.itsdesk-admin__nav-btn.is-active svg{opacity:1}@media (max-width:1100px){.itsdesk-admin__shell{gap:14px;grid-template-columns:minmax(0,1fr)}.itsdesk-admin__side{align-items:center;flex-direction:row;gap:10px;padding:8px 10px;position:static}.itsdesk-admin__brand{display:none}.itsdesk-admin__nav{flex:1;flex-direction:row;gap:4px;min-width:0;overflow-x:auto;padding-bottom:2px;scrollbar-width:thin}.itsdesk-admin__nav-group{align-items:center;border-inline-end:1px solid var(--dk-line);flex-direction:row;flex-shrink:0;gap:2px;margin-inline-end:2px;padding-inline-end:6px}.itsdesk-admin__nav-label{display:none}.itsdesk-admin__nav-btn{white-space:nowrap;width:auto}}.itsdesk-admin__panel{animation:itsdesk-fade-in .22s ease;background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:var(--dk-radius);box-shadow:var(--dk-shadow);overflow:hidden;padding:0}.itsdesk-admin__panel-inner{padding:24px 28px 28px}@media (max-width:600px){.itsdesk-admin__panel-inner{padding:16px 14px 20px}.itsdesk-admin{margin-left:10px}}@keyframes itsdesk-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.itsdesk-admin__row{align-items:center;display:flex;flex-wrap:wrap;gap:10px}.itsdesk-admin__spacer{flex:1}.itsdesk-admin h2{font-size:var(--dk-text-lg);font-weight:600;letter-spacing:-.01em;line-height:var(--dk-leading-title);margin:0}.itsdesk-admin h3.itsdesk-admin__section{color:var(--dk-label);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;margin:24px 0 12px;text-transform:uppercase}.itsdesk-admin__muted{color:var(--dk-muted);font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:6px 0 0}.itsdesk-btn{align-items:center;border:1px solid transparent;border-radius:9px;cursor:pointer;display:inline-flex;font-size:var(--dk-text-md);font-weight:600;gap:8px;justify-content:center;line-height:1.3;min-height:36px;padding:9px 16px;text-decoration:none;transition:background .15s ease,border-color .15s ease,color .15s ease,transform .12s ease}.itsdesk-btn:active:not(:disabled){transform:translateY(1px)}.itsdesk-btn:disabled{cursor:not-allowed;opacity:.55}.itsdesk-btn--primary{background:var(--dk-accent);border-color:var(--dk-accent);color:#fff}.itsdesk-btn--primary:hover:not(:disabled){background:var(--dk-accent-hover);border-color:var(--dk-accent-hover);color:#fff}.itsdesk-btn--secondary{background:#fff;border-color:var(--dk-line);color:var(--dk-ink)}.itsdesk-btn--secondary:hover:not(:disabled){background:var(--dk-canvas);border-color:#c8ced6;color:var(--dk-ink)}.itsdesk-btn--ghost{background:transparent;border-color:transparent;color:var(--dk-accent);padding-right:8px;padding-left:8px}.itsdesk-btn--ghost:hover:not(:disabled){background:var(--dk-accent-soft)}.itsdesk-btn--danger{background:#fff;border-color:#fecdca;color:var(--dk-danger)}.itsdesk-admin__actions{align-items:center;display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.itsdesk-pagination{align-items:center;border-top:1px solid var(--dk-line);display:flex;gap:8px;justify-content:center;margin-top:12px;padding-top:12px}.itsdesk-bulk-bar{align-items:center;background:var(--dk-accent-soft);border:1px solid var(--dk-accent);border-radius:10px;display:flex;gap:10px;padding:8px 12px}.itsdesk-badge{align-items:center;border:1px solid transparent;border-radius:999px;display:inline-flex;font-size:var(--dk-text-sm);font-weight:600;gap:6px;line-height:1.3;padding:5px 11px}.itsdesk-badge__dot{background:currentColor;border-radius:50%;flex-shrink:0;height:7px;width:7px}.itsdesk-badge__dot.is-pulse{animation:itsdesk-pulse 1.8s ease infinite;box-shadow:0 0 0 0 currentColor}@keyframes itsdesk-pulse{0%{box-shadow:0 0 0 0 rgba(6,118,71,.45)}70%{box-shadow:0 0 0 7px rgba(6,118,71,0)}to{box-shadow:0 0 0 0 rgba(6,118,71,0)}}.itsdesk-badge--ok{background:var(--dk-ok-soft);border-color:#abefc6;color:var(--dk-ok)}.itsdesk-badge--warn{background:var(--dk-warn-soft);border-color:#f5d565;color:var(--dk-warn)}.itsdesk-badge--danger{background:var(--dk-danger-soft);border-color:#fecdca;color:var(--dk-danger)}.itsdesk-badge--info{background:#eff8ff;border-color:#b2ddff;color:#175cd3}.itsdesk-badge--neutral{background:#f2f4f7;border-color:#d0d5dd;color:#344054}.itsdesk-metrics{display:grid;gap:14px;grid-template-columns:repeat(4,minmax(0,1fr));margin:18px 0}@media (max-width:960px){.itsdesk-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}.itsdesk-metric{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:10px;color:inherit;font:inherit;padding:14px 16px;text-align:right;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease,background .15s ease;width:100%}.itsdesk-metric.is-clickable{cursor:pointer}.itsdesk-metric.is-clickable:hover{border-color:#c5d0d4;box-shadow:var(--dk-shadow-hover)}.itsdesk-metric--ok{border-color:#abefc6}.itsdesk-metric--ok .itsdesk-metric__value{color:var(--dk-ok)}.itsdesk-metric--warn{border-color:#f5d565}.itsdesk-metric--warn .itsdesk-metric__value{color:var(--dk-warn)}.itsdesk-metric--danger{border-color:#fecdca}.itsdesk-metric--danger .itsdesk-metric__value{color:var(--dk-danger)}.itsdesk-metric__top{align-items:center;display:flex;gap:8px;justify-content:space-between;margin-bottom:10px}.itsdesk-metric__label{color:var(--dk-label);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;text-transform:uppercase}.itsdesk-metric__icon{color:var(--dk-ink-soft);opacity:.9}.itsdesk-metric__icon svg{height:18px;width:18px}.itsdesk-metric__value{color:var(--dk-ink);font-size:var(--dk-text-hero);font-variant-numeric:tabular-nums;font-weight:600;letter-spacing:-.02em;line-height:var(--dk-leading-title)}.itsdesk-metric__hint{color:var(--dk-muted);font-size:var(--dk-text-sm);line-height:1.4;margin-top:6px}.itsdesk-hero{background:var(--dk-ink);border:1px solid #0b2229;border-radius:14px;color:#fff;display:grid;gap:22px;grid-template-columns:1.35fr 1fr;margin-bottom:20px;overflow:hidden;padding:24px;position:relative}.itsdesk-hero:after{background:var(--dk-accent);border-radius:50%;content:"";height:180px;opacity:.18;pointer-events:none;position:absolute;left:-40px;top:-40px;width:180px}@media (max-width:860px){.itsdesk-hero{grid-template-columns:1fr}}.itsdesk-hero__eyebrow{align-items:center;display:inline-flex;font-size:var(--dk-text-xs);font-weight:600;gap:6px;letter-spacing:.05em;margin-bottom:10px;opacity:.9;text-transform:uppercase}.itsdesk-hero h2{color:#fff;font-size:var(--dk-text-hero);font-weight:600;letter-spacing:-.03em;line-height:var(--dk-leading-title);margin:0 0 10px}.itsdesk-hero p{color:hsla(0,0%,100%,.9);font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0 0 18px;max-width:460px}.itsdesk-hero__actions{display:flex;flex-wrap:wrap;gap:10px}.itsdesk-hero .itsdesk-btn--primary{background:#fff;border-color:#fff;color:var(--dk-ink)}.itsdesk-hero .itsdesk-btn--primary:hover:not(:disabled){background:#eef7f6;border-color:#eef7f6;color:var(--dk-ink)}.itsdesk-hero .itsdesk-btn--secondary{background:transparent;border-color:hsla(0,0%,100%,.35);color:#fff}.itsdesk-hero .itsdesk-btn--secondary:hover:not(:disabled){background:hsla(0,0%,100%,.1);border-color:hsla(0,0%,100%,.55);color:#fff}.itsdesk-checklist{background:hsla(0,0%,100%,.08);border:1px solid hsla(0,0%,100%,.14);border-radius:12px;padding:16px 16px 12px}.itsdesk-checklist__title{font-size:var(--dk-text-sm);font-weight:600;letter-spacing:.04em;margin-bottom:12px;opacity:.88;text-transform:uppercase}.itsdesk-checklist__item{align-items:flex-start;border-top:1px solid hsla(0,0%,100%,.1);display:flex;gap:10px;padding:10px 0}.itsdesk-checklist__item:first-of-type{border-top:none}.itsdesk-checklist__mark{align-items:center;border:1.5px solid hsla(0,0%,100%,.4);border-radius:50%;box-sizing:border-box;color:inherit;display:inline-flex;flex-shrink:0;font-family:var(--dk-font);font-size:var(--dk-text-xs);font-style:normal;font-weight:600;height:24px;justify-content:center;letter-spacing:0;line-height:1;margin-top:1px;opacity:1;width:24px}.itsdesk-checklist__mark svg{display:block;flex-shrink:0}.itsdesk-checklist__item.is-done .itsdesk-checklist__mark{background:hsla(0,0%,100%,.95);border-color:transparent;color:var(--dk-accent)}.itsdesk-checklist__item>div{min-width:0}.itsdesk-checklist__item strong{display:block;font-family:var(--dk-font);font-size:var(--dk-text-md);font-weight:600;margin-bottom:3px}.itsdesk-checklist__item>div>span{display:block;font-family:var(--dk-font);font-size:var(--dk-text-sm);line-height:1.45;opacity:.88}.itsdesk-health{align-items:flex-start;background:var(--dk-accent-soft);border:1px solid #b7e4de;border-radius:12px;display:flex;gap:12px;margin:16px 0;padding:16px 18px}.itsdesk-health--warn{background:var(--dk-warn-soft);border-color:#f5d565}.itsdesk-health__icon{color:var(--dk-accent);margin-top:2px}.itsdesk-health--warn .itsdesk-health__icon{color:var(--dk-warn)}.itsdesk-health strong{display:block;font-size:var(--dk-text-md);font-weight:600;margin-bottom:4px}.itsdesk-health p{color:var(--dk-muted);font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0}.itsdesk-table{border:1px solid var(--dk-line);border-collapse:separate;border-radius:12px;border-spacing:0;margin:8px 0 0;overflow:hidden;width:100%}.itsdesk-table td,.itsdesk-table th{border-bottom:1px solid var(--dk-line);font-size:var(--dk-text-md);line-height:1.4;padding:12px 16px;text-align:right;vertical-align:middle}.itsdesk-table tr:last-child td{border-bottom:none}.itsdesk-table th{background:var(--dk-canvas);color:var(--dk-label);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;padding:10px 16px;text-transform:uppercase}.itsdesk-table tbody tr{transition:background .12s ease}.itsdesk-table tbody tr:hover{background:#fafbfc}.itsdesk-table__area{color:var(--dk-ink);font-weight:600}.itsdesk-grid-2{display:grid;gap:14px;grid-template-columns:1fr 1fr;margin:16px 0}@media (max-width:780px){.itsdesk-grid-2{grid-template-columns:1fr}}.itsdesk-card{background:#fff;border:1px solid var(--dk-line);border-radius:10px;padding:16px 18px}.itsdesk-card__head{align-items:center;display:flex;gap:8px;justify-content:space-between;margin-bottom:12px}.itsdesk-card h3{color:var(--dk-label);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;margin:0;text-transform:uppercase}.itsdesk-card h3.itsdesk-card__title{color:var(--dk-ink);font-size:var(--dk-text-lg);font-weight:600;letter-spacing:-.01em;line-height:var(--dk-leading-title);margin:0;text-transform:none}.itsdesk-card p{font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0 0 8px}.itsdesk-mono{background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:8px;font-family:var(--dk-font-mono);font-size:var(--dk-text-xs);line-height:1.4;padding:8px 10px;word-break:break-all}.itsdesk-field{margin-bottom:14px}.itsdesk-field label{color:var(--dk-label);display:block;font-size:var(--dk-text-sm);font-weight:600;margin-bottom:6px}.itsdesk-admin select.itsdesk-select,.itsdesk-field select.itsdesk-select{appearance:none;background-color:#fff;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2712%27 height=%278%27 fill=%27none%27%3E%3Cpath stroke=%27%23475467%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%271.75%27 d=%27m1 1.5 5 5 5-5%27/%3E%3C/svg%3E");background-position:left 12px center;background-repeat:no-repeat;background-size:12px 8px;border:1px solid var(--dk-line);border-radius:9px;box-shadow:none;color:var(--dk-ink);cursor:pointer;display:block;font-size:var(--dk-text-md);font-weight:500;height:38px;line-height:38px;margin:0;max-height:38px;max-width:280px;min-height:38px;padding:0 12px 0 36px;vertical-align:middle;width:100%}.itsdesk-admin select.itsdesk-select:hover:not(:disabled),.itsdesk-field select.itsdesk-select:hover:not(:disabled){border-color:#c5d0d4}.itsdesk-admin select.itsdesk-select:focus,.itsdesk-field select.itsdesk-select:focus{border-color:var(--dk-accent);outline:2px solid var(--dk-accent-soft);outline-offset:1px}.itsdesk-admin select.itsdesk-select:disabled,.itsdesk-field select.itsdesk-select:disabled{background-color:var(--dk-canvas);cursor:not-allowed;opacity:.55}.itsdesk-btn--danger:disabled,.itsdesk-btn--secondary:disabled{background:var(--dk-canvas);border-color:var(--dk-line);color:var(--dk-muted);opacity:.45}.itsdesk-toggle{align-items:center;border-bottom:1px solid #f0f2f5;display:flex;gap:16px;justify-content:space-between;padding:12px 0}.itsdesk-toggle:last-child{border-bottom:none}.itsdesk-toggle.is-disabled{opacity:.55}.itsdesk-toggle__label{color:var(--dk-ink);cursor:pointer;font-size:var(--dk-text-md);font-weight:600}.itsdesk-toggle__desc{color:var(--dk-muted);font-size:var(--dk-text-sm);line-height:1.4;margin:3px 0 0}.itsdesk-switch{background:#d0d5dd;border:none;border-radius:999px;cursor:pointer;flex-shrink:0;height:24px;padding:0;position:relative;transition:background .15s ease;width:42px}.itsdesk-switch.is-on{background:var(--dk-accent)}.itsdesk-switch__thumb{background:#fff;border-radius:50%;box-shadow:0 1px 2px rgba(16,24,40,.2);height:18px;right:3px;position:absolute;top:3px;transition:transform .15s ease;width:18px}.itsdesk-switch.is-on .itsdesk-switch__thumb{transform:translateX(-18px)}.itsdesk-toast{align-items:center;animation:itsdesk-fade-in .2s ease;background:var(--dk-ink);border-radius:10px;bottom:28px;box-shadow:0 12px 32px rgba(16,42,51,.25);color:#fff;display:flex;font-size:var(--dk-text-md);font-weight:500;gap:10px;padding:12px 14px;position:fixed;left:28px;z-index:100000}.itsdesk-toast--danger{background:var(--dk-danger)}.itsdesk-toast__close{background:transparent;border:none;color:inherit;cursor:pointer;font-size:var(--dk-text-lg);line-height:1;opacity:.88;padding:0 4px 0 0}.itsdesk-skeleton{padding:22px 24px}.itsdesk-skeleton__block,.itsdesk-skeleton__hero,.itsdesk-skeleton__row span{animation:itsdesk-shimmer 1.2s ease infinite;background:linear-gradient(-90deg,#eef1f4 25%,#f7f8fa 50%,#eef1f4 75%);background-size:200% 100%;border-radius:10px}.itsdesk-skeleton__hero{height:148px;margin-bottom:16px}.itsdesk-skeleton__row{display:grid;gap:12px;grid-template-columns:repeat(4,1fr);margin-bottom:16px}.itsdesk-skeleton__row span{display:block;height:88px}.itsdesk-skeleton__block{height:56px;margin-bottom:12px}.itsdesk-skeleton__block--short{height:120px;width:70%}@keyframes itsdesk-shimmer{0%{background-position:0% 0}to{background-position:200% 0}}.itsdesk-admin__error{color:var(--dk-danger);padding:20px 24px}.itsdesk-divider{border:none;border-top:1px solid var(--dk-line);margin:20px 0}.itsdesk-features{display:grid;gap:14px;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:20px}@media (max-width:780px){.itsdesk-features{grid-template-columns:1fr}}.itsdesk-feature{background:#fff;border:1px solid var(--dk-line);border-radius:12px;padding:16px}.itsdesk-feature__icon{background:var(--dk-accent-soft);border-radius:8px;color:var(--dk-accent);display:grid;height:34px;margin-bottom:10px;place-items:center;width:34px}.itsdesk-feature strong{display:block;font-size:var(--dk-text-md);font-weight:600;margin-bottom:4px}.itsdesk-feature p{color:var(--dk-muted);font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0}.itsdesk-workspace-list{display:grid;gap:8px;margin:14px 0}.itsdesk-workspace{align-items:flex-start;background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:10px;color:inherit;cursor:pointer;display:flex;flex-direction:column;font:inherit;gap:2px;padding:12px 14px;text-align:right;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease;width:100%}.itsdesk-workspace:hover:not(:disabled){background:#fff;border-color:#c5d0d4}.itsdesk-workspace.is-selected{background:var(--dk-accent-soft);border-color:var(--dk-accent);box-shadow:0 0 0 1px var(--dk-accent)}.itsdesk-workspace strong{font-size:var(--dk-text-md);font-weight:600}.itsdesk-workspace span{color:var(--dk-muted);font-family:var(--dk-font-mono);font-size:var(--dk-text-xs)}.itsdesk-checkline{align-items:flex-start;color:var(--dk-muted);cursor:pointer;display:flex;font-size:var(--dk-text-md);gap:8px;line-height:var(--dk-leading-body);margin:8px 0 4px}.itsdesk-checkline input{margin-top:2px}.itsdesk-devtools{border-top:1px dashed var(--dk-line);margin-top:16px;padding-top:12px}.itsdesk-devtools summary{color:var(--dk-label);cursor:pointer;font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;text-transform:uppercase;-webkit-user-select:none;user-select:none}.itsdesk-devtools[open] summary{margin-bottom:10px}.itsdesk-input,.itsdesk-textarea{background:#fff;border:1px solid var(--dk-line);border-radius:9px;box-shadow:none;color:var(--dk-ink);display:block;font-family:inherit;font-size:var(--dk-text-md);max-width:100%;min-height:38px;padding:9px 12px;width:100%}.itsdesk-textarea{line-height:var(--dk-leading-body);min-height:96px;resize:vertical}.itsdesk-input:focus,.itsdesk-textarea:focus{border-color:var(--dk-accent);outline:2px solid var(--dk-accent-soft);outline-offset:1px}.itsdesk-tickets{align-items:start;display:grid;gap:16px;grid-template-columns:minmax(min(300px,100%),380px) minmax(0,1fr);margin-top:16px}@media (max-width:900px){.itsdesk-tickets{grid-template-columns:minmax(0,1fr)}}.itsdesk-tickets__list{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:10px;display:flex;flex-direction:column;max-height:720px;overflow:auto}.itsdesk-ticket-row{align-items:flex-start;background:transparent;border:0;border-bottom:1px solid var(--dk-line);border-inline-start:3px solid transparent;color:inherit;display:flex;font:inherit;gap:10px;padding:12px 12px 12px 14px;text-align:right;transition:background .15s ease;width:100%}.itsdesk-ticket-row:last-child{border-bottom:0}.itsdesk-ticket-row input[type=checkbox]{flex-shrink:0;margin-top:3px}.itsdesk-ticket-row__content{cursor:pointer;flex:1;min-width:0}.itsdesk-ticket-row:hover{background:var(--dk-canvas)}.itsdesk-ticket-row.is-active{background:var(--dk-accent-soft);border-inline-start-color:var(--dk-accent)}.itsdesk-ticket-row__meta,.itsdesk-ticket-row__top{align-items:center;display:flex;flex-wrap:wrap;gap:6px 8px}.itsdesk-ticket-row__meta{justify-content:space-between}.itsdesk-ticket-row__top strong{flex:1 1 100%;font-size:var(--dk-text-md);font-weight:600;line-height:1.35;overflow-wrap:anywhere}.itsdesk-ticket-row__meta{color:var(--dk-muted);font-size:var(--dk-text-sm);margin-top:6px}.itsdesk-tickets__empty{border:1px dashed var(--dk-line);border-radius:12px;padding:40px 16px;text-align:center}.itsdesk-thread{border-top:1px solid var(--dk-line);display:flex;flex-direction:column;gap:10px;margin-top:16px;padding-top:14px}.itsdesk-bubble{background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:10px;padding:12px 14px}.itsdesk-bubble--agent{background:#fff;border-color:#c5d0d4}.itsdesk-bubble.is-internal{background:var(--dk-warn-soft);border-color:#f5d565}.itsdesk-bubble__meta{align-items:center;color:var(--dk-muted);display:flex;flex-wrap:wrap;font-weight:500;gap:8px;margin-bottom:6px}.itsdesk-bubble__meta,.itsdesk-bubble__meta strong{font-size:var(--dk-text-xs);letter-spacing:0;text-transform:none}.itsdesk-bubble__meta strong{color:var(--dk-label);font-weight:600}.itsdesk-bubble__time{color:var(--dk-muted);font-size:var(--dk-text-xs)}.itsdesk-bubble p{font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0;white-space:pre-wrap}.itsdesk-attachment-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}.itsdesk-attachment-chip{align-items:center;background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:999px;color:var(--dk-label);display:inline-flex;font-size:var(--dk-text-xs);gap:5px;line-height:1.4;max-width:280px;padding:4px 6px 4px 8px}.itsdesk-attachment-chip__remove{align-items:center;background:transparent;border:none;border-radius:50%;color:var(--dk-muted);cursor:pointer;display:inline-flex;flex-shrink:0;font-size:var(--dk-text-md);height:16px;justify-content:center;line-height:1;margin-right:2px;padding:0;transition:background .12s ease,color .12s ease;width:16px}.itsdesk-attachment-chip__remove:hover{background:var(--dk-danger-soft);color:var(--dk-danger)}.itsdesk-attachment-chip--link{text-decoration:none;transition:border-color .15s ease,background .15s ease}.itsdesk-attachment-chip--link:hover{background:var(--dk-accent-soft);border-color:var(--dk-accent);color:var(--dk-accent)}.itsdesk-attachment-list{border-top:1px solid var(--dk-line);display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;padding-top:10px}.itsdesk-attachment-name{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.itsdesk-attachment-size{color:var(--dk-muted);flex-shrink:0;font-size:var(--dk-text-xs)}.itsdesk-attachment-thumb{border-radius:6px;display:block;flex-shrink:0;height:40px;object-fit:cover;width:40px}.itsdesk-attach-btn{padding-right:10px;padding-left:12px}.itsdesk-admin .itsdesk-page-title{font-size:var(--dk-text-xl);letter-spacing:-.01em}.itsdesk-callout{align-items:center;background:var(--dk-warn-soft);border:1px solid #f5d565;border-radius:10px;display:flex;gap:16px;justify-content:space-between;margin:16px 0 0;padding:14px 16px}.itsdesk-callout p{color:var(--dk-label);margin:2px 0 0}.itsdesk-two{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr));margin:14px 0}.itsdesk-box{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:10px;padding:16px 18px}.itsdesk-box h3{color:var(--dk-ink);font-size:var(--dk-text-md);font-weight:600;margin:0 0 12px}.itsdesk-box__head{align-items:baseline;display:flex;gap:10px;justify-content:space-between}.itsdesk-link{background:none;border:0;color:var(--dk-accent);cursor:pointer;font:inherit;font-size:var(--dk-text-sm);font-weight:500;padding:0;white-space:nowrap}.itsdesk-link:hover{color:var(--dk-accent-hover);text-decoration:underline}.itsdesk-week{align-items:end;display:grid;gap:8px;grid-template-columns:repeat(7,1fr);height:150px}.itsdesk-week__col{align-items:center;display:flex;flex-direction:column;gap:4px;height:100%;justify-content:flex-end}.itsdesk-week__n{color:var(--dk-muted);font-size:var(--dk-text-xs);font-variant-numeric:tabular-nums}.itsdesk-week__bar{align-items:flex-end;display:flex;flex:1;max-width:44px;width:100%}.itsdesk-week__bar i{background:var(--dk-accent);border-radius:5px 5px 2px 2px;display:block;width:100%}.itsdesk-week__d{color:var(--dk-muted);font-size:var(--dk-text-xs)}.itsdesk-list{list-style:none;margin:0;padding:0}.itsdesk-list li+li{border-top:1px solid var(--dk-line)}.itsdesk-list button{align-items:center;background:none;border:0;border-radius:6px;color:inherit;cursor:pointer;display:flex;font:inherit;gap:12px;justify-content:space-between;padding:9px 4px;text-align:start;width:100%}.itsdesk-list button:hover{background:var(--dk-canvas)}.itsdesk-list__main{display:flex;flex-direction:column;min-width:0}.itsdesk-list__main span,.itsdesk-list__main strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.itsdesk-list__main span{color:var(--dk-muted);font-size:var(--dk-text-sm)}.itsdesk-status-list{list-style:none;margin:0 0 8px;padding:0}.itsdesk-status-list li{align-items:center;display:flex;gap:12px;padding:10px 0}.itsdesk-status-list li+li{border-top:1px solid var(--dk-line)}.itsdesk-status-list__icon{background:var(--dk-canvas);border-radius:8px;color:var(--dk-ink-soft);display:grid;flex-shrink:0;height:30px;place-items:center;width:30px}.itsdesk-status-list__text{display:flex;flex:1;flex-direction:column;min-width:0}.itsdesk-status-list__text span{color:var(--dk-muted);font-size:var(--dk-text-sm)}.itsdesk-meta-bar{display:grid;gap:0 14px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));margin-top:14px}.itsdesk-meta-bar .itsdesk-field select.itsdesk-select{max-width:none}.itsdesk-inline-form{align-items:flex-end;display:flex;gap:10px}.itsdesk-inline-form .itsdesk-field{flex:1;margin-bottom:0}.itsdesk-segmented{border:1px solid var(--dk-line);border-radius:9px;display:inline-flex;gap:0;margin-top:4px;overflow:hidden}.itsdesk-segmented .itsdesk-btn{border:0;border-radius:0;min-height:34px;padding:7px 16px}.itsdesk-segmented .itsdesk-btn+.itsdesk-btn{border-inline-start:1px solid var(--dk-line)}.itsdesk-segmented .itsdesk-btn--primary:disabled{cursor:default;opacity:1}.itsdesk-tabs{border-bottom:1px solid var(--dk-line);display:flex;gap:4px;margin:14px 0 16px;overflow-x:auto;overflow-y:hidden}.itsdesk-tab{background:none;border:0;border-bottom:2px solid transparent;color:var(--dk-muted);cursor:pointer;font:inherit;font-size:var(--dk-text-md);font-weight:500;margin-bottom:-1px;padding:8px 12px;white-space:nowrap}.itsdesk-tab:hover{color:var(--dk-ink)}.itsdesk-tab.is-active{border-bottom-color:var(--dk-accent);color:var(--dk-accent-hover);font-weight:600}.itsdesk-tab:focus-visible{border-radius:4px;outline:2px solid var(--dk-accent);outline-offset:-2px}.itsdesk-pro-tag{background:var(--dk-accent-soft);border-radius:99px;color:var(--dk-accent-hover);display:inline-block;font-size:var(--dk-text-xs);font-weight:600;margin-inline-start:8px;padding:1px 7px;vertical-align:middle}.itsdesk-feature.is-locked{background:var(--dk-canvas);border-style:dashed}.itsdesk-feature__list{color:var(--dk-muted);font-size:var(--dk-text-sm);margin:8px 0 0;padding-inline-start:18px}.itsdesk-feature .itsdesk-link{margin-top:8px}.itsdesk-filters{align-items:center;display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.itsdesk-filters .itsdesk-select{max-width:200px;min-width:130px;width:auto}.itsdesk-views{align-items:center;display:flex;flex-wrap:wrap;gap:6px 8px;margin-top:8px}.itsdesk-views:empty{display:none}.itsdesk-views__chip{align-items:center;background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:99px;display:inline-flex;font-size:var(--dk-text-sm)}.itsdesk-views__chip button{background:none;border:0;color:var(--dk-label);cursor:pointer;font:inherit;padding:4px 12px 4px 6px}.itsdesk-views__chip button:hover{color:var(--dk-accent-hover)}.itsdesk-views__chip .itsdesk-views__x{color:var(--dk-muted);padding:4px 2px 4px 10px}.itsdesk-views__new{align-items:center;display:inline-flex;gap:6px}.itsdesk-views__new .itsdesk-input{width:220px}.itsdesk-ticket-row__content:focus-visible{border-radius:6px;outline:2px solid var(--dk-accent);outline-offset:2px}.itsdesk-merge{margin:10px 0 0}.itsdesk-merge__panel{background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:10px;margin-top:8px;padding:12px 14px}.itsdesk-merge__panel label{color:var(--dk-label);display:block;font-size:var(--dk-text-sm);font-weight:600;margin-bottom:6px}.itsdesk-merge__panel .itsdesk-list{background:var(--dk-surface);border-radius:8px;margin-top:8px}.itsdesk-split{font-size:12px;margin-top:6px}.itsdesk-split__panel{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:6px;display:grid;gap:6px;margin-top:6px;padding:10px}.itsdesk-split__panel label{font-weight:500}.itsdesk-split__panel .itsdesk-btn{justify-self:start}.itsdesk-setup{border-color:var(--dk-accent);box-shadow:0 0 0 3px var(--dk-accent-soft);margin-top:16px}.itsdesk-setup .itsdesk-card__head{align-items:flex-start}.itsdesk-setup__count{color:var(--dk-accent);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.02em;margin:0 0 2px;text-transform:uppercase}.itsdesk-setup__dots{display:flex;gap:6px;list-style:none;margin:0 0 14px;padding:0}.itsdesk-setup__dots li{background:var(--dk-line);border-radius:999px;flex:1 1 0;height:4px}.itsdesk-setup__dots li.is-on{background:var(--dk-accent)}.itsdesk-setup__error{background:var(--dk-danger-soft);border-radius:8px;color:var(--dk-danger);margin:0 0 12px;padding:8px 12px}.itsdesk-cats{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));margin-top:8px}.itsdesk-cats__group{border:0;margin:0;min-width:0;padding:0}.itsdesk-cats__group legend{color:var(--dk-label);font-weight:600;margin-bottom:8px}.itsdesk-cats__check{align-items:center;cursor:pointer;display:flex;gap:8px;padding:4px 0}.itsdesk-cats__row{align-items:center;display:flex;gap:8px;margin-bottom:8px}.itsdesk-cats__row .itsdesk-input{flex:1 1 auto;min-width:0}.itsdesk-setup .itsdesk-card__head h3{color:var(--dk-ink);font-size:var(--dk-text-lg);font-weight:650;letter-spacing:normal;margin:0;text-transform:none}.itsdesk-setup__dots li{margin:0}.itsdesk-ff{display:grid;gap:10px;list-style:none;margin:12px 0 0;padding:0}.itsdesk-ff__item{border:1px solid var(--dk-line);border-radius:10px;margin:0;padding:12px}.itsdesk-ff__row{display:grid;gap:10px;grid-template-columns:minmax(0,1fr) minmax(140px,180px)}.itsdesk-ff__item .itsdesk-field{margin-bottom:8px}.itsdesk-ff__actions{align-items:center;display:flex;flex-wrap:wrap;gap:4px}@media (max-width:600px){.itsdesk-ff__row{grid-template-columns:minmax(0,1fr)}}.itsdesk-answers{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:10px;display:grid;gap:8px 16px;grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));margin:0 0 12px;padding:10px 12px}.itsdesk-answers div{min-width:0}.itsdesk-answers dt{color:var(--dk-label);font-size:var(--dk-text-xs,12px)}.itsdesk-answers dd{margin:2px 0 0;overflow-wrap:anywhere}
  • deskovi/trunk/assets/admin/index.asset.php

    r3803408 r3843768  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-element', 'wp-i18n'), 'version' => '5a628a502fde4c0ea09c');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-element', 'wp-i18n'), 'version' => '4c3c798086275dc4dc31');
  • deskovi/trunk/assets/admin/index.css

    r3803408 r3843768  
    1 .itsdesk-admin{--dk-ink:#102a33;--dk-ink-soft:#1e4a57;--dk-accent:#0f766e;--dk-accent-hover:#0d5f59;--dk-accent-soft:#e6f4f2;--dk-warn:#8a5a00;--dk-warn-soft:#fcf4e3;--dk-danger:#b42318;--dk-danger-soft:#fef3f2;--dk-ok:#067647;--dk-ok-soft:#ecfdf3;--dk-line:#e4e7ec;--dk-muted:#475467;--dk-label:#344054;--dk-surface:#fff;--dk-canvas:#f4f6f8;--dk-radius:12px;--dk-shadow:0 1px 2px rgba(16,42,51,.06);--dk-shadow-hover:0 8px 24px rgba(16,42,51,.08);--dk-font:"Inter","Hind Siliguri",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans Bengali","Nirmala UI","Helvetica Neue",sans-serif;--dk-font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;--dk-text-xs:12px;--dk-text-sm:13px;--dk-text-md:14px;--dk-text-lg:16px;--dk-text-xl:20px;--dk-text-hero:28px;--dk-leading-body:1.5;--dk-leading-title:1.25;color:var(--dk-ink);font-family:var(--dk-font);font-optical-sizing:auto;font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:8px 20px 48px 0;max-width:1360px;position:relative;-webkit-font-smoothing:antialiased}.itsdesk-admin:lang(bn){--dk-leading-body:1.7;--dk-leading-title:1.4}.itsdesk-admin:lang(bn) *,.itsdesk-admin:lang(bn) :after,.itsdesk-admin:lang(bn) :before{letter-spacing:normal!important}.itsdesk-admin *,.itsdesk-admin :after,.itsdesk-admin :before{box-sizing:border-box}.itsdesk-admin-wrap>h1{display:none}.itsdesk-admin__shell{align-items:start;display:grid;gap:20px;grid-template-columns:224px minmax(0,1fr)}.itsdesk-admin__side{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:var(--dk-radius);box-shadow:var(--dk-shadow);display:flex;flex-direction:column;gap:14px;padding:14px 10px 16px;position:sticky;top:48px}.itsdesk-admin__main{min-width:0}.itsdesk-admin__brand{align-items:center;display:flex;gap:10px;padding:2px 8px 0}.itsdesk-admin__logo{background:var(--dk-ink);border-radius:9px;color:#fff;display:grid;flex-shrink:0;height:34px;place-items:center;width:34px}.itsdesk-admin__brand h1{color:var(--dk-ink);font-size:var(--dk-text-lg);font-weight:600;letter-spacing:-.01em;line-height:var(--dk-leading-title);margin:0;padding:0}.itsdesk-admin__version{color:var(--dk-muted);display:block;font-size:var(--dk-text-xs);line-height:1.2}.itsdesk-admin__nav{display:flex;flex-direction:column;gap:14px}.itsdesk-admin__nav-group{display:flex;flex-direction:column;gap:2px}.itsdesk-admin__nav-label{color:var(--dk-muted);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.05em;padding:0 10px 4px;text-transform:uppercase}.itsdesk-admin__nav-btn{align-items:center;background:transparent;border:0;border-radius:8px;color:var(--dk-label);cursor:pointer;display:flex;font-family:inherit;font-size:var(--dk-text-md);font-weight:500;gap:10px;line-height:1.3;padding:7px 10px;text-align:start;transition:background .15s ease,color .15s ease;width:100%}.itsdesk-admin__nav-btn:hover{background:var(--dk-canvas);color:var(--dk-ink)}.itsdesk-admin__nav-btn:focus-visible{outline:2px solid var(--dk-accent);outline-offset:-2px}.itsdesk-admin__nav-btn.is-active{background:var(--dk-accent-soft);color:var(--dk-accent-hover);font-weight:600}.itsdesk-admin__nav-btn svg{flex-shrink:0;height:17px;opacity:.85;width:17px}.itsdesk-admin__nav-btn.is-active svg{opacity:1}@media (max-width:1100px){.itsdesk-admin__shell{gap:14px;grid-template-columns:minmax(0,1fr)}.itsdesk-admin__side{align-items:center;flex-direction:row;gap:10px;padding:8px 10px;position:static}.itsdesk-admin__brand{display:none}.itsdesk-admin__nav{flex:1;flex-direction:row;gap:4px;min-width:0;overflow-x:auto;padding-bottom:2px;scrollbar-width:thin}.itsdesk-admin__nav-group{align-items:center;border-inline-end:1px solid var(--dk-line);flex-direction:row;flex-shrink:0;gap:2px;margin-inline-end:2px;padding-inline-end:6px}.itsdesk-admin__nav-label{display:none}.itsdesk-admin__nav-btn{white-space:nowrap;width:auto}}.itsdesk-admin__panel{animation:itsdesk-fade-in .22s ease;background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:var(--dk-radius);box-shadow:var(--dk-shadow);overflow:hidden;padding:0}.itsdesk-admin__panel-inner{padding:24px 28px 28px}@media (max-width:600px){.itsdesk-admin__panel-inner{padding:16px 14px 20px}.itsdesk-admin{margin-right:10px}}@keyframes itsdesk-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.itsdesk-admin__row{align-items:center;display:flex;flex-wrap:wrap;gap:10px}.itsdesk-admin__spacer{flex:1}.itsdesk-admin h2{font-size:var(--dk-text-lg);font-weight:600;letter-spacing:-.01em;line-height:var(--dk-leading-title);margin:0}.itsdesk-admin h3.itsdesk-admin__section{color:var(--dk-label);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;margin:24px 0 12px;text-transform:uppercase}.itsdesk-admin__muted{color:var(--dk-muted);font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:6px 0 0}.itsdesk-btn{align-items:center;border:1px solid transparent;border-radius:9px;cursor:pointer;display:inline-flex;font-size:var(--dk-text-md);font-weight:600;gap:8px;justify-content:center;line-height:1.3;min-height:36px;padding:9px 16px;text-decoration:none;transition:background .15s ease,border-color .15s ease,color .15s ease,transform .12s ease}.itsdesk-btn:active:not(:disabled){transform:translateY(1px)}.itsdesk-btn:disabled{cursor:not-allowed;opacity:.55}.itsdesk-btn--primary{background:var(--dk-accent);border-color:var(--dk-accent);color:#fff}.itsdesk-btn--primary:hover:not(:disabled){background:var(--dk-accent-hover);border-color:var(--dk-accent-hover);color:#fff}.itsdesk-btn--secondary{background:#fff;border-color:var(--dk-line);color:var(--dk-ink)}.itsdesk-btn--secondary:hover:not(:disabled){background:var(--dk-canvas);border-color:#c8ced6;color:var(--dk-ink)}.itsdesk-btn--ghost{background:transparent;border-color:transparent;color:var(--dk-accent);padding-left:8px;padding-right:8px}.itsdesk-btn--ghost:hover:not(:disabled){background:var(--dk-accent-soft)}.itsdesk-btn--danger{background:#fff;border-color:#fecdca;color:var(--dk-danger)}.itsdesk-admin__actions{align-items:center;display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.itsdesk-pagination{align-items:center;border-top:1px solid var(--dk-line);display:flex;gap:8px;justify-content:center;margin-top:12px;padding-top:12px}.itsdesk-bulk-bar{align-items:center;background:var(--dk-accent-soft);border:1px solid var(--dk-accent);border-radius:10px;display:flex;gap:10px;padding:8px 12px}.itsdesk-badge{align-items:center;border:1px solid transparent;border-radius:999px;display:inline-flex;font-size:var(--dk-text-sm);font-weight:600;gap:6px;line-height:1.3;padding:5px 11px}.itsdesk-badge__dot{background:currentColor;border-radius:50%;flex-shrink:0;height:7px;width:7px}.itsdesk-badge__dot.is-pulse{animation:itsdesk-pulse 1.8s ease infinite;box-shadow:0 0 0 0 currentColor}@keyframes itsdesk-pulse{0%{box-shadow:0 0 0 0 rgba(6,118,71,.45)}70%{box-shadow:0 0 0 7px rgba(6,118,71,0)}to{box-shadow:0 0 0 0 rgba(6,118,71,0)}}.itsdesk-badge--ok{background:var(--dk-ok-soft);border-color:#abefc6;color:var(--dk-ok)}.itsdesk-badge--warn{background:var(--dk-warn-soft);border-color:#f5d565;color:var(--dk-warn)}.itsdesk-badge--danger{background:var(--dk-danger-soft);border-color:#fecdca;color:var(--dk-danger)}.itsdesk-badge--info{background:#eff8ff;border-color:#b2ddff;color:#175cd3}.itsdesk-badge--neutral{background:#f2f4f7;border-color:#d0d5dd;color:#344054}.itsdesk-metrics{display:grid;gap:14px;grid-template-columns:repeat(4,minmax(0,1fr));margin:18px 0}@media (max-width:960px){.itsdesk-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}.itsdesk-metric{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:10px;color:inherit;font:inherit;padding:14px 16px;text-align:left;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease,background .15s ease;width:100%}.itsdesk-metric.is-clickable{cursor:pointer}.itsdesk-metric.is-clickable:hover{border-color:#c5d0d4;box-shadow:var(--dk-shadow-hover)}.itsdesk-metric--ok{border-color:#abefc6}.itsdesk-metric--ok .itsdesk-metric__value{color:var(--dk-ok)}.itsdesk-metric--warn{border-color:#f5d565}.itsdesk-metric--warn .itsdesk-metric__value{color:var(--dk-warn)}.itsdesk-metric--danger{border-color:#fecdca}.itsdesk-metric--danger .itsdesk-metric__value{color:var(--dk-danger)}.itsdesk-metric__top{align-items:center;display:flex;gap:8px;justify-content:space-between;margin-bottom:10px}.itsdesk-metric__label{color:var(--dk-label);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;text-transform:uppercase}.itsdesk-metric__icon{color:var(--dk-ink-soft);opacity:.9}.itsdesk-metric__icon svg{height:18px;width:18px}.itsdesk-metric__value{color:var(--dk-ink);font-size:var(--dk-text-hero);font-variant-numeric:tabular-nums;font-weight:600;letter-spacing:-.02em;line-height:var(--dk-leading-title)}.itsdesk-metric__hint{color:var(--dk-muted);font-size:var(--dk-text-sm);line-height:1.4;margin-top:6px}.itsdesk-hero{background:var(--dk-ink);border:1px solid #0b2229;border-radius:14px;color:#fff;display:grid;gap:22px;grid-template-columns:1.35fr 1fr;margin-bottom:20px;overflow:hidden;padding:24px;position:relative}.itsdesk-hero:after{background:var(--dk-accent);border-radius:50%;content:"";height:180px;opacity:.18;pointer-events:none;position:absolute;right:-40px;top:-40px;width:180px}@media (max-width:860px){.itsdesk-hero{grid-template-columns:1fr}}.itsdesk-hero__eyebrow{align-items:center;display:inline-flex;font-size:var(--dk-text-xs);font-weight:600;gap:6px;letter-spacing:.05em;margin-bottom:10px;opacity:.9;text-transform:uppercase}.itsdesk-hero h2{color:#fff;font-size:var(--dk-text-hero);font-weight:600;letter-spacing:-.03em;line-height:var(--dk-leading-title);margin:0 0 10px}.itsdesk-hero p{color:hsla(0,0%,100%,.9);font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0 0 18px;max-width:460px}.itsdesk-hero__actions{display:flex;flex-wrap:wrap;gap:10px}.itsdesk-hero .itsdesk-btn--primary{background:#fff;border-color:#fff;color:var(--dk-ink)}.itsdesk-hero .itsdesk-btn--primary:hover:not(:disabled){background:#eef7f6;border-color:#eef7f6;color:var(--dk-ink)}.itsdesk-hero .itsdesk-btn--secondary{background:transparent;border-color:hsla(0,0%,100%,.35);color:#fff}.itsdesk-hero .itsdesk-btn--secondary:hover:not(:disabled){background:hsla(0,0%,100%,.1);border-color:hsla(0,0%,100%,.55);color:#fff}.itsdesk-checklist{background:hsla(0,0%,100%,.08);border:1px solid hsla(0,0%,100%,.14);border-radius:12px;padding:16px 16px 12px}.itsdesk-checklist__title{font-size:var(--dk-text-sm);font-weight:600;letter-spacing:.04em;margin-bottom:12px;opacity:.88;text-transform:uppercase}.itsdesk-checklist__item{align-items:flex-start;border-top:1px solid hsla(0,0%,100%,.1);display:flex;gap:10px;padding:10px 0}.itsdesk-checklist__item:first-of-type{border-top:none}.itsdesk-checklist__mark{align-items:center;border:1.5px solid hsla(0,0%,100%,.4);border-radius:50%;box-sizing:border-box;color:inherit;display:inline-flex;flex-shrink:0;font-family:var(--dk-font);font-size:var(--dk-text-xs);font-style:normal;font-weight:600;height:24px;justify-content:center;letter-spacing:0;line-height:1;margin-top:1px;opacity:1;width:24px}.itsdesk-checklist__mark svg{display:block;flex-shrink:0}.itsdesk-checklist__item.is-done .itsdesk-checklist__mark{background:hsla(0,0%,100%,.95);border-color:transparent;color:var(--dk-accent)}.itsdesk-checklist__item>div{min-width:0}.itsdesk-checklist__item strong{display:block;font-family:var(--dk-font);font-size:var(--dk-text-md);font-weight:600;margin-bottom:3px}.itsdesk-checklist__item>div>span{display:block;font-family:var(--dk-font);font-size:var(--dk-text-sm);line-height:1.45;opacity:.88}.itsdesk-health{align-items:flex-start;background:var(--dk-accent-soft);border:1px solid #b7e4de;border-radius:12px;display:flex;gap:12px;margin:16px 0;padding:16px 18px}.itsdesk-health--warn{background:var(--dk-warn-soft);border-color:#f5d565}.itsdesk-health__icon{color:var(--dk-accent);margin-top:2px}.itsdesk-health--warn .itsdesk-health__icon{color:var(--dk-warn)}.itsdesk-health strong{display:block;font-size:var(--dk-text-md);font-weight:600;margin-bottom:4px}.itsdesk-health p{color:var(--dk-muted);font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0}.itsdesk-table{border:1px solid var(--dk-line);border-collapse:separate;border-radius:12px;border-spacing:0;margin:8px 0 0;overflow:hidden;width:100%}.itsdesk-table td,.itsdesk-table th{border-bottom:1px solid var(--dk-line);font-size:var(--dk-text-md);line-height:1.4;padding:12px 16px;text-align:left;vertical-align:middle}.itsdesk-table tr:last-child td{border-bottom:none}.itsdesk-table th{background:var(--dk-canvas);color:var(--dk-label);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;padding:10px 16px;text-transform:uppercase}.itsdesk-table tbody tr{transition:background .12s ease}.itsdesk-table tbody tr:hover{background:#fafbfc}.itsdesk-table__area{color:var(--dk-ink);font-weight:600}.itsdesk-grid-2{display:grid;gap:14px;grid-template-columns:1fr 1fr;margin:16px 0}@media (max-width:780px){.itsdesk-grid-2{grid-template-columns:1fr}}.itsdesk-card{background:#fff;border:1px solid var(--dk-line);border-radius:10px;padding:16px 18px}.itsdesk-card__head{align-items:center;display:flex;gap:8px;justify-content:space-between;margin-bottom:12px}.itsdesk-card h3{color:var(--dk-label);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;margin:0;text-transform:uppercase}.itsdesk-card h3.itsdesk-card__title{color:var(--dk-ink);font-size:var(--dk-text-lg);font-weight:600;letter-spacing:-.01em;line-height:var(--dk-leading-title);margin:0;text-transform:none}.itsdesk-card p{font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0 0 8px}.itsdesk-mono{background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:8px;font-family:var(--dk-font-mono);font-size:var(--dk-text-xs);line-height:1.4;padding:8px 10px;word-break:break-all}.itsdesk-field{margin-bottom:14px}.itsdesk-field label{color:var(--dk-label);display:block;font-size:var(--dk-text-sm);font-weight:600;margin-bottom:6px}.itsdesk-admin select.itsdesk-select,.itsdesk-field select.itsdesk-select{appearance:none;background-color:#fff;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2712%27 height=%278%27 fill=%27none%27%3E%3Cpath stroke=%27%23475467%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%271.75%27 d=%27m1 1.5 5 5 5-5%27/%3E%3C/svg%3E");background-position:right 12px center;background-repeat:no-repeat;background-size:12px 8px;border:1px solid var(--dk-line);border-radius:9px;box-shadow:none;color:var(--dk-ink);cursor:pointer;display:block;font-size:var(--dk-text-md);font-weight:500;height:38px;line-height:38px;margin:0;max-height:38px;max-width:280px;min-height:38px;padding:0 36px 0 12px;vertical-align:middle;width:100%}.itsdesk-admin select.itsdesk-select:hover:not(:disabled),.itsdesk-field select.itsdesk-select:hover:not(:disabled){border-color:#c5d0d4}.itsdesk-admin select.itsdesk-select:focus,.itsdesk-field select.itsdesk-select:focus{border-color:var(--dk-accent);outline:2px solid var(--dk-accent-soft);outline-offset:1px}.itsdesk-admin select.itsdesk-select:disabled,.itsdesk-field select.itsdesk-select:disabled{background-color:var(--dk-canvas);cursor:not-allowed;opacity:.55}.itsdesk-btn--danger:disabled,.itsdesk-btn--secondary:disabled{background:var(--dk-canvas);border-color:var(--dk-line);color:var(--dk-muted);opacity:.45}.itsdesk-toggle{align-items:center;border-bottom:1px solid #f0f2f5;display:flex;gap:16px;justify-content:space-between;padding:12px 0}.itsdesk-toggle:last-child{border-bottom:none}.itsdesk-toggle.is-disabled{opacity:.55}.itsdesk-toggle__label{color:var(--dk-ink);cursor:pointer;font-size:var(--dk-text-md);font-weight:600}.itsdesk-toggle__desc{color:var(--dk-muted);font-size:var(--dk-text-sm);line-height:1.4;margin:3px 0 0}.itsdesk-switch{background:#d0d5dd;border:none;border-radius:999px;cursor:pointer;flex-shrink:0;height:24px;padding:0;position:relative;transition:background .15s ease;width:42px}.itsdesk-switch.is-on{background:var(--dk-accent)}.itsdesk-switch__thumb{background:#fff;border-radius:50%;box-shadow:0 1px 2px rgba(16,24,40,.2);height:18px;left:3px;position:absolute;top:3px;transition:transform .15s ease;width:18px}.itsdesk-switch.is-on .itsdesk-switch__thumb{transform:translateX(18px)}.itsdesk-toast{align-items:center;animation:itsdesk-fade-in .2s ease;background:var(--dk-ink);border-radius:10px;bottom:28px;box-shadow:0 12px 32px rgba(16,42,51,.25);color:#fff;display:flex;font-size:var(--dk-text-md);font-weight:500;gap:10px;padding:12px 14px;position:fixed;right:28px;z-index:100000}.itsdesk-toast--danger{background:var(--dk-danger)}.itsdesk-toast__close{background:transparent;border:none;color:inherit;cursor:pointer;font-size:var(--dk-text-lg);line-height:1;opacity:.88;padding:0 0 0 4px}.itsdesk-skeleton{padding:22px 24px}.itsdesk-skeleton__block,.itsdesk-skeleton__hero,.itsdesk-skeleton__row span{animation:itsdesk-shimmer 1.2s ease infinite;background:linear-gradient(90deg,#eef1f4 25%,#f7f8fa 50%,#eef1f4 75%);background-size:200% 100%;border-radius:10px}.itsdesk-skeleton__hero{height:148px;margin-bottom:16px}.itsdesk-skeleton__row{display:grid;gap:12px;grid-template-columns:repeat(4,1fr);margin-bottom:16px}.itsdesk-skeleton__row span{display:block;height:88px}.itsdesk-skeleton__block{height:56px;margin-bottom:12px}.itsdesk-skeleton__block--short{height:120px;width:70%}@keyframes itsdesk-shimmer{0%{background-position:100% 0}to{background-position:-100% 0}}.itsdesk-admin__error{color:var(--dk-danger);padding:20px 24px}.itsdesk-divider{border:none;border-top:1px solid var(--dk-line);margin:20px 0}.itsdesk-features{display:grid;gap:14px;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:20px}@media (max-width:780px){.itsdesk-features{grid-template-columns:1fr}}.itsdesk-feature{background:#fff;border:1px solid var(--dk-line);border-radius:12px;padding:16px}.itsdesk-feature__icon{background:var(--dk-accent-soft);border-radius:8px;color:var(--dk-accent);display:grid;height:34px;margin-bottom:10px;place-items:center;width:34px}.itsdesk-feature strong{display:block;font-size:var(--dk-text-md);font-weight:600;margin-bottom:4px}.itsdesk-feature p{color:var(--dk-muted);font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0}.itsdesk-workspace-list{display:grid;gap:8px;margin:14px 0}.itsdesk-workspace{align-items:flex-start;background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:10px;color:inherit;cursor:pointer;display:flex;flex-direction:column;font:inherit;gap:2px;padding:12px 14px;text-align:left;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease;width:100%}.itsdesk-workspace:hover:not(:disabled){background:#fff;border-color:#c5d0d4}.itsdesk-workspace.is-selected{background:var(--dk-accent-soft);border-color:var(--dk-accent);box-shadow:0 0 0 1px var(--dk-accent)}.itsdesk-workspace strong{font-size:var(--dk-text-md);font-weight:600}.itsdesk-workspace span{color:var(--dk-muted);font-family:var(--dk-font-mono);font-size:var(--dk-text-xs)}.itsdesk-checkline{align-items:flex-start;color:var(--dk-muted);cursor:pointer;display:flex;font-size:var(--dk-text-md);gap:8px;line-height:var(--dk-leading-body);margin:8px 0 4px}.itsdesk-checkline input{margin-top:2px}.itsdesk-devtools{border-top:1px dashed var(--dk-line);margin-top:16px;padding-top:12px}.itsdesk-devtools summary{color:var(--dk-label);cursor:pointer;font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;text-transform:uppercase;-webkit-user-select:none;user-select:none}.itsdesk-devtools[open] summary{margin-bottom:10px}.itsdesk-input,.itsdesk-textarea{background:#fff;border:1px solid var(--dk-line);border-radius:9px;box-shadow:none;color:var(--dk-ink);display:block;font-family:inherit;font-size:var(--dk-text-md);max-width:100%;min-height:38px;padding:9px 12px;width:100%}.itsdesk-textarea{line-height:var(--dk-leading-body);min-height:96px;resize:vertical}.itsdesk-input:focus,.itsdesk-textarea:focus{border-color:var(--dk-accent);outline:2px solid var(--dk-accent-soft);outline-offset:1px}.itsdesk-tickets{align-items:start;display:grid;gap:16px;grid-template-columns:minmax(min(300px,100%),380px) minmax(0,1fr);margin-top:16px}@media (max-width:900px){.itsdesk-tickets{grid-template-columns:minmax(0,1fr)}}.itsdesk-tickets__list{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:10px;display:flex;flex-direction:column;max-height:720px;overflow:auto}.itsdesk-ticket-row{align-items:flex-start;background:transparent;border:0;border-bottom:1px solid var(--dk-line);border-inline-start:3px solid transparent;color:inherit;display:flex;font:inherit;gap:10px;padding:12px 14px 12px 12px;text-align:left;transition:background .15s ease;width:100%}.itsdesk-ticket-row:last-child{border-bottom:0}.itsdesk-ticket-row input[type=checkbox]{flex-shrink:0;margin-top:3px}.itsdesk-ticket-row__content{cursor:pointer;flex:1;min-width:0}.itsdesk-ticket-row:hover{background:var(--dk-canvas)}.itsdesk-ticket-row.is-active{background:var(--dk-accent-soft);border-inline-start-color:var(--dk-accent)}.itsdesk-ticket-row__meta,.itsdesk-ticket-row__top{align-items:center;display:flex;flex-wrap:wrap;gap:6px 8px}.itsdesk-ticket-row__meta{justify-content:space-between}.itsdesk-ticket-row__top strong{flex:1 1 100%;font-size:var(--dk-text-md);font-weight:600;line-height:1.35;overflow-wrap:anywhere}.itsdesk-ticket-row__meta{color:var(--dk-muted);font-size:var(--dk-text-sm);margin-top:6px}.itsdesk-tickets__empty{border:1px dashed var(--dk-line);border-radius:12px;padding:40px 16px;text-align:center}.itsdesk-thread{border-top:1px solid var(--dk-line);display:flex;flex-direction:column;gap:10px;margin-top:16px;padding-top:14px}.itsdesk-bubble{background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:10px;padding:12px 14px}.itsdesk-bubble--agent{background:#fff;border-color:#c5d0d4}.itsdesk-bubble.is-internal{background:var(--dk-warn-soft);border-color:#f5d565}.itsdesk-bubble__meta{align-items:center;color:var(--dk-muted);display:flex;flex-wrap:wrap;font-weight:500;gap:8px;margin-bottom:6px}.itsdesk-bubble__meta,.itsdesk-bubble__meta strong{font-size:var(--dk-text-xs);letter-spacing:0;text-transform:none}.itsdesk-bubble__meta strong{color:var(--dk-label);font-weight:600}.itsdesk-bubble__time{color:var(--dk-muted);font-size:var(--dk-text-xs)}.itsdesk-bubble p{font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0;white-space:pre-wrap}.itsdesk-attachment-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}.itsdesk-attachment-chip{align-items:center;background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:999px;color:var(--dk-label);display:inline-flex;font-size:var(--dk-text-xs);gap:5px;line-height:1.4;max-width:280px;padding:4px 8px 4px 6px}.itsdesk-attachment-chip__remove{align-items:center;background:transparent;border:none;border-radius:50%;color:var(--dk-muted);cursor:pointer;display:inline-flex;flex-shrink:0;font-size:var(--dk-text-md);height:16px;justify-content:center;line-height:1;margin-left:2px;padding:0;transition:background .12s ease,color .12s ease;width:16px}.itsdesk-attachment-chip__remove:hover{background:var(--dk-danger-soft);color:var(--dk-danger)}.itsdesk-attachment-chip--link{text-decoration:none;transition:border-color .15s ease,background .15s ease}.itsdesk-attachment-chip--link:hover{background:var(--dk-accent-soft);border-color:var(--dk-accent);color:var(--dk-accent)}.itsdesk-attachment-list{border-top:1px solid var(--dk-line);display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;padding-top:10px}.itsdesk-attachment-name{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.itsdesk-attachment-size{color:var(--dk-muted);flex-shrink:0;font-size:var(--dk-text-xs)}.itsdesk-attachment-thumb{border-radius:6px;display:block;flex-shrink:0;height:40px;object-fit:cover;width:40px}.itsdesk-attach-btn{padding-left:10px;padding-right:12px}.itsdesk-admin .itsdesk-page-title{font-size:var(--dk-text-xl);letter-spacing:-.01em}.itsdesk-callout{align-items:center;background:var(--dk-warn-soft);border:1px solid #f5d565;border-radius:10px;display:flex;gap:16px;justify-content:space-between;margin:16px 0 0;padding:14px 16px}.itsdesk-callout p{color:var(--dk-label);margin:2px 0 0}.itsdesk-two{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr));margin:14px 0}.itsdesk-box{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:10px;padding:16px 18px}.itsdesk-box h3{color:var(--dk-ink);font-size:var(--dk-text-md);font-weight:600;margin:0 0 12px}.itsdesk-box__head{align-items:baseline;display:flex;gap:10px;justify-content:space-between}.itsdesk-link{background:none;border:0;color:var(--dk-accent);cursor:pointer;font:inherit;font-size:var(--dk-text-sm);font-weight:500;padding:0;white-space:nowrap}.itsdesk-link:hover{color:var(--dk-accent-hover);text-decoration:underline}.itsdesk-week{align-items:end;display:grid;gap:8px;grid-template-columns:repeat(7,1fr);height:150px}.itsdesk-week__col{align-items:center;display:flex;flex-direction:column;gap:4px;height:100%;justify-content:flex-end}.itsdesk-week__n{color:var(--dk-muted);font-size:var(--dk-text-xs);font-variant-numeric:tabular-nums}.itsdesk-week__bar{align-items:flex-end;display:flex;flex:1;max-width:44px;width:100%}.itsdesk-week__bar i{background:var(--dk-accent);border-radius:5px 5px 2px 2px;display:block;width:100%}.itsdesk-week__d{color:var(--dk-muted);font-size:var(--dk-text-xs)}.itsdesk-list{list-style:none;margin:0;padding:0}.itsdesk-list li+li{border-top:1px solid var(--dk-line)}.itsdesk-list button{align-items:center;background:none;border:0;border-radius:6px;color:inherit;cursor:pointer;display:flex;font:inherit;gap:12px;justify-content:space-between;padding:9px 4px;text-align:start;width:100%}.itsdesk-list button:hover{background:var(--dk-canvas)}.itsdesk-list__main{display:flex;flex-direction:column;min-width:0}.itsdesk-list__main span,.itsdesk-list__main strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.itsdesk-list__main span{color:var(--dk-muted);font-size:var(--dk-text-sm)}.itsdesk-status-list{list-style:none;margin:0 0 8px;padding:0}.itsdesk-status-list li{align-items:center;display:flex;gap:12px;padding:10px 0}.itsdesk-status-list li+li{border-top:1px solid var(--dk-line)}.itsdesk-status-list__icon{background:var(--dk-canvas);border-radius:8px;color:var(--dk-ink-soft);display:grid;flex-shrink:0;height:30px;place-items:center;width:30px}.itsdesk-status-list__text{display:flex;flex:1;flex-direction:column;min-width:0}.itsdesk-status-list__text span{color:var(--dk-muted);font-size:var(--dk-text-sm)}.itsdesk-meta-bar{display:grid;gap:0 14px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));margin-top:14px}.itsdesk-meta-bar .itsdesk-field select.itsdesk-select{max-width:none}.itsdesk-inline-form{align-items:flex-end;display:flex;gap:10px}.itsdesk-inline-form .itsdesk-field{flex:1;margin-bottom:0}.itsdesk-segmented{border:1px solid var(--dk-line);border-radius:9px;display:inline-flex;gap:0;margin-top:4px;overflow:hidden}.itsdesk-segmented .itsdesk-btn{border:0;border-radius:0;min-height:34px;padding:7px 16px}.itsdesk-segmented .itsdesk-btn+.itsdesk-btn{border-inline-start:1px solid var(--dk-line)}.itsdesk-segmented .itsdesk-btn--primary:disabled{cursor:default;opacity:1}.itsdesk-tabs{border-bottom:1px solid var(--dk-line);display:flex;gap:4px;margin:14px 0 16px;overflow-x:auto;overflow-y:hidden}.itsdesk-tab{background:none;border:0;border-bottom:2px solid transparent;color:var(--dk-muted);cursor:pointer;font:inherit;font-size:var(--dk-text-md);font-weight:500;margin-bottom:-1px;padding:8px 12px;white-space:nowrap}.itsdesk-tab:hover{color:var(--dk-ink)}.itsdesk-tab.is-active{border-bottom-color:var(--dk-accent);color:var(--dk-accent-hover);font-weight:600}.itsdesk-tab:focus-visible{border-radius:4px;outline:2px solid var(--dk-accent);outline-offset:-2px}.itsdesk-pro-tag{background:var(--dk-accent-soft);border-radius:99px;color:var(--dk-accent-hover);display:inline-block;font-size:var(--dk-text-xs);font-weight:600;margin-inline-start:8px;padding:1px 7px;vertical-align:middle}.itsdesk-feature.is-locked{background:var(--dk-canvas);border-style:dashed}.itsdesk-feature__list{color:var(--dk-muted);font-size:var(--dk-text-sm);margin:8px 0 0;padding-inline-start:18px}.itsdesk-feature .itsdesk-link{margin-top:8px}.itsdesk-filters{align-items:center;display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.itsdesk-filters .itsdesk-select{max-width:200px;min-width:130px;width:auto}.itsdesk-views{align-items:center;display:flex;flex-wrap:wrap;gap:6px 8px;margin-top:8px}.itsdesk-views:empty{display:none}.itsdesk-views__chip{align-items:center;background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:99px;display:inline-flex;font-size:var(--dk-text-sm)}.itsdesk-views__chip button{background:none;border:0;color:var(--dk-label);cursor:pointer;font:inherit;padding:4px 6px 4px 12px}.itsdesk-views__chip button:hover{color:var(--dk-accent-hover)}.itsdesk-views__chip .itsdesk-views__x{color:var(--dk-muted);padding:4px 10px 4px 2px}.itsdesk-views__new{align-items:center;display:inline-flex;gap:6px}.itsdesk-views__new .itsdesk-input{width:220px}.itsdesk-ticket-row__content:focus-visible{border-radius:6px;outline:2px solid var(--dk-accent);outline-offset:2px}.itsdesk-merge{margin:10px 0 0}.itsdesk-merge__panel{background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:10px;margin-top:8px;padding:12px 14px}.itsdesk-merge__panel label{color:var(--dk-label);display:block;font-size:var(--dk-text-sm);font-weight:600;margin-bottom:6px}.itsdesk-merge__panel .itsdesk-list{background:var(--dk-surface);border-radius:8px;margin-top:8px}.itsdesk-split{font-size:12px;margin-top:6px}.itsdesk-split__panel{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:6px;display:grid;gap:6px;margin-top:6px;padding:10px}.itsdesk-split__panel label{font-weight:500}.itsdesk-split__panel .itsdesk-btn{justify-self:start}
     1.itsdesk-admin{--dk-ink:#102a33;--dk-ink-soft:#1e4a57;--dk-accent:#0f766e;--dk-accent-hover:#0d5f59;--dk-accent-soft:#e6f4f2;--dk-warn:#8a5a00;--dk-warn-soft:#fcf4e3;--dk-danger:#b42318;--dk-danger-soft:#fef3f2;--dk-ok:#067647;--dk-ok-soft:#ecfdf3;--dk-line:#e4e7ec;--dk-muted:#475467;--dk-label:#344054;--dk-surface:#fff;--dk-canvas:#f4f6f8;--dk-radius:12px;--dk-shadow:0 1px 2px rgba(16,42,51,.06);--dk-shadow-hover:0 8px 24px rgba(16,42,51,.08);--dk-font:"Inter","Hind Siliguri",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans Bengali","Nirmala UI","Helvetica Neue",sans-serif;--dk-font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;--dk-text-xs:12px;--dk-text-sm:13px;--dk-text-md:14px;--dk-text-lg:16px;--dk-text-xl:20px;--dk-text-hero:28px;--dk-leading-body:1.5;--dk-leading-title:1.25;color:var(--dk-ink);font-family:var(--dk-font);font-optical-sizing:auto;font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:8px 20px 48px 0;max-width:1360px;position:relative;-webkit-font-smoothing:antialiased}.itsdesk-admin:lang(bn){--dk-leading-body:1.7;--dk-leading-title:1.4}.itsdesk-admin:lang(bn) *,.itsdesk-admin:lang(bn) :after,.itsdesk-admin:lang(bn) :before{letter-spacing:normal!important}.itsdesk-admin *,.itsdesk-admin :after,.itsdesk-admin :before{box-sizing:border-box}.itsdesk-admin-wrap>h1{display:none}.itsdesk-admin__shell{align-items:start;display:grid;gap:20px;grid-template-columns:224px minmax(0,1fr)}.itsdesk-admin__side{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:var(--dk-radius);box-shadow:var(--dk-shadow);display:flex;flex-direction:column;gap:14px;padding:14px 10px 16px;position:sticky;top:48px}.itsdesk-admin__main{min-width:0}.itsdesk-admin__brand{align-items:center;display:flex;gap:10px;padding:2px 8px 0}.itsdesk-admin__logo{background:var(--dk-ink);border-radius:9px;color:#fff;display:grid;flex-shrink:0;height:34px;place-items:center;width:34px}.itsdesk-admin__brand h1{color:var(--dk-ink);font-size:var(--dk-text-lg);font-weight:600;letter-spacing:-.01em;line-height:var(--dk-leading-title);margin:0;padding:0}.itsdesk-admin__version{color:var(--dk-muted);display:block;font-size:var(--dk-text-xs);line-height:1.2}.itsdesk-admin__nav{display:flex;flex-direction:column;gap:14px}.itsdesk-admin__nav-group{display:flex;flex-direction:column;gap:2px}.itsdesk-admin__nav-label{color:var(--dk-muted);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.05em;padding:0 10px 4px;text-transform:uppercase}.itsdesk-admin__nav-btn{align-items:center;background:transparent;border:0;border-radius:8px;color:var(--dk-label);cursor:pointer;display:flex;font-family:inherit;font-size:var(--dk-text-md);font-weight:500;gap:10px;line-height:1.3;padding:7px 10px;text-align:start;transition:background .15s ease,color .15s ease;width:100%}.itsdesk-admin__nav-btn:hover{background:var(--dk-canvas);color:var(--dk-ink)}.itsdesk-admin__nav-btn:focus-visible{outline:2px solid var(--dk-accent);outline-offset:-2px}.itsdesk-admin__nav-btn.is-active{background:var(--dk-accent-soft);color:var(--dk-accent-hover);font-weight:600}.itsdesk-admin__nav-btn svg{flex-shrink:0;height:17px;opacity:.85;width:17px}.itsdesk-admin__nav-btn.is-active svg{opacity:1}@media (max-width:1100px){.itsdesk-admin__shell{gap:14px;grid-template-columns:minmax(0,1fr)}.itsdesk-admin__side{align-items:center;flex-direction:row;gap:10px;padding:8px 10px;position:static}.itsdesk-admin__brand{display:none}.itsdesk-admin__nav{flex:1;flex-direction:row;gap:4px;min-width:0;overflow-x:auto;padding-bottom:2px;scrollbar-width:thin}.itsdesk-admin__nav-group{align-items:center;border-inline-end:1px solid var(--dk-line);flex-direction:row;flex-shrink:0;gap:2px;margin-inline-end:2px;padding-inline-end:6px}.itsdesk-admin__nav-label{display:none}.itsdesk-admin__nav-btn{white-space:nowrap;width:auto}}.itsdesk-admin__panel{animation:itsdesk-fade-in .22s ease;background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:var(--dk-radius);box-shadow:var(--dk-shadow);overflow:hidden;padding:0}.itsdesk-admin__panel-inner{padding:24px 28px 28px}@media (max-width:600px){.itsdesk-admin__panel-inner{padding:16px 14px 20px}.itsdesk-admin{margin-right:10px}}@keyframes itsdesk-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.itsdesk-admin__row{align-items:center;display:flex;flex-wrap:wrap;gap:10px}.itsdesk-admin__spacer{flex:1}.itsdesk-admin h2{font-size:var(--dk-text-lg);font-weight:600;letter-spacing:-.01em;line-height:var(--dk-leading-title);margin:0}.itsdesk-admin h3.itsdesk-admin__section{color:var(--dk-label);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;margin:24px 0 12px;text-transform:uppercase}.itsdesk-admin__muted{color:var(--dk-muted);font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:6px 0 0}.itsdesk-btn{align-items:center;border:1px solid transparent;border-radius:9px;cursor:pointer;display:inline-flex;font-size:var(--dk-text-md);font-weight:600;gap:8px;justify-content:center;line-height:1.3;min-height:36px;padding:9px 16px;text-decoration:none;transition:background .15s ease,border-color .15s ease,color .15s ease,transform .12s ease}.itsdesk-btn:active:not(:disabled){transform:translateY(1px)}.itsdesk-btn:disabled{cursor:not-allowed;opacity:.55}.itsdesk-btn--primary{background:var(--dk-accent);border-color:var(--dk-accent);color:#fff}.itsdesk-btn--primary:hover:not(:disabled){background:var(--dk-accent-hover);border-color:var(--dk-accent-hover);color:#fff}.itsdesk-btn--secondary{background:#fff;border-color:var(--dk-line);color:var(--dk-ink)}.itsdesk-btn--secondary:hover:not(:disabled){background:var(--dk-canvas);border-color:#c8ced6;color:var(--dk-ink)}.itsdesk-btn--ghost{background:transparent;border-color:transparent;color:var(--dk-accent);padding-left:8px;padding-right:8px}.itsdesk-btn--ghost:hover:not(:disabled){background:var(--dk-accent-soft)}.itsdesk-btn--danger{background:#fff;border-color:#fecdca;color:var(--dk-danger)}.itsdesk-admin__actions{align-items:center;display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.itsdesk-pagination{align-items:center;border-top:1px solid var(--dk-line);display:flex;gap:8px;justify-content:center;margin-top:12px;padding-top:12px}.itsdesk-bulk-bar{align-items:center;background:var(--dk-accent-soft);border:1px solid var(--dk-accent);border-radius:10px;display:flex;gap:10px;padding:8px 12px}.itsdesk-badge{align-items:center;border:1px solid transparent;border-radius:999px;display:inline-flex;font-size:var(--dk-text-sm);font-weight:600;gap:6px;line-height:1.3;padding:5px 11px}.itsdesk-badge__dot{background:currentColor;border-radius:50%;flex-shrink:0;height:7px;width:7px}.itsdesk-badge__dot.is-pulse{animation:itsdesk-pulse 1.8s ease infinite;box-shadow:0 0 0 0 currentColor}@keyframes itsdesk-pulse{0%{box-shadow:0 0 0 0 rgba(6,118,71,.45)}70%{box-shadow:0 0 0 7px rgba(6,118,71,0)}to{box-shadow:0 0 0 0 rgba(6,118,71,0)}}.itsdesk-badge--ok{background:var(--dk-ok-soft);border-color:#abefc6;color:var(--dk-ok)}.itsdesk-badge--warn{background:var(--dk-warn-soft);border-color:#f5d565;color:var(--dk-warn)}.itsdesk-badge--danger{background:var(--dk-danger-soft);border-color:#fecdca;color:var(--dk-danger)}.itsdesk-badge--info{background:#eff8ff;border-color:#b2ddff;color:#175cd3}.itsdesk-badge--neutral{background:#f2f4f7;border-color:#d0d5dd;color:#344054}.itsdesk-metrics{display:grid;gap:14px;grid-template-columns:repeat(4,minmax(0,1fr));margin:18px 0}@media (max-width:960px){.itsdesk-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}.itsdesk-metric{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:10px;color:inherit;font:inherit;padding:14px 16px;text-align:left;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease,background .15s ease;width:100%}.itsdesk-metric.is-clickable{cursor:pointer}.itsdesk-metric.is-clickable:hover{border-color:#c5d0d4;box-shadow:var(--dk-shadow-hover)}.itsdesk-metric--ok{border-color:#abefc6}.itsdesk-metric--ok .itsdesk-metric__value{color:var(--dk-ok)}.itsdesk-metric--warn{border-color:#f5d565}.itsdesk-metric--warn .itsdesk-metric__value{color:var(--dk-warn)}.itsdesk-metric--danger{border-color:#fecdca}.itsdesk-metric--danger .itsdesk-metric__value{color:var(--dk-danger)}.itsdesk-metric__top{align-items:center;display:flex;gap:8px;justify-content:space-between;margin-bottom:10px}.itsdesk-metric__label{color:var(--dk-label);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;text-transform:uppercase}.itsdesk-metric__icon{color:var(--dk-ink-soft);opacity:.9}.itsdesk-metric__icon svg{height:18px;width:18px}.itsdesk-metric__value{color:var(--dk-ink);font-size:var(--dk-text-hero);font-variant-numeric:tabular-nums;font-weight:600;letter-spacing:-.02em;line-height:var(--dk-leading-title)}.itsdesk-metric__hint{color:var(--dk-muted);font-size:var(--dk-text-sm);line-height:1.4;margin-top:6px}.itsdesk-hero{background:var(--dk-ink);border:1px solid #0b2229;border-radius:14px;color:#fff;display:grid;gap:22px;grid-template-columns:1.35fr 1fr;margin-bottom:20px;overflow:hidden;padding:24px;position:relative}.itsdesk-hero:after{background:var(--dk-accent);border-radius:50%;content:"";height:180px;opacity:.18;pointer-events:none;position:absolute;right:-40px;top:-40px;width:180px}@media (max-width:860px){.itsdesk-hero{grid-template-columns:1fr}}.itsdesk-hero__eyebrow{align-items:center;display:inline-flex;font-size:var(--dk-text-xs);font-weight:600;gap:6px;letter-spacing:.05em;margin-bottom:10px;opacity:.9;text-transform:uppercase}.itsdesk-hero h2{color:#fff;font-size:var(--dk-text-hero);font-weight:600;letter-spacing:-.03em;line-height:var(--dk-leading-title);margin:0 0 10px}.itsdesk-hero p{color:hsla(0,0%,100%,.9);font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0 0 18px;max-width:460px}.itsdesk-hero__actions{display:flex;flex-wrap:wrap;gap:10px}.itsdesk-hero .itsdesk-btn--primary{background:#fff;border-color:#fff;color:var(--dk-ink)}.itsdesk-hero .itsdesk-btn--primary:hover:not(:disabled){background:#eef7f6;border-color:#eef7f6;color:var(--dk-ink)}.itsdesk-hero .itsdesk-btn--secondary{background:transparent;border-color:hsla(0,0%,100%,.35);color:#fff}.itsdesk-hero .itsdesk-btn--secondary:hover:not(:disabled){background:hsla(0,0%,100%,.1);border-color:hsla(0,0%,100%,.55);color:#fff}.itsdesk-checklist{background:hsla(0,0%,100%,.08);border:1px solid hsla(0,0%,100%,.14);border-radius:12px;padding:16px 16px 12px}.itsdesk-checklist__title{font-size:var(--dk-text-sm);font-weight:600;letter-spacing:.04em;margin-bottom:12px;opacity:.88;text-transform:uppercase}.itsdesk-checklist__item{align-items:flex-start;border-top:1px solid hsla(0,0%,100%,.1);display:flex;gap:10px;padding:10px 0}.itsdesk-checklist__item:first-of-type{border-top:none}.itsdesk-checklist__mark{align-items:center;border:1.5px solid hsla(0,0%,100%,.4);border-radius:50%;box-sizing:border-box;color:inherit;display:inline-flex;flex-shrink:0;font-family:var(--dk-font);font-size:var(--dk-text-xs);font-style:normal;font-weight:600;height:24px;justify-content:center;letter-spacing:0;line-height:1;margin-top:1px;opacity:1;width:24px}.itsdesk-checklist__mark svg{display:block;flex-shrink:0}.itsdesk-checklist__item.is-done .itsdesk-checklist__mark{background:hsla(0,0%,100%,.95);border-color:transparent;color:var(--dk-accent)}.itsdesk-checklist__item>div{min-width:0}.itsdesk-checklist__item strong{display:block;font-family:var(--dk-font);font-size:var(--dk-text-md);font-weight:600;margin-bottom:3px}.itsdesk-checklist__item>div>span{display:block;font-family:var(--dk-font);font-size:var(--dk-text-sm);line-height:1.45;opacity:.88}.itsdesk-health{align-items:flex-start;background:var(--dk-accent-soft);border:1px solid #b7e4de;border-radius:12px;display:flex;gap:12px;margin:16px 0;padding:16px 18px}.itsdesk-health--warn{background:var(--dk-warn-soft);border-color:#f5d565}.itsdesk-health__icon{color:var(--dk-accent);margin-top:2px}.itsdesk-health--warn .itsdesk-health__icon{color:var(--dk-warn)}.itsdesk-health strong{display:block;font-size:var(--dk-text-md);font-weight:600;margin-bottom:4px}.itsdesk-health p{color:var(--dk-muted);font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0}.itsdesk-table{border:1px solid var(--dk-line);border-collapse:separate;border-radius:12px;border-spacing:0;margin:8px 0 0;overflow:hidden;width:100%}.itsdesk-table td,.itsdesk-table th{border-bottom:1px solid var(--dk-line);font-size:var(--dk-text-md);line-height:1.4;padding:12px 16px;text-align:left;vertical-align:middle}.itsdesk-table tr:last-child td{border-bottom:none}.itsdesk-table th{background:var(--dk-canvas);color:var(--dk-label);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;padding:10px 16px;text-transform:uppercase}.itsdesk-table tbody tr{transition:background .12s ease}.itsdesk-table tbody tr:hover{background:#fafbfc}.itsdesk-table__area{color:var(--dk-ink);font-weight:600}.itsdesk-grid-2{display:grid;gap:14px;grid-template-columns:1fr 1fr;margin:16px 0}@media (max-width:780px){.itsdesk-grid-2{grid-template-columns:1fr}}.itsdesk-card{background:#fff;border:1px solid var(--dk-line);border-radius:10px;padding:16px 18px}.itsdesk-card__head{align-items:center;display:flex;gap:8px;justify-content:space-between;margin-bottom:12px}.itsdesk-card h3{color:var(--dk-label);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;margin:0;text-transform:uppercase}.itsdesk-card h3.itsdesk-card__title{color:var(--dk-ink);font-size:var(--dk-text-lg);font-weight:600;letter-spacing:-.01em;line-height:var(--dk-leading-title);margin:0;text-transform:none}.itsdesk-card p{font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0 0 8px}.itsdesk-mono{background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:8px;font-family:var(--dk-font-mono);font-size:var(--dk-text-xs);line-height:1.4;padding:8px 10px;word-break:break-all}.itsdesk-field{margin-bottom:14px}.itsdesk-field label{color:var(--dk-label);display:block;font-size:var(--dk-text-sm);font-weight:600;margin-bottom:6px}.itsdesk-admin select.itsdesk-select,.itsdesk-field select.itsdesk-select{appearance:none;background-color:#fff;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2712%27 height=%278%27 fill=%27none%27%3E%3Cpath stroke=%27%23475467%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%271.75%27 d=%27m1 1.5 5 5 5-5%27/%3E%3C/svg%3E");background-position:right 12px center;background-repeat:no-repeat;background-size:12px 8px;border:1px solid var(--dk-line);border-radius:9px;box-shadow:none;color:var(--dk-ink);cursor:pointer;display:block;font-size:var(--dk-text-md);font-weight:500;height:38px;line-height:38px;margin:0;max-height:38px;max-width:280px;min-height:38px;padding:0 36px 0 12px;vertical-align:middle;width:100%}.itsdesk-admin select.itsdesk-select:hover:not(:disabled),.itsdesk-field select.itsdesk-select:hover:not(:disabled){border-color:#c5d0d4}.itsdesk-admin select.itsdesk-select:focus,.itsdesk-field select.itsdesk-select:focus{border-color:var(--dk-accent);outline:2px solid var(--dk-accent-soft);outline-offset:1px}.itsdesk-admin select.itsdesk-select:disabled,.itsdesk-field select.itsdesk-select:disabled{background-color:var(--dk-canvas);cursor:not-allowed;opacity:.55}.itsdesk-btn--danger:disabled,.itsdesk-btn--secondary:disabled{background:var(--dk-canvas);border-color:var(--dk-line);color:var(--dk-muted);opacity:.45}.itsdesk-toggle{align-items:center;border-bottom:1px solid #f0f2f5;display:flex;gap:16px;justify-content:space-between;padding:12px 0}.itsdesk-toggle:last-child{border-bottom:none}.itsdesk-toggle.is-disabled{opacity:.55}.itsdesk-toggle__label{color:var(--dk-ink);cursor:pointer;font-size:var(--dk-text-md);font-weight:600}.itsdesk-toggle__desc{color:var(--dk-muted);font-size:var(--dk-text-sm);line-height:1.4;margin:3px 0 0}.itsdesk-switch{background:#d0d5dd;border:none;border-radius:999px;cursor:pointer;flex-shrink:0;height:24px;padding:0;position:relative;transition:background .15s ease;width:42px}.itsdesk-switch.is-on{background:var(--dk-accent)}.itsdesk-switch__thumb{background:#fff;border-radius:50%;box-shadow:0 1px 2px rgba(16,24,40,.2);height:18px;left:3px;position:absolute;top:3px;transition:transform .15s ease;width:18px}.itsdesk-switch.is-on .itsdesk-switch__thumb{transform:translateX(18px)}.itsdesk-toast{align-items:center;animation:itsdesk-fade-in .2s ease;background:var(--dk-ink);border-radius:10px;bottom:28px;box-shadow:0 12px 32px rgba(16,42,51,.25);color:#fff;display:flex;font-size:var(--dk-text-md);font-weight:500;gap:10px;padding:12px 14px;position:fixed;right:28px;z-index:100000}.itsdesk-toast--danger{background:var(--dk-danger)}.itsdesk-toast__close{background:transparent;border:none;color:inherit;cursor:pointer;font-size:var(--dk-text-lg);line-height:1;opacity:.88;padding:0 0 0 4px}.itsdesk-skeleton{padding:22px 24px}.itsdesk-skeleton__block,.itsdesk-skeleton__hero,.itsdesk-skeleton__row span{animation:itsdesk-shimmer 1.2s ease infinite;background:linear-gradient(90deg,#eef1f4 25%,#f7f8fa 50%,#eef1f4 75%);background-size:200% 100%;border-radius:10px}.itsdesk-skeleton__hero{height:148px;margin-bottom:16px}.itsdesk-skeleton__row{display:grid;gap:12px;grid-template-columns:repeat(4,1fr);margin-bottom:16px}.itsdesk-skeleton__row span{display:block;height:88px}.itsdesk-skeleton__block{height:56px;margin-bottom:12px}.itsdesk-skeleton__block--short{height:120px;width:70%}@keyframes itsdesk-shimmer{0%{background-position:100% 0}to{background-position:-100% 0}}.itsdesk-admin__error{color:var(--dk-danger);padding:20px 24px}.itsdesk-divider{border:none;border-top:1px solid var(--dk-line);margin:20px 0}.itsdesk-features{display:grid;gap:14px;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:20px}@media (max-width:780px){.itsdesk-features{grid-template-columns:1fr}}.itsdesk-feature{background:#fff;border:1px solid var(--dk-line);border-radius:12px;padding:16px}.itsdesk-feature__icon{background:var(--dk-accent-soft);border-radius:8px;color:var(--dk-accent);display:grid;height:34px;margin-bottom:10px;place-items:center;width:34px}.itsdesk-feature strong{display:block;font-size:var(--dk-text-md);font-weight:600;margin-bottom:4px}.itsdesk-feature p{color:var(--dk-muted);font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0}.itsdesk-workspace-list{display:grid;gap:8px;margin:14px 0}.itsdesk-workspace{align-items:flex-start;background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:10px;color:inherit;cursor:pointer;display:flex;flex-direction:column;font:inherit;gap:2px;padding:12px 14px;text-align:left;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease;width:100%}.itsdesk-workspace:hover:not(:disabled){background:#fff;border-color:#c5d0d4}.itsdesk-workspace.is-selected{background:var(--dk-accent-soft);border-color:var(--dk-accent);box-shadow:0 0 0 1px var(--dk-accent)}.itsdesk-workspace strong{font-size:var(--dk-text-md);font-weight:600}.itsdesk-workspace span{color:var(--dk-muted);font-family:var(--dk-font-mono);font-size:var(--dk-text-xs)}.itsdesk-checkline{align-items:flex-start;color:var(--dk-muted);cursor:pointer;display:flex;font-size:var(--dk-text-md);gap:8px;line-height:var(--dk-leading-body);margin:8px 0 4px}.itsdesk-checkline input{margin-top:2px}.itsdesk-devtools{border-top:1px dashed var(--dk-line);margin-top:16px;padding-top:12px}.itsdesk-devtools summary{color:var(--dk-label);cursor:pointer;font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.04em;text-transform:uppercase;-webkit-user-select:none;user-select:none}.itsdesk-devtools[open] summary{margin-bottom:10px}.itsdesk-input,.itsdesk-textarea{background:#fff;border:1px solid var(--dk-line);border-radius:9px;box-shadow:none;color:var(--dk-ink);display:block;font-family:inherit;font-size:var(--dk-text-md);max-width:100%;min-height:38px;padding:9px 12px;width:100%}.itsdesk-textarea{line-height:var(--dk-leading-body);min-height:96px;resize:vertical}.itsdesk-input:focus,.itsdesk-textarea:focus{border-color:var(--dk-accent);outline:2px solid var(--dk-accent-soft);outline-offset:1px}.itsdesk-tickets{align-items:start;display:grid;gap:16px;grid-template-columns:minmax(min(300px,100%),380px) minmax(0,1fr);margin-top:16px}@media (max-width:900px){.itsdesk-tickets{grid-template-columns:minmax(0,1fr)}}.itsdesk-tickets__list{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:10px;display:flex;flex-direction:column;max-height:720px;overflow:auto}.itsdesk-ticket-row{align-items:flex-start;background:transparent;border:0;border-bottom:1px solid var(--dk-line);border-inline-start:3px solid transparent;color:inherit;display:flex;font:inherit;gap:10px;padding:12px 14px 12px 12px;text-align:left;transition:background .15s ease;width:100%}.itsdesk-ticket-row:last-child{border-bottom:0}.itsdesk-ticket-row input[type=checkbox]{flex-shrink:0;margin-top:3px}.itsdesk-ticket-row__content{cursor:pointer;flex:1;min-width:0}.itsdesk-ticket-row:hover{background:var(--dk-canvas)}.itsdesk-ticket-row.is-active{background:var(--dk-accent-soft);border-inline-start-color:var(--dk-accent)}.itsdesk-ticket-row__meta,.itsdesk-ticket-row__top{align-items:center;display:flex;flex-wrap:wrap;gap:6px 8px}.itsdesk-ticket-row__meta{justify-content:space-between}.itsdesk-ticket-row__top strong{flex:1 1 100%;font-size:var(--dk-text-md);font-weight:600;line-height:1.35;overflow-wrap:anywhere}.itsdesk-ticket-row__meta{color:var(--dk-muted);font-size:var(--dk-text-sm);margin-top:6px}.itsdesk-tickets__empty{border:1px dashed var(--dk-line);border-radius:12px;padding:40px 16px;text-align:center}.itsdesk-thread{border-top:1px solid var(--dk-line);display:flex;flex-direction:column;gap:10px;margin-top:16px;padding-top:14px}.itsdesk-bubble{background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:10px;padding:12px 14px}.itsdesk-bubble--agent{background:#fff;border-color:#c5d0d4}.itsdesk-bubble.is-internal{background:var(--dk-warn-soft);border-color:#f5d565}.itsdesk-bubble__meta{align-items:center;color:var(--dk-muted);display:flex;flex-wrap:wrap;font-weight:500;gap:8px;margin-bottom:6px}.itsdesk-bubble__meta,.itsdesk-bubble__meta strong{font-size:var(--dk-text-xs);letter-spacing:0;text-transform:none}.itsdesk-bubble__meta strong{color:var(--dk-label);font-weight:600}.itsdesk-bubble__time{color:var(--dk-muted);font-size:var(--dk-text-xs)}.itsdesk-bubble p{font-size:var(--dk-text-md);line-height:var(--dk-leading-body);margin:0;white-space:pre-wrap}.itsdesk-attachment-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}.itsdesk-attachment-chip{align-items:center;background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:999px;color:var(--dk-label);display:inline-flex;font-size:var(--dk-text-xs);gap:5px;line-height:1.4;max-width:280px;padding:4px 8px 4px 6px}.itsdesk-attachment-chip__remove{align-items:center;background:transparent;border:none;border-radius:50%;color:var(--dk-muted);cursor:pointer;display:inline-flex;flex-shrink:0;font-size:var(--dk-text-md);height:16px;justify-content:center;line-height:1;margin-left:2px;padding:0;transition:background .12s ease,color .12s ease;width:16px}.itsdesk-attachment-chip__remove:hover{background:var(--dk-danger-soft);color:var(--dk-danger)}.itsdesk-attachment-chip--link{text-decoration:none;transition:border-color .15s ease,background .15s ease}.itsdesk-attachment-chip--link:hover{background:var(--dk-accent-soft);border-color:var(--dk-accent);color:var(--dk-accent)}.itsdesk-attachment-list{border-top:1px solid var(--dk-line);display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;padding-top:10px}.itsdesk-attachment-name{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.itsdesk-attachment-size{color:var(--dk-muted);flex-shrink:0;font-size:var(--dk-text-xs)}.itsdesk-attachment-thumb{border-radius:6px;display:block;flex-shrink:0;height:40px;object-fit:cover;width:40px}.itsdesk-attach-btn{padding-left:10px;padding-right:12px}.itsdesk-admin .itsdesk-page-title{font-size:var(--dk-text-xl);letter-spacing:-.01em}.itsdesk-callout{align-items:center;background:var(--dk-warn-soft);border:1px solid #f5d565;border-radius:10px;display:flex;gap:16px;justify-content:space-between;margin:16px 0 0;padding:14px 16px}.itsdesk-callout p{color:var(--dk-label);margin:2px 0 0}.itsdesk-two{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr));margin:14px 0}.itsdesk-box{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:10px;padding:16px 18px}.itsdesk-box h3{color:var(--dk-ink);font-size:var(--dk-text-md);font-weight:600;margin:0 0 12px}.itsdesk-box__head{align-items:baseline;display:flex;gap:10px;justify-content:space-between}.itsdesk-link{background:none;border:0;color:var(--dk-accent);cursor:pointer;font:inherit;font-size:var(--dk-text-sm);font-weight:500;padding:0;white-space:nowrap}.itsdesk-link:hover{color:var(--dk-accent-hover);text-decoration:underline}.itsdesk-week{align-items:end;display:grid;gap:8px;grid-template-columns:repeat(7,1fr);height:150px}.itsdesk-week__col{align-items:center;display:flex;flex-direction:column;gap:4px;height:100%;justify-content:flex-end}.itsdesk-week__n{color:var(--dk-muted);font-size:var(--dk-text-xs);font-variant-numeric:tabular-nums}.itsdesk-week__bar{align-items:flex-end;display:flex;flex:1;max-width:44px;width:100%}.itsdesk-week__bar i{background:var(--dk-accent);border-radius:5px 5px 2px 2px;display:block;width:100%}.itsdesk-week__d{color:var(--dk-muted);font-size:var(--dk-text-xs)}.itsdesk-list{list-style:none;margin:0;padding:0}.itsdesk-list li+li{border-top:1px solid var(--dk-line)}.itsdesk-list button{align-items:center;background:none;border:0;border-radius:6px;color:inherit;cursor:pointer;display:flex;font:inherit;gap:12px;justify-content:space-between;padding:9px 4px;text-align:start;width:100%}.itsdesk-list button:hover{background:var(--dk-canvas)}.itsdesk-list__main{display:flex;flex-direction:column;min-width:0}.itsdesk-list__main span,.itsdesk-list__main strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.itsdesk-list__main span{color:var(--dk-muted);font-size:var(--dk-text-sm)}.itsdesk-status-list{list-style:none;margin:0 0 8px;padding:0}.itsdesk-status-list li{align-items:center;display:flex;gap:12px;padding:10px 0}.itsdesk-status-list li+li{border-top:1px solid var(--dk-line)}.itsdesk-status-list__icon{background:var(--dk-canvas);border-radius:8px;color:var(--dk-ink-soft);display:grid;flex-shrink:0;height:30px;place-items:center;width:30px}.itsdesk-status-list__text{display:flex;flex:1;flex-direction:column;min-width:0}.itsdesk-status-list__text span{color:var(--dk-muted);font-size:var(--dk-text-sm)}.itsdesk-meta-bar{display:grid;gap:0 14px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));margin-top:14px}.itsdesk-meta-bar .itsdesk-field select.itsdesk-select{max-width:none}.itsdesk-inline-form{align-items:flex-end;display:flex;gap:10px}.itsdesk-inline-form .itsdesk-field{flex:1;margin-bottom:0}.itsdesk-segmented{border:1px solid var(--dk-line);border-radius:9px;display:inline-flex;gap:0;margin-top:4px;overflow:hidden}.itsdesk-segmented .itsdesk-btn{border:0;border-radius:0;min-height:34px;padding:7px 16px}.itsdesk-segmented .itsdesk-btn+.itsdesk-btn{border-inline-start:1px solid var(--dk-line)}.itsdesk-segmented .itsdesk-btn--primary:disabled{cursor:default;opacity:1}.itsdesk-tabs{border-bottom:1px solid var(--dk-line);display:flex;gap:4px;margin:14px 0 16px;overflow-x:auto;overflow-y:hidden}.itsdesk-tab{background:none;border:0;border-bottom:2px solid transparent;color:var(--dk-muted);cursor:pointer;font:inherit;font-size:var(--dk-text-md);font-weight:500;margin-bottom:-1px;padding:8px 12px;white-space:nowrap}.itsdesk-tab:hover{color:var(--dk-ink)}.itsdesk-tab.is-active{border-bottom-color:var(--dk-accent);color:var(--dk-accent-hover);font-weight:600}.itsdesk-tab:focus-visible{border-radius:4px;outline:2px solid var(--dk-accent);outline-offset:-2px}.itsdesk-pro-tag{background:var(--dk-accent-soft);border-radius:99px;color:var(--dk-accent-hover);display:inline-block;font-size:var(--dk-text-xs);font-weight:600;margin-inline-start:8px;padding:1px 7px;vertical-align:middle}.itsdesk-feature.is-locked{background:var(--dk-canvas);border-style:dashed}.itsdesk-feature__list{color:var(--dk-muted);font-size:var(--dk-text-sm);margin:8px 0 0;padding-inline-start:18px}.itsdesk-feature .itsdesk-link{margin-top:8px}.itsdesk-filters{align-items:center;display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.itsdesk-filters .itsdesk-select{max-width:200px;min-width:130px;width:auto}.itsdesk-views{align-items:center;display:flex;flex-wrap:wrap;gap:6px 8px;margin-top:8px}.itsdesk-views:empty{display:none}.itsdesk-views__chip{align-items:center;background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:99px;display:inline-flex;font-size:var(--dk-text-sm)}.itsdesk-views__chip button{background:none;border:0;color:var(--dk-label);cursor:pointer;font:inherit;padding:4px 6px 4px 12px}.itsdesk-views__chip button:hover{color:var(--dk-accent-hover)}.itsdesk-views__chip .itsdesk-views__x{color:var(--dk-muted);padding:4px 10px 4px 2px}.itsdesk-views__new{align-items:center;display:inline-flex;gap:6px}.itsdesk-views__new .itsdesk-input{width:220px}.itsdesk-ticket-row__content:focus-visible{border-radius:6px;outline:2px solid var(--dk-accent);outline-offset:2px}.itsdesk-merge{margin:10px 0 0}.itsdesk-merge__panel{background:var(--dk-canvas);border:1px solid var(--dk-line);border-radius:10px;margin-top:8px;padding:12px 14px}.itsdesk-merge__panel label{color:var(--dk-label);display:block;font-size:var(--dk-text-sm);font-weight:600;margin-bottom:6px}.itsdesk-merge__panel .itsdesk-list{background:var(--dk-surface);border-radius:8px;margin-top:8px}.itsdesk-split{font-size:12px;margin-top:6px}.itsdesk-split__panel{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:6px;display:grid;gap:6px;margin-top:6px;padding:10px}.itsdesk-split__panel label{font-weight:500}.itsdesk-split__panel .itsdesk-btn{justify-self:start}.itsdesk-setup{border-color:var(--dk-accent);box-shadow:0 0 0 3px var(--dk-accent-soft);margin-top:16px}.itsdesk-setup .itsdesk-card__head{align-items:flex-start}.itsdesk-setup__count{color:var(--dk-accent);font-size:var(--dk-text-xs);font-weight:600;letter-spacing:.02em;margin:0 0 2px;text-transform:uppercase}.itsdesk-setup__dots{display:flex;gap:6px;list-style:none;margin:0 0 14px;padding:0}.itsdesk-setup__dots li{background:var(--dk-line);border-radius:999px;flex:1 1 0;height:4px}.itsdesk-setup__dots li.is-on{background:var(--dk-accent)}.itsdesk-setup__error{background:var(--dk-danger-soft);border-radius:8px;color:var(--dk-danger);margin:0 0 12px;padding:8px 12px}.itsdesk-cats{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));margin-top:8px}.itsdesk-cats__group{border:0;margin:0;min-width:0;padding:0}.itsdesk-cats__group legend{color:var(--dk-label);font-weight:600;margin-bottom:8px}.itsdesk-cats__check{align-items:center;cursor:pointer;display:flex;gap:8px;padding:4px 0}.itsdesk-cats__row{align-items:center;display:flex;gap:8px;margin-bottom:8px}.itsdesk-cats__row .itsdesk-input{flex:1 1 auto;min-width:0}.itsdesk-setup .itsdesk-card__head h3{color:var(--dk-ink);font-size:var(--dk-text-lg);font-weight:650;letter-spacing:normal;margin:0;text-transform:none}.itsdesk-setup__dots li{margin:0}.itsdesk-ff{display:grid;gap:10px;list-style:none;margin:12px 0 0;padding:0}.itsdesk-ff__item{border:1px solid var(--dk-line);border-radius:10px;margin:0;padding:12px}.itsdesk-ff__row{display:grid;gap:10px;grid-template-columns:minmax(0,1fr) minmax(140px,180px)}.itsdesk-ff__item .itsdesk-field{margin-bottom:8px}.itsdesk-ff__actions{align-items:center;display:flex;flex-wrap:wrap;gap:4px}@media (max-width:600px){.itsdesk-ff__row{grid-template-columns:minmax(0,1fr)}}.itsdesk-answers{background:var(--dk-surface);border:1px solid var(--dk-line);border-radius:10px;display:grid;gap:8px 16px;grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));margin:0 0 12px;padding:10px 12px}.itsdesk-answers div{min-width:0}.itsdesk-answers dt{color:var(--dk-label);font-size:var(--dk-text-xs,12px)}.itsdesk-answers dd{margin:2px 0 0;overflow-wrap:anywhere}
  • deskovi/trunk/assets/admin/index.js

    r3803408 r3843768  
    1 (()=>{"use strict";const e={n:s=>{const t=s&&s.__esModule?()=>s.default:()=>s;return e.d(t,{a:t}),t},d:(s,t)=>{if(Array.isArray(t))for(var i=0;i<t.length;){var n=t[i++],a=t[i++];e.o(s,n)?0===a&&i++:0===a?Object.defineProperty(s,n,{enumerable:!0,value:t[i++]}):Object.defineProperty(s,n,{enumerable:!0,get:a})}else for(var n in t)e.o(t,n)&&!e.o(s,n)&&Object.defineProperty(s,n,{enumerable:!0,get:t[n]})},o:(e,s)=>Object.hasOwn(e,s),r:e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}};var s={};e.r(s),e.d(s,{IconActivity:()=>C,IconBell:()=>A,IconBolt:()=>R,IconBook:()=>H,IconCart:()=>P,IconChart:()=>V,IconCheck:()=>M,IconClock:()=>B,IconExternal:()=>L,IconFileGeneric:()=>E,IconFlag:()=>O,IconGear:()=>q,IconLink:()=>y,IconMail:()=>Z,IconMark:()=>b,IconOverview:()=>S,IconPaperclip:()=>D,IconPulse:()=>N,IconQueue:()=>I,IconRefund:()=>W,IconShield:()=>w,IconSparkle:()=>U,IconStar:()=>G,IconSync:()=>T,IconTicket:()=>$,IconWidget:()=>f});const t=window.wp.element,i=window.wp.i18n,n=window.wp.apiFetch;var a=e.n(n);const d=window.itsdeskAdmin;d?.nonce&&d?.restRoot&&(a().use(a().createNonceMiddleware(d.nonce)),a().use(a().createRootURLMiddleware(d.restRoot)));const o="/itsdesk/v1";function r(e){if(e&&"object"==typeof e){const s=e;return s.message||s.data?.message||"Request failed."}return"Request failed."}function l(){return a()({path:`${o}/macros`})}function c(){return a()({path:`${o}/diagnostics`})}function h(e,s){s.search&&e.set("search",s.search),s.assignee&&"all"!==s.assignee&&e.set("assignee",s.assignee),s.status&&e.set("status",s.status),s.priority&&e.set("priority",s.priority),s.category&&e.set("category",s.category),Object.entries(s.x??{}).forEach(([s,t])=>{t&&e.set(`x[${s}]`,t)})}function k(e={}){const s=new URLSearchParams;e.page&&s.set("page",String(e.page)),e.per_page&&s.set("per_page",String(e.per_page)),h(s,e);const t=s.toString();return a()({path:`${o}/tickets${t?`?${t}`:""}`})}function u(e){return a()({path:`${o}/tickets/${e}`})}function _(e={}){const s=new URLSearchParams;h(s,e),s.set("_wpnonce",d?.nonce??"");const t=s.toString();return`${(d?.restRoot??"").replace(/\/$/,"")}${o}/tickets/export${t?`?${t}`:""}`}function m(e,s,t){const i=new FormData;return i.append("file",s),t&&i.append("message_id",t),a()({path:`${o}/tickets/${e}/attachments`,method:"POST",body:i})}function v(e,s){return a()({path:`${o}/tickets/${e}/order`,method:"POST",data:{order_id:s}})}function p(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(0)} KB`:`${(e/1048576).toFixed(1)} MB`}const g=window.ReactJSXRuntime;function x(){return(0,g.jsxs)("div",{className:"itsdesk-skeleton","aria-busy":"true","aria-live":"polite",children:[(0,g.jsx)("div",{className:"itsdesk-skeleton__hero"}),(0,g.jsxs)("div",{className:"itsdesk-skeleton__row",children:[(0,g.jsx)("span",{}),(0,g.jsx)("span",{}),(0,g.jsx)("span",{}),(0,g.jsx)("span",{})]}),(0,g.jsx)("div",{className:"itsdesk-skeleton__block"}),(0,g.jsx)("div",{className:"itsdesk-skeleton__block itsdesk-skeleton__block--short"})]})}function j({message:e,tone:s="ok",onDismiss:n}){return(0,t.useEffect)(()=>{if(!e)return;const s=window.setTimeout(n,3200);return()=>window.clearTimeout(s)},[e,n]),e?(0,g.jsxs)("div",{className:`itsdesk-toast itsdesk-toast--${s}`,role:"danger"===s?"alert":"status",children:[e,(0,g.jsx)("button",{type:"button",className:"itsdesk-toast__close","aria-label":(0,i.__)("Dismiss","deskovi"),onClick:n,children:"×"})]}):null}function b({size:e=22,className:s}){return(0,g.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,g.jsx)("path",{d:"M4 7.5C4 5.567 5.567 4 7.5 4H16.5C18.433 4 20 5.567 20 7.5V13.5C20 15.433 18.433 17 16.5 17H11L7 20V17H7.5C5.567 17 4 15.433 4 13.5V7.5Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"}),(0,g.jsx)("path",{d:"M8 9.5H16M8 12.5H13",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function y({size:e=18,className:s}){return(0,g.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:(0,g.jsx)("path",{d:"M9 12a4 4 0 0 0 4 4h2a4 4 0 0 0 0-8h-.5M15 12a4 4 0 0 0-4-4H9a4 4 0 1 0 0 8h.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})})}function f({size:e=18,className:s}){return(0,g.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,g.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"3",stroke:"currentColor",strokeWidth:"1.75"}),(0,g.jsx)("path",{d:"M8 15h4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),(0,g.jsx)("circle",{cx:"15.5",cy:"9.5",r:"1.5",fill:"currentColor"})]})}function w({size:e=18,className:s}){return(0,g.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,g.jsx)("path",{d:"M12 3L5 6v5c0 4.5 2.9 7.9 7 9 4.1-1.1 7-4.5 7-9V6l-7-3Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"}),(0,g.jsx)("path",{d:"M9.5 12l1.8 1.8L14.8 10",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]})}function N({size:e=18,className:s}){return(0,g.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:(0,g.jsx)("path",{d:"M3 12h3.2l2.1-5.2L12.5 18l2.8-6H21",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})}function C({size:e=18,className:s}){return(0,g.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:(0,g.jsx)("path",{d:"M4 6h16M4 12h10M4 18h13",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})})}function S({size:e=18,className:s}){return(0,g.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,g.jsx)("rect",{x:"3.5",y:"3.5",width:"7",height:"7",rx:"1.5",stroke:"currentColor",strokeWidth:"1.75"}),(0,g.jsx)("rect",{x:"13.5",y:"3.5",width:"7",height:"7",rx:"1.5",stroke:"currentColor",strokeWidth:"1.75"}),(0,g.jsx)("rect",{x:"3.5",y:"13.5",width:"7",height:"7",rx:"1.5",stroke:"currentColor",strokeWidth:"1.75"}),(0,g.jsx)("rect",{x:"13.5",y:"13.5",width:"7",height:"7",rx:"1.5",stroke:"currentColor",strokeWidth:"1.75"})]})}function T({size:e=18,className:s}){return(0,g.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,g.jsx)("path",{d:"M19 8a7 7 0 0 0-12.5-3M5 16a7 7 0 0 0 12.5 3",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),(0,g.jsx)("path",{d:"M5 4v4h4M19 20v-4h-4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]})}function P({size:e=18,className:s}){return(0,g.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,g.jsx)("path",{d:"M3 5h2l2.2 10.2a1.5 1.5 0 0 0 1.5 1.2H17a1.5 1.5 0 0 0 1.45-1.1L20 8H7",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),(0,g.jsx)("circle",{cx:"9.5",cy:"19.5",r:"1.2",fill:"currentColor"}),(0,g.jsx)("circle",{cx:"16.5",cy:"19.5",r:"1.2",fill:"currentColor"})]})}function M({size:e=16,className:s}){return(0,g.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:(0,g.jsx)("path",{d:"M5 12.5l5 5L19 7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function L({size:e=14,className:s}){return(0,g.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,g.jsx)("path",{d:"M14 5h5v5M19 5l-9 9",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),(0,g.jsx)("path",{d:"M10 5H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function I({size:e=18,className:s}){return(0,g.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:(0,g.jsx)("path",{d:"M4 7h16M4 12h16M4 17h10",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})})}function $({size:e=18,className:s}){return(0,g.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,g.jsx)("path",{d:"M4 8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v2a2 2 0 0 0 0 4v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-2a2 2 0 0 0 0-4V8Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"}),(0,g.jsx)("path",{d:"M10 8v8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeDasharray:"2 3"})]})}function D({size:e=18,className:s}){return(0,g.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:(0,g.jsx)("path",{d:"M21 11.5L12.5 20a5.657 5.657 0 0 1-8-8L13 3.5a3.771 3.771 0 0 1 5.334 5.334L9.83 17.34a1.886 1.886 0 0 1-2.667-2.667L15 7",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})}function A({size:e=18,className:s}){return(0,g.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,g.jsx)("path",{d:"M6 10a6 6 0 0 1 12 0v4.5l1.5 3H4.5L6 14.5V10Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"}),(0,g.jsx)("path",{d:"M9.5 20a2.5 2.5 0 0 0 5 0",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function O({size:e=18,className:s}){return(0,g.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,g.jsx)("path",{d:"M5 3v18",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),(0,g.jsx)("path",{d:"M5 4.5h11.5c1.4 0 2.1 1.7 1.1 2.7L15 9.5l2.6 2.3c1 1 .3 2.7-1.1 2.7H5V4.5Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"})]})}function W({size:e=18,className:s}){return(0,g.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,g.jsx)("path",{d:"M4.5 10a7.5 7.5 0 1 1 1.8 7.4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),(0,g.jsx)("path",{d:"M4.5 5v5h5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),(0,g.jsx)("path",{d:"M12 8.3v7.4M9.8 10h3.2a1.6 1.6 0 0 1 0 3.2h-2a1.6 1.6 0 0 0 0 3.2h3.3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function E({size:e=16,className:s}){return(0,g.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,g.jsx)("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"}),(0,g.jsx)("path",{d:"M14 2v6h6M16 13H8M16 17H8M10 9H8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}const F=(e,s)=>({width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":!0}),z={stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round"};function R({size:e=18,className:s}){return(0,g.jsx)("svg",{...F(e,s),children:(0,g.jsx)("path",{d:"M13 3 5 13.5h6L10 21l8-10.5h-6L13 3Z",...z})})}function B({size:e=18,className:s}){return(0,g.jsxs)("svg",{...F(e,s),children:[(0,g.jsx)("circle",{cx:"12",cy:"12",r:"8.5",...z}),(0,g.jsx)("path",{d:"M12 7.5V12l3 2",...z})]})}function U({size:e=18,className:s}){return(0,g.jsxs)("svg",{...F(e,s),children:[(0,g.jsx)("path",{d:"M11 4c.6 3.6 2.4 5.4 6 6-3.6.6-5.4 2.4-6 6-.6-3.6-2.4-5.4-6-6 3.6-.6 5.4-2.4 6-6Z",...z}),(0,g.jsx)("path",{d:"M18 15.5c.3 1.6 1 2.3 2.5 2.5-1.5.2-2.2.9-2.5 2.5-.3-1.6-1-2.3-2.5-2.5 1.5-.2 2.2-.9 2.5-2.5Z",...z})]})}function H({size:e=18,className:s}){return(0,g.jsxs)("svg",{...F(e,s),children:[(0,g.jsx)("path",{d:"M5 5.5A1.5 1.5 0 0 1 6.5 4H19v13H6.5A1.5 1.5 0 0 0 5 18.5v-13Z",...z}),(0,g.jsx)("path",{d:"M5 18.5A1.5 1.5 0 0 0 6.5 20H19v-3M9 8h6",...z})]})}function V({size:e=18,className:s}){return(0,g.jsxs)("svg",{...F(e,s),children:[(0,g.jsx)("path",{d:"M4 20V4M4 20h16",...z}),(0,g.jsx)("path",{d:"M8 16v-4M12 16V8M16 16v-6",...z})]})}function Z({size:e=18,className:s}){return(0,g.jsxs)("svg",{...F(e,s),children:[(0,g.jsx)("rect",{x:"3.5",y:"5.5",width:"17",height:"13",rx:"2",...z}),(0,g.jsx)("path",{d:"m4.5 7.5 7.5 6 7.5-6",...z})]})}function G({size:e=18,className:s}){return(0,g.jsx)("svg",{...F(e,s),children:(0,g.jsx)("path",{d:"m12 4 2.4 5 5.4.7-4 3.7 1 5.4L12 16.2 7.2 18.8l1-5.4-4-3.7 5.4-.7L12 4Z",...z})})}function q({size:e=18,className:s}){return(0,g.jsxs)("svg",{...F(e,s),children:[(0,g.jsx)("circle",{cx:"12",cy:"12",r:"3",...z}),(0,g.jsx)("path",{d:"M12 3.5v2.2M12 18.3v2.2M3.5 12h2.2M18.3 12h2.2M6 6l1.6 1.6M16.4 16.4 18 18M18 6l-1.6 1.6M7.6 16.4 6 18",...z})]})}function J(){const[e,s]=(0,t.useState)(null),[n,d]=(0,t.useState)(null),[r,l]=(0,t.useState)(!0);if((0,t.useEffect)(()=>{a()({path:`${o}/activity`}).then(e=>{s(e),l(!1)}).catch(e=>{d(e?.message||(0,i.__)("Failed to load activity.","deskovi")),l(!1)})},[]),r)return(0,g.jsx)(x,{});if(n||!e)return(0,g.jsx)("div",{className:"itsdesk-admin__error",children:n||(0,i.__)("No activity data.","deskovi")});const c=e=>{const s=e.toLowerCase();return"ok"===s||"success"===s?"ok":"fail"===s||"failed"===s?"danger":"neutral"};return(0,g.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,g.jsx)("div",{className:"itsdesk-admin__row",children:(0,g.jsxs)("div",{children:[(0,g.jsx)("h2",{children:(0,i.__)("Activity","deskovi")}),(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("A running log of ticket and account events on this site.","deskovi")})]})}),(0,g.jsxs)("table",{className:"itsdesk-table",children:[(0,g.jsx)("thead",{children:(0,g.jsxs)("tr",{children:[(0,g.jsx)("th",{children:(0,i.__)("When","deskovi")}),(0,g.jsx)("th",{children:(0,i.__)("Type","deskovi")}),(0,g.jsx)("th",{children:(0,i.__)("Event","deskovi")}),(0,g.jsx)("th",{children:(0,i.__)("Result","deskovi")})]})}),(0,g.jsx)("tbody",{children:e.activity.map((e,s)=>(0,g.jsxs)("tr",{children:[(0,g.jsx)("td",{children:e.when}),(0,g.jsx)("td",{className:"itsdesk-table__area",children:e.type}),(0,g.jsx)("td",{children:e.event}),(0,g.jsx)("td",{children:(0,g.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--"+c(e.result),children:[(0,g.jsx)("span",{className:"itsdesk-badge__dot"}),e.result]})})]},s))})]})]})}function K({label:e,value:s,hint:t,icon:i,tone:n="default",onClick:a}){const d=`itsdesk-metric itsdesk-metric--${n}${a?" is-clickable":""}`,o=(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:"itsdesk-metric__top",children:[(0,g.jsx)("span",{className:"itsdesk-metric__label",children:e}),i&&(0,g.jsx)("span",{className:"itsdesk-metric__icon",children:i})]}),(0,g.jsx)("div",{className:"itsdesk-metric__value",children:s}),t&&(0,g.jsx)("div",{className:"itsdesk-metric__hint",children:t})]});return a?(0,g.jsx)("button",{type:"button",className:d,onClick:a,children:o}):(0,g.jsx)("div",{className:d,children:o})}function X({onToast:e}){const[s,n]=(0,t.useState)(null),[a,d]=(0,t.useState)(null),[o,r]=(0,t.useState)(!0);if((0,t.useEffect)(()=>{c().then(e=>{n(e),r(!1)}).catch(e=>{d(e?.message||(0,i.__)("Failed to load diagnostics.","deskovi")),r(!1)})},[]),o&&!s)return(0,g.jsx)(x,{});if(a&&!s)return(0,g.jsx)("div",{className:"itsdesk-admin__error",children:a});if(!s)return null;const l=e=>"pass"===e?(0,i.__)("Pass","deskovi"):"ok"===e?(0,i.__)("OK","deskovi"):"fail"===e?(0,i.__)("Fail","deskovi"):"info"===e?(0,i.__)("Info","deskovi"):e;return(0,g.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,g.jsxs)("div",{className:"itsdesk-admin__row",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("h2",{children:(0,i.__)("Diagnostics","deskovi")}),(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Support-safe environment snapshot. Share intentionally — never automatic full log upload.","deskovi")})]}),(0,g.jsx)("div",{className:"itsdesk-admin__spacer"}),(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",onClick:()=>{s&&navigator.clipboard.writeText(JSON.stringify(s,null,2)).then(()=>e((0,i.__)("Report copied to clipboard.","deskovi")),()=>e((0,i.__)("Could not copy report.","deskovi"),"danger"))},children:(0,i.__)("Copy report","deskovi")}),(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",onClick:()=>{r(!0),d(null),c().then(s=>{n(s),r(!1),e((0,i.__)("Diagnostics refreshed.","deskovi"))}).catch(e=>{d(e?.message||(0,i.__)("Failed to load diagnostics.","deskovi")),r(!1)})},children:(0,i.__)("Run health check","deskovi")})]}),(0,g.jsxs)("div",{className:"itsdesk-metrics",children:[(0,g.jsx)(K,{label:"WordPress",value:s.wordpress}),(0,g.jsx)(K,{label:"WooCommerce",value:s.woocommerce||"—"}),(0,g.jsx)(K,{label:"PHP",value:s.php}),(0,g.jsx)(K,{label:"Deskovi",value:s.plugin})]}),(0,g.jsxs)("table",{className:"itsdesk-table",children:[(0,g.jsx)("thead",{children:(0,g.jsxs)("tr",{children:[(0,g.jsx)("th",{children:(0,i.__)("Check","deskovi")}),(0,g.jsx)("th",{children:(0,i.__)("Value","deskovi")}),(0,g.jsx)("th",{children:(0,i.__)("Status","deskovi")})]})}),(0,g.jsxs)("tbody",{children:[s.checks.map(e=>{return(0,g.jsxs)("tr",{children:[(0,g.jsx)("td",{className:"itsdesk-table__area",children:e.name}),(0,g.jsx)("td",{children:e.value}),(0,g.jsx)("td",{children:(0,g.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--"+(s=e.status,"pass"===s||"ok"===s?"ok":"fail"===s?"danger":"info"),children:[(0,g.jsx)("span",{className:"itsdesk-badge__dot"}),l(e.status)]})})]},e.name);var s}),(0,g.jsxs)("tr",{children:[(0,g.jsx)("td",{className:"itsdesk-table__area",children:(0,i.__)("Active theme","deskovi")}),(0,g.jsx)("td",{children:s.theme}),(0,g.jsx)("td",{children:(0,g.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--info",children:[(0,g.jsx)("span",{className:"itsdesk-badge__dot"}),(0,i.__)("Info","deskovi")]})})]})]})]}),(0,g.jsx)("h3",{className:"itsdesk-admin__section",children:(0,i.__)("Sanitized recent errors","deskovi")}),0===s.errors.length?(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("No diagnostic errors recorded.","deskovi")}):(0,g.jsxs)("table",{className:"itsdesk-table",children:[(0,g.jsx)("thead",{children:(0,g.jsxs)("tr",{children:[(0,g.jsx)("th",{children:(0,i.__)("Time","deskovi")}),(0,g.jsx)("th",{children:(0,i.__)("Code","deskovi")}),(0,g.jsx)("th",{children:(0,i.__)("Message","deskovi")})]})}),(0,g.jsx)("tbody",{children:s.errors.map((e,s)=>(0,g.jsxs)("tr",{children:[(0,g.jsx)("td",{children:e.time||"—"}),(0,g.jsx)("td",{children:e.code||"—"}),(0,g.jsx)("td",{children:e.message||"—"})]},s))})]})]})}function Q({id:e,checked:s,disabled:t,onChange:i,label:n,description:a}){return(0,g.jsxs)("div",{className:"itsdesk-toggle"+(t?" is-disabled":""),children:[(0,g.jsxs)("div",{className:"itsdesk-toggle__copy",children:[(0,g.jsx)("label",{htmlFor:e,className:"itsdesk-toggle__label",children:n}),a&&(0,g.jsx)("p",{className:"itsdesk-toggle__desc",children:a})]}),(0,g.jsx)("button",{id:e,type:"button",role:"switch","aria-checked":s,disabled:t,className:"itsdesk-switch"+(s?" is-on":""),onClick:()=>i(!s),children:(0,g.jsx)("span",{className:"itsdesk-switch__thumb"})})]})}function Y(){return[{id:"pro-email",icon:"IconMail",title:(0,i.__)("Email channel","deskovi"),description:(0,i.__)("Customers write to your support address and the mail becomes a ticket. Your replies go back as email and thread with the customer’s own mail.","deskovi"),bullets:[(0,i.__)("Gmail / Google Workspace, Microsoft 365 / Outlook or any IMAP mailbox, with your own app, no relay server","deskovi"),(0,i.__)("Replies are matched to the right ticket, quoted history and signatures are removed, attachments are saved","deskovi"),(0,i.__)("Agents can answer a notification by replying to the email","deskovi")]},{id:"pro-automation",icon:"IconBolt",title:(0,i.__)("Automation","deskovi"),description:(0,i.__)("Rules that assign, prioritise and annotate tickets for you when something happens.","deskovi"),bullets:[(0,i.__)("Assign to one agent, in turn, or to whoever has the fewest open tickets","deskovi"),(0,i.__)("Practice mode shows what a rule would do before it changes anything","deskovi"),(0,i.__)("Rules never email customers, refund or delete anything","deskovi")]},{id:"pro-tags",icon:"IconQueue",title:(0,i.__)("Tags","deskovi"),description:(0,i.__)("Put your own labels on tickets and find them again.","deskovi"),bullets:[(0,i.__)("Labels such as “vip” or “damaged-item”, shown in the ticket list","deskovi"),(0,i.__)("Filter the list by tag, save it as a view, and let automation rules add tags","deskovi")]},{id:"pro-fields",icon:"IconFileGeneric",title:(0,i.__)("Custom fields","deskovi"),description:(0,i.__)("Add your own details to tickets, such as the return reason or the carrier.","deskovi"),bullets:[(0,i.__)("Text, number, dropdown, checkbox and date fields that only your team sees","deskovi"),(0,i.__)("They move with a merge and are deleted with the ticket","deskovi")]},{id:"pro-roles",icon:"IconShield",title:(0,i.__)("Roles & permissions","deskovi"),description:(0,i.__)("Decide which role may refund, see reports, set up rules or manage mailboxes.","deskovi"),bullets:[(0,i.__)("A Support Manager role next to the Support Agent role","deskovi"),(0,i.__)("One table that shows what every role may do","deskovi")]},{id:"pro-sla",icon:"IconClock",title:(0,i.__)("Response times (SLA)","deskovi"),description:(0,i.__)("First-reply and resolution targets per priority, counted in your working hours.","deskovi"),bullets:[(0,i.__)("Timers on every ticket and a “Needs attention” queue","deskovi"),(0,i.__)("The clock can pause while you wait for the customer","deskovi"),(0,i.__)("One-time warning and breach emails to your team","deskovi")]},{id:"pro-team",icon:"IconTicket",title:(0,i.__)("Team tools","deskovi"),description:(0,i.__)("Work on tickets together without stepping on each other.","deskovi"),bullets:[(0,i.__)("A notice when a colleague has the same ticket open or is writing a reply","deskovi"),(0,i.__)("@mentions in internal notes, reply drafts, and handover with a note","deskovi"),(0,i.__)("Star and watch tickets, log the time you spend, and work from the keyboard","deskovi")]},{id:"pro-orders",icon:"IconCart",title:(0,i.__)("Order tools","deskovi"),description:(0,i.__)("Do more with the order without leaving the ticket.","deskovi"),bullets:[(0,i.__)("Refund chosen items or an amount, change the status, cancel, add a note or fix the shipping address","deskovi"),(0,i.__)("A customer card with lifetime value, orders and earlier tickets","deskovi"),(0,i.__)("Send a replacement order or a one-time coupon","deskovi")]},{id:"pro-import",icon:"IconFileGeneric",title:(0,i.__)("Import tickets","deskovi"),description:(0,i.__)("Move your history from another helpdesk without emailing a single customer.","deskovi"),bullets:[(0,i.__)("Bring in a CSV export from Help Scout, Zendesk, Freshdesk and others","deskovi"),(0,i.__)("Check first, keep the original dates and tags, and never import the same ticket twice","deskovi")]},{id:"pro-connections",icon:"IconLink",title:(0,i.__)("Connections and API","deskovi"),description:(0,i.__)("Tell the other tools you use what happens in your helpdesk.","deskovi"),bullets:[(0,i.__)("Signed webhooks for Zapier, Make or your CRM, and messages to Slack, Discord, Teams or Telegram","deskovi"),(0,i.__)("A REST API with read and write keys, a customer lookup for your CRM, and a hook for your own code","deskovi")]},{id:"pro-selfservice",icon:"IconBook",title:(0,i.__)("Self-service","deskovi"),description:(0,i.__)("Before a customer sends a ticket, the chat widget shows where their order is and pages of your store that may already answer the question.","deskovi"),bullets:[(0,i.__)("Order status and tracking for the customer’s own order","deskovi"),(0,i.__)("Suggested public pages, then “Did this answer your question?”","deskovi")]},{id:"pro-ai",icon:"IconSparkle",title:(0,i.__)("AI assistant","deskovi"),description:(0,i.__)("Order-aware reply drafts, summaries, translation and suggestions inside the ticket, with your own OpenAI or Anthropic key.","deskovi"),bullets:[(0,i.__)("Customer details are masked before anything leaves your site","deskovi"),(0,i.__)("Drafts only: nothing is sent or changed unless an agent does it","deskovi")]},{id:"pro-reports",icon:"IconChart",title:(0,i.__)("Reports and satisfaction","deskovi"),description:(0,i.__)("How fast you answer, what is waiting, who is busy and how customers feel, plus store views such as tickets per product.","deskovi"),bullets:[(0,i.__)("Optional one-click satisfaction survey when a ticket is resolved","deskovi"),(0,i.__)("Weekly or monthly summary email and optional deletion of old tickets","deskovi")]}]}function ee({ctx:e}){const t=String(e.config.proUrl??"");return(0,g.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,g.jsxs)("div",{className:"itsdesk-admin__row",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("h2",{className:"itsdesk-page-title",children:(0,i.__)("Deskovi Pro","deskovi")}),(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("A separate add-on for stores with more tickets to handle. It works on top of this plugin and keeps everything on your own site.","deskovi")})]}),(0,g.jsx)("div",{className:"itsdesk-admin__spacer"}),t&&(0,g.jsx)("a",{className:"itsdesk-btn itsdesk-btn--primary",href:t,target:"_blank",rel:"noopener noreferrer",children:(0,i.__)("Learn more","deskovi")})]}),(0,g.jsx)("div",{className:"itsdesk-features",children:Y().map(e=>{const t=s[e.icon];return(0,g.jsxs)("div",{className:"itsdesk-feature is-locked",children:[(0,g.jsx)("div",{className:"itsdesk-feature__icon",children:(0,g.jsx)(t,{size:16})}),(0,g.jsxs)("strong",{children:[e.title,(0,g.jsx)("span",{className:"itsdesk-pro-tag",children:(0,i.__)("Pro","deskovi")})]}),(0,g.jsx)("p",{children:e.description}),(0,g.jsx)("ul",{className:"itsdesk-feature__list",children:e.bullets.map(e=>(0,g.jsx)("li",{children:e},e))})]},e.id)})}),(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Everything in Deskovi (free) keeps working as it is. Installing Deskovi Pro turns these features on and replaces this page with their settings.","deskovi")})]})}const se=new Map,te=new Map,ie=new Map,ne=new Map,ae=new Map,de=new Set;let oe=0;function re(){oe++,de.forEach(e=>e())}function le(e){return de.add(e),()=>{de.delete(e)}}function ce(){return oe}function he(){return(0,t.useSyncExternalStore)(le,ce)}function ke(e,s){return(e.order??100)-(s.order??100)||e.id.localeCompare(s.id)}const ue={apiVersion:1,config:window.itsdeskAdmin??{},api:{get:function(e){return a()({path:e})},post:function(e,s){return a()({path:e,method:"POST",data:s})},del:function(e){return a()({path:e,method:"DELETE"})},errorMessage:r},components:{Toggle:Q,StatusBadge:function({tone:e="neutral",pulse:s=!1,children:t}){return(0,g.jsxs)("span",{className:`itsdesk-badge itsdesk-badge--${e}`,children:[(0,g.jsx)("span",{className:"itsdesk-badge__dot"+(s?" is-pulse":"")}),t]})},MetricCard:K,SkeletonPanel:x,Icons:s}};function _e(e){return se.get(e)}class me extends t.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e){console.error(`Deskovi extension "${this.props.label}" failed to render.`,e)}render(){return this.state.failed?null:this.props.children}}function ve({id:e,onToast:s}){he();const t=_e(e);return t?(0,g.jsx)(me,{label:e,children:t.render({onToast:s,ctx:ue})}):null}function pe({name:e,context:s}){he();const i=function(e){return Array.from(te.get(e)?.values()??[]).sort((e,s)=>ke(e,s))}(e);if(0===i.length)return null;const n={...s,ctx:ue};return(0,g.jsx)(g.Fragment,{children:i.map(s=>(0,g.jsx)(t.Fragment,{children:(0,g.jsx)(me,{label:`${e}:${s.id}`,children:s.render(n)})},s.id))})}const ge={apiVersion:1,ctx:ue,registerScreen(e){se.set(e.id,e),re()},registerSlot(e,s){const t=te.get(e)??new Map;t.set(s.id,s),te.set(e,t),re()},registerBulkAction(e){ie.set(e.id,e),re()},registerDocsFeature(e){ne.set(e.id,e),re()},registerDocsSection(e){ae.set(e.id,e),re()}};function xe(e){window.location.hash="#/"+e}function je(){const e=e=>(0,g.jsx)(e,{size:16});return[{id:"tickets",icon:e($),title:(0,i.__)("Support tickets","deskovi"),description:(0,i.__)("Customers open tickets, logged in or as a verified guest. Every ticket has a conversation, a status (Open, Pending, Resolved, Closed) and optional attachments.","deskovi"),screen:"tickets"},{id:"orders",icon:e(P),title:(0,i.__)("Order-aware support","deskovi"),description:(0,i.__)("Link a ticket to a WooCommerce order and see its items, total, shipping, status and timeline beside the conversation.","deskovi")},{id:"refunds",icon:e(W),title:(0,i.__)("Refunds from a ticket","deskovi"),description:(0,i.__)("Issue a full or partial refund, or resend the order invoice email, without opening the order.","deskovi")},{id:"filters",icon:e(I),title:(0,i.__)("Filters and saved views","deskovi"),description:(0,i.__)("Narrow the ticket list by status, priority, category, assignee or search, and save a combination as a view you can open with one click.","deskovi"),screen:"tickets"},{id:"merge",icon:e(y),title:(0,i.__)("Merge duplicate tickets","deskovi"),description:(0,i.__)("When a customer writes twice about the same thing, merge one ticket into the other: every message and file moves, and the conversation stays in one place.","deskovi"),screen:"tickets"},{id:"priority",icon:e(O),title:(0,i.__)("Priority and assignment","deskovi"),description:(0,i.__)("Mark tickets Low, Normal, High or Urgent, hand them to an agent, and filter by Unassigned or Assigned to me.","deskovi")},{id:"notes",icon:e(I),title:(0,i.__)("Internal notes","deskovi"),description:(0,i.__)("Leave a note only your team can see. It is never shown to the customer and its attachments stay private too.","deskovi")},{id:"macros",icon:e(I),title:(0,i.__)("Canned replies","deskovi"),description:(0,i.__)("Save reusable answers with placeholders such as {customer_name} and {order_id}, and insert one with a click.","deskovi"),screen:"macros"},{id:"attachments",icon:e(D),title:(0,i.__)("Attachments","deskovi"),description:(0,i.__)("Customers and agents can attach JPG, PNG, GIF, WebP, PDF and TXT files, up to 5 MB each. Files are served only to people who may see the ticket.","deskovi")},{id:"bulk",icon:e(M),title:(0,i.__)("Bulk actions and CSV export","deskovi"),description:(0,i.__)("Change the status of, or delete, many tickets at once. Export the list you are looking at to a spreadsheet.","deskovi")},{id:"notifications",icon:e(A),title:(0,i.__)("Email notifications","deskovi"),description:(0,i.__)("Switch on or off the emails for a new ticket, a customer reply, an agent reply and an assignment. They are sent by WordPress itself.","deskovi"),screen:"notifications"},{id:"widget",icon:e(f),title:(0,i.__)("Storefront chat widget","deskovi"),description:(0,i.__)("A small launcher on your store. It loads only after it is clicked and never on the cart or checkout. Visitors who are not logged in confirm with a code sent to their email.","deskovi"),screen:"widget"},{id:"overview",icon:e(S),title:(0,i.__)("Overview","deskovi"),description:(0,i.__)("One screen with what is open, pending and unassigned, how long the oldest ticket has been waiting, new tickets per day and the latest tickets.","deskovi"),screen:"overview"},{id:"privacy",icon:e(w),title:(0,i.__)("Privacy by design","deskovi"),description:(0,i.__)("Everything stays in your WordPress database. Choose what order details agents see, and use WordPress’s own export and erase tools for personal data.","deskovi"),screen:"privacy"},{id:"diagnostics",icon:e(N),title:(0,i.__)("Diagnostics and activity log","deskovi"),description:(0,i.__)("Health checks for your setup and a log of what Deskovi has done, so a problem is easy to explain and fix.","deskovi"),screen:"diagnostics"},{id:"addons",icon:e(y),title:(0,i.__)("Built for add-ons","deskovi"),description:(0,i.__)("Other plugins can add screens, buttons and panels through a documented extension API, without changing Deskovi.","deskovi")}]}function be(e){return{id:e.id,icon:e.icon,title:e.title,description:e.description,screen:e.screen}}function ye(){he();const[e,n]=(0,t.useState)("features"),a=Array.from(ne.values()).sort((e,s)=>ke(e,s)),d=Array.from(ae.values()).sort((e,s)=>ke(e,s)),o=a.filter(e=>"pro"===e.plan),r=d.filter(e=>"pro"===e.plan),l=o.length>0||r.length>0,c=[...je(),...a.filter(e=>"pro"!==e.plan).map(be)],h=l?o.map(be):Y().map(e=>{const t=s[e.icon];return{id:e.id,icon:(0,g.jsx)(t,{size:16}),title:e.title,description:e.description,locked:!0}}),k=[{id:"find-deskovi",title:(0,i.__)("Finding your way around","deskovi"),intro:(0,i.__)("Open “Deskovi” in the WordPress admin menu. The menu on the left of the Deskovi screen is grouped: Work (Tickets, Canned Replies), Insights (Activity, and Reports with Pro), Automate (Pro), Channels (Widget, and Mailboxes with Pro) and Settings (Notifications, Data & Privacy, Diagnostics, Docs & Features). Overview is the first item.","deskovi")},{id:"overview",title:(0,i.__)("Reading the Overview","deskovi"),intro:(0,i.__)("The four numbers at the top are the tickets that need you. Open and Pending count the tickets in those statuses. Unassigned counts the open and pending ones that have no agent, and turns amber when there are any. “Oldest waiting” is how long the longest-waiting ticket has been open. The bars show how many tickets arrived on each of the last 7 days (UTC).","deskovi")},{id:"how-customers-open-tickets",title:(0,i.__)("How customers open a ticket","deskovi"),intro:(0,i.__)("Customers use the chat widget on your store. If they are logged in they fill in a short form (subject, category, message, an optional order). If they are not, they enter their email and the order number and confirm with a one-time code sent to that email, so no account is needed.","deskovi")},{id:"reply-to-a-ticket",title:(0,i.__)("Replying to a ticket","deskovi"),intro:(0,i.__)("Open Deskovi → Tickets and click a ticket. The conversation is on the right.","deskovi"),steps:[(0,i.__)("Write your answer in the reply box. Insert a canned reply from the menu above it if you have one.","deskovi"),(0,i.__)("Tick “Internal note (not visible to customer)” for a message only your team should see.","deskovi"),(0,i.__)("Click “Send reply”. The customer is emailed if the “Agent reply” notification is on. When an agent replies to an open ticket it moves to Pending; when a customer replies to a resolved ticket it opens again.","deskovi")]},{id:"filters-views",title:(0,i.__)("Filters and saved views","deskovi"),intro:(0,i.__)("Above the ticket list, choose a status (including “Open or pending”, which is what still needs work), a priority and a category, use the Unassigned and Assigned to me buttons, or search by subject, name or email. They combine, and the list, the count and Export CSV all follow them.","deskovi"),steps:[(0,i.__)("Set the filters you use often, for example status “Open or pending” and priority “Urgent”.","deskovi"),(0,i.__)("Click “Save this view”, give it a name and press Enter. It appears as a button above the list.","deskovi"),(0,i.__)("Click a view to apply it again. The × on a view deletes it. Views belong to you: other agents never see or change them, and each agent can keep up to 20.","deskovi"),(0,i.__)("Add-ons can add their own filters beside the built-in ones (Deskovi Pro adds a tag filter).","deskovi")]},{id:"merge-tickets",title:(0,i.__)("Merging duplicate tickets","deskovi"),intro:(0,i.__)("Open the ticket that should go away, click “Merge into another ticket…” under the status buttons, find the ticket it belongs to (the customer’s other tickets are listed first, or search by subject, name or email) and click “Merge into this”. Deskovi asks you to confirm because it cannot be undone.","deskovi"),steps:[(0,i.__)("All messages (including internal notes) and attachments move to the ticket you chose, in the order they were written. The merged ticket is deleted.","deskovi"),(0,i.__)("The ticket that stays keeps its customer and subject. It takes the higher priority, gets the merged ticket’s agent if it had none, and is opened again if it was resolved or closed while the merged ticket was still active.","deskovi"),(0,i.__)("An internal note on it records which ticket was merged, when and by whom. Nobody is emailed.","deskovi"),(0,i.__)("Merging tickets of two different customers is allowed, so check the email address before you confirm.","deskovi")]},{id:"status-priority",title:(0,i.__)("Status and priority","deskovi"),intro:(0,i.__)("Use the four buttons under the ticket to set Open, Pending, Resolved or Closed. Pending means you are waiting for the customer. Use the Priority menu (Low, Normal, High, Urgent) to show what needs attention first. Both are saved at once.","deskovi")},{id:"assign-tickets",title:(0,i.__)("Assigning tickets","deskovi"),intro:(0,i.__)("Pick an agent in “Assigned to”, or leave it on Unassigned for anyone to take. Above the ticket list, “Unassigned” and “Assigned to me” filter the list. The assigned agent is the one emailed about customer replies. Agents are people who may manage Deskovi (administrators and shop managers by default).","deskovi")},{id:"link-order",title:(0,i.__)("Linking a ticket to an order","deskovi"),intro:(0,i.__)("If the customer chose an order it is linked already. Otherwise type a WooCommerce order number into “Order ID” and click “Link order”. The ticket then shows the order’s items, total, payment and shipping method and timeline. Billing address and phone only appear if you allowed them under Data & Privacy.","deskovi")},{id:"refunds",title:(0,i.__)("Issuing a refund or resending an invoice","deskovi"),intro:(0,i.__)("You need the permission to edit WooCommerce orders. In the linked order card:","deskovi"),steps:[(0,i.__)("Leave the amount empty to refund what is left of the order, or type a smaller amount for a partial refund.","deskovi"),(0,i.__)("Add a short reason if you like; it is saved with the refund.","deskovi"),(0,i.__)("Click “Issue refund”. If the payment gateway can refund, the money is returned there; if not, the refund is recorded in WooCommerce and you return the money yourself. A note in the ticket says which happened.","deskovi"),(0,i.__)("To send the customer their order email again instead, click “Resend invoice”. No money moves.","deskovi")]},{id:"attachments",title:(0,i.__)("Attachments","deskovi"),intro:(0,i.__)("Click “Attach” under the reply box. Allowed files: JPG, PNG, GIF, WebP, PDF and TXT, up to 5 MB each. Files are checked on upload and are downloadable only by the customer who owns the ticket and by agents. Attachments on internal notes are never visible to the customer.","deskovi")},{id:"canned-replies",title:(0,i.__)("Canned replies","deskovi"),intro:(0,i.__)("Answers you give again and again.","deskovi"),steps:[(0,i.__)("Go to Deskovi → Canned Replies and click “Add canned reply”.","deskovi"),(0,i.__)("Write a title and the message. Placeholders such as {customer_name} and {order_id} are filled in for the ticket you use it on.","deskovi"),(0,i.__)("In a ticket, choose it from “Insert canned reply”. It is added to your draft, so you can still edit it before sending.","deskovi")]},{id:"bulk-export",title:(0,i.__)("Bulk actions and CSV export","deskovi"),intro:(0,i.__)("Tick the box beside several tickets to change their status or delete them together; deleting also removes their messages and files and cannot be undone. To export, search or filter the list, then click “Export CSV”: the file contains exactly the tickets you are looking at.","deskovi")},{id:"notifications",title:(0,i.__)("Email notifications","deskovi"),intro:(0,i.__)("Deskovi → Notifications has four switches: a new ticket (emailed to every agent), a customer reply (to the assigned agent, or all agents if nobody is assigned), an agent reply (to the customer) and an assignment (to the agent). Emails are sent by WordPress, so they need a working mail setup on your server; a mail plugin with SMTP makes delivery more reliable.","deskovi")},{id:"widget-setup",title:(0,i.__)("Setting up the chat widget","deskovi"),intro:(0,i.__)("Deskovi → Widget. Turn on “Enable support widget”, choose the corner (placement), a light or dark theme, and an optional text for the button; leave the text empty for an icon only. The widget does not load on the cart or checkout, and when it is off nothing at all is added to your store. It uses your store’s own font.","deskovi")},{id:"privacy-data",title:(0,i.__)("Privacy and your data","deskovi"),intro:(0,i.__)("Tickets, messages and attachments live in your own WordPress database; Deskovi sends nothing to an outside service. Under Data & Privacy you choose whether agents may see the billing address and phone number, whether to share diagnostics (only with your consent), the historical import window (off by default) and how long synced order context is kept. Deskovi adds a privacy-policy suggestion and works with Tools → Export / Erase Personal Data: an erase request deletes that customer’s tickets, messages and files.","deskovi")},{id:"diagnostics-activity",title:(0,i.__)("Diagnostics and the activity log","deskovi"),intro:(0,i.__)("Diagnostics lists the versions of WordPress, WooCommerce and PHP and runs checks on your setup; copy its report when you ask for help. Activity is a short log of what Deskovi did (replies, assignments, refunds, errors). Use these two before contacting support.","deskovi")},{id:"permissions",title:(0,i.__)("Who can use Deskovi","deskovi"),intro:(0,i.__)("Administrators and shop managers get the “manage_itsdesk” permission when the plugin is activated, and they can use every Deskovi screen. Refunds also need the WooCommerce permission to edit orders. To give another role access, add the manage_itsdesk capability to it with a role editor plugin. Customers never see the admin screens.","deskovi")},{id:"addons",title:(0,i.__)("For developers: add-ons","deskovi"),intro:(0,i.__)("Add-on plugins can hook into tickets, notifications, refunds and the widget, and can add screens, panels and bulk actions to this admin app. The contract is documented in contracts/extensions-v1.md in the plugin, and it is what Deskovi Pro is built on.","deskovi")},...d.filter(e=>"pro"!==e.plan)],u=(e,s)=>(0,g.jsxs)("div",{className:"itsdesk-feature"+(e.locked?" is-locked":""),children:[(0,g.jsx)("div",{className:"itsdesk-feature__icon",children:e.icon}),(0,g.jsxs)("strong",{children:[e.title,s&&(0,g.jsx)("span",{className:"itsdesk-pro-tag",children:(0,i.__)("Pro","deskovi")})]}),(0,g.jsx)("p",{children:e.description}),e.screen&&!e.locked&&(0,g.jsxs)("button",{type:"button",className:"itsdesk-link",onClick:()=>xe(e.screen),children:[(0,i.__)("Open","deskovi")," →"]})]},e.id),_=e=>(0,g.jsxs)("div",{className:"itsdesk-card",id:`itsdesk-doc-${e.id}`,style:{marginTop:14},children:[(0,g.jsx)("div",{className:"itsdesk-card__head",children:(0,g.jsx)("h3",{className:"itsdesk-card__title",children:e.title})}),(0,g.jsx)("p",{children:e.intro}),e.steps&&(0,g.jsx)("ol",{style:{margin:"8px 0 0",paddingLeft:18},children:e.steps.map((e,s)=>(0,g.jsx)("li",{style:{marginBottom:6},children:e},s))})]},e.id);return(0,g.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("h2",{className:"itsdesk-page-title",children:(0,i.__)("Docs & Features","deskovi")}),(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("What Deskovi can do and how to set it up. Everything is stored in your own WordPress database; there is no outside account.","deskovi")})]}),(0,g.jsxs)("div",{className:"itsdesk-tabs",role:"tablist",children:[(0,g.jsx)("button",{type:"button",className:"itsdesk-tab"+("features"===e?" is-active":""),role:"tab","aria-selected":"features"===e,onClick:()=>n("features"),children:(0,i.__)("Features","deskovi")}),(0,g.jsx)("button",{type:"button",className:"itsdesk-tab"+("documentation"===e?" is-active":""),role:"tab","aria-selected":"documentation"===e,onClick:()=>n("documentation"),children:(0,i.__)("Documentation","deskovi")})]}),"features"===e?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h3",{className:"itsdesk-admin__section",children:(0,i.__)("Deskovi","deskovi")}),(0,g.jsx)("div",{className:"itsdesk-features",children:c.map(e=>u(e,!1))}),(0,g.jsx)("h3",{className:"itsdesk-admin__section",children:l?(0,i.__)("Deskovi Pro","deskovi"):(0,i.__)("Available with Deskovi Pro","deskovi")}),!l&&(0,g.jsxs)("p",{className:"itsdesk-admin__muted",children:[(0,i.__)("Deskovi Pro is a separate add-on. These features turn on when it is installed; they are not part of the free plugin.","deskovi")," ",(0,g.jsxs)("button",{type:"button",className:"itsdesk-link",onClick:()=>xe("pro"),children:[(0,i.__)("See what Pro adds","deskovi")," →"]})]}),(0,g.jsx)("div",{className:"itsdesk-features",children:h.map(e=>u(e,!0))})]}):(0,g.jsxs)("div",{children:[(0,g.jsxs)("div",{className:"itsdesk-card",children:[(0,g.jsx)("div",{className:"itsdesk-card__head",children:(0,g.jsx)("h3",{children:(0,i.__)("On this page","deskovi")})}),(0,g.jsx)("ul",{style:{margin:"8px 0",paddingLeft:18,columns:2},children:[...k,...r].map(e=>(0,g.jsx)("li",{style:{marginBottom:6},children:(0,g.jsx)("a",{href:`#itsdesk-doc-${e.id}`,onClick:s=>{s.preventDefault(),document.getElementById(`itsdesk-doc-${e.id}`)?.scrollIntoView({behavior:"smooth",block:"start"})},children:e.title})},e.id))})]}),k.map(_),(0,g.jsx)("h3",{className:"itsdesk-admin__section",children:(0,i.__)("Deskovi Pro","deskovi")}),l?r.map(_):(0,g.jsx)("div",{className:"itsdesk-card",children:(0,g.jsx)("p",{children:(0,i.__)("The guides for Deskovi Pro (connecting Gmail or Microsoft 365, automation rules, response times, the AI assistant, reports and more) appear here once the add-on is installed. The features it adds are listed under Features.","deskovi")})})]})]})}function fe({onToast:e}){const[s,n]=(0,t.useState)(null),[d,c]=(0,t.useState)(!0),[h,k]=(0,t.useState)(!1),[u,_]=(0,t.useState)(null),[m,v]=(0,t.useState)(""),[p,j]=(0,t.useState)(""),[b,y]=(0,t.useState)(!1),[f,w]=(0,t.useState)(null);(0,t.useEffect)(()=>{l().then(e=>{n(e),c(!1)}).catch(s=>{e(r(s),"danger"),c(!1)})},[]);return d||!s?(0,g.jsx)(x,{}):(0,g.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,g.jsxs)("div",{className:"itsdesk-admin__row",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("h2",{children:(0,i.__)("Canned Replies","deskovi")}),(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Reusable reply templates agents can insert into the ticket reply composer with one click.","deskovi")})]}),(0,g.jsx)("div",{className:"itsdesk-admin__spacer"}),(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",onClick:()=>{_(null),v(""),j(""),k(!0)},children:(0,i.__)("Add canned reply","deskovi")})]}),h&&(0,g.jsxs)("div",{className:"itsdesk-card",style:{marginTop:16},children:[(0,g.jsx)("div",{className:"itsdesk-card__head",children:(0,g.jsx)("h3",{children:u?(0,i.__)("Edit canned reply","deskovi"):(0,i.__)("New canned reply","deskovi")})}),(0,g.jsxs)("div",{className:"itsdesk-field",children:[(0,g.jsx)("label",{htmlFor:"itsdesk-macro-title",children:(0,i.__)("Title","deskovi")}),(0,g.jsx)("input",{id:"itsdesk-macro-title",className:"itsdesk-input",maxLength:80,value:m,onChange:e=>v(e.target.value)})]}),(0,g.jsxs)("div",{className:"itsdesk-field",children:[(0,g.jsx)("label",{htmlFor:"itsdesk-macro-body",children:(0,i.__)("Body","deskovi")}),(0,g.jsx)("textarea",{id:"itsdesk-macro-body",className:"itsdesk-textarea",rows:5,maxLength:2e3,value:p,onChange:e=>j(e.target.value)}),(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Available placeholders: {customer_name}, {customer_email}, {order_id}, {agent_name}","deskovi")})]}),(0,g.jsxs)("div",{className:"itsdesk-admin__actions",children:[(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:b||!m||!p,onClick:()=>{y(!0);const s={title:m,body:p},t=u?function(e,s){return a()({path:`${o}/macros/${e}`,method:"POST",data:s})}(u,s):function(e){return a()({path:`${o}/macros`,method:"POST",data:e})}(s);t.then(s=>{n(e=>{const t=e||[];return u?t.map(e=>e.id===s.id?s:e):[...t,s]}),y(!1),k(!1),_(null),e(u?(0,i.__)("Canned reply updated.","deskovi"):(0,i.__)("Canned reply created.","deskovi"))}).catch(s=>{e(r(s),"danger"),y(!1)})},children:b?(0,i.__)("Saving…","deskovi"):(0,i.__)("Save","deskovi")}),(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",disabled:b,onClick:()=>{k(!1),_(null)},children:(0,i.__)("Cancel","deskovi")})]})]}),0===s.length?(0,g.jsx)("p",{className:"itsdesk-admin__muted",style:{marginTop:16},children:(0,i.__)("No canned replies yet.","deskovi")}):(0,g.jsxs)("table",{className:"itsdesk-table",style:{marginTop:16},children:[(0,g.jsx)("thead",{children:(0,g.jsxs)("tr",{children:[(0,g.jsx)("th",{children:(0,i.__)("Title","deskovi")}),(0,g.jsx)("th",{children:(0,i.__)("Preview","deskovi")}),(0,g.jsx)("th",{children:(0,i.__)("Actions","deskovi")})]})}),(0,g.jsx)("tbody",{children:s.map(s=>{return(0,g.jsxs)("tr",{children:[(0,g.jsx)("td",{className:"itsdesk-table__area",children:s.title}),(0,g.jsx)("td",{children:(t=s.body,t.length<=80?t:t.slice(0,80).trimEnd()+"…")}),(0,g.jsx)("td",{children:(0,g.jsxs)("div",{className:"itsdesk-admin__actions",children:[(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",onClick:()=>(e=>{_(e.id),v(e.title),j(e.body),k(!0)})(s),children:(0,i.__)("Edit","deskovi")}),(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--danger",disabled:f===s.id,onClick:()=>(s=>{var t;window.confirm((0,i.__)("Delete this canned reply?","deskovi"))&&(w(s.id),(t=s.id,a()({path:`${o}/macros/${t}`,method:"DELETE"})).then(()=>{n(e=>(e||[]).filter(e=>e.id!==s.id)),w(null),e((0,i.__)("Canned reply deleted.","deskovi"))}).catch(s=>{e(r(s),"danger"),w(null)}))})(s),children:f===s.id?(0,i.__)("Deleting…","deskovi"):(0,i.__)("Delete","deskovi")})]})})]},s.id);var t})})]})]})}function we({onToast:e}){const[s,n]=(0,t.useState)(null),[d,l]=(0,t.useState)(!0),[c,h]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{a()({path:`${o}/notifications`}).then(e=>{n(e),l(!1)}).catch(s=>{e(r(s),"danger"),l(!1)})},[]),d||!s?(0,g.jsx)(x,{}):(0,g.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,g.jsx)("div",{className:"itsdesk-admin__row",children:(0,g.jsxs)("div",{children:[(0,g.jsx)("h2",{children:(0,i.__)("Notifications","deskovi")}),(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Local email notifications only — sent via wp_mail(), nothing leaves your site.","deskovi")})]})}),(0,g.jsxs)("div",{className:"itsdesk-card",style:{marginTop:16},children:[(0,g.jsx)("div",{className:"itsdesk-card__head",children:(0,g.jsx)("h3",{children:(0,i.__)("Ticket event emails","deskovi")})}),(0,g.jsx)(Q,{id:"itsdesk-notif-agent-new-ticket",checked:s.agent_new_ticket,label:(0,i.__)("New ticket","deskovi"),description:(0,i.__)("Email every support agent when a customer opens a new ticket.","deskovi"),onChange:e=>n({...s,agent_new_ticket:e})}),(0,g.jsx)(Q,{id:"itsdesk-notif-agent-new-reply",checked:s.agent_new_reply,label:(0,i.__)("Customer reply","deskovi"),description:(0,i.__)("Email the assigned agent (or all agents, if unassigned) when a customer replies.","deskovi"),onChange:e=>n({...s,agent_new_reply:e})}),(0,g.jsx)(Q,{id:"itsdesk-notif-customer-reply",checked:s.customer_reply,label:(0,i.__)("Agent reply","deskovi"),description:(0,i.__)("Email the customer when an agent replies to their ticket.","deskovi"),onChange:e=>n({...s,customer_reply:e})}),(0,g.jsx)(Q,{id:"itsdesk-notif-agent-assigned",checked:s.agent_assigned,label:(0,i.__)("Ticket assigned","deskovi"),description:(0,i.__)("Email an agent when a ticket is assigned to them.","deskovi"),onChange:e=>n({...s,agent_assigned:e})})]}),(0,g.jsx)("div",{className:"itsdesk-admin__actions",children:(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:c,onClick:()=>{var t;s&&(h(!0),(t=s,a()({path:`${o}/notifications`,method:"POST",data:t})).then(s=>{n(s),h(!1),e((0,i.__)("Notification settings saved.","deskovi"))}).catch(s=>{e(r(s),"danger"),h(!1)}))},children:c?(0,i.__)("Saving…","deskovi"):(0,i.__)("Save notification settings","deskovi")})})]})}function Ne(e){const s=Math.floor(e/60);if(s<1)return(0,i.__)("just now","deskovi");if(s<60)return(0,i.sprintf)(/* translators: %d: minutes */ /* translators: %d: minutes */(0,i._n)("%d minute","%d minutes",s,"deskovi"),s);const t=Math.floor(s/60);if(t<48)return(0,i.sprintf)(/* translators: %d: hours */ /* translators: %d: hours */(0,i._n)("%d hour","%d hours",t,"deskovi"),t);const n=Math.floor(t/24);return(0,i.sprintf)(/* translators: %d: days */ /* translators: %d: days */(0,i._n)("%d day","%d days",n,"deskovi"),n)}function Ce(e){switch(e){case"open":return(0,i.__)("Open","deskovi");case"pending":return(0,i.__)("Pending","deskovi");case"resolved":return(0,i.__)("Resolved","deskovi");case"closed":return(0,i.__)("Closed","deskovi");default:return e}}function Se({days:e}){const s=Math.max(1,...e.map(e=>e.count));return(0,g.jsx)("div",{className:"itsdesk-week",role:"img","aria-label":(0,i.__)("New tickets per day, last 7 days","deskovi"),children:e.map(e=>{const t=new Date(e.date+"T12:00:00Z").toLocaleDateString(void 0,{weekday:"short",timeZone:"UTC"});return(0,g.jsxs)("div",{className:"itsdesk-week__col",title:`${e.date}: ${e.count}`,children:[(0,g.jsx)("span",{className:"itsdesk-week__n",children:e.count}),(0,g.jsx)("span",{className:"itsdesk-week__bar",children:(0,g.jsx)("i",{style:{height:`${Math.max(e.count>0?6:2,e.count/s*100)}%`}})}),(0,g.jsx)("span",{className:"itsdesk-week__d",children:t})]},e.date)})})}function Te({data:e,onNavigate:s,onRefresh:n}){const{widget:a,privacy:d,desk:o}=e,[r,l]=(0,t.useState)(null);(0,t.useEffect)(()=>{let e=!0;return k({per_page:6}).then(s=>e&&l(s.tickets)).catch(()=>e&&l([])),()=>{e=!1}},[e]);const c=o?o.open+o.pending:0;return(0,g.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,g.jsxs)("div",{className:"itsdesk-admin__row",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("h2",{className:"itsdesk-page-title",children:(0,i.__)("Overview","deskovi")}),(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("What needs you today.","deskovi")})]}),(0,g.jsx)("div",{className:"itsdesk-admin__spacer"}),(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--ghost",onClick:n,children:(0,i.__)("Refresh","deskovi")}),(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",onClick:()=>s("tickets"),children:(0,i.__)("Open tickets","deskovi")})]}),(0,g.jsx)(pe,{name:"overview.top",context:{navigate:s}}),!a.enabled&&(0,g.jsxs)("div",{className:"itsdesk-callout",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("strong",{children:(0,i.__)("Customers cannot reach you yet","deskovi")}),(0,g.jsx)("p",{children:(0,i.__)("The chat widget is off. Turn it on so customers can write to you from your store.","deskovi")})]}),(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",onClick:()=>s("widget"),children:(0,i.__)("Set up the widget","deskovi")})]}),o&&(0,g.jsxs)("div",{className:"itsdesk-metrics",children:[(0,g.jsx)(K,{label:(0,i.__)("Open","deskovi"),value:o.open,hint:null!==o.oldest_waiting?(0,i.sprintf)(/* translators: %s: how long */ /* translators: %s: how long */(0,i.__)("oldest waiting %s","deskovi"),Ne(o.oldest_waiting)):(0,i.__)("nothing waiting","deskovi"),icon:(0,g.jsx)($,{}),onClick:()=>s("tickets")}),(0,g.jsx)(K,{label:(0,i.__)("Pending","deskovi"),value:o.pending,hint:(0,i.__)("waiting for the customer","deskovi"),icon:(0,g.jsx)(N,{}),onClick:()=>s("tickets")}),(0,g.jsx)(K,{label:(0,i.__)("Unassigned","deskovi"),value:o.unassigned,hint:o.unassigned>0?(0,i.__)("nobody owns these yet","deskovi"):(0,i.__)("everything has an owner","deskovi"),tone:o.unassigned>0?"warn":"default",icon:(0,g.jsx)(w,{}),onClick:()=>s("tickets")}),(0,g.jsx)(K,{label:(0,i.__)("New, last 7 days","deskovi"),value:o.new_7d,hint:c>0?(0,i.sprintf)(/* translators: %d: tickets */ /* translators: %d: tickets */(0,i._n)("%d ticket waiting now","%d tickets waiting now",c,"deskovi"),c):(0,i.__)("all caught up","deskovi"),icon:(0,g.jsx)(f,{})})]}),(0,g.jsxs)("div",{className:"itsdesk-two",children:[o&&(0,g.jsxs)("section",{className:"itsdesk-box",children:[(0,g.jsx)("h3",{children:(0,i.__)("New tickets, last 7 days","deskovi")}),(0,g.jsx)(Se,{days:o.days})]}),(0,g.jsxs)("section",{className:"itsdesk-box",children:[(0,g.jsxs)("div",{className:"itsdesk-box__head",children:[(0,g.jsx)("h3",{children:(0,i.__)("Latest tickets","deskovi")}),(0,g.jsx)("button",{type:"button",className:"itsdesk-link",onClick:()=>s("tickets"),children:(0,i.__)("View all","deskovi")})]}),null===r&&(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Loading…","deskovi")}),null!==r&&0===r.length&&(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("No tickets yet. They show up here as soon as a customer writes in.","deskovi")}),null!==r&&r.length>0&&(0,g.jsx)("ul",{className:"itsdesk-list",children:r.map(e=>{return(0,g.jsx)("li",{children:(0,g.jsxs)("button",{type:"button",onClick:()=>s("tickets"),children:[(0,g.jsxs)("span",{className:"itsdesk-list__main",children:[(0,g.jsx)("strong",{children:e.subject}),(0,g.jsx)("span",{children:e.customer_name||e.customer_email})]}),(0,g.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--"+(t=e.status,"open"===t?"warn":"pending"===t?"info":"resolved"===t||"closed"===t?"ok":"neutral"),children:[(0,g.jsx)("span",{className:"itsdesk-badge__dot"}),Ce(e.status)]})]})},e.id);var t})})]})]}),(0,g.jsxs)("section",{className:"itsdesk-box",children:[(0,g.jsx)("h3",{children:(0,i.__)("Setup and status","deskovi")}),(0,g.jsxs)("ul",{className:"itsdesk-status-list",children:[(0,g.jsxs)("li",{children:[(0,g.jsx)("span",{className:"itsdesk-status-list__icon",children:(0,g.jsx)(f,{size:16})}),(0,g.jsxs)("span",{className:"itsdesk-status-list__text",children:[(0,g.jsx)("strong",{children:(0,i.__)("Support widget","deskovi")}),(0,g.jsx)("span",{children:a.enabled?`${a.placement} · ${a.theme}`:(0,i.__)("Off: customers cannot start a ticket from your store.","deskovi")})]}),(0,g.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--"+(a.enabled?"ok":"warn"),children:[(0,g.jsx)("span",{className:"itsdesk-badge__dot"}),a.enabled?(0,i.__)("On","deskovi"):(0,i.__)("Off","deskovi")]}),(0,g.jsx)("button",{type:"button",className:"itsdesk-link",onClick:()=>s("widget"),children:(0,i.__)("Edit","deskovi")})]}),(0,g.jsxs)("li",{children:[(0,g.jsx)("span",{className:"itsdesk-status-list__icon",children:(0,g.jsx)(w,{size:16})}),(0,g.jsxs)("span",{className:"itsdesk-status-list__text",children:[(0,g.jsx)("strong",{children:(0,i.__)("Privacy","deskovi")}),(0,g.jsx)("span",{children:(0,i.sprintf)(/* translators: %d: days */ /* translators: %d: days */(0,i.__)("Tickets are kept for %d days.","deskovi"),d.retention_days)})]}),(0,g.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--ok",children:[(0,g.jsx)("span",{className:"itsdesk-badge__dot"}),(0,i.__)("Set","deskovi")]}),(0,g.jsx)("button",{type:"button",className:"itsdesk-link",onClick:()=>s("privacy"),children:(0,i.__)("Edit","deskovi")})]}),(0,g.jsxs)("li",{children:[(0,g.jsx)("span",{className:"itsdesk-status-list__icon",children:(0,g.jsx)(P,{size:16})}),(0,g.jsxs)("span",{className:"itsdesk-status-list__text",children:[(0,g.jsx)("strong",{children:(0,i.__)("Order storage","deskovi")}),(0,g.jsx)("span",{children:(0,i.__)("Works with WooCommerce high-performance order storage.","deskovi")})]}),(0,g.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--ok",children:[(0,g.jsx)("span",{className:"itsdesk-badge__dot"}),(0,g.jsx)(M,{size:12}),(0,i.__)("Compatible","deskovi")]}),(0,g.jsx)("button",{type:"button",className:"itsdesk-link",onClick:()=>s("diagnostics"),children:(0,i.__)("Diagnostics","deskovi")})]})]}),(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Everything is stored in your own WordPress database. No outside account is needed.","deskovi")})]})]})}function Pe({initial:e,onSaved:s,onError:n}){const[d,r]=(0,t.useState)(e),[l,c]=(0,t.useState)(!1);return(0,g.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,g.jsx)("div",{className:"itsdesk-admin__row",children:(0,g.jsxs)("div",{children:[(0,g.jsx)("h2",{children:(0,i.__)("Data & Privacy","deskovi")}),(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Data minimization by default — sync only what agents need. Historical import stays off unless you opt in.","deskovi")})]})}),(0,g.jsxs)("div",{className:"itsdesk-card",style:{marginTop:16},children:[(0,g.jsx)("div",{className:"itsdesk-card__head",children:(0,g.jsx)("h3",{children:(0,i.__)("Customer fields","deskovi")})}),(0,g.jsx)(Q,{id:"itsdesk-privacy-billing",checked:d.sync_billing_address,label:(0,i.__)("Allow billing address sync","deskovi"),description:(0,i.__)("Useful for shipping disputes. Off by default.","deskovi"),onChange:e=>r({...d,sync_billing_address:e})}),(0,g.jsx)(Q,{id:"itsdesk-privacy-phone",checked:d.sync_phone,label:(0,i.__)("Allow phone number sync","deskovi"),description:(0,i.__)("Only when agents need to call the customer.","deskovi"),onChange:e=>r({...d,sync_phone:e})}),(0,g.jsx)(Q,{id:"itsdesk-privacy-diag",checked:d.diagnostics_consent,label:(0,i.__)("Share diagnostics with consent","deskovi"),description:(0,i.__)("Sanitized environment data only — never automatic full log upload.","deskovi"),onChange:e=>r({...d,diagnostics_consent:e})})]}),(0,g.jsxs)("div",{className:"itsdesk-grid-2",children:[(0,g.jsxs)("div",{className:"itsdesk-card",children:[(0,g.jsx)("h3",{children:(0,i.__)("Historical import","deskovi")}),(0,g.jsxs)("div",{className:"itsdesk-field",style:{marginTop:10},children:[(0,g.jsx)("label",{htmlFor:"itsdesk-privacy-import",children:(0,i.__)("Import window","deskovi")}),(0,g.jsxs)("select",{id:"itsdesk-privacy-import",className:"itsdesk-select",value:d.historical_import,onChange:e=>r({...d,historical_import:e.target.value}),children:[(0,g.jsx)("option",{value:"off",children:(0,i.__)("Off (recommended)","deskovi")}),(0,g.jsx)("option",{value:"30",children:(0,i.__)("Last 30 days","deskovi")}),(0,g.jsx)("option",{value:"60",children:(0,i.__)("Last 60 days","deskovi")}),(0,g.jsx)("option",{value:"90",children:(0,i.__)("Last 90 days","deskovi")})]})]})]}),(0,g.jsxs)("div",{className:"itsdesk-card",children:[(0,g.jsx)("h3",{children:(0,i.__)("Retention","deskovi")}),(0,g.jsxs)("div",{className:"itsdesk-field",style:{marginTop:10},children:[(0,g.jsx)("label",{htmlFor:"itsdesk-privacy-retention",children:(0,i.__)("Synced context retention (days)","deskovi")}),(0,g.jsxs)("select",{id:"itsdesk-privacy-retention",className:"itsdesk-select",value:String(d.retention_days),onChange:e=>r({...d,retention_days:parseInt(e.target.value,10)}),children:[(0,g.jsx)("option",{value:"30",children:"30"}),(0,g.jsx)("option",{value:"60",children:"60"}),(0,g.jsx)("option",{value:"90",children:"90"}),(0,g.jsx)("option",{value:"180",children:"180"})]})]})]})]}),(0,g.jsx)("div",{className:"itsdesk-health",children:(0,g.jsxs)("div",{children:[(0,g.jsx)("strong",{children:(0,i.__)("WordPress privacy tools","deskovi")}),(0,g.jsx)("p",{children:(0,i.__)("Deskovi registers a privacy-policy suggestion and ticket export/erase under Tools → Export/Erase Personal Data.","deskovi")})]})}),(0,g.jsxs)("div",{className:"itsdesk-admin__actions",children:[(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:l,onClick:()=>{var e;c(!0),(e=d,a()({path:`${o}/privacy`,method:"POST",data:e})).then(e=>{s(e),r(e),c(!1)}).catch(e=>{n(e?.message||(0,i.__)("Save failed.","deskovi")),c(!1)})},children:l?(0,i.__)("Saving…","deskovi"):(0,i.__)("Save privacy settings","deskovi")}),(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",disabled:!0,children:(0,i.__)("Request remote data deletion","deskovi")})]})]})}window.itsdesk=window.itsdesk||{},window.itsdesk.admin=ge,se.set("pro",{id:"pro",label:"Pro",icon:(0,g.jsx)(G,{size:17}),group:"settings",order:900,render:e=>(0,g.jsx)(ee,{...e})});const Me=["jpg","jpeg","png","gif","webp","pdf","txt"];function Le(e){return"open"===e?"warn":"pending"===e?"info":"resolved"===e||"closed"===e?"ok":"neutral"}function Ie(e){return"urgent"===e?(0,i.__)("Urgent","deskovi"):"high"===e?(0,i.__)("High","deskovi"):"low"===e?(0,i.__)("Low","deskovi"):(0,i.__)("Normal","deskovi")}function $e(e){if(!e)return"—";const s=new Date(e);return Number.isNaN(s.getTime())?e:s.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function De(e){return e?e.charAt(0).toUpperCase()+e.slice(1):e}function Ae({onToast:e}){he();const[s,n]=(0,t.useState)([]),[d,c]=(0,t.useState)(0),[h,j]=(0,t.useState)(1),[b,y]=(0,t.useState)(1),[f,w]=(0,t.useState)(""),[N,C]=(0,t.useState)(""),[S,T]=(0,t.useState)([]),[P,M]=(0,t.useState)([]),[L,I]=(0,t.useState)("all"),[$,A]=(0,t.useState)(""),[O,W]=(0,t.useState)(""),[F,z]=(0,t.useState)(""),[R,B]=(0,t.useState)({}),[U,H]=(0,t.useState)([]),[V,Z]=(0,t.useState)(null),[G,q]=(0,t.useState)(!1),[J,K]=(0,t.useState)(""),[X,Q]=(0,t.useState)([]),[Y,ee]=(0,t.useState)(null),[se,te]=(0,t.useState)(""),[ne,ae]=(0,t.useState)(null),[de,oe]=(0,t.useState)(null),[re,le]=(0,t.useState)(!0),[ce,_e]=(0,t.useState)(!1),[me,ve]=(0,t.useState)(!1),ge=window.itsdeskAdmin?.currentUserId??0,xe=window.itsdeskAdmin?.currentUserName??"",je=window.itsdeskAdmin?.canManageOrders??!1,be=window.itsdeskAdmin?.restRoot??"",[ye,fe]=(0,t.useState)(""),[we,Ne]=(0,t.useState)(""),[Ce,Se]=(0,t.useState)("order"),[Te,Pe]=(0,t.useState)(""),[Ae,Oe]=(0,t.useState)(""),[We,Ee]=(0,t.useState)(!1),[Fe,ze]=(0,t.useState)(null),[Re,Be]=(0,t.useState)(!1),[Ue,He]=(0,t.useState)(""),[Ve,Ze]=(0,t.useState)(""),[Ge,qe]=(0,t.useState)(""),[Je,Ke]=(0,t.useState)(!1),[Xe,Qe]=(0,t.useState)([]),[Ye,es]=(0,t.useState)(!1),ss=(0,t.useRef)(null),[ts,is]=(0,t.useState)([]),[ns,as]=(0,t.useState)([]),ds="mine"===L?String(ge):L,os=(0,t.useMemo)(()=>({search:N,assignee:ds,status:$,priority:O,category:F,x:R}),[N,ds,$,O,F,R]),rs=""!==N||"all"!==ds||""!==$||""!==O||""!==F||Object.keys(R).length>0,ls=(0,t.useCallback)((e,s)=>{B(t=>{const i={...t};return s?i[e]=s:delete i[e],i})},[]),cs=(0,t.useCallback)(()=>{le(!0),k({page:h,per_page:20,...os}).then(e=>{n(e.tickets||[]),c(e.total),y(e.total_pages||1),le(!1)}).catch(s=>{e(r(s),"danger"),le(!1)})},[h,os,e]);(0,t.useEffect)(()=>{cs()},[cs]),(0,t.useEffect)(()=>{Promise.all([a()({path:`${o}/tickets/categories`}),a()({path:`${o}/agents`})]).then(([e,s])=>{T(e.categories||[]),M(s.agents||[]),e.categories?.[0]&&!Ce&&Se(e.categories[0].id)}).catch(s=>e(r(s),"danger"))},[]),(0,t.useEffect)(()=>{l().then(e=>is(e)).catch(s=>e(r(s),"danger"))},[]),(0,t.useEffect)(()=>{const e=setTimeout(()=>C(f.trim()),300);return()=>clearTimeout(e)},[f]),(0,t.useEffect)(()=>{j(1)},[os]),(0,t.useEffect)(()=>{a()({path:`${o}/views`}).then(e=>H(e.views)).catch(()=>H([]))},[]);const hs=()=>{const s=(V??"").trim();s&&function(e,s){return a()({path:`${o}/views`,method:"POST",data:{name:e,filters:s}})}(s,os).then(s=>{H(s.views),Z(null),e((0,i.__)("View saved.","deskovi"))}).catch(s=>e(r(s),"danger"))};(0,t.useEffect)(()=>{as([])},[s]);const ks=s=>{var t;ae(s),ve(!1),_e(!0),ze(null),Ke(!1),qe(""),Promise.all([u(s),(t=s,a()({path:`${o}/tickets/${t}/order`}))]).then(([e,s])=>{oe(e),ze(s.order||null),qe(s.order_id?String(s.order_id):""),_e(!1)}).catch(s=>{e(r(s),"danger"),_e(!1)})};(0,t.useEffect)(()=>{if(!G||!de)return;const e=J.trim()||de.customer_email,s=window.setTimeout(()=>{k({per_page:8,search:e}).then(e=>Q((e.tickets||[]).filter(e=>e.id!==de.id))).catch(()=>Q([]))},250);return()=>window.clearTimeout(s)},[G,J,de]),(0,t.useEffect)(()=>{q(!1),K(""),Q([]),ee(null)},[ne]);const us=()=>{de&&Y&&(_e(!0),function(e,s,t){return a()({path:`${o}/tickets/${e}/split`,method:"POST",data:{message_id:s,subject:t}})}(de.id,Y,se.trim()).then(s=>{e((0,i.__)("Ticket split.","deskovi")),ee(null),cs(),ks(s.new_ticket.id)}).catch(s=>{e(r(s),"danger"),_e(!1)}))},_s=de?{ticket:de,order:Fe,currentUser:{id:ge,name:xe,canManageOrders:je},busy:ce,onToast:e,reload:cs,refreshTicket:()=>ks(de.id),replyBody:Ae,setReplyBody:Oe}:null;return re&&0===s.length?(0,g.jsx)(x,{}):(0,g.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,g.jsxs)("div",{className:"itsdesk-admin__row",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("h2",{children:(0,i.__)("Tickets","deskovi")}),(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Tickets are created, replied to, and stored locally in your WordPress database.","deskovi")})]}),(0,g.jsx)("div",{className:"itsdesk-admin__spacer"}),(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",onClick:cs,disabled:ce,children:(0,i.__)("Refresh","deskovi")}),(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",onClick:()=>{ve(!0),ae(null),oe(null)},children:(0,i.__)("New ticket","deskovi")})]}),(0,g.jsxs)("div",{className:"itsdesk-admin__actions",style:{marginTop:12},children:[(0,g.jsx)("div",{className:"itsdesk-field",style:{flex:1,minWidth:220,margin:0},children:(0,g.jsx)("input",{type:"search",className:"itsdesk-input","aria-label":(0,i.__)("Search tickets","deskovi"),placeholder:(0,i.__)("Search subject, name, or email…","deskovi"),value:f,onChange:e=>w(e.target.value)})}),(0,g.jsx)("a",{className:"itsdesk-btn itsdesk-btn--secondary",href:_(os),target:"_blank",rel:"noreferrer",children:(0,i.__)("Export CSV","deskovi")})]}),(0,g.jsx)("div",{className:"itsdesk-admin__actions",children:[["all",(0,i.__)("All","deskovi")],["unassigned",(0,i.__)("Unassigned","deskovi")],["mine",(0,i.__)("Assigned to me","deskovi")]].map(([e,s])=>(0,g.jsx)("button",{type:"button",className:"itsdesk-btn"+(L===e?" itsdesk-btn--primary":" itsdesk-btn--secondary"),onClick:()=>I(e),children:s},e))}),(0,g.jsxs)("div",{className:"itsdesk-filters",children:[(0,g.jsxs)("select",{className:"itsdesk-select","aria-label":(0,i.__)("Status","deskovi"),value:$,onChange:e=>A(e.target.value),children:[(0,g.jsx)("option",{value:"",children:(0,i.__)("Any status","deskovi")}),(0,g.jsx)("option",{value:"active",children:(0,i.__)("Open or pending","deskovi")}),(0,g.jsx)("option",{value:"open",children:(0,i.__)("Open","deskovi")}),(0,g.jsx)("option",{value:"pending",children:(0,i.__)("Pending","deskovi")}),(0,g.jsx)("option",{value:"resolved",children:(0,i.__)("Resolved","deskovi")}),(0,g.jsx)("option",{value:"closed",children:(0,i.__)("Closed","deskovi")})]}),(0,g.jsxs)("select",{className:"itsdesk-select","aria-label":(0,i.__)("Priority","deskovi"),value:O,onChange:e=>W(e.target.value),children:[(0,g.jsx)("option",{value:"",children:(0,i.__)("Any priority","deskovi")}),(0,g.jsx)("option",{value:"urgent",children:(0,i.__)("Urgent","deskovi")}),(0,g.jsx)("option",{value:"high",children:(0,i.__)("High","deskovi")}),(0,g.jsx)("option",{value:"normal",children:(0,i.__)("Normal","deskovi")}),(0,g.jsx)("option",{value:"low",children:(0,i.__)("Low","deskovi")})]}),(0,g.jsxs)("select",{className:"itsdesk-select","aria-label":(0,i.__)("Category","deskovi"),value:F,onChange:e=>z(e.target.value),children:[(0,g.jsx)("option",{value:"",children:(0,i.__)("Any category","deskovi")}),S.map(e=>(0,g.jsx)("option",{value:e.id,children:e.label},e.id))]}),(0,g.jsx)(pe,{name:"ticket.list.filters",context:{extra:R,setExtra:ls}}),rs&&(0,g.jsx)("button",{type:"button",className:"itsdesk-link",onClick:()=>{w(""),C(""),I("all"),A(""),W(""),z(""),B({})},children:(0,i.__)("Clear filters","deskovi")})]}),(0,g.jsxs)("div",{className:"itsdesk-views",children:[U.map(s=>(0,g.jsxs)("span",{className:"itsdesk-views__chip",children:[(0,g.jsx)("button",{type:"button",onClick:()=>(e=>{const s=e.filters;w(s.search),C(s.search),I("unassigned"===s.assignee?"unassigned":s.assignee===String(ge)?"mine":"all"),A(s.status),W(s.priority),z(s.category),B(s.extra??{})})(s),children:s.name}),(0,g.jsx)("button",{type:"button",className:"itsdesk-views__x","aria-label":(0,i.sprintf)(/* translators: %s: view name */ /* translators: %s: view name */(0,i.__)("Delete the view %s","deskovi"),s.name),onClick:()=>{(function(e){return a()({path:`${o}/views/${e}`,method:"DELETE"})})(s.id).then(e=>H(e.views)).catch(s=>e(r(s),"danger"))},children:"×"})]},s.id)),null===V?(0,g.jsx)("button",{type:"button",className:"itsdesk-link",disabled:!rs,title:rs?void 0:(0,i.__)("Choose a filter first","deskovi"),onClick:()=>Z(""),children:(0,i.__)("Save this view","deskovi")}):(0,g.jsxs)("span",{className:"itsdesk-views__new",children:[(0,g.jsx)("input",{className:"itsdesk-input",type:"text",maxLength:40,autoFocus:!0,placeholder:(0,i.__)('Name, for example "Urgent refunds"',"deskovi"),value:V,onChange:e=>Z(e.target.value),onKeyDown:e=>{"Enter"===e.key&&hs()}}),(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:""===V.trim(),onClick:hs,children:(0,i.__)("Save","deskovi")}),(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--ghost",onClick:()=>Z(null),children:(0,i.__)("Cancel","deskovi")})]})]}),(0,g.jsx)("p",{className:"itsdesk-admin__muted",style:{marginTop:8},children:N?(0,i.sprintf)(/* translators: 1: result count, 2: search query */ /* translators: 1: result count, 2: search query */
     1(()=>{"use strict";const e={n:s=>{const t=s&&s.__esModule?()=>s.default:()=>s;return e.d(t,{a:t}),t},d:(s,t)=>{if(Array.isArray(t))for(var i=0;i<t.length;){var n=t[i++],a=t[i++];e.o(s,n)?0===a&&i++:0===a?Object.defineProperty(s,n,{enumerable:!0,value:t[i++]}):Object.defineProperty(s,n,{enumerable:!0,get:a})}else for(var n in t)e.o(t,n)&&!e.o(s,n)&&Object.defineProperty(s,n,{enumerable:!0,get:t[n]})},o:(e,s)=>Object.hasOwn(e,s),r:e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}};var s={};e.r(s),e.d(s,{IconActivity:()=>$,IconBell:()=>z,IconBolt:()=>V,IconBook:()=>Y,IconCart:()=>D,IconChart:()=>K,IconCheck:()=>I,IconClock:()=>G,IconExternal:()=>O,IconFileGeneric:()=>H,IconFlag:()=>R,IconGear:()=>X,IconLink:()=>S,IconMail:()=>J,IconMark:()=>C,IconOverview:()=>A,IconPaperclip:()=>F,IconPulse:()=>M,IconQueue:()=>W,IconRefund:()=>B,IconShield:()=>P,IconSparkle:()=>Z,IconStar:()=>Q,IconSync:()=>L,IconTicket:()=>E,IconWidget:()=>T});const t=window.wp.element,i=window.wp.i18n,n=window.wp.apiFetch;var a=e.n(n);const d=window.itsdeskAdmin;d?.nonce&&d?.restRoot&&(a().use(a().createNonceMiddleware(d.nonce)),a().use(a().createRootURLMiddleware(d.restRoot)));const o="/itsdesk/v1";function r(e){if(e&&"object"==typeof e){const s=e;return s.message||s.data?.message||"Request failed."}return"Request failed."}function l(e){return a()({path:`${o}/widget`,method:"POST",data:e})}function c(e){return a()({path:`${o}/notifications`,method:"POST",data:e})}function h(e){return a()({path:`${o}/setup`,method:"POST",data:{state:e}})}function k(){return a()({path:`${o}/categories`})}function u(e){return a()({path:`${o}/categories`,method:"POST",data:e})}function _(){return a()({path:`${o}/macros`})}function m(){return a()({path:`${o}/diagnostics`})}function p(e,s){s.search&&e.set("search",s.search),s.assignee&&"all"!==s.assignee&&e.set("assignee",s.assignee),s.status&&e.set("status",s.status),s.priority&&e.set("priority",s.priority),s.category&&e.set("category",s.category),Object.entries(s.x??{}).forEach(([s,t])=>{t&&e.set(`x[${s}]`,t)})}function v(e={}){const s=new URLSearchParams;e.page&&s.set("page",String(e.page)),e.per_page&&s.set("per_page",String(e.per_page)),p(s,e);const t=s.toString();return a()({path:`${o}/tickets${t?`?${t}`:""}`})}function g(e){return a()({path:`${o}/tickets/${e}`})}function x(e={}){const s=new URLSearchParams;p(s,e),s.set("_wpnonce",d?.nonce??"");const t=s.toString();return`${(d?.restRoot??"").replace(/\/$/,"")}${o}/tickets/export${t?`?${t}`:""}`}function j(e,s,t){const i=new FormData;return i.append("file",s),t&&i.append("message_id",t),a()({path:`${o}/tickets/${e}/attachments`,method:"POST",body:i})}function b(e,s){return a()({path:`${o}/tickets/${e}/order`,method:"POST",data:{order_id:s}})}function f(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(0)} KB`:`${(e/1048576).toFixed(1)} MB`}const y=window.ReactJSXRuntime;function w(){return(0,y.jsxs)("div",{className:"itsdesk-skeleton","aria-busy":"true","aria-live":"polite",children:[(0,y.jsx)("div",{className:"itsdesk-skeleton__hero"}),(0,y.jsxs)("div",{className:"itsdesk-skeleton__row",children:[(0,y.jsx)("span",{}),(0,y.jsx)("span",{}),(0,y.jsx)("span",{}),(0,y.jsx)("span",{})]}),(0,y.jsx)("div",{className:"itsdesk-skeleton__block"}),(0,y.jsx)("div",{className:"itsdesk-skeleton__block itsdesk-skeleton__block--short"})]})}function N({message:e,tone:s="ok",onDismiss:n}){return(0,t.useEffect)(()=>{if(!e)return;const s=window.setTimeout(n,3200);return()=>window.clearTimeout(s)},[e,n]),e?(0,y.jsxs)("div",{className:`itsdesk-toast itsdesk-toast--${s}`,role:"danger"===s?"alert":"status",children:[e,(0,y.jsx)("button",{type:"button",className:"itsdesk-toast__close","aria-label":(0,i.__)("Dismiss","deskovi"),onClick:n,children:"×"})]}):null}function C({size:e=22,className:s}){return(0,y.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,y.jsx)("path",{d:"M4 7.5C4 5.567 5.567 4 7.5 4H16.5C18.433 4 20 5.567 20 7.5V13.5C20 15.433 18.433 17 16.5 17H11L7 20V17H7.5C5.567 17 4 15.433 4 13.5V7.5Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"}),(0,y.jsx)("path",{d:"M8 9.5H16M8 12.5H13",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function S({size:e=18,className:s}){return(0,y.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:(0,y.jsx)("path",{d:"M9 12a4 4 0 0 0 4 4h2a4 4 0 0 0 0-8h-.5M15 12a4 4 0 0 0-4-4H9a4 4 0 1 0 0 8h.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})})}function T({size:e=18,className:s}){return(0,y.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,y.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"3",stroke:"currentColor",strokeWidth:"1.75"}),(0,y.jsx)("path",{d:"M8 15h4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),(0,y.jsx)("circle",{cx:"15.5",cy:"9.5",r:"1.5",fill:"currentColor"})]})}function P({size:e=18,className:s}){return(0,y.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,y.jsx)("path",{d:"M12 3L5 6v5c0 4.5 2.9 7.9 7 9 4.1-1.1 7-4.5 7-9V6l-7-3Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"}),(0,y.jsx)("path",{d:"M9.5 12l1.8 1.8L14.8 10",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]})}function M({size:e=18,className:s}){return(0,y.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:(0,y.jsx)("path",{d:"M3 12h3.2l2.1-5.2L12.5 18l2.8-6H21",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})}function $({size:e=18,className:s}){return(0,y.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:(0,y.jsx)("path",{d:"M4 6h16M4 12h10M4 18h13",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})})}function A({size:e=18,className:s}){return(0,y.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,y.jsx)("rect",{x:"3.5",y:"3.5",width:"7",height:"7",rx:"1.5",stroke:"currentColor",strokeWidth:"1.75"}),(0,y.jsx)("rect",{x:"13.5",y:"3.5",width:"7",height:"7",rx:"1.5",stroke:"currentColor",strokeWidth:"1.75"}),(0,y.jsx)("rect",{x:"3.5",y:"13.5",width:"7",height:"7",rx:"1.5",stroke:"currentColor",strokeWidth:"1.75"}),(0,y.jsx)("rect",{x:"13.5",y:"13.5",width:"7",height:"7",rx:"1.5",stroke:"currentColor",strokeWidth:"1.75"})]})}function L({size:e=18,className:s}){return(0,y.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,y.jsx)("path",{d:"M19 8a7 7 0 0 0-12.5-3M5 16a7 7 0 0 0 12.5 3",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),(0,y.jsx)("path",{d:"M5 4v4h4M19 20v-4h-4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]})}function D({size:e=18,className:s}){return(0,y.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,y.jsx)("path",{d:"M3 5h2l2.2 10.2a1.5 1.5 0 0 0 1.5 1.2H17a1.5 1.5 0 0 0 1.45-1.1L20 8H7",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),(0,y.jsx)("circle",{cx:"9.5",cy:"19.5",r:"1.2",fill:"currentColor"}),(0,y.jsx)("circle",{cx:"16.5",cy:"19.5",r:"1.2",fill:"currentColor"})]})}function I({size:e=16,className:s}){return(0,y.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:(0,y.jsx)("path",{d:"M5 12.5l5 5L19 7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function O({size:e=14,className:s}){return(0,y.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,y.jsx)("path",{d:"M14 5h5v5M19 5l-9 9",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),(0,y.jsx)("path",{d:"M10 5H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function W({size:e=18,className:s}){return(0,y.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:(0,y.jsx)("path",{d:"M4 7h16M4 12h16M4 17h10",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})})}function E({size:e=18,className:s}){return(0,y.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,y.jsx)("path",{d:"M4 8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v2a2 2 0 0 0 0 4v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-2a2 2 0 0 0 0-4V8Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"}),(0,y.jsx)("path",{d:"M10 8v8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeDasharray:"2 3"})]})}function F({size:e=18,className:s}){return(0,y.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:(0,y.jsx)("path",{d:"M21 11.5L12.5 20a5.657 5.657 0 0 1-8-8L13 3.5a3.771 3.771 0 0 1 5.334 5.334L9.83 17.34a1.886 1.886 0 0 1-2.667-2.667L15 7",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})}function z({size:e=18,className:s}){return(0,y.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,y.jsx)("path",{d:"M6 10a6 6 0 0 1 12 0v4.5l1.5 3H4.5L6 14.5V10Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"}),(0,y.jsx)("path",{d:"M9.5 20a2.5 2.5 0 0 0 5 0",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}function R({size:e=18,className:s}){return(0,y.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,y.jsx)("path",{d:"M5 3v18",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),(0,y.jsx)("path",{d:"M5 4.5h11.5c1.4 0 2.1 1.7 1.1 2.7L15 9.5l2.6 2.3c1 1 .3 2.7-1.1 2.7H5V4.5Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"})]})}function B({size:e=18,className:s}){return(0,y.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,y.jsx)("path",{d:"M4.5 10a7.5 7.5 0 1 1 1.8 7.4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}),(0,y.jsx)("path",{d:"M4.5 5v5h5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),(0,y.jsx)("path",{d:"M12 8.3v7.4M9.8 10h3.2a1.6 1.6 0 0 1 0 3.2h-2a1.6 1.6 0 0 0 0 3.2h3.3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function H({size:e=16,className:s}){return(0,y.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",children:[(0,y.jsx)("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6Z",stroke:"currentColor",strokeWidth:"1.75",strokeLinejoin:"round"}),(0,y.jsx)("path",{d:"M14 2v6h6M16 13H8M16 17H8M10 9H8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})]})}const U=(e,s)=>({width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":!0}),q={stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round"};function V({size:e=18,className:s}){return(0,y.jsx)("svg",{...U(e,s),children:(0,y.jsx)("path",{d:"M13 3 5 13.5h6L10 21l8-10.5h-6L13 3Z",...q})})}function G({size:e=18,className:s}){return(0,y.jsxs)("svg",{...U(e,s),children:[(0,y.jsx)("circle",{cx:"12",cy:"12",r:"8.5",...q}),(0,y.jsx)("path",{d:"M12 7.5V12l3 2",...q})]})}function Z({size:e=18,className:s}){return(0,y.jsxs)("svg",{...U(e,s),children:[(0,y.jsx)("path",{d:"M11 4c.6 3.6 2.4 5.4 6 6-3.6.6-5.4 2.4-6 6-.6-3.6-2.4-5.4-6-6 3.6-.6 5.4-2.4 6-6Z",...q}),(0,y.jsx)("path",{d:"M18 15.5c.3 1.6 1 2.3 2.5 2.5-1.5.2-2.2.9-2.5 2.5-.3-1.6-1-2.3-2.5-2.5 1.5-.2 2.2-.9 2.5-2.5Z",...q})]})}function Y({size:e=18,className:s}){return(0,y.jsxs)("svg",{...U(e,s),children:[(0,y.jsx)("path",{d:"M5 5.5A1.5 1.5 0 0 1 6.5 4H19v13H6.5A1.5 1.5 0 0 0 5 18.5v-13Z",...q}),(0,y.jsx)("path",{d:"M5 18.5A1.5 1.5 0 0 0 6.5 20H19v-3M9 8h6",...q})]})}function K({size:e=18,className:s}){return(0,y.jsxs)("svg",{...U(e,s),children:[(0,y.jsx)("path",{d:"M4 20V4M4 20h16",...q}),(0,y.jsx)("path",{d:"M8 16v-4M12 16V8M16 16v-6",...q})]})}function J({size:e=18,className:s}){return(0,y.jsxs)("svg",{...U(e,s),children:[(0,y.jsx)("rect",{x:"3.5",y:"5.5",width:"17",height:"13",rx:"2",...q}),(0,y.jsx)("path",{d:"m4.5 7.5 7.5 6 7.5-6",...q})]})}function Q({size:e=18,className:s}){return(0,y.jsx)("svg",{...U(e,s),children:(0,y.jsx)("path",{d:"m12 4 2.4 5 5.4.7-4 3.7 1 5.4L12 16.2 7.2 18.8l1-5.4-4-3.7 5.4-.7L12 4Z",...q})})}function X({size:e=18,className:s}){return(0,y.jsxs)("svg",{...U(e,s),children:[(0,y.jsx)("circle",{cx:"12",cy:"12",r:"3",...q}),(0,y.jsx)("path",{d:"M12 3.5v2.2M12 18.3v2.2M3.5 12h2.2M18.3 12h2.2M6 6l1.6 1.6M16.4 16.4 18 18M18 6l-1.6 1.6M7.6 16.4 6 18",...q})]})}function ee(){const[e,s]=(0,t.useState)(null),[n,d]=(0,t.useState)(null),[r,l]=(0,t.useState)(!0);if((0,t.useEffect)(()=>{a()({path:`${o}/activity`}).then(e=>{s(e),l(!1)}).catch(e=>{d(e?.message||(0,i.__)("Failed to load activity.","deskovi")),l(!1)})},[]),r)return(0,y.jsx)(w,{});if(n||!e)return(0,y.jsx)("div",{className:"itsdesk-admin__error",children:n||(0,i.__)("No activity data.","deskovi")});const c=e=>{const s=e.toLowerCase();return"ok"===s||"success"===s?"ok":"fail"===s||"failed"===s?"danger":"neutral"};return(0,y.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,y.jsx)("div",{className:"itsdesk-admin__row",children:(0,y.jsxs)("div",{children:[(0,y.jsx)("h2",{children:(0,i.__)("Activity","deskovi")}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("A running log of ticket and account events on this site.","deskovi")})]})}),(0,y.jsxs)("table",{className:"itsdesk-table",children:[(0,y.jsx)("thead",{children:(0,y.jsxs)("tr",{children:[(0,y.jsx)("th",{children:(0,i.__)("When","deskovi")}),(0,y.jsx)("th",{children:(0,i.__)("Type","deskovi")}),(0,y.jsx)("th",{children:(0,i.__)("Event","deskovi")}),(0,y.jsx)("th",{children:(0,i.__)("Result","deskovi")})]})}),(0,y.jsx)("tbody",{children:e.activity.map((e,s)=>(0,y.jsxs)("tr",{children:[(0,y.jsx)("td",{children:e.when}),(0,y.jsx)("td",{className:"itsdesk-table__area",children:e.type}),(0,y.jsx)("td",{children:e.event}),(0,y.jsx)("td",{children:(0,y.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--"+c(e.result),children:[(0,y.jsx)("span",{className:"itsdesk-badge__dot"}),e.result]})})]},s))})]})]})}function se({label:e,value:s,hint:t,icon:i,tone:n="default",onClick:a}){const d=`itsdesk-metric itsdesk-metric--${n}${a?" is-clickable":""}`,o=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("div",{className:"itsdesk-metric__top",children:[(0,y.jsx)("span",{className:"itsdesk-metric__label",children:e}),i&&(0,y.jsx)("span",{className:"itsdesk-metric__icon",children:i})]}),(0,y.jsx)("div",{className:"itsdesk-metric__value",children:s}),t&&(0,y.jsx)("div",{className:"itsdesk-metric__hint",children:t})]});return a?(0,y.jsx)("button",{type:"button",className:d,onClick:a,children:o}):(0,y.jsx)("div",{className:d,children:o})}function te({onToast:e}){const[s,n]=(0,t.useState)(null),[a,d]=(0,t.useState)(null),[o,r]=(0,t.useState)(!0);if((0,t.useEffect)(()=>{m().then(e=>{n(e),r(!1)}).catch(e=>{d(e?.message||(0,i.__)("Failed to load diagnostics.","deskovi")),r(!1)})},[]),o&&!s)return(0,y.jsx)(w,{});if(a&&!s)return(0,y.jsx)("div",{className:"itsdesk-admin__error",children:a});if(!s)return null;const l=e=>"pass"===e?(0,i.__)("Pass","deskovi"):"ok"===e?(0,i.__)("OK","deskovi"):"fail"===e?(0,i.__)("Fail","deskovi"):"info"===e?(0,i.__)("Info","deskovi"):e;return(0,y.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,y.jsxs)("div",{className:"itsdesk-admin__row",children:[(0,y.jsxs)("div",{children:[(0,y.jsx)("h2",{children:(0,i.__)("Diagnostics","deskovi")}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Support-safe environment snapshot. Share intentionally — never automatic full log upload.","deskovi")})]}),(0,y.jsx)("div",{className:"itsdesk-admin__spacer"}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",onClick:()=>{s&&navigator.clipboard.writeText(JSON.stringify(s,null,2)).then(()=>e((0,i.__)("Report copied to clipboard.","deskovi")),()=>e((0,i.__)("Could not copy report.","deskovi"),"danger"))},children:(0,i.__)("Copy report","deskovi")}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",onClick:()=>{r(!0),d(null),m().then(s=>{n(s),r(!1),e((0,i.__)("Diagnostics refreshed.","deskovi"))}).catch(e=>{d(e?.message||(0,i.__)("Failed to load diagnostics.","deskovi")),r(!1)})},children:(0,i.__)("Run health check","deskovi")})]}),(0,y.jsxs)("div",{className:"itsdesk-metrics",children:[(0,y.jsx)(se,{label:"WordPress",value:s.wordpress}),(0,y.jsx)(se,{label:"WooCommerce",value:s.woocommerce||"—"}),(0,y.jsx)(se,{label:"PHP",value:s.php}),(0,y.jsx)(se,{label:"Deskovi",value:s.plugin})]}),(0,y.jsxs)("table",{className:"itsdesk-table",children:[(0,y.jsx)("thead",{children:(0,y.jsxs)("tr",{children:[(0,y.jsx)("th",{children:(0,i.__)("Check","deskovi")}),(0,y.jsx)("th",{children:(0,i.__)("Value","deskovi")}),(0,y.jsx)("th",{children:(0,i.__)("Status","deskovi")})]})}),(0,y.jsxs)("tbody",{children:[s.checks.map(e=>{return(0,y.jsxs)("tr",{children:[(0,y.jsx)("td",{className:"itsdesk-table__area",children:e.name}),(0,y.jsx)("td",{children:e.value}),(0,y.jsx)("td",{children:(0,y.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--"+(s=e.status,"pass"===s||"ok"===s?"ok":"fail"===s?"danger":"info"),children:[(0,y.jsx)("span",{className:"itsdesk-badge__dot"}),l(e.status)]})})]},e.name);var s}),(0,y.jsxs)("tr",{children:[(0,y.jsx)("td",{className:"itsdesk-table__area",children:(0,i.__)("Active theme","deskovi")}),(0,y.jsx)("td",{children:s.theme}),(0,y.jsx)("td",{children:(0,y.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--info",children:[(0,y.jsx)("span",{className:"itsdesk-badge__dot"}),(0,i.__)("Info","deskovi")]})})]})]})]}),(0,y.jsx)("h3",{className:"itsdesk-admin__section",children:(0,i.__)("Sanitized recent errors","deskovi")}),0===s.errors.length?(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("No diagnostic errors recorded.","deskovi")}):(0,y.jsxs)("table",{className:"itsdesk-table",children:[(0,y.jsx)("thead",{children:(0,y.jsxs)("tr",{children:[(0,y.jsx)("th",{children:(0,i.__)("Time","deskovi")}),(0,y.jsx)("th",{children:(0,i.__)("Code","deskovi")}),(0,y.jsx)("th",{children:(0,i.__)("Message","deskovi")})]})}),(0,y.jsx)("tbody",{children:s.errors.map((e,s)=>(0,y.jsxs)("tr",{children:[(0,y.jsx)("td",{children:e.time||"—"}),(0,y.jsx)("td",{children:e.code||"—"}),(0,y.jsx)("td",{children:e.message||"—"})]},s))})]})]})}function ie({id:e,checked:s,disabled:t,onChange:i,label:n,description:a}){return(0,y.jsxs)("div",{className:"itsdesk-toggle"+(t?" is-disabled":""),children:[(0,y.jsxs)("div",{className:"itsdesk-toggle__copy",children:[(0,y.jsx)("label",{htmlFor:e,className:"itsdesk-toggle__label",children:n}),a&&(0,y.jsx)("p",{className:"itsdesk-toggle__desc",children:a})]}),(0,y.jsx)("button",{id:e,type:"button",role:"switch","aria-checked":s,disabled:t,className:"itsdesk-switch"+(s?" is-on":""),onClick:()=>i(!s),children:(0,y.jsx)("span",{className:"itsdesk-switch__thumb"})})]})}function ne(){return[{id:"pro-email",icon:"IconMail",title:(0,i.__)("Email channel","deskovi"),description:(0,i.__)("Customers write to your support address and the mail becomes a ticket. Your replies go back as email and thread with the customer’s own mail.","deskovi"),bullets:[(0,i.__)("Gmail / Google Workspace, Microsoft 365 / Outlook or any IMAP mailbox, with your own app, no relay server","deskovi"),(0,i.__)("Replies are matched to the right ticket, quoted history and signatures are removed, attachments are saved","deskovi"),(0,i.__)("Agents can answer a notification by replying to the email","deskovi")]},{id:"pro-automation",icon:"IconBolt",title:(0,i.__)("Automation","deskovi"),description:(0,i.__)("Rules that assign, prioritise and annotate tickets for you when something happens.","deskovi"),bullets:[(0,i.__)("Assign to one agent, in turn, or to whoever has the fewest open tickets","deskovi"),(0,i.__)("Practice mode shows what a rule would do before it changes anything","deskovi"),(0,i.__)("Rules never email customers, refund or delete anything","deskovi")]},{id:"pro-tags",icon:"IconQueue",title:(0,i.__)("Tags","deskovi"),description:(0,i.__)("Put your own labels on tickets and find them again.","deskovi"),bullets:[(0,i.__)("Labels such as “vip” or “damaged-item”, shown in the ticket list","deskovi"),(0,i.__)("Filter the list by tag, save it as a view, and let automation rules add tags","deskovi")]},{id:"pro-fields",icon:"IconFileGeneric",title:(0,i.__)("Custom fields","deskovi"),description:(0,i.__)("Add your own details to tickets, such as the return reason or the carrier.","deskovi"),bullets:[(0,i.__)("Text, number, dropdown, checkbox and date fields that only your team sees","deskovi"),(0,i.__)("They move with a merge and are deleted with the ticket","deskovi")]},{id:"pro-roles",icon:"IconShield",title:(0,i.__)("Roles & permissions","deskovi"),description:(0,i.__)("Decide which role may refund, see reports, set up rules or manage mailboxes.","deskovi"),bullets:[(0,i.__)("A Support Manager role next to the Support Agent role","deskovi"),(0,i.__)("One table that shows what every role may do","deskovi")]},{id:"pro-sla",icon:"IconClock",title:(0,i.__)("Response times (SLA)","deskovi"),description:(0,i.__)("First-reply and resolution targets per priority, counted in your working hours.","deskovi"),bullets:[(0,i.__)("Timers on every ticket and a “Needs attention” queue","deskovi"),(0,i.__)("The clock can pause while you wait for the customer","deskovi"),(0,i.__)("One-time warning and breach emails to your team","deskovi")]},{id:"pro-team",icon:"IconTicket",title:(0,i.__)("Team tools","deskovi"),description:(0,i.__)("Work on tickets together without stepping on each other.","deskovi"),bullets:[(0,i.__)("A notice when a colleague has the same ticket open or is writing a reply","deskovi"),(0,i.__)("@mentions in internal notes, reply drafts, and handover with a note","deskovi"),(0,i.__)("Star and watch tickets, log the time you spend, and work from the keyboard","deskovi")]},{id:"pro-orders",icon:"IconCart",title:(0,i.__)("Order tools","deskovi"),description:(0,i.__)("Do more with the order without leaving the ticket.","deskovi"),bullets:[(0,i.__)("Refund chosen items or an amount, change the status, cancel, add a note or fix the shipping address","deskovi"),(0,i.__)("A customer card with lifetime value, orders and earlier tickets","deskovi"),(0,i.__)("Send a replacement order or a one-time coupon","deskovi")]},{id:"pro-import",icon:"IconFileGeneric",title:(0,i.__)("Import tickets","deskovi"),description:(0,i.__)("Move your history from another helpdesk without emailing a single customer.","deskovi"),bullets:[(0,i.__)("Bring in a CSV export from Help Scout, Zendesk, Freshdesk and others","deskovi"),(0,i.__)("Check first, keep the original dates and tags, and never import the same ticket twice","deskovi")]},{id:"pro-connections",icon:"IconLink",title:(0,i.__)("Connections and API","deskovi"),description:(0,i.__)("Tell the other tools you use what happens in your helpdesk.","deskovi"),bullets:[(0,i.__)("Signed webhooks for Zapier, Make or your CRM, and messages to Slack, Discord, Teams or Telegram","deskovi"),(0,i.__)("A REST API with read and write keys, a customer lookup for your CRM, and a hook for your own code","deskovi")]},{id:"pro-selfservice",icon:"IconBook",title:(0,i.__)("Self-service","deskovi"),description:(0,i.__)("Before a customer sends a ticket, the chat widget shows where their order is and pages of your store that may already answer the question.","deskovi"),bullets:[(0,i.__)("Order status and tracking for the customer’s own order","deskovi"),(0,i.__)("Suggested public pages, then “Did this answer your question?”","deskovi")]},{id:"pro-ai",icon:"IconSparkle",title:(0,i.__)("AI assistant","deskovi"),description:(0,i.__)("Order-aware reply drafts, summaries, translation and suggestions inside the ticket, with your own OpenAI or Anthropic key.","deskovi"),bullets:[(0,i.__)("Customer details are masked before anything leaves your site","deskovi"),(0,i.__)("Drafts only: nothing is sent or changed unless an agent does it","deskovi")]},{id:"pro-reports",icon:"IconChart",title:(0,i.__)("Reports and satisfaction","deskovi"),description:(0,i.__)("How fast you answer, what is waiting, who is busy and how customers feel, plus store views such as tickets per product.","deskovi"),bullets:[(0,i.__)("Optional one-click satisfaction survey when a ticket is resolved","deskovi"),(0,i.__)("Weekly or monthly summary email and optional deletion of old tickets","deskovi")]}]}function ae({ctx:e}){const t=String(e.config.proUrl??"");return(0,y.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,y.jsxs)("div",{className:"itsdesk-admin__row",children:[(0,y.jsxs)("div",{children:[(0,y.jsx)("h2",{className:"itsdesk-page-title",children:(0,i.__)("Deskovi Pro","deskovi")}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("A separate add-on for stores with more tickets to handle. It works on top of this plugin and keeps everything on your own site.","deskovi")})]}),(0,y.jsx)("div",{className:"itsdesk-admin__spacer"}),t&&(0,y.jsx)("a",{className:"itsdesk-btn itsdesk-btn--primary",href:t,target:"_blank",rel:"noopener noreferrer",children:(0,i.__)("Learn more","deskovi")})]}),(0,y.jsx)("div",{className:"itsdesk-features",children:ne().map(e=>{const t=s[e.icon];return(0,y.jsxs)("div",{className:"itsdesk-feature is-locked",children:[(0,y.jsx)("div",{className:"itsdesk-feature__icon",children:(0,y.jsx)(t,{size:16})}),(0,y.jsxs)("strong",{children:[e.title,(0,y.jsx)("span",{className:"itsdesk-pro-tag",children:(0,i.__)("Pro","deskovi")})]}),(0,y.jsx)("p",{children:e.description}),(0,y.jsx)("ul",{className:"itsdesk-feature__list",children:e.bullets.map(e=>(0,y.jsx)("li",{children:e},e))})]},e.id)})}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Everything in Deskovi (free) keeps working as it is. Installing Deskovi Pro turns these features on and replaces this page with their settings.","deskovi")})]})}const de=new Map,oe=new Map,re=new Map,le=new Map,ce=new Map,he=new Set;let ke=0;function ue(){ke++,he.forEach(e=>e())}function _e(e){return he.add(e),()=>{he.delete(e)}}function me(){return ke}function pe(){return(0,t.useSyncExternalStore)(_e,me)}function ve(e,s){return(e.order??100)-(s.order??100)||e.id.localeCompare(s.id)}const ge={apiVersion:1,config:window.itsdeskAdmin??{},api:{get:function(e){return a()({path:e})},post:function(e,s){return a()({path:e,method:"POST",data:s})},del:function(e){return a()({path:e,method:"DELETE"})},errorMessage:r},components:{Toggle:ie,StatusBadge:function({tone:e="neutral",pulse:s=!1,children:t}){return(0,y.jsxs)("span",{className:`itsdesk-badge itsdesk-badge--${e}`,children:[(0,y.jsx)("span",{className:"itsdesk-badge__dot"+(s?" is-pulse":"")}),t]})},MetricCard:se,SkeletonPanel:w,Icons:s}};function xe(e){return de.get(e)}class je extends t.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e){console.error(`Deskovi extension "${this.props.label}" failed to render.`,e)}render(){return this.state.failed?null:this.props.children}}function be({id:e,onToast:s}){pe();const t=xe(e);return t?(0,y.jsx)(je,{label:e,children:t.render({onToast:s,ctx:ge})}):null}function fe({name:e,context:s}){pe();const i=function(e){return Array.from(oe.get(e)?.values()??[]).sort((e,s)=>ve(e,s))}(e);if(0===i.length)return null;const n={...s,ctx:ge};return(0,y.jsx)(y.Fragment,{children:i.map(s=>(0,y.jsx)(t.Fragment,{children:(0,y.jsx)(je,{label:`${e}:${s.id}`,children:s.render(n)})},s.id))})}const ye={apiVersion:1,ctx:ge,registerScreen(e){de.set(e.id,e),ue()},registerSlot(e,s){const t=oe.get(e)??new Map;t.set(s.id,s),oe.set(e,t),ue()},registerBulkAction(e){re.set(e.id,e),ue()},registerDocsFeature(e){le.set(e.id,e),ue()},registerDocsSection(e){ce.set(e.id,e),ue()}};function we(e){window.location.hash="#/"+e}function Ne(){const e=e=>(0,y.jsx)(e,{size:16});return[{id:"tickets",icon:e(E),title:(0,i.__)("Support tickets","deskovi"),description:(0,i.__)("Customers open tickets, logged in or as a verified guest. Every ticket has a conversation, a status (Open, Pending, Resolved, Closed) and optional attachments.","deskovi"),screen:"tickets"},{id:"orders",icon:e(D),title:(0,i.__)("Order-aware support","deskovi"),description:(0,i.__)("Link a ticket to a WooCommerce order and see its items, total, shipping, status and timeline beside the conversation.","deskovi")},{id:"refunds",icon:e(B),title:(0,i.__)("Refunds from a ticket","deskovi"),description:(0,i.__)("Issue a full or partial refund, or resend the order invoice email, without opening the order.","deskovi")},{id:"filters",icon:e(W),title:(0,i.__)("Filters and saved views","deskovi"),description:(0,i.__)("Narrow the ticket list by status, priority, category, assignee or search, and save a combination as a view you can open with one click.","deskovi"),screen:"tickets"},{id:"merge",icon:e(S),title:(0,i.__)("Merge duplicate tickets","deskovi"),description:(0,i.__)("When a customer writes twice about the same thing, merge one ticket into the other: every message and file moves, and the conversation stays in one place.","deskovi"),screen:"tickets"},{id:"priority",icon:e(R),title:(0,i.__)("Priority and assignment","deskovi"),description:(0,i.__)("Mark tickets Low, Normal, High or Urgent, hand them to an agent, and filter by Unassigned or Assigned to me.","deskovi")},{id:"notes",icon:e(W),title:(0,i.__)("Internal notes","deskovi"),description:(0,i.__)("Leave a note only your team can see. It is never shown to the customer and its attachments stay private too.","deskovi")},{id:"macros",icon:e(W),title:(0,i.__)("Canned replies","deskovi"),description:(0,i.__)("Save reusable answers with placeholders such as {customer_name} and {order_id}, and insert one with a click.","deskovi"),screen:"macros"},{id:"help-center",icon:e(Y),title:(0,i.__)("Help center","deskovi"),description:(0,i.__)("Write help articles in the WordPress editor, group them by topic and publish a help page with a search box. Matching articles also appear while a customer writes a new ticket.","deskovi"),screen:"help"},{id:"attachments",icon:e(F),title:(0,i.__)("Attachments","deskovi"),description:(0,i.__)("Customers and agents can attach JPG, PNG, GIF, WebP, PDF and TXT files, up to 5 MB each. Files are served only to people who may see the ticket.","deskovi")},{id:"bulk",icon:e(I),title:(0,i.__)("Bulk actions and CSV export","deskovi"),description:(0,i.__)("Change the status of, or delete, many tickets at once. Export the list you are looking at to a spreadsheet.","deskovi")},{id:"notifications",icon:e(z),title:(0,i.__)("Email notifications","deskovi"),description:(0,i.__)("Switch on or off the emails for a new ticket, a customer reply, an agent reply and an assignment. They are sent by WordPress itself.","deskovi"),screen:"notifications"},{id:"widget",icon:e(T),title:(0,i.__)("Storefront chat widget","deskovi"),description:(0,i.__)("A small launcher on your store. It loads only after it is clicked and never on the cart or checkout. Visitors who are not logged in confirm with a code sent to their email.","deskovi"),screen:"widget"},{id:"overview",icon:e(A),title:(0,i.__)("Overview","deskovi"),description:(0,i.__)("One screen with what is open, pending and unassigned, how long the oldest ticket has been waiting, new tickets per day and the latest tickets.","deskovi"),screen:"overview"},{id:"privacy",icon:e(P),title:(0,i.__)("Privacy by design","deskovi"),description:(0,i.__)("Everything stays in your WordPress database. Choose what order details agents see, and use WordPress’s own export and erase tools for personal data.","deskovi"),screen:"privacy"},{id:"diagnostics",icon:e(M),title:(0,i.__)("Diagnostics and activity log","deskovi"),description:(0,i.__)("Health checks for your setup and a log of what Deskovi has done, so a problem is easy to explain and fix.","deskovi"),screen:"diagnostics"},{id:"addons",icon:e(S),title:(0,i.__)("Built for add-ons","deskovi"),description:(0,i.__)("Other plugins can add screens, buttons and panels through a documented extension API, without changing Deskovi.","deskovi")}]}function Ce(e){return{id:e.id,icon:e.icon,title:e.title,description:e.description,screen:e.screen}}function Se(){pe();const[e,n]=(0,t.useState)("features"),a=Array.from(le.values()).sort((e,s)=>ve(e,s)),d=Array.from(ce.values()).sort((e,s)=>ve(e,s)),o=a.filter(e=>"pro"===e.plan),r=d.filter(e=>"pro"===e.plan),l=o.length>0||r.length>0,c=[...Ne(),...a.filter(e=>"pro"!==e.plan).map(Ce)],h=l?o.map(Ce):ne().map(e=>{const t=s[e.icon];return{id:e.id,icon:(0,y.jsx)(t,{size:16}),title:e.title,description:e.description,locked:!0}}),k=[{id:"find-deskovi",title:(0,i.__)("Finding your way around","deskovi"),intro:(0,i.__)("Open “Deskovi” in the WordPress admin menu. The menu on the left of the Deskovi screen is grouped: Work (Tickets, Canned Replies, Help center), Insights (Activity, and Reports with Pro), Automate (Pro), Channels (Widget, and Mailboxes with Pro) and Settings (Notifications, Data & Privacy, Diagnostics, Docs & Features). Overview is the first item.","deskovi")},{id:"overview",title:(0,i.__)("Reading the Overview","deskovi"),intro:(0,i.__)("The four numbers at the top are the tickets that need you. Open and Pending count the tickets in those statuses. Unassigned counts the open and pending ones that have no agent, and turns amber when there are any. “Oldest waiting” is how long the longest-waiting ticket has been open. The bars show how many tickets arrived on each of the last 7 days (UTC).","deskovi")},{id:"how-customers-open-tickets",title:(0,i.__)("How customers open a ticket","deskovi"),intro:(0,i.__)("Customers use the chat widget on your store. If they are logged in they fill in a short form (subject, category, message, an optional order). If they are not, they enter their email and the order number and confirm with a one-time code sent to that email, so no account is needed.","deskovi")},{id:"reply-to-a-ticket",title:(0,i.__)("Replying to a ticket","deskovi"),intro:(0,i.__)("Open Deskovi → Tickets and click a ticket. The conversation is on the right.","deskovi"),steps:[(0,i.__)("Write your answer in the reply box. Insert a canned reply from the menu above it if you have one.","deskovi"),(0,i.__)("Tick “Internal note (not visible to customer)” for a message only your team should see.","deskovi"),(0,i.__)("Click “Send reply”. The customer is emailed if the “Agent reply” notification is on. When an agent replies to an open ticket it moves to Pending; when a customer replies to a resolved ticket it opens again.","deskovi")]},{id:"help-articles",title:(0,i.__)("Help articles and the help center","deskovi"),intro:(0,i.__)("Help articles are answers to common questions that customers can read on your site at any time. They are ordinary WordPress content: anyone who can write posts can write them, and they are kept when Deskovi is removed.","deskovi"),steps:[(0,i.__)("Open Deskovi → Help center and click “Create the help center page”, or choose a page of your own that holds the “Deskovi help center” block or the [deskovi_help] shortcode.","deskovi"),(0,i.__)("Click “Write an article”. Give it a title, write the answer and pick one or more topics in the sidebar. An excerpt, if you write one, is used as the summary in search results.","deskovi"),(0,i.__)("The help page lists every topic with its first five articles, then the articles without a topic, each list in alphabetical order.","deskovi"),(0,i.__)("Customers can search titles and text. Put the “Deskovi help search” block anywhere else on your site, for example on the shop or contact page; its results open on the help page.","deskovi"),(0,i.__)("While a customer writes a new ticket, up to three articles that match the subject (or the start of the message) appear under it and open in a new tab, so the form is not lost. Switch this off under Widget → Help articles.","deskovi"),(0,i.__)("Each article shows a way back to its topic, up to three related articles and a “Contact support” link, which leads to the Support tab in My Account unless you enter another address.","deskovi"),(0,i.__)("Articles live at /help-center/article-name/. A developer can change that with the itsdesk_help_article_base filter (then save Settings → Permalinks once).","deskovi")]},{id:"filters-views",title:(0,i.__)("Filters and saved views","deskovi"),intro:(0,i.__)("Above the ticket list, choose a status (including “Open or pending”, which is what still needs work), a priority and a category, use the Unassigned and Assigned to me buttons, or search by subject, name or email. They combine, and the list, the count and Export CSV all follow them.","deskovi"),steps:[(0,i.__)("Set the filters you use often, for example status “Open or pending” and priority “Urgent”.","deskovi"),(0,i.__)("Click “Save this view”, give it a name and press Enter. It appears as a button above the list.","deskovi"),(0,i.__)("Click a view to apply it again. The × on a view deletes it. Views belong to you: other agents never see or change them, and each agent can keep up to 20.","deskovi"),(0,i.__)("Add-ons can add their own filters beside the built-in ones (Deskovi Pro adds a tag filter).","deskovi")]},{id:"merge-tickets",title:(0,i.__)("Merging duplicate tickets","deskovi"),intro:(0,i.__)("Open the ticket that should go away, click “Merge into another ticket…” under the status buttons, find the ticket it belongs to (the customer’s other tickets are listed first, or search by subject, name or email) and click “Merge into this”. Deskovi asks you to confirm because it cannot be undone.","deskovi"),steps:[(0,i.__)("All messages (including internal notes) and attachments move to the ticket you chose, in the order they were written. The merged ticket is deleted.","deskovi"),(0,i.__)("The ticket that stays keeps its customer and subject. It takes the higher priority, gets the merged ticket’s agent if it had none, and is opened again if it was resolved or closed while the merged ticket was still active.","deskovi"),(0,i.__)("An internal note on it records which ticket was merged, when and by whom. Nobody is emailed.","deskovi"),(0,i.__)("Merging tickets of two different customers is allowed, so check the email address before you confirm.","deskovi")]},{id:"status-priority",title:(0,i.__)("Status and priority","deskovi"),intro:(0,i.__)("Use the four buttons under the ticket to set Open, Pending, Resolved or Closed. Pending means you are waiting for the customer. Use the Priority menu (Low, Normal, High, Urgent) to show what needs attention first. Both are saved at once.","deskovi")},{id:"assign-tickets",title:(0,i.__)("Assigning tickets","deskovi"),intro:(0,i.__)("Pick an agent in “Assigned to”, or leave it on Unassigned for anyone to take. Above the ticket list, “Unassigned” and “Assigned to me” filter the list. The assigned agent is the one emailed about customer replies. Agents are people who may manage Deskovi (administrators and shop managers by default).","deskovi")},{id:"link-order",title:(0,i.__)("Linking a ticket to an order","deskovi"),intro:(0,i.__)("If the customer chose an order it is linked already. Otherwise type a WooCommerce order number into “Order ID” and click “Link order”. The ticket then shows the order’s items, total, payment and shipping method and timeline. Billing address and phone only appear if you allowed them under Data & Privacy.","deskovi")},{id:"refunds",title:(0,i.__)("Issuing a refund or resending an invoice","deskovi"),intro:(0,i.__)("You need the permission to edit WooCommerce orders. In the linked order card:","deskovi"),steps:[(0,i.__)("Leave the amount empty to refund what is left of the order, or type a smaller amount for a partial refund.","deskovi"),(0,i.__)("Add a short reason if you like; it is saved with the refund.","deskovi"),(0,i.__)("Click “Issue refund”. If the payment gateway can refund, the money is returned there; if not, the refund is recorded in WooCommerce and you return the money yourself. A note in the ticket says which happened.","deskovi"),(0,i.__)("To send the customer their order email again instead, click “Resend invoice”. No money moves.","deskovi")]},{id:"attachments",title:(0,i.__)("Attachments","deskovi"),intro:(0,i.__)("Click “Attach” under the reply box. Allowed files: JPG, PNG, GIF, WebP, PDF and TXT, up to 5 MB each. Files are checked on upload and are downloadable only by the customer who owns the ticket and by agents. Attachments on internal notes are never visible to the customer.","deskovi")},{id:"canned-replies",title:(0,i.__)("Canned replies","deskovi"),intro:(0,i.__)("Answers you give again and again.","deskovi"),steps:[(0,i.__)("Go to Deskovi → Canned Replies and click “Add canned reply”.","deskovi"),(0,i.__)("Write a title and the message. Placeholders such as {customer_name} and {order_id} are filled in for the ticket you use it on.","deskovi"),(0,i.__)("In a ticket, choose it from “Insert canned reply”. It is added to your draft, so you can still edit it before sending.","deskovi")]},{id:"bulk-export",title:(0,i.__)("Bulk actions and CSV export","deskovi"),intro:(0,i.__)("Tick the box beside several tickets to change their status or delete them together; deleting also removes their messages and files and cannot be undone. To export, search or filter the list, then click “Export CSV”: the file contains exactly the tickets you are looking at.","deskovi")},{id:"notifications",title:(0,i.__)("Email notifications","deskovi"),intro:(0,i.__)("Deskovi → Notifications has four switches: a new ticket (emailed to every agent), a customer reply (to the assigned agent, or all agents if nobody is assigned), an agent reply (to the customer) and an assignment (to the agent). Emails are sent by WordPress, so they need a working mail setup on your server; a mail plugin with SMTP makes delivery more reliable.","deskovi")},{id:"widget-setup",title:(0,i.__)("Setting up the chat widget","deskovi"),intro:(0,i.__)("Deskovi → Widget. Turn on “Enable support widget”, choose the corner (placement), a light or dark theme, and an optional text for the button; leave the text empty for an icon only. The widget does not load on the cart or checkout, and when it is off nothing at all is added to your store. It uses your store’s own font.","deskovi")},{id:"privacy-data",title:(0,i.__)("Privacy and your data","deskovi"),intro:(0,i.__)("Tickets, messages and attachments live in your own WordPress database; Deskovi sends nothing to an outside service. Under Data & Privacy you choose whether agents may see the billing address and phone number, whether to share diagnostics (only with your consent), the historical import window (off by default) and how long synced order context is kept. Deskovi adds a privacy-policy suggestion and works with Tools → Export / Erase Personal Data: an erase request deletes that customer’s tickets, messages and files.","deskovi")},{id:"diagnostics-activity",title:(0,i.__)("Diagnostics and the activity log","deskovi"),intro:(0,i.__)("Diagnostics lists the versions of WordPress, WooCommerce and PHP and runs checks on your setup; copy its report when you ask for help. Activity is a short log of what Deskovi did (replies, assignments, refunds, errors). Use these two before contacting support.","deskovi")},{id:"permissions",title:(0,i.__)("Who can use Deskovi","deskovi"),intro:(0,i.__)("Administrators and shop managers get the “manage_itsdesk” permission when the plugin is activated, and they can use every Deskovi screen. Refunds also need the WooCommerce permission to edit orders. To give another role access, add the manage_itsdesk capability to it with a role editor plugin. Customers never see the admin screens.","deskovi")},{id:"addons",title:(0,i.__)("For developers: add-ons","deskovi"),intro:(0,i.__)("Add-on plugins can hook into tickets, notifications, refunds and the widget, and can add screens, panels and bulk actions to this admin app. The contract is documented in contracts/extensions-v1.md in the plugin, and it is what Deskovi Pro is built on.","deskovi")},...d.filter(e=>"pro"!==e.plan)],u=(e,s)=>(0,y.jsxs)("div",{className:"itsdesk-feature"+(e.locked?" is-locked":""),children:[(0,y.jsx)("div",{className:"itsdesk-feature__icon",children:e.icon}),(0,y.jsxs)("strong",{children:[e.title,s&&(0,y.jsx)("span",{className:"itsdesk-pro-tag",children:(0,i.__)("Pro","deskovi")})]}),(0,y.jsx)("p",{children:e.description}),e.screen&&!e.locked&&(0,y.jsxs)("button",{type:"button",className:"itsdesk-link",onClick:()=>we(e.screen),children:[(0,i.__)("Open","deskovi")," →"]})]},e.id),_=e=>(0,y.jsxs)("div",{className:"itsdesk-card",id:`itsdesk-doc-${e.id}`,style:{marginTop:14},children:[(0,y.jsx)("div",{className:"itsdesk-card__head",children:(0,y.jsx)("h3",{className:"itsdesk-card__title",children:e.title})}),(0,y.jsx)("p",{children:e.intro}),e.steps&&(0,y.jsx)("ol",{style:{margin:"8px 0 0",paddingLeft:18},children:e.steps.map((e,s)=>(0,y.jsx)("li",{style:{marginBottom:6},children:e},s))})]},e.id);return(0,y.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,y.jsxs)("div",{children:[(0,y.jsx)("h2",{className:"itsdesk-page-title",children:(0,i.__)("Docs & Features","deskovi")}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("What Deskovi can do and how to set it up. Everything is stored in your own WordPress database; there is no outside account.","deskovi")})]}),(0,y.jsxs)("div",{className:"itsdesk-tabs",role:"tablist",children:[(0,y.jsx)("button",{type:"button",className:"itsdesk-tab"+("features"===e?" is-active":""),role:"tab","aria-selected":"features"===e,onClick:()=>n("features"),children:(0,i.__)("Features","deskovi")}),(0,y.jsx)("button",{type:"button",className:"itsdesk-tab"+("documentation"===e?" is-active":""),role:"tab","aria-selected":"documentation"===e,onClick:()=>n("documentation"),children:(0,i.__)("Documentation","deskovi")})]}),"features"===e?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("h3",{className:"itsdesk-admin__section",children:(0,i.__)("Deskovi","deskovi")}),(0,y.jsx)("div",{className:"itsdesk-features",children:c.map(e=>u(e,!1))}),(0,y.jsx)("h3",{className:"itsdesk-admin__section",children:l?(0,i.__)("Deskovi Pro","deskovi"):(0,i.__)("Available with Deskovi Pro","deskovi")}),!l&&(0,y.jsxs)("p",{className:"itsdesk-admin__muted",children:[(0,i.__)("Deskovi Pro is a separate add-on. These features turn on when it is installed; they are not part of the free plugin.","deskovi")," ",(0,y.jsxs)("button",{type:"button",className:"itsdesk-link",onClick:()=>we("pro"),children:[(0,i.__)("See what Pro adds","deskovi")," →"]})]}),(0,y.jsx)("div",{className:"itsdesk-features",children:h.map(e=>u(e,!0))})]}):(0,y.jsxs)("div",{children:[(0,y.jsxs)("div",{className:"itsdesk-card",children:[(0,y.jsx)("div",{className:"itsdesk-card__head",children:(0,y.jsx)("h3",{children:(0,i.__)("On this page","deskovi")})}),(0,y.jsx)("ul",{style:{margin:"8px 0",paddingLeft:18,columns:2},children:[...k,...r].map(e=>(0,y.jsx)("li",{style:{marginBottom:6},children:(0,y.jsx)("a",{href:`#itsdesk-doc-${e.id}`,onClick:s=>{s.preventDefault(),document.getElementById(`itsdesk-doc-${e.id}`)?.scrollIntoView({behavior:"smooth",block:"start"})},children:e.title})},e.id))})]}),k.map(_),(0,y.jsx)("h3",{className:"itsdesk-admin__section",children:(0,i.__)("Deskovi Pro","deskovi")}),l?r.map(_):(0,y.jsx)("div",{className:"itsdesk-card",children:(0,y.jsx)("p",{children:(0,i.__)("The guides for Deskovi Pro (connecting Gmail or Microsoft 365, automation rules, response times, the AI assistant, reports and more) appear here once the add-on is installed. The features it adds are listed under Features.","deskovi")})})]})]})}function Te({onToast:e}){const[s,n]=(0,t.useState)(null),[d,l]=(0,t.useState)(0),[c,h]=(0,t.useState)(""),[k,u]=(0,t.useState)(null),_=e=>{n(e),l(e.settings.page_id),h(e.settings.contact_url)};if((0,t.useEffect)(()=>{a()({path:`${o}/help`}).then(_).catch(s=>e(r(s),"danger"))},[]),!s)return(0,y.jsx)(w,{});const{counts:m,page:p,links:v}=s;return(0,y.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,y.jsx)("div",{className:"itsdesk-admin__row",children:(0,y.jsxs)("div",{children:[(0,y.jsx)("h2",{children:(0,i.__)("Help center","deskovi")}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Write answers to common questions once, so customers can find them before they open a ticket. Articles are written in the usual WordPress editor and grouped by topic.","deskovi")})]})}),(0,y.jsxs)("div",{className:"itsdesk-card",style:{marginTop:16},children:[(0,y.jsx)("div",{className:"itsdesk-card__head",children:(0,y.jsx)("h3",{children:(0,i.__)("Articles","deskovi")})}),(0,y.jsxs)("p",{children:[(0,i.sprintf)(/* translators: %d: number of published help articles */ /* translators: %d: number of published help articles */
     2(0,i._n)("%d published article","%d published articles",m.published,"deskovi"),m.published),m.drafts>0&&" · "+(0,i.sprintf)(/* translators: %d: number of draft help articles */ /* translators: %d: number of draft help articles */
     3(0,i._n)("%d draft","%d drafts",m.drafts,"deskovi"),m.drafts)," · "+(0,i.sprintf)(/* translators: %d: number of help topics */ /* translators: %d: number of help topics */
     4(0,i._n)("%d topic","%d topics",m.topics,"deskovi"),m.topics)]}),(0,y.jsxs)("div",{className:"itsdesk-admin__actions",style:{justifyContent:"flex-start",marginTop:8},children:[(0,y.jsx)("a",{className:"itsdesk-btn itsdesk-btn--primary",href:v.new_article,children:(0,i.__)("Write an article","deskovi")}),(0,y.jsx)("a",{className:"itsdesk-btn itsdesk-btn--secondary",href:v.articles,children:(0,i.__)("All articles","deskovi")}),(0,y.jsx)("a",{className:"itsdesk-btn itsdesk-btn--ghost",href:v.topics,children:(0,i.__)("Topics","deskovi")})]})]}),(0,y.jsxs)("div",{className:"itsdesk-card",style:{marginTop:16},children:[(0,y.jsx)("div",{className:"itsdesk-card__head",children:(0,y.jsx)("h3",{children:(0,i.__)("Help center page","deskovi")})}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("The public page that lists your articles by topic, with a search box. Any page with the “Deskovi help center” block or the [deskovi_help] shortcode works; the “Deskovi help search” block sends its searches here.","deskovi")}),p&&(0,y.jsxs)("p",{children:["publish"===p.status?(0,y.jsx)("a",{href:p.url,target:"_blank",rel:"noreferrer",children:p.title||(0,i.__)("(no title)","deskovi")}):(0,y.jsx)("strong",{children:p.title||(0,i.__)("(no title)","deskovi")})," · ",(0,y.jsx)("a",{href:p.edit_url,children:(0,i.__)("Edit page","deskovi")}),"publish"!==p.status&&(0,y.jsx)("span",{className:"itsdesk-admin__muted",children:" · "+(0,i.__)("Not published yet, so customers cannot see it.","deskovi")}),!p.has_block&&(0,y.jsx)("span",{className:"itsdesk-admin__muted",children:" · "+(0,i.__)("This page does not show the help center yet: add the “Deskovi help center” block to it.","deskovi")})]}),!p&&s.can_publish_pages&&(0,y.jsx)("div",{className:"itsdesk-admin__actions",style:{justifyContent:"flex-start"},children:(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:null!==k,onClick:()=>{u("create"),a()({path:`${o}/help/page`,method:"POST"}).then(s=>{_(s),e((0,i.__)("The help center page was created and published.","deskovi"))}).catch(s=>e(r(s),"danger")).finally(()=>u(null))},children:"create"===k?(0,i.__)("Creating…","deskovi"):(0,i.__)("Create the help center page","deskovi")})}),(0,y.jsxs)("div",{className:"itsdesk-field",style:{marginTop:14},children:[(0,y.jsx)("label",{htmlFor:"itsdesk-help-page",children:(0,i.__)("Or choose a page","deskovi")}),(0,y.jsxs)("select",{id:"itsdesk-help-page",className:"itsdesk-select",value:d,onChange:e=>l(Number(e.target.value)),children:[(0,y.jsx)("option",{value:0,children:(0,i.__)("— None —","deskovi")}),s.pages.map(e=>(0,y.jsx)("option",{value:e.id,children:e.title||(0,i.sprintf)(/* translators: %d: page id */ /* translators: %d: page id */(0,i.__)("Page #%d","deskovi"),e.id)},e.id))]})]}),(0,y.jsxs)("div",{className:"itsdesk-field",children:[(0,y.jsx)("label",{htmlFor:"itsdesk-help-contact",children:(0,i.__)("“Contact support” link","deskovi")}),(0,y.jsx)("input",{id:"itsdesk-help-contact",type:"url",className:"itsdesk-input",value:c,placeholder:s.contact_default||"https://example.com/contact/",onChange:e=>h(e.target.value)}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:s.contact_default?(0,i.__)("Shown under the help center and every article. Leave empty to use the Support tab in My Account.","deskovi"):(0,i.__)("Shown under the help center and every article. Leave empty to hide it.","deskovi")})]}),(0,y.jsx)("div",{className:"itsdesk-admin__actions",children:(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:null!==k,onClick:()=>{u("save"),function(e){return a()({path:`${o}/help`,method:"POST",data:e})}({page_id:d,contact_url:c.trim()}).then(s=>{_(s),e((0,i.__)("Help center settings saved.","deskovi"))}).catch(s=>e(r(s),"danger")).finally(()=>u(null))},children:"save"===k?(0,i.__)("Saving…","deskovi"):(0,i.__)("Save","deskovi")})})]})]})}function Pe({onToast:e}){const[s,n]=(0,t.useState)(null),[d,l]=(0,t.useState)(!0),[c,h]=(0,t.useState)(!1),[k,u]=(0,t.useState)(null),[m,p]=(0,t.useState)(""),[v,g]=(0,t.useState)(""),[x,j]=(0,t.useState)(!1),[b,f]=(0,t.useState)(null);(0,t.useEffect)(()=>{_().then(e=>{n(e),l(!1)}).catch(s=>{e(r(s),"danger"),l(!1)})},[]);return d||!s?(0,y.jsx)(w,{}):(0,y.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,y.jsxs)("div",{className:"itsdesk-admin__row",children:[(0,y.jsxs)("div",{children:[(0,y.jsx)("h2",{children:(0,i.__)("Canned Replies","deskovi")}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Reusable reply templates agents can insert into the ticket reply composer with one click.","deskovi")})]}),(0,y.jsx)("div",{className:"itsdesk-admin__spacer"}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",onClick:()=>{u(null),p(""),g(""),h(!0)},children:(0,i.__)("Add canned reply","deskovi")})]}),c&&(0,y.jsxs)("div",{className:"itsdesk-card",style:{marginTop:16},children:[(0,y.jsx)("div",{className:"itsdesk-card__head",children:(0,y.jsx)("h3",{children:k?(0,i.__)("Edit canned reply","deskovi"):(0,i.__)("New canned reply","deskovi")})}),(0,y.jsxs)("div",{className:"itsdesk-field",children:[(0,y.jsx)("label",{htmlFor:"itsdesk-macro-title",children:(0,i.__)("Title","deskovi")}),(0,y.jsx)("input",{id:"itsdesk-macro-title",className:"itsdesk-input",maxLength:80,value:m,onChange:e=>p(e.target.value)})]}),(0,y.jsxs)("div",{className:"itsdesk-field",children:[(0,y.jsx)("label",{htmlFor:"itsdesk-macro-body",children:(0,i.__)("Body","deskovi")}),(0,y.jsx)("textarea",{id:"itsdesk-macro-body",className:"itsdesk-textarea",rows:5,maxLength:2e3,value:v,onChange:e=>g(e.target.value)}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Available placeholders: {customer_name}, {customer_email}, {order_id}, {agent_name}","deskovi")})]}),(0,y.jsxs)("div",{className:"itsdesk-admin__actions",children:[(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:x||!m||!v,onClick:()=>{j(!0);const s={title:m,body:v},t=k?function(e,s){return a()({path:`${o}/macros/${e}`,method:"POST",data:s})}(k,s):function(e){return a()({path:`${o}/macros`,method:"POST",data:e})}(s);t.then(s=>{n(e=>{const t=e||[];return k?t.map(e=>e.id===s.id?s:e):[...t,s]}),j(!1),h(!1),u(null),e(k?(0,i.__)("Canned reply updated.","deskovi"):(0,i.__)("Canned reply created.","deskovi"))}).catch(s=>{e(r(s),"danger"),j(!1)})},children:x?(0,i.__)("Saving…","deskovi"):(0,i.__)("Save","deskovi")}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",disabled:x,onClick:()=>{h(!1),u(null)},children:(0,i.__)("Cancel","deskovi")})]})]}),0===s.length?(0,y.jsx)("p",{className:"itsdesk-admin__muted",style:{marginTop:16},children:(0,i.__)("No canned replies yet.","deskovi")}):(0,y.jsxs)("table",{className:"itsdesk-table",style:{marginTop:16},children:[(0,y.jsx)("thead",{children:(0,y.jsxs)("tr",{children:[(0,y.jsx)("th",{children:(0,i.__)("Title","deskovi")}),(0,y.jsx)("th",{children:(0,i.__)("Preview","deskovi")}),(0,y.jsx)("th",{children:(0,i.__)("Actions","deskovi")})]})}),(0,y.jsx)("tbody",{children:s.map(s=>{return(0,y.jsxs)("tr",{children:[(0,y.jsx)("td",{className:"itsdesk-table__area",children:s.title}),(0,y.jsx)("td",{children:(t=s.body,t.length<=80?t:t.slice(0,80).trimEnd()+"…")}),(0,y.jsx)("td",{children:(0,y.jsxs)("div",{className:"itsdesk-admin__actions",children:[(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",onClick:()=>(e=>{u(e.id),p(e.title),g(e.body),h(!0)})(s),children:(0,i.__)("Edit","deskovi")}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--danger",disabled:b===s.id,onClick:()=>(s=>{var t;window.confirm((0,i.__)("Delete this canned reply?","deskovi"))&&(f(s.id),(t=s.id,a()({path:`${o}/macros/${t}`,method:"DELETE"})).then(()=>{n(e=>(e||[]).filter(e=>e.id!==s.id)),f(null),e((0,i.__)("Canned reply deleted.","deskovi"))}).catch(s=>{e(r(s),"danger"),f(null)}))})(s),children:b===s.id?(0,i.__)("Deleting…","deskovi"):(0,i.__)("Delete","deskovi")})]})})]},s.id);var t})})]})]})}function Me({onToast:e}){const[s,n]=(0,t.useState)(null),[d,l]=(0,t.useState)(!0),[h,k]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{a()({path:`${o}/notifications`}).then(e=>{n(e),l(!1)}).catch(s=>{e(r(s),"danger"),l(!1)})},[]),d||!s?(0,y.jsx)(w,{}):(0,y.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,y.jsx)("div",{className:"itsdesk-admin__row",children:(0,y.jsxs)("div",{children:[(0,y.jsx)("h2",{children:(0,i.__)("Notifications","deskovi")}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Local email notifications only — sent via wp_mail(), nothing leaves your site.","deskovi")})]})}),(0,y.jsxs)("div",{className:"itsdesk-card",style:{marginTop:16},children:[(0,y.jsx)("div",{className:"itsdesk-card__head",children:(0,y.jsx)("h3",{children:(0,i.__)("Ticket event emails","deskovi")})}),(0,y.jsx)(ie,{id:"itsdesk-notif-agent-new-ticket",checked:s.agent_new_ticket,label:(0,i.__)("New ticket","deskovi"),description:(0,i.__)("Email every support agent when a customer opens a new ticket.","deskovi"),onChange:e=>n({...s,agent_new_ticket:e})}),(0,y.jsx)(ie,{id:"itsdesk-notif-agent-new-reply",checked:s.agent_new_reply,label:(0,i.__)("Customer reply","deskovi"),description:(0,i.__)("Email the assigned agent (or all agents, if unassigned) when a customer replies.","deskovi"),onChange:e=>n({...s,agent_new_reply:e})}),(0,y.jsx)(ie,{id:"itsdesk-notif-customer-reply",checked:s.customer_reply,label:(0,i.__)("Agent reply","deskovi"),description:(0,i.__)("Email the customer when an agent replies to their ticket.","deskovi"),onChange:e=>n({...s,customer_reply:e})}),(0,y.jsx)(ie,{id:"itsdesk-notif-agent-assigned",checked:s.agent_assigned,label:(0,i.__)("Ticket assigned","deskovi"),description:(0,i.__)("Email an agent when a ticket is assigned to them.","deskovi"),onChange:e=>n({...s,agent_assigned:e})}),(0,y.jsxs)("div",{className:"itsdesk-field",style:{marginTop:14},children:[(0,y.jsx)("label",{htmlFor:"itsdesk-notif-team-email",children:(0,i.__)("Also send agent alerts to","deskovi")}),(0,y.jsx)("input",{id:"itsdesk-notif-team-email",type:"email",className:"itsdesk-input",placeholder:"support@example.com",value:s.team_email||"",onChange:e=>n({...s,team_email:e.target.value})}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Optional. A shared inbox that gets new ticket and reply emails along with the agents. Leave empty for none.","deskovi")})]})]}),(0,y.jsx)("div",{className:"itsdesk-admin__actions",children:(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:h,onClick:()=>{s&&(k(!0),c(s).then(s=>{n(s),k(!1),e((0,i.__)("Notification settings saved.","deskovi"))}).catch(s=>{e(r(s),"danger"),k(!1)}))},children:h?(0,i.__)("Saving…","deskovi"):(0,i.__)("Save notification settings","deskovi")})})]})}function $e(e){return{disabled:e.builtin.filter(e=>!e.enabled).map(e=>e.id),custom:e.custom.map(e=>({id:e.id,label:e.label}))}}function Ae({config:e,draft:s,onChange:n,idPrefix:a}){const[d,o]=(0,t.useState)(""),r=s.custom.length>=e.max_custom,l=()=>{const e=d.trim();e&&!r&&(n({...s,custom:[...s.custom,{label:e}]}),o(""))};return(0,y.jsxs)("div",{className:"itsdesk-cats",children:[(0,y.jsxs)("fieldset",{className:"itsdesk-cats__group",children:[(0,y.jsx)("legend",{children:(0,i.__)("Built in","deskovi")}),e.builtin.map(e=>{const t=`${a}-cat-${e.id}`;return(0,y.jsxs)("label",{htmlFor:t,className:"itsdesk-cats__check",children:[(0,y.jsx)("input",{id:t,type:"checkbox",checked:!s.disabled.includes(e.id),onChange:t=>((e,t)=>{const i=t?s.disabled.filter(s=>s!==e):[...s.disabled,e];n({...s,disabled:i})})(e.id,t.target.checked)}),(0,y.jsx)("span",{children:e.label})]},e.id)})]}),(0,y.jsxs)("fieldset",{className:"itsdesk-cats__group",children:[(0,y.jsx)("legend",{children:(0,i.__)("Your own","deskovi")}),0===s.custom.length&&(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("None yet.","deskovi")}),s.custom.map((e,t)=>(0,y.jsxs)("div",{className:"itsdesk-cats__row",children:[(0,y.jsx)("input",{className:"itsdesk-input","aria-label":(0,i.__)("Category name","deskovi"),maxLength:40,value:e.label,onChange:i=>{const a=s.custom.slice();a[t]={...e,label:i.target.value},n({...s,custom:a})}}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--ghost",onClick:()=>n({...s,custom:s.custom.filter((e,s)=>s!==t)}),children:(0,i.__)("Remove","deskovi")})]},e.id||`new-${t}`)),(0,y.jsxs)("div",{className:"itsdesk-cats__row",children:[(0,y.jsx)("input",{id:`${a}-cat-new`,className:"itsdesk-input","aria-label":(0,i.__)("New category name","deskovi"),placeholder:(0,i.__)("For example: Wholesale","deskovi"),maxLength:40,value:d,disabled:r,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),l())}}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",disabled:r||!d.trim(),onClick:l,children:(0,i.__)("Add","deskovi")})]}),r&&(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.sprintf)(/* translators: %d: maximum number of own categories */ /* translators: %d: maximum number of own categories */
     5(0,i.__)("You can add up to %d categories of your own.","deskovi"),e.max_custom)})]})]})}function Le({onToast:e}){const[s,n]=(0,t.useState)(null),[a,d]=(0,t.useState)(null),[o,l]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{k().then(e=>{n(e),d($e(e))}).catch(s=>e(r(s),"danger"))},[]),(0,y.jsxs)("div",{className:"itsdesk-card",style:{marginTop:16},children:[(0,y.jsx)("div",{className:"itsdesk-card__head",children:(0,y.jsx)("h3",{children:(0,i.__)("Ticket categories","deskovi")})}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("What customers pick from when they open a ticket. Turning one off keeps it on older tickets.","deskovi")}),s&&a?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Ae,{config:s,draft:a,onChange:d,idPrefix:"widget"}),(0,y.jsx)("div",{className:"itsdesk-admin__actions",children:(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:o,onClick:()=>{a&&(l(!0),u(a).then(s=>{n(s),d($e(s)),l(!1),e((0,i.__)("Categories saved.","deskovi"))}).catch(s=>{l(!1),e(r(s),"danger")}))},children:o?(0,i.__)("Saving…","deskovi"):(0,i.__)("Save categories","deskovi")})})]}):(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Loading…","deskovi")})]})}function De({info:e,widget:s,onClose:n}){const[a,d]=(0,t.useState)(0),[o,_]=(0,t.useState)(s.enabled),[m,p]=(0,t.useState)(""),[v,g]=(0,t.useState)(null),[x,j]=(0,t.useState)(null),[b,f]=(0,t.useState)(!1),[w,N]=(0,t.useState)("");(0,t.useEffect)(()=>{k().then(e=>{g(e),j($e(e))}).catch(e=>N(r(e)))},[]);const C=[(0,i.__)("Let customers reach you","deskovi"),(0,i.__)("Who gets new ticket emails","deskovi"),(0,i.__)("What customers can ask about","deskovi")];return(0,y.jsxs)("section",{className:"itsdesk-card itsdesk-setup","aria-labelledby":"itsdesk-setup-title",children:[(0,y.jsxs)("div",{className:"itsdesk-card__head",children:[(0,y.jsxs)("div",{children:[(0,y.jsx)("p",{className:"itsdesk-setup__count",children:(0,i.sprintf)(/* translators: 1: current step, 2: number of steps */ /* translators: 1: current step, 2: number of steps */
     6(0,i.__)("Setup · step %1$d of %2$d","deskovi"),a+1,3)}),(0,y.jsx)("h3",{id:"itsdesk-setup-title",children:C[a]})]}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--ghost",disabled:b,onClick:async()=>{f(!0),N("");try{await h("dismissed"),n()}catch(e){N(r(e))}finally{f(!1)}},children:(0,i.__)("Skip setup","deskovi")})]}),(0,y.jsx)("ol",{className:"itsdesk-setup__dots","aria-hidden":"true",children:C.map((e,s)=>(0,y.jsx)("li",{className:s<=a?"is-on":""},e))}),w&&(0,y.jsx)("p",{className:"itsdesk-setup__error",role:"alert",children:w}),0===a&&(0,y.jsx)("div",{children:(0,y.jsx)(ie,{id:"itsdesk-setup-widget",checked:o,label:(0,i.__)("Show the support button on your store","deskovi"),description:(0,i.__)("A small button in the corner of every page except cart and checkout. Customers can also always reach you from My Account → Support.","deskovi"),onChange:_})}),1===a&&(0,y.jsxs)("div",{children:[(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.sprintf)(/* translators: %d: number of people who can answer tickets */ /* translators: %d: number of people who can answer tickets */
     7(0,i._n)("New tickets and replies are emailed to the %d person who can answer tickets.","New tickets and replies are emailed to the %d people who can answer tickets.",e.agents,"deskovi"),e.agents)}),(0,y.jsxs)("div",{className:"itsdesk-field",children:[(0,y.jsx)("label",{htmlFor:"itsdesk-setup-team-email",children:(0,i.__)("Also send them to (optional)","deskovi")}),(0,y.jsx)("input",{id:"itsdesk-setup-team-email",type:"email",className:"itsdesk-input",placeholder:"support@example.com",value:m,onChange:e=>p(e.target.value)}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("For example a shared support inbox. You can change this later under Notifications.","deskovi")})]})]}),2===a&&(v&&x?(0,y.jsx)(Ae,{config:v,draft:x,onChange:j,idPrefix:"setup"}):(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Loading…","deskovi")})),(0,y.jsxs)("div",{className:"itsdesk-admin__actions",children:[a>0&&(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",disabled:b,onClick:()=>d(a-1),children:(0,i.__)("Back","deskovi")}),a<2?(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:b,onClick:()=>d(a+1),children:(0,i.__)("Next","deskovi")}):(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:b||!x,onClick:()=>{(async()=>{f(!0),N("");try{await l({enabled:o}),await c({team_email:m.trim()}),x&&await u(x),await h("done"),n()}catch(e){N(r(e))}finally{f(!1)}})()},children:b?(0,i.__)("Saving…","deskovi"):(0,i.__)("Finish","deskovi")})]})]})}function Ie(e){const s=Math.floor(e/60);if(s<1)return(0,i.__)("just now","deskovi");if(s<60)return(0,i.sprintf)(/* translators: %d: minutes */ /* translators: %d: minutes */(0,i._n)("%d minute","%d minutes",s,"deskovi"),s);const t=Math.floor(s/60);if(t<48)return(0,i.sprintf)(/* translators: %d: hours */ /* translators: %d: hours */(0,i._n)("%d hour","%d hours",t,"deskovi"),t);const n=Math.floor(t/24);return(0,i.sprintf)(/* translators: %d: days */ /* translators: %d: days */(0,i._n)("%d day","%d days",n,"deskovi"),n)}function Oe(e){switch(e){case"open":return(0,i.__)("Open","deskovi");case"pending":return(0,i.__)("Pending","deskovi");case"resolved":return(0,i.__)("Resolved","deskovi");case"closed":return(0,i.__)("Closed","deskovi");default:return e}}function We({days:e}){const s=Math.max(1,...e.map(e=>e.count));return(0,y.jsx)("div",{className:"itsdesk-week",role:"img","aria-label":(0,i.__)("New tickets per day, last 7 days","deskovi"),children:e.map(e=>{const t=new Date(e.date+"T12:00:00Z").toLocaleDateString(void 0,{weekday:"short",timeZone:"UTC"});return(0,y.jsxs)("div",{className:"itsdesk-week__col",title:`${e.date}: ${e.count}`,children:[(0,y.jsx)("span",{className:"itsdesk-week__n",children:e.count}),(0,y.jsx)("span",{className:"itsdesk-week__bar",children:(0,y.jsx)("i",{style:{height:`${Math.max(e.count>0?6:2,e.count/s*100)}%`}})}),(0,y.jsx)("span",{className:"itsdesk-week__d",children:t})]},e.date)})})}function Ee({data:e,onNavigate:s,onRefresh:n}){const{widget:a,privacy:d,desk:o}=e,[r,l]=(0,t.useState)(null);(0,t.useEffect)(()=>{let e=!0;return v({per_page:6}).then(s=>e&&l(s.tickets)).catch(()=>e&&l([])),()=>{e=!1}},[e]);const c=o?o.open+o.pending:0,h="pending"===e.setup?.state;return(0,y.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,y.jsxs)("div",{className:"itsdesk-admin__row",children:[(0,y.jsxs)("div",{children:[(0,y.jsx)("h2",{className:"itsdesk-page-title",children:(0,i.__)("Overview","deskovi")}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("What needs you today.","deskovi")})]}),(0,y.jsx)("div",{className:"itsdesk-admin__spacer"}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--ghost",onClick:n,children:(0,i.__)("Refresh","deskovi")}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",onClick:()=>s("tickets"),children:(0,i.__)("Open tickets","deskovi")})]}),h&&e.setup&&(0,y.jsx)(De,{info:e.setup,widget:a,onClose:n}),(0,y.jsx)(fe,{name:"overview.top",context:{navigate:s}}),!a.enabled&&!h&&(0,y.jsxs)("div",{className:"itsdesk-callout",children:[(0,y.jsxs)("div",{children:[(0,y.jsx)("strong",{children:(0,i.__)("Customers cannot reach you yet","deskovi")}),(0,y.jsx)("p",{children:(0,i.__)("The chat widget is off. Turn it on so customers can write to you from your store.","deskovi")})]}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",onClick:()=>s("widget"),children:(0,i.__)("Set up the widget","deskovi")})]}),o&&(0,y.jsxs)("div",{className:"itsdesk-metrics",children:[(0,y.jsx)(se,{label:(0,i.__)("Open","deskovi"),value:o.open,hint:null!==o.oldest_waiting?(0,i.sprintf)(/* translators: %s: how long */ /* translators: %s: how long */(0,i.__)("oldest waiting %s","deskovi"),Ie(o.oldest_waiting)):(0,i.__)("nothing waiting","deskovi"),icon:(0,y.jsx)(E,{}),onClick:()=>s("tickets")}),(0,y.jsx)(se,{label:(0,i.__)("Pending","deskovi"),value:o.pending,hint:(0,i.__)("waiting for the customer","deskovi"),icon:(0,y.jsx)(M,{}),onClick:()=>s("tickets")}),(0,y.jsx)(se,{label:(0,i.__)("Unassigned","deskovi"),value:o.unassigned,hint:o.unassigned>0?(0,i.__)("nobody owns these yet","deskovi"):(0,i.__)("everything has an owner","deskovi"),tone:o.unassigned>0?"warn":"default",icon:(0,y.jsx)(P,{}),onClick:()=>s("tickets")}),(0,y.jsx)(se,{label:(0,i.__)("New, last 7 days","deskovi"),value:o.new_7d,hint:c>0?(0,i.sprintf)(/* translators: %d: tickets */ /* translators: %d: tickets */(0,i._n)("%d ticket waiting now","%d tickets waiting now",c,"deskovi"),c):(0,i.__)("all caught up","deskovi"),icon:(0,y.jsx)(T,{})})]}),(0,y.jsxs)("div",{className:"itsdesk-two",children:[o&&(0,y.jsxs)("section",{className:"itsdesk-box",children:[(0,y.jsx)("h3",{children:(0,i.__)("New tickets, last 7 days","deskovi")}),(0,y.jsx)(We,{days:o.days})]}),(0,y.jsxs)("section",{className:"itsdesk-box",children:[(0,y.jsxs)("div",{className:"itsdesk-box__head",children:[(0,y.jsx)("h3",{children:(0,i.__)("Latest tickets","deskovi")}),(0,y.jsx)("button",{type:"button",className:"itsdesk-link",onClick:()=>s("tickets"),children:(0,i.__)("View all","deskovi")})]}),null===r&&(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Loading…","deskovi")}),null!==r&&0===r.length&&(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("No tickets yet. They show up here as soon as a customer writes in.","deskovi")}),null!==r&&r.length>0&&(0,y.jsx)("ul",{className:"itsdesk-list",children:r.map(e=>{return(0,y.jsx)("li",{children:(0,y.jsxs)("button",{type:"button",onClick:()=>s("tickets"),children:[(0,y.jsxs)("span",{className:"itsdesk-list__main",children:[(0,y.jsx)("strong",{children:e.subject}),(0,y.jsx)("span",{children:e.customer_name||e.customer_email})]}),(0,y.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--"+(t=e.status,"open"===t?"warn":"pending"===t?"info":"resolved"===t||"closed"===t?"ok":"neutral"),children:[(0,y.jsx)("span",{className:"itsdesk-badge__dot"}),Oe(e.status)]})]})},e.id);var t})})]})]}),(0,y.jsxs)("section",{className:"itsdesk-box",children:[(0,y.jsx)("h3",{children:(0,i.__)("Setup and status","deskovi")}),(0,y.jsxs)("ul",{className:"itsdesk-status-list",children:[(0,y.jsxs)("li",{children:[(0,y.jsx)("span",{className:"itsdesk-status-list__icon",children:(0,y.jsx)(T,{size:16})}),(0,y.jsxs)("span",{className:"itsdesk-status-list__text",children:[(0,y.jsx)("strong",{children:(0,i.__)("Support widget","deskovi")}),(0,y.jsx)("span",{children:a.enabled?`${a.placement} · ${a.theme}`:(0,i.__)("Off: customers cannot start a ticket from your store.","deskovi")})]}),(0,y.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--"+(a.enabled?"ok":"warn"),children:[(0,y.jsx)("span",{className:"itsdesk-badge__dot"}),a.enabled?(0,i.__)("On","deskovi"):(0,i.__)("Off","deskovi")]}),(0,y.jsx)("button",{type:"button",className:"itsdesk-link",onClick:()=>s("widget"),children:(0,i.__)("Edit","deskovi")})]}),(0,y.jsxs)("li",{children:[(0,y.jsx)("span",{className:"itsdesk-status-list__icon",children:(0,y.jsx)(P,{size:16})}),(0,y.jsxs)("span",{className:"itsdesk-status-list__text",children:[(0,y.jsx)("strong",{children:(0,i.__)("Privacy","deskovi")}),(0,y.jsx)("span",{children:(0,i.sprintf)(/* translators: %d: days */ /* translators: %d: days */(0,i.__)("Tickets are kept for %d days.","deskovi"),d.retention_days)})]}),(0,y.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--ok",children:[(0,y.jsx)("span",{className:"itsdesk-badge__dot"}),(0,i.__)("Set","deskovi")]}),(0,y.jsx)("button",{type:"button",className:"itsdesk-link",onClick:()=>s("privacy"),children:(0,i.__)("Edit","deskovi")})]}),(0,y.jsxs)("li",{children:[(0,y.jsx)("span",{className:"itsdesk-status-list__icon",children:(0,y.jsx)(D,{size:16})}),(0,y.jsxs)("span",{className:"itsdesk-status-list__text",children:[(0,y.jsx)("strong",{children:(0,i.__)("Order storage","deskovi")}),(0,y.jsx)("span",{children:(0,i.__)("Works with WooCommerce high-performance order storage.","deskovi")})]}),(0,y.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--ok",children:[(0,y.jsx)("span",{className:"itsdesk-badge__dot"}),(0,y.jsx)(I,{size:12}),(0,i.__)("Compatible","deskovi")]}),(0,y.jsx)("button",{type:"button",className:"itsdesk-link",onClick:()=>s("diagnostics"),children:(0,i.__)("Diagnostics","deskovi")})]})]}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Everything is stored in your own WordPress database. No outside account is needed.","deskovi")})]})]})}function Fe({initial:e,onSaved:s,onError:n}){const[d,r]=(0,t.useState)(e),[l,c]=(0,t.useState)(!1);return(0,y.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,y.jsx)("div",{className:"itsdesk-admin__row",children:(0,y.jsxs)("div",{children:[(0,y.jsx)("h2",{children:(0,i.__)("Data & Privacy","deskovi")}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Data minimization by default — sync only what agents need. Historical import stays off unless you opt in.","deskovi")})]})}),(0,y.jsxs)("div",{className:"itsdesk-card",style:{marginTop:16},children:[(0,y.jsx)("div",{className:"itsdesk-card__head",children:(0,y.jsx)("h3",{children:(0,i.__)("Customer fields","deskovi")})}),(0,y.jsx)(ie,{id:"itsdesk-privacy-billing",checked:d.sync_billing_address,label:(0,i.__)("Allow billing address sync","deskovi"),description:(0,i.__)("Useful for shipping disputes. Off by default.","deskovi"),onChange:e=>r({...d,sync_billing_address:e})}),(0,y.jsx)(ie,{id:"itsdesk-privacy-phone",checked:d.sync_phone,label:(0,i.__)("Allow phone number sync","deskovi"),description:(0,i.__)("Only when agents need to call the customer.","deskovi"),onChange:e=>r({...d,sync_phone:e})}),(0,y.jsx)(ie,{id:"itsdesk-privacy-diag",checked:d.diagnostics_consent,label:(0,i.__)("Share diagnostics with consent","deskovi"),description:(0,i.__)("Sanitized environment data only — never automatic full log upload.","deskovi"),onChange:e=>r({...d,diagnostics_consent:e})})]}),(0,y.jsxs)("div",{className:"itsdesk-grid-2",children:[(0,y.jsxs)("div",{className:"itsdesk-card",children:[(0,y.jsx)("h3",{children:(0,i.__)("Historical import","deskovi")}),(0,y.jsxs)("div",{className:"itsdesk-field",style:{marginTop:10},children:[(0,y.jsx)("label",{htmlFor:"itsdesk-privacy-import",children:(0,i.__)("Import window","deskovi")}),(0,y.jsxs)("select",{id:"itsdesk-privacy-import",className:"itsdesk-select",value:d.historical_import,onChange:e=>r({...d,historical_import:e.target.value}),children:[(0,y.jsx)("option",{value:"off",children:(0,i.__)("Off (recommended)","deskovi")}),(0,y.jsx)("option",{value:"30",children:(0,i.__)("Last 30 days","deskovi")}),(0,y.jsx)("option",{value:"60",children:(0,i.__)("Last 60 days","deskovi")}),(0,y.jsx)("option",{value:"90",children:(0,i.__)("Last 90 days","deskovi")})]})]})]}),(0,y.jsxs)("div",{className:"itsdesk-card",children:[(0,y.jsx)("h3",{children:(0,i.__)("Retention","deskovi")}),(0,y.jsxs)("div",{className:"itsdesk-field",style:{marginTop:10},children:[(0,y.jsx)("label",{htmlFor:"itsdesk-privacy-retention",children:(0,i.__)("Synced context retention (days)","deskovi")}),(0,y.jsxs)("select",{id:"itsdesk-privacy-retention",className:"itsdesk-select",value:String(d.retention_days),onChange:e=>r({...d,retention_days:parseInt(e.target.value,10)}),children:[(0,y.jsx)("option",{value:"30",children:"30"}),(0,y.jsx)("option",{value:"60",children:"60"}),(0,y.jsx)("option",{value:"90",children:"90"}),(0,y.jsx)("option",{value:"180",children:"180"})]})]})]})]}),(0,y.jsx)("div",{className:"itsdesk-health",children:(0,y.jsxs)("div",{children:[(0,y.jsx)("strong",{children:(0,i.__)("WordPress privacy tools","deskovi")}),(0,y.jsx)("p",{children:(0,i.__)("Deskovi registers a privacy-policy suggestion and ticket export/erase under Tools → Export/Erase Personal Data.","deskovi")})]})}),(0,y.jsxs)("div",{className:"itsdesk-admin__actions",children:[(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:l,onClick:()=>{var e;c(!0),(e=d,a()({path:`${o}/privacy`,method:"POST",data:e})).then(e=>{s(e),r(e),c(!1)}).catch(e=>{n(e?.message||(0,i.__)("Save failed.","deskovi")),c(!1)})},children:l?(0,i.__)("Saving…","deskovi"):(0,i.__)("Save privacy settings","deskovi")}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",disabled:!0,children:(0,i.__)("Request remote data deletion","deskovi")})]})]})}window.itsdesk=window.itsdesk||{},window.itsdesk.admin=ye,de.set("pro",{id:"pro",label:"Pro",icon:(0,y.jsx)(Q,{size:17}),group:"settings",order:900,render:e=>(0,y.jsx)(ae,{...e})});let ze=0;function Re(e){return ze+=1,{key:e.id||`new-${ze}`,id:e.id,label:e.label,type:e.type,choices:e.options.join("\n"),required:e.required}}function Be(e){return{id:e.id,label:e.label.trim(),type:e.type,options:"select"===e.type?e.choices.split("\n").map(e=>e.trim()).filter(Boolean):[],required:"checkbox"!==e.type&&e.required}}function He(e){switch(e){case"select":return(0,i.__)("Dropdown","deskovi");case"checkbox":return(0,i.__)("Checkbox","deskovi");default:return(0,i.__)("Short text","deskovi")}}function Ue({onToast:e}){const[s,n]=(0,t.useState)(null),[d,l]=(0,t.useState)([]),[c,h]=(0,t.useState)(!1),k=e=>{n(e),l(e.fields.map(Re))};(0,t.useEffect)(()=>{a()({path:`${o}/form-fields`}).then(k).catch(s=>e(r(s),"danger"))},[]);const u=(e,s)=>{l(t=>t.map((t,i)=>i===e?{...t,...s}:t))},_=(e,s)=>{l(t=>{const i=e+s;if(i<0||i>=t.length)return t;const n=t.slice();return[n[e],n[i]]=[n[i],n[e]],n})},m=!!s&&d.length>=s.max_fields;return(0,y.jsxs)("div",{className:"itsdesk-card",style:{marginTop:16},children:[(0,y.jsx)("div",{className:"itsdesk-card__head",children:(0,y.jsx)("h3",{children:(0,i.__)("Questions on the ticket form","deskovi")})}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Ask for what you always need, such as a phone model or a size. Customers see these on the new ticket form; their answers show at the top of the ticket. Changing a question later does not change answers already given.","deskovi")}),!s&&(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Loading…","deskovi")}),s&&(0,y.jsxs)(y.Fragment,{children:[0===d.length&&(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("No extra questions. The form asks only for a subject, category, order and message.","deskovi")}),(0,y.jsx)("ol",{className:"itsdesk-ff",children:d.map((e,s)=>{const t=`itsdesk-ff-${e.key}`;return(0,y.jsxs)("li",{className:"itsdesk-ff__item",children:[(0,y.jsxs)("div",{className:"itsdesk-ff__row",children:[(0,y.jsxs)("div",{className:"itsdesk-field itsdesk-ff__label",children:[(0,y.jsx)("label",{htmlFor:`${t}-label`,children:(0,i.__)("Question","deskovi")}),(0,y.jsx)("input",{id:`${t}-label`,className:"itsdesk-input",maxLength:60,placeholder:(0,i.__)("For example: Which phone model?","deskovi"),value:e.label,onChange:e=>u(s,{label:e.target.value})})]}),(0,y.jsxs)("div",{className:"itsdesk-field itsdesk-ff__type",children:[(0,y.jsx)("label",{htmlFor:`${t}-type`,children:(0,i.__)("Answer type","deskovi")}),(0,y.jsx)("select",{id:`${t}-type`,className:"itsdesk-select",value:e.type,onChange:e=>u(s,{type:e.target.value}),children:["text","select","checkbox"].map(e=>(0,y.jsx)("option",{value:e,children:He(e)},e))})]})]}),"select"===e.type&&(0,y.jsxs)("div",{className:"itsdesk-field",children:[(0,y.jsx)("label",{htmlFor:`${t}-choices`,children:(0,i.__)("Choices, one per line","deskovi")}),(0,y.jsx)("textarea",{id:`${t}-choices`,className:"itsdesk-input",rows:3,value:e.choices,onChange:e=>u(s,{choices:e.target.value})})]}),(0,y.jsxs)("div",{className:"itsdesk-ff__actions",children:["checkbox"!==e.type?(0,y.jsxs)("label",{htmlFor:`${t}-req`,className:"itsdesk-cats__check",children:[(0,y.jsx)("input",{id:`${t}-req`,type:"checkbox",checked:e.required,onChange:e=>u(s,{required:e.target.checked})}),(0,y.jsx)("span",{children:(0,i.__)("Required","deskovi")})]}):(0,y.jsx)("span",{className:"itsdesk-admin__muted",children:(0,i.__)("Customers can leave it unticked.","deskovi")}),(0,y.jsx)("span",{className:"itsdesk-admin__spacer"}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--ghost",disabled:0===s,onClick:()=>_(s,-1),"aria-label":(0,i.__)("Move up","deskovi"),children:"↑"}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--ghost",disabled:s===d.length-1,onClick:()=>_(s,1),"aria-label":(0,i.__)("Move down","deskovi"),children:"↓"}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--ghost",onClick:()=>l(e=>e.filter((e,t)=>t!==s)),children:(0,i.__)("Remove","deskovi")})]})]},e.key)})}),(0,y.jsxs)("div",{className:"itsdesk-admin__actions",children:[(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",disabled:m,onClick:()=>{l(e=>[...e,Re({label:"",type:"text",options:[],required:!1})])},children:(0,i.__)("Add a question","deskovi")}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:c,onClick:()=>{var s;h(!0),(s=d.map(Be),a()({path:`${o}/form-fields`,method:"POST",data:{fields:s}})).then(s=>{k(s),h(!1),e((0,i.__)("Form fields saved.","deskovi"))}).catch(s=>{h(!1),e(r(s),"danger")})},children:c?(0,i.__)("Saving…","deskovi"):(0,i.__)("Save questions","deskovi")})]}),m&&(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.sprintf)(/* translators: %d: maximum number of questions */ /* translators: %d: maximum number of questions */
     8(0,i.__)("You can add up to %d questions.","deskovi"),s.max_fields)})]})]})}function qe({answers:e}){return e&&0!==e.length?(0,y.jsx)("dl",{className:"itsdesk-answers","aria-label":(0,i.__)("Answers from the ticket form","deskovi"),children:e.map(e=>(0,y.jsxs)("div",{children:[(0,y.jsx)("dt",{children:e.label}),(0,y.jsx)("dd",{children:"checkbox"===e.type?(0,i.__)("Yes","deskovi"):e.value})]},e.id+e.label))}):null}const Ve=["jpg","jpeg","png","gif","webp","pdf","txt"];function Ge(e){return"open"===e?"warn":"pending"===e?"info":"resolved"===e||"closed"===e?"ok":"neutral"}function Ze(e){return"urgent"===e?(0,i.__)("Urgent","deskovi"):"high"===e?(0,i.__)("High","deskovi"):"low"===e?(0,i.__)("Low","deskovi"):(0,i.__)("Normal","deskovi")}function Ye(e){if(!e)return"—";const s=new Date(e);return Number.isNaN(s.getTime())?e:s.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Ke(e){return e?e.charAt(0).toUpperCase()+e.slice(1):e}function Je({onToast:e}){pe();const[s,n]=(0,t.useState)([]),[d,l]=(0,t.useState)(0),[c,h]=(0,t.useState)(1),[k,u]=(0,t.useState)(1),[m,p]=(0,t.useState)(""),[N,C]=(0,t.useState)(""),[S,T]=(0,t.useState)([]),[P,M]=(0,t.useState)([]),[$,A]=(0,t.useState)("all"),[L,D]=(0,t.useState)(""),[I,O]=(0,t.useState)(""),[W,E]=(0,t.useState)(""),[z,R]=(0,t.useState)({}),[B,U]=(0,t.useState)([]),[q,V]=(0,t.useState)(null),[G,Z]=(0,t.useState)(!1),[Y,K]=(0,t.useState)(""),[J,Q]=(0,t.useState)([]),[X,ee]=(0,t.useState)(null),[se,te]=(0,t.useState)(""),[ie,ne]=(0,t.useState)(null),[ae,de]=(0,t.useState)(null),[oe,le]=(0,t.useState)(!0),[ce,he]=(0,t.useState)(!1),[ke,ue]=(0,t.useState)(!1),_e=window.itsdeskAdmin?.currentUserId??0,me=window.itsdeskAdmin?.currentUserName??"",xe=window.itsdeskAdmin?.canManageOrders??!1,je=window.itsdeskAdmin?.restRoot??"",[be,ye]=(0,t.useState)(""),[we,Ne]=(0,t.useState)(""),[Ce,Se]=(0,t.useState)("order"),[Te,Pe]=(0,t.useState)(""),[Me,$e]=(0,t.useState)(""),[Ae,Le]=(0,t.useState)(!1),[De,Ie]=(0,t.useState)(null),[Oe,We]=(0,t.useState)(!1),[Ee,Fe]=(0,t.useState)(""),[ze,Re]=(0,t.useState)(""),[Be,He]=(0,t.useState)(""),[Ue,Je]=(0,t.useState)(!1),[Qe,Xe]=(0,t.useState)([]),[es,ss]=(0,t.useState)(!1),ts=(0,t.useRef)(null),[is,ns]=(0,t.useState)([]),[as,ds]=(0,t.useState)([]),os="mine"===$?String(_e):$,rs=(0,t.useMemo)(()=>({search:N,assignee:os,status:L,priority:I,category:W,x:z}),[N,os,L,I,W,z]),ls=""!==N||"all"!==os||""!==L||""!==I||""!==W||Object.keys(z).length>0,cs=(0,t.useCallback)((e,s)=>{R(t=>{const i={...t};return s?i[e]=s:delete i[e],i})},[]),hs=(0,t.useCallback)(()=>{le(!0),v({page:c,per_page:20,...rs}).then(e=>{n(e.tickets||[]),l(e.total),u(e.total_pages||1),le(!1)}).catch(s=>{e(r(s),"danger"),le(!1)})},[c,rs,e]);(0,t.useEffect)(()=>{hs()},[hs]),(0,t.useEffect)(()=>{Promise.all([a()({path:`${o}/tickets/categories`}),a()({path:`${o}/agents`})]).then(([e,s])=>{T(e.categories||[]),M(s.agents||[]),e.categories?.[0]&&!Ce&&Se(e.categories[0].id)}).catch(s=>e(r(s),"danger"))},[]),(0,t.useEffect)(()=>{_().then(e=>ns(e)).catch(s=>e(r(s),"danger"))},[]),(0,t.useEffect)(()=>{const e=setTimeout(()=>C(m.trim()),300);return()=>clearTimeout(e)},[m]),(0,t.useEffect)(()=>{h(1)},[rs]),(0,t.useEffect)(()=>{a()({path:`${o}/views`}).then(e=>U(e.views)).catch(()=>U([]))},[]);const ks=()=>{const s=(q??"").trim();s&&function(e,s){return a()({path:`${o}/views`,method:"POST",data:{name:e,filters:s}})}(s,rs).then(s=>{U(s.views),V(null),e((0,i.__)("View saved.","deskovi"))}).catch(s=>e(r(s),"danger"))};(0,t.useEffect)(()=>{ds([])},[s]);const us=s=>{var t;ne(s),ue(!1),he(!0),Ie(null),Je(!1),He(""),Promise.all([g(s),(t=s,a()({path:`${o}/tickets/${t}/order`}))]).then(([e,s])=>{de(e),Ie(s.order||null),He(s.order_id?String(s.order_id):""),he(!1)}).catch(s=>{e(r(s),"danger"),he(!1)})};(0,t.useEffect)(()=>{if(!G||!ae)return;const e=Y.trim()||ae.customer_email,s=window.setTimeout(()=>{v({per_page:8,search:e}).then(e=>Q((e.tickets||[]).filter(e=>e.id!==ae.id))).catch(()=>Q([]))},250);return()=>window.clearTimeout(s)},[G,Y,ae]),(0,t.useEffect)(()=>{Z(!1),K(""),Q([]),ee(null)},[ie]);const _s=()=>{ae&&X&&(he(!0),function(e,s,t){return a()({path:`${o}/tickets/${e}/split`,method:"POST",data:{message_id:s,subject:t}})}(ae.id,X,se.trim()).then(s=>{e((0,i.__)("Ticket split.","deskovi")),ee(null),hs(),us(s.new_ticket.id)}).catch(s=>{e(r(s),"danger"),he(!1)}))},ms=ae?{ticket:ae,order:De,currentUser:{id:_e,name:me,canManageOrders:xe},busy:ce,onToast:e,reload:hs,refreshTicket:()=>us(ae.id),replyBody:Me,setReplyBody:$e,replyInternal:Ae,replyFiles:Qe.length}:null;return oe&&0===s.length?(0,y.jsx)(w,{}):(0,y.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,y.jsxs)("div",{className:"itsdesk-admin__row",children:[(0,y.jsxs)("div",{children:[(0,y.jsx)("h2",{children:(0,i.__)("Tickets","deskovi")}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Tickets are created, replied to, and stored locally in your WordPress database.","deskovi")})]}),(0,y.jsx)("div",{className:"itsdesk-admin__spacer"}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",onClick:hs,disabled:ce,children:(0,i.__)("Refresh","deskovi")}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",onClick:()=>{ue(!0),ne(null),de(null)},children:(0,i.__)("New ticket","deskovi")})]}),(0,y.jsxs)("div",{className:"itsdesk-admin__actions",style:{marginTop:12},children:[(0,y.jsx)("div",{className:"itsdesk-field",style:{flex:1,minWidth:220,margin:0},children:(0,y.jsx)("input",{type:"search",className:"itsdesk-input","aria-label":(0,i.__)("Search tickets","deskovi"),placeholder:(0,i.__)("Search subject, name, or email…","deskovi"),value:m,onChange:e=>p(e.target.value)})}),(0,y.jsx)("a",{className:"itsdesk-btn itsdesk-btn--secondary",href:x(rs),target:"_blank",rel:"noreferrer",children:(0,i.__)("Export CSV","deskovi")})]}),(0,y.jsx)("div",{className:"itsdesk-admin__actions",children:[["all",(0,i.__)("All","deskovi")],["unassigned",(0,i.__)("Unassigned","deskovi")],["mine",(0,i.__)("Assigned to me","deskovi")]].map(([e,s])=>(0,y.jsx)("button",{type:"button",className:"itsdesk-btn"+($===e?" itsdesk-btn--primary":" itsdesk-btn--secondary"),onClick:()=>A(e),children:s},e))}),(0,y.jsxs)("div",{className:"itsdesk-filters",children:[(0,y.jsxs)("select",{className:"itsdesk-select","aria-label":(0,i.__)("Status","deskovi"),value:L,onChange:e=>D(e.target.value),children:[(0,y.jsx)("option",{value:"",children:(0,i.__)("Any status","deskovi")}),(0,y.jsx)("option",{value:"active",children:(0,i.__)("Open or pending","deskovi")}),(0,y.jsx)("option",{value:"open",children:(0,i.__)("Open","deskovi")}),(0,y.jsx)("option",{value:"pending",children:(0,i.__)("Pending","deskovi")}),(0,y.jsx)("option",{value:"resolved",children:(0,i.__)("Resolved","deskovi")}),(0,y.jsx)("option",{value:"closed",children:(0,i.__)("Closed","deskovi")})]}),(0,y.jsxs)("select",{className:"itsdesk-select","aria-label":(0,i.__)("Priority","deskovi"),value:I,onChange:e=>O(e.target.value),children:[(0,y.jsx)("option",{value:"",children:(0,i.__)("Any priority","deskovi")}),(0,y.jsx)("option",{value:"urgent",children:(0,i.__)("Urgent","deskovi")}),(0,y.jsx)("option",{value:"high",children:(0,i.__)("High","deskovi")}),(0,y.jsx)("option",{value:"normal",children:(0,i.__)("Normal","deskovi")}),(0,y.jsx)("option",{value:"low",children:(0,i.__)("Low","deskovi")})]}),(0,y.jsxs)("select",{className:"itsdesk-select","aria-label":(0,i.__)("Category","deskovi"),value:W,onChange:e=>E(e.target.value),children:[(0,y.jsx)("option",{value:"",children:(0,i.__)("Any category","deskovi")}),S.map(e=>(0,y.jsx)("option",{value:e.id,children:e.label},e.id))]}),(0,y.jsx)(fe,{name:"ticket.list.filters",context:{extra:z,setExtra:cs}}),ls&&(0,y.jsx)("button",{type:"button",className:"itsdesk-link",onClick:()=>{p(""),C(""),A("all"),D(""),O(""),E(""),R({})},children:(0,i.__)("Clear filters","deskovi")})]}),(0,y.jsxs)("div",{className:"itsdesk-views",children:[B.map(s=>(0,y.jsxs)("span",{className:"itsdesk-views__chip",children:[(0,y.jsx)("button",{type:"button",onClick:()=>(e=>{const s=e.filters;p(s.search),C(s.search),A("unassigned"===s.assignee?"unassigned":s.assignee===String(_e)?"mine":"all"),D(s.status),O(s.priority),E(s.category),R(s.extra??{})})(s),children:s.name}),(0,y.jsx)("button",{type:"button",className:"itsdesk-views__x","aria-label":(0,i.sprintf)(/* translators: %s: view name */ /* translators: %s: view name */(0,i.__)("Delete the view %s","deskovi"),s.name),onClick:()=>{(function(e){return a()({path:`${o}/views/${e}`,method:"DELETE"})})(s.id).then(e=>U(e.views)).catch(s=>e(r(s),"danger"))},children:"×"})]},s.id)),null===q?(0,y.jsx)("button",{type:"button",className:"itsdesk-link",disabled:!ls,title:ls?void 0:(0,i.__)("Choose a filter first","deskovi"),onClick:()=>V(""),children:(0,i.__)("Save this view","deskovi")}):(0,y.jsxs)("span",{className:"itsdesk-views__new",children:[(0,y.jsx)("input",{className:"itsdesk-input",type:"text",maxLength:40,autoFocus:!0,placeholder:(0,i.__)('Name, for example "Urgent refunds"',"deskovi"),value:q,onChange:e=>V(e.target.value),onKeyDown:e=>{"Enter"===e.key&&ks()}}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:""===q.trim(),onClick:ks,children:(0,i.__)("Save","deskovi")}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--ghost",onClick:()=>V(null),children:(0,i.__)("Cancel","deskovi")})]})]}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",style:{marginTop:8},children:N?(0,i.sprintf)(/* translators: 1: result count, 2: search query */ /* translators: 1: result count, 2: search query */
    29(0,i.__)('%1$d result(s) for "%2$s"',"deskovi"),d,N):(0,i.sprintf)(/* translators: %d: total ticket count */ /* translators: %d: total ticket count */
    3 (0,i.__)("%d ticket(s) found","deskovi"),d)}),(0,g.jsxs)("div",{className:"itsdesk-tickets",children:[(0,g.jsxs)("aside",{className:"itsdesk-tickets__list",children:[s.length>0&&(0,g.jsxs)("label",{className:"itsdesk-checkline",style:{marginBottom:8},children:[(0,g.jsx)("input",{type:"checkbox",checked:s.length>0&&ns.length===s.length,onChange:()=>as(ns.length===s.length?[]:s.map(e=>e.id))}),(0,g.jsx)("span",{children:(0,i.__)("Select all","deskovi")})]}),ns.length>0&&(0,g.jsxs)("div",{className:"itsdesk-bulk-bar",children:[(0,g.jsx)("span",{children:(0,i.sprintf)(/* translators: %d: number of selected tickets */ /* translators: %d: number of selected tickets */
    4 (0,i.__)("%d selected","deskovi"),ns.length)}),(0,g.jsxs)("select",{className:"itsdesk-select",value:"",onChange:s=>{var t;(t=s.target.value)&&function(e,s){return a()({path:`${o}/tickets/bulk`,method:"POST",data:{ids:e,action:"set_status",status:s}})}(ns,t).then(()=>{e((0,i.__)("Status updated for selected tickets.","deskovi")),cs()}).catch(s=>e(r(s),"danger"))},children:[(0,g.jsx)("option",{value:"",children:(0,i.__)("Set status…","deskovi")}),(0,g.jsx)("option",{value:"open",children:(0,i.__)("Open","deskovi")}),(0,g.jsx)("option",{value:"pending",children:(0,i.__)("Pending","deskovi")}),(0,g.jsx)("option",{value:"resolved",children:(0,i.__)("Resolved","deskovi")}),(0,g.jsx)("option",{value:"closed",children:(0,i.__)("Closed","deskovi")})]}),(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--danger",onClick:()=>{var s;window.confirm((0,i.sprintf)(/* translators: %d: number of tickets to delete */ /* translators: %d: number of tickets to delete */
    5 (0,i.__)("Delete %d ticket(s)? This can't be undone.","deskovi"),ns.length))&&(s=ns,a()({path:`${o}/tickets/bulk`,method:"POST",data:{ids:s,action:"delete"}})).then(()=>{e((0,i.__)("Selected tickets deleted.","deskovi")),cs()}).catch(s=>e(r(s),"danger"))},children:(0,i.__)("Delete","deskovi")}),Array.from(ie.values()).sort((e,s)=>ke(e,s)).map(t=>(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--"+("danger"===t.tone?"danger":"secondary"),onClick:()=>(async t=>{try{await t.run({selectedIds:ns,tickets:s.filter(e=>ns.includes(e.id)),onToast:e,reload:cs,clearSelection:()=>as([]),ctx:ue})}catch(s){e(r(s),"danger")}})(t),children:t.label},t.id))]}),re&&s.length>0&&(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Loading…","deskovi")}),0===s.length?(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:rs?(0,i.__)("No tickets match this search/filter.","deskovi"):(0,i.__)("No tickets yet. Create one to test the bridge.","deskovi")}):s.map(e=>{return(0,g.jsxs)("div",{className:"itsdesk-ticket-row"+(ne===e.id?" is-active":""),children:[(0,g.jsx)("input",{type:"checkbox","aria-label":(0,i.sprintf)(/* translators: %s: ticket subject */ /* translators: %s: ticket subject */(0,i.__)("Select ticket: %s","deskovi"),e.subject),checked:ns.includes(e.id),onClick:e=>e.stopPropagation(),onChange:()=>{return s=e.id,void as(e=>e.includes(s)?e.filter(e=>e!==s):[...e,s]);var s}}),(0,g.jsxs)("div",{className:"itsdesk-ticket-row__content",role:"button",tabIndex:0,"aria-pressed":ne===e.id,onKeyDown:s=>{"Enter"!==s.key&&" "!==s.key||(s.preventDefault(),ks(e.id))},onClick:()=>ks(e.id),children:[(0,g.jsxs)("div",{className:"itsdesk-ticket-row__top",children:[(0,g.jsx)("strong",{children:e.subject}),(0,g.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--"+Le(e.status),children:[(0,g.jsx)("span",{className:"itsdesk-badge__dot"}),De(e.status)]}),e.priority&&"normal"!==e.priority&&(0,g.jsx)("span",{className:"itsdesk-badge itsdesk-badge--"+(s=e.priority,"urgent"===s?"danger":"high"===s?"warn":"neutral"),children:Ie(e.priority)})]}),(0,g.jsxs)("div",{className:"itsdesk-ticket-row__meta",children:[(0,g.jsx)("span",{children:e.customer_name||e.customer_email||"—"}),(0,g.jsx)("span",{className:"itsdesk-badge itsdesk-badge--neutral",children:e.assigned_agent_name||(0,i.__)("Unassigned","deskovi")}),(0,g.jsx)(pe,{name:"ticket.list.rowExtra",context:{ticket:e,isOpen:ne===e.id}})]})]})]},e.id);var s}),b>1&&(0,g.jsxs)("div",{className:"itsdesk-pagination",children:[(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",disabled:h<=1||re,onClick:()=>j(e=>Math.max(1,e-1)),children:(0,i.__)("Prev","deskovi")}),(0,g.jsx)("span",{children:(0,i.sprintf)(/* translators: 1: current page, 2: total pages */ /* translators: 1: current page, 2: total pages */
    6 (0,i.__)("Page %1$d of %2$d","deskovi"),h,b)}),(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",disabled:h>=b||re,onClick:()=>j(e=>Math.min(b,e+1)),children:(0,i.__)("Next","deskovi")})]})]}),(0,g.jsxs)("section",{className:"itsdesk-tickets__detail",children:[me&&(0,g.jsxs)("div",{className:"itsdesk-card",children:[(0,g.jsx)("div",{className:"itsdesk-card__head",children:(0,g.jsx)("h3",{children:(0,i.__)("Create ticket","deskovi")})}),(0,g.jsxs)("div",{className:"itsdesk-field",children:[(0,g.jsx)("label",{htmlFor:"itsdesk-tkt-subject",children:(0,i.__)("Subject","deskovi")}),(0,g.jsx)("input",{id:"itsdesk-tkt-subject",className:"itsdesk-input",value:ye,onChange:e=>fe(e.target.value)})]}),(0,g.jsxs)("div",{className:"itsdesk-field",children:[(0,g.jsx)("label",{htmlFor:"itsdesk-tkt-category",children:(0,i.__)("Category","deskovi")}),(0,g.jsx)("select",{id:"itsdesk-tkt-category",className:"itsdesk-select",value:Ce,onChange:e=>Se(e.target.value),children:S.map(e=>(0,g.jsx)("option",{value:e.id,children:e.label},e.id))})]}),(0,g.jsxs)("div",{className:"itsdesk-field",children:[(0,g.jsx)("label",{htmlFor:"itsdesk-tkt-order",children:(0,i.__)("Order ID (optional)","deskovi")}),(0,g.jsx)("input",{id:"itsdesk-tkt-order",className:"itsdesk-input",value:Te,onChange:e=>Pe(e.target.value),placeholder:"1234"})]}),(0,g.jsxs)("div",{className:"itsdesk-field",children:[(0,g.jsx)("label",{htmlFor:"itsdesk-tkt-body",children:(0,i.__)("Message","deskovi")}),(0,g.jsx)("textarea",{id:"itsdesk-tkt-body",className:"itsdesk-textarea",rows:5,value:we,onChange:e=>Ne(e.target.value)})]}),(0,g.jsxs)("div",{className:"itsdesk-admin__actions",children:[(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:ce||!ye||!we,onClick:()=>{var s;_e(!0),(s={subject:ye,body:we,category:Ce,order_id:Te?parseInt(Te,10):void 0},a()({path:`${o}/tickets`,method:"POST",data:s})).then(s=>{e((0,i.__)("Ticket created.","deskovi")),fe(""),Ne(""),Pe(""),ve(!1),_e(!1),cs(),ks(s.id)}).catch(s=>{e(r(s),"danger"),_e(!1)})},children:ce?(0,i.__)("Creating…","deskovi"):(0,i.__)("Create ticket","deskovi")}),(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--ghost",onClick:()=>ve(!1),children:(0,i.__)("Cancel","deskovi")})]})]}),!me&&!de&&(0,g.jsx)("div",{className:"itsdesk-tickets__empty",children:(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Select a ticket or create a new one to exercise the bridge.","deskovi")})}),!me&&de&&(0,g.jsxs)("div",{className:"itsdesk-card",children:[(0,g.jsxs)("div",{className:"itsdesk-card__head",children:[(0,g.jsx)("h3",{className:"itsdesk-card__title",children:de.subject}),(0,g.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--"+Le(de.status),children:[(0,g.jsx)("span",{className:"itsdesk-badge__dot"}),De(de.status)]})]}),(0,g.jsxs)("p",{className:"itsdesk-admin__muted",children:[de.customer_name," · ",de.customer_email,de.order_id?` · Order #${de.order_id}`:""," · ",De(de.category)]}),_s&&(0,g.jsx)(pe,{name:"ticket.detail.header",context:_s}),(0,g.jsxs)("div",{className:"itsdesk-card",style:{marginTop:14},children:[(0,g.jsxs)("div",{className:"itsdesk-card__head",children:[(0,g.jsx)("h3",{children:(0,i.__)("Order context","deskovi")}),Fe&&(0,g.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--"+Le(Fe.status),children:[(0,g.jsx)("span",{className:"itsdesk-badge__dot"}),De(Fe.status)]})]}),Fe?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("p",{className:"itsdesk-admin__muted",children:[(0,i.__)("Order","deskovi")," #",Fe.number," · ",Fe.currency," ",Fe.total,Fe.payment_method_title?` · ${Fe.payment_method_title}`:""]}),Fe.shipping_method?(0,g.jsxs)("p",{className:"itsdesk-admin__muted",children:[(0,i.__)("Shipping","deskovi"),":"," ",Fe.shipping_method]}):null,Fe.items?.length>0&&(0,g.jsx)("ul",{style:{margin:"8px 0",paddingLeft:18},children:Fe.items.map((e,s)=>(0,g.jsxs)("li",{children:[e.name," × ",e.quantity,e.sku?` (${e.sku})`:""]},s))}),Fe.billing&&(0,g.jsxs)("p",{className:"itsdesk-admin__muted",children:[(0,i.__)("Billing","deskovi"),":"," ",[Fe.billing.first_name,Fe.billing.last_name,Fe.billing.city,Fe.billing.country].filter(Boolean).join(", ")]}),Fe.phone&&(0,g.jsxs)("p",{className:"itsdesk-admin__muted",children:[(0,i.__)("Phone","deskovi"),":"," ",Fe.phone]}),!Fe.billing&&!Fe.phone&&(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Address/phone hidden by privacy settings.","deskovi")}),Fe.timeline&&Fe.timeline.length>0&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--ghost",onClick:()=>Ke(e=>!e),children:Je?(0,i.__)("Hide timeline","deskovi"):(0,i.__)("Show timeline","deskovi")}),Je&&(0,g.jsx)("div",{className:"itsdesk-thread",children:Fe.timeline.map((e,s)=>(0,g.jsxs)("div",{className:"itsdesk-bubble",children:[(0,g.jsxs)("div",{className:"itsdesk-bubble__meta",children:[(0,g.jsx)("strong",{children:De(e.type)}),(0,g.jsx)("span",{className:"itsdesk-bubble__time",children:$e(e.at)})]}),(0,g.jsx)("p",{children:e.message})]},s))})]}),_s&&(0,g.jsx)(pe,{name:"ticket.detail.order",context:_s}),je&&(0,g.jsxs)("div",{className:"itsdesk-card",style:{marginTop:14},children:[(0,g.jsx)("div",{className:"itsdesk-card__head",children:(0,g.jsx)("h3",{children:(0,i.__)("Refund","deskovi")})}),(0,g.jsxs)("div",{className:"itsdesk-field",children:[(0,g.jsx)("label",{htmlFor:"itsdesk-refund-amount",children:(0,i.__)("Amount (leave blank for full remaining amount)","deskovi")}),(0,g.jsx)("input",{id:"itsdesk-refund-amount",className:"itsdesk-input",value:Ue,disabled:Re||ce,onChange:e=>He(e.target.value),placeholder:"0.00"})]}),(0,g.jsxs)("div",{className:"itsdesk-field",children:[(0,g.jsx)("label",{htmlFor:"itsdesk-refund-reason",children:(0,i.__)("Reason (optional)","deskovi")}),(0,g.jsx)("input",{id:"itsdesk-refund-reason",className:"itsdesk-input",value:Ve,disabled:Re||ce,onChange:e=>Ze(e.target.value)})]}),(0,g.jsxs)("div",{className:"itsdesk-admin__actions",children:[(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--danger",disabled:Re||ce,onClick:()=>{if(!de)return;const s=Ue.trim(),t=s?parseFloat(s):null;s&&(null===t||Number.isNaN(t)||t<=0)?e((0,i.__)("Enter a valid refund amount, or leave it blank for the full remaining amount.","deskovi"),"danger"):(Be(!0),function(e,s,t){return a()({path:`${o}/tickets/${e}/order/refund`,method:"POST",data:{amount:s,reason:t}})}(de.id,t,Ve).then(s=>{oe(s),He(""),Ze(""),Be(!1),e((0,i.__)("Refund issued.","deskovi")),cs()}).catch(s=>{e(r(s),"danger"),Be(!1)}))},children:Re?(0,i.__)("Processing…","deskovi"):(0,i.__)("Issue refund","deskovi")}),(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",disabled:Re||ce,onClick:()=>{var s;de&&(Be(!0),(s=de.id,a()({path:`${o}/tickets/${s}/order/resend-invoice`,method:"POST"})).then(s=>{oe(s),Be(!1),e((0,i.__)("Invoice email resent.","deskovi")),cs()}).catch(s=>{e(r(s),"danger"),Be(!1)}))},children:(0,i.__)("Resend invoice","deskovi")})]})]}),(0,g.jsx)("div",{className:"itsdesk-admin__actions",children:(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",disabled:Re||ce,onClick:()=>{de&&(Be(!0),v(de.id,null).then(s=>{s.ticket&&oe(s.ticket),ze(null),qe(""),Be(!1),e((0,i.__)("Order unlinked.","deskovi")),cs()}).catch(s=>{e(r(s),"danger"),Be(!1)}))},children:(0,i.__)("Unlink order","deskovi")})})]}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("No order linked. Enter a WooCommerce order ID to attach context.","deskovi")}),(0,g.jsxs)("div",{className:"itsdesk-inline-form",children:[(0,g.jsxs)("div",{className:"itsdesk-field",children:[(0,g.jsx)("label",{htmlFor:"itsdesk-link-order",children:(0,i.__)("Order ID","deskovi")}),(0,g.jsx)("input",{id:"itsdesk-link-order",className:"itsdesk-input",value:Ge,onChange:e=>qe(e.target.value),placeholder:"1234"})]}),(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:Re||ce||!Ge.trim(),onClick:()=>{if(!de)return;const s=Ge.trim()?parseInt(Ge.trim(),10):null;!Ge.trim()||s&&!Number.isNaN(s)?(Be(!0),v(de.id,s).then(s=>{s.ticket&&oe(s.ticket),ze(s.order||null),qe(s.order_id?String(s.order_id):""),Be(!1),e(s.linked?(0,i.__)("Order linked.","deskovi"):(0,i.__)("Order unlinked.","deskovi")),cs()}).catch(s=>{e(r(s),"danger"),Be(!1)})):e((0,i.__)("Enter a valid order ID.","deskovi"),"danger")},children:Re?(0,i.__)("Linking…","deskovi"):(0,i.__)("Link order","deskovi")})]})]})]}),(0,g.jsxs)("div",{className:"itsdesk-meta-bar",children:[(0,g.jsxs)("div",{className:"itsdesk-field",children:[(0,g.jsx)("label",{htmlFor:"itsdesk-tkt-assignee",children:(0,i.__)("Assigned to","deskovi")}),(0,g.jsxs)("select",{id:"itsdesk-tkt-assignee",className:"itsdesk-select",value:de.assigned_agent_id??"",disabled:ce,onChange:s=>{const t=s.target.value;var n;n=t?parseInt(t,10):null,de&&(_e(!0),function(e,s){return a()({path:`${o}/tickets/${e}/assign`,method:"POST",data:{agent_id:s}})}(de.id,n).then(s=>{oe(s),_e(!1),e((0,i.__)("Assignment updated.","deskovi")),cs()}).catch(s=>{e(r(s),"danger"),_e(!1)}))},children:[(0,g.jsx)("option",{value:"",children:(0,i.__)("Unassigned","deskovi")}),P.map(e=>(0,g.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,g.jsxs)("div",{className:"itsdesk-field",children:[(0,g.jsx)("label",{htmlFor:"itsdesk-tkt-priority",children:(0,i.__)("Priority","deskovi")}),(0,g.jsxs)("select",{id:"itsdesk-tkt-priority",className:"itsdesk-select",value:de.priority??"normal",disabled:ce,onChange:s=>{return t=s.target.value,void(de&&(_e(!0),function(e,s){return a()({path:`${o}/tickets/${e}/priority`,method:"POST",data:{priority:s}})}(de.id,t).then(s=>{oe(s),_e(!1),e((0,i.__)("Priority updated.","deskovi")),cs()}).catch(s=>{e(r(s),"danger"),_e(!1)})));var t},children:[(0,g.jsx)("option",{value:"low",children:(0,i.__)("Low","deskovi")}),(0,g.jsx)("option",{value:"normal",children:(0,i.__)("Normal","deskovi")}),(0,g.jsx)("option",{value:"high",children:(0,i.__)("High","deskovi")}),(0,g.jsx)("option",{value:"urgent",children:(0,i.__)("Urgent","deskovi")})]})]})]}),(0,g.jsx)("div",{className:"itsdesk-admin__actions itsdesk-segmented",role:"group","aria-label":(0,i.__)("Status","deskovi"),children:["open","pending","resolved","closed"].map(s=>(0,g.jsx)("button",{type:"button",className:"itsdesk-btn"+(de.status===s?" itsdesk-btn--primary":" itsdesk-btn--secondary"),disabled:ce||de.status===s,onClick:()=>{return t=s,void(de&&(_e(!0),function(e,s){return a()({path:`${o}/tickets/${e}/status`,method:"POST",data:{status:s}})}(de.id,t).then(s=>{oe(s),_e(!1),e((0,i.__)("Status updated.","deskovi")),cs()}).catch(s=>{e(r(s),"danger"),_e(!1)})));var t},children:De(s)},s))}),(0,g.jsxs)("div",{className:"itsdesk-merge",children:[(0,g.jsx)("button",{type:"button",className:"itsdesk-link","aria-expanded":G,onClick:()=>q(e=>!e),children:(0,i.__)("Merge into another ticket…","deskovi")}),G&&(0,g.jsxs)("div",{className:"itsdesk-merge__panel",children:[(0,g.jsx)("label",{htmlFor:"itsdesk-merge-search",children:(0,i.__)("Find the ticket this one belongs to","deskovi")}),(0,g.jsx)("input",{id:"itsdesk-merge-search",className:"itsdesk-input",type:"search",value:J,placeholder:de.customer_email,onChange:e=>K(e.target.value)}),0===X.length?(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("No other tickets found. Try a subject, a name or an email.","deskovi")}):(0,g.jsx)("ul",{className:"itsdesk-list",children:X.map(s=>(0,g.jsx)("li",{children:(0,g.jsxs)("button",{type:"button",disabled:ce,onClick:()=>{return t=s,void(de&&window.confirm((0,i.sprintf)(/* translators: 1: this ticket, 2: the ticket it goes into */ /* translators: 1: this ticket, 2: the ticket it goes into */(0,i.__)('Move all messages and files of "%1$s" into "%2$s" and delete "%1$s"? This cannot be undone. Nobody is emailed.',"deskovi"),de.subject,t.subject))&&(_e(!0),(n=de.id,d=t.id,a()({path:`${o}/tickets/${n}/merge`,method:"POST",data:{into:d}})).then(()=>{e((0,i.__)("Tickets merged.","deskovi")),q(!1),cs(),ks(t.id)}).catch(s=>{e(r(s),"danger"),_e(!1)})));var t,n,d},children:[(0,g.jsxs)("span",{className:"itsdesk-list__main",children:[(0,g.jsx)("strong",{children:s.subject}),(0,g.jsx)("span",{children:(s.customer_name||s.customer_email)+" · "+De(s.status)})]}),(0,g.jsx)("span",{className:"itsdesk-link",children:(0,i.__)("Merge into this","deskovi")})]})},s.id))})]})]}),_s&&(0,g.jsx)(pe,{name:"ticket.detail.meta",context:_s}),(0,g.jsx)("div",{className:"itsdesk-thread",children:de.messages.map((e,s)=>(0,g.jsxs)("div",{className:"itsdesk-bubble itsdesk-bubble--"+e.author+(e.internal?" is-internal":""),children:[(0,g.jsxs)("div",{className:"itsdesk-bubble__meta",children:[(0,g.jsx)("strong",{children:De(e.author)}),e.internal&&(0,g.jsx)("span",{children:(0,i.__)("internal","deskovi")}),(0,g.jsx)("span",{className:"itsdesk-bubble__time",children:$e(e.created_at)})]}),(0,g.jsx)("p",{children:e.body}),s>0&&"system"!==e.author&&(0,g.jsxs)("div",{className:"itsdesk-split",children:[(0,g.jsx)("button",{type:"button",className:"itsdesk-link","aria-expanded":Y===e.id,onClick:()=>{te(de.subject),ee(Y===e.id?null:e.id)},children:(0,i.__)("Split into a new ticket from here…","deskovi")}),Y===e.id&&(0,g.jsxs)("div",{className:"itsdesk-split__panel",children:[(0,g.jsx)("label",{htmlFor:"itsdesk-split-"+e.id,children:(0,i.__)("This message and every message after it move to a new ticket. Nobody is emailed. Subject of the new ticket:","deskovi")}),(0,g.jsx)("input",{id:"itsdesk-split-"+e.id,className:"itsdesk-input",type:"text",maxLength:255,value:se,onChange:e=>te(e.target.value)}),(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:ce,onClick:us,children:(0,i.__)("Split ticket","deskovi")})]})]}),e.attachments&&e.attachments.length>0&&(0,g.jsx)("div",{className:"itsdesk-attachment-list",children:e.attachments.map(e=>(0,g.jsxs)("a",{className:"itsdesk-attachment-chip itsdesk-attachment-chip--link",href:`${be}itsdesk/v1/attachments/${e.id}`,target:"_blank",rel:"noopener noreferrer",children:[e.mime_type.startsWith("image/")?(0,g.jsx)("img",{className:"itsdesk-attachment-thumb",src:`${be}itsdesk/v1/attachments/${e.id}`,alt:e.filename}):(0,g.jsx)(E,{}),(0,g.jsx)("span",{className:"itsdesk-attachment-name",children:e.filename}),(0,g.jsx)("span",{className:"itsdesk-attachment-size",children:p(e.size_bytes)})]},e.id))})]},e.id))}),(0,g.jsxs)("div",{className:"itsdesk-field",style:{marginTop:14},children:[(0,g.jsx)("label",{htmlFor:"itsdesk-tkt-reply",children:(0,i.__)("Reply","deskovi")}),(0,g.jsx)("input",{ref:ss,type:"file",multiple:!0,accept:"image/jpeg,image/png,image/gif,image/webp,application/pdf,text/plain",style:{display:"none"},onChange:s=>{(s=>{if(!s)return;const t=[];Array.from(s).forEach(s=>{const n=s.name.split(".").pop()?.toLowerCase()??"";s.size>5242880?e(`${s.name} ${(0,i.__)("is too large (max 5 MB).","deskovi")}`,"danger"):Me.includes(n)?t.push(s):e(`${s.name} ${(0,i.__)("is not an allowed type (jpg, jpeg, png, gif, webp, pdf, txt).","deskovi")}`,"danger")}),t.length>0&&Qe(e=>[...e,...t])})(s.target.files),s.target.value=""}}),Xe.length>0&&(0,g.jsx)("div",{className:"itsdesk-attachment-chips",children:Xe.map((e,s)=>(0,g.jsxs)("span",{className:"itsdesk-attachment-chip",children:[(0,g.jsx)(E,{size:13}),(0,g.jsx)("span",{className:"itsdesk-attachment-name",children:e.name}),(0,g.jsx)("span",{className:"itsdesk-attachment-size",children:p(e.size)}),(0,g.jsx)("button",{type:"button",className:"itsdesk-attachment-chip__remove",onClick:()=>{return e=s,void Qe(s=>s.filter((s,t)=>t!==e));var e},"aria-label":(0,i.__)("Remove file","deskovi"),children:"×"})]},s))}),(0,g.jsx)("textarea",{id:"itsdesk-tkt-reply",className:"itsdesk-textarea",rows:3,value:Ae,onChange:e=>Oe(e.target.value)})]}),(0,g.jsxs)("label",{className:"itsdesk-checkline",children:[(0,g.jsx)("input",{type:"checkbox",checked:We,onChange:e=>Ee(e.target.checked)}),(0,g.jsx)("span",{children:(0,i.__)("Internal note (not visible to customer)","deskovi")})]}),(0,g.jsxs)("div",{className:"itsdesk-admin__actions",children:[(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:ce||Ye||!Ae,onClick:()=>{if(!de)return;const s=de.id,t=[...Xe];var n,d;_e(!0),(n=s,d={body:Ae,internal:We},a()({path:`${o}/tickets/${n}/replies`,method:"POST",data:d})).then(async n=>{if(Oe(""),Ee(!1),Qe([]),_e(!1),e((0,i.__)("Reply sent.","deskovi")),t.length>0){const i=n.messages[n.messages.length-1]?.id;es(!0);for(const n of t)try{await m(s,n,i)}catch(s){e(r(s),"danger")}es(!1);try{const e=await u(s);oe(e)}catch(s){e(r(s),"danger")}}else oe(n);cs()}).catch(s=>{e(r(s),"danger"),_e(!1)})},children:Ye?(0,i.__)("Uploading files…","deskovi"):ce?(0,i.__)("Sending…","deskovi"):(0,i.__)("Send reply","deskovi")}),(0,g.jsxs)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary itsdesk-attach-btn",disabled:ce||Ye,onClick:()=>ss.current?.click(),"aria-label":(0,i.__)("Attach file","deskovi"),children:[(0,g.jsx)(D,{size:16}),(0,i.__)("Attach","deskovi")]}),(0,g.jsxs)("select",{className:"itsdesk-select",value:"",disabled:ce||Ye||0===ts.length,"aria-label":(0,i.__)("Insert canned reply","deskovi"),onChange:e=>{(e=>{if(!de||!e)return;const s=ts.find(s=>s.id===e);if(!s)return;const t=function(e,s,t){return e.split("{customer_name}").join(s.customer_name||s.customer_email).split("{customer_email}").join(s.customer_email).split("{order_id}").join(s.order_id?`#${s.order_id}`:"").split("{agent_name}").join(t)}(s.body,de,xe);Oe(e=>e?`${e}\n${t}`:t)})(e.target.value),e.target.value=""},children:[(0,g.jsx)("option",{value:"",children:(0,i.__)("Insert canned reply…","deskovi")}),ts.map(e=>(0,g.jsx)("option",{value:e.id,children:e.title},e.id))]}),_s&&(0,g.jsx)(pe,{name:"ticket.reply.toolbar",context:_s})]})]})]})]})]})}function Oe({initial:e,onSaved:s,onError:n}){const[d,r]=(0,t.useState)(e),[l,c]=(0,t.useState)(!1);return(0,g.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,g.jsx)("div",{className:"itsdesk-admin__row",children:(0,g.jsxs)("div",{children:[(0,g.jsx)("h2",{children:(0,i.__)("Widget","deskovi")}),(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Theme-safe launcher with lazy load after interaction — not another always-on chat bubble that taxes every page view.","deskovi")})]})}),(0,g.jsxs)("div",{className:"itsdesk-card",style:{marginTop:16},children:[(0,g.jsxs)("div",{className:"itsdesk-card__head",children:[(0,g.jsx)("h3",{children:(0,i.__)("Storefront launcher","deskovi")}),(0,g.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--"+(d.enabled?"ok":"neutral"),children:[(0,g.jsx)("span",{className:"itsdesk-badge__dot"}),d.enabled?(0,i.__)("Loads on storefront (skips checkout)","deskovi"):(0,i.__)("No frontend assets","deskovi")]})]}),(0,g.jsx)(Q,{id:"itsdesk-widget-enabled",checked:d.enabled,label:(0,i.__)("Enable support widget","deskovi"),description:(0,i.__)("When off, Deskovi adds zero scripts on the storefront. When on, a lazy launcher appears (not on cart/checkout).","deskovi"),onChange:e=>r({...d,enabled:e})}),(0,g.jsxs)("div",{className:"itsdesk-field",style:{marginTop:14},children:[(0,g.jsx)("label",{htmlFor:"itsdesk-widget-placement",children:(0,i.__)("Placement","deskovi")}),(0,g.jsxs)("select",{id:"itsdesk-widget-placement",className:"itsdesk-select",value:d.placement,disabled:!d.enabled,onChange:e=>r({...d,placement:e.target.value}),children:[(0,g.jsx)("option",{value:"bottom-right",children:(0,i.__)("Bottom right","deskovi")}),(0,g.jsx)("option",{value:"bottom-left",children:(0,i.__)("Bottom left","deskovi")})]})]}),(0,g.jsxs)("div",{className:"itsdesk-field",children:[(0,g.jsx)("label",{htmlFor:"itsdesk-widget-theme",children:(0,i.__)("Theme","deskovi")}),(0,g.jsxs)("select",{id:"itsdesk-widget-theme",className:"itsdesk-select",value:d.theme,disabled:!d.enabled,onChange:e=>r({...d,theme:e.target.value}),children:[(0,g.jsx)("option",{value:"system",children:(0,i.__)("System","deskovi")}),(0,g.jsx)("option",{value:"light",children:(0,i.__)("Light","deskovi")}),(0,g.jsx)("option",{value:"dark",children:(0,i.__)("Dark","deskovi")})]})]}),(0,g.jsxs)("div",{className:"itsdesk-field",children:[(0,g.jsx)("label",{htmlFor:"itsdesk-widget-launcher-label",children:(0,i.__)("Launcher button label","deskovi")}),(0,g.jsx)("input",{id:"itsdesk-widget-launcher-label",className:"itsdesk-input",maxLength:40,value:d.launcher_label,disabled:!d.enabled,onChange:e=>r({...d,launcher_label:e.target.value})}),(0,g.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Leave empty to show an icon-only button. Add a short label like 'Chat with us' if you want text next to the icon.","deskovi")})]}),(0,g.jsx)("div",{className:"itsdesk-health",style:{marginTop:8},children:(0,g.jsxs)("div",{children:[(0,g.jsx)("strong",{children:(0,i.__)("Live behavior","deskovi")}),(0,g.jsx)("p",{children:(0,i.__)("Logged-in shoppers and verified guests (order + email OTP) can open tickets. Unread badges poll while the panel is open. Full UI loads only after the launcher is opened; cart/checkout never get the bundle.","deskovi")})]})})]}),(0,g.jsx)("div",{className:"itsdesk-admin__actions",children:(0,g.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:l,onClick:()=>{var e;c(!0),(e=d,a()({path:`${o}/widget`,method:"POST",data:e})).then(e=>{s(e),r(e),c(!1)}).catch(e=>{n(e?.message||(0,i.__)("Save failed.","deskovi")),c(!1)})},children:l?(0,i.__)("Saving…","deskovi"):(0,i.__)("Save widget settings","deskovi")})})]})}const We=[{id:"work",label:(0,i.__)("Work","deskovi")},{id:"insights",label:(0,i.__)("Insights","deskovi")},{id:"automate",label:(0,i.__)("Automate","deskovi")},{id:"channels",label:(0,i.__)("Channels","deskovi")},{id:"settings",label:(0,i.__)("Settings","deskovi")}],Ee=[{id:"tickets",label:(0,i.__)("Tickets","deskovi"),icon:(0,g.jsx)($,{size:17}),group:"work",order:10},{id:"macros",label:(0,i.__)("Canned Replies","deskovi"),icon:(0,g.jsx)(I,{size:17}),group:"work",order:20},{id:"activity",label:(0,i.__)("Activity","deskovi"),icon:(0,g.jsx)(C,{size:17}),group:"insights",order:10},{id:"widget",label:(0,i.__)("Widget","deskovi"),icon:(0,g.jsx)(f,{size:17}),group:"channels",order:10},{id:"notifications",label:(0,i.__)("Notifications","deskovi"),icon:(0,g.jsx)(A,{size:17}),group:"settings",order:10},{id:"privacy",label:(0,i.__)("Data & Privacy","deskovi"),icon:(0,g.jsx)(w,{size:17}),group:"settings",order:20},{id:"diagnostics",label:(0,i.__)("Diagnostics","deskovi"),icon:(0,g.jsx)(N,{size:17}),group:"settings",order:30},{id:"docs",label:(0,i.__)("Docs & Features","deskovi"),icon:(0,g.jsx)(E,{size:17}),group:"settings",order:40}],Fe={id:"overview",label:(0,i.__)("Overview","deskovi"),icon:(0,g.jsx)(S,{size:17})};function ze(){const e=window.location.hash.replace(/^#\/?/,"");return/^[a-z0-9_-]{1,40}$/.test(e)?e:"overview"}function Re(){he();const e=Array.from(se.values()).sort((e,s)=>ke(e,s)).map(e=>({id:e.id,label:e.label,icon:e.icon??(0,g.jsx)(E,{size:17}),group:We.some(s=>s.id===e.group)?e.group:"settings",order:e.order??500})),s=[...Ee,...e],n=We.map(e=>({...e,items:s.filter(s=>s.group===e.id).sort((e,s)=>e.order-s.order)})).filter(e=>e.items.length>0),[d,r]=(0,t.useState)(ze),l=(0,t.useCallback)(e=>{r(e),window.history.replaceState(null,"","overview"===e?window.location.pathname+window.location.search:"#/"+e)},[]),[c,h]=(0,t.useState)(null),[k,u]=(0,t.useState)(null),[_,m]=(0,t.useState)(!0),[v,p]=(0,t.useState)(null),[y,f]=(0,t.useState)("ok"),w=(0,t.useCallback)((e,s="ok")=>{f(s),p(e)},[]),N=(0,t.useCallback)(()=>{m(!0),u(null),a()({path:`${o}/overview`}).then(e=>{h(e),m(!1)}).catch(e=>{u(e?.message||(0,i.__)("Failed to load Deskovi admin data.","deskovi")),m(!1)})},[]);(0,t.useEffect)(()=>{N()},[N]),(0,t.useEffect)(()=>{const e=()=>r(ze());return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]);let C=null;if(_&&!c)C=(0,g.jsx)(x,{});else if(k&&!c)C=(0,g.jsx)("div",{className:"itsdesk-admin__error",children:k});else if(c)switch(d){case"tickets":C=(0,g.jsx)(Ae,{onToast:w});break;case"widget":C=(0,g.jsx)(Oe,{initial:c.widget,onSaved:e=>{h({...c,widget:e}),w((0,i.__)("Widget settings saved.","deskovi"))},onError:e=>w(e,"danger")});break;case"privacy":C=(0,g.jsx)(Pe,{initial:c.privacy,onSaved:e=>{h({...c,privacy:e}),w((0,i.__)("Privacy settings saved.","deskovi"))},onError:e=>w(e,"danger")});break;case"notifications":C=(0,g.jsx)(we,{onToast:w});break;case"macros":C=(0,g.jsx)(fe,{onToast:w});break;case"diagnostics":C=(0,g.jsx)(X,{onToast:w});break;case"activity":C=(0,g.jsx)(J,{});break;case"docs":C=(0,g.jsx)(ye,{});break;default:C=_e(d)?(0,g.jsx)(ve,{id:d,onToast:w}):(0,g.jsx)(Te,{data:c,onNavigate:l,onRefresh:N})}return(0,g.jsxs)("div",{className:"itsdesk-admin",children:[(0,g.jsxs)("div",{className:"itsdesk-admin__shell",children:[(0,g.jsxs)("aside",{className:"itsdesk-admin__side",children:[(0,g.jsxs)("div",{className:"itsdesk-admin__brand",children:[(0,g.jsx)("div",{className:"itsdesk-admin__logo","aria-hidden":"true",children:(0,g.jsx)(b,{size:20})}),(0,g.jsxs)("div",{children:[(0,g.jsx)("h1",{children:(0,i.__)("Deskovi","deskovi")}),(0,g.jsx)("span",{className:"itsdesk-admin__version",children:"v"+(window.itsdeskAdmin?.version??"")})]})]}),(0,g.jsxs)("nav",{className:"itsdesk-admin__nav","aria-label":(0,i.__)("Deskovi sections","deskovi"),children:[(0,g.jsx)("div",{className:"itsdesk-admin__nav-group",children:(0,g.jsxs)("button",{type:"button",className:"itsdesk-admin__nav-btn"+(d===Fe.id?" is-active":""),"aria-current":d===Fe.id?"page":void 0,onClick:()=>l(Fe.id),children:[Fe.icon,(0,g.jsx)("span",{children:Fe.label})]},Fe.id)}),n.map(e=>(0,g.jsxs)("div",{className:"itsdesk-admin__nav-group",role:"group","aria-label":e.label,children:[(0,g.jsx)("span",{className:"itsdesk-admin__nav-label",children:e.label}),e.items.map(e=>(0,g.jsxs)("button",{type:"button",className:"itsdesk-admin__nav-btn"+(d===e.id?" is-active":""),"aria-current":d===e.id?"page":void 0,onClick:()=>l(e.id),children:[e.icon,(0,g.jsx)("span",{children:e.label})]},e.id))]},e.id))]})]}),(0,g.jsx)("main",{className:"itsdesk-admin__main",children:(0,g.jsx)("div",{className:"itsdesk-admin__panel",children:C},d)})]}),(0,g.jsx)(j,{message:v,tone:y,onDismiss:()=>p(null)})]})}const Be=document.getElementById("itsdesk-admin-root");Be&&(0,t.createRoot)(Be).render((0,g.jsx)(Re,{}))})();
     10(0,i.__)("%d ticket(s) found","deskovi"),d)}),(0,y.jsxs)("div",{className:"itsdesk-tickets",children:[(0,y.jsxs)("aside",{className:"itsdesk-tickets__list",children:[s.length>0&&(0,y.jsxs)("label",{className:"itsdesk-checkline",style:{marginBottom:8},children:[(0,y.jsx)("input",{type:"checkbox",checked:s.length>0&&as.length===s.length,onChange:()=>ds(as.length===s.length?[]:s.map(e=>e.id))}),(0,y.jsx)("span",{children:(0,i.__)("Select all","deskovi")})]}),as.length>0&&(0,y.jsxs)("div",{className:"itsdesk-bulk-bar",children:[(0,y.jsx)("span",{children:(0,i.sprintf)(/* translators: %d: number of selected tickets */ /* translators: %d: number of selected tickets */
     11(0,i.__)("%d selected","deskovi"),as.length)}),(0,y.jsxs)("select",{className:"itsdesk-select",value:"",onChange:s=>{var t;(t=s.target.value)&&function(e,s){return a()({path:`${o}/tickets/bulk`,method:"POST",data:{ids:e,action:"set_status",status:s}})}(as,t).then(()=>{e((0,i.__)("Status updated for selected tickets.","deskovi")),hs()}).catch(s=>e(r(s),"danger"))},children:[(0,y.jsx)("option",{value:"",children:(0,i.__)("Set status…","deskovi")}),(0,y.jsx)("option",{value:"open",children:(0,i.__)("Open","deskovi")}),(0,y.jsx)("option",{value:"pending",children:(0,i.__)("Pending","deskovi")}),(0,y.jsx)("option",{value:"resolved",children:(0,i.__)("Resolved","deskovi")}),(0,y.jsx)("option",{value:"closed",children:(0,i.__)("Closed","deskovi")})]}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--danger",onClick:()=>{var s;window.confirm((0,i.sprintf)(/* translators: %d: number of tickets to delete */ /* translators: %d: number of tickets to delete */
     12(0,i.__)("Delete %d ticket(s)? This can't be undone.","deskovi"),as.length))&&(s=as,a()({path:`${o}/tickets/bulk`,method:"POST",data:{ids:s,action:"delete"}})).then(()=>{e((0,i.__)("Selected tickets deleted.","deskovi")),hs()}).catch(s=>e(r(s),"danger"))},children:(0,i.__)("Delete","deskovi")}),Array.from(re.values()).sort((e,s)=>ve(e,s)).map(t=>(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--"+("danger"===t.tone?"danger":"secondary"),onClick:()=>(async t=>{try{await t.run({selectedIds:as,tickets:s.filter(e=>as.includes(e.id)),onToast:e,reload:hs,clearSelection:()=>ds([]),ctx:ge})}catch(s){e(r(s),"danger")}})(t),children:t.label},t.id))]}),oe&&s.length>0&&(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Loading…","deskovi")}),0===s.length?(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:ls?(0,i.__)("No tickets match this search/filter.","deskovi"):(0,i.__)("No tickets yet. Create one to test the bridge.","deskovi")}):s.map(e=>{return(0,y.jsxs)("div",{className:"itsdesk-ticket-row"+(ie===e.id?" is-active":""),children:[(0,y.jsx)("input",{type:"checkbox","aria-label":(0,i.sprintf)(/* translators: %s: ticket subject */ /* translators: %s: ticket subject */(0,i.__)("Select ticket: %s","deskovi"),e.subject),checked:as.includes(e.id),onClick:e=>e.stopPropagation(),onChange:()=>{return s=e.id,void ds(e=>e.includes(s)?e.filter(e=>e!==s):[...e,s]);var s}}),(0,y.jsxs)("div",{className:"itsdesk-ticket-row__content",role:"button",tabIndex:0,"aria-pressed":ie===e.id,onKeyDown:s=>{"Enter"!==s.key&&" "!==s.key||(s.preventDefault(),us(e.id))},onClick:()=>us(e.id),children:[(0,y.jsxs)("div",{className:"itsdesk-ticket-row__top",children:[(0,y.jsx)("strong",{children:e.subject}),(0,y.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--"+Ge(e.status),children:[(0,y.jsx)("span",{className:"itsdesk-badge__dot"}),Ke(e.status)]}),e.priority&&"normal"!==e.priority&&(0,y.jsx)("span",{className:"itsdesk-badge itsdesk-badge--"+(s=e.priority,"urgent"===s?"danger":"high"===s?"warn":"neutral"),children:Ze(e.priority)})]}),(0,y.jsxs)("div",{className:"itsdesk-ticket-row__meta",children:[(0,y.jsx)("span",{children:e.customer_name||e.customer_email||"—"}),(0,y.jsx)("span",{className:"itsdesk-badge itsdesk-badge--neutral",children:e.assigned_agent_name||(0,i.__)("Unassigned","deskovi")}),(0,y.jsx)(fe,{name:"ticket.list.rowExtra",context:{ticket:e,isOpen:ie===e.id}})]})]})]},e.id);var s}),k>1&&(0,y.jsxs)("div",{className:"itsdesk-pagination",children:[(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",disabled:c<=1||oe,onClick:()=>h(e=>Math.max(1,e-1)),children:(0,i.__)("Prev","deskovi")}),(0,y.jsx)("span",{children:(0,i.sprintf)(/* translators: 1: current page, 2: total pages */ /* translators: 1: current page, 2: total pages */
     13(0,i.__)("Page %1$d of %2$d","deskovi"),c,k)}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",disabled:c>=k||oe,onClick:()=>h(e=>Math.min(k,e+1)),children:(0,i.__)("Next","deskovi")})]})]}),(0,y.jsxs)("section",{className:"itsdesk-tickets__detail",children:[ke&&(0,y.jsxs)("div",{className:"itsdesk-card",children:[(0,y.jsx)("div",{className:"itsdesk-card__head",children:(0,y.jsx)("h3",{children:(0,i.__)("Create ticket","deskovi")})}),(0,y.jsxs)("div",{className:"itsdesk-field",children:[(0,y.jsx)("label",{htmlFor:"itsdesk-tkt-subject",children:(0,i.__)("Subject","deskovi")}),(0,y.jsx)("input",{id:"itsdesk-tkt-subject",className:"itsdesk-input",value:be,onChange:e=>ye(e.target.value)})]}),(0,y.jsxs)("div",{className:"itsdesk-field",children:[(0,y.jsx)("label",{htmlFor:"itsdesk-tkt-category",children:(0,i.__)("Category","deskovi")}),(0,y.jsx)("select",{id:"itsdesk-tkt-category",className:"itsdesk-select",value:Ce,onChange:e=>Se(e.target.value),children:S.filter(e=>!e.hidden).map(e=>(0,y.jsx)("option",{value:e.id,children:e.label},e.id))})]}),(0,y.jsxs)("div",{className:"itsdesk-field",children:[(0,y.jsx)("label",{htmlFor:"itsdesk-tkt-order",children:(0,i.__)("Order ID (optional)","deskovi")}),(0,y.jsx)("input",{id:"itsdesk-tkt-order",className:"itsdesk-input",value:Te,onChange:e=>Pe(e.target.value),placeholder:"1234"})]}),(0,y.jsxs)("div",{className:"itsdesk-field",children:[(0,y.jsx)("label",{htmlFor:"itsdesk-tkt-body",children:(0,i.__)("Message","deskovi")}),(0,y.jsx)("textarea",{id:"itsdesk-tkt-body",className:"itsdesk-textarea",rows:5,value:we,onChange:e=>Ne(e.target.value)})]}),(0,y.jsxs)("div",{className:"itsdesk-admin__actions",children:[(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:ce||!be||!we,onClick:()=>{var s;he(!0),(s={subject:be,body:we,category:Ce,order_id:Te?parseInt(Te,10):void 0},a()({path:`${o}/tickets`,method:"POST",data:s})).then(s=>{e((0,i.__)("Ticket created.","deskovi")),ye(""),Ne(""),Pe(""),ue(!1),he(!1),hs(),us(s.id)}).catch(s=>{e(r(s),"danger"),he(!1)})},children:ce?(0,i.__)("Creating…","deskovi"):(0,i.__)("Create ticket","deskovi")}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--ghost",onClick:()=>ue(!1),children:(0,i.__)("Cancel","deskovi")})]})]}),!ke&&!ae&&(0,y.jsx)("div",{className:"itsdesk-tickets__empty",children:(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Select a ticket or create a new one to exercise the bridge.","deskovi")})}),!ke&&ae&&(0,y.jsxs)("div",{className:"itsdesk-card",children:[(0,y.jsxs)("div",{className:"itsdesk-card__head",children:[(0,y.jsx)("h3",{className:"itsdesk-card__title",children:ae.subject}),(0,y.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--"+Ge(ae.status),children:[(0,y.jsx)("span",{className:"itsdesk-badge__dot"}),Ke(ae.status)]})]}),(0,y.jsxs)("p",{className:"itsdesk-admin__muted",children:[ae.customer_name," · ",ae.customer_email,ae.order_id?` · Order #${ae.order_id}`:""," · ",Ke(ae.category)]}),ms&&(0,y.jsx)(fe,{name:"ticket.detail.header",context:ms}),(0,y.jsxs)("div",{className:"itsdesk-card",style:{marginTop:14},children:[(0,y.jsxs)("div",{className:"itsdesk-card__head",children:[(0,y.jsx)("h3",{children:(0,i.__)("Order context","deskovi")}),De&&(0,y.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--"+Ge(De.status),children:[(0,y.jsx)("span",{className:"itsdesk-badge__dot"}),Ke(De.status)]})]}),De?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("p",{className:"itsdesk-admin__muted",children:[(0,i.__)("Order","deskovi")," #",De.number," · ",De.currency," ",De.total,De.payment_method_title?` · ${De.payment_method_title}`:""]}),De.shipping_method?(0,y.jsxs)("p",{className:"itsdesk-admin__muted",children:[(0,i.__)("Shipping","deskovi"),":"," ",De.shipping_method]}):null,De.items?.length>0&&(0,y.jsx)("ul",{style:{margin:"8px 0",paddingLeft:18},children:De.items.map((e,s)=>(0,y.jsxs)("li",{children:[e.name," × ",e.quantity,e.sku?` (${e.sku})`:""]},s))}),De.billing&&(0,y.jsxs)("p",{className:"itsdesk-admin__muted",children:[(0,i.__)("Billing","deskovi"),":"," ",[De.billing.first_name,De.billing.last_name,De.billing.city,De.billing.country].filter(Boolean).join(", ")]}),De.phone&&(0,y.jsxs)("p",{className:"itsdesk-admin__muted",children:[(0,i.__)("Phone","deskovi"),":"," ",De.phone]}),!De.billing&&!De.phone&&(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Address/phone hidden by privacy settings.","deskovi")}),De.timeline&&De.timeline.length>0&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--ghost",onClick:()=>Je(e=>!e),children:Ue?(0,i.__)("Hide timeline","deskovi"):(0,i.__)("Show timeline","deskovi")}),Ue&&(0,y.jsx)("div",{className:"itsdesk-thread",children:De.timeline.map((e,s)=>(0,y.jsxs)("div",{className:"itsdesk-bubble",children:[(0,y.jsxs)("div",{className:"itsdesk-bubble__meta",children:[(0,y.jsx)("strong",{children:Ke(e.type)}),(0,y.jsx)("span",{className:"itsdesk-bubble__time",children:Ye(e.at)})]}),(0,y.jsx)("p",{children:e.message})]},s))})]}),ms&&(0,y.jsx)(fe,{name:"ticket.detail.order",context:ms}),xe&&(0,y.jsxs)("div",{className:"itsdesk-card",style:{marginTop:14},children:[(0,y.jsx)("div",{className:"itsdesk-card__head",children:(0,y.jsx)("h3",{children:(0,i.__)("Refund","deskovi")})}),(0,y.jsxs)("div",{className:"itsdesk-field",children:[(0,y.jsx)("label",{htmlFor:"itsdesk-refund-amount",children:(0,i.__)("Amount (leave blank for full remaining amount)","deskovi")}),(0,y.jsx)("input",{id:"itsdesk-refund-amount",className:"itsdesk-input",value:Ee,disabled:Oe||ce,onChange:e=>Fe(e.target.value),placeholder:"0.00"})]}),(0,y.jsxs)("div",{className:"itsdesk-field",children:[(0,y.jsx)("label",{htmlFor:"itsdesk-refund-reason",children:(0,i.__)("Reason (optional)","deskovi")}),(0,y.jsx)("input",{id:"itsdesk-refund-reason",className:"itsdesk-input",value:ze,disabled:Oe||ce,onChange:e=>Re(e.target.value)})]}),(0,y.jsxs)("div",{className:"itsdesk-admin__actions",children:[(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--danger",disabled:Oe||ce,onClick:()=>{if(!ae)return;const s=Ee.trim(),t=s?parseFloat(s):null;s&&(null===t||Number.isNaN(t)||t<=0)?e((0,i.__)("Enter a valid refund amount, or leave it blank for the full remaining amount.","deskovi"),"danger"):(We(!0),function(e,s,t){return a()({path:`${o}/tickets/${e}/order/refund`,method:"POST",data:{amount:s,reason:t}})}(ae.id,t,ze).then(s=>{de(s),Fe(""),Re(""),We(!1),e((0,i.__)("Refund issued.","deskovi")),hs()}).catch(s=>{e(r(s),"danger"),We(!1)}))},children:Oe?(0,i.__)("Processing…","deskovi"):(0,i.__)("Issue refund","deskovi")}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",disabled:Oe||ce,onClick:()=>{var s;ae&&(We(!0),(s=ae.id,a()({path:`${o}/tickets/${s}/order/resend-invoice`,method:"POST"})).then(s=>{de(s),We(!1),e((0,i.__)("Invoice email resent.","deskovi")),hs()}).catch(s=>{e(r(s),"danger"),We(!1)}))},children:(0,i.__)("Resend invoice","deskovi")})]})]}),(0,y.jsx)("div",{className:"itsdesk-admin__actions",children:(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary",disabled:Oe||ce,onClick:()=>{ae&&(We(!0),b(ae.id,null).then(s=>{s.ticket&&de(s.ticket),Ie(null),He(""),We(!1),e((0,i.__)("Order unlinked.","deskovi")),hs()}).catch(s=>{e(r(s),"danger"),We(!1)}))},children:(0,i.__)("Unlink order","deskovi")})})]}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("No order linked. Enter a WooCommerce order ID to attach context.","deskovi")}),(0,y.jsxs)("div",{className:"itsdesk-inline-form",children:[(0,y.jsxs)("div",{className:"itsdesk-field",children:[(0,y.jsx)("label",{htmlFor:"itsdesk-link-order",children:(0,i.__)("Order ID","deskovi")}),(0,y.jsx)("input",{id:"itsdesk-link-order",className:"itsdesk-input",value:Be,onChange:e=>He(e.target.value),placeholder:"1234"})]}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:Oe||ce||!Be.trim(),onClick:()=>{if(!ae)return;const s=Be.trim()?parseInt(Be.trim(),10):null;!Be.trim()||s&&!Number.isNaN(s)?(We(!0),b(ae.id,s).then(s=>{s.ticket&&de(s.ticket),Ie(s.order||null),He(s.order_id?String(s.order_id):""),We(!1),e(s.linked?(0,i.__)("Order linked.","deskovi"):(0,i.__)("Order unlinked.","deskovi")),hs()}).catch(s=>{e(r(s),"danger"),We(!1)})):e((0,i.__)("Enter a valid order ID.","deskovi"),"danger")},children:Oe?(0,i.__)("Linking…","deskovi"):(0,i.__)("Link order","deskovi")})]})]})]}),(0,y.jsxs)("div",{className:"itsdesk-meta-bar",children:[(0,y.jsxs)("div",{className:"itsdesk-field",children:[(0,y.jsx)("label",{htmlFor:"itsdesk-tkt-assignee",children:(0,i.__)("Assigned to","deskovi")}),(0,y.jsxs)("select",{id:"itsdesk-tkt-assignee",className:"itsdesk-select",value:ae.assigned_agent_id??"",disabled:ce,onChange:s=>{const t=s.target.value;var n;n=t?parseInt(t,10):null,ae&&(he(!0),function(e,s){return a()({path:`${o}/tickets/${e}/assign`,method:"POST",data:{agent_id:s}})}(ae.id,n).then(s=>{de(s),he(!1),e((0,i.__)("Assignment updated.","deskovi")),hs()}).catch(s=>{e(r(s),"danger"),he(!1)}))},children:[(0,y.jsx)("option",{value:"",children:(0,i.__)("Unassigned","deskovi")}),P.map(e=>(0,y.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,y.jsxs)("div",{className:"itsdesk-field",children:[(0,y.jsx)("label",{htmlFor:"itsdesk-tkt-priority",children:(0,i.__)("Priority","deskovi")}),(0,y.jsxs)("select",{id:"itsdesk-tkt-priority",className:"itsdesk-select",value:ae.priority??"normal",disabled:ce,onChange:s=>{return t=s.target.value,void(ae&&(he(!0),function(e,s){return a()({path:`${o}/tickets/${e}/priority`,method:"POST",data:{priority:s}})}(ae.id,t).then(s=>{de(s),he(!1),e((0,i.__)("Priority updated.","deskovi")),hs()}).catch(s=>{e(r(s),"danger"),he(!1)})));var t},children:[(0,y.jsx)("option",{value:"low",children:(0,i.__)("Low","deskovi")}),(0,y.jsx)("option",{value:"normal",children:(0,i.__)("Normal","deskovi")}),(0,y.jsx)("option",{value:"high",children:(0,i.__)("High","deskovi")}),(0,y.jsx)("option",{value:"urgent",children:(0,i.__)("Urgent","deskovi")})]})]})]}),(0,y.jsx)("div",{className:"itsdesk-admin__actions itsdesk-segmented",role:"group","aria-label":(0,i.__)("Status","deskovi"),children:["open","pending","resolved","closed"].map(s=>(0,y.jsx)("button",{type:"button",className:"itsdesk-btn"+(ae.status===s?" itsdesk-btn--primary":" itsdesk-btn--secondary"),disabled:ce||ae.status===s,onClick:()=>{return t=s,void(ae&&(he(!0),function(e,s){return a()({path:`${o}/tickets/${e}/status`,method:"POST",data:{status:s}})}(ae.id,t).then(s=>{de(s),he(!1),e((0,i.__)("Status updated.","deskovi")),hs()}).catch(s=>{e(r(s),"danger"),he(!1)})));var t},children:Ke(s)},s))}),(0,y.jsxs)("div",{className:"itsdesk-merge",children:[(0,y.jsx)("button",{type:"button",className:"itsdesk-link","aria-expanded":G,onClick:()=>Z(e=>!e),children:(0,i.__)("Merge into another ticket…","deskovi")}),G&&(0,y.jsxs)("div",{className:"itsdesk-merge__panel",children:[(0,y.jsx)("label",{htmlFor:"itsdesk-merge-search",children:(0,i.__)("Find the ticket this one belongs to","deskovi")}),(0,y.jsx)("input",{id:"itsdesk-merge-search",className:"itsdesk-input",type:"search",value:Y,placeholder:ae.customer_email,onChange:e=>K(e.target.value)}),0===J.length?(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("No other tickets found. Try a subject, a name or an email.","deskovi")}):(0,y.jsx)("ul",{className:"itsdesk-list",children:J.map(s=>(0,y.jsx)("li",{children:(0,y.jsxs)("button",{type:"button",disabled:ce,onClick:()=>{return t=s,void(ae&&window.confirm((0,i.sprintf)(/* translators: 1: this ticket, 2: the ticket it goes into */ /* translators: 1: this ticket, 2: the ticket it goes into */(0,i.__)('Move all messages and files of "%1$s" into "%2$s" and delete "%1$s"? This cannot be undone. Nobody is emailed.',"deskovi"),ae.subject,t.subject))&&(he(!0),(n=ae.id,d=t.id,a()({path:`${o}/tickets/${n}/merge`,method:"POST",data:{into:d}})).then(()=>{e((0,i.__)("Tickets merged.","deskovi")),Z(!1),hs(),us(t.id)}).catch(s=>{e(r(s),"danger"),he(!1)})));var t,n,d},children:[(0,y.jsxs)("span",{className:"itsdesk-list__main",children:[(0,y.jsx)("strong",{children:s.subject}),(0,y.jsx)("span",{children:(s.customer_name||s.customer_email)+" · "+Ke(s.status)})]}),(0,y.jsx)("span",{className:"itsdesk-link",children:(0,i.__)("Merge into this","deskovi")})]})},s.id))})]})]}),(0,y.jsx)(qe,{answers:ae.form_answers}),ms&&(0,y.jsx)(fe,{name:"ticket.detail.meta",context:ms}),(0,y.jsx)("div",{className:"itsdesk-thread",children:ae.messages.map((e,s)=>(0,y.jsxs)("div",{className:"itsdesk-bubble itsdesk-bubble--"+e.author+(e.internal?" is-internal":""),children:[(0,y.jsxs)("div",{className:"itsdesk-bubble__meta",children:[(0,y.jsx)("strong",{children:Ke(e.author)}),e.internal&&(0,y.jsx)("span",{children:(0,i.__)("internal","deskovi")}),(0,y.jsx)("span",{className:"itsdesk-bubble__time",children:Ye(e.created_at)})]}),(0,y.jsx)("p",{children:e.body}),s>0&&"system"!==e.author&&(0,y.jsxs)("div",{className:"itsdesk-split",children:[(0,y.jsx)("button",{type:"button",className:"itsdesk-link","aria-expanded":X===e.id,onClick:()=>{te(ae.subject),ee(X===e.id?null:e.id)},children:(0,i.__)("Split into a new ticket from here…","deskovi")}),X===e.id&&(0,y.jsxs)("div",{className:"itsdesk-split__panel",children:[(0,y.jsx)("label",{htmlFor:"itsdesk-split-"+e.id,children:(0,i.__)("This message and every message after it move to a new ticket. Nobody is emailed. Subject of the new ticket:","deskovi")}),(0,y.jsx)("input",{id:"itsdesk-split-"+e.id,className:"itsdesk-input",type:"text",maxLength:255,value:se,onChange:e=>te(e.target.value)}),(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:ce,onClick:_s,children:(0,i.__)("Split ticket","deskovi")})]})]}),e.attachments&&e.attachments.length>0&&(0,y.jsx)("div",{className:"itsdesk-attachment-list",children:e.attachments.map(e=>(0,y.jsxs)("a",{className:"itsdesk-attachment-chip itsdesk-attachment-chip--link",href:`${je}itsdesk/v1/attachments/${e.id}`,target:"_blank",rel:"noopener noreferrer",children:[e.mime_type.startsWith("image/")?(0,y.jsx)("img",{className:"itsdesk-attachment-thumb",src:`${je}itsdesk/v1/attachments/${e.id}`,alt:e.filename}):(0,y.jsx)(H,{}),(0,y.jsx)("span",{className:"itsdesk-attachment-name",children:e.filename}),(0,y.jsx)("span",{className:"itsdesk-attachment-size",children:f(e.size_bytes)})]},e.id))})]},e.id))}),(0,y.jsxs)("div",{className:"itsdesk-field",style:{marginTop:14},children:[(0,y.jsx)("label",{htmlFor:"itsdesk-tkt-reply",children:(0,i.__)("Reply","deskovi")}),(0,y.jsx)("input",{ref:ts,type:"file",multiple:!0,accept:"image/jpeg,image/png,image/gif,image/webp,application/pdf,text/plain",style:{display:"none"},onChange:s=>{(s=>{if(!s)return;const t=[];Array.from(s).forEach(s=>{const n=s.name.split(".").pop()?.toLowerCase()??"";s.size>5242880?e(`${s.name} ${(0,i.__)("is too large (max 5 MB).","deskovi")}`,"danger"):Ve.includes(n)?t.push(s):e(`${s.name} ${(0,i.__)("is not an allowed type (jpg, jpeg, png, gif, webp, pdf, txt).","deskovi")}`,"danger")}),t.length>0&&Xe(e=>[...e,...t])})(s.target.files),s.target.value=""}}),Qe.length>0&&(0,y.jsx)("div",{className:"itsdesk-attachment-chips",children:Qe.map((e,s)=>(0,y.jsxs)("span",{className:"itsdesk-attachment-chip",children:[(0,y.jsx)(H,{size:13}),(0,y.jsx)("span",{className:"itsdesk-attachment-name",children:e.name}),(0,y.jsx)("span",{className:"itsdesk-attachment-size",children:f(e.size)}),(0,y.jsx)("button",{type:"button",className:"itsdesk-attachment-chip__remove",onClick:()=>{return e=s,void Xe(s=>s.filter((s,t)=>t!==e));var e},"aria-label":(0,i.__)("Remove file","deskovi"),children:"×"})]},s))}),(0,y.jsx)("textarea",{id:"itsdesk-tkt-reply",className:"itsdesk-textarea",rows:3,value:Me,onChange:e=>$e(e.target.value)})]}),(0,y.jsxs)("label",{className:"itsdesk-checkline",children:[(0,y.jsx)("input",{type:"checkbox",checked:Ae,onChange:e=>Le(e.target.checked)}),(0,y.jsx)("span",{children:(0,i.__)("Internal note (not visible to customer)","deskovi")})]}),(0,y.jsxs)("div",{className:"itsdesk-admin__actions",children:[(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:ce||es||!Me,onClick:()=>{if(!ae)return;const s=ae.id,t=[...Qe];var n,d;he(!0),(n=s,d={body:Me,internal:Ae},a()({path:`${o}/tickets/${n}/replies`,method:"POST",data:d})).then(async n=>{if($e(""),Le(!1),Xe([]),he(!1),e((0,i.__)("Reply sent.","deskovi")),t.length>0){const i=n.messages[n.messages.length-1]?.id;ss(!0);for(const n of t)try{await j(s,n,i)}catch(s){e(r(s),"danger")}ss(!1);try{const e=await g(s);de(e)}catch(s){e(r(s),"danger")}}else de(n);hs()}).catch(s=>{e(r(s),"danger"),he(!1)})},children:es?(0,i.__)("Uploading files…","deskovi"):ce?(0,i.__)("Sending…","deskovi"):(0,i.__)("Send reply","deskovi")}),(0,y.jsxs)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--secondary itsdesk-attach-btn",disabled:ce||es,onClick:()=>ts.current?.click(),"aria-label":(0,i.__)("Attach file","deskovi"),children:[(0,y.jsx)(F,{size:16}),(0,i.__)("Attach","deskovi")]}),(0,y.jsxs)("select",{className:"itsdesk-select",value:"",disabled:ce||es||0===is.length,"aria-label":(0,i.__)("Insert canned reply","deskovi"),onChange:e=>{(e=>{if(!ae||!e)return;const s=is.find(s=>s.id===e);if(!s)return;const t=function(e,s,t){return e.split("{customer_name}").join(s.customer_name||s.customer_email).split("{customer_email}").join(s.customer_email).split("{order_id}").join(s.order_id?`#${s.order_id}`:"").split("{agent_name}").join(t)}(s.body,ae,me);$e(e=>e?`${e}\n${t}`:t)})(e.target.value),e.target.value=""},children:[(0,y.jsx)("option",{value:"",children:(0,i.__)("Insert canned reply…","deskovi")}),is.map(e=>(0,y.jsx)("option",{value:e.id,children:e.title},e.id))]}),ms&&(0,y.jsx)(fe,{name:"ticket.reply.toolbar",context:ms})]})]})]})]})]})}function Qe({initial:e,onSaved:s,onError:n,onToast:a}){const[d,o]=(0,t.useState)(e),[r,c]=(0,t.useState)(!1);return(0,y.jsxs)("div",{className:"itsdesk-admin__panel-inner",children:[(0,y.jsx)("div",{className:"itsdesk-admin__row",children:(0,y.jsxs)("div",{children:[(0,y.jsx)("h2",{children:(0,i.__)("Widget","deskovi")}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Theme-safe launcher with lazy load after interaction — not another always-on chat bubble that taxes every page view.","deskovi")})]})}),(0,y.jsxs)("div",{className:"itsdesk-card",style:{marginTop:16},children:[(0,y.jsxs)("div",{className:"itsdesk-card__head",children:[(0,y.jsx)("h3",{children:(0,i.__)("Storefront launcher","deskovi")}),(0,y.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--"+(d.enabled?"ok":"neutral"),children:[(0,y.jsx)("span",{className:"itsdesk-badge__dot"}),d.enabled?(0,i.__)("Loads on storefront (skips checkout)","deskovi"):(0,i.__)("No frontend assets","deskovi")]})]}),(0,y.jsx)(ie,{id:"itsdesk-widget-enabled",checked:d.enabled,label:(0,i.__)("Enable support widget","deskovi"),description:(0,i.__)("When off, Deskovi adds zero scripts on the storefront. When on, a lazy launcher appears (not on cart/checkout).","deskovi"),onChange:e=>o({...d,enabled:e})}),(0,y.jsxs)("div",{className:"itsdesk-field",style:{marginTop:14},children:[(0,y.jsx)("label",{htmlFor:"itsdesk-widget-placement",children:(0,i.__)("Placement","deskovi")}),(0,y.jsxs)("select",{id:"itsdesk-widget-placement",className:"itsdesk-select",value:d.placement,disabled:!d.enabled,onChange:e=>o({...d,placement:e.target.value}),children:[(0,y.jsx)("option",{value:"bottom-right",children:(0,i.__)("Bottom right","deskovi")}),(0,y.jsx)("option",{value:"bottom-left",children:(0,i.__)("Bottom left","deskovi")})]})]}),(0,y.jsxs)("div",{className:"itsdesk-field",children:[(0,y.jsx)("label",{htmlFor:"itsdesk-widget-theme",children:(0,i.__)("Theme","deskovi")}),(0,y.jsxs)("select",{id:"itsdesk-widget-theme",className:"itsdesk-select",value:d.theme,disabled:!d.enabled,onChange:e=>o({...d,theme:e.target.value}),children:[(0,y.jsx)("option",{value:"system",children:(0,i.__)("System","deskovi")}),(0,y.jsx)("option",{value:"light",children:(0,i.__)("Light","deskovi")}),(0,y.jsx)("option",{value:"dark",children:(0,i.__)("Dark","deskovi")})]})]}),(0,y.jsxs)("div",{className:"itsdesk-field",children:[(0,y.jsx)("label",{htmlFor:"itsdesk-widget-launcher-label",children:(0,i.__)("Launcher button label","deskovi")}),(0,y.jsx)("input",{id:"itsdesk-widget-launcher-label",className:"itsdesk-input",maxLength:40,value:d.launcher_label,disabled:!d.enabled,onChange:e=>o({...d,launcher_label:e.target.value})}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",children:(0,i.__)("Leave empty to show an icon-only button. Add a short label like 'Chat with us' if you want text next to the icon.","deskovi")})]}),(0,y.jsx)("div",{className:"itsdesk-health",style:{marginTop:8},children:(0,y.jsxs)("div",{children:[(0,y.jsx)("strong",{children:(0,i.__)("Live behavior","deskovi")}),(0,y.jsx)("p",{children:(0,i.__)("Logged-in shoppers and verified guests (order + email OTP) can open tickets. Unread badges poll while the panel is open. Full UI loads only after the launcher is opened; cart/checkout never get the bundle.","deskovi")})]})})]}),(0,y.jsxs)("div",{className:"itsdesk-card",style:{marginTop:16},children:[(0,y.jsxs)("div",{className:"itsdesk-card__head",children:[(0,y.jsx)("h3",{children:(0,i.__)("My Account","deskovi")}),(0,y.jsxs)("span",{className:"itsdesk-badge itsdesk-badge--"+(d.account_portal?"ok":"neutral"),children:[(0,y.jsx)("span",{className:"itsdesk-badge__dot"}),d.account_portal?(0,i.__)("On","deskovi"):(0,i.__)("Off","deskovi")]})]}),(0,y.jsx)(ie,{id:"itsdesk-account-portal",checked:d.account_portal,label:(0,i.__)('Support tab and "Get help" on orders',"deskovi"),description:(0,i.__)('Adds a Support tab to WooCommerce My Account where customers see, open and reply to their tickets, and a "Get help" button on each order that starts a ticket already linked to it. Works even when the launcher above is off.',"deskovi"),onChange:e=>o({...d,account_portal:e})}),(0,y.jsx)("p",{className:"itsdesk-admin__muted",style:{marginTop:10},children:(0,i.__)('To show the same panel on any page, add the "Deskovi support" block or the [deskovi_support] shortcode. Use [deskovi_support view="new"] to open the new ticket form first.',"deskovi")})]}),(0,y.jsxs)("div",{className:"itsdesk-card",style:{marginTop:16},children:[(0,y.jsx)("div",{className:"itsdesk-card__head",children:(0,y.jsx)("h3",{children:(0,i.__)("Help articles","deskovi")})}),(0,y.jsx)(ie,{id:"itsdesk-help-suggestions",checked:d.help_suggestions,label:(0,i.__)("Suggest help articles while the customer writes","deskovi"),description:(0,i.__)("Shows up to three of your published help articles that match the subject (or the start of the message) in the new ticket form, wherever it appears: the launcher, My Account and the support block. Nothing shows until you publish articles under Deskovi → Help center.","deskovi"),onChange:e=>o({...d,help_suggestions:e})})]}),(0,y.jsx)("div",{className:"itsdesk-admin__actions",children:(0,y.jsx)("button",{type:"button",className:"itsdesk-btn itsdesk-btn--primary",disabled:r,onClick:()=>{c(!0),l(d).then(e=>{s(e),o(e),c(!1)}).catch(e=>{n(e?.message||(0,i.__)("Save failed.","deskovi")),c(!1)})},children:r?(0,i.__)("Saving…","deskovi"):(0,i.__)("Save widget settings","deskovi")})}),(0,y.jsx)(Le,{onToast:a}),(0,y.jsx)(Ue,{onToast:a})]})}const Xe=[{id:"work",label:(0,i.__)("Work","deskovi")},{id:"insights",label:(0,i.__)("Insights","deskovi")},{id:"automate",label:(0,i.__)("Automate","deskovi")},{id:"channels",label:(0,i.__)("Channels","deskovi")},{id:"settings",label:(0,i.__)("Settings","deskovi")}],es=[{id:"tickets",label:(0,i.__)("Tickets","deskovi"),icon:(0,y.jsx)(E,{size:17}),group:"work",order:10},{id:"macros",label:(0,i.__)("Canned Replies","deskovi"),icon:(0,y.jsx)(W,{size:17}),group:"work",order:20},{id:"help",label:(0,i.__)("Help center","deskovi"),icon:(0,y.jsx)(Y,{size:17}),group:"work",order:30},{id:"activity",label:(0,i.__)("Activity","deskovi"),icon:(0,y.jsx)($,{size:17}),group:"insights",order:10},{id:"widget",label:(0,i.__)("Widget","deskovi"),icon:(0,y.jsx)(T,{size:17}),group:"channels",order:10},{id:"notifications",label:(0,i.__)("Notifications","deskovi"),icon:(0,y.jsx)(z,{size:17}),group:"settings",order:10},{id:"privacy",label:(0,i.__)("Data & Privacy","deskovi"),icon:(0,y.jsx)(P,{size:17}),group:"settings",order:20},{id:"diagnostics",label:(0,i.__)("Diagnostics","deskovi"),icon:(0,y.jsx)(M,{size:17}),group:"settings",order:30},{id:"docs",label:(0,i.__)("Docs & Features","deskovi"),icon:(0,y.jsx)(H,{size:17}),group:"settings",order:40}],ss={id:"overview",label:(0,i.__)("Overview","deskovi"),icon:(0,y.jsx)(A,{size:17})};function ts(){const e=window.location.hash.replace(/^#\/?/,"");return/^[a-z0-9_-]{1,40}$/.test(e)?e:"overview"}function is(){pe();const e=Array.from(de.values()).sort((e,s)=>ve(e,s)).map(e=>({id:e.id,label:e.label,icon:e.icon??(0,y.jsx)(H,{size:17}),group:Xe.some(s=>s.id===e.group)?e.group:"settings",order:e.order??500})),s=[...es,...e],n=Xe.map(e=>({...e,items:s.filter(s=>s.group===e.id).sort((e,s)=>e.order-s.order)})).filter(e=>e.items.length>0),[d,r]=(0,t.useState)(ts),l=(0,t.useCallback)(e=>{r(e),window.history.replaceState(null,"","overview"===e?window.location.pathname+window.location.search:"#/"+e)},[]),[c,h]=(0,t.useState)(null),[k,u]=(0,t.useState)(null),[_,m]=(0,t.useState)(!0),[p,v]=(0,t.useState)(null),[g,x]=(0,t.useState)("ok"),j=(0,t.useCallback)((e,s="ok")=>{x(s),v(e)},[]),b=(0,t.useCallback)(()=>{m(!0),u(null),a()({path:`${o}/overview`}).then(e=>{h(e),m(!1)}).catch(e=>{u(e?.message||(0,i.__)("Failed to load Deskovi admin data.","deskovi")),m(!1)})},[]);(0,t.useEffect)(()=>{b()},[b]),(0,t.useEffect)(()=>{const e=()=>r(ts());return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]);let f=null;if(_&&!c)f=(0,y.jsx)(w,{});else if(k&&!c)f=(0,y.jsx)("div",{className:"itsdesk-admin__error",children:k});else if(c)switch(d){case"tickets":f=(0,y.jsx)(Je,{onToast:j});break;case"widget":f=(0,y.jsx)(Qe,{initial:c.widget,onSaved:e=>{h({...c,widget:e}),j((0,i.__)("Widget settings saved.","deskovi"))},onError:e=>j(e,"danger"),onToast:j});break;case"privacy":f=(0,y.jsx)(Fe,{initial:c.privacy,onSaved:e=>{h({...c,privacy:e}),j((0,i.__)("Privacy settings saved.","deskovi"))},onError:e=>j(e,"danger")});break;case"notifications":f=(0,y.jsx)(Me,{onToast:j});break;case"help":f=(0,y.jsx)(Te,{onToast:j});break;case"macros":f=(0,y.jsx)(Pe,{onToast:j});break;case"diagnostics":f=(0,y.jsx)(te,{onToast:j});break;case"activity":f=(0,y.jsx)(ee,{});break;case"docs":f=(0,y.jsx)(Se,{});break;default:f=xe(d)?(0,y.jsx)(be,{id:d,onToast:j}):(0,y.jsx)(Ee,{data:c,onNavigate:l,onRefresh:b})}return(0,y.jsxs)("div",{className:"itsdesk-admin",children:[(0,y.jsxs)("div",{className:"itsdesk-admin__shell",children:[(0,y.jsxs)("aside",{className:"itsdesk-admin__side",children:[(0,y.jsxs)("div",{className:"itsdesk-admin__brand",children:[(0,y.jsx)("div",{className:"itsdesk-admin__logo","aria-hidden":"true",children:(0,y.jsx)(C,{size:20})}),(0,y.jsxs)("div",{children:[(0,y.jsx)("h1",{children:(0,i.__)("Deskovi","deskovi")}),(0,y.jsx)("span",{className:"itsdesk-admin__version",children:"v"+(window.itsdeskAdmin?.version??"")})]})]}),(0,y.jsxs)("nav",{className:"itsdesk-admin__nav","aria-label":(0,i.__)("Deskovi sections","deskovi"),children:[(0,y.jsx)("div",{className:"itsdesk-admin__nav-group",children:(0,y.jsxs)("button",{type:"button",className:"itsdesk-admin__nav-btn"+(d===ss.id?" is-active":""),"aria-current":d===ss.id?"page":void 0,onClick:()=>l(ss.id),children:[ss.icon,(0,y.jsx)("span",{children:ss.label})]},ss.id)}),n.map(e=>(0,y.jsxs)("div",{className:"itsdesk-admin__nav-group",role:"group","aria-label":e.label,children:[(0,y.jsx)("span",{className:"itsdesk-admin__nav-label",children:e.label}),e.items.map(e=>(0,y.jsxs)("button",{type:"button",className:"itsdesk-admin__nav-btn"+(d===e.id?" is-active":""),"aria-current":d===e.id?"page":void 0,onClick:()=>l(e.id),children:[e.icon,(0,y.jsx)("span",{children:e.label})]},e.id))]},e.id))]})]}),(0,y.jsx)("main",{className:"itsdesk-admin__main",children:(0,y.jsx)("div",{className:"itsdesk-admin__panel",children:f},d)})]}),(0,y.jsx)(N,{message:p,tone:g,onDismiss:()=>v(null)})]})}const ns=document.getElementById("itsdesk-admin-root");ns&&(0,t.createRoot)(ns).render((0,y.jsx)(is,{}))})();
  • deskovi/trunk/assets/widget/loader.asset.php

    r3763520 r3843768  
    1 <?php return array('dependencies' => array(), 'version' => 'f8b6258e6accbe6d25e6');
     1<?php return array('dependencies' => array(), 'version' => 'b98a0a6e6d6d5c908ee7');
  • deskovi/trunk/assets/widget/loader.js

    r3763520 r3843768  
    1 (()=>{"use strict";var e={811(e,t,n){function o(){const e=window.itsdeskWidget;if(!e)throw new Error("itsdeskWidget bootstrap missing");return e}async function i(e,t={}){const n=o(),i={Accept:"application/json",...t.headers};n.nonce&&(i["X-WP-Nonce"]=n.nonce),t.body&&!i["Content-Type"]&&(i["Content-Type"]="application/json");const s=await fetch(function(e){return o().restRoot.replace(/\/?$/,"/")+e.replace(/^\//,"")}(e),{credentials:"same-origin",...t,headers:i}),r=await s.json().catch(()=>({}));if(!s.ok){const e=r&&(r.message||r.code)||n.i18n.error||"Request failed";throw new Error(String(e))}return r}function s(e){return i(e)}function r(e,t){return i(e,{method:"POST",body:void 0===t?void 0:JSON.stringify(t)})}function a(e=o()){return!!e.loggedIn||!!e.guestAuthenticated}function d(){return i("itsdesk/v1/customer/tickets")}function c(){return i("itsdesk/v1/customer/unread")}function l(e){return i(`itsdesk/v1/customer/tickets/${encodeURIComponent(e)}`)}function u(e){return i("itsdesk/v1/customer/tickets",{method:"POST",body:JSON.stringify(e)})}function h(e,t){return i(`itsdesk/v1/customer/tickets/${encodeURIComponent(e)}/replies`,{method:"POST",body:JSON.stringify({body:t})})}function p(){return i("itsdesk/v1/tickets/categories")}function f(){return i("itsdesk/v1/customer/orders")}function g(e){return i(`itsdesk/v1/customer/orders/${e}`)}function m(e,t){return i("itsdesk/v1/guest/verify/start",{method:"POST",body:JSON.stringify({order_id:e,email:t})})}function b(e,t,n){return i("itsdesk/v1/guest/verify/confirm",{method:"POST",body:JSON.stringify({order_id:e,email:t,code:n})})}n.d(t,{$P:()=>r,Gb:()=>f,HT:()=>b,RV:()=>h,Up:()=>c,Vg:()=>s,WS:()=>d,XD:()=>g,Z2:()=>u,a$:()=>a,jE:()=>p,nH:()=>m,vA:()=>l})},869(e,t,n){n.d(t,{Sk:()=>r,zk:()=>d});var o=n(811);const i=new Map;function s(e,t){if("ticket.create.aside"!==e||!t||!t.id||"function"!=typeof t.mount)return;const n=i.get(e)??new Map;n.set(t.id,t),i.set(e,n)}function r(e){return Array.from(i.get(e)?.values()??[]).sort((e,t)=>(e.order??100)-(t.order??100))}const a={get:o.Vg,post:o.$P};function d(){const e=window;e.itsdesk=e.itsdesk??{},e.itsdesk.widget={apiVersion:1,registerSlot:s}}n.d(t,["f6",0,a])}};const t={};function n(o){const i=t[o];if(void 0!==i)return i.exports;const s=t[o]={exports:{}};return e[o](s,s.exports,n),s.exports}n.m=e,n.d=(e,t)=>{if(Array.isArray(t))for(var o=0;o<t.length;){var i=t[o++],s=t[o++];n.o(e,i)?0===s&&o++:0===s?Object.defineProperty(e,i,{enumerable:!0,value:t[o++]}):Object.defineProperty(e,i,{enumerable:!0,get:s})}else for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,o)=>(n.f[o](e,t),t),[])),n.u=e=>"panel.js",n.miniCssF=e=>{},n.o=(e,t)=>Object.hasOwn(e,t),(()=>{const e={},t="deskovi:";n.l=(o,i,s,r)=>{if(e[o])return void e[o].push(i);let a,d;if(void 0!==s){const e=document.getElementsByTagName("script");for(var c=0;c<e.length;c++){const n=e[c];if(n.getAttribute("src")==o||n.getAttribute("data-webpack")==t+s){a=n;break}}}a||(d=!0,a=document.createElement("script"),a.charset="utf-8",n.nc&&a.setAttribute("nonce",n.nc),a.setAttribute("data-webpack",t+s),a.src=o),e[o]=[i];const l=(t,n)=>{a.onerror=a.onload=null,clearTimeout(u);const i=e[o];if(delete e[o],a.parentNode?.removeChild(a),i?.forEach(e=>e(n)),t)return t(n)},u=setTimeout(l.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=l.bind(null,a.onerror),a.onload=l.bind(null,a.onload),d&&document.head.appendChild(a)}})(),(()=>{let e;globalThis.importScripts&&(e=globalThis.location+"");const t=globalThis.document;if(!e&&t&&("SCRIPT"===t.currentScript?.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){const n=t.getElementsByTagName("script");if(n.length){let t=n.length-1;for(;t>-1&&(!e||!/^http(s?):/.test(e));)e=n[t--].src}}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{const e={494:0};n.f.j=(t,o)=>{let i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)o.push(i[2]);else{const s=new Promise((n,o)=>i=e[t]=[n,o]);o.push(i[2]=s);const r=n.p+n.u(t),a=new Error,d=o=>{if(n.o(e,t)&&(i=e[t],0!==i&&(e[t]=void 0),i)){const e=o&&("load"===o.type?"missing":o.type),n=o&&o.target&&o.target.src;a.message="Loading chunk "+t+" failed.\n("+e+": "+n+")",a.name="ChunkLoadError",a.type=e,a.request=n,i[1](a)}};n.l(r,d,"chunk-"+t,t)}};const t=(t,o)=>{let[i,s,r]=o;var a,d,c=0;if(i.some(t=>0!==e[t])){for(a in s)n.o(s,a)&&(n.m[a]=s[a]);r&&r(n)}for(t&&t(o);c<i.length;c++)d=i[c],n.o(e,d)&&e[d]&&e[d][0](),e[d]=0},o=globalThis.webpackChunkdeskovi||=[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var o=n(811),i=n(869);function s(){return window.itsdeskWidget||null}function r(e){e.assetUrl&&(n.p=e.assetUrl.endsWith("/")?e.assetUrl:e.assetUrl+"/")}class a extends HTMLElement{#e;#t=!1;#n=!1;#o=null;#i=0;#s=null;#r=null;#a=null;constructor(){super(),this.#e=this.attachShadow({mode:"open"})}connectedCallback(){if(this.#o=s(),!this.#o)return;r(this.#o);const e=document.body?getComputedStyle(document.body).fontFamily:"";var t;e&&this.style.setProperty("--dk-widget-font",`${e}, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Bengali", "Nirmala UI", sans-serif`),this.setAttribute("data-theme","dark"===(t=this.#o.theme)||"light"===t?t:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),this.renderFab(),this.onKey=this.onKey.bind(this),document.addEventListener("keydown",this.onKey),(0,o.a$)(this.#o)&&this.refreshUnread()}disconnectedCallback(){document.removeEventListener("keydown",this.onKey),this.stopPoll()}onKey(e){"Escape"===e.key&&this.#t&&this.closePanel()}renderFab(){const e=this.#o;if(!e)return;this.#e.innerHTML="";const t=document.createElement("style");t.textContent='\n:host{all:initial;font-family:var(--dk-widget-font,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Bengali", "Nirmala UI", sans-serif)}\n.dk-fab{position:fixed;z-index:99999;bottom:20px;min-width:52px;max-width:min(240px, calc(100vw - 40px));height:52px;padding:0 14px;border-radius:999px;border:none;cursor:pointer;background:#0f766e;color:#fff;box-shadow:0 8px 24px rgba(16,42,51,.22);display:inline-flex;align-items:center;justify-content:center;gap:6px;font-size:13px;font-weight:700}\n.dk-fab:hover{background:#0d5f59}\n.dk-fab.is-left{left:20px;right:auto}\n.dk-fab.is-right{right:20px;left:auto}\n.dk-fab.is-icon-only{width:52px;min-width:52px;max-width:52px;padding:0;border-radius:50%}\n.dk-fab-icon{display:flex;flex-shrink:0}\n.dk-fab-icon svg{display:block}\n.dk-fab-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}\n.dk-badge{min-width:18px;flex-shrink:0;height:18px;padding:0 5px;border-radius:999px;background:#b42318;color:#fff;font-size:11px;line-height:18px;font-weight:700}\n:host([data-theme="dark"]) .dk-fab{background:#2dd4bf;color:#102a33}\n',this.#e.appendChild(t);const n=(e.launcherLabel||"").trim(),o=document.createElement("button");o.type="button",o.className="dk-fab "+("bottom-left"===e.placement?"is-left":"is-right")+(n?"":" is-icon-only"),o.setAttribute("aria-label",n||e.i18n.support||"Support"),o.setAttribute("aria-expanded","false");const i=document.createElement("span");if(i.className="dk-fab-icon",i.innerHTML='<svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M4 7.5C4 5.567 5.567 4 7.5 4H16.5C18.433 4 20 5.567 20 7.5V13.5C20 15.433 18.433 17 16.5 17H11L7 20V17H7.5C5.567 17 4 15.433 4 13.5V7.5Z" stroke="currentColor" stroke-width="1.75" stroke-linejoin="round"/><path d="M8 9.5H16M8 12.5H13" stroke="currentColor" stroke-width="1.75" stroke-linecap="round"/></svg>',o.append(i),n){const e=document.createElement("span");e.className="dk-fab-label",e.textContent=n,o.append(e)}o.addEventListener("click",()=>{this.toggle()}),this.#r=o,this.#e.appendChild(o),this.renderBadge()}renderBadge(){if(!this.#r)return;if(this.#a?.remove(),this.#a=null,this.#i<=0)return;const e=document.createElement("span");e.className="dk-badge",e.textContent=this.#i>9?"9+":String(this.#i),e.setAttribute("aria-label",String(this.#i)),this.#r.appendChild(e),this.#a=e}async refreshUnread(){if(this.#o&&(0,o.a$)(this.#o))try{const e=await(0,o.Up)();this.#i=e.count||0,this.renderBadge()}catch{}}startPoll(){this.stopPoll(),this.#s=setInterval(()=>{this.refreshUnread()},3e4)}stopPoll(){this.#s&&(clearInterval(this.#s),this.#s=null)}closePanel(){const e=this.#e.querySelector(".dk-panel");e?.remove(),this.#t=!1,this.#r?.setAttribute("aria-expanded","false"),this.#r?.focus(),this.stopPoll(),this.refreshUnread()}async toggle(){if(this.#t)this.closePanel();else if(!this.#n&&this.#o){this.#n=!0;try{r(this.#o),(await n.e(407).then(n.bind(n,187))).mountPanel(this,this.#e,this.#o,()=>{this.#t=!1,this.#r?.setAttribute("aria-expanded","false"),this.#r?.focus(),this.stopPoll(),this.refreshUnread()}),this.#t=!0,this.#r?.setAttribute("aria-expanded","true"),(0,o.a$)(this.#o)&&(this.startPoll(),this.refreshUnread())}catch(e){console.error("[Deskovi] failed to load support panel",e)}finally{this.#n=!1}}}}function d(){const e=s();e&&(r(e),customElements.get("deskovi-support")||customElements.define("deskovi-support",a),document.querySelector("deskovi-support")||document.body.appendChild(document.createElement("deskovi-support")))}(0,i.zk)(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",d):d()})();
     1(()=>{"use strict";var e={811(e,t,n){function i(){const e=window.itsdeskWidget;if(!e)throw new Error("itsdeskWidget bootstrap missing");return e}async function o(e,t={}){const n=i(),o={Accept:"application/json",...t.headers};n.nonce&&(o["X-WP-Nonce"]=n.nonce),t.body&&!o["Content-Type"]&&(o["Content-Type"]="application/json");const s=await fetch(function(e){const t=i().restRoot.replace(/\/?$/,"/");let n=e.replace(/^\//,"");return t.includes("?")&&n.includes("?")&&(n=n.replace("?","&")),t+n}(e),{credentials:"same-origin",...t,headers:o}),r=await s.json().catch(()=>({}));if(!s.ok){const e=r&&(r.message||r.code)||n.i18n.error||"Request failed";throw new Error(String(e))}return r}function s(e){return o(`itsdesk/v1/help/search?q=${encodeURIComponent(e)}`)}function r(e){return o(e)}function a(e,t){return o(e,{method:"POST",body:void 0===t?void 0:JSON.stringify(t)})}function d(e=i()){return!!e.loggedIn||!!e.guestAuthenticated}function c(){return o("itsdesk/v1/customer/tickets")}function l(){return o("itsdesk/v1/customer/unread")}function h(e){return o(`itsdesk/v1/customer/tickets/${encodeURIComponent(e)}`)}function u(e){return o("itsdesk/v1/customer/tickets",{method:"POST",body:JSON.stringify(e)})}function p(e,t){return o(`itsdesk/v1/customer/tickets/${encodeURIComponent(e)}/replies`,{method:"POST",body:JSON.stringify({body:t})})}async function f(){const e=await o("itsdesk/v1/tickets/categories");return{categories:(e.categories||[]).filter(e=>!e.hidden),fields:Array.isArray(e.fields)?e.fields:[]}}function g(){return o("itsdesk/v1/customer/orders")}function m(e){return o(`itsdesk/v1/customer/orders/${e}`)}function b(e,t){return o("itsdesk/v1/guest/verify/start",{method:"POST",body:JSON.stringify({order_id:e,email:t})})}function k(e,t,n){return o("itsdesk/v1/guest/verify/confirm",{method:"POST",body:JSON.stringify({order_id:e,email:t,code:n})})}n.d(t,{$P:()=>a,Gb:()=>g,HT:()=>k,I0:()=>s,RV:()=>p,Up:()=>l,Vg:()=>r,WS:()=>c,XD:()=>m,Z2:()=>u,a$:()=>d,jE:()=>f,nH:()=>b,vA:()=>h})},869(e,t,n){n.d(t,{Sk:()=>r,zk:()=>d});var i=n(811);const o=new Map;function s(e,t){if("ticket.create.aside"!==e||!t||!t.id||"function"!=typeof t.mount)return;const n=o.get(e)??new Map;n.set(t.id,t),o.set(e,n)}function r(e){return Array.from(o.get(e)?.values()??[]).sort((e,t)=>(e.order??100)-(t.order??100))}const a={get:i.Vg,post:i.$P};function d(){const e=window;e.itsdesk=e.itsdesk??{},e.itsdesk.widget={apiVersion:1,registerSlot:s}}n.d(t,["f6",0,a])}};const t={};function n(i){const o=t[i];if(void 0!==o)return o.exports;const s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}n.m=e,n.d=(e,t)=>{if(Array.isArray(t))for(var i=0;i<t.length;){var o=t[i++],s=t[i++];n.o(e,o)?0===s&&i++:0===s?Object.defineProperty(e,o,{enumerable:!0,value:t[i++]}):Object.defineProperty(e,o,{enumerable:!0,get:s})}else for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,i)=>(n.f[i](e,t),t),[])),n.u=e=>"panel.js",n.miniCssF=e=>{},n.o=(e,t)=>Object.hasOwn(e,t),(()=>{const e={},t="deskovi:";n.l=(i,o,s,r)=>{if(e[i])return void e[i].push(o);let a,d;if(void 0!==s){const e=document.getElementsByTagName("script");for(var c=0;c<e.length;c++){const n=e[c];if(n.getAttribute("src")==i||n.getAttribute("data-webpack")==t+s){a=n;break}}}a||(d=!0,a=document.createElement("script"),a.charset="utf-8",n.nc&&a.setAttribute("nonce",n.nc),a.setAttribute("data-webpack",t+s),a.src=i),e[i]=[o];const l=(t,n)=>{a.onerror=a.onload=null,clearTimeout(h);const o=e[i];if(delete e[i],a.parentNode?.removeChild(a),o?.forEach(e=>e(n)),t)return t(n)},h=setTimeout(l.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=l.bind(null,a.onerror),a.onload=l.bind(null,a.onload),d&&document.head.appendChild(a)}})(),(()=>{let e;globalThis.importScripts&&(e=globalThis.location+"");const t=globalThis.document;if(!e&&t&&("SCRIPT"===t.currentScript?.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){const n=t.getElementsByTagName("script");if(n.length){let t=n.length-1;for(;t>-1&&(!e||!/^http(s?):/.test(e));)e=n[t--].src}}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{const e={494:0};n.f.j=(t,i)=>{let o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)i.push(o[2]);else{const s=new Promise((n,i)=>o=e[t]=[n,i]);i.push(o[2]=s);const r=n.p+n.u(t),a=new Error,d=i=>{if(n.o(e,t)&&(o=e[t],0!==o&&(e[t]=void 0),o)){const e=i&&("load"===i.type?"missing":i.type),n=i&&i.target&&i.target.src;a.message="Loading chunk "+t+" failed.\n("+e+": "+n+")",a.name="ChunkLoadError",a.type=e,a.request=n,o[1](a)}};n.l(r,d,"chunk-"+t,t)}};const t=(t,i)=>{let[o,s,r]=i;var a,d,c=0;if(o.some(t=>0!==e[t])){for(a in s)n.o(s,a)&&(n.m[a]=s[a]);r&&r(n)}for(t&&t(i);c<o.length;c++)d=o[c],n.o(e,d)&&e[d]&&e[d][0](),e[d]=0},i=globalThis.webpackChunkdeskovi||=[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var i=n(811),o=n(869);function s(){return window.itsdeskWidget||null}function r(e){e.assetUrl&&(n.p=e.assetUrl.endsWith("/")?e.assetUrl:e.assetUrl+"/")}class a extends HTMLElement{#e;#t=!1;#n=!1;#i=null;#o=0;#s=null;#r=null;#a=null;constructor(){super(),this.#e=this.attachShadow({mode:"open"})}connectedCallback(){if(this.#i=s(),!this.#i)return;r(this.#i);const e=document.body?getComputedStyle(document.body).fontFamily:"";var t;e&&this.style.setProperty("--dk-widget-font",`${e}, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Bengali", "Nirmala UI", sans-serif`),this.setAttribute("data-theme","dark"===(t=this.#i.theme)||"light"===t?t:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),this.hasAttribute("data-inline")?this.mountInline():(this.renderFab(),this.onKey=this.onKey.bind(this),document.addEventListener("keydown",this.onKey),(0,i.a$)(this.#i)&&this.refreshUnread())}disconnectedCallback(){document.removeEventListener("keydown",this.onKey),this.stopPoll()}onKey(e){"Escape"===e.key&&this.#t&&this.closePanel()}renderFab(){const e=this.#i;if(!e)return;this.#e.innerHTML="";const t=document.createElement("style");t.textContent='\n:host{all:initial;font-family:var(--dk-widget-font,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Bengali", "Nirmala UI", sans-serif)}\n.dk-fab{position:fixed;z-index:99999;bottom:20px;min-width:52px;max-width:min(240px, calc(100vw - 40px));height:52px;padding:0 14px;border-radius:999px;border:none;cursor:pointer;background:#0f766e;color:#fff;box-shadow:0 8px 24px rgba(16,42,51,.22);display:inline-flex;align-items:center;justify-content:center;gap:6px;font-size:13px;font-weight:700}\n.dk-fab:hover{background:#0d5f59}\n.dk-fab.is-left{left:20px;right:auto}\n.dk-fab.is-right{right:20px;left:auto}\n.dk-fab.is-icon-only{width:52px;min-width:52px;max-width:52px;padding:0;border-radius:50%}\n.dk-fab-icon{display:flex;flex-shrink:0}\n.dk-fab-icon svg{display:block}\n.dk-fab-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}\n.dk-badge{min-width:18px;flex-shrink:0;height:18px;padding:0 5px;border-radius:999px;background:#b42318;color:#fff;font-size:11px;line-height:18px;font-weight:700}\n:host([data-theme="dark"]) .dk-fab{background:#2dd4bf;color:#102a33}\n',this.#e.appendChild(t);const n=(e.launcherLabel||"").trim(),i=document.createElement("button");i.type="button",i.className="dk-fab "+("bottom-left"===e.placement?"is-left":"is-right")+(n?"":" is-icon-only"),i.setAttribute("aria-label",n||e.i18n.support||"Support"),i.setAttribute("aria-expanded","false");const o=document.createElement("span");if(o.className="dk-fab-icon",o.innerHTML='<svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M4 7.5C4 5.567 5.567 4 7.5 4H16.5C18.433 4 20 5.567 20 7.5V13.5C20 15.433 18.433 17 16.5 17H11L7 20V17H7.5C5.567 17 4 15.433 4 13.5V7.5Z" stroke="currentColor" stroke-width="1.75" stroke-linejoin="round"/><path d="M8 9.5H16M8 12.5H13" stroke="currentColor" stroke-width="1.75" stroke-linecap="round"/></svg>',i.append(o),n){const e=document.createElement("span");e.className="dk-fab-label",e.textContent=n,i.append(e)}i.addEventListener("click",()=>{this.toggle()}),this.#r=i,this.#e.appendChild(i),this.renderBadge()}renderBadge(){if(!this.#r)return;if(this.#a?.remove(),this.#a=null,this.#o<=0)return;const e=document.createElement("span");e.className="dk-badge",e.textContent=this.#o>9?"9+":String(this.#o),e.setAttribute("aria-label",String(this.#o)),this.#r.appendChild(e),this.#a=e}async refreshUnread(){if(this.#i&&(0,i.a$)(this.#i))try{const e=await(0,i.Up)();this.#o=e.count||0,this.renderBadge()}catch{}}startPoll(){this.stopPoll(),this.#s=setInterval(()=>{this.refreshUnread()},3e4)}stopPoll(){this.#s&&(clearInterval(this.#s),this.#s=null)}closePanel(){const e=this.#e.querySelector(".dk-panel");e?.remove(),this.#t=!1,this.#r?.setAttribute("aria-expanded","false"),this.#r?.focus(),this.stopPoll(),this.refreshUnread()}async mountInline(){const e=this.#i;if(e)try{const t=await n.e(407).then(n.bind(n,187)),i=parseInt(this.getAttribute("data-order")||"0",10)||0,o="new"===this.getAttribute("data-view")?"new":"tickets";t.mountPanel(this,this.#e,e,()=>{},{inline:!0,orderId:i,view:o})}catch(e){console.error("[Deskovi] failed to load support panel",e)}}async toggle(){if(this.#t)this.closePanel();else if(!this.#n&&this.#i){this.#n=!0;try{r(this.#i),(await n.e(407).then(n.bind(n,187))).mountPanel(this,this.#e,this.#i,()=>{this.#t=!1,this.#r?.setAttribute("aria-expanded","false"),this.#r?.focus(),this.stopPoll(),this.refreshUnread()}),this.#t=!0,this.#r?.setAttribute("aria-expanded","true"),(0,i.a$)(this.#i)&&(this.startPoll(),this.refreshUnread())}catch(e){console.error("[Deskovi] failed to load support panel",e)}finally{this.#n=!1}}}}function d(){const e=s();e&&(r(e),customElements.get("deskovi-support")||customElements.define("deskovi-support",a),(void 0===e.launcher||e.launcher)&&!document.querySelector("deskovi-support")&&document.body.appendChild(document.createElement("deskovi-support")))}(0,o.zk)(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",d):d()})();
  • deskovi/trunk/assets/widget/panel.js

    r3763520 r3843768  
    1 "use strict";(globalThis.webpackChunkdeskovi=globalThis.webpackChunkdeskovi||[]).push([[407],{187(t,e,n){n.d(e,{mountPanel:()=>s});var r=n(811),d=n(869);function a(t,e){return t.i18n[e]||e}function o(t){if(!t)return"";const e=new Date(t);return Number.isNaN(e.getTime())?t:e.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function i(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function s(t,e,n,s){const l=document.createElement("div");l.className="dk-panel "+("bottom-left"===n.placement?"is-left":"is-right"),l.setAttribute("role","dialog"),l.setAttribute("aria-label",a(n,"support"));const c={view:(0,r.a$)(n)?"list":"welcome",tickets:[],categories:[],orders:[],orderDetail:null,selected:null,busy:!1,error:"",subject:"",body:"",category:"order",orderId:n.guestOrderId?String(n.guestOrderId):"",reply:"",guestOrder:n.guestOrderId?String(n.guestOrderId):"",guestEmail:"",guestCode:"",guestStep:"form"},u=document.createElement("style");u.textContent=":host {\n\tall: initial;\n\tfont-family: var(--dk-widget-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans Bengali', 'Nirmala UI', sans-serif);\n\tfont-size: 14px;\n\tline-height: 1.45;\n\tcolor: var(--dk-ink, #102a33);\n\t--dk-ink: #102a33;\n\t--dk-muted: #475467;\n\t--dk-line: #e4e7ec;\n\t--dk-accent: #0f766e;\n\t--dk-accent-hover: #0d5f59;\n\t--dk-surface: #ffffff;\n\t--dk-canvas: #f4f6f8;\n\t--dk-danger: #b42318;\n}\n\n:host([data-theme='dark']) {\n\t--dk-ink: #f2f4f7;\n\t--dk-muted: #98a2b3;\n\t--dk-line: #344054;\n\t--dk-accent: #2dd4bf;\n\t--dk-accent-hover: #5eead4;\n\t--dk-surface: #1d2939;\n\t--dk-canvas: #101828;\n\t--dk-danger: #f97066;\n}\n\n* {\n\tbox-sizing: border-box;\n}\n\n.dk-panel {\n\tposition: fixed;\n\tz-index: 100000;\n\tbottom: 84px;\n\twidth: min(380px, calc(100vw - 24px));\n\tmax-height: min(560px, calc(100vh - 120px));\n\tbackground: var(--dk-surface);\n\tcolor: var(--dk-ink);\n\tborder: 1px solid var(--dk-line);\n\tborder-radius: 14px;\n\tbox-shadow: 0 16px 40px rgba(16, 42, 51, 0.18);\n\tdisplay: flex;\n\tflex-direction: column;\n\toverflow: hidden;\n}\n\n.dk-panel.is-left {\n\tleft: 20px;\n\tright: auto;\n}\n\n.dk-panel.is-right {\n\tright: 20px;\n\tleft: auto;\n}\n\n.dk-head {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 8px;\n\tpadding: 12px 14px;\n\tbackground: var(--dk-ink);\n\tcolor: #fff;\n}\n\n.dk-head h2 {\n\tmargin: 0;\n\tfont-size: 15px;\n\tfont-weight: 700;\n}\n\n.dk-icon-btn {\n\tborder: none;\n\tbackground: transparent;\n\tcolor: inherit;\n\tcursor: pointer;\n\tfont-size: 18px;\n\tline-height: 1;\n\tpadding: 4px;\n\topacity: 0.9;\n}\n\n.dk-body {\n\tflex: 1 1 auto;\n\toverflow: auto;\n\tpadding: 12px 14px;\n\tbackground: var(--dk-canvas);\n}\n\n.dk-foot {\n\tpadding: 10px 14px;\n\tborder-top: 1px solid var(--dk-line);\n\tbackground: var(--dk-surface);\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n}\n\n.dk-btn {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 6px;\n\tborder-radius: 8px;\n\tpadding: 8px 12px;\n\tmin-height: 36px;\n\tfont-size: 13px;\n\tfont-weight: 600;\n\tcursor: pointer;\n\tborder: 1px solid transparent;\n\tfont-family: inherit;\n}\n\n.dk-btn:disabled {\n\topacity: 0.55;\n\tcursor: not-allowed;\n}\n\n.dk-btn-primary {\n\tbackground: var(--dk-accent);\n\tcolor: #fff;\n}\n\n.dk-btn-primary:hover:not(:disabled) {\n\tbackground: var(--dk-accent-hover);\n}\n\n.dk-btn-secondary {\n\tbackground: var(--dk-surface);\n\tborder-color: var(--dk-line);\n\tcolor: var(--dk-ink);\n}\n\n.dk-btn-ghost {\n\tbackground: transparent;\n\tcolor: var(--dk-accent);\n\tpadding-left: 4px;\n\tpadding-right: 4px;\n}\n\n.dk-muted {\n\tcolor: var(--dk-muted);\n\tfont-size: 13px;\n\tmargin: 0;\n}\n\n.dk-error {\n\tcolor: var(--dk-danger);\n\tfont-size: 13px;\n\tmargin: 0 0 8px;\n}\n\n.dk-row {\n\tdisplay: flex;\n\tgap: 8px;\n\tflex-wrap: wrap;\n\talign-items: center;\n}\n\n.dk-ticket {\n\tdisplay: block;\n\twidth: 100%;\n\ttext-align: left;\n\tborder: 1px solid var(--dk-line);\n\tborder-radius: 10px;\n\tpadding: 10px 12px;\n\tbackground: var(--dk-surface);\n\tcursor: pointer;\n\tmargin-bottom: 8px;\n\tfont: inherit;\n\tcolor: inherit;\n}\n\n.dk-ticket strong {\n\tdisplay: block;\n\tfont-size: 14px;\n\tmargin-bottom: 4px;\n}\n\n.dk-ticket span {\n\tfont-size: 12px;\n\tcolor: var(--dk-muted);\n}\n\n.dk-field {\n\tmargin-bottom: 10px;\n}\n\n.dk-field label {\n\tdisplay: block;\n\tfont-size: 12px;\n\tfont-weight: 650;\n\tcolor: var(--dk-muted);\n\tmargin-bottom: 4px;\n}\n\n.dk-field input,\n.dk-field select,\n.dk-field textarea {\n\twidth: 100%;\n\tborder: 1px solid var(--dk-line);\n\tborder-radius: 8px;\n\tpadding: 8px 10px;\n\tfont: inherit;\n\tcolor: var(--dk-ink);\n\tbackground: var(--dk-surface);\n}\n\n.dk-field textarea {\n\tmin-height: 88px;\n\tresize: vertical;\n}\n\n.dk-bubble {\n\tborder: 1px solid var(--dk-line);\n\tborder-radius: 10px;\n\tpadding: 8px 10px;\n\tbackground: var(--dk-surface);\n\tmargin-bottom: 8px;\n}\n\n.dk-bubble.is-agent {\n\tbackground: var(--dk-canvas);\n}\n\n.dk-bubble__meta {\n\tfont-size: 11px;\n\tcolor: var(--dk-muted);\n\tmargin-bottom: 4px;\n}\n\n.dk-bubble p {\n\tmargin: 0;\n\twhite-space: pre-wrap;\n\tfont-size: 13px;\n}\n",e.querySelector("style[data-dk-panel]")||(u.setAttribute("data-dk-panel","1"),e.appendChild(u)),e.appendChild(l);const p=new Map,b=new Set,k=()=>({subject:c.subject,body:c.body,category:c.category,order_id:c.orderId&&parseInt(c.orderId,10)||null}),g=()=>{"create"===c.view&&b.forEach(t=>{try{t(k())}catch(t){console.error("[Deskovi] slot listener failed",t)}})},f=()=>{p.forEach(t=>{try{t.cleanup?.()}catch(t){console.error("[Deskovi] slot cleanup failed",t)}t.host.remove()}),p.clear(),b.clear()},v=async t=>{c.busy=!0,c.error="",w();try{await t()}catch(t){c.error=t instanceof Error?t.message:a(n,"error")}finally{c.busy=!1,w()}},m=()=>v(async()=>{const t=await(0,r.WS)();c.tickets=t.tickets||[],c.view="list",c.selected=null}),y=t=>v(async()=>{const e=c.orderDetail;if(!e)return;const[n,d]=await Promise.all([(0,r.jE)(),(0,r.Gb)()]);c.categories=n.categories||[],c.orders=d.orders||[],c.category=t,c.orderId=String(e.id),c.subject="cancel"===t?`Cancel request for order #${e.number}`:`Return request for order #${e.number}`,c.body="cancel"===t?`I would like to cancel order #${e.number}.`:`I would like to return items from order #${e.number}.`,c.view="create"});function $(t,e){return`\n\t\t\t<div class="dk-head">\n\t\t\t\t<div class="dk-row">\n\t\t\t\t\t${e?`<button type="button" class="dk-icon-btn" data-act="back" aria-label="${i(a(n,"back"))}">←</button>`:""}\n\t\t\t\t\t<h2>${i(t)}</h2>\n\t\t\t\t</div>\n\t\t\t\t<button type="button" class="dk-icon-btn" data-act="close" aria-label="${i(a(n,"close"))}">×</button>\n\t\t\t</div>\n\t\t`}function h(){const t=0===c.tickets.length?`<p class="dk-muted">${i(a(n,"empty"))}</p>`:c.tickets.map(t=>`\n\t\t\t\t\t<button type="button" class="dk-ticket" data-act="open" data-id="${i(t.id)}">\n\t\t\t\t\t\t<strong>${i(t.subject)}${t.unread?` · ${i(a(n,"unread"))}`:""}</strong>\n\t\t\t\t\t\t<span>${i(t.status)} · ${i(o(t.updated_at))}</span>\n\t\t\t\t\t</button>`).join("");return`\n\t\t\t${$(a(n,"tickets"),!1)}\n\t\t\t<div class="dk-body">\n\t\t\t\t${c.error?`<p class="dk-error">${i(c.error)}</p>`:""}\n\t\t\t\t${c.busy?`<p class="dk-muted">${i(a(n,"loading"))}</p>`:t}\n\t\t\t</div>\n\t\t\t<div class="dk-foot">\n\t\t\t\t<button type="button" class="dk-btn dk-btn-secondary" data-act="orders" ${c.busy?"disabled":""}>${i(a(n,"orders"))}</button>\n\t\t\t\t<button type="button" class="dk-btn dk-btn-primary" data-act="create" ${c.busy?"disabled":""}>${i(a(n,"newTicket"))}</button>\n\t\t\t</div>\n\t\t`}function x(){const t=0===c.orders.length?`<p class="dk-muted">${i(a(n,"emptyOrders"))}</p>`:c.orders.map(t=>`\n\t\t\t\t\t<button type="button" class="dk-ticket" data-act="open-order" data-id="${t.id}">\n\t\t\t\t\t\t<strong>#${i(t.number)}</strong>\n\t\t\t\t\t\t<span>${i(t.status)} · ${i(t.currency)} ${i(t.total)}</span>\n\t\t\t\t\t</button>`).join("");return`\n\t\t\t${$(a(n,"orders"),!0)}\n\t\t\t<div class="dk-body">\n\t\t\t\t${c.error?`<p class="dk-error">${i(c.error)}</p>`:""}\n\t\t\t\t${c.busy?`<p class="dk-muted">${i(a(n,"loading"))}</p>`:t}\n\t\t\t</div>\n\t\t`}function w(){"welcome"===c.view?l.innerHTML=`\n\t\t\t${$(a(n,"support"),!1)}\n\t\t\t<div class="dk-body">\n\t\t\t\t<p><strong>${i(a(n,"loginTitle"))}</strong></p>\n\t\t\t\t<p class="dk-muted">${i(a(n,"loginBody"))}</p>\n\t\t\t\t${c.error?`<p class="dk-error">${i(c.error)}</p>`:""}\n\t\t\t</div>\n\t\t\t<div class="dk-foot">\n\t\t\t\t<a class="dk-btn dk-btn-primary" href="${i(n.loginUrl)}">${i(a(n,"loginAction"))}</a>\n\t\t\t\t<button type="button" class="dk-btn dk-btn-secondary" data-act="guest">\n\t\t\t\t\t${i(a(n,"guestAction"))}\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t`:"guest"===c.view?l.innerHTML="code"===c.guestStep?`\n\t\t\t\t${$(a(n,"guestAction"),!0)}\n\t\t\t\t<div class="dk-body">\n\t\t\t\t\t<p class="dk-muted">${i(a(n,"guestSent"))}</p>\n\t\t\t\t\t${c.error?`<p class="dk-error">${i(c.error)}</p>`:""}\n\t\t\t\t\t<div class="dk-field">\n\t\t\t\t\t\t<label>${i(a(n,"guestCode"))}</label>\n\t\t\t\t\t\t<input type="text" inputmode="numeric" data-field="guestCode" value="${i(c.guestCode)}" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="dk-foot">\n\t\t\t\t\t<button type="button" class="dk-btn dk-btn-primary" data-act="guest-confirm" ${c.busy?"disabled":""}>${i(a(n,"guestConfirm"))}</button>\n\t\t\t\t</div>\n\t\t\t`:`\n\t\t\t${$(a(n,"guestAction"),!0)}\n\t\t\t<div class="dk-body">\n\t\t\t\t${c.error?`<p class="dk-error">${i(c.error)}</p>`:""}\n\t\t\t\t<div class="dk-field">\n\t\t\t\t\t<label>${i(a(n,"guestOrder"))}</label>\n\t\t\t\t\t<input type="text" data-field="guestOrder" value="${i(c.guestOrder)}" />\n\t\t\t\t</div>\n\t\t\t\t<div class="dk-field">\n\t\t\t\t\t<label>${i(a(n,"guestEmail"))}</label>\n\t\t\t\t\t<input type="email" data-field="guestEmail" value="${i(c.guestEmail)}" />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="dk-foot">\n\t\t\t\t<button type="button" class="dk-btn dk-btn-primary" data-act="guest-send" ${c.busy?"disabled":""}>${i(a(n,"guestSendCode"))}</button>\n\t\t\t</div>\n\t\t`:"create"===c.view?l.innerHTML=function(){const t=c.categories.map(t=>`<option value="${i(t.id)}" ${t.id===c.category?"selected":""}>${i(t.label)}</option>`).join(""),e=`<option value="">${i(a(n,"orderNone"))}</option>`+c.orders.map(t=>`<option value="${t.id}" ${String(t.id)===c.orderId?"selected":""}>#${i(t.number)} · ${i(t.status)} · ${i(t.currency)} ${i(t.total)}</option>`).join("");return`\n\t\t\t${$(a(n,"newTicket"),!0)}\n\t\t\t<div class="dk-body">\n\t\t\t\t${c.error?`<p class="dk-error">${i(c.error)}</p>`:""}\n\t\t\t\t<div class="dk-field">\n\t\t\t\t\t<label>${i(a(n,"subject"))}</label>\n\t\t\t\t\t<input type="text" data-field="subject" value="${i(c.subject)}" />\n\t\t\t\t</div>\n\t\t\t\t<div class="dk-field">\n\t\t\t\t\t<label>${i(a(n,"category"))}</label>\n\t\t\t\t\t<select data-field="category">${t}</select>\n\t\t\t\t</div>\n\t\t\t\t<div class="dk-field">\n\t\t\t\t\t<label>${i(a(n,"order"))}</label>\n\t\t\t\t\t<select data-field="orderId">${e}</select>\n\t\t\t\t</div>\n\t\t\t\t<div class="dk-field">\n\t\t\t\t\t<label>${i(a(n,"message"))}</label>\n\t\t\t\t\t<textarea data-field="body">${i(c.body)}</textarea>\n\t\t\t\t</div>\n\t\t\t\t<div class="dk-slots" data-slot="ticket.create.aside"></div>\n\t\t\t</div>\n\t\t\t<div class="dk-foot">\n\t\t\t\t<button type="button" class="dk-btn dk-btn-primary" data-act="submit-create" ${c.busy?"disabled":""}>${i(a(n,"create"))}</button>\n\t\t\t</div>\n\t\t`}():"thread"===c.view?l.innerHTML=function(){const t=c.selected;if(!t)return h();const e=(t.messages||[]).map(t=>{const e=(t.attachments||[]).map(t=>`<div class="dk-attach"><a href="${i(t.url)}" target="_blank" rel="noopener">${i(t.filename)}</a></div>`).join("");return`\n\t\t\t\t<div class="dk-bubble ${"agent"===t.author?"is-agent":""}">\n\t\t\t\t\t<div class="dk-bubble__meta">${i(t.author)} · ${i(o(t.created_at))}</div>\n\t\t\t\t\t<p>${i(t.body)}</p>\n\t\t\t\t\t${e}\n\t\t\t\t</div>`}).join("");return`\n\t\t\t${$(t.subject,!0)}\n\t\t\t<div class="dk-body">\n\t\t\t\t${c.error?`<p class="dk-error">${i(c.error)}</p>`:""}\n\t\t\t\t<p class="dk-muted">${i(t.status)}${t.order_id?` · Order #${t.order_id}`:""}</p>\n\t\t\t\t${e||`<p class="dk-muted">${i(a(n,"loading"))}</p>`}\n\t\t\t</div>\n\t\t\t<div class="dk-foot">\n\t\t\t\t<textarea data-field="reply" placeholder="${i(a(n,"reply"))}" rows="2">${i(c.reply)}</textarea>\n\t\t\t\t<button type="button" class="dk-btn dk-btn-primary" data-act="submit-reply" ${c.busy?"disabled":""}>${i(a(n,"send"))}</button>\n\t\t\t</div>\n\t\t`}():"orders"===c.view?l.innerHTML=x():"order"===c.view?l.innerHTML=function(){const t=c.orderDetail;if(!t)return x();const e=t.tracking&&t.tracking.length?t.tracking.map(t=>`<p class="dk-muted"><strong>${i(a(n,"tracking"))}</strong>: ${t.provider?i(t.provider)+" · ":""}${i(t.number)}</p>`).join(""):`<p class="dk-muted">${i(a(n,"noTracking"))}</p>`,r=(t.items||[]).map(t=>`<li>${i(String(t.quantity||1))}× ${i(t.name)}</li>`).join("");return`\n\t\t\t${$(a(n,"orderDetail"),!0)}\n\t\t\t<div class="dk-body">\n\t\t\t\t${c.error?`<p class="dk-error">${i(c.error)}</p>`:""}\n\t\t\t\t<p><strong>#${i(t.number)}</strong> · ${i(t.status_label||t.status)}</p>\n\t\t\t\t<p class="dk-muted">${i(t.currency)} ${i(t.total)}${t.payment_method_title?` · ${i(t.payment_method_title)}`:""}</p>\n\t\t\t\t${e}\n\t\t\t\t${r?`<ul>${r}</ul>`:""}\n\t\t\t\t${t.view_order_url?`<p><a class="dk-btn dk-btn-secondary" href="${i(t.view_order_url)}" target="_blank" rel="noopener">${i(a(n,"viewOrder"))}</a></p>`:""}\n\t\t\t</div>\n\t\t\t<div class="dk-foot">\n\t\t\t\t<button type="button" class="dk-btn dk-btn-secondary" data-act="request-return" ${c.busy?"disabled":""}>${i(a(n,"requestReturn"))}</button>\n\t\t\t\t<button type="button" class="dk-btn dk-btn-primary" data-act="request-cancel" ${c.busy?"disabled":""}>${i(a(n,"requestCancel"))}</button>\n\t\t\t</div>\n\t\t`}():l.innerHTML=h(),l.querySelectorAll(".dk-field").forEach((t,e)=>{const n=t.querySelector("label"),r=t.querySelector("input, select, textarea");if(n&&r&&!n.hasAttribute("for")){const t="dk-field-"+(r.getAttribute("data-field")||String(e));r.setAttribute("id",t),n.setAttribute("for",t)}}),l.querySelectorAll(".dk-error").forEach(t=>t.setAttribute("role","alert")),l.querySelectorAll('textarea[data-field="reply"]').forEach(t=>{t.hasAttribute("aria-label")||t.setAttribute("aria-label",t.getAttribute("placeholder")||a(n,"reply"))}),(()=>{if("create"!==c.view)return void f();const t=l.querySelector('[data-slot="ticket.create.aside"]');if(t)for(const e of(0,d.Sk)("ticket.create.aside")){let r=p.get(e.id);if(!r){const t=document.createElement("div");t.className="dk-slot-host",r={host:t},p.set(e.id,r);try{const a=e.mount(t,{config:n,form:k,onChange:t=>(b.add(t),()=>b.delete(t)),api:d.f6,dismiss:()=>{m()}});"function"==typeof a&&(r.cleanup=a)}catch(t){console.error("[Deskovi] slot failed",e.id,t)}}t.appendChild(r.host)}})()}var S;l.addEventListener("click",t=>{const e=t.target;if(!e)return;const d=e.closest("[data-act]");if(!d)return;const o=d.getAttribute("data-act");if("close"===o)return f(),l.remove(),void s();if("back"===o)return"guest"===c.view&&"code"===c.guestStep?(c.guestStep="form",void w()):"guest"===c.view?(c.view="welcome",void w()):"order"===c.view?(c.view="orders",c.orderDetail=null,void w()):"orders"===c.view?void m():void("thread"!==c.view&&"create"!==c.view||m());if("guest"===o)return c.view="guest",c.guestStep="form",void w();if("guest-send"!==o)if("guest-confirm"!==o)if("create"!==o)if("orders"!==o){if("open-order"===o){const t=parseInt(d.getAttribute("data-id")||"",10);return void(t&&(t=>{v(async()=>{c.orderDetail=await(0,r.XD)(t),c.view="order"})})(t))}if("request-return"!==o)if("request-cancel"!==o){if("open"===o){const t=d.getAttribute("data-id");return void(t&&(t=>{v(async()=>{const e=await(0,r.vA)(t);c.selected=e,c.view="thread",c.reply=""})})(t))}"submit-create"!==o?"submit-reply"===o&&v(async()=>{if(!c.selected||!c.reply.trim())return;const t=await(0,r.RV)(c.selected.id,c.reply.trim());c.selected=t,c.reply=""}):v(async()=>{if(!c.subject.trim()||!c.body.trim())return void(c.error=a(n,"error"));const t={subject:c.subject.trim(),body:c.body.trim(),category:c.category};c.orderId&&(t.order_id=parseInt(c.orderId,10));const e=await(0,r.Z2)(t);c.selected=e,c.view="thread"})}else y("cancel");else y("refund")}else v(async()=>{const t=await(0,r.Gb)();c.orders=t.orders||[],c.view="orders",c.orderDetail=null});else v(async()=>{const[t,e]=await Promise.all([(0,r.jE)(),(0,r.Gb)()]);c.categories=t.categories||[],c.orders=e.orders||[],c.categories[0]&&(c.category=c.categories[0].id),!c.orderId&&c.orders[0]&&(c.orderId=String(c.orders[0].id)),c.view="create",c.subject="",c.body=""});else v(async()=>{const t=parseInt(c.guestOrder,10);await(0,r.HT)(t,c.guestEmail.trim(),c.guestCode.trim()),n.guestAuthenticated=!0,n.guestOrderId=t,c.orderId=String(t),await m()});else v(async()=>{const t=parseInt(c.guestOrder,10);await(0,r.nH)(t,c.guestEmail.trim()),c.guestStep="code",c.error=""})}),l.addEventListener("input",t=>{const e=t.target;if(!e)return;const n=e.getAttribute("data-field");if(!n)return;const r={subject:"subject",body:"body",category:"category",orderId:"orderId",reply:"reply",guestOrder:"guestOrder",guestEmail:"guestEmail",guestCode:"guestCode"}[n];r&&(c[r]=e.value,g())}),l.addEventListener("change",t=>{const e=t.target;if(!e)return;const n=e.getAttribute("data-field");"category"===n?c.category=e.value:"orderId"===n&&(c.orderId=e.value),g()}),t.setAttribute("data-theme","dark"===(S=n.theme)||"light"===S?S:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),w(),l.setAttribute("tabindex","-1"),l.focus({preventScroll:!0}),(0,r.a$)(n)&&m()}}}]);
     1"use strict";(globalThis.webpackChunkdeskovi=globalThis.webpackChunkdeskovi||[]).push([[407],{187(t,e,n){n.d(e,{mountPanel:()=>s});var r=n(811),d=n(869);function a(t,e){return t.i18n[e]||e}function o(t){if(!t)return"";const e=new Date(t);return Number.isNaN(e.getTime())?t:e.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function i(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function s(t,e,n,s,l={}){const c=!!l.inline,u=document.createElement("div");u.className=c?"dk-panel is-inline":"dk-panel "+("bottom-left"===n.placement?"is-left":"is-right"),u.setAttribute("role",c?"region":"dialog"),u.setAttribute("aria-label",a(n,"support"));const p={view:(0,r.a$)(n)?"list":"welcome",tickets:[],categories:[],fields:[],answers:{},orders:[],orderDetail:null,selected:null,busy:!1,error:"",subject:"",body:"",category:"order",orderId:n.guestOrderId?String(n.guestOrderId):"",reply:"",guestOrder:n.guestOrderId?String(n.guestOrderId):"",guestEmail:"",guestCode:"",guestStep:"form",help:[],helpQuery:""},b=document.createElement("style");b.textContent=":host {\n\tall: initial;\n\tfont-family: var(--dk-widget-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans Bengali', 'Nirmala UI', sans-serif);\n\tfont-size: 14px;\n\tline-height: 1.45;\n\tcolor: var(--dk-ink, #102a33);\n\t--dk-ink: #102a33;\n\t--dk-muted: #475467;\n\t--dk-line: #e4e7ec;\n\t--dk-accent: #0f766e;\n\t--dk-accent-hover: #0d5f59;\n\t--dk-surface: #ffffff;\n\t--dk-canvas: #f4f6f8;\n\t--dk-danger: #b42318;\n}\n\n:host([data-theme='dark']) {\n\t--dk-ink: #f2f4f7;\n\t--dk-muted: #98a2b3;\n\t--dk-line: #344054;\n\t--dk-accent: #2dd4bf;\n\t--dk-accent-hover: #5eead4;\n\t--dk-surface: #1d2939;\n\t--dk-canvas: #101828;\n\t--dk-danger: #f97066;\n}\n\n* {\n\tbox-sizing: border-box;\n}\n\n.dk-panel {\n\tposition: fixed;\n\tz-index: 100000;\n\tbottom: 84px;\n\twidth: min(380px, calc(100vw - 24px));\n\tmax-height: min(560px, calc(100vh - 120px));\n\tbackground: var(--dk-surface);\n\tcolor: var(--dk-ink);\n\tborder: 1px solid var(--dk-line);\n\tborder-radius: 14px;\n\tbox-shadow: 0 16px 40px rgba(16, 42, 51, 0.18);\n\tdisplay: flex;\n\tflex-direction: column;\n\toverflow: hidden;\n}\n\n.dk-panel.is-left {\n\tleft: 20px;\n\tright: auto;\n}\n\n.dk-panel.is-right {\n\tright: 20px;\n\tleft: auto;\n}\n\n.dk-head {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 8px;\n\tpadding: 12px 14px;\n\tbackground: var(--dk-ink);\n\tcolor: #fff;\n}\n\n.dk-head h2 {\n\tmargin: 0;\n\tfont-size: 15px;\n\tfont-weight: 700;\n}\n\n.dk-icon-btn {\n\tborder: none;\n\tbackground: transparent;\n\tcolor: inherit;\n\tcursor: pointer;\n\tfont-size: 18px;\n\tline-height: 1;\n\tpadding: 4px;\n\topacity: 0.9;\n}\n\n.dk-body {\n\tflex: 1 1 auto;\n\toverflow: auto;\n\tpadding: 12px 14px;\n\tbackground: var(--dk-canvas);\n}\n\n.dk-foot {\n\tpadding: 10px 14px;\n\tborder-top: 1px solid var(--dk-line);\n\tbackground: var(--dk-surface);\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n}\n\n.dk-btn {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 6px;\n\tborder-radius: 8px;\n\tpadding: 8px 12px;\n\tmin-height: 36px;\n\tfont-size: 13px;\n\tfont-weight: 600;\n\tcursor: pointer;\n\tborder: 1px solid transparent;\n\tfont-family: inherit;\n}\n\n.dk-btn:disabled {\n\topacity: 0.55;\n\tcursor: not-allowed;\n}\n\n.dk-btn-primary {\n\tbackground: var(--dk-accent);\n\tcolor: #fff;\n}\n\n.dk-btn-primary:hover:not(:disabled) {\n\tbackground: var(--dk-accent-hover);\n}\n\n.dk-btn-secondary {\n\tbackground: var(--dk-surface);\n\tborder-color: var(--dk-line);\n\tcolor: var(--dk-ink);\n}\n\n.dk-btn-ghost {\n\tbackground: transparent;\n\tcolor: var(--dk-accent);\n\tpadding-left: 4px;\n\tpadding-right: 4px;\n}\n\n.dk-muted {\n\tcolor: var(--dk-muted);\n\tfont-size: 13px;\n\tmargin: 0;\n}\n\n.dk-error {\n\tcolor: var(--dk-danger);\n\tfont-size: 13px;\n\tmargin: 0 0 8px;\n}\n\n.dk-row {\n\tdisplay: flex;\n\tgap: 8px;\n\tflex-wrap: wrap;\n\talign-items: center;\n}\n\n.dk-ticket {\n\tdisplay: block;\n\twidth: 100%;\n\ttext-align: left;\n\tborder: 1px solid var(--dk-line);\n\tborder-radius: 10px;\n\tpadding: 10px 12px;\n\tbackground: var(--dk-surface);\n\tcursor: pointer;\n\tmargin-bottom: 8px;\n\tfont: inherit;\n\tcolor: inherit;\n}\n\n.dk-ticket strong {\n\tdisplay: block;\n\tfont-size: 14px;\n\tmargin-bottom: 4px;\n}\n\n.dk-ticket span {\n\tfont-size: 12px;\n\tcolor: var(--dk-muted);\n}\n\n.dk-field {\n\tmargin-bottom: 10px;\n}\n\n.dk-field label {\n\tdisplay: block;\n\tfont-size: 12px;\n\tfont-weight: 650;\n\tcolor: var(--dk-muted);\n\tmargin-bottom: 4px;\n}\n\n.dk-field input,\n.dk-field select,\n.dk-field textarea {\n\twidth: 100%;\n\tborder: 1px solid var(--dk-line);\n\tborder-radius: 8px;\n\tpadding: 8px 10px;\n\tfont: inherit;\n\tcolor: var(--dk-ink);\n\tbackground: var(--dk-surface);\n}\n\n.dk-field textarea {\n\tmin-height: 88px;\n\tresize: vertical;\n}\n\n.dk-bubble {\n\tborder: 1px solid var(--dk-line);\n\tborder-radius: 10px;\n\tpadding: 8px 10px;\n\tbackground: var(--dk-surface);\n\tmargin-bottom: 8px;\n}\n\n.dk-bubble.is-agent {\n\tbackground: var(--dk-canvas);\n}\n\n.dk-bubble__meta {\n\tfont-size: 11px;\n\tcolor: var(--dk-muted);\n\tmargin-bottom: 4px;\n}\n\n.dk-bubble p {\n\tmargin: 0;\n\twhite-space: pre-wrap;\n\tfont-size: 13px;\n}\n\n.dk-req {\n\tfont-weight: 400;\n}\n\n.dk-field .dk-check {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tfont-size: 13px;\n\tfont-weight: 400;\n\tcolor: var(--dk-ink);\n\tcursor: pointer;\n}\n\n.dk-field .dk-check input {\n\twidth: auto;\n\tmargin: 0;\n\tflex: 0 0 auto;\n}\n\n.dk-answers {\n\tmargin: 0 0 10px;\n\tpadding: 8px 10px;\n\tborder: 1px solid var(--dk-line);\n\tborder-radius: 10px;\n\tbackground: var(--dk-surface);\n\tfont-size: 13px;\n}\n\n.dk-answers div {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 0 6px;\n}\n\n.dk-answers dt {\n\tcolor: var(--dk-muted);\n}\n\n.dk-answers dd {\n\tmargin: 0;\n\toverflow-wrap: anywhere;\n}\n\n.dk-panel.is-inline{position:static;z-index:auto;width:100%;max-height:none;bottom:auto;left:auto;right:auto;box-shadow:none;border-radius:10px}\n.dk-panel.is-inline .dk-body{min-height:220px;overflow:visible}\n.dk-panel.is-inline .dk-foot{flex-direction:row;flex-wrap:wrap;justify-content:flex-end}\n.dk-panel.is-inline .dk-foot textarea{flex:1 1 100%;width:100%;border:1px solid var(--dk-line);border-radius:8px;padding:8px 10px;font:inherit;color:var(--dk-ink);background:var(--dk-surface)}\n.dk-related{margin:0 0 12px;padding:10px 12px;border:1px solid var(--dk-line);border-radius:10px;background:var(--dk-surface)}\n.dk-related p{margin:0 0 6px}\n.dk-related .dk-ticket{margin-bottom:6px}\n.dk-helpsug:empty{display:none}\n.dk-helpsug{margin:-2px 0 12px;padding:10px 12px;border:1px solid var(--dk-line);border-radius:10px;background:var(--dk-canvas)}\n.dk-helpsug p{margin:0 0 6px;font-weight:600;font-size:13px}\n.dk-helpsug ul{margin:0;padding:0;list-style:none}\n.dk-helpsug li{margin:0 0 8px}\n.dk-helpsug a{color:var(--dk-accent);font-weight:600;text-decoration:none}\n.dk-helpsug a:hover,.dk-helpsug a:focus{text-decoration:underline}\n.dk-helpsug span{display:block;color:var(--dk-muted);font-size:12px}\n.dk-helpsug .dk-helpsug__all{font-size:12px;font-weight:400}\n.dk-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}\n:host([data-theme=\"dark\"]) .dk-head{background:var(--dk-surface);color:var(--dk-ink);border-bottom:1px solid var(--dk-line)}\n:host([data-theme=\"dark\"]) .dk-btn-primary{color:#102a33}\n",e.querySelector("style[data-dk-panel]")||(b.setAttribute("data-dk-panel","1"),e.appendChild(b)),e.appendChild(u);const k=new Map,g=new Set,f=()=>({subject:p.subject,body:p.body,category:p.category,order_id:p.orderId&&parseInt(p.orderId,10)||null}),v=()=>{"create"===p.view&&g.forEach(t=>{try{t(f())}catch(t){console.error("[Deskovi] slot listener failed",t)}})},m=()=>{k.forEach(t=>{try{t.cleanup?.()}catch(t){console.error("[Deskovi] slot cleanup failed",t)}t.host.remove()}),k.clear(),g.clear()},h=async t=>{p.busy=!0,p.error="",z();try{await t()}catch(t){p.error=t instanceof Error?t.message:a(n,"error")}finally{p.busy=!1,z()}},y=()=>h(async()=>{const t=await(0,r.WS)();p.tickets=t.tickets||[],p.view="list",p.selected=null}),$=t=>{p.categories=t.categories||[],p.fields=t.fields||[],p.answers={}},x=()=>h(async()=>{const[t,e]=await Promise.all([(0,r.jE)(),(0,r.Gb)()]);$(t),p.orders=e.orders||[],p.categories[0]&&(p.category=p.categories[0].id),!p.orderId&&p.orders[0]&&(p.orderId=String(p.orders[0].id)),p.view="create",p.subject="",p.body=""}),w=t=>h(async()=>{const e=p.orderDetail;if(!e)return;const[n,d]=await Promise.all([(0,r.jE)(),(0,r.Gb)()]);$(n),p.orders=d.orders||[],p.category=p.categories.some(e=>e.id===t)?t:p.categories[0]?.id||"other",p.orderId=String(e.id),p.subject="cancel"===t?`Cancel request for order #${e.number}`:`Return request for order #${e.number}`,p.body="cancel"===t?`I would like to cancel order #${e.number}.`:`I would like to return items from order #${e.number}.`,p.view="create"});function j(t,e){const r=c?"":`<button type="button" class="dk-icon-btn" data-act="close" aria-label="${i(a(n,"close"))}">×</button>`;return`\n\t\t\t<div class="dk-head">\n\t\t\t\t<div class="dk-row">\n\t\t\t\t\t${e?`<button type="button" class="dk-icon-btn" data-act="back" aria-label="${i(a(n,"back"))}">←</button>`:""}\n\t\t\t\t\t<h2>${i(t)}</h2>\n\t\t\t\t</div>\n\t\t\t\t${r}\n\t\t\t</div>\n\t\t`}function I(){const t=0===p.tickets.length?`<p class="dk-muted">${i(a(n,"empty"))}</p>`:p.tickets.map(t=>`\n\t\t\t\t\t<button type="button" class="dk-ticket" data-act="open" data-id="${i(t.id)}">\n\t\t\t\t\t\t<strong>${i(t.subject)}${t.unread?` · ${i(a(n,"unread"))}`:""}</strong>\n\t\t\t\t\t\t<span>${i(t.status)} · ${i(o(t.updated_at))}</span>\n\t\t\t\t\t</button>`).join("");return`\n\t\t\t${j(a(n,"tickets"),!1)}\n\t\t\t<div class="dk-body">\n\t\t\t\t${p.error?`<p class="dk-error">${i(p.error)}</p>`:""}\n\t\t\t\t${p.busy?`<p class="dk-muted">${i(a(n,"loading"))}</p>`:t}\n\t\t\t</div>\n\t\t\t<div class="dk-foot">\n\t\t\t\t<button type="button" class="dk-btn dk-btn-secondary" data-act="orders" ${p.busy?"disabled":""}>${i(a(n,"orders"))}</button>\n\t\t\t\t<button type="button" class="dk-btn dk-btn-primary" data-act="create" ${p.busy?"disabled":""}>${i(a(n,"newTicket"))}</button>\n\t\t\t</div>\n\t\t`}function S(){const t=0===p.orders.length?`<p class="dk-muted">${i(a(n,"emptyOrders"))}</p>`:p.orders.map(t=>`\n\t\t\t\t\t<button type="button" class="dk-ticket" data-act="open-order" data-id="${t.id}">\n\t\t\t\t\t\t<strong>#${i(t.number)}</strong>\n\t\t\t\t\t\t<span>${i(t.status)} · ${i(t.currency)} ${i(t.total)}</span>\n\t\t\t\t\t</button>`).join("");return`\n\t\t\t${j(a(n,"orders"),!0)}\n\t\t\t<div class="dk-body">\n\t\t\t\t${p.error?`<p class="dk-error">${i(p.error)}</p>`:""}\n\t\t\t\t${p.busy?`<p class="dk-muted">${i(a(n,"loading"))}</p>`:t}\n\t\t\t</div>\n\t\t`}function A(t){const e=p.answers[t.id]||"",r=`data-answer="${i(t.id)}"${t.required?' required aria-required="true"':""}`;if("checkbox"===t.type)return`\n\t\t\t\t<div class="dk-field">\n\t\t\t\t\t<label class="dk-check">\n\t\t\t\t\t\t<input type="checkbox" ${r} ${e?"checked":""} />\n\t\t\t\t\t\t<span>${i(t.label)}</span>\n\t\t\t\t\t</label>\n\t\t\t\t</div>`;const d=t.required?` <span class="dk-req">(${i(a(n,"required")||"required")})</span>`:"";if("select"===t.type){const o=`<option value="">${i(a(n,"choose")||"")}</option>`+t.options.map(t=>`<option value="${i(t)}" ${t===e?"selected":""}>${i(t)}</option>`).join("");return`\n\t\t\t\t<div class="dk-field">\n\t\t\t\t\t<label>${i(t.label)}${d}</label>\n\t\t\t\t\t<select ${r}>${o}</select>\n\t\t\t\t</div>`}return`\n\t\t\t<div class="dk-field">\n\t\t\t\t<label>${i(t.label)}${d}</label>\n\t\t\t\t<input type="text" maxlength="500" ${r} value="${i(e)}" />\n\t\t\t</div>`}function _(){if(!p.help.length)return"";const t=`<span class="dk-sr"> ${i(a(n,"helpNewTab"))}</span>`,e=p.help.map(e=>`<li><a href="${i(e.url)}" target="_blank" rel="noopener">${i(e.title)}${t}</a>${e.summary?`<span>${i(e.summary)}</span>`:""}</li>`).join(""),r=n.help?.url?`<a class="dk-helpsug__all" href="${i(n.help.url)}" target="_blank" rel="noopener">${i(a(n,"helpBrowse"))}${t}</a>`:"";return`<p>${i(a(n,"helpSuggest"))}</p><ul>${e}</ul>${r}`}let q;function E(t){p.help=t;const e=u.querySelector("[data-help-suggest]");e&&(e.innerHTML=_())}function z(){"welcome"===p.view?u.innerHTML=`\n\t\t\t${j(a(n,"support"),!1)}\n\t\t\t<div class="dk-body">\n\t\t\t\t<p><strong>${i(a(n,"loginTitle"))}</strong></p>\n\t\t\t\t<p class="dk-muted">${i(a(n,"loginBody"))}</p>\n\t\t\t\t${p.error?`<p class="dk-error">${i(p.error)}</p>`:""}\n\t\t\t</div>\n\t\t\t<div class="dk-foot">\n\t\t\t\t<a class="dk-btn dk-btn-primary" href="${i(n.loginUrl)}">${i(a(n,"loginAction"))}</a>\n\t\t\t\t<button type="button" class="dk-btn dk-btn-secondary" data-act="guest">\n\t\t\t\t\t${i(a(n,"guestAction"))}\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t`:"guest"===p.view?u.innerHTML="code"===p.guestStep?`\n\t\t\t\t${j(a(n,"guestAction"),!0)}\n\t\t\t\t<div class="dk-body">\n\t\t\t\t\t<p class="dk-muted">${i(a(n,"guestSent"))}</p>\n\t\t\t\t\t${p.error?`<p class="dk-error">${i(p.error)}</p>`:""}\n\t\t\t\t\t<div class="dk-field">\n\t\t\t\t\t\t<label>${i(a(n,"guestCode"))}</label>\n\t\t\t\t\t\t<input type="text" inputmode="numeric" data-field="guestCode" value="${i(p.guestCode)}" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="dk-foot">\n\t\t\t\t\t<button type="button" class="dk-btn dk-btn-primary" data-act="guest-confirm" ${p.busy?"disabled":""}>${i(a(n,"guestConfirm"))}</button>\n\t\t\t\t</div>\n\t\t\t`:`\n\t\t\t${j(a(n,"guestAction"),!0)}\n\t\t\t<div class="dk-body">\n\t\t\t\t${p.error?`<p class="dk-error">${i(p.error)}</p>`:""}\n\t\t\t\t<div class="dk-field">\n\t\t\t\t\t<label>${i(a(n,"guestOrder"))}</label>\n\t\t\t\t\t<input type="text" data-field="guestOrder" value="${i(p.guestOrder)}" />\n\t\t\t\t</div>\n\t\t\t\t<div class="dk-field">\n\t\t\t\t\t<label>${i(a(n,"guestEmail"))}</label>\n\t\t\t\t\t<input type="email" data-field="guestEmail" value="${i(p.guestEmail)}" />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="dk-foot">\n\t\t\t\t<button type="button" class="dk-btn dk-btn-primary" data-act="guest-send" ${p.busy?"disabled":""}>${i(a(n,"guestSendCode"))}</button>\n\t\t\t</div>\n\t\t`:"create"===p.view?u.innerHTML=function(){const t=p.categories.map(t=>`<option value="${i(t.id)}" ${t.id===p.category?"selected":""}>${i(t.label)}</option>`).join(""),e=`<option value="">${i(a(n,"orderNone"))}</option>`+p.orders.map(t=>`<option value="${t.id}" ${String(t.id)===p.orderId?"selected":""}>#${i(t.number)} · ${i(t.status)} · ${i(t.currency)} ${i(t.total)}</option>`).join("");return`\n\t\t\t${j(a(n,"newTicket"),!0)}\n\t\t\t<div class="dk-body">\n\t\t\t\t${p.error?`<p class="dk-error">${i(p.error)}</p>`:""}\n\t\t\t\t${function(){const t=parseInt(p.orderId,10)||0;if(!t)return"";const e=p.tickets.filter(e=>Number(e.order_id)===t&&"closed"!==e.status&&"resolved"!==e.status);if(!e.length)return"";const r=e.map(t=>`\n\t\t\t\t<button type="button" class="dk-ticket" data-act="open" data-id="${i(t.id)}">\n\t\t\t\t\t<strong>${i(t.subject)}</strong>\n\t\t\t\t\t<span>${i(t.status)} · ${i(o(t.updated_at))}</span>\n\t\t\t\t</button>`).join("");return`<div class="dk-related"><p class="dk-muted">${i(a(n,"orderTickets"))}</p>${r}</div>`}()}\n\t\t\t\t<div class="dk-field">\n\t\t\t\t\t<label>${i(a(n,"subject"))}</label>\n\t\t\t\t\t<input type="text" data-field="subject" value="${i(p.subject)}" />\n\t\t\t\t</div>\n\t\t\t\t<div class="dk-helpsug" data-help-suggest aria-live="polite">${_()}</div>\n\t\t\t\t<div class="dk-field">\n\t\t\t\t\t<label>${i(a(n,"category"))}</label>\n\t\t\t\t\t<select data-field="category">${t}</select>\n\t\t\t\t</div>\n\t\t\t\t<div class="dk-field">\n\t\t\t\t\t<label>${i(a(n,"order"))}</label>\n\t\t\t\t\t<select data-field="orderId">${e}</select>\n\t\t\t\t</div>\n\t\t\t\t${p.fields.map(A).join("")}\n\t\t\t\t<div class="dk-field">\n\t\t\t\t\t<label>${i(a(n,"message"))}</label>\n\t\t\t\t\t<textarea data-field="body">${i(p.body)}</textarea>\n\t\t\t\t</div>\n\t\t\t\t<div class="dk-slots" data-slot="ticket.create.aside"></div>\n\t\t\t</div>\n\t\t\t<div class="dk-foot">\n\t\t\t\t<button type="button" class="dk-btn dk-btn-primary" data-act="submit-create" ${p.busy?"disabled":""}>${i(a(n,"create"))}</button>\n\t\t\t</div>\n\t\t`}():"thread"===p.view?u.innerHTML=function(){const t=p.selected;if(!t)return I();const e=(t.messages||[]).map(t=>{const e=(t.attachments||[]).map(t=>`<div class="dk-attach"><a href="${i(t.url)}" target="_blank" rel="noopener">${i(t.filename)}</a></div>`).join("");return`\n\t\t\t\t<div class="dk-bubble ${"agent"===t.author?"is-agent":""}">\n\t\t\t\t\t<div class="dk-bubble__meta">${i(t.author)} · ${i(o(t.created_at))}</div>\n\t\t\t\t\t<p>${i(t.body)}</p>\n\t\t\t\t\t${e}\n\t\t\t\t</div>`}).join("");return`\n\t\t\t${j(t.subject,!0)}\n\t\t\t<div class="dk-body">\n\t\t\t\t${p.error?`<p class="dk-error">${i(p.error)}</p>`:""}\n\t\t\t\t<p class="dk-muted">${i(t.status)}${t.order_id?` · Order #${t.order_id}`:""}</p>\n\t\t\t\t${function(t){const e=t.form_answers||[];return e.length?`<dl class="dk-answers">${e.map(t=>`<div><dt>${i(t.label)}:</dt><dd>${i("checkbox"===t.type?a(n,"yes")||"✓":t.value)}</dd></div>`).join("")}</dl>`:""}(t)}\n\t\t\t\t${e||`<p class="dk-muted">${i(a(n,"loading"))}</p>`}\n\t\t\t</div>\n\t\t\t<div class="dk-foot">\n\t\t\t\t<textarea data-field="reply" placeholder="${i(a(n,"reply"))}" rows="2">${i(p.reply)}</textarea>\n\t\t\t\t<button type="button" class="dk-btn dk-btn-primary" data-act="submit-reply" ${p.busy?"disabled":""}>${i(a(n,"send"))}</button>\n\t\t\t</div>\n\t\t`}():"orders"===p.view?u.innerHTML=S():"order"===p.view?u.innerHTML=function(){const t=p.orderDetail;if(!t)return S();const e=t.tracking&&t.tracking.length?t.tracking.map(t=>`<p class="dk-muted"><strong>${i(a(n,"tracking"))}</strong>: ${t.provider?i(t.provider)+" · ":""}${i(t.number)}</p>`).join(""):`<p class="dk-muted">${i(a(n,"noTracking"))}</p>`,r=(t.items||[]).map(t=>`<li>${i(String(t.quantity||1))}× ${i(t.name)}</li>`).join("");return`\n\t\t\t${j(a(n,"orderDetail"),!0)}\n\t\t\t<div class="dk-body">\n\t\t\t\t${p.error?`<p class="dk-error">${i(p.error)}</p>`:""}\n\t\t\t\t<p><strong>#${i(t.number)}</strong> · ${i(t.status_label||t.status)}</p>\n\t\t\t\t<p class="dk-muted">${i(t.currency)} ${i(t.total)}${t.payment_method_title?` · ${i(t.payment_method_title)}`:""}</p>\n\t\t\t\t${e}\n\t\t\t\t${r?`<ul>${r}</ul>`:""}\n\t\t\t\t${t.view_order_url?`<p><a class="dk-btn dk-btn-secondary" href="${i(t.view_order_url)}" target="_blank" rel="noopener">${i(a(n,"viewOrder"))}</a></p>`:""}\n\t\t\t</div>\n\t\t\t<div class="dk-foot">\n\t\t\t\t<button type="button" class="dk-btn dk-btn-secondary" data-act="request-return" ${p.busy?"disabled":""}>${i(a(n,"requestReturn"))}</button>\n\t\t\t\t<button type="button" class="dk-btn dk-btn-primary" data-act="request-cancel" ${p.busy?"disabled":""}>${i(a(n,"requestCancel"))}</button>\n\t\t\t</div>\n\t\t`}():u.innerHTML=I(),u.querySelectorAll(".dk-field").forEach((t,e)=>{const n=t.querySelector("label"),r=t.querySelector("input, select, textarea");if(n&&r&&!n.hasAttribute("for")){const t="dk-field-"+(r.getAttribute("data-field")||String(e));r.setAttribute("id",t),n.setAttribute("for",t)}}),u.querySelectorAll(".dk-error").forEach(t=>t.setAttribute("role","alert")),u.querySelectorAll('textarea[data-field="reply"]').forEach(t=>{t.hasAttribute("aria-label")||t.setAttribute("aria-label",t.getAttribute("placeholder")||a(n,"reply"))}),(()=>{if("create"!==p.view)return void m();const t=u.querySelector('[data-slot="ticket.create.aside"]');if(t)for(const e of(0,d.Sk)("ticket.create.aside")){let r=k.get(e.id);if(!r){const t=document.createElement("div");t.className="dk-slot-host",r={host:t},k.set(e.id,r);try{const a=e.mount(t,{config:n,form:f,onChange:t=>(g.add(t),()=>g.delete(t)),api:d.f6,dismiss:()=>{y()}});"function"==typeof a&&(r.cleanup=a)}catch(t){console.error("[Deskovi] slot failed",e.id,t)}}t.appendChild(r.host)}})()}u.addEventListener("click",t=>{const e=t.target;if(!e)return;const d=e.closest("[data-act]");if(!d)return;const o=d.getAttribute("data-act");if("close"===o)return m(),u.remove(),void s();if("back"===o)return"guest"===p.view&&"code"===p.guestStep?(p.guestStep="form",void z()):"guest"===p.view?(p.view="welcome",void z()):"order"===p.view?(p.view="orders",p.orderDetail=null,void z()):"orders"===p.view?void y():void("thread"!==p.view&&"create"!==p.view||y());if("guest"===o)return p.view="guest",p.guestStep="form",void z();if("guest-send"!==o)if("guest-confirm"!==o)if("create"!==o)if("orders"!==o){if("open-order"===o){const t=parseInt(d.getAttribute("data-id")||"",10);return void(t&&(t=>{h(async()=>{p.orderDetail=await(0,r.XD)(t),p.view="order"})})(t))}if("request-return"!==o)if("request-cancel"!==o){if("open"===o){const t=d.getAttribute("data-id");return void(t&&(t=>{h(async()=>{const e=await(0,r.vA)(t);p.selected=e,p.view="thread",p.reply=""})})(t))}"submit-create"!==o?"submit-reply"===o&&h(async()=>{if(!p.selected||!p.reply.trim())return;const t=await(0,r.RV)(p.selected.id,p.reply.trim());p.selected=t,p.reply=""}):h(async()=>{if(!p.subject.trim()||!p.body.trim())return void(p.error=a(n,"error"));const t=p.fields.find(t=>t.required&&!(p.answers[t.id]||"").trim());if(t)return void(p.error=(a(n,"answerRequired")||"%s").replace("%s",t.label));const e={};p.fields.forEach(t=>{const n=(p.answers[t.id]||"").trim();n&&(e[t.id]=n)});const d={subject:p.subject.trim(),body:p.body.trim(),category:p.category,fields:e};p.orderId&&(d.order_id=parseInt(p.orderId,10));const o=await(0,r.Z2)(d);p.selected=o,p.view="thread"})}else w("cancel");else w("refund")}else h(async()=>{const t=await(0,r.Gb)();p.orders=t.orders||[],p.view="orders",p.orderDetail=null});else x();else h(async()=>{const t=parseInt(p.guestOrder,10);await(0,r.HT)(t,p.guestEmail.trim(),p.guestCode.trim()),n.guestAuthenticated=!0,n.guestOrderId=t,p.orderId=String(t),await y()});else h(async()=>{const t=parseInt(p.guestOrder,10);await(0,r.nH)(t,p.guestEmail.trim()),p.guestStep="code",p.error=""})});const T=t=>{const e=t.getAttribute("data-answer");if(!e)return!1;const n=t;return p.answers[e]="checkbox"===n.type?n.checked?"1":"":n.value,!0};var C,O;u.addEventListener("input",t=>{const e=t.target;if(!e)return;if(T(e))return;const d=e.getAttribute("data-field");if(!d)return;const a={subject:"subject",body:"body",category:"category",orderId:"orderId",reply:"reply",guestOrder:"guestOrder",guestEmail:"guestEmail",guestCode:"guestCode"}[d];a&&(p[a]=e.value,v(),"create"!==p.view||"subject"!==d&&"body"!==d||function(){const t=n.help;t&&t.suggest&&(q&&clearTimeout(q),q=setTimeout(()=>{const e=t.minChars||4,n=p.subject.trim(),d=p.body.trim(),a=n.length>=e?n:d.length>=3*e?d.slice(0,80):"";a!==p.helpQuery&&(p.helpQuery=a,a?(0,r.I0)(a).then(t=>{p.helpQuery===a&&E(Array.isArray(t.articles)?t.articles:[])}).catch(()=>{}):E([]))},450))}())}),u.addEventListener("change",t=>{const e=t.target;if(!e||T(e))return;const n=e.getAttribute("data-field");"category"===n?p.category=e.value:"orderId"===n&&(p.orderId=e.value),v()}),t.setAttribute("data-theme","dark"===(C=n.theme)||"light"===C?C:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),z(),c||(u.setAttribute("tabindex","-1"),u.focus({preventScroll:!0})),(0,r.a$)(n)&&(l.orderId&&l.orderId>0?(O=l.orderId,h(async()=>{const[t,e,d]=await Promise.all([(0,r.WS)(),(0,r.jE)(),(0,r.Gb)()]);p.tickets=t.tickets||[],$(e),p.orders=d.orders||[];let o=p.orders.find(t=>t.id===O)||null;if(!o){const t=await(0,r.XD)(O);o=t,p.orders=[t,...p.orders]}const i=p.categories.some(t=>"order"===t.id);p.category=i?"order":p.categories[0]?.id||"order",p.orderId=String(o.id),p.subject=a(n,"helpWithOrder").replace("%s",o.number),p.body="",p.selected=null,p.view="create"})):"new"===l.view?x():y())}}}]);
  • deskovi/trunk/deskovi.php

    r3803408 r3843768  
    33 * Plugin Name:       Deskovi
    44 * Description:       A local WooCommerce helpdesk: support tickets, order context for agents, and an optional customer chat widget.
    5  * Version:           1.5.0
     5 * Version:           1.6.0
    66 * Requires at least: 6.6
    77 * Requires PHP:      7.4
    … …  
    2121defined( 'ABSPATH' ) || exit;
    2222
    23 define( 'ITSDESK_VERSION', '1.5.0' );
     23define( 'ITSDESK_VERSION', '1.6.0' );
    2424
    2525/**
    … …  
    8282        'plugins_loaded',
    8383        static function () {
     84                // Bundled translations in /languages. A wordpress.org language pack, when installed, wins.
     85                load_plugin_textdomain( 'deskovi', false, dirname( plugin_basename( ITSDESK_FILE ) ) . '/languages' );
    8486                itsdesk()->init();
    8587        }
  • deskovi/trunk/includes/Admin/AdminMenu.php

    r3763520 r3843768  
    2222         */
    2323        public function register(): void {
    24                 add_action( 'admin_menu', array( $this, 'add_menu' ) );
     24                // Priority 9: before WordPress adds post types shown in this menu (Help articles) at 10.
     25                add_action( 'admin_menu', array( $this, 'add_menu' ), 9 );
    2526        }
    2627
  • deskovi/trunk/includes/Plugin.php

    r3763520 r3843768  
    2020use Itsdesk\Rest\OrderController;
    2121use Itsdesk\Rest\TicketController;
     22use Itsdesk\Rest\HelpController;
    2223use Itsdesk\Rest\ViewsController;
    2324use Itsdesk\Tickets\Notifications as TicketNotifications;
    2425use Itsdesk\Tickets\Schema as TicketSchema;
     26use Itsdesk\Widget\Account as WidgetAccount;
    2527use Itsdesk\Widget\Frontend as WidgetFrontend;
    2628
    … …  
    7375                ( new TicketController() )->register();
    7476                ( new ViewsController() )->register();
     77                ( new HelpController() )->register();
    7578                ( new TicketNotifications() )->register();
    7679                ( new OrderController() )->register();
    7780                ( new GuestController() )->register();
    7881                ( new WidgetFrontend() )->register();
     82                ( new WidgetAccount() )->register();
     83                ( new \Itsdesk\Widget\Embed() )->register();
     84                ( new \Itsdesk\Help\Articles() )->register();
     85                ( new \Itsdesk\Help\Center() )->register();
    7986                ( new PersonalData() )->register();
    8087
  • deskovi/trunk/includes/Privacy/PersonalData.php

    r3763520 r3843768  
    1111defined( 'ABSPATH' ) || exit;
    1212
     13use Itsdesk\Tickets\FormFields;
    1314use Itsdesk\Tickets\TicketRepository;
    1415
    … …  
    114115                                ),
    115116                        );
     117
     118                        foreach ( FormFields::from_storage( $ticket['form_answers'] ?? array() ) as $answer ) {
     119                                $fields[] = array(
     120                                        'name'  => $answer['label'],
     121                                        'value' => FormFields::display_value( $answer ),
     122                                );
     123                        }
    116124
    117125                        foreach ( (array) ( $ticket['messages'] ?? array() ) as $message ) {
  • deskovi/trunk/includes/Rest/AdminController.php

    r3803408 r3843768  
    1212
    1313use Itsdesk\Admin\Capabilities;
     14use Itsdesk\Admin\Setup;
    1415use Itsdesk\Diagnostics\ActivityLogger;
    1516use Itsdesk\Diagnostics\EnvironmentReport;
     17use Itsdesk\Help\Articles as HelpArticles;
     18use Itsdesk\Help\Center as HelpCenter;
    1619use Itsdesk\Privacy\Settings as PrivacySettings;
    1720use Itsdesk\Tickets\CannedReplies;
     21use Itsdesk\Tickets\Categories;
     22use Itsdesk\Tickets\FormFields;
    1823use Itsdesk\Tickets\NotificationSettings;
    1924use Itsdesk\Tickets\TicketService;
     25use Itsdesk\Widget\Account as WidgetAccount;
    2026use Itsdesk\Widget\Settings as WidgetSettings;
    2127use WP_Error;
    … …  
    140146                register_rest_route(
    141147                        self::REST_NAMESPACE,
     148                        '/setup',
     149                        array(
     150                                'methods'             => WP_REST_Server::CREATABLE,
     151                                'callback'            => array( $this, 'update_setup' ),
     152                                'permission_callback' => array( $this, 'can_manage' ),
     153                        )
     154                );
     155
     156                register_rest_route(
     157                        self::REST_NAMESPACE,
     158                        '/categories',
     159                        array(
     160                                array(
     161                                        'methods'             => WP_REST_Server::READABLE,
     162                                        'callback'            => array( $this, 'get_categories' ),
     163                                        'permission_callback' => array( $this, 'can_manage' ),
     164                                ),
     165                                array(
     166                                        'methods'             => WP_REST_Server::EDITABLE,
     167                                        'callback'            => array( $this, 'update_categories' ),
     168                                        'permission_callback' => array( $this, 'can_manage' ),
     169                                ),
     170                        )
     171                );
     172
     173                register_rest_route(
     174                        self::REST_NAMESPACE,
     175                        '/help',
     176                        array(
     177                                array(
     178                                        'methods'             => WP_REST_Server::READABLE,
     179                                        'callback'            => array( $this, 'get_help' ),
     180                                        'permission_callback' => array( $this, 'can_manage' ),
     181                                ),
     182                                array(
     183                                        'methods'             => WP_REST_Server::EDITABLE,
     184                                        'callback'            => array( $this, 'update_help' ),
     185                                        'permission_callback' => array( $this, 'can_manage' ),
     186                                ),
     187                        )
     188                );
     189
     190                register_rest_route(
     191                        self::REST_NAMESPACE,
     192                        '/help/page',
     193                        array(
     194                                'methods'             => WP_REST_Server::CREATABLE,
     195                                'callback'            => array( $this, 'create_help_page' ),
     196                                'permission_callback' => array( $this, 'can_manage' ),
     197                        )
     198                );
     199
     200                register_rest_route(
     201                        self::REST_NAMESPACE,
     202                        '/form-fields',
     203                        array(
     204                                array(
     205                                        'methods'             => WP_REST_Server::READABLE,
     206                                        'callback'            => array( $this, 'get_form_fields' ),
     207                                        'permission_callback' => array( $this, 'can_manage' ),
     208                                ),
     209                                array(
     210                                        'methods'             => WP_REST_Server::EDITABLE,
     211                                        'callback'            => array( $this, 'update_form_fields' ),
     212                                        'permission_callback' => array( $this, 'can_manage' ),
     213                                ),
     214                        )
     215                );
     216
     217                register_rest_route(
     218                        self::REST_NAMESPACE,
    142219                        '/diagnostics',
    143220                        array(
    … …  
    178255                                'privacy' => $privacy,
    179256                                'desk'    => $this->desk_stats(),
     257                                'setup'   => $this->setup_info(),
    180258                        ),
    181259                        200
    … …  
    313391         */
    314392        public function get_notifications(): WP_REST_Response {
    315                 return new WP_REST_Response( ( new NotificationSettings() )->get(), 200 );
     393                return new WP_REST_Response( $this->notifications_payload( ( new NotificationSettings() )->get() ), 200 );
     394        }
     395
     396        /**
     397         * Toggles plus the extra alert address.
     398         *
     399         * @param array<string, mixed> $settings Toggles.
     400         * @return array<string, mixed>
     401         */
     402        private function notifications_payload( array $settings ): array {
     403                $settings['team_email'] = NotificationSettings::team_email();
     404                return $settings;
    316405        }
    317406
    … …  
    323412         */
    324413        public function update_notifications( WP_REST_Request $request ) {
    325                 $result = ( new NotificationSettings() )->update( $request->get_json_params() ?: array() );
    326                 if ( is_wp_error( $result ) ) {
    327                         return $result;
    328                 }
    329 
    330                 return new WP_REST_Response( $result, 200 );
     414                $params = $request->get_json_params() ?: array();
     415                if ( array_key_exists( 'team_email', $params ) ) {
     416                        $saved = NotificationSettings::set_team_email( (string) $params['team_email'] );
     417                        if ( is_wp_error( $saved ) ) {
     418                                return $saved;
     419                        }
     420                        unset( $params['team_email'] );
     421                }
     422                $result = ( new NotificationSettings() )->update( $params );
     423
     424                return new WP_REST_Response( $this->notifications_payload( $result ), 200 );
    331425        }
    332426
    … …  
    391485
    392486        /**
     487         * What the first-run setup needs on the Overview.
     488         *
     489         * @return array{state: string, agents: int}
     490         */
     491        private function setup_info(): array {
     492                $state = Setup::state();
     493                if ( 'pending' !== $state ) {
     494                        return array(
     495                                'state'  => $state,
     496                                'agents' => 0,
     497                        );
     498                }
     499                $agents = get_users(
     500                        array(
     501                                'capability' => Capabilities::CAP,
     502                                'fields'     => 'ID',
     503                        )
     504                );
     505                return array(
     506                        'state'  => $state,
     507                        'agents' => count( $agents ),
     508                );
     509        }
     510
     511        /**
     512         * POST /setup {state: done|dismissed}
     513         *
     514         * @param WP_REST_Request $request Request.
     515         * @return WP_REST_Response|WP_Error
     516         */
     517        public function update_setup( WP_REST_Request $request ) {
     518                $state = (string) ( $request->get_param( 'state' ) ?? '' );
     519                if ( ! Setup::set( $state ) ) {
     520                        return new WP_Error( 'itsdesk_setup_state', __( 'Unknown setup state.', 'deskovi' ), array( 'status' => 400 ) );
     521                }
     522                return new WP_REST_Response( array( 'state' => $state ), 200 );
     523        }
     524
     525        /**
     526         * GET /categories
     527         */
     528        public function get_categories(): WP_REST_Response {
     529                return new WP_REST_Response( Categories::for_admin(), 200 );
     530        }
     531
     532        /**
     533         * POST /categories {disabled: string[], custom: {id?, label}[]}
     534         *
     535         * @param WP_REST_Request $request Request.
     536         * @return WP_REST_Response|WP_Error
     537         */
     538        public function update_categories( WP_REST_Request $request ) {
     539                $result = Categories::update( $request->get_json_params() ?: array() );
     540                if ( is_wp_error( $result ) ) {
     541                        return $result;
     542                }
     543                return new WP_REST_Response( Categories::for_admin(), 200 );
     544        }
     545
     546        /**
     547         * GET /form-fields
     548         */
     549        public function get_form_fields(): WP_REST_Response {
     550                return new WP_REST_Response( $this->form_fields_payload(), 200 );
     551        }
     552
     553        /**
     554         * POST /form-fields {fields: {id?, label, type, options, required}[]}
     555         *
     556         * @param WP_REST_Request $request Request.
     557         * @return WP_REST_Response|WP_Error
     558         */
     559        public function update_form_fields( WP_REST_Request $request ) {
     560                $params = $request->get_json_params() ?: array();
     561                $fields = FormFields::normalize( isset( $params['fields'] ) && is_array( $params['fields'] ) ? $params['fields'] : array() );
     562                if ( is_wp_error( $fields ) ) {
     563                        return $fields;
     564                }
     565                FormFields::save( $fields );
     566                return new WP_REST_Response( $this->form_fields_payload(), 200 );
     567        }
     568
     569        /**
     570         * Help center: settings, counts and where to write articles.
     571         */
     572        public function get_help(): WP_REST_Response {
     573                return new WP_REST_Response( $this->help_payload(), 200 );
     574        }
     575
     576        /**
     577         * Save the help page and the contact link.
     578         *
     579         * @param WP_REST_Request $request Request.
     580         * @return WP_REST_Response|WP_Error
     581         */
     582        public function update_help( WP_REST_Request $request ) {
     583                $params = $request->get_json_params() ?: array();
     584                $saved  = HelpArticles::save_settings( (int) ( $params['page_id'] ?? 0 ), (string) ( $params['contact_url'] ?? '' ) );
     585                if ( is_wp_error( $saved ) ) {
     586                        return $saved;
     587                }
     588                return new WP_REST_Response( $this->help_payload(), 200 );
     589        }
     590
     591        /**
     592         * Create a "Help center" page with the block and make it the help page.
     593         *
     594         * @return WP_REST_Response|WP_Error
     595         */
     596        public function create_help_page() {
     597                if ( ! current_user_can( 'publish_pages' ) ) {
     598                        return new WP_Error( 'itsdesk_help_page_cap', __( 'You are not allowed to publish pages. Ask an administrator to create the help page.', 'deskovi' ), array( 'status' => 403 ) );
     599                }
     600                $page_id = HelpArticles::create_page();
     601                if ( is_wp_error( $page_id ) ) {
     602                        return new WP_Error( 'itsdesk_help_page_create', __( 'The help page could not be created. Try again, or create a page with the “Deskovi help center” block yourself.', 'deskovi' ), array( 'status' => 500 ) );
     603                }
     604                return new WP_REST_Response( $this->help_payload(), 201 );
     605        }
     606
     607        /**
     608         * The help center screen's data.
     609         *
     610         * @return array<string, mixed>
     611         */
     612        private function help_payload(): array {
     613                $settings = HelpArticles::settings();
     614                $page_id  = $settings['page_id'];
     615                $page     = null;
     616                if ( $page_id > 0 && get_post( $page_id ) ) {
     617                        $content = (string) get_post_field( 'post_content', $page_id );
     618                        $page    = array(
     619                                'id'        => $page_id,
     620                                'title'     => html_entity_decode( get_the_title( $page_id ), ENT_QUOTES, 'UTF-8' ),
     621                                'status'    => (string) get_post_status( $page_id ),
     622                                'url'       => (string) get_permalink( $page_id ),
     623                                'edit_url'  => (string) get_edit_post_link( $page_id, 'raw' ),
     624                                'has_block' => has_block( HelpCenter::BLOCK, $content ) || has_shortcode( $content, HelpCenter::SHORTCODE ),
     625                        );
     626                }
     627
     628                $pages = array();
     629                foreach ( get_pages( array( 'sort_column' => 'post_title', 'number' => 200 ) ) ?: array() as $p ) {
     630                        $pages[] = array(
     631                                'id'    => (int) $p->ID,
     632                                'title' => html_entity_decode( get_the_title( $p ), ENT_QUOTES, 'UTF-8' ),
     633                        );
     634                }
     635
     636                $type = HelpArticles::POST_TYPE;
     637                return array(
     638                        'settings'          => $settings,
     639                        'page'              => $page,
     640                        'pages'             => $pages,
     641                        'counts'            => HelpArticles::counts(),
     642                        'contact_default'   => WidgetAccount::enabled() ? WidgetAccount::url() : '',
     643                        'links'             => array(
     644                                'articles'    => admin_url( 'edit.php?post_type=' . $type ),
     645                                'new_article' => admin_url( 'post-new.php?post_type=' . $type ),
     646                                'topics'      => admin_url( 'edit-tags.php?taxonomy=' . HelpArticles::TAXONOMY . '&post_type=' . $type ),
     647                        ),
     648                        'can_publish_pages' => current_user_can( 'publish_pages' ),
     649                );
     650        }
     651
     652        /**
     653         * The editor's data: the saved fields and the limits.
     654         *
     655         * @return array<string, mixed>
     656         */
     657        private function form_fields_payload(): array {
     658                return array(
     659                        'fields'      => FormFields::saved(),
     660                        'max_fields'  => FormFields::MAX_FIELDS,
     661                        'max_options' => FormFields::MAX_OPTIONS,
     662                );
     663        }
     664
     665        /**
    393666         * GET /diagnostics
    394667         */
  • deskovi/trunk/includes/Rest/TicketController.php

    r3803408 r3843768  
    1515use Itsdesk\Tickets\AttachmentService;
    1616use Itsdesk\Tickets\Categories;
     17use Itsdesk\Tickets\FormFields;
    1718use Itsdesk\Tickets\TicketService;
    1819use WP_Error;
    … …  
    284285         */
    285286        public function get_categories(): WP_REST_Response {
    286                 $items = array();
    287                 foreach ( Categories::all() as $id => $label ) {
     287                $items   = array();
     288                $offered = Categories::all();
     289                foreach ( $offered as $id => $label ) {
    288290                        $items[] = array(
    289291                                'id'    => $id,
    … …  
    291293                        );
    292294                }
    293                 return new WP_REST_Response( array( 'categories' => $items ), 200 );
     295                // Hidden ones come last, flagged, so agent screens can still label and filter older tickets.
     296                foreach ( Categories::known() as $id => $label ) {
     297                        if ( ! isset( $offered[ $id ] ) ) {
     298                                $items[] = array(
     299                                        'id'     => $id,
     300                                        'label'  => $label,
     301                                        'hidden' => true,
     302                                );
     303                        }
     304                }
     305                return new WP_REST_Response(
     306                        array(
     307                                'categories' => $items,
     308                                // The extra questions of the new ticket form.
     309                                'fields'     => FormFields::get(),
     310                        ),
     311                        200
     312                );
    294313        }
    295314
  • deskovi/trunk/includes/Tickets/Categories.php

    r3624800 r3843768  
    1212
    1313/**
    14  * Allowlisted categories for ticket forms.
     14 * Built-in categories plus the store's own. The store can hide built-ins and add up to
     15 * MAX_CUSTOM of its own (option itsdesk_categories). Hidden ones stay valid so existing
     16 * tickets, filters and rules that use them keep working; they only leave the forms.
    1517 */
    1618final class Categories {
    1719
    18         /**
    19          * Category map id => label.
     20        public const OPTION_KEY = 'itsdesk_categories';
     21
     22        public const MAX_CUSTOM = 12;
     23
     24        /**
     25         * Built-in category map id => label.
    2026         *
    2127         * @return array<string, string>
    2228         */
    23         public static function all(): array {
     29        public static function builtin(): array {
    2430                return array(
    2531                        'order'    => __( 'Order question', 'deskovi' ),
    … …  
    3339
    3440        /**
    35          * Whether category is valid.
     41         * Stored configuration.
     42         *
     43         * @return array{disabled: array<int, string>, custom: array<int, array{id: string, label: string}>}
     44         */
     45        public static function config(): array {
     46                $stored = get_option( self::OPTION_KEY, array() );
     47                $stored = is_array( $stored ) ? $stored : array();
     48
     49                $disabled = array();
     50                foreach ( (array) ( $stored['disabled'] ?? array() ) as $id ) {
     51                        if ( is_string( $id ) && isset( self::builtin()[ $id ] ) ) {
     52                                $disabled[] = $id;
     53                        }
     54                }
     55
     56                $custom = array();
     57                foreach ( (array) ( $stored['custom'] ?? array() ) as $row ) {
     58                        if ( is_array( $row ) && isset( $row['id'], $row['label'] ) && '' !== (string) $row['label'] ) {
     59                                $custom[] = array(
     60                                        'id'    => (string) $row['id'],
     61                                        'label' => (string) $row['label'],
     62                                );
     63                        }
     64                }
     65
     66                return array(
     67                        'disabled' => array_values( array_unique( $disabled ) ),
     68                        'custom'   => $custom,
     69                );
     70        }
     71
     72        /**
     73         * Every category that may appear on a ticket, shown in forms or not.
     74         *
     75         * @return array<string, string>
     76         */
     77        public static function known(): array {
     78                $all = self::builtin();
     79                foreach ( self::config()['custom'] as $row ) {
     80                        $all[ $row['id'] ] = $row['label'];
     81                }
     82                return $all;
     83        }
     84
     85        /**
     86         * Categories offered in forms (customer widget, agent form, add-ons), in order.
     87         *
     88         * @return array<string, string>
     89         */
     90        public static function all(): array {
     91                $config = self::config();
     92                $out    = array();
     93                foreach ( self::builtin() as $id => $label ) {
     94                        if ( ! in_array( $id, $config['disabled'], true ) ) {
     95                                $out[ $id ] = $label;
     96                        }
     97                }
     98                foreach ( $config['custom'] as $row ) {
     99                        $out[ $row['id'] ] = $row['label'];
     100                }
     101                if ( empty( $out ) ) {
     102                        // Never leave the form without a choice.
     103                        $out['other'] = self::builtin()['other'];
     104                }
     105                return $out;
     106        }
     107
     108        /**
     109         * Whether category is a known one (shown in forms or hidden).
     110         *
     111         * @param string $category Category id.
    36112         */
    37113        public static function is_valid( string $category ): bool {
    38                 return array_key_exists( $category, self::all() );
     114                return array_key_exists( $category, self::known() );
     115        }
     116
     117        /**
     118         * Save the configuration.
     119         *
     120         * @param array<string, mixed> $input {disabled: string[], custom: array<{id?: string, label: string}>}.
     121         * @return array{disabled: array<int, string>, custom: array<int, array{id: string, label: string}>}|\WP_Error
     122         */
     123        public static function update( array $input ) {
     124                $builtin  = self::builtin();
     125                $disabled = array();
     126                foreach ( (array) ( $input['disabled'] ?? array() ) as $id ) {
     127                        $id = (string) $id;
     128                        if ( isset( $builtin[ $id ] ) ) {
     129                                $disabled[] = $id;
     130                        }
     131                }
     132
     133                $previous = array();
     134                foreach ( self::config()['custom'] as $row ) {
     135                        $previous[ $row['id'] ] = true;
     136                }
     137
     138                $custom = array();
     139                $used   = $builtin;
     140                foreach ( (array) ( $input['custom'] ?? array() ) as $row ) {
     141                        if ( ! is_array( $row ) ) {
     142                                continue;
     143                        }
     144                        $label = mb_substr( trim( sanitize_text_field( (string) ( $row['label'] ?? '' ) ) ), 0, 40 );
     145                        if ( '' === $label ) {
     146                                continue;
     147                        }
     148                        $id = sanitize_key( (string) ( $row['id'] ?? '' ) );
     149                        // Keep the id of a category that already exists so tickets keep pointing at it; new ones get one from the label.
     150                        if ( '' === $id || ! isset( $previous[ $id ] ) || isset( $used[ $id ] ) ) {
     151                                $id = self::new_id( $label, $used );
     152                        }
     153                        $used[ $id ] = $label;
     154                        $custom[]    = array(
     155                                'id'    => $id,
     156                                'label' => $label,
     157                        );
     158                }
     159
     160                if ( count( $custom ) > self::MAX_CUSTOM ) {
     161                        return new \WP_Error(
     162                                'itsdesk_categories_limit',
     163                                /* translators: %d: maximum number of own categories */
     164                                sprintf( __( 'You can add up to %d categories of your own.', 'deskovi' ), self::MAX_CUSTOM ),
     165                                array( 'status' => 400 )
     166                        );
     167                }
     168                if ( count( $disabled ) >= count( $builtin ) && empty( $custom ) ) {
     169                        return new \WP_Error(
     170                                'itsdesk_categories_empty',
     171                                __( 'Keep at least one category for customers to choose.', 'deskovi' ),
     172                                array( 'status' => 400 )
     173                        );
     174                }
     175
     176                update_option(
     177                        self::OPTION_KEY,
     178                        array(
     179                                'disabled' => array_values( array_unique( $disabled ) ),
     180                                'custom'   => $custom,
     181                        ),
     182                        false
     183                );
     184
     185                return self::config();
     186        }
     187
     188        /**
     189         * Admin listing: built-ins with their on/off state, then the store's own.
     190         *
     191         * @return array{builtin: array<int, array{id: string, label: string, enabled: bool}>, custom: array<int, array{id: string, label: string}>, max_custom: int}
     192         */
     193        public static function for_admin(): array {
     194                $config  = self::config();
     195                $builtin = array();
     196                foreach ( self::builtin() as $id => $label ) {
     197                        $builtin[] = array(
     198                                'id'      => $id,
     199                                'label'   => $label,
     200                                'enabled' => ! in_array( $id, $config['disabled'], true ),
     201                        );
     202                }
     203                return array(
     204                        'builtin'    => $builtin,
     205                        'custom'     => $config['custom'],
     206                        'max_custom' => self::MAX_CUSTOM,
     207                );
     208        }
     209
     210        /**
     211         * A fresh id for an own category, made from its label.
     212         *
     213         * @param string                $label Label.
     214         * @param array<string, string> $used  Ids already taken.
     215         */
     216        private static function new_id( string $label, array $used ): string {
     217                $base = 'c_' . substr( sanitize_key( str_replace( ' ', '_', remove_accents( $label ) ) ), 0, 30 );
     218                if ( 'c_' === $base ) {
     219                        $base = 'c_' . substr( md5( $label ), 0, 8 );
     220                }
     221                $id = $base;
     222                $n  = 2;
     223                while ( isset( $used[ $id ] ) ) {
     224                        $id = $base . '_' . $n;
     225                        ++$n;
     226                }
     227                return $id;
    39228        }
    40229}
  • deskovi/trunk/includes/Tickets/NotificationSettings.php

    r3763520 r3843768  
    1717
    1818        public const OPTION_KEY = 'itsdesk_notification_settings';
     19
     20        /**
     21         * Extra address (for example a shared support inbox) that gets the same alerts as the agents.
     22         */
     23        public const TEAM_EMAIL_KEY = 'itsdesk_team_email';
     24
     25        /**
     26         * The extra alert address, or ''.
     27         */
     28        public static function team_email(): string {
     29                $email = sanitize_email( (string) get_option( self::TEAM_EMAIL_KEY, '' ) );
     30                return is_email( $email ) ? $email : '';
     31        }
     32
     33        /**
     34         * Save the extra alert address ('' clears it).
     35         *
     36         * @param string $email Address.
     37         * @return string|\WP_Error Saved address.
     38         */
     39        public static function set_team_email( string $email ) {
     40                $raw   = trim( $email );
     41                $email = sanitize_email( $raw );
     42                // sanitize_email() turns a typo into '', which would silently clear the address.
     43                if ( '' !== $raw && ( '' === $email || ! is_email( $email ) ) ) {
     44                        return new \WP_Error(
     45                                'itsdesk_team_email_invalid',
     46                                __( 'Please enter a valid email address.', 'deskovi' ),
     47                                array( 'status' => 400 )
     48                        );
     49                }
     50                update_option( self::TEAM_EMAIL_KEY, $email, false );
     51                return $email;
     52        }
    1953
    2054        /**
  • deskovi/trunk/includes/Tickets/Notifications.php

    r3763520 r3843768  
    8585                        (string) ( $ticket['customer_name'] ?? '' ),
    8686                        (string) ( $ticket['customer_email'] ?? '' ),
    87                         $this->excerpt( $first_body ),
     87                        $this->excerpt( $first_body ) . $this->answers_text( $ticket ),
    8888                        admin_url( 'admin.php?page=' . AdminMenu::PAGE_SLUG )
    8989                );
    … …  
    365365                }
    366366
     367                // The shared inbox from setup / Notifications gets the same alerts as the agents.
     368                $team = NotificationSettings::team_email();
     369                if ( '' !== $team && ! in_array( strtolower( $team ), array_map( 'strtolower', $emails ), true ) ) {
     370                        $emails[] = $team;
     371                }
     372
    367373                return $emails;
    368374        }
    … …  
    406412
    407413        /**
     414         * The customer's answers to the form's extra questions, as lines for an email.
     415         *
     416         * @param array<string, mixed> $ticket Ticket.
     417         */
     418        private function answers_text( array $ticket ): string {
     419                $lines = array();
     420                foreach ( FormFields::from_storage( $ticket['form_answers'] ?? array() ) as $answer ) {
     421                        $lines[] = $answer['label'] . ': ' . $this->excerpt( FormFields::display_value( $answer ) );
     422                }
     423                return array() === $lines ? '' : "\n\n" . implode( "\n", $lines );
     424        }
     425
     426        /**
    408427         * Strip tags and truncate to a plain-text excerpt.
    409428         */
  • deskovi/trunk/includes/Tickets/Schema.php

    r3763520 r3843768  
    1717
    1818        public const DB_VERSION_OPTION = 'itsdesk_tickets_db_version';
    19         public const DB_VERSION        = '1.4.0';
     19        public const DB_VERSION        = '1.6.0';
    2020
    2121        /**
    … …  
    5252                        guest_order_id BIGINT UNSIGNED DEFAULT NULL,
    5353                        order_snapshot LONGTEXT DEFAULT NULL,
     54                        form_answers LONGTEXT DEFAULT NULL,
    5455                        customer_user_id BIGINT UNSIGNED DEFAULT NULL,
    5556                        customer_email VARCHAR(190) DEFAULT '',
  • deskovi/trunk/includes/Tickets/TicketRepository.php

    r3803408 r3843768  
    2222         */
    2323        public const OPTION_KEY = 'itsdesk_tickets';
     24
     25        /**
     26         * Whether the site has at least one ticket.
     27         */
     28        public function has_any(): bool {
     29                global $wpdb;
     30                $table = Schema::tickets_table();
     31                // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- table name is internal constant, no core caching API applies to custom tables.
     32                return null !== $wpdb->get_var( "SELECT id FROM {$table} LIMIT 1" );
     33        }
    2434
    2535        /**
    … …  
    162172                                $where[] = 'id IN (' . implode( ', ', array_fill( 0, count( $ids ), '%s' ) ) . ')';
    163173                                $params  = array_merge( $params, $ids );
     174                        }
     175                }
     176
     177                if ( ! empty( $args['exclude_ids'] ) ) {
     178                        $skip = array_slice( array_values( array_filter( array_map( 'strval', (array) $args['exclude_ids'] ) ) ), 0, 5000 );
     179                        if ( array() !== $skip ) {
     180                                $where[] = 'id NOT IN (' . implode( ', ', array_fill( 0, count( $skip ), '%s' ) ) . ')';
     181                                $params  = array_merge( $params, $skip );
    164182                        }
    165183                }
    … …  
    462480                );
    463481
     482                // Only written when the caller passes the key, so add-ons saving a partial ticket never clear it.
     483                if ( array_key_exists( 'form_answers', $ticket ) ) {
     484                        $answers              = FormFields::from_storage( $ticket['form_answers'] );
     485                        $data['form_answers'] = array() !== $answers ? wp_json_encode( $answers ) : null;
     486                }
     487
    464488                $exists = (bool) $wpdb->get_var( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- custom plugin table, no core caching API applies.
    465489                        $wpdb->prepare( "SELECT COUNT(*) FROM {$tickets_table} WHERE id = %s", $id ) // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
    … …  
    560584                                'guest_order_id'         => null !== $row['guest_order_id'] ? (int) $row['guest_order_id'] : null,
    561585                                'order_snapshot'         => ! empty( $row['order_snapshot'] ) ? json_decode( (string) $row['order_snapshot'], true ) : null,
     586                                'form_answers'           => ! empty( $row['form_answers'] ) ? FormFields::from_storage( json_decode( (string) $row['form_answers'], true ) ) : array(),
    562587                                'customer_user_id'       => null !== $row['customer_user_id'] ? (int) $row['customer_user_id'] : null,
    563588                                'customer_email'         => $row['customer_email'] ?? '',
  • deskovi/trunk/includes/Tickets/TicketService.php

    r3803408 r3843768  
    268268                                array( 'status' => 400 )
    269269                        );
     270                }
     271
     272                // Agents and add-ons (email, API) may open a ticket without the customer's answers.
     273                $answers = FormFields::answers( isset( $input['fields'] ) && is_array( $input['fields'] ) ? $input['fields'] : array(), ! $is_admin );
     274                if ( is_wp_error( $answers ) ) {
     275                        return $answers;
    270276                }
    271277
    … …  
    339345                        'guest_order_id'         => $guest_order_id,
    340346                        'order_snapshot'         => $order_snapshot,
     347                        'form_answers'           => $answers,
    341348                        'customer_user_id'       => $user_id,
    342349                        'customer_email'         => $email,
    … …  
    589596                        $target['assigned_agent_id'] = (int) $source['assigned_agent_id'];
    590597                }
     598                $target['form_answers'] = FormFields::merge(
     599                        FormFields::from_storage( $target['form_answers'] ?? array() ),
     600                        FormFields::from_storage( $source['form_answers'] ?? array() )
     601                );
    591602                if ( in_array( $previous, array( 'resolved', 'closed' ), true ) && in_array( (string) ( $source['status'] ?? '' ), array( 'open', 'pending' ), true ) ) {
    592603                        $target['status'] = 'open';
    … …  
    882893                        'status'                => in_array( $status, array( 'open', 'pending', 'resolved', 'closed' ), true ) ? $status : 'closed',
    883894                        'priority'              => in_array( $priority, array( 'low', 'normal', 'high', 'urgent' ), true ) ? $priority : 'normal',
    884                         'category'              => isset( Categories::all()[ $category ] ) ? $category : null,
     895                        'category'              => isset( Categories::known()[ $category ] ) ? $category : null,
    885896                        'subject'               => '' !== $subject ? $subject : __( '(no subject)', 'deskovi' ),
    886897                        'customer_user_id'      => $user ? (int) $user->ID : 0,
    … …  
    10221033                if ( is_array( $ids ) ) {
    10231034                        $out['ids'] = $ids;
     1035                }
     1036
     1037                /**
     1038                 * Lets an add-on leave tickets out of the admin ticket list (and CSV export), for example
     1039                 * tickets put aside until later. Return the ids to hide; at most 5,000 are used.
     1040                 *
     1041                 * @param array<int, string>   $ids     Ticket ids to leave out (empty by default).
     1042                 * @param array<string, mixed> $filters The normalised list filters.
     1043                 */
     1044                $exclude = apply_filters( 'itsdesk_ticket_exclude_ids', array(), $filters );
     1045                if ( is_array( $exclude ) && array() !== $exclude ) {
     1046                        $out['exclude_ids'] = $exclude;
    10241047                }
    10251048
  • deskovi/trunk/includes/Widget/Frontend.php

    r3763520 r3843768  
    1919
    2020        /**
     21         * Whether the loader was already enqueued in this request.
     22         *
     23         * @var bool
     24         */
     25        private static bool $enqueued = false;
     26
     27        /**
    2128         * Register hooks.
    2229         */
    … …  
    2936         */
    3037        public function should_load(): bool {
     38                $script = ITSDESK_PATH . 'assets/widget/loader.js';
     39                if ( ! is_readable( $script ) ) {
     40                        return false;
     41                }
     42
     43                // The My Account Support tab mounts the panel inline, with or without the launcher.
     44                if ( Account::is_support_page() ) {
     45                        return true;
     46                }
     47
    3148                $settings = ( new Settings() )->get();
    3249                if ( empty( $settings['enabled'] ) ) {
    … …  
    4158                }
    4259
    43                 $script = ITSDESK_PATH . 'assets/widget/loader.js';
    44                 return is_readable( $script );
     60                return true;
    4561        }
    4662
    … …  
    5268                        return;
    5369                }
     70                $this->enqueue_assets();
     71        }
     72
     73        /**
     74         * Enqueue the loader and its config once per request. Also called while a page renders
     75         * the [deskovi_support] shortcode or block; the loader is a footer script, so that still works.
     76         *
     77         * @param string $login_redirect Where "Log in" returns to, or '' for the default.
     78         */
     79        public function enqueue_assets( string $login_redirect = '' ): void {
     80                if ( self::$enqueued || ! is_readable( ITSDESK_PATH . 'assets/widget/loader.js' ) ) {
     81                        return;
     82                }
     83                self::$enqueued = true;
    5484
    5585                $asset_file = ITSDESK_PATH . 'assets/widget/loader.asset.php';
    … …  
    92122                        'guestAuthenticated'  => null !== $guest,
    93123                        'guestOrderId'        => $guest ? (int) $guest['order_id'] : 0,
    94                         'loginUrl'            => wp_login_url(),
     124                        'loginUrl'            => wp_login_url( $login_redirect ),
     125                        // False when only the My Account tab loads the script: no floating launcher then.
     126                        'launcher'            => ! empty( $settings['enabled'] ),
    95127                        'placement'           => (string) ( $settings['placement'] ?? 'bottom-right' ),
    96128                        'theme'               => (string) ( $settings['theme'] ?? 'system' ),
    97129                        'launcherLabel'       => (string) ( $settings['launcher_label'] ?? '' ),
    98130                        'assetUrl'            => esc_url_raw( ITSDESK_URL . 'assets/widget/' ),
     131                        // Help articles suggested in the new ticket form (Itsdesk\Help).
     132                        'help'                => array(
     133                                'suggest'  => \Itsdesk\Help\Articles::suggest_in_widget(),
     134                                'url'      => esc_url_raw( \Itsdesk\Help\Articles::suggest_browse_url() ),
     135                                'minChars' => 4,
     136                        ),
    99137                        'i18n'                => array(
    100138                                'support'         => __( 'Support', 'deskovi' ),
     139                                'helpSuggest'     => __( 'These articles may answer your question', 'deskovi' ),
     140                                'helpBrowse'      => __( 'Browse all help articles', 'deskovi' ),
     141                                'helpNewTab'      => __( '(opens in a new tab)', 'deskovi' ),
    101142                                'close'           => __( 'Close', 'deskovi' ),
    102143                                'tickets'         => __( 'Your tickets', 'deskovi' ),
    … …  
    134175                                'requestCancel'   => __( 'Request cancel', 'deskovi' ),
    135176                                'emptyOrders'     => __( 'No recent orders.', 'deskovi' ),
     177                                /* translators: %s: order number */
     178                                'helpWithOrder'   => __( 'Help with order #%s', 'deskovi' ),
     179                                'orderTickets'    => __( 'Earlier tickets about this order', 'deskovi' ),
     180                                'required'        => __( 'required', 'deskovi' ),
     181                                'choose'          => __( 'Choose…', 'deskovi' ),
     182                                'yes'             => __( 'Yes', 'deskovi' ),
     183                                /* translators: %s: question on the ticket form */
     184                                'answerRequired'  => __( 'Please answer "%s".', 'deskovi' ),
    136185                        ),
    137186                );
  • deskovi/trunk/includes/Widget/Settings.php

    r3640704 r3843768  
    2929                        'theme'          => 'system',
    3030                        'launcher_label' => '',
     31                        // Support tab in WooCommerce My Account and "Get help" on orders. Independent of the launcher.
     32                        'account_portal' => true,
     33                        // Help articles that match what the customer types, shown in the new ticket form.
     34                        'help_suggestions' => true,
    3135                );
    3236        }
    … …  
    5761                if ( array_key_exists( 'enabled', $input ) ) {
    5862                        $current['enabled'] = (bool) $input['enabled'];
     63                }
     64
     65                if ( array_key_exists( 'help_suggestions', $input ) ) {
     66                        $current['help_suggestions'] = (bool) $input['help_suggestions'];
     67                }
     68
     69                if ( array_key_exists( 'account_portal', $input ) ) {
     70                        $current['account_portal'] = (bool) $input['account_portal'];
    5971                }
    6072
  • deskovi/trunk/languages/deskovi.pot

    r3803408 r3843768  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Deskovi 1.5.0\n"
     5"Project-Id-Version: Deskovi 1.6.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/deskovi\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    … …  
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-11-15T14:36:21+00:00\n"
     12"POT-Creation-Date: 2026-12-04T03:47:21+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
    … …  
    1818#. Author of the plugin
    1919#: deskovi.php
    20 #: includes/Admin/AdminMenu.php:32
    2120#: includes/Admin/AdminMenu.php:33
    22 #: assets/admin/index.js:1
    23 #: assets/admin/index.js:6
     21#: includes/Admin/AdminMenu.php:34
     22#: assets/admin/index.js:1
     23#: assets/admin/index.js:13
    2424msgid "Deskovi"
    2525msgstr ""
    … …  
    3535msgstr ""
    3636
    37 #: includes/Admin/AdminMenu.php:54
     37#: includes/Admin/AdminMenu.php:55
    3838msgid "You do not have permission to access Deskovi."
    3939msgstr ""
    … …  
    6060#: includes/Orders/OrderContext.php:136
    6161#: includes/Orders/OrderContext.php:145
    62 #: includes/Tickets/TicketService.php:1296
     62#: includes/Tickets/TicketService.php:1319
    6363msgid "Order not found."
    6464msgstr ""
    … …  
    111111msgstr ""
    112112
     113#: includes/Help/Articles.php:66
     114#: includes/Help/Articles.php:68
     115#: includes/Help/Articles.php:186
     116#: includes/Help/Articles.php:187
     117msgid "Help topics"
     118msgstr ""
     119
     120#: includes/Help/Articles.php:67
     121msgid "Help topic"
     122msgstr ""
     123
     124#: includes/Help/Articles.php:69
     125msgid "All topics"
     126msgstr ""
     127
     128#: includes/Help/Articles.php:70
     129msgid "Edit topic"
     130msgstr ""
     131
     132#: includes/Help/Articles.php:71
     133msgid "View topic"
     134msgstr ""
     135
     136#: includes/Help/Articles.php:72
     137msgid "Update topic"
     138msgstr ""
     139
     140#: includes/Help/Articles.php:73
     141msgid "Add new topic"
     142msgstr ""
     143
     144#: includes/Help/Articles.php:74
     145msgid "New topic name"
     146msgstr ""
     147
     148#: includes/Help/Articles.php:75
     149msgid "Search topics"
     150msgstr ""
     151
     152#: includes/Help/Articles.php:76
     153msgid "No topics found."
     154msgstr ""
     155
     156#: includes/Help/Articles.php:77
     157msgid "&larr; Go to topics"
     158msgstr ""
     159
     160#: includes/Help/Articles.php:96
     161#: includes/Help/Articles.php:98
     162#: includes/Help/Articles.php:99
     163#: assets/admin/index.js:13
     164msgid "Help articles"
     165msgstr ""
     166
     167#: includes/Help/Articles.php:97
     168msgid "Help article"
     169msgstr ""
     170
     171#: includes/Help/Articles.php:100
     172msgid "Add article"
     173msgstr ""
     174
     175#: includes/Help/Articles.php:101
     176msgid "Add new help article"
     177msgstr ""
     178
     179#: includes/Help/Articles.php:102
     180msgid "Edit help article"
     181msgstr ""
     182
     183#: includes/Help/Articles.php:103
     184msgid "New help article"
     185msgstr ""
     186
     187#: includes/Help/Articles.php:104
     188msgid "View help article"
     189msgstr ""
     190
     191#: includes/Help/Articles.php:105
     192msgid "View help articles"
     193msgstr ""
     194
     195#: includes/Help/Articles.php:106
     196#: includes/Help/Center.php:303
     197msgid "Search help articles"
     198msgstr ""
     199
     200#: includes/Help/Articles.php:107
     201#: includes/Help/Center.php:197
     202msgid "No help articles yet."
     203msgstr ""
     204
     205#: includes/Help/Articles.php:108
     206msgid "No help articles in the trash."
     207msgstr ""
     208
     209#: includes/Help/Articles.php:109
     210msgid "Help article published."
     211msgstr ""
     212
     213#: includes/Help/Articles.php:110
     214msgid "Help article updated."
     215msgstr ""
     216
     217#: includes/Help/Articles.php:111
     218msgid "Help article scheduled."
     219msgstr ""
     220
     221#: includes/Help/Articles.php:112
     222msgid "Help article reverted to draft."
     223msgstr ""
     224
     225#: includes/Help/Articles.php:114
     226msgid "Answers customers can read before they write to you."
     227msgstr ""
     228
     229#: includes/Help/Articles.php:233
     230msgid "Choose an existing page for the help center."
     231msgstr ""
     232
     233#: includes/Help/Articles.php:240
     234msgid "The contact link must be a web address starting with http:// or https://."
     235msgstr ""
     236
     237#: includes/Help/Articles.php:291
     238#: includes/Help/Center.php:334
     239#: assets/admin/index.js:1
     240#: assets/admin/index.js:13
     241msgid "Help center"
     242msgstr ""
     243
     244#: includes/Help/Center.php:66
     245#: assets/admin/blocks.js:1
     246msgid "Deskovi help center"
     247msgstr ""
     248
     249#: includes/Help/Center.php:78
     250#: assets/admin/blocks.js:1
     251msgid "Deskovi help search"
     252msgstr ""
     253
     254#. translators: %d: number of articles in the topic
     255#: includes/Help/Center.php:175
     256#, php-format
     257msgid "See all %d article"
     258msgid_plural "See all %d articles"
     259msgstr[0] ""
     260msgstr[1] ""
     261
     262#: includes/Help/Center.php:191
     263msgid "Other articles"
     264msgstr ""
     265
     266#: includes/Help/Center.php:211
     267#: includes/Help/Center.php:234
     268msgid "← All topics"
     269msgstr ""
     270
     271#: includes/Help/Center.php:214
     272msgid "This topic was not found."
     273msgstr ""
     274
     275#: includes/Help/Center.php:223
     276msgid "No articles in this topic yet."
     277msgstr ""
     278
     279#. translators: %s: the customer's search words
     280#: includes/Help/Center.php:240
     281#, php-format
     282msgid "No articles match “%s”"
     283msgstr ""
     284
     285#: includes/Help/Center.php:243
     286msgid "Try other or fewer words, or browse the topics."
     287msgstr ""
     288
     289#. translators: %s: the customer's search words
     290#: includes/Help/Center.php:249
     291#, php-format
     292msgid "Results for “%s”"
     293msgstr ""
     294
     295#: includes/Help/Center.php:304
     296msgid "Search help articles…"
     297msgstr ""
     298
     299#: includes/Help/Center.php:306
     300msgid "Search"
     301msgstr ""
     302
     303#: includes/Help/Center.php:319
     304msgid "Still need help?"
     305msgstr ""
     306
     307#: includes/Help/Center.php:319
     308msgid "Our team is happy to help."
     309msgstr ""
     310
     311#: includes/Help/Center.php:319
     312msgid "Contact support"
     313msgstr ""
     314
     315#: includes/Help/Center.php:344
     316msgid "Breadcrumb"
     317msgstr ""
     318
     319#: includes/Help/Center.php:356
     320msgid "Related articles"
     321msgstr ""
     322
    113323#: includes/Orders/OrderActions.php:35
    114324msgid "Nothing left to refund on this order."
    … …  
    132342msgstr ""
    133343
    134 #: includes/Privacy/PersonalData.php:39
     344#: includes/Privacy/PersonalData.php:40
    135345msgid "Deskovi is a WooCommerce support ticket plugin. When you contact support, this store stores your ticket (subject, messages, attachments, linked order ID, email) in its own database. Payment card data is never collected by Deskovi. Billing address and phone are shared with support agents only if the store owner enables those privacy toggles. Guests may verify with order number + billing email (one-time code). You can request export or erasure of this data via WordPress tools."
    136346msgstr ""
    137347
    138 #: includes/Privacy/PersonalData.php:53
    139 #: includes/Privacy/PersonalData.php:65
    140 #: includes/Privacy/PersonalData.php:144
     348#: includes/Privacy/PersonalData.php:54
     349#: includes/Privacy/PersonalData.php:66
     350#: includes/Privacy/PersonalData.php:152
    141351msgid "Deskovi support tickets"
    142352msgstr ""
    143353
    144 #: includes/Privacy/PersonalData.php:92
    145 #: includes/Widget/Frontend.php:104
    146 #: assets/admin/index.js:6
     354#: includes/Privacy/PersonalData.php:93
     355#: includes/Widget/Frontend.php:145
     356#: assets/admin/index.js:13
    147357msgid "Subject"
    148358msgstr ""
    149359
    150 #: includes/Privacy/PersonalData.php:96
    151 #: assets/admin/index.js:1
    152 #: assets/admin/index.js:6
     360#: includes/Privacy/PersonalData.php:97
     361#: assets/admin/index.js:1
     362#: assets/admin/index.js:8
     363#: assets/admin/index.js:13
    153364msgid "Status"
    154365msgstr ""
    155366
    156 #: includes/Privacy/PersonalData.php:100
     367#: includes/Privacy/PersonalData.php:101
    157368msgid "Name"
    158369msgstr ""
    159370
    160 #: includes/Privacy/PersonalData.php:104
     371#: includes/Privacy/PersonalData.php:105
    161372msgid "Email"
    162373msgstr ""
    163374
    164 #: includes/Privacy/PersonalData.php:108
    165 #: assets/admin/index.js:6
     375#: includes/Privacy/PersonalData.php:109
     376#: assets/admin/index.js:13
    166377msgid "Order ID"
    167378msgstr ""
    168379
    169 #: includes/Privacy/PersonalData.php:112
     380#: includes/Privacy/PersonalData.php:113
    170381msgid "Created"
    171382msgstr ""
    172383
    173384#. translators: 1: message author (customer/agent/system), 2: date
    174 #: includes/Privacy/PersonalData.php:124
     385#: includes/Privacy/PersonalData.php:132
    175386#, php-format
    176387msgid "Message (%1$s, %2$s)"
    177388msgstr ""
    178389
    179 #: includes/Privacy/PersonalData.php:137
     390#: includes/Privacy/PersonalData.php:145
    180391msgid "Attachment"
    181392msgstr ""
    182393
    183 #: includes/Privacy/PersonalData.php:145
     394#: includes/Privacy/PersonalData.php:153
    184395msgid "Support tickets stored on this store."
    185396msgstr ""
    186397
    187 #: includes/Privacy/PersonalData.php:184
     398#: includes/Privacy/PersonalData.php:192
    188399msgid "Deskovi support tickets could not be removed from this store."
    189400msgstr ""
    190401
    191402#. translators: %d: count
    192 #: includes/Privacy/PersonalData.php:196
     403#: includes/Privacy/PersonalData.php:204
    193404#, php-format
    194405msgid "Removed %d Deskovi support ticket(s) from this store."
    … …  
    203414msgstr ""
    204415
    205 #: includes/Rest/AdminController.php:384
     416#: includes/Rest/AdminController.php:478
    206417#: includes/Tickets/CannedReplies.php:115
    207418msgid "Canned reply not found."
    208419msgstr ""
    209420
     421#: includes/Rest/AdminController.php:520
     422msgid "Unknown setup state."
     423msgstr ""
     424
     425#: includes/Rest/AdminController.php:598
     426msgid "You are not allowed to publish pages. Ask an administrator to create the help page."
     427msgstr ""
     428
     429#: includes/Rest/AdminController.php:602
     430msgid "The help page could not be created. Try again, or create a page with the “Deskovi help center” block yourself."
     431msgstr ""
     432
    210433#: includes/Rest/OrderController.php:210
    211434msgid "You can only view your verified order."
    212435msgstr ""
    213436
    214 #: includes/Rest/TicketController.php:423
     437#: includes/Rest/TicketController.php:442
    215438msgid "You cannot work on that ticket."
    216439msgstr ""
    217440
    218 #: includes/Rest/TicketController.php:493
     441#: includes/Rest/TicketController.php:512
    219442msgid "No tickets selected."
    220443msgstr ""
    221444
    222 #: includes/Rest/TicketController.php:516
     445#: includes/Rest/TicketController.php:535
    223446msgid "Invalid bulk action."
    224447msgstr ""
    225448
    226 #: includes/Rest/TicketController.php:785
     449#: includes/Rest/TicketController.php:804
    227450msgid "That message does not belong to this ticket."
    228451msgstr ""
    229452
    230 #: includes/Rest/TicketController.php:793
     453#: includes/Rest/TicketController.php:812
    231454#: includes/Tickets/AttachmentService.php:107
    232455msgid "No file was provided."
    233456msgstr ""
    234457
    235 #: includes/Rest/TicketController.php:815
     458#: includes/Rest/TicketController.php:834
    236459msgid "Attachment not found."
    237460msgstr ""
    238461
    239 #: includes/Rest/TicketController.php:824
    240 #: includes/Rest/TicketController.php:829
    241 #: includes/Rest/TicketController.php:834
     462#: includes/Rest/TicketController.php:843
     463#: includes/Rest/TicketController.php:848
     464#: includes/Rest/TicketController.php:853
    242465msgid "You cannot access this file."
    243466msgstr ""
    244467
    245 #: includes/Rest/TicketController.php:839
     468#: includes/Rest/TicketController.php:858
    246469msgid "File no longer exists."
    247470msgstr ""
    … …  
    292515msgstr ""
    293516
    294 #: includes/Tickets/Categories.php:25
     517#: includes/Tickets/Categories.php:31
    295518msgid "Order question"
    296519msgstr ""
    297520
    298 #: includes/Tickets/Categories.php:26
     521#: includes/Tickets/Categories.php:32
    299522msgid "Shipping / tracking"
    300523msgstr ""
    301524
    302 #: includes/Tickets/Categories.php:27
     525#: includes/Tickets/Categories.php:33
    303526msgid "Refund / return"
    304527msgstr ""
    305528
    306 #: includes/Tickets/Categories.php:28
     529#: includes/Tickets/Categories.php:34
    307530msgid "Cancel request"
    308531msgstr ""
    309532
    310 #: includes/Tickets/Categories.php:29
     533#: includes/Tickets/Categories.php:35
    311534msgid "Product question"
    312535msgstr ""
    313536
    314 #: includes/Tickets/Categories.php:30
     537#: includes/Tickets/Categories.php:36
    315538msgid "Other"
     539msgstr ""
     540
     541#. translators: %d: maximum number of own categories
     542#: includes/Tickets/Categories.php:164
     543#: assets/admin/index.js:5
     544#, php-format,js-format
     545msgid "You can add up to %d categories of your own."
     546msgstr ""
     547
     548#: includes/Tickets/Categories.php:171
     549msgid "Keep at least one category for customers to choose."
     550msgstr ""
     551
     552#. translators: %d: maximum number of fields
     553#: includes/Tickets/FormFields.php:109
     554#, php-format
     555msgid "You can add up to %d fields."
     556msgstr ""
     557
     558#: includes/Tickets/FormFields.php:128
     559msgid "Give every field a question."
     560msgstr ""
     561
     562#: includes/Tickets/FormFields.php:132
     563msgid "Two fields ask the same question."
     564msgstr ""
     565
     566#: includes/Tickets/FormFields.php:138
     567msgid "Choose a type for every field."
     568msgstr ""
     569
     570#. translators: 1: field question, 2: maximum number of choices
     571#: includes/Tickets/FormFields.php:160
     572#, php-format
     573msgid "A dropdown needs between 1 and %2$d choices (\"%1$s\")."
     574msgstr ""
     575
     576#. translators: %s: field question
     577#: includes/Tickets/FormFields.php:207
     578#, php-format
     579msgid "The answer to \"%s\" is not valid."
     580msgstr ""
     581
     582#. translators: %s: question on the ticket form
     583#: includes/Tickets/FormFields.php:219
     584#: includes/Widget/Frontend.php:184
     585#, php-format
     586msgid "Please answer \"%s\"."
     587msgstr ""
     588
     589#: includes/Tickets/FormFields.php:290
     590#: includes/Widget/Frontend.php:182
     591#: assets/admin/index.js:8
     592msgid "Yes"
    316593msgstr ""
    317594
    … …  
    395672
    396673#. translators: 1: recipient email, 2: ticket subject
    397 #: includes/Tickets/Notifications.php:386
     674#: includes/Tickets/Notifications.php:392
    398675#, php-format
    399676msgid "Failed to email %1$s about ticket %2$s"
    … …  
    401678
    402679#. translators: 1: recipient email, 2: ticket subject
    403 #: includes/Tickets/Notifications.php:399
     680#: includes/Tickets/Notifications.php:405
    404681#, php-format
    405682msgid "Emailed %1$s about ticket %2$s"
     683msgstr ""
     684
     685#: includes/Tickets/NotificationSettings.php:46
     686msgid "Please enter a valid email address."
    406687msgstr ""
    407688
    … …  
    423704
    424705#: includes/Tickets/TicketService.php:187
    425 #: includes/Tickets/TicketService.php:481
    426 #: includes/Tickets/TicketService.php:528
    427 #: includes/Tickets/TicketService.php:572
    428 #: includes/Tickets/TicketService.php:618
    429 #: includes/Tickets/TicketService.php:665
    430 #: includes/Tickets/TicketService.php:774
    431 #: includes/Tickets/TicketService.php:1045
    432 #: includes/Tickets/TicketService.php:1099
    433 #: includes/Tickets/TicketService.php:1154
    434 #: includes/Tickets/TicketService.php:1234
     706#: includes/Tickets/TicketService.php:488
     707#: includes/Tickets/TicketService.php:535
     708#: includes/Tickets/TicketService.php:579
     709#: includes/Tickets/TicketService.php:629
     710#: includes/Tickets/TicketService.php:676
     711#: includes/Tickets/TicketService.php:785
     712#: includes/Tickets/TicketService.php:1068
     713#: includes/Tickets/TicketService.php:1122
     714#: includes/Tickets/TicketService.php:1177
     715#: includes/Tickets/TicketService.php:1257
    435716msgid "Ticket not found."
    436717msgstr ""
    … …  
    448729msgstr ""
    449730
    450 #: includes/Tickets/TicketService.php:279
     731#: includes/Tickets/TicketService.php:285
    451732msgid "The email address is too long."
    452733msgstr ""
    453734
    454 #: includes/Tickets/TicketService.php:290
     735#: includes/Tickets/TicketService.php:296
    455736msgid "Login or guest verification required to open a ticket."
    456737msgstr ""
    457738
    458 #: includes/Tickets/TicketService.php:298
     739#: includes/Tickets/TicketService.php:304
    459740msgid "Guest"
    460741msgstr ""
    461742
    462 #: includes/Tickets/TicketService.php:378
    463 #: includes/Tickets/TicketService.php:900
     743#: includes/Tickets/TicketService.php:385
     744#: includes/Tickets/TicketService.php:911
    464745msgid "The ticket could not be saved."
    465746msgstr ""
    466747
    467748#. translators: %s: subject
    468 #: includes/Tickets/TicketService.php:387
     749#: includes/Tickets/TicketService.php:394
    469750#, php-format
    470751msgid "Ticket created: %s"
    471752msgstr ""
    472753
    473 #: includes/Tickets/TicketService.php:415
     754#: includes/Tickets/TicketService.php:422
    474755msgid "Reply message is required."
    475756msgstr ""
    476757
    477 #: includes/Tickets/TicketService.php:450
     758#: includes/Tickets/TicketService.php:457
    478759msgid "Reply added to ticket"
    479760msgstr ""
    480761
    481 #: includes/Tickets/TicketService.php:472
    482 #: includes/Tickets/TicketService.php:949
     762#: includes/Tickets/TicketService.php:479
     763#: includes/Tickets/TicketService.php:960
    483764msgid "Invalid ticket status."
    484765msgstr ""
    485766
    486767#. translators: %s: status
    487 #: includes/Tickets/TicketService.php:495
     768#: includes/Tickets/TicketService.php:502
    488769#, php-format
    489770msgid "Ticket status set to %s"
    490771msgstr ""
    491772
    492 #: includes/Tickets/TicketService.php:519
     773#: includes/Tickets/TicketService.php:526
    493774msgid "Invalid ticket priority."
    494775msgstr ""
    495776
    496777#. translators: %s: priority
    497 #: includes/Tickets/TicketService.php:542
     778#: includes/Tickets/TicketService.php:549
    498779#, php-format
    499780msgid "Ticket priority set to %s"
    500781msgstr ""
    501782
    502 #: includes/Tickets/TicketService.php:566
     783#: includes/Tickets/TicketService.php:573
    503784msgid "Choose a different ticket to merge into."
    504785msgstr ""
    505786
    506787#. translators: 1: merged ticket subject, 2: merged ticket id, 3: number of messages moved, 4: agent name
    507 #: includes/Tickets/TicketService.php:604
     788#: includes/Tickets/TicketService.php:615
    508789#, php-format
    509790msgid "Ticket \"%1$s\" (%2$s) was merged into this one by %4$s. %3$d message was moved here."
    … …  
    512793msgstr[1] ""
    513794
    514 #: includes/Tickets/TicketService.php:608
    515 #: includes/Tickets/TicketService.php:698
     795#: includes/Tickets/TicketService.php:619
     796#: includes/Tickets/TicketService.php:709
    516797msgid "an agent"
    517798msgstr ""
    518799
    519800#. translators: 1: merged ticket id, 2: target ticket id
    520 #: includes/Tickets/TicketService.php:638
     801#: includes/Tickets/TicketService.php:649
    521802#, php-format
    522803msgid "Ticket %1$s merged into %2$s"
    523804msgstr ""
    524805
    525 #: includes/Tickets/TicketService.php:677
     806#: includes/Tickets/TicketService.php:688
    526807msgid "That message is not on this ticket."
    527808msgstr ""
    528809
    529 #: includes/Tickets/TicketService.php:680
     810#: includes/Tickets/TicketService.php:691
    530811msgid "Choose a later message: the first message has to stay on this ticket."
    531812msgstr ""
    532813
    533 #: includes/Tickets/TicketService.php:693
     814#: includes/Tickets/TicketService.php:704
    534815msgid "Choose a message written by the customer or an agent."
    535816msgstr ""
    536817
    537818#. translators: 1: original ticket subject, 2: original ticket id, 3: agent name
    538 #: includes/Tickets/TicketService.php:740
     819#: includes/Tickets/TicketService.php:751
    539820#, php-format
    540821msgid "Split from ticket \"%1$s\" (%2$s) by %3$s."
    … …  
    542823
    543824#. translators: 1: number of messages, 2: new ticket subject, 3: new ticket id, 4: agent name
    544 #: includes/Tickets/TicketService.php:759
     825#: includes/Tickets/TicketService.php:770
    545826#, php-format
    546827msgid "%1$d message was moved to the new ticket \"%2$s\" (%3$s) by %4$s."
    … …  
    550831
    551832#. translators: 1: original ticket id, 2: new ticket id
    552 #: includes/Tickets/TicketService.php:781
     833#: includes/Tickets/TicketService.php:792
    553834#, php-format
    554835msgid "Ticket %1$s split, new ticket %2$s"
    555836msgstr ""
    556837
    557 #: includes/Tickets/TicketService.php:817
     838#: includes/Tickets/TicketService.php:828
    558839msgid "An imported ticket needs a unique key."
    559840msgstr ""
    560841
    561 #: includes/Tickets/TicketService.php:830
     842#: includes/Tickets/TicketService.php:841
    562843msgid "The customer email address is not valid."
    563844msgstr ""
    564845
    565 #: includes/Tickets/TicketService.php:859
     846#: includes/Tickets/TicketService.php:870
    566847msgid "An imported ticket needs at least one message."
    567848msgstr ""
    568849
    569 #: includes/Tickets/TicketService.php:885
     850#: includes/Tickets/TicketService.php:896
    570851msgid "(no subject)"
    571852msgstr ""
    572853
    573854#. translators: %d: number of tickets deleted
    574 #: includes/Tickets/TicketService.php:928
     855#: includes/Tickets/TicketService.php:939
    575856#, php-format
    576857msgid "%d ticket(s) deleted in bulk"
    … …  
    578859
    579860#. translators: 1: number of tickets updated, 2: status
    580 #: includes/Tickets/TicketService.php:976
     861#: includes/Tickets/TicketService.php:987
    581862#, php-format
    582863msgid "%1$d ticket(s) set to %2$s in bulk"
    583864msgstr ""
    584865
    585 #: includes/Tickets/TicketService.php:1056
     866#: includes/Tickets/TicketService.php:1079
    586867msgid "Ticket unassigned"
    587868msgstr ""
    588869
    589 #: includes/Tickets/TicketService.php:1065
     870#: includes/Tickets/TicketService.php:1088
    590871msgid "That user is not a support agent."
    591872msgstr ""
    592873
    593874#. translators: %s: agent display name
    594 #: includes/Tickets/TicketService.php:1078
     875#: includes/Tickets/TicketService.php:1101
    595876#, php-format
    596877msgid "Ticket assigned to %s"
    597878msgstr ""
    598879
    599 #: includes/Tickets/TicketService.php:1111
     880#: includes/Tickets/TicketService.php:1134
    600881msgid "Order unlinked from ticket"
    601882msgstr ""
    602883
    603884#. translators: %d: order id
    604 #: includes/Tickets/TicketService.php:1134
     885#: includes/Tickets/TicketService.php:1157
    605886#, php-format
    606887msgid "Order #%d linked to ticket"
    607888msgstr ""
    608889
    609 #: includes/Tickets/TicketService.php:1163
    610 #: includes/Tickets/TicketService.php:1243
     890#: includes/Tickets/TicketService.php:1186
     891#: includes/Tickets/TicketService.php:1266
    611892msgid "This ticket has no linked order."
    612893msgstr ""
    613894
    614895#. translators: 1: refunded amount, 2: currency code, 3: order id
    615 #: includes/Tickets/TicketService.php:1177
     896#: includes/Tickets/TicketService.php:1200
    616897#, php-format
    617898msgid "Refund of %1$s %2$s issued on order #%3$d via the payment gateway."
    … …  
    619900
    620901#. translators: 1: refunded amount, 2: currency code, 3: order id
    621 #: includes/Tickets/TicketService.php:1184
     902#: includes/Tickets/TicketService.php:1207
    622903#, php-format
    623904msgid "Refund of %1$s %2$s recorded on order #%3$d. This order's payment method doesn't support automatic refunds — process the actual payment return manually if one is owed."
    … …  
    625906
    626907#. translators: 1: order id, 2: ticket id
    627 #: includes/Tickets/TicketService.php:1203
     908#: includes/Tickets/TicketService.php:1226
    628909#, php-format
    629910msgid "Refund issued on order #%1$d from ticket %2$s"
    … …  
    631912
    632913#. translators: %s: customer email
    633 #: includes/Tickets/TicketService.php:1259
     914#: includes/Tickets/TicketService.php:1282
    634915#, php-format
    635916msgid "Invoice email resent to %s."
    … …  
    637918
    638919#. translators: 1: order id, 2: ticket id
    639 #: includes/Tickets/TicketService.php:1272
     920#: includes/Tickets/TicketService.php:1295
    640921#, php-format
    641922msgid "Invoice resent for order #%1$d from ticket %2$s"
    642923msgstr ""
    643924
    644 #: includes/Tickets/TicketService.php:1319
     925#: includes/Tickets/TicketService.php:1342
    645926msgid "You can only link your own orders."
    646927msgstr ""
    647928
    648 #: includes/Widget/Frontend.php:100
     929#: includes/Widget/Account.php:124
     930#: includes/Widget/Account.php:148
     931#: includes/Widget/Frontend.php:138
    649932msgid "Support"
    650933msgstr ""
    651934
    652 #: includes/Widget/Frontend.php:101
     935#: includes/Widget/Account.php:199
     936msgid "Get help"
     937msgstr ""
     938
     939#: includes/Widget/Account.php:222
     940msgid "Get help with this order"
     941msgstr ""
     942
     943#: includes/Widget/Embed.php:51
     944msgid "Please turn on JavaScript to see and send support messages."
     945msgstr ""
     946
     947#: includes/Widget/Embed.php:101
     948#: assets/admin/blocks.js:1
     949msgid "Deskovi support"
     950msgstr ""
     951
     952#: includes/Widget/Frontend.php:139
     953msgid "These articles may answer your question"
     954msgstr ""
     955
     956#: includes/Widget/Frontend.php:140
     957msgid "Browse all help articles"
     958msgstr ""
     959
     960#: includes/Widget/Frontend.php:141
     961msgid "(opens in a new tab)"
     962msgstr ""
     963
     964#: includes/Widget/Frontend.php:142
    653965msgid "Close"
    654966msgstr ""
    655967
    656 #: includes/Widget/Frontend.php:102
     968#: includes/Widget/Frontend.php:143
    657969msgid "Your tickets"
    658970msgstr ""
    659971
    660 #: includes/Widget/Frontend.php:103
    661 #: assets/admin/index.js:1
     972#: includes/Widget/Frontend.php:144
     973#: assets/admin/index.js:4
     974#: assets/admin/index.js:8
    662975msgid "New ticket"
    663976msgstr ""
    664977
    665 #: includes/Widget/Frontend.php:105
    666 #: assets/admin/index.js:1
     978#: includes/Widget/Frontend.php:146
     979#: assets/admin/index.js:1
     980#: assets/admin/index.js:13
     981msgid "Message"
     982msgstr ""
     983
     984#: includes/Widget/Frontend.php:147
     985#: assets/admin/index.js:8
     986#: assets/admin/index.js:13
     987msgid "Category"
     988msgstr ""
     989
     990#: includes/Widget/Frontend.php:148
     991msgid "Related order"
     992msgstr ""
     993
     994#: includes/Widget/Frontend.php:149
     995msgid "No order"
     996msgstr ""
     997
     998#: includes/Widget/Frontend.php:150
     999msgid "Send"
     1000msgstr ""
     1001
     1002#: includes/Widget/Frontend.php:151
     1003#: assets/admin/index.js:13
     1004msgid "Reply"
     1005msgstr ""
     1006
     1007#: includes/Widget/Frontend.php:152
     1008#: assets/admin/index.js:7
     1009msgid "Back"
     1010msgstr ""
     1011
     1012#: includes/Widget/Frontend.php:153
     1013#: assets/admin/index.js:5
     1014#: assets/admin/index.js:7
     1015#: assets/admin/index.js:12
     1016msgid "Loading…"
     1017msgstr ""
     1018
     1019#: includes/Widget/Frontend.php:154
     1020msgid "No tickets yet."
     1021msgstr ""
     1022
     1023#: includes/Widget/Frontend.php:155
     1024msgid "Get support"
     1025msgstr ""
     1026
     1027#: includes/Widget/Frontend.php:156
     1028msgid "Log in, or continue with your order number and billing email."
     1029msgstr ""
     1030
     1031#: includes/Widget/Frontend.php:157
     1032msgid "Log in"
     1033msgstr ""
     1034
     1035#: includes/Widget/Frontend.php:158
     1036msgid "Continue with order"
     1037msgstr ""
     1038
     1039#: includes/Widget/Frontend.php:159
     1040msgid "Order number"
     1041msgstr ""
     1042
     1043#: includes/Widget/Frontend.php:160
     1044msgid "Billing email"
     1045msgstr ""
     1046
     1047#: includes/Widget/Frontend.php:161
     1048msgid "Verification code"
     1049msgstr ""
     1050
     1051#: includes/Widget/Frontend.php:162
     1052msgid "Send code"
     1053msgstr ""
     1054
     1055#: includes/Widget/Frontend.php:163
     1056msgid "Verify"
     1057msgstr ""
     1058
     1059#: includes/Widget/Frontend.php:164
     1060msgid "Check your email for a one-time code."
     1061msgstr ""
     1062
     1063#: includes/Widget/Frontend.php:165
     1064msgid "Something went wrong. Please try again."
     1065msgstr ""
     1066
     1067#: includes/Widget/Frontend.php:166
     1068#: assets/admin/index.js:13
     1069msgid "Create ticket"
     1070msgstr ""
     1071
     1072#: includes/Widget/Frontend.php:167
     1073#: assets/admin/index.js:1
     1074#: assets/admin/index.js:7
     1075#: assets/admin/index.js:8
     1076#: assets/admin/index.js:11
     1077msgid "Open"
     1078msgstr ""
     1079
     1080#: includes/Widget/Frontend.php:168
     1081msgid "Unread"
     1082msgstr ""
     1083
     1084#: includes/Widget/Frontend.php:169
     1085msgid "Your orders"
     1086msgstr ""
     1087
     1088#: includes/Widget/Frontend.php:170
     1089msgid "Order details"
     1090msgstr ""
     1091
     1092#: includes/Widget/Frontend.php:171
     1093msgid "Tracking"
     1094msgstr ""
     1095
     1096#: includes/Widget/Frontend.php:172
     1097msgid "No tracking number yet."
     1098msgstr ""
     1099
     1100#: includes/Widget/Frontend.php:173
     1101msgid "View order / invoice"
     1102msgstr ""
     1103
     1104#: includes/Widget/Frontend.php:174
     1105msgid "Request return"
     1106msgstr ""
     1107
     1108#: includes/Widget/Frontend.php:175
     1109msgid "Request cancel"
     1110msgstr ""
     1111
     1112#: includes/Widget/Frontend.php:176
     1113msgid "No recent orders."
     1114msgstr ""
     1115
     1116#. translators: %s: order number
     1117#: includes/Widget/Frontend.php:178
     1118#, php-format
     1119msgid "Help with order #%s"
     1120msgstr ""
     1121
     1122#: includes/Widget/Frontend.php:179
     1123msgid "Earlier tickets about this order"
     1124msgstr ""
     1125
     1126#: includes/Widget/Frontend.php:180
     1127msgid "required"
     1128msgstr ""
     1129
     1130#: includes/Widget/Frontend.php:181
     1131msgid "Choose…"
     1132msgstr ""
     1133
     1134#: includes/Widget/Settings.php:79
     1135msgid "Invalid widget placement."
     1136msgstr ""
     1137
     1138#: includes/Widget/Settings.php:92
     1139msgid "Invalid widget theme."
     1140msgstr ""
     1141
     1142#: assets/admin/blocks.js:1
     1143msgid "Customers see their tickets, reply and open new ones. Guests can log in or continue with their order number and billing email."
     1144msgstr ""
     1145
     1146#: assets/admin/blocks.js:1
     1147msgid "support"
     1148msgstr ""
     1149
     1150#: assets/admin/blocks.js:1
     1151msgid "tickets"
     1152msgstr ""
     1153
     1154#: assets/admin/blocks.js:1
     1155msgid "help"
     1156msgstr ""
     1157
     1158#: assets/admin/blocks.js:1
     1159#: assets/admin/index.js:13
     1160msgid "Settings"
     1161msgstr ""
     1162
     1163#: assets/admin/blocks.js:1
     1164msgid "Start on"
     1165msgstr ""
     1166
     1167#: assets/admin/blocks.js:1
     1168msgid "Their tickets"
     1169msgstr ""
     1170
     1171#: assets/admin/blocks.js:1
     1172msgid "New ticket form"
     1173msgstr ""
     1174
     1175#: assets/admin/blocks.js:1
     1176msgid "Shows the new ticket form here on the live page."
     1177msgstr ""
     1178
     1179#: assets/admin/blocks.js:1
     1180msgid "Shows the customer's tickets here on the live page."
     1181msgstr ""
     1182
     1183#: assets/admin/blocks.js:1
     1184msgid "Your help articles grouped by topic, with a search box. Customers can find an answer before they write to you."
     1185msgstr ""
     1186
     1187#: assets/admin/blocks.js:1
     1188msgid "knowledge base"
     1189msgstr ""
     1190
     1191#: assets/admin/blocks.js:1
     1192msgid "faq"
     1193msgstr ""
     1194
     1195#: assets/admin/blocks.js:1
     1196msgid "Shows your published help articles by topic, with a search box, on the live page. Write articles under Deskovi → Help articles."
     1197msgstr ""
     1198
     1199#: assets/admin/blocks.js:1
     1200msgid "A search box for your help articles. Results open on your help center page."
     1201msgstr ""
     1202
     1203#: assets/admin/blocks.js:1
     1204msgid "search"
     1205msgstr ""
     1206
     1207#: assets/admin/blocks.js:1
     1208msgid "Shows a search box on the live page. It needs a help center page, chosen under Deskovi → Help center."
     1209msgstr ""
     1210
     1211#: assets/admin/index.js:1
     1212msgid "Dismiss"
     1213msgstr ""
     1214
     1215#: assets/admin/index.js:1
     1216msgid "Failed to load activity."
     1217msgstr ""
     1218
     1219#: assets/admin/index.js:1
     1220msgid "No activity data."
     1221msgstr ""
     1222
     1223#: assets/admin/index.js:1
     1224#: assets/admin/index.js:13
     1225msgid "Activity"
     1226msgstr ""
     1227
     1228#: assets/admin/index.js:1
     1229msgid "A running log of ticket and account events on this site."
     1230msgstr ""
     1231
     1232#: assets/admin/index.js:1
     1233msgid "When"
     1234msgstr ""
     1235
     1236#: assets/admin/index.js:1
     1237msgid "Type"
     1238msgstr ""
     1239
     1240#: assets/admin/index.js:1
     1241msgid "Event"
     1242msgstr ""
     1243
     1244#: assets/admin/index.js:1
     1245msgid "Result"
     1246msgstr ""
     1247
     1248#: assets/admin/index.js:1
     1249msgid "Failed to load diagnostics."
     1250msgstr ""
     1251
     1252#: assets/admin/index.js:1
     1253msgid "Pass"
     1254msgstr ""
     1255
     1256#: assets/admin/index.js:1
     1257msgid "OK"
     1258msgstr ""
     1259
     1260#: assets/admin/index.js:1
     1261msgid "Fail"
     1262msgstr ""
     1263
     1264#: assets/admin/index.js:1
     1265msgid "Info"
     1266msgstr ""
     1267
     1268#: assets/admin/index.js:1
     1269#: assets/admin/index.js:7
     1270#: assets/admin/index.js:13
     1271msgid "Diagnostics"
     1272msgstr ""
     1273
     1274#: assets/admin/index.js:1
     1275msgid "Support-safe environment snapshot. Share intentionally — never automatic full log upload."
     1276msgstr ""
     1277
     1278#: assets/admin/index.js:1
     1279msgid "Report copied to clipboard."
     1280msgstr ""
     1281
     1282#: assets/admin/index.js:1
     1283msgid "Could not copy report."
     1284msgstr ""
     1285
     1286#: assets/admin/index.js:1
     1287msgid "Copy report"
     1288msgstr ""
     1289
     1290#: assets/admin/index.js:1
     1291msgid "Diagnostics refreshed."
     1292msgstr ""
     1293
     1294#: assets/admin/index.js:1
     1295msgid "Run health check"
     1296msgstr ""
     1297
     1298#: assets/admin/index.js:1
     1299msgid "Check"
     1300msgstr ""
     1301
     1302#: assets/admin/index.js:1
     1303msgid "Value"
     1304msgstr ""
     1305
     1306#: assets/admin/index.js:1
     1307msgid "Active theme"
     1308msgstr ""
     1309
     1310#: assets/admin/index.js:1
     1311msgid "Sanitized recent errors"
     1312msgstr ""
     1313
     1314#: assets/admin/index.js:1
     1315msgid "No diagnostic errors recorded."
     1316msgstr ""
     1317
     1318#: assets/admin/index.js:1
     1319msgid "Time"
     1320msgstr ""
     1321
     1322#: assets/admin/index.js:1
     1323msgid "Code"
     1324msgstr ""
     1325
     1326#: assets/admin/index.js:1
     1327msgid "Email channel"
     1328msgstr ""
     1329
     1330#: assets/admin/index.js:1
     1331msgid "Customers write to your support address and the mail becomes a ticket. Your replies go back as email and thread with the customer’s own mail."
     1332msgstr ""
     1333
     1334#: assets/admin/index.js:1
     1335msgid "Gmail / Google Workspace, Microsoft 365 / Outlook or any IMAP mailbox, with your own app, no relay server"
     1336msgstr ""
     1337
     1338#: assets/admin/index.js:1
     1339msgid "Replies are matched to the right ticket, quoted history and signatures are removed, attachments are saved"
     1340msgstr ""
     1341
     1342#: assets/admin/index.js:1
     1343msgid "Agents can answer a notification by replying to the email"
     1344msgstr ""
     1345
     1346#: assets/admin/index.js:1
     1347msgid "Automation"
     1348msgstr ""
     1349
     1350#: assets/admin/index.js:1
     1351msgid "Rules that assign, prioritise and annotate tickets for you when something happens."
     1352msgstr ""
     1353
     1354#: assets/admin/index.js:1
     1355msgid "Assign to one agent, in turn, or to whoever has the fewest open tickets"
     1356msgstr ""
     1357
     1358#: assets/admin/index.js:1
     1359msgid "Practice mode shows what a rule would do before it changes anything"
     1360msgstr ""
     1361
     1362#: assets/admin/index.js:1
     1363msgid "Rules never email customers, refund or delete anything"
     1364msgstr ""
     1365
     1366#: assets/admin/index.js:1
     1367msgid "Tags"
     1368msgstr ""
     1369
     1370#: assets/admin/index.js:1
     1371msgid "Put your own labels on tickets and find them again."
     1372msgstr ""
     1373
     1374#: assets/admin/index.js:1
     1375msgid "Labels such as “vip” or “damaged-item”, shown in the ticket list"
     1376msgstr ""
     1377
     1378#: assets/admin/index.js:1
     1379msgid "Filter the list by tag, save it as a view, and let automation rules add tags"
     1380msgstr ""
     1381
     1382#: assets/admin/index.js:1
     1383msgid "Custom fields"
     1384msgstr ""
     1385
     1386#: assets/admin/index.js:1
     1387msgid "Add your own details to tickets, such as the return reason or the carrier."
     1388msgstr ""
     1389
     1390#: assets/admin/index.js:1
     1391msgid "Text, number, dropdown, checkbox and date fields that only your team sees"
     1392msgstr ""
     1393
     1394#: assets/admin/index.js:1
     1395msgid "They move with a merge and are deleted with the ticket"
     1396msgstr ""
     1397
     1398#: assets/admin/index.js:1
     1399msgid "Roles & permissions"
     1400msgstr ""
     1401
     1402#: assets/admin/index.js:1
     1403msgid "Decide which role may refund, see reports, set up rules or manage mailboxes."
     1404msgstr ""
     1405
     1406#: assets/admin/index.js:1
     1407msgid "A Support Manager role next to the Support Agent role"
     1408msgstr ""
     1409
     1410#: assets/admin/index.js:1
     1411msgid "One table that shows what every role may do"
     1412msgstr ""
     1413
     1414#: assets/admin/index.js:1
     1415msgid "Response times (SLA)"
     1416msgstr ""
     1417
     1418#: assets/admin/index.js:1
     1419msgid "First-reply and resolution targets per priority, counted in your working hours."
     1420msgstr ""
     1421
     1422#: assets/admin/index.js:1
     1423msgid "Timers on every ticket and a “Needs attention” queue"
     1424msgstr ""
     1425
     1426#: assets/admin/index.js:1
     1427msgid "The clock can pause while you wait for the customer"
     1428msgstr ""
     1429
     1430#: assets/admin/index.js:1
     1431msgid "One-time warning and breach emails to your team"
     1432msgstr ""
     1433
     1434#: assets/admin/index.js:1
     1435msgid "Team tools"
     1436msgstr ""
     1437
     1438#: assets/admin/index.js:1
     1439msgid "Work on tickets together without stepping on each other."
     1440msgstr ""
     1441
     1442#: assets/admin/index.js:1
     1443msgid "A notice when a colleague has the same ticket open or is writing a reply"
     1444msgstr ""
     1445
     1446#: assets/admin/index.js:1
     1447msgid "@mentions in internal notes, reply drafts, and handover with a note"
     1448msgstr ""
     1449
     1450#: assets/admin/index.js:1
     1451msgid "Star and watch tickets, log the time you spend, and work from the keyboard"
     1452msgstr ""
     1453
     1454#: assets/admin/index.js:1
     1455msgid "Order tools"
     1456msgstr ""
     1457
     1458#: assets/admin/index.js:1
     1459msgid "Do more with the order without leaving the ticket."
     1460msgstr ""
     1461
     1462#: assets/admin/index.js:1
     1463msgid "Refund chosen items or an amount, change the status, cancel, add a note or fix the shipping address"
     1464msgstr ""
     1465
     1466#: assets/admin/index.js:1
     1467msgid "A customer card with lifetime value, orders and earlier tickets"
     1468msgstr ""
     1469
     1470#: assets/admin/index.js:1
     1471msgid "Send a replacement order or a one-time coupon"
     1472msgstr ""
     1473
     1474#: assets/admin/index.js:1
     1475msgid "Import tickets"
     1476msgstr ""
     1477
     1478#: assets/admin/index.js:1
     1479msgid "Move your history from another helpdesk without emailing a single customer."
     1480msgstr ""
     1481
     1482#: assets/admin/index.js:1
     1483msgid "Bring in a CSV export from Help Scout, Zendesk, Freshdesk and others"
     1484msgstr ""
     1485
     1486#: assets/admin/index.js:1
     1487msgid "Check first, keep the original dates and tags, and never import the same ticket twice"
     1488msgstr ""
     1489
     1490#: assets/admin/index.js:1
     1491msgid "Connections and API"
     1492msgstr ""
     1493
     1494#: assets/admin/index.js:1
     1495msgid "Tell the other tools you use what happens in your helpdesk."
     1496msgstr ""
     1497
     1498#: assets/admin/index.js:1
     1499msgid "Signed webhooks for Zapier, Make or your CRM, and messages to Slack, Discord, Teams or Telegram"
     1500msgstr ""
     1501
     1502#: assets/admin/index.js:1
     1503msgid "A REST API with read and write keys, a customer lookup for your CRM, and a hook for your own code"
     1504msgstr ""
     1505
     1506#: assets/admin/index.js:1
     1507msgid "Self-service"
     1508msgstr ""
     1509
     1510#: assets/admin/index.js:1
     1511msgid "Before a customer sends a ticket, the chat widget shows where their order is and pages of your store that may already answer the question."
     1512msgstr ""
     1513
     1514#: assets/admin/index.js:1
     1515msgid "Order status and tracking for the customer’s own order"
     1516msgstr ""
     1517
     1518#: assets/admin/index.js:1
     1519msgid "Suggested public pages, then “Did this answer your question?”"
     1520msgstr ""
     1521
     1522#: assets/admin/index.js:1
     1523msgid "AI assistant"
     1524msgstr ""
     1525
     1526#: assets/admin/index.js:1
     1527msgid "Order-aware reply drafts, summaries, translation and suggestions inside the ticket, with your own OpenAI or Anthropic key."
     1528msgstr ""
     1529
     1530#: assets/admin/index.js:1
     1531msgid "Customer details are masked before anything leaves your site"
     1532msgstr ""
     1533
     1534#: assets/admin/index.js:1
     1535msgid "Drafts only: nothing is sent or changed unless an agent does it"
     1536msgstr ""
     1537
     1538#: assets/admin/index.js:1
     1539msgid "Reports and satisfaction"
     1540msgstr ""
     1541
     1542#: assets/admin/index.js:1
     1543msgid "How fast you answer, what is waiting, who is busy and how customers feel, plus store views such as tickets per product."
     1544msgstr ""
     1545
     1546#: assets/admin/index.js:1
     1547msgid "Optional one-click satisfaction survey when a ticket is resolved"
     1548msgstr ""
     1549
     1550#: assets/admin/index.js:1
     1551msgid "Weekly or monthly summary email and optional deletion of old tickets"
     1552msgstr ""
     1553
     1554#: assets/admin/index.js:1
     1555msgid "Deskovi Pro"
     1556msgstr ""
     1557
     1558#: assets/admin/index.js:1
     1559msgid "A separate add-on for stores with more tickets to handle. It works on top of this plugin and keeps everything on your own site."
     1560msgstr ""
     1561
     1562#: assets/admin/index.js:1
     1563msgid "Learn more"
     1564msgstr ""
     1565
     1566#: assets/admin/index.js:1
     1567msgid "Pro"
     1568msgstr ""
     1569
     1570#: assets/admin/index.js:1
     1571msgid "Everything in Deskovi (free) keeps working as it is. Installing Deskovi Pro turns these features on and replaces this page with their settings."
     1572msgstr ""
     1573
     1574#: assets/admin/index.js:1
     1575msgid "Support tickets"
     1576msgstr ""
     1577
     1578#: assets/admin/index.js:1
     1579msgid "Customers open tickets, logged in or as a verified guest. Every ticket has a conversation, a status (Open, Pending, Resolved, Closed) and optional attachments."
     1580msgstr ""
     1581
     1582#: assets/admin/index.js:1
     1583msgid "Order-aware support"
     1584msgstr ""
     1585
     1586#: assets/admin/index.js:1
     1587msgid "Link a ticket to a WooCommerce order and see its items, total, shipping, status and timeline beside the conversation."
     1588msgstr ""
     1589
     1590#: assets/admin/index.js:1
     1591msgid "Refunds from a ticket"
     1592msgstr ""
     1593
     1594#: assets/admin/index.js:1
     1595msgid "Issue a full or partial refund, or resend the order invoice email, without opening the order."
     1596msgstr ""
     1597
     1598#: assets/admin/index.js:1
     1599msgid "Filters and saved views"
     1600msgstr ""
     1601
     1602#: assets/admin/index.js:1
     1603msgid "Narrow the ticket list by status, priority, category, assignee or search, and save a combination as a view you can open with one click."
     1604msgstr ""
     1605
     1606#: assets/admin/index.js:1
     1607msgid "Merge duplicate tickets"
     1608msgstr ""
     1609
     1610#: assets/admin/index.js:1
     1611msgid "When a customer writes twice about the same thing, merge one ticket into the other: every message and file moves, and the conversation stays in one place."
     1612msgstr ""
     1613
     1614#: assets/admin/index.js:1
     1615msgid "Priority and assignment"
     1616msgstr ""
     1617
     1618#: assets/admin/index.js:1
     1619msgid "Mark tickets Low, Normal, High or Urgent, hand them to an agent, and filter by Unassigned or Assigned to me."
     1620msgstr ""
     1621
     1622#: assets/admin/index.js:1
     1623msgid "Internal notes"
     1624msgstr ""
     1625
     1626#: assets/admin/index.js:1
     1627msgid "Leave a note only your team can see. It is never shown to the customer and its attachments stay private too."
     1628msgstr ""
     1629
     1630#: assets/admin/index.js:1
     1631msgid "Canned replies"
     1632msgstr ""
     1633
     1634#: assets/admin/index.js:1
     1635msgid "Save reusable answers with placeholders such as {customer_name} and {order_id}, and insert one with a click."
     1636msgstr ""
     1637
     1638#: assets/admin/index.js:1
     1639msgid "Write help articles in the WordPress editor, group them by topic and publish a help page with a search box. Matching articles also appear while a customer writes a new ticket."
     1640msgstr ""
     1641
     1642#: assets/admin/index.js:1
     1643msgid "Attachments"
     1644msgstr ""
     1645
     1646#: assets/admin/index.js:1
     1647msgid "Customers and agents can attach JPG, PNG, GIF, WebP, PDF and TXT files, up to 5 MB each. Files are served only to people who may see the ticket."
     1648msgstr ""
     1649
     1650#: assets/admin/index.js:1
     1651msgid "Bulk actions and CSV export"
     1652msgstr ""
     1653
     1654#: assets/admin/index.js:1
     1655msgid "Change the status of, or delete, many tickets at once. Export the list you are looking at to a spreadsheet."
     1656msgstr ""
     1657
     1658#: assets/admin/index.js:1
     1659msgid "Email notifications"
     1660msgstr ""
     1661
     1662#: assets/admin/index.js:1
     1663msgid "Switch on or off the emails for a new ticket, a customer reply, an agent reply and an assignment. They are sent by WordPress itself."
     1664msgstr ""
     1665
     1666#: assets/admin/index.js:1
     1667msgid "Storefront chat widget"
     1668msgstr ""
     1669
     1670#: assets/admin/index.js:1
     1671msgid "A small launcher on your store. It loads only after it is clicked and never on the cart or checkout. Visitors who are not logged in confirm with a code sent to their email."
     1672msgstr ""
     1673
     1674#: assets/admin/index.js:1
     1675#: assets/admin/index.js:7
     1676#: assets/admin/index.js:13
     1677msgid "Overview"
     1678msgstr ""
     1679
     1680#: assets/admin/index.js:1
     1681msgid "One screen with what is open, pending and unassigned, how long the oldest ticket has been waiting, new tickets per day and the latest tickets."
     1682msgstr ""
     1683
     1684#: assets/admin/index.js:1
     1685msgid "Privacy by design"
     1686msgstr ""
     1687
     1688#: assets/admin/index.js:1
     1689msgid "Everything stays in your WordPress database. Choose what order details agents see, and use WordPress’s own export and erase tools for personal data."
     1690msgstr ""
     1691
     1692#: assets/admin/index.js:1
     1693msgid "Diagnostics and activity log"
     1694msgstr ""
     1695
     1696#: assets/admin/index.js:1
     1697msgid "Health checks for your setup and a log of what Deskovi has done, so a problem is easy to explain and fix."
     1698msgstr ""
     1699
     1700#: assets/admin/index.js:1
     1701msgid "Built for add-ons"
     1702msgstr ""
     1703
     1704#: assets/admin/index.js:1
     1705msgid "Other plugins can add screens, buttons and panels through a documented extension API, without changing Deskovi."
     1706msgstr ""
     1707
     1708#: assets/admin/index.js:1
     1709msgid "Finding your way around"
     1710msgstr ""
     1711
     1712#: assets/admin/index.js:1
     1713msgid "Open “Deskovi” in the WordPress admin menu. The menu on the left of the Deskovi screen is grouped: Work (Tickets, Canned Replies, Help center), Insights (Activity, and Reports with Pro), Automate (Pro), Channels (Widget, and Mailboxes with Pro) and Settings (Notifications, Data & Privacy, Diagnostics, Docs & Features). Overview is the first item."
     1714msgstr ""
     1715
     1716#: assets/admin/index.js:1
     1717msgid "Reading the Overview"
     1718msgstr ""
     1719
     1720#: assets/admin/index.js:1
     1721msgid "The four numbers at the top are the tickets that need you. Open and Pending count the tickets in those statuses. Unassigned counts the open and pending ones that have no agent, and turns amber when there are any. “Oldest waiting” is how long the longest-waiting ticket has been open. The bars show how many tickets arrived on each of the last 7 days (UTC)."
     1722msgstr ""
     1723
     1724#: assets/admin/index.js:1
     1725msgid "How customers open a ticket"
     1726msgstr ""
     1727
     1728#: assets/admin/index.js:1
     1729msgid "Customers use the chat widget on your store. If they are logged in they fill in a short form (subject, category, message, an optional order). If they are not, they enter their email and the order number and confirm with a one-time code sent to that email, so no account is needed."
     1730msgstr ""
     1731
     1732#: assets/admin/index.js:1
     1733msgid "Replying to a ticket"
     1734msgstr ""
     1735
     1736#: assets/admin/index.js:1
     1737msgid "Open Deskovi → Tickets and click a ticket. The conversation is on the right."
     1738msgstr ""
     1739
     1740#: assets/admin/index.js:1
     1741msgid "Write your answer in the reply box. Insert a canned reply from the menu above it if you have one."
     1742msgstr ""
     1743
     1744#: assets/admin/index.js:1
     1745msgid "Tick “Internal note (not visible to customer)” for a message only your team should see."
     1746msgstr ""
     1747
     1748#: assets/admin/index.js:1
     1749msgid "Click “Send reply”. The customer is emailed if the “Agent reply” notification is on. When an agent replies to an open ticket it moves to Pending; when a customer replies to a resolved ticket it opens again."
     1750msgstr ""
     1751
     1752#: assets/admin/index.js:1
     1753msgid "Help articles and the help center"
     1754msgstr ""
     1755
     1756#: assets/admin/index.js:1
     1757msgid "Help articles are answers to common questions that customers can read on your site at any time. They are ordinary WordPress content: anyone who can write posts can write them, and they are kept when Deskovi is removed."
     1758msgstr ""
     1759
     1760#: assets/admin/index.js:1
     1761msgid "Open Deskovi → Help center and click “Create the help center page”, or choose a page of your own that holds the “Deskovi help center” block or the [deskovi_help] shortcode."
     1762msgstr ""
     1763
     1764#: assets/admin/index.js:1
     1765msgid "Click “Write an article”. Give it a title, write the answer and pick one or more topics in the sidebar. An excerpt, if you write one, is used as the summary in search results."
     1766msgstr ""
     1767
     1768#: assets/admin/index.js:1
     1769msgid "The help page lists every topic with its first five articles, then the articles without a topic, each list in alphabetical order."
     1770msgstr ""
     1771
     1772#: assets/admin/index.js:1
     1773msgid "Customers can search titles and text. Put the “Deskovi help search” block anywhere else on your site, for example on the shop or contact page; its results open on the help page."
     1774msgstr ""
     1775
     1776#: assets/admin/index.js:1
     1777msgid "While a customer writes a new ticket, up to three articles that match the subject (or the start of the message) appear under it and open in a new tab, so the form is not lost. Switch this off under Widget → Help articles."
     1778msgstr ""
     1779
     1780#: assets/admin/index.js:1
     1781msgid "Each article shows a way back to its topic, up to three related articles and a “Contact support” link, which leads to the Support tab in My Account unless you enter another address."
     1782msgstr ""
     1783
     1784#: assets/admin/index.js:1
     1785msgid "Articles live at /help-center/article-name/. A developer can change that with the itsdesk_help_article_base filter (then save Settings → Permalinks once)."
     1786msgstr ""
     1787
     1788#: assets/admin/index.js:1
     1789msgid "Above the ticket list, choose a status (including “Open or pending”, which is what still needs work), a priority and a category, use the Unassigned and Assigned to me buttons, or search by subject, name or email. They combine, and the list, the count and Export CSV all follow them."
     1790msgstr ""
     1791
     1792#: assets/admin/index.js:1
     1793msgid "Set the filters you use often, for example status “Open or pending” and priority “Urgent”."
     1794msgstr ""
     1795
     1796#: assets/admin/index.js:1
     1797msgid "Click “Save this view”, give it a name and press Enter. It appears as a button above the list."
     1798msgstr ""
     1799
     1800#: assets/admin/index.js:1
     1801msgid "Click a view to apply it again. The × on a view deletes it. Views belong to you: other agents never see or change them, and each agent can keep up to 20."
     1802msgstr ""
     1803
     1804#: assets/admin/index.js:1
     1805msgid "Add-ons can add their own filters beside the built-in ones (Deskovi Pro adds a tag filter)."
     1806msgstr ""
     1807
     1808#: assets/admin/index.js:1
     1809msgid "Merging duplicate tickets"
     1810msgstr ""
     1811
     1812#: assets/admin/index.js:1
     1813msgid "Open the ticket that should go away, click “Merge into another ticket…” under the status buttons, find the ticket it belongs to (the customer’s other tickets are listed first, or search by subject, name or email) and click “Merge into this”. Deskovi asks you to confirm because it cannot be undone."
     1814msgstr ""
     1815
     1816#: assets/admin/index.js:1
     1817msgid "All messages (including internal notes) and attachments move to the ticket you chose, in the order they were written. The merged ticket is deleted."
     1818msgstr ""
     1819
     1820#: assets/admin/index.js:1
     1821msgid "The ticket that stays keeps its customer and subject. It takes the higher priority, gets the merged ticket’s agent if it had none, and is opened again if it was resolved or closed while the merged ticket was still active."
     1822msgstr ""
     1823
     1824#: assets/admin/index.js:1
     1825msgid "An internal note on it records which ticket was merged, when and by whom. Nobody is emailed."
     1826msgstr ""
     1827
     1828#: assets/admin/index.js:1
     1829msgid "Merging tickets of two different customers is allowed, so check the email address before you confirm."
     1830msgstr ""
     1831
     1832#: assets/admin/index.js:1
     1833msgid "Status and priority"
     1834msgstr ""
     1835
     1836#: assets/admin/index.js:1
     1837msgid "Use the four buttons under the ticket to set Open, Pending, Resolved or Closed. Pending means you are waiting for the customer. Use the Priority menu (Low, Normal, High, Urgent) to show what needs attention first. Both are saved at once."
     1838msgstr ""
     1839
     1840#: assets/admin/index.js:1
     1841msgid "Assigning tickets"
     1842msgstr ""
     1843
     1844#: assets/admin/index.js:1
     1845msgid "Pick an agent in “Assigned to”, or leave it on Unassigned for anyone to take. Above the ticket list, “Unassigned” and “Assigned to me” filter the list. The assigned agent is the one emailed about customer replies. Agents are people who may manage Deskovi (administrators and shop managers by default)."
     1846msgstr ""
     1847
     1848#: assets/admin/index.js:1
     1849msgid "Linking a ticket to an order"
     1850msgstr ""
     1851
     1852#: assets/admin/index.js:1
     1853msgid "If the customer chose an order it is linked already. Otherwise type a WooCommerce order number into “Order ID” and click “Link order”. The ticket then shows the order’s items, total, payment and shipping method and timeline. Billing address and phone only appear if you allowed them under Data & Privacy."
     1854msgstr ""
     1855
     1856#: assets/admin/index.js:1
     1857msgid "Issuing a refund or resending an invoice"
     1858msgstr ""
     1859
     1860#: assets/admin/index.js:1
     1861msgid "You need the permission to edit WooCommerce orders. In the linked order card:"
     1862msgstr ""
     1863
     1864#: assets/admin/index.js:1
     1865msgid "Leave the amount empty to refund what is left of the order, or type a smaller amount for a partial refund."
     1866msgstr ""
     1867
     1868#: assets/admin/index.js:1
     1869msgid "Add a short reason if you like; it is saved with the refund."
     1870msgstr ""
     1871
     1872#: assets/admin/index.js:1
     1873msgid "Click “Issue refund”. If the payment gateway can refund, the money is returned there; if not, the refund is recorded in WooCommerce and you return the money yourself. A note in the ticket says which happened."
     1874msgstr ""
     1875
     1876#: assets/admin/index.js:1
     1877msgid "To send the customer their order email again instead, click “Resend invoice”. No money moves."
     1878msgstr ""
     1879
     1880#: assets/admin/index.js:1
     1881msgid "Click “Attach” under the reply box. Allowed files: JPG, PNG, GIF, WebP, PDF and TXT, up to 5 MB each. Files are checked on upload and are downloadable only by the customer who owns the ticket and by agents. Attachments on internal notes are never visible to the customer."
     1882msgstr ""
     1883
     1884#: assets/admin/index.js:1
     1885msgid "Answers you give again and again."
     1886msgstr ""
     1887
     1888#: assets/admin/index.js:1
     1889msgid "Go to Deskovi → Canned Replies and click “Add canned reply”."
     1890msgstr ""
     1891
     1892#: assets/admin/index.js:1
     1893msgid "Write a title and the message. Placeholders such as {customer_name} and {order_id} are filled in for the ticket you use it on."
     1894msgstr ""
     1895
     1896#: assets/admin/index.js:1
     1897msgid "In a ticket, choose it from “Insert canned reply”. It is added to your draft, so you can still edit it before sending."
     1898msgstr ""
     1899
     1900#: assets/admin/index.js:1
     1901msgid "Tick the box beside several tickets to change their status or delete them together; deleting also removes their messages and files and cannot be undone. To export, search or filter the list, then click “Export CSV”: the file contains exactly the tickets you are looking at."
     1902msgstr ""
     1903
     1904#: assets/admin/index.js:1
     1905msgid "Deskovi → Notifications has four switches: a new ticket (emailed to every agent), a customer reply (to the assigned agent, or all agents if nobody is assigned), an agent reply (to the customer) and an assignment (to the agent). Emails are sent by WordPress, so they need a working mail setup on your server; a mail plugin with SMTP makes delivery more reliable."
     1906msgstr ""
     1907
     1908#: assets/admin/index.js:1
     1909msgid "Setting up the chat widget"
     1910msgstr ""
     1911
     1912#: assets/admin/index.js:1
     1913msgid "Deskovi → Widget. Turn on “Enable support widget”, choose the corner (placement), a light or dark theme, and an optional text for the button; leave the text empty for an icon only. The widget does not load on the cart or checkout, and when it is off nothing at all is added to your store. It uses your store’s own font."
     1914msgstr ""
     1915
     1916#: assets/admin/index.js:1
     1917msgid "Privacy and your data"
     1918msgstr ""
     1919
     1920#: assets/admin/index.js:1
     1921msgid "Tickets, messages and attachments live in your own WordPress database; Deskovi sends nothing to an outside service. Under Data & Privacy you choose whether agents may see the billing address and phone number, whether to share diagnostics (only with your consent), the historical import window (off by default) and how long synced order context is kept. Deskovi adds a privacy-policy suggestion and works with Tools → Export / Erase Personal Data: an erase request deletes that customer’s tickets, messages and files."
     1922msgstr ""
     1923
     1924#: assets/admin/index.js:1
     1925msgid "Diagnostics and the activity log"
     1926msgstr ""
     1927
     1928#: assets/admin/index.js:1
     1929msgid "Diagnostics lists the versions of WordPress, WooCommerce and PHP and runs checks on your setup; copy its report when you ask for help. Activity is a short log of what Deskovi did (replies, assignments, refunds, errors). Use these two before contacting support."
     1930msgstr ""
     1931
     1932#: assets/admin/index.js:1
     1933msgid "Who can use Deskovi"
     1934msgstr ""
     1935
     1936#: assets/admin/index.js:1
     1937msgid "Administrators and shop managers get the “manage_itsdesk” permission when the plugin is activated, and they can use every Deskovi screen. Refunds also need the WooCommerce permission to edit orders. To give another role access, add the manage_itsdesk capability to it with a role editor plugin. Customers never see the admin screens."
     1938msgstr ""
     1939
     1940#: assets/admin/index.js:1
     1941msgid "For developers: add-ons"
     1942msgstr ""
     1943
     1944#: assets/admin/index.js:1
     1945msgid "Add-on plugins can hook into tickets, notifications, refunds and the widget, and can add screens, panels and bulk actions to this admin app. The contract is documented in contracts/extensions-v1.md in the plugin, and it is what Deskovi Pro is built on."
     1946msgstr ""
     1947
     1948#: assets/admin/index.js:1
     1949#: assets/admin/index.js:13
     1950msgid "Docs & Features"
     1951msgstr ""
     1952
     1953#: assets/admin/index.js:1
     1954msgid "What Deskovi can do and how to set it up. Everything is stored in your own WordPress database; there is no outside account."
     1955msgstr ""
     1956
     1957#: assets/admin/index.js:1
     1958msgid "Features"
     1959msgstr ""
     1960
     1961#: assets/admin/index.js:1
     1962msgid "Documentation"
     1963msgstr ""
     1964
     1965#: assets/admin/index.js:1
     1966msgid "Available with Deskovi Pro"
     1967msgstr ""
     1968
     1969#: assets/admin/index.js:1
     1970msgid "Deskovi Pro is a separate add-on. These features turn on when it is installed; they are not part of the free plugin."
     1971msgstr ""
     1972
     1973#: assets/admin/index.js:1
     1974msgid "See what Pro adds"
     1975msgstr ""
     1976
     1977#: assets/admin/index.js:1
     1978msgid "On this page"
     1979msgstr ""
     1980
     1981#: assets/admin/index.js:1
     1982msgid "The guides for Deskovi Pro (connecting Gmail or Microsoft 365, automation rules, response times, the AI assistant, reports and more) appear here once the add-on is installed. The features it adds are listed under Features."
     1983msgstr ""
     1984
     1985#: assets/admin/index.js:1
     1986msgid "Write answers to common questions once, so customers can find them before they open a ticket. Articles are written in the usual WordPress editor and grouped by topic."
     1987msgstr ""
     1988
     1989#: assets/admin/index.js:1
     1990msgid "Articles"
     1991msgstr ""
     1992
     1993#. translators: %d: number of published help articles
     1994#: assets/admin/index.js:2
     1995#, js-format
     1996msgid "%d published article"
     1997msgid_plural "%d published articles"
     1998msgstr[0] ""
     1999msgstr[1] ""
     2000
     2001#. translators: %d: number of draft help articles
     2002#: assets/admin/index.js:3
     2003#, js-format
     2004msgid "%d draft"
     2005msgid_plural "%d drafts"
     2006msgstr[0] ""
     2007msgstr[1] ""
     2008
     2009#. translators: %d: number of help topics
     2010#: assets/admin/index.js:4
     2011#, js-format
     2012msgid "%d topic"
     2013msgid_plural "%d topics"
     2014msgstr[0] ""
     2015msgstr[1] ""
     2016
     2017#: assets/admin/index.js:4
     2018msgid "Write an article"
     2019msgstr ""
     2020
     2021#: assets/admin/index.js:4
     2022msgid "All articles"
     2023msgstr ""
     2024
     2025#: assets/admin/index.js:4
     2026msgid "Topics"
     2027msgstr ""
     2028
     2029#: assets/admin/index.js:4
     2030msgid "Help center page"
     2031msgstr ""
     2032
     2033#: assets/admin/index.js:4
     2034msgid "The public page that lists your articles by topic, with a search box. Any page with the “Deskovi help center” block or the [deskovi_help] shortcode works; the “Deskovi help search” block sends its searches here."
     2035msgstr ""
     2036
     2037#: assets/admin/index.js:4
     2038msgid "(no title)"
     2039msgstr ""
     2040
     2041#: assets/admin/index.js:4
     2042msgid "Edit page"
     2043msgstr ""
     2044
     2045#: assets/admin/index.js:4
     2046msgid "Not published yet, so customers cannot see it."
     2047msgstr ""
     2048
     2049#: assets/admin/index.js:4
     2050msgid "This page does not show the help center yet: add the “Deskovi help center” block to it."
     2051msgstr ""
     2052
     2053#: assets/admin/index.js:4
     2054msgid "The help center page was created and published."
     2055msgstr ""
     2056
     2057#: assets/admin/index.js:4
     2058#: assets/admin/index.js:13
     2059msgid "Creating…"
     2060msgstr ""
     2061
     2062#: assets/admin/index.js:4
     2063msgid "Create the help center page"
     2064msgstr ""
     2065
     2066#: assets/admin/index.js:4
     2067msgid "Or choose a page"
     2068msgstr ""
     2069
     2070#: assets/admin/index.js:4
     2071msgid "— None —"
     2072msgstr ""
     2073
     2074#. translators: %d: page id
     2075#: assets/admin/index.js:4
     2076#, js-format
     2077msgid "Page #%d"
     2078msgstr ""
     2079
     2080#: assets/admin/index.js:4
     2081msgid "“Contact support” link"
     2082msgstr ""
     2083
     2084#: assets/admin/index.js:4
     2085msgid "Shown under the help center and every article. Leave empty to use the Support tab in My Account."
     2086msgstr ""
     2087
     2088#: assets/admin/index.js:4
     2089msgid "Shown under the help center and every article. Leave empty to hide it."
     2090msgstr ""
     2091
     2092#: assets/admin/index.js:4
     2093msgid "Help center settings saved."
     2094msgstr ""
     2095
     2096#: assets/admin/index.js:4
     2097#: assets/admin/index.js:5
     2098#: assets/admin/index.js:7
     2099#: assets/admin/index.js:13
     2100msgid "Saving…"
     2101msgstr ""
     2102
     2103#: assets/admin/index.js:4
     2104#: assets/admin/index.js:8
     2105msgid "Save"
     2106msgstr ""
     2107
     2108#: assets/admin/index.js:4
     2109#: assets/admin/index.js:13
     2110msgid "Canned Replies"
     2111msgstr ""
     2112
     2113#: assets/admin/index.js:4
     2114msgid "Reusable reply templates agents can insert into the ticket reply composer with one click."
     2115msgstr ""
     2116
     2117#: assets/admin/index.js:4
     2118msgid "Add canned reply"
     2119msgstr ""
     2120
     2121#: assets/admin/index.js:4
     2122msgid "Edit canned reply"
     2123msgstr ""
     2124
     2125#: assets/admin/index.js:4
     2126msgid "New canned reply"
     2127msgstr ""
     2128
     2129#: assets/admin/index.js:4
     2130msgid "Title"
     2131msgstr ""
     2132
     2133#: assets/admin/index.js:4
     2134msgid "Body"
     2135msgstr ""
     2136
     2137#: assets/admin/index.js:4
     2138msgid "Available placeholders: {customer_name}, {customer_email}, {order_id}, {agent_name}"
     2139msgstr ""
     2140
     2141#: assets/admin/index.js:4
     2142msgid "Canned reply updated."
     2143msgstr ""
     2144
     2145#: assets/admin/index.js:4
     2146msgid "Canned reply created."
     2147msgstr ""
     2148
     2149#: assets/admin/index.js:4
     2150#: assets/admin/index.js:8
     2151#: assets/admin/index.js:13
     2152msgid "Cancel"
     2153msgstr ""
     2154
     2155#: assets/admin/index.js:4
     2156msgid "No canned replies yet."
     2157msgstr ""
     2158
     2159#: assets/admin/index.js:4
     2160msgid "Preview"
     2161msgstr ""
     2162
     2163#: assets/admin/index.js:4
     2164msgid "Actions"
     2165msgstr ""
     2166
     2167#: assets/admin/index.js:4
     2168#: assets/admin/index.js:7
     2169msgid "Edit"
     2170msgstr ""
     2171
     2172#: assets/admin/index.js:4
     2173msgid "Delete this canned reply?"
     2174msgstr ""
     2175
     2176#: assets/admin/index.js:4
     2177msgid "Canned reply deleted."
     2178msgstr ""
     2179
     2180#: assets/admin/index.js:4
     2181msgid "Deleting…"
     2182msgstr ""
     2183
     2184#: assets/admin/index.js:4
     2185#: assets/admin/index.js:12
     2186msgid "Delete"
     2187msgstr ""
     2188
     2189#: assets/admin/index.js:4
     2190#: assets/admin/index.js:13
     2191msgid "Notifications"
     2192msgstr ""
     2193
     2194#: assets/admin/index.js:4
     2195msgid "Local email notifications only — sent via wp_mail(), nothing leaves your site."
     2196msgstr ""
     2197
     2198#: assets/admin/index.js:4
     2199msgid "Ticket event emails"
     2200msgstr ""
     2201
     2202#: assets/admin/index.js:4
     2203msgid "Email every support agent when a customer opens a new ticket."
     2204msgstr ""
     2205
     2206#: assets/admin/index.js:4
     2207msgid "Customer reply"
     2208msgstr ""
     2209
     2210#: assets/admin/index.js:4
     2211msgid "Email the assigned agent (or all agents, if unassigned) when a customer replies."
     2212msgstr ""
     2213
     2214#: assets/admin/index.js:4
     2215msgid "Agent reply"
     2216msgstr ""
     2217
     2218#: assets/admin/index.js:4
     2219msgid "Email the customer when an agent replies to their ticket."
     2220msgstr ""
     2221
     2222#: assets/admin/index.js:4
     2223msgid "Ticket assigned"
     2224msgstr ""
     2225
     2226#: assets/admin/index.js:4
     2227msgid "Email an agent when a ticket is assigned to them."
     2228msgstr ""
     2229
     2230#: assets/admin/index.js:4
     2231msgid "Also send agent alerts to"
     2232msgstr ""
     2233
     2234#: assets/admin/index.js:4
     2235msgid "Optional. A shared inbox that gets new ticket and reply emails along with the agents. Leave empty for none."
     2236msgstr ""
     2237
     2238#: assets/admin/index.js:4
     2239msgid "Notification settings saved."
     2240msgstr ""
     2241
     2242#: assets/admin/index.js:4
     2243msgid "Save notification settings"
     2244msgstr ""
     2245
     2246#: assets/admin/index.js:4
     2247msgid "Built in"
     2248msgstr ""
     2249
     2250#: assets/admin/index.js:4
     2251msgid "Your own"
     2252msgstr ""
     2253
     2254#: assets/admin/index.js:4
     2255msgid "None yet."
     2256msgstr ""
     2257
     2258#: assets/admin/index.js:4
     2259msgid "Category name"
     2260msgstr ""
     2261
     2262#: assets/admin/index.js:4
     2263#: assets/admin/index.js:7
     2264msgid "Remove"
     2265msgstr ""
     2266
     2267#: assets/admin/index.js:4
     2268msgid "New category name"
     2269msgstr ""
     2270
     2271#: assets/admin/index.js:4
     2272msgid "For example: Wholesale"
     2273msgstr ""
     2274
     2275#: assets/admin/index.js:4
     2276msgid "Add"
     2277msgstr ""
     2278
     2279#: assets/admin/index.js:5
     2280msgid "Ticket categories"
     2281msgstr ""
     2282
     2283#: assets/admin/index.js:5
     2284msgid "What customers pick from when they open a ticket. Turning one off keeps it on older tickets."
     2285msgstr ""
     2286
     2287#: assets/admin/index.js:5
     2288msgid "Categories saved."
     2289msgstr ""
     2290
     2291#: assets/admin/index.js:5
     2292msgid "Save categories"
     2293msgstr ""
     2294
     2295#: assets/admin/index.js:5
     2296msgid "Let customers reach you"
     2297msgstr ""
     2298
     2299#: assets/admin/index.js:5
     2300msgid "Who gets new ticket emails"
     2301msgstr ""
     2302
     2303#: assets/admin/index.js:5
     2304msgid "What customers can ask about"
     2305msgstr ""
     2306
     2307#. translators: 1: current step, 2: number of steps
    6672308#: assets/admin/index.js:6
    668 msgid "Message"
    669 msgstr ""
    670 
    671 #: includes/Widget/Frontend.php:106
    672 #: assets/admin/index.js:1
     2309#, js-format
     2310msgid "Setup · step %1$d of %2$d"
     2311msgstr ""
     2312
    6732313#: assets/admin/index.js:6
    674 msgid "Category"
    675 msgstr ""
    676 
    677 #: includes/Widget/Frontend.php:107
    678 msgid "Related order"
    679 msgstr ""
    680 
    681 #: includes/Widget/Frontend.php:108
    682 msgid "No order"
    683 msgstr ""
    684 
    685 #: includes/Widget/Frontend.php:109
    686 msgid "Send"
    687 msgstr ""
    688 
    689 #: includes/Widget/Frontend.php:110
     2314msgid "Skip setup"
     2315msgstr ""
     2316
    6902317#: assets/admin/index.js:6
    691 msgid "Reply"
    692 msgstr ""
    693 
    694 #: includes/Widget/Frontend.php:111
    695 msgid "Back"
    696 msgstr ""
    697 
    698 #: includes/Widget/Frontend.php:112
    699 #: assets/admin/index.js:1
    700 #: assets/admin/index.js:5
    701 msgid "Loading…"
    702 msgstr ""
    703 
    704 #: includes/Widget/Frontend.php:113
    705 msgid "No tickets yet."
    706 msgstr ""
    707 
    708 #: includes/Widget/Frontend.php:114
    709 msgid "Get support"
    710 msgstr ""
    711 
    712 #: includes/Widget/Frontend.php:115
    713 msgid "Log in, or continue with your order number and billing email."
    714 msgstr ""
    715 
    716 #: includes/Widget/Frontend.php:116
    717 msgid "Log in"
    718 msgstr ""
    719 
    720 #: includes/Widget/Frontend.php:117
    721 msgid "Continue with order"
    722 msgstr ""
    723 
    724 #: includes/Widget/Frontend.php:118
    725 msgid "Order number"
    726 msgstr ""
    727 
    728 #: includes/Widget/Frontend.php:119
    729 msgid "Billing email"
    730 msgstr ""
    731 
    732 #: includes/Widget/Frontend.php:120
    733 msgid "Verification code"
    734 msgstr ""
    735 
    736 #: includes/Widget/Frontend.php:121
    737 msgid "Send code"
    738 msgstr ""
    739 
    740 #: includes/Widget/Frontend.php:122
    741 msgid "Verify"
    742 msgstr ""
    743 
    744 #: includes/Widget/Frontend.php:123
    745 msgid "Check your email for a one-time code."
    746 msgstr ""
    747 
    748 #: includes/Widget/Frontend.php:124
    749 msgid "Something went wrong. Please try again."
    750 msgstr ""
    751 
    752 #: includes/Widget/Frontend.php:125
     2318msgid "Show the support button on your store"
     2319msgstr ""
     2320
    7532321#: assets/admin/index.js:6
    754 msgid "Create ticket"
    755 msgstr ""
    756 
    757 #: includes/Widget/Frontend.php:126
    758 #: assets/admin/index.js:1
    759 #: assets/admin/index.js:4
    760 msgid "Open"
    761 msgstr ""
    762 
    763 #: includes/Widget/Frontend.php:127
    764 msgid "Unread"
    765 msgstr ""
    766 
    767 #: includes/Widget/Frontend.php:128
    768 msgid "Your orders"
    769 msgstr ""
    770 
    771 #: includes/Widget/Frontend.php:129
    772 msgid "Order details"
    773 msgstr ""
    774 
    775 #: includes/Widget/Frontend.php:130
    776 msgid "Tracking"
    777 msgstr ""
    778 
    779 #: includes/Widget/Frontend.php:131
    780 msgid "No tracking number yet."
    781 msgstr ""
    782 
    783 #: includes/Widget/Frontend.php:132
    784 msgid "View order / invoice"
    785 msgstr ""
    786 
    787 #: includes/Widget/Frontend.php:133
    788 msgid "Request return"
    789 msgstr ""
    790 
    791 #: includes/Widget/Frontend.php:134
    792 msgid "Request cancel"
    793 msgstr ""
    794 
    795 #: includes/Widget/Frontend.php:135
    796 msgid "No recent orders."
    797 msgstr ""
    798 
    799 #: includes/Widget/Settings.php:67
    800 msgid "Invalid widget placement."
    801 msgstr ""
    802 
    803 #: includes/Widget/Settings.php:80
    804 msgid "Invalid widget theme."
    805 msgstr ""
    806 
    807 #: assets/admin/index.js:1
    808 msgid "Dismiss"
    809 msgstr ""
    810 
    811 #: assets/admin/index.js:1
    812 msgid "Failed to load activity."
    813 msgstr ""
    814 
    815 #: assets/admin/index.js:1
    816 msgid "No activity data."
    817 msgstr ""
    818 
    819 #: assets/admin/index.js:1
    820 #: assets/admin/index.js:6
    821 msgid "Activity"
    822 msgstr ""
    823 
    824 #: assets/admin/index.js:1
    825 msgid "A running log of ticket and account events on this site."
    826 msgstr ""
    827 
    828 #: assets/admin/index.js:1
    829 msgid "When"
    830 msgstr ""
    831 
    832 #: assets/admin/index.js:1
    833 msgid "Type"
    834 msgstr ""
    835 
    836 #: assets/admin/index.js:1
    837 msgid "Event"
    838 msgstr ""
    839 
    840 #: assets/admin/index.js:1
    841 msgid "Result"
    842 msgstr ""
    843 
    844 #: assets/admin/index.js:1
    845 msgid "Failed to load diagnostics."
    846 msgstr ""
    847 
    848 #: assets/admin/index.js:1
    849 msgid "Pass"
    850 msgstr ""
    851 
    852 #: assets/admin/index.js:1
    853 msgid "OK"
    854 msgstr ""
    855 
    856 #: assets/admin/index.js:1
    857 msgid "Fail"
    858 msgstr ""
    859 
    860 #: assets/admin/index.js:1
    861 msgid "Info"
    862 msgstr ""
    863 
    864 #: assets/admin/index.js:1
    865 #: assets/admin/index.js:6
    866 msgid "Diagnostics"
    867 msgstr ""
    868 
    869 #: assets/admin/index.js:1
    870 msgid "Support-safe environment snapshot. Share intentionally — never automatic full log upload."
    871 msgstr ""
    872 
    873 #: assets/admin/index.js:1
    874 msgid "Report copied to clipboard."
    875 msgstr ""
    876 
    877 #: assets/admin/index.js:1
    878 msgid "Could not copy report."
    879 msgstr ""
    880 
    881 #: assets/admin/index.js:1
    882 msgid "Copy report"
    883 msgstr ""
    884 
    885 #: assets/admin/index.js:1
    886 msgid "Diagnostics refreshed."
    887 msgstr ""
    888 
    889 #: assets/admin/index.js:1
    890 msgid "Run health check"
    891 msgstr ""
    892 
    893 #: assets/admin/index.js:1
    894 msgid "Check"
    895 msgstr ""
    896 
    897 #: assets/admin/index.js:1
    898 msgid "Value"
    899 msgstr ""
    900 
    901 #: assets/admin/index.js:1
    902 msgid "Active theme"
    903 msgstr ""
    904 
    905 #: assets/admin/index.js:1
    906 msgid "Sanitized recent errors"
    907 msgstr ""
    908 
    909 #: assets/admin/index.js:1
    910 msgid "No diagnostic errors recorded."
    911 msgstr ""
    912 
    913 #: assets/admin/index.js:1
    914 msgid "Time"
    915 msgstr ""
    916 
    917 #: assets/admin/index.js:1
    918 msgid "Code"
    919 msgstr ""
    920 
    921 #: assets/admin/index.js:1
    922 msgid "Email channel"
    923 msgstr ""
    924 
    925 #: assets/admin/index.js:1
    926 msgid "Customers write to your support address and the mail becomes a ticket. Your replies go back as email and thread with the customer’s own mail."
    927 msgstr ""
    928 
    929 #: assets/admin/index.js:1
    930 msgid "Gmail / Google Workspace, Microsoft 365 / Outlook or any IMAP mailbox, with your own app, no relay server"
    931 msgstr ""
    932 
    933 #: assets/admin/index.js:1
    934 msgid "Replies are matched to the right ticket, quoted history and signatures are removed, attachments are saved"
    935 msgstr ""
    936 
    937 #: assets/admin/index.js:1
    938 msgid "Agents can answer a notification by replying to the email"
    939 msgstr ""
    940 
    941 #: assets/admin/index.js:1
    942 msgid "Automation"
    943 msgstr ""
    944 
    945 #: assets/admin/index.js:1
    946 msgid "Rules that assign, prioritise and annotate tickets for you when something happens."
    947 msgstr ""
    948 
    949 #: assets/admin/index.js:1
    950 msgid "Assign to one agent, in turn, or to whoever has the fewest open tickets"
    951 msgstr ""
    952 
    953 #: assets/admin/index.js:1
    954 msgid "Practice mode shows what a rule would do before it changes anything"
    955 msgstr ""
    956 
    957 #: assets/admin/index.js:1
    958 msgid "Rules never email customers, refund or delete anything"
    959 msgstr ""
    960 
    961 #: assets/admin/index.js:1
    962 msgid "Tags"
    963 msgstr ""
    964 
    965 #: assets/admin/index.js:1
    966 msgid "Put your own labels on tickets and find them again."
    967 msgstr ""
    968 
    969 #: assets/admin/index.js:1
    970 msgid "Labels such as “vip” or “damaged-item”, shown in the ticket list"
    971 msgstr ""
    972 
    973 #: assets/admin/index.js:1
    974 msgid "Filter the list by tag, save it as a view, and let automation rules add tags"
    975 msgstr ""
    976 
    977 #: assets/admin/index.js:1
    978 msgid "Custom fields"
    979 msgstr ""
    980 
    981 #: assets/admin/index.js:1
    982 msgid "Add your own details to tickets, such as the return reason or the carrier."
    983 msgstr ""
    984 
    985 #: assets/admin/index.js:1
    986 msgid "Text, number, dropdown, checkbox and date fields that only your team sees"
    987 msgstr ""
    988 
    989 #: assets/admin/index.js:1
    990 msgid "They move with a merge and are deleted with the ticket"
    991 msgstr ""
    992 
    993 #: assets/admin/index.js:1
    994 msgid "Roles & permissions"
    995 msgstr ""
    996 
    997 #: assets/admin/index.js:1
    998 msgid "Decide which role may refund, see reports, set up rules or manage mailboxes."
    999 msgstr ""
    1000 
    1001 #: assets/admin/index.js:1
    1002 msgid "A Support Manager role next to the Support Agent role"
    1003 msgstr ""
    1004 
    1005 #: assets/admin/index.js:1
    1006 msgid "One table that shows what every role may do"
    1007 msgstr ""
    1008 
    1009 #: assets/admin/index.js:1
    1010 msgid "Response times (SLA)"
    1011 msgstr ""
    1012 
    1013 #: assets/admin/index.js:1
    1014 msgid "First-reply and resolution targets per priority, counted in your working hours."
    1015 msgstr ""
    1016 
    1017 #: assets/admin/index.js:1
    1018 msgid "Timers on every ticket and a “Needs attention” queue"
    1019 msgstr ""
    1020 
    1021 #: assets/admin/index.js:1
    1022 msgid "The clock can pause while you wait for the customer"
    1023 msgstr ""
    1024 
    1025 #: assets/admin/index.js:1
    1026 msgid "One-time warning and breach emails to your team"
    1027 msgstr ""
    1028 
    1029 #: assets/admin/index.js:1
    1030 msgid "Team tools"
    1031 msgstr ""
    1032 
    1033 #: assets/admin/index.js:1
    1034 msgid "Work on tickets together without stepping on each other."
    1035 msgstr ""
    1036 
    1037 #: assets/admin/index.js:1
    1038 msgid "A notice when a colleague has the same ticket open or is writing a reply"
    1039 msgstr ""
    1040 
    1041 #: assets/admin/index.js:1
    1042 msgid "@mentions in internal notes, reply drafts, and handover with a note"
    1043 msgstr ""
    1044 
    1045 #: assets/admin/index.js:1
    1046 msgid "Star and watch tickets, log the time you spend, and work from the keyboard"
    1047 msgstr ""
    1048 
    1049 #: assets/admin/index.js:1
    1050 msgid "Order tools"
    1051 msgstr ""
    1052 
    1053 #: assets/admin/index.js:1
    1054 msgid "Do more with the order without leaving the ticket."
    1055 msgstr ""
    1056 
    1057 #: assets/admin/index.js:1
    1058 msgid "Refund chosen items or an amount, change the status, cancel, add a note or fix the shipping address"
    1059 msgstr ""
    1060 
    1061 #: assets/admin/index.js:1
    1062 msgid "A customer card with lifetime value, orders and earlier tickets"
    1063 msgstr ""
    1064 
    1065 #: assets/admin/index.js:1
    1066 msgid "Send a replacement order or a one-time coupon"
    1067 msgstr ""
    1068 
    1069 #: assets/admin/index.js:1
    1070 msgid "Import tickets"
    1071 msgstr ""
    1072 
    1073 #: assets/admin/index.js:1
    1074 msgid "Move your history from another helpdesk without emailing a single customer."
    1075 msgstr ""
    1076 
    1077 #: assets/admin/index.js:1
    1078 msgid "Bring in a CSV export from Help Scout, Zendesk, Freshdesk and others"
    1079 msgstr ""
    1080 
    1081 #: assets/admin/index.js:1
    1082 msgid "Check first, keep the original dates and tags, and never import the same ticket twice"
    1083 msgstr ""
    1084 
    1085 #: assets/admin/index.js:1
    1086 msgid "Connections and API"
    1087 msgstr ""
    1088 
    1089 #: assets/admin/index.js:1
    1090 msgid "Tell the other tools you use what happens in your helpdesk."
    1091 msgstr ""
    1092 
    1093 #: assets/admin/index.js:1
    1094 msgid "Signed webhooks for Zapier, Make or your CRM, and messages to Slack, Discord, Teams or Telegram"
    1095 msgstr ""
    1096 
    1097 #: assets/admin/index.js:1
    1098 msgid "A REST API with read and write keys, a customer lookup for your CRM, and a hook for your own code"
    1099 msgstr ""
    1100 
    1101 #: assets/admin/index.js:1
    1102 msgid "Self-service"
    1103 msgstr ""
    1104 
    1105 #: assets/admin/index.js:1
    1106 msgid "Before a customer sends a ticket, the chat widget shows where their order is and pages of your store that may already answer the question."
    1107 msgstr ""
    1108 
    1109 #: assets/admin/index.js:1
    1110 msgid "Order status and tracking for the customer’s own order"
    1111 msgstr ""
    1112 
    1113 #: assets/admin/index.js:1
    1114 msgid "Suggested public pages, then “Did this answer your question?”"
    1115 msgstr ""
    1116 
    1117 #: assets/admin/index.js:1
    1118 msgid "AI assistant"
    1119 msgstr ""
    1120 
    1121 #: assets/admin/index.js:1
    1122 msgid "Order-aware reply drafts, summaries, translation and suggestions inside the ticket, with your own OpenAI or Anthropic key."
    1123 msgstr ""
    1124 
    1125 #: assets/admin/index.js:1
    1126 msgid "Customer details are masked before anything leaves your site"
    1127 msgstr ""
    1128 
    1129 #: assets/admin/index.js:1
    1130 msgid "Drafts only: nothing is sent or changed unless an agent does it"
    1131 msgstr ""
    1132 
    1133 #: assets/admin/index.js:1
    1134 msgid "Reports and satisfaction"
    1135 msgstr ""
    1136 
    1137 #: assets/admin/index.js:1
    1138 msgid "How fast you answer, what is waiting, who is busy and how customers feel, plus store views such as tickets per product."
    1139 msgstr ""
    1140 
    1141 #: assets/admin/index.js:1
    1142 msgid "Optional one-click satisfaction survey when a ticket is resolved"
    1143 msgstr ""
    1144 
    1145 #: assets/admin/index.js:1
    1146 msgid "Weekly or monthly summary email and optional deletion of old tickets"
    1147 msgstr ""
    1148 
    1149 #: assets/admin/index.js:1
    1150 msgid "Deskovi Pro"
    1151 msgstr ""
    1152 
    1153 #: assets/admin/index.js:1
    1154 msgid "A separate add-on for stores with more tickets to handle. It works on top of this plugin and keeps everything on your own site."
    1155 msgstr ""
    1156 
    1157 #: assets/admin/index.js:1
    1158 msgid "Learn more"
    1159 msgstr ""
    1160 
    1161 #: assets/admin/index.js:1
    1162 msgid "Pro"
    1163 msgstr ""
    1164 
    1165 #: assets/admin/index.js:1
    1166 msgid "Everything in Deskovi (free) keeps working as it is. Installing Deskovi Pro turns these features on and replaces this page with their settings."
    1167 msgstr ""
    1168 
    1169 #: assets/admin/index.js:1
    1170 msgid "Support tickets"
    1171 msgstr ""
    1172 
    1173 #: assets/admin/index.js:1
    1174 msgid "Customers open tickets, logged in or as a verified guest. Every ticket has a conversation, a status (Open, Pending, Resolved, Closed) and optional attachments."
    1175 msgstr ""
    1176 
    1177 #: assets/admin/index.js:1
    1178 msgid "Order-aware support"
    1179 msgstr ""
    1180 
    1181 #: assets/admin/index.js:1
    1182 msgid "Link a ticket to a WooCommerce order and see its items, total, shipping, status and timeline beside the conversation."
    1183 msgstr ""
    1184 
    1185 #: assets/admin/index.js:1
    1186 msgid "Refunds from a ticket"
    1187 msgstr ""
    1188 
    1189 #: assets/admin/index.js:1
    1190 msgid "Issue a full or partial refund, or resend the order invoice email, without opening the order."
    1191 msgstr ""
    1192 
    1193 #: assets/admin/index.js:1
    1194 msgid "Filters and saved views"
    1195 msgstr ""
    1196 
    1197 #: assets/admin/index.js:1
    1198 msgid "Narrow the ticket list by status, priority, category, assignee or search, and save a combination as a view you can open with one click."
    1199 msgstr ""
    1200 
    1201 #: assets/admin/index.js:1
    1202 msgid "Merge duplicate tickets"
    1203 msgstr ""
    1204 
    1205 #: assets/admin/index.js:1
    1206 msgid "When a customer writes twice about the same thing, merge one ticket into the other: every message and file moves, and the conversation stays in one place."
    1207 msgstr ""
    1208 
    1209 #: assets/admin/index.js:1
    1210 msgid "Priority and assignment"
    1211 msgstr ""
    1212 
    1213 #: assets/admin/index.js:1
    1214 msgid "Mark tickets Low, Normal, High or Urgent, hand them to an agent, and filter by Unassigned or Assigned to me."
    1215 msgstr ""
    1216 
    1217 #: assets/admin/index.js:1
    1218 msgid "Internal notes"
    1219 msgstr ""
    1220 
    1221 #: assets/admin/index.js:1
    1222 msgid "Leave a note only your team can see. It is never shown to the customer and its attachments stay private too."
    1223 msgstr ""
    1224 
    1225 #: assets/admin/index.js:1
    1226 msgid "Canned replies"
    1227 msgstr ""
    1228 
    1229 #: assets/admin/index.js:1
    1230 msgid "Save reusable answers with placeholders such as {customer_name} and {order_id}, and insert one with a click."
    1231 msgstr ""
    1232 
    1233 #: assets/admin/index.js:1
    1234 msgid "Attachments"
    1235 msgstr ""
    1236 
    1237 #: assets/admin/index.js:1
    1238 msgid "Customers and agents can attach JPG, PNG, GIF, WebP, PDF and TXT files, up to 5 MB each. Files are served only to people who may see the ticket."
    1239 msgstr ""
    1240 
    1241 #: assets/admin/index.js:1
    1242 msgid "Bulk actions and CSV export"
    1243 msgstr ""
    1244 
    1245 #: assets/admin/index.js:1
    1246 msgid "Change the status of, or delete, many tickets at once. Export the list you are looking at to a spreadsheet."
    1247 msgstr ""
    1248 
    1249 #: assets/admin/index.js:1
    1250 msgid "Email notifications"
    1251 msgstr ""
    1252 
    1253 #: assets/admin/index.js:1
    1254 msgid "Switch on or off the emails for a new ticket, a customer reply, an agent reply and an assignment. They are sent by WordPress itself."
    1255 msgstr ""
    1256 
    1257 #: assets/admin/index.js:1
    1258 msgid "Storefront chat widget"
    1259 msgstr ""
    1260 
    1261 #: assets/admin/index.js:1
    1262 msgid "A small launcher on your store. It loads only after it is clicked and never on the cart or checkout. Visitors who are not logged in confirm with a code sent to their email."
    1263 msgstr ""
    1264 
    1265 #: assets/admin/index.js:1
    1266 #: assets/admin/index.js:6
    1267 msgid "Overview"
    1268 msgstr ""
    1269 
    1270 #: assets/admin/index.js:1
    1271 msgid "One screen with what is open, pending and unassigned, how long the oldest ticket has been waiting, new tickets per day and the latest tickets."
    1272 msgstr ""
    1273 
    1274 #: assets/admin/index.js:1
    1275 msgid "Privacy by design"
    1276 msgstr ""
    1277 
    1278 #: assets/admin/index.js:1
    1279 msgid "Everything stays in your WordPress database. Choose what order details agents see, and use WordPress’s own export and erase tools for personal data."
    1280 msgstr ""
    1281 
    1282 #: assets/admin/index.js:1
    1283 msgid "Diagnostics and activity log"
    1284 msgstr ""
    1285 
    1286 #: assets/admin/index.js:1
    1287 msgid "Health checks for your setup and a log of what Deskovi has done, so a problem is easy to explain and fix."
    1288 msgstr ""
    1289 
    1290 #: assets/admin/index.js:1
    1291 msgid "Built for add-ons"
    1292 msgstr ""
    1293 
    1294 #: assets/admin/index.js:1
    1295 msgid "Other plugins can add screens, buttons and panels through a documented extension API, without changing Deskovi."
    1296 msgstr ""
    1297 
    1298 #: assets/admin/index.js:1
    1299 msgid "Finding your way around"
    1300 msgstr ""
    1301 
    1302 #: assets/admin/index.js:1
    1303 msgid "Open “Deskovi” in the WordPress admin menu. The menu on the left of the Deskovi screen is grouped: Work (Tickets, Canned Replies), Insights (Activity, and Reports with Pro), Automate (Pro), Channels (Widget, and Mailboxes with Pro) and Settings (Notifications, Data & Privacy, Diagnostics, Docs & Features). Overview is the first item."
    1304 msgstr ""
    1305 
    1306 #: assets/admin/index.js:1
    1307 msgid "Reading the Overview"
    1308 msgstr ""
    1309 
    1310 #: assets/admin/index.js:1
    1311 msgid "The four numbers at the top are the tickets that need you. Open and Pending count the tickets in those statuses. Unassigned counts the open and pending ones that have no agent, and turns amber when there are any. “Oldest waiting” is how long the longest-waiting ticket has been open. The bars show how many tickets arrived on each of the last 7 days (UTC)."
    1312 msgstr ""
    1313 
    1314 #: assets/admin/index.js:1
    1315 msgid "How customers open a ticket"
    1316 msgstr ""
    1317 
    1318 #: assets/admin/index.js:1
    1319 msgid "Customers use the chat widget on your store. If they are logged in they fill in a short form (subject, category, message, an optional order). If they are not, they enter their email and the order number and confirm with a one-time code sent to that email, so no account is needed."
    1320 msgstr ""
    1321 
    1322 #: assets/admin/index.js:1
    1323 msgid "Replying to a ticket"
    1324 msgstr ""
    1325 
    1326 #: assets/admin/index.js:1
    1327 msgid "Open Deskovi → Tickets and click a ticket. The conversation is on the right."
    1328 msgstr ""
    1329 
    1330 #: assets/admin/index.js:1
    1331 msgid "Write your answer in the reply box. Insert a canned reply from the menu above it if you have one."
    1332 msgstr ""
    1333 
    1334 #: assets/admin/index.js:1
    1335 msgid "Tick “Internal note (not visible to customer)” for a message only your team should see."
    1336 msgstr ""
    1337 
    1338 #: assets/admin/index.js:1
    1339 msgid "Click “Send reply”. The customer is emailed if the “Agent reply” notification is on. When an agent replies to an open ticket it moves to Pending; when a customer replies to a resolved ticket it opens again."
    1340 msgstr ""
    1341 
    1342 #: assets/admin/index.js:1
    1343 msgid "Above the ticket list, choose a status (including “Open or pending”, which is what still needs work), a priority and a category, use the Unassigned and Assigned to me buttons, or search by subject, name or email. They combine, and the list, the count and Export CSV all follow them."
    1344 msgstr ""
    1345 
    1346 #: assets/admin/index.js:1
    1347 msgid "Set the filters you use often, for example status “Open or pending” and priority “Urgent”."
    1348 msgstr ""
    1349 
    1350 #: assets/admin/index.js:1
    1351 msgid "Click “Save this view”, give it a name and press Enter. It appears as a button above the list."
    1352 msgstr ""
    1353 
    1354 #: assets/admin/index.js:1
    1355 msgid "Click a view to apply it again. The × on a view deletes it. Views belong to you: other agents never see or change them, and each agent can keep up to 20."
    1356 msgstr ""
    1357 
    1358 #: assets/admin/index.js:1
    1359 msgid "Add-ons can add their own filters beside the built-in ones (Deskovi Pro adds a tag filter)."
    1360 msgstr ""
    1361 
    1362 #: assets/admin/index.js:1
    1363 msgid "Merging duplicate tickets"
    1364 msgstr ""
    1365 
    1366 #: assets/admin/index.js:1
    1367 msgid "Open the ticket that should go away, click “Merge into another ticket…” under the status buttons, find the ticket it belongs to (the customer’s other tickets are listed first, or search by subject, name or email) and click “Merge into this”. Deskovi asks you to confirm because it cannot be undone."
    1368 msgstr ""
    1369 
    1370 #: assets/admin/index.js:1
    1371 msgid "All messages (including internal notes) and attachments move to the ticket you chose, in the order they were written. The merged ticket is deleted."
    1372 msgstr ""
    1373 
    1374 #: assets/admin/index.js:1
    1375 msgid "The ticket that stays keeps its customer and subject. It takes the higher priority, gets the merged ticket’s agent if it had none, and is opened again if it was resolved or closed while the merged ticket was still active."
    1376 msgstr ""
    1377 
    1378 #: assets/admin/index.js:1
    1379 msgid "An internal note on it records which ticket was merged, when and by whom. Nobody is emailed."
    1380 msgstr ""
    1381 
    1382 #: assets/admin/index.js:1
    1383 msgid "Merging tickets of two different customers is allowed, so check the email address before you confirm."
    1384 msgstr ""
    1385 
    1386 #: assets/admin/index.js:1
    1387 msgid "Status and priority"
    1388 msgstr ""
    1389 
    1390 #: assets/admin/index.js:1
    1391 msgid "Use the four buttons under the ticket to set Open, Pending, Resolved or Closed. Pending means you are waiting for the customer. Use the Priority menu (Low, Normal, High, Urgent) to show what needs attention first. Both are saved at once."
    1392 msgstr ""
    1393 
    1394 #: assets/admin/index.js:1
    1395 msgid "Assigning tickets"
    1396 msgstr ""
    1397 
    1398 #: assets/admin/index.js:1
    1399 msgid "Pick an agent in “Assigned to”, or leave it on Unassigned for anyone to take. Above the ticket list, “Unassigned” and “Assigned to me” filter the list. The assigned agent is the one emailed about customer replies. Agents are people who may manage Deskovi (administrators and shop managers by default)."
    1400 msgstr ""
    1401 
    1402 #: assets/admin/index.js:1
    1403 msgid "Linking a ticket to an order"
    1404 msgstr ""
    1405 
    1406 #: assets/admin/index.js:1
    1407 msgid "If the customer chose an order it is linked already. Otherwise type a WooCommerce order number into “Order ID” and click “Link order”. The ticket then shows the order’s items, total, payment and shipping method and timeline. Billing address and phone only appear if you allowed them under Data & Privacy."
    1408 msgstr ""
    1409 
    1410 #: assets/admin/index.js:1
    1411 msgid "Issuing a refund or resending an invoice"
    1412 msgstr ""
    1413 
    1414 #: assets/admin/index.js:1
    1415 msgid "You need the permission to edit WooCommerce orders. In the linked order card:"
    1416 msgstr ""
    1417 
    1418 #: assets/admin/index.js:1
    1419 msgid "Leave the amount empty to refund what is left of the order, or type a smaller amount for a partial refund."
    1420 msgstr ""
    1421 
    1422 #: assets/admin/index.js:1
    1423 msgid "Add a short reason if you like; it is saved with the refund."
    1424 msgstr ""
    1425 
    1426 #: assets/admin/index.js:1
    1427 msgid "Click “Issue refund”. If the payment gateway can refund, the money is returned there; if not, the refund is recorded in WooCommerce and you return the money yourself. A note in the ticket says which happened."
    1428 msgstr ""
    1429 
    1430 #: assets/admin/index.js:1
    1431 msgid "To send the customer their order email again instead, click “Resend invoice”. No money moves."
    1432 msgstr ""
    1433 
    1434 #: assets/admin/index.js:1
    1435 msgid "Click “Attach” under the reply box. Allowed files: JPG, PNG, GIF, WebP, PDF and TXT, up to 5 MB each. Files are checked on upload and are downloadable only by the customer who owns the ticket and by agents. Attachments on internal notes are never visible to the customer."
    1436 msgstr ""
    1437 
    1438 #: assets/admin/index.js:1
    1439 msgid "Answers you give again and again."
    1440 msgstr ""
    1441 
    1442 #: assets/admin/index.js:1
    1443 msgid "Go to Deskovi → Canned Replies and click “Add canned reply”."
    1444 msgstr ""
    1445 
    1446 #: assets/admin/index.js:1
    1447 msgid "Write a title and the message. Placeholders such as {customer_name} and {order_id} are filled in for the ticket you use it on."
    1448 msgstr ""
    1449 
    1450 #: assets/admin/index.js:1
    1451 msgid "In a ticket, choose it from “Insert canned reply”. It is added to your draft, so you can still edit it before sending."
    1452 msgstr ""
    1453 
    1454 #: assets/admin/index.js:1
    1455 msgid "Tick the box beside several tickets to change their status or delete them together; deleting also removes their messages and files and cannot be undone. To export, search or filter the list, then click “Export CSV”: the file contains exactly the tickets you are looking at."
    1456 msgstr ""
    1457 
    1458 #: assets/admin/index.js:1
    1459 msgid "Deskovi → Notifications has four switches: a new ticket (emailed to every agent), a customer reply (to the assigned agent, or all agents if nobody is assigned), an agent reply (to the customer) and an assignment (to the agent). Emails are sent by WordPress, so they need a working mail setup on your server; a mail plugin with SMTP makes delivery more reliable."
    1460 msgstr ""
    1461 
    1462 #: assets/admin/index.js:1
    1463 msgid "Setting up the chat widget"
    1464 msgstr ""
    1465 
    1466 #: assets/admin/index.js:1
    1467 msgid "Deskovi → Widget. Turn on “Enable support widget”, choose the corner (placement), a light or dark theme, and an optional text for the button; leave the text empty for an icon only. The widget does not load on the cart or checkout, and when it is off nothing at all is added to your store. It uses your store’s own font."
    1468 msgstr ""
    1469 
    1470 #: assets/admin/index.js:1
    1471 msgid "Privacy and your data"
    1472 msgstr ""
    1473 
    1474 #: assets/admin/index.js:1
    1475 msgid "Tickets, messages and attachments live in your own WordPress database; Deskovi sends nothing to an outside service. Under Data & Privacy you choose whether agents may see the billing address and phone number, whether to share diagnostics (only with your consent), the historical import window (off by default) and how long synced order context is kept. Deskovi adds a privacy-policy suggestion and works with Tools → Export / Erase Personal Data: an erase request deletes that customer’s tickets, messages and files."
    1476 msgstr ""
    1477 
    1478 #: assets/admin/index.js:1
    1479 msgid "Diagnostics and the activity log"
    1480 msgstr ""
    1481 
    1482 #: assets/admin/index.js:1
    1483 msgid "Diagnostics lists the versions of WordPress, WooCommerce and PHP and runs checks on your setup; copy its report when you ask for help. Activity is a short log of what Deskovi did (replies, assignments, refunds, errors). Use these two before contacting support."
    1484 msgstr ""
    1485 
    1486 #: assets/admin/index.js:1
    1487 msgid "Who can use Deskovi"
    1488 msgstr ""
    1489 
    1490 #: assets/admin/index.js:1
    1491 msgid "Administrators and shop managers get the “manage_itsdesk” permission when the plugin is activated, and they can use every Deskovi screen. Refunds also need the WooCommerce permission to edit orders. To give another role access, add the manage_itsdesk capability to it with a role editor plugin. Customers never see the admin screens."
    1492 msgstr ""
    1493 
    1494 #: assets/admin/index.js:1
    1495 msgid "For developers: add-ons"
    1496 msgstr ""
    1497 
    1498 #: assets/admin/index.js:1
    1499 msgid "Add-on plugins can hook into tickets, notifications, refunds and the widget, and can add screens, panels and bulk actions to this admin app. The contract is documented in contracts/extensions-v1.md in the plugin, and it is what Deskovi Pro is built on."
    1500 msgstr ""
    1501 
    1502 #: assets/admin/index.js:1
    1503 #: assets/admin/index.js:6
    1504 msgid "Docs & Features"
    1505 msgstr ""
    1506 
    1507 #: assets/admin/index.js:1
    1508 msgid "What Deskovi can do and how to set it up. Everything is stored in your own WordPress database; there is no outside account."
    1509 msgstr ""
    1510 
    1511 #: assets/admin/index.js:1
    1512 msgid "Features"
    1513 msgstr ""
    1514 
    1515 #: assets/admin/index.js:1
    1516 msgid "Documentation"
    1517 msgstr ""
    1518 
    1519 #: assets/admin/index.js:1
    1520 msgid "Available with Deskovi Pro"
    1521 msgstr ""
    1522 
    1523 #: assets/admin/index.js:1
    1524 msgid "Deskovi Pro is a separate add-on. These features turn on when it is installed; they are not part of the free plugin."
    1525 msgstr ""
    1526 
    1527 #: assets/admin/index.js:1
    1528 msgid "See what Pro adds"
    1529 msgstr ""
    1530 
    1531 #: assets/admin/index.js:1
    1532 msgid "On this page"
    1533 msgstr ""
    1534 
    1535 #: assets/admin/index.js:1
    1536 msgid "The guides for Deskovi Pro (connecting Gmail or Microsoft 365, automation rules, response times, the AI assistant, reports and more) appear here once the add-on is installed. The features it adds are listed under Features."
    1537 msgstr ""
    1538 
    1539 #: assets/admin/index.js:1
    1540 #: assets/admin/index.js:6
    1541 msgid "Canned Replies"
    1542 msgstr ""
    1543 
    1544 #: assets/admin/index.js:1
    1545 msgid "Reusable reply templates agents can insert into the ticket reply composer with one click."
    1546 msgstr ""
    1547 
    1548 #: assets/admin/index.js:1
    1549 msgid "Add canned reply"
    1550 msgstr ""
    1551 
    1552 #: assets/admin/index.js:1
    1553 msgid "Edit canned reply"
    1554 msgstr ""
    1555 
    1556 #: assets/admin/index.js:1
    1557 msgid "New canned reply"
    1558 msgstr ""
    1559 
    1560 #: assets/admin/index.js:1
    1561 msgid "Title"
    1562 msgstr ""
    1563 
    1564 #: assets/admin/index.js:1
    1565 msgid "Body"
    1566 msgstr ""
    1567 
    1568 #: assets/admin/index.js:1
    1569 msgid "Available placeholders: {customer_name}, {customer_email}, {order_id}, {agent_name}"
    1570 msgstr ""
    1571 
    1572 #: assets/admin/index.js:1
    1573 msgid "Canned reply updated."
    1574 msgstr ""
    1575 
    1576 #: assets/admin/index.js:1
    1577 msgid "Canned reply created."
    1578 msgstr ""
    1579 
    1580 #: assets/admin/index.js:1
    1581 #: assets/admin/index.js:6
    1582 msgid "Saving…"
    1583 msgstr ""
    1584 
    1585 #: assets/admin/index.js:1
    1586 msgid "Save"
    1587 msgstr ""
    1588 
    1589 #: assets/admin/index.js:1
    1590 #: assets/admin/index.js:6
    1591 msgid "Cancel"
    1592 msgstr ""
    1593 
    1594 #: assets/admin/index.js:1
    1595 msgid "No canned replies yet."
    1596 msgstr ""
    1597 
    1598 #: assets/admin/index.js:1
    1599 msgid "Preview"
    1600 msgstr ""
    1601 
    1602 #: assets/admin/index.js:1
    1603 msgid "Actions"
    1604 msgstr ""
    1605 
    1606 #: assets/admin/index.js:1
    1607 msgid "Edit"
    1608 msgstr ""
    1609 
    1610 #: assets/admin/index.js:1
    1611 msgid "Delete this canned reply?"
    1612 msgstr ""
    1613 
    1614 #: assets/admin/index.js:1
    1615 msgid "Canned reply deleted."
    1616 msgstr ""
    1617 
    1618 #: assets/admin/index.js:1
    1619 msgid "Deleting…"
    1620 msgstr ""
    1621 
    1622 #: assets/admin/index.js:1
    1623 #: assets/admin/index.js:5
    1624 msgid "Delete"
    1625 msgstr ""
    1626 
    1627 #: assets/admin/index.js:1
    1628 #: assets/admin/index.js:6
    1629 msgid "Notifications"
    1630 msgstr ""
    1631 
    1632 #: assets/admin/index.js:1
    1633 msgid "Local email notifications only — sent via wp_mail(), nothing leaves your site."
    1634 msgstr ""
    1635 
    1636 #: assets/admin/index.js:1
    1637 msgid "Ticket event emails"
    1638 msgstr ""
    1639 
    1640 #: assets/admin/index.js:1
    1641 msgid "Email every support agent when a customer opens a new ticket."
    1642 msgstr ""
    1643 
    1644 #: assets/admin/index.js:1
    1645 msgid "Customer reply"
    1646 msgstr ""
    1647 
    1648 #: assets/admin/index.js:1
    1649 msgid "Email the assigned agent (or all agents, if unassigned) when a customer replies."
    1650 msgstr ""
    1651 
    1652 #: assets/admin/index.js:1
    1653 msgid "Agent reply"
    1654 msgstr ""
    1655 
    1656 #: assets/admin/index.js:1
    1657 msgid "Email the customer when an agent replies to their ticket."
    1658 msgstr ""
    1659 
    1660 #: assets/admin/index.js:1
    1661 msgid "Ticket assigned"
    1662 msgstr ""
    1663 
    1664 #: assets/admin/index.js:1
    1665 msgid "Email an agent when a ticket is assigned to them."
    1666 msgstr ""
    1667 
    1668 #: assets/admin/index.js:1
    1669 msgid "Notification settings saved."
    1670 msgstr ""
    1671 
    1672 #: assets/admin/index.js:1
    1673 msgid "Save notification settings"
    1674 msgstr ""
    1675 
    1676 #: assets/admin/index.js:1
     2322msgid "A small button in the corner of every page except cart and checkout. Customers can also always reach you from My Account → Support."
     2323msgstr ""
     2324
     2325#. translators: %d: number of people who can answer tickets
     2326#: assets/admin/index.js:7
     2327#, js-format
     2328msgid "New tickets and replies are emailed to the %d person who can answer tickets."
     2329msgid_plural "New tickets and replies are emailed to the %d people who can answer tickets."
     2330msgstr[0] ""
     2331msgstr[1] ""
     2332
     2333#: assets/admin/index.js:7
     2334msgid "Also send them to (optional)"
     2335msgstr ""
     2336
     2337#: assets/admin/index.js:7
     2338msgid "For example a shared support inbox. You can change this later under Notifications."
     2339msgstr ""
     2340
     2341#: assets/admin/index.js:7
     2342#: assets/admin/index.js:13
     2343msgid "Next"
     2344msgstr ""
     2345
     2346#: assets/admin/index.js:7
     2347msgid "Finish"
     2348msgstr ""
     2349
     2350#: assets/admin/index.js:7
    16772351msgid "just now"
    16782352msgstr ""
    16792353
    16802354#. translators: %d: minutes
    1681 #: assets/admin/index.js:1
     2355#: assets/admin/index.js:7
    16822356#, js-format
    16832357msgid "%d minute"
    … …  
    16872361
    16882362#. translators: %d: hours
    1689 #: assets/admin/index.js:1
     2363#: assets/admin/index.js:7
    16902364#, js-format
    16912365msgid "%d hour"
    … …  
    16952369
    16962370#. translators: %d: days
    1697 #: assets/admin/index.js:1
     2371#: assets/admin/index.js:7
    16982372#, js-format
    16992373msgid "%d day"
    … …  
    17022376msgstr[1] ""
    17032377
    1704 #: assets/admin/index.js:1
    1705 #: assets/admin/index.js:4
     2378#: assets/admin/index.js:7
     2379#: assets/admin/index.js:8
     2380#: assets/admin/index.js:11
    17062381msgid "Pending"
    17072382msgstr ""
    17082383
    1709 #: assets/admin/index.js:1
    1710 #: assets/admin/index.js:4
     2384#: assets/admin/index.js:7
     2385#: assets/admin/index.js:8
     2386#: assets/admin/index.js:11
    17112387msgid "Resolved"
    17122388msgstr ""
    17132389
    1714 #: assets/admin/index.js:1
    1715 #: assets/admin/index.js:4
     2390#: assets/admin/index.js:7
     2391#: assets/admin/index.js:8
     2392#: assets/admin/index.js:11
    17162393msgid "Closed"
    17172394msgstr ""
    17182395
    1719 #: assets/admin/index.js:1
     2396#: assets/admin/index.js:7
    17202397msgid "New tickets per day, last 7 days"
    17212398msgstr ""
    17222399
    1723 #: assets/admin/index.js:1
     2400#: assets/admin/index.js:7
    17242401msgid "What needs you today."
    17252402msgstr ""
    17262403
    1727 #: assets/admin/index.js:1
     2404#: assets/admin/index.js:7
     2405#: assets/admin/index.js:8
    17282406msgid "Refresh"
    17292407msgstr ""
    17302408
    1731 #: assets/admin/index.js:1
     2409#: assets/admin/index.js:7
    17322410msgid "Open tickets"
    17332411msgstr ""
    17342412
    1735 #: assets/admin/index.js:1
     2413#: assets/admin/index.js:7
    17362414msgid "Customers cannot reach you yet"
    17372415msgstr ""
    17382416
    1739 #: assets/admin/index.js:1
     2417#: assets/admin/index.js:7
    17402418msgid "The chat widget is off. Turn it on so customers can write to you from your store."
    17412419msgstr ""
    17422420
    1743 #: assets/admin/index.js:1
     2421#: assets/admin/index.js:7
    17442422msgid "Set up the widget"
    17452423msgstr ""
    17462424
    17472425#. translators: %s: how long
    1748 #: assets/admin/index.js:1
     2426#: assets/admin/index.js:7
    17492427#, js-format
    17502428msgid "oldest waiting %s"
    17512429msgstr ""
    17522430
    1753 #: assets/admin/index.js:1
     2431#: assets/admin/index.js:7
    17542432msgid "nothing waiting"
    17552433msgstr ""
    17562434
    1757 #: assets/admin/index.js:1
     2435#: assets/admin/index.js:7
    17582436msgid "waiting for the customer"
    17592437msgstr ""
    17602438
    1761 #: assets/admin/index.js:1
    1762 #: assets/admin/index.js:5
    1763 #: assets/admin/index.js:6
     2439#: assets/admin/index.js:7
     2440#: assets/admin/index.js:8
     2441#: assets/admin/index.js:12
     2442#: assets/admin/index.js:13
    17642443msgid "Unassigned"
    17652444msgstr ""
    17662445
    1767 #: assets/admin/index.js:1
     2446#: assets/admin/index.js:7
    17682447msgid "nobody owns these yet"
    17692448msgstr ""
    17702449
    1771 #: assets/admin/index.js:1
     2450#: assets/admin/index.js:7
    17722451msgid "everything has an owner"
    17732452msgstr ""
    17742453
    1775 #: assets/admin/index.js:1
     2454#: assets/admin/index.js:7
    17762455msgid "New, last 7 days"
    17772456msgstr ""
    17782457
    17792458#. translators: %d: tickets
    1780 #: assets/admin/index.js:1
     2459#: assets/admin/index.js:7
    17812460#, js-format
    17822461msgid "%d ticket waiting now"
    … …  
    17852464msgstr[1] ""
    17862465
    1787 #: assets/admin/index.js:1
     2466#: assets/admin/index.js:7
    17882467msgid "all caught up"
    17892468msgstr ""
    17902469
    1791 #: assets/admin/index.js:1
     2470#: assets/admin/index.js:7
    17922471msgid "New tickets, last 7 days"
    17932472msgstr ""
    17942473
    1795 #: assets/admin/index.js:1
     2474#: assets/admin/index.js:7
    17962475msgid "Latest tickets"
    17972476msgstr ""
    17982477
    1799 #: assets/admin/index.js:1
     2478#: assets/admin/index.js:7
    18002479msgid "View all"
    18012480msgstr ""
    18022481
    1803 #: assets/admin/index.js:1
     2482#: assets/admin/index.js:7
    18042483msgid "No tickets yet. They show up here as soon as a customer writes in."
    18052484msgstr ""
    18062485
    1807 #: assets/admin/index.js:1
     2486#: assets/admin/index.js:7
    18082487msgid "Setup and status"
    18092488msgstr ""
    18102489
    1811 #: assets/admin/index.js:1
     2490#: assets/admin/index.js:7
    18122491msgid "Support widget"
    18132492msgstr ""
    18142493
    1815 #: assets/admin/index.js:1
     2494#: assets/admin/index.js:7
    18162495msgid "Off: customers cannot start a ticket from your store."
    18172496msgstr ""
    18182497
    1819 #: assets/admin/index.js:1
     2498#: assets/admin/index.js:7
     2499#: assets/admin/index.js:13
    18202500msgid "On"
    18212501msgstr ""
    18222502
    1823 #: assets/admin/index.js:1
     2503#: assets/admin/index.js:7
     2504#: assets/admin/index.js:13
    18242505msgid "Off"
    18252506msgstr ""
    18262507
    1827 #: assets/admin/index.js:1
     2508#: assets/admin/index.js:7
    18282509msgid "Privacy"
    18292510msgstr ""
    18302511
    18312512#. translators: %d: days
    1832 #: assets/admin/index.js:1
     2513#: assets/admin/index.js:7
    18332514#, js-format
    18342515msgid "Tickets are kept for %d days."
    18352516msgstr ""
    18362517
    1837 #: assets/admin/index.js:1
     2518#: assets/admin/index.js:7
    18382519msgid "Set"
    18392520msgstr ""
    18402521
    1841 #: assets/admin/index.js:1
     2522#: assets/admin/index.js:7
    18422523msgid "Order storage"
    18432524msgstr ""
    18442525
    1845 #: assets/admin/index.js:1
     2526#: assets/admin/index.js:7
    18462527msgid "Works with WooCommerce high-performance order storage."
    18472528msgstr ""
    18482529
    1849 #: assets/admin/index.js:1
     2530#: assets/admin/index.js:7
    18502531msgid "Compatible"
    18512532msgstr ""
    18522533
    1853 #: assets/admin/index.js:1
     2534#: assets/admin/index.js:7
    18542535msgid "Everything is stored in your own WordPress database. No outside account is needed."
    18552536msgstr ""
    18562537
    1857 #: assets/admin/index.js:1
    1858 #: assets/admin/index.js:6
     2538#: assets/admin/index.js:7
     2539#: assets/admin/index.js:13
    18592540msgid "Data & Privacy"
    18602541msgstr ""
    18612542
    1862 #: assets/admin/index.js:1
     2543#: assets/admin/index.js:7
    18632544msgid "Data minimization by default — sync only what agents need. Historical import stays off unless you opt in."
    18642545msgstr ""
    18652546
    1866 #: assets/admin/index.js:1
     2547#: assets/admin/index.js:7
    18672548msgid "Customer fields"
    18682549msgstr ""
    18692550
    1870 #: assets/admin/index.js:1
     2551#: assets/admin/index.js:7
    18712552msgid "Allow billing address sync"
    18722553msgstr ""
    18732554
    1874 #: assets/admin/index.js:1
     2555#: assets/admin/index.js:7
    18752556msgid "Useful for shipping disputes. Off by default."
    18762557msgstr ""
    18772558
    1878 #: assets/admin/index.js:1
     2559#: assets/admin/index.js:7
    18792560msgid "Allow phone number sync"
    18802561msgstr ""
    18812562
    1882 #: assets/admin/index.js:1
     2563#: assets/admin/index.js:7
    18832564msgid "Only when agents need to call the customer."
    18842565msgstr ""
    18852566
    1886 #: assets/admin/index.js:1
     2567#: assets/admin/index.js:7
    18872568msgid "Share diagnostics with consent"
    18882569msgstr ""
    18892570
    1890 #: assets/admin/index.js:1
     2571#: assets/admin/index.js:7
    18912572msgid "Sanitized environment data only — never automatic full log upload."
    18922573msgstr ""
    18932574
    1894 #: assets/admin/index.js:1
     2575#: assets/admin/index.js:7
    18952576msgid "Historical import"
    18962577msgstr ""
    18972578
    1898 #: assets/admin/index.js:1
     2579#: assets/admin/index.js:7
    18992580msgid "Import window"
    19002581msgstr ""
    19012582
    1902 #: assets/admin/index.js:1
     2583#: assets/admin/index.js:7
    19032584msgid "Off (recommended)"
    19042585msgstr ""
    19052586
    1906 #: assets/admin/index.js:1
     2587#: assets/admin/index.js:7
    19072588msgid "Last 30 days"
    19082589msgstr ""
    19092590
    1910 #: assets/admin/index.js:1
     2591#: assets/admin/index.js:7
    19112592msgid "Last 60 days"
    19122593msgstr ""
    19132594
    1914 #: assets/admin/index.js:1
     2595#: assets/admin/index.js:7
    19152596msgid "Last 90 days"
    19162597msgstr ""
    19172598
    1918 #: assets/admin/index.js:1
     2599#: assets/admin/index.js:7
    19192600msgid "Retention"
    19202601msgstr ""
    19212602
    1922 #: assets/admin/index.js:1
     2603#: assets/admin/index.js:7
    19232604msgid "Synced context retention (days)"
    19242605msgstr ""
    19252606
    1926 #: assets/admin/index.js:1
     2607#: assets/admin/index.js:7
    19272608msgid "WordPress privacy tools"
    19282609msgstr ""
    19292610
    1930 #: assets/admin/index.js:1
     2611#: assets/admin/index.js:7
    19312612msgid "Deskovi registers a privacy-policy suggestion and ticket export/erase under Tools → Export/Erase Personal Data."
    19322613msgstr ""
    19332614
    1934 #: assets/admin/index.js:1
    1935 #: assets/admin/index.js:6
     2615#: assets/admin/index.js:7
     2616#: assets/admin/index.js:13
    19362617msgid "Save failed."
    19372618msgstr ""
    19382619
    1939 #: assets/admin/index.js:1
     2620#: assets/admin/index.js:7
    19402621msgid "Save privacy settings"
    19412622msgstr ""
    19422623
    1943 #: assets/admin/index.js:1
     2624#: assets/admin/index.js:7
    19442625msgid "Request remote data deletion"
    19452626msgstr ""
    19462627
    1947 #: assets/admin/index.js:1
    1948 #: assets/admin/index.js:6
     2628#: assets/admin/index.js:7
     2629msgid "Dropdown"
     2630msgstr ""
     2631
     2632#: assets/admin/index.js:7
     2633msgid "Checkbox"
     2634msgstr ""
     2635
     2636#: assets/admin/index.js:7
     2637msgid "Short text"
     2638msgstr ""
     2639
     2640#: assets/admin/index.js:7
     2641msgid "Questions on the ticket form"
     2642msgstr ""
     2643
     2644#: assets/admin/index.js:7
     2645msgid "Ask for what you always need, such as a phone model or a size. Customers see these on the new ticket form; their answers show at the top of the ticket. Changing a question later does not change answers already given."
     2646msgstr ""
     2647
     2648#: assets/admin/index.js:7
     2649msgid "No extra questions. The form asks only for a subject, category, order and message."
     2650msgstr ""
     2651
     2652#: assets/admin/index.js:7
     2653msgid "Question"
     2654msgstr ""
     2655
     2656#: assets/admin/index.js:7
     2657msgid "For example: Which phone model?"
     2658msgstr ""
     2659
     2660#: assets/admin/index.js:7
     2661msgid "Answer type"
     2662msgstr ""
     2663
     2664#: assets/admin/index.js:7
     2665msgid "Choices, one per line"
     2666msgstr ""
     2667
     2668#: assets/admin/index.js:7
     2669msgid "Required"
     2670msgstr ""
     2671
     2672#: assets/admin/index.js:7
     2673msgid "Customers can leave it unticked."
     2674msgstr ""
     2675
     2676#: assets/admin/index.js:7
     2677msgid "Move up"
     2678msgstr ""
     2679
     2680#: assets/admin/index.js:7
     2681msgid "Move down"
     2682msgstr ""
     2683
     2684#: assets/admin/index.js:7
     2685msgid "Add a question"
     2686msgstr ""
     2687
     2688#: assets/admin/index.js:7
     2689msgid "Form fields saved."
     2690msgstr ""
     2691
     2692#: assets/admin/index.js:7
     2693msgid "Save questions"
     2694msgstr ""
     2695
     2696#. translators: %d: maximum number of questions
     2697#: assets/admin/index.js:8
     2698#, js-format
     2699msgid "You can add up to %d questions."
     2700msgstr ""
     2701
     2702#: assets/admin/index.js:8
     2703msgid "Answers from the ticket form"
     2704msgstr ""
     2705
     2706#: assets/admin/index.js:8
     2707#: assets/admin/index.js:13
    19492708msgid "Urgent"
    19502709msgstr ""
    19512710
    1952 #: assets/admin/index.js:1
    1953 #: assets/admin/index.js:6
     2711#: assets/admin/index.js:8
     2712#: assets/admin/index.js:13
    19542713msgid "High"
    19552714msgstr ""
    19562715
    1957 #: assets/admin/index.js:1
    1958 #: assets/admin/index.js:6
     2716#: assets/admin/index.js:8
     2717#: assets/admin/index.js:13
    19592718msgid "Low"
    19602719msgstr ""
    19612720
    1962 #: assets/admin/index.js:1
    1963 #: assets/admin/index.js:6
     2721#: assets/admin/index.js:8
     2722#: assets/admin/index.js:13
    19642723msgid "Normal"
    19652724msgstr ""
    19662725
    1967 #: assets/admin/index.js:1
     2726#: assets/admin/index.js:8
    19682727msgid "View saved."
    19692728msgstr ""
    19702729
    1971 #: assets/admin/index.js:1
     2730#: assets/admin/index.js:8
    19722731msgid "Ticket split."
    19732732msgstr ""
    19742733
    1975 #: assets/admin/index.js:1
    1976 #: assets/admin/index.js:6
     2734#: assets/admin/index.js:8
     2735#: assets/admin/index.js:13
    19772736msgid "Tickets"
    19782737msgstr ""
    19792738
    1980 #: assets/admin/index.js:1
     2739#: assets/admin/index.js:8
    19812740msgid "Tickets are created, replied to, and stored locally in your WordPress database."
    19822741msgstr ""
    19832742
    1984 #: assets/admin/index.js:1
     2743#: assets/admin/index.js:8
    19852744msgid "Search tickets"
    19862745msgstr ""
    19872746
    1988 #: assets/admin/index.js:1
     2747#: assets/admin/index.js:8
    19892748msgid "Search subject, name, or email…"
    19902749msgstr ""
    19912750
    1992 #: assets/admin/index.js:1
     2751#: assets/admin/index.js:8
    19932752msgid "Export CSV"
    19942753msgstr ""
    19952754
    1996 #: assets/admin/index.js:1
     2755#: assets/admin/index.js:8
    19972756msgid "All"
    19982757msgstr ""
    19992758
    2000 #: assets/admin/index.js:1
     2759#: assets/admin/index.js:8
    20012760msgid "Assigned to me"
    20022761msgstr ""
    20032762
    2004 #: assets/admin/index.js:1
     2763#: assets/admin/index.js:8
    20052764msgid "Any status"
    20062765msgstr ""
    20072766
    2008 #: assets/admin/index.js:1
     2767#: assets/admin/index.js:8
    20092768msgid "Open or pending"
    20102769msgstr ""
    20112770
    2012 #: assets/admin/index.js:1
    2013 #: assets/admin/index.js:6
     2771#: assets/admin/index.js:8
     2772#: assets/admin/index.js:13
    20142773msgid "Priority"
    20152774msgstr ""
    20162775
    2017 #: assets/admin/index.js:1
     2776#: assets/admin/index.js:8
    20182777msgid "Any priority"
    20192778msgstr ""
    20202779
    2021 #: assets/admin/index.js:1
     2780#: assets/admin/index.js:8
    20222781msgid "Any category"
    20232782msgstr ""
    20242783
    2025 #: assets/admin/index.js:1
     2784#: assets/admin/index.js:8
    20262785msgid "Clear filters"
    20272786msgstr ""
    20282787
    20292788#. translators: %s: view name
    2030 #: assets/admin/index.js:1
     2789#: assets/admin/index.js:8
    20312790#, js-format
    20322791msgid "Delete the view %s"
    20332792msgstr ""
    20342793
    2035 #: assets/admin/index.js:1
     2794#: assets/admin/index.js:8
    20362795msgid "Choose a filter first"
    20372796msgstr ""
    20382797
    2039 #: assets/admin/index.js:1
     2798#: assets/admin/index.js:8
    20402799msgid "Save this view"
    20412800msgstr ""
    20422801
    2043 #: assets/admin/index.js:1
     2802#: assets/admin/index.js:8
    20442803msgid "Name, for example \"Urgent refunds\""
    20452804msgstr ""
    20462805
    20472806#. translators: 1: result count, 2: search query
    2048 #: assets/admin/index.js:2
     2807#: assets/admin/index.js:9
    20492808#, js-format
    20502809msgid "%1$d result(s) for \"%2$s\""
    … …  
    20522811
    20532812#. translators: %d: total ticket count
    2054 #: assets/admin/index.js:3
     2813#: assets/admin/index.js:10
    20552814#, js-format
    20562815msgid "%d ticket(s) found"
    20572816msgstr ""
    20582817
    2059 #: assets/admin/index.js:3
     2818#: assets/admin/index.js:10
    20602819msgid "Select all"
    20612820msgstr ""
    20622821
    20632822#. translators: %d: number of selected tickets
    2064 #: assets/admin/index.js:4
     2823#: assets/admin/index.js:11
    20652824#, js-format
    20662825msgid "%d selected"
    20672826msgstr ""
    20682827
    2069 #: assets/admin/index.js:4
     2828#: assets/admin/index.js:11
    20702829msgid "Status updated for selected tickets."
    20712830msgstr ""
    20722831
    2073 #: assets/admin/index.js:4
     2832#: assets/admin/index.js:11
    20742833msgid "Set status…"
    20752834msgstr ""
    20762835
    20772836#. translators: %d: number of tickets to delete
    2078 #: assets/admin/index.js:5
     2837#: assets/admin/index.js:12
    20792838#, js-format
    20802839msgid "Delete %d ticket(s)? This can't be undone."
    20812840msgstr ""
    20822841
    2083 #: assets/admin/index.js:5
     2842#: assets/admin/index.js:12
    20842843msgid "Selected tickets deleted."
    20852844msgstr ""
    20862845
    2087 #: assets/admin/index.js:5
     2846#: assets/admin/index.js:12
    20882847msgid "No tickets match this search/filter."
    20892848msgstr ""
    20902849
    2091 #: assets/admin/index.js:5
     2850#: assets/admin/index.js:12
    20922851msgid "No tickets yet. Create one to test the bridge."
    20932852msgstr ""
    20942853
    20952854#. translators: %s: ticket subject
    2096 #: assets/admin/index.js:5
     2855#: assets/admin/index.js:12
    20972856#, js-format
    20982857msgid "Select ticket: %s"
    20992858msgstr ""
    21002859
    2101 #: assets/admin/index.js:5
     2860#: assets/admin/index.js:12
    21022861msgid "Prev"
    21032862msgstr ""
    21042863
    21052864#. translators: 1: current page, 2: total pages
    2106 #: assets/admin/index.js:6
     2865#: assets/admin/index.js:13
    21072866#, js-format
    21082867msgid "Page %1$d of %2$d"
    21092868msgstr ""
    21102869
    2111 #: assets/admin/index.js:6
    2112 msgid "Next"
    2113 msgstr ""
    2114 
    2115 #: assets/admin/index.js:6
     2870#: assets/admin/index.js:13
    21162871msgid "Order ID (optional)"
    21172872msgstr ""
    21182873
    2119 #: assets/admin/index.js:6
     2874#: assets/admin/index.js:13
    21202875msgid "Ticket created."
    21212876msgstr ""
    21222877
    2123 #: assets/admin/index.js:6
    2124 msgid "Creating…"
    2125 msgstr ""
    2126 
    2127 #: assets/admin/index.js:6
     2878#: assets/admin/index.js:13
    21282879msgid "Select a ticket or create a new one to exercise the bridge."
    21292880msgstr ""
    21302881
    2131 #: assets/admin/index.js:6
     2882#: assets/admin/index.js:13
    21322883msgid "Order context"
    21332884msgstr ""
    21342885
    2135 #: assets/admin/index.js:6
     2886#: assets/admin/index.js:13
    21362887msgid "Order"
    21372888msgstr ""
    21382889
    2139 #: assets/admin/index.js:6
     2890#: assets/admin/index.js:13
    21402891msgid "Shipping"
    21412892msgstr ""
    21422893
    2143 #: assets/admin/index.js:6
     2894#: assets/admin/index.js:13
    21442895msgid "Billing"
    21452896msgstr ""
    21462897
    2147 #: assets/admin/index.js:6
     2898#: assets/admin/index.js:13
    21482899msgid "Phone"
    21492900msgstr ""
    21502901
    2151 #: assets/admin/index.js:6
     2902#: assets/admin/index.js:13
    21522903msgid "Address/phone hidden by privacy settings."
    21532904msgstr ""
    21542905
    2155 #: assets/admin/index.js:6
     2906#: assets/admin/index.js:13
    21562907msgid "Hide timeline"
    21572908msgstr ""
    21582909
    2159 #: assets/admin/index.js:6
     2910#: assets/admin/index.js:13
    21602911msgid "Show timeline"
    21612912msgstr ""
    21622913
    2163 #: assets/admin/index.js:6
     2914#: assets/admin/index.js:13
    21642915msgid "Refund"
    21652916msgstr ""
    21662917
    2167 #: assets/admin/index.js:6
     2918#: assets/admin/index.js:13
    21682919msgid "Amount (leave blank for full remaining amount)"
    21692920msgstr ""
    21702921
    2171 #: assets/admin/index.js:6
     2922#: assets/admin/index.js:13
    21722923msgid "Reason (optional)"
    21732924msgstr ""
    21742925
    2175 #: assets/admin/index.js:6
     2926#: assets/admin/index.js:13
    21762927msgid "Enter a valid refund amount, or leave it blank for the full remaining amount."
    21772928msgstr ""
    21782929
    2179 #: assets/admin/index.js:6
     2930#: assets/admin/index.js:13
    21802931msgid "Refund issued."
    21812932msgstr ""
    21822933
    2183 #: assets/admin/index.js:6
     2934#: assets/admin/index.js:13
    21842935msgid "Processing…"
    21852936msgstr ""
    21862937
    2187 #: assets/admin/index.js:6
     2938#: assets/admin/index.js:13
    21882939msgid "Issue refund"
    21892940msgstr ""
    21902941
    2191 #: assets/admin/index.js:6
     2942#: assets/admin/index.js:13
    21922943msgid "Invoice email resent."
    21932944msgstr ""
    21942945
    2195 #: assets/admin/index.js:6
     2946#: assets/admin/index.js:13
    21962947msgid "Resend invoice"
    21972948msgstr ""
    21982949
    2199 #: assets/admin/index.js:6
     2950#: assets/admin/index.js:13
    22002951msgid "Order unlinked."
    22012952msgstr ""
    22022953
    2203 #: assets/admin/index.js:6
     2954#: assets/admin/index.js:13
    22042955msgid "Unlink order"
    22052956msgstr ""
    22062957
    2207 #: assets/admin/index.js:6
     2958#: assets/admin/index.js:13
    22082959msgid "No order linked. Enter a WooCommerce order ID to attach context."
    22092960msgstr ""
    22102961
    2211 #: assets/admin/index.js:6
     2962#: assets/admin/index.js:13
    22122963msgid "Order linked."
    22132964msgstr ""
    22142965
    2215 #: assets/admin/index.js:6
     2966#: assets/admin/index.js:13
    22162967msgid "Enter a valid order ID."
    22172968msgstr ""
    22182969
    2219 #: assets/admin/index.js:6
     2970#: assets/admin/index.js:13
    22202971msgid "Linking…"
    22212972msgstr ""
    22222973
    2223 #: assets/admin/index.js:6
     2974#: assets/admin/index.js:13
    22242975msgid "Link order"
    22252976msgstr ""
    22262977
    2227 #: assets/admin/index.js:6
     2978#: assets/admin/index.js:13
    22282979msgid "Assigned to"
    22292980msgstr ""
    22302981
    2231 #: assets/admin/index.js:6
     2982#: assets/admin/index.js:13
    22322983msgid "Assignment updated."
    22332984msgstr ""
    22342985
    2235 #: assets/admin/index.js:6
     2986#: assets/admin/index.js:13
    22362987msgid "Priority updated."
    22372988msgstr ""
    22382989
    2239 #: assets/admin/index.js:6
     2990#: assets/admin/index.js:13
    22402991msgid "Status updated."
    22412992msgstr ""
    22422993
    2243 #: assets/admin/index.js:6
     2994#: assets/admin/index.js:13
    22442995msgid "Merge into another ticket…"
    22452996msgstr ""
    22462997
    2247 #: assets/admin/index.js:6
     2998#: assets/admin/index.js:13
    22482999msgid "Find the ticket this one belongs to"
    22493000msgstr ""
    22503001
    2251 #: assets/admin/index.js:6
     3002#: assets/admin/index.js:13
    22523003msgid "No other tickets found. Try a subject, a name or an email."
    22533004msgstr ""
    22543005
    22553006#. translators: 1: this ticket, 2: the ticket it goes into
    2256 #: assets/admin/index.js:6
     3007#: assets/admin/index.js:13
    22573008#, js-format
    22583009msgid "Move all messages and files of \"%1$s\" into \"%2$s\" and delete \"%1$s\"? This cannot be undone. Nobody is emailed."
    22593010msgstr ""
    22603011
    2261 #: assets/admin/index.js:6
     3012#: assets/admin/index.js:13
    22623013msgid "Tickets merged."
    22633014msgstr ""
    22643015
    2265 #: assets/admin/index.js:6
     3016#: assets/admin/index.js:13
    22663017msgid "Merge into this"
    22673018msgstr ""
    22683019
    2269 #: assets/admin/index.js:6
     3020#: assets/admin/index.js:13
    22703021msgid "internal"
    22713022msgstr ""
    22723023
    2273 #: assets/admin/index.js:6
     3024#: assets/admin/index.js:13
    22743025msgid "Split into a new ticket from here…"
    22753026msgstr ""
    22763027
    2277 #: assets/admin/index.js:6
     3028#: assets/admin/index.js:13
    22783029msgid "This message and every message after it move to a new ticket. Nobody is emailed. Subject of the new ticket:"
    22793030msgstr ""
    22803031
    2281 #: assets/admin/index.js:6
     3032#: assets/admin/index.js:13
    22823033msgid "Split ticket"
    22833034msgstr ""
    22843035
    2285 #: assets/admin/index.js:6
     3036#: assets/admin/index.js:13
    22863037msgid "is too large (max 5 MB)."
    22873038msgstr ""
    22883039
    2289 #: assets/admin/index.js:6
     3040#: assets/admin/index.js:13
    22903041msgid "is not an allowed type (jpg, jpeg, png, gif, webp, pdf, txt)."
    22913042msgstr ""
    22923043
    2293 #: assets/admin/index.js:6
     3044#: assets/admin/index.js:13
    22943045msgid "Remove file"
    22953046msgstr ""
    22963047
    2297 #: assets/admin/index.js:6
     3048#: assets/admin/index.js:13
    22983049msgid "Internal note (not visible to customer)"
    22993050msgstr ""
    23003051
    2301 #: assets/admin/index.js:6
     3052#: assets/admin/index.js:13
    23023053msgid "Reply sent."
    23033054msgstr ""
    23043055
    2305 #: assets/admin/index.js:6
     3056#: assets/admin/index.js:13
    23063057msgid "Uploading files…"
    23073058msgstr ""
    23083059
    2309 #: assets/admin/index.js:6
     3060#: assets/admin/index.js:13
    23103061msgid "Sending…"
    23113062msgstr ""
    23123063
    2313 #: assets/admin/index.js:6
     3064#: assets/admin/index.js:13
    23143065msgid "Send reply"
    23153066msgstr ""
    23163067
    2317 #: assets/admin/index.js:6
     3068#: assets/admin/index.js:13
    23183069msgid "Attach file"
    23193070msgstr ""
    23203071
    2321 #: assets/admin/index.js:6
     3072#: assets/admin/index.js:13
    23223073msgid "Attach"
    23233074msgstr ""
    23243075
    2325 #: assets/admin/index.js:6
     3076#: assets/admin/index.js:13
    23263077msgid "Insert canned reply"
    23273078msgstr ""
    23283079
    2329 #: assets/admin/index.js:6
     3080#: assets/admin/index.js:13
    23303081msgid "Insert canned reply…"
    23313082msgstr ""
    23323083
    2333 #: assets/admin/index.js:6
     3084#: assets/admin/index.js:13
    23343085msgid "Widget"
    23353086msgstr ""
    23363087
    2337 #: assets/admin/index.js:6
     3088#: assets/admin/index.js:13
    23383089msgid "Theme-safe launcher with lazy load after interaction — not another always-on chat bubble that taxes every page view."
    23393090msgstr ""
    23403091
    2341 #: assets/admin/index.js:6
     3092#: assets/admin/index.js:13
    23423093msgid "Storefront launcher"
    23433094msgstr ""
    23443095
    2345 #: assets/admin/index.js:6
     3096#: assets/admin/index.js:13
    23463097msgid "Loads on storefront (skips checkout)"
    23473098msgstr ""
    23483099
    2349 #: assets/admin/index.js:6
     3100#: assets/admin/index.js:13
    23503101msgid "No frontend assets"
    23513102msgstr ""
    23523103
    2353 #: assets/admin/index.js:6
     3104#: assets/admin/index.js:13
    23543105msgid "Enable support widget"
    23553106msgstr ""
    23563107
    2357 #: assets/admin/index.js:6
     3108#: assets/admin/index.js:13
    23583109msgid "When off, Deskovi adds zero scripts on the storefront. When on, a lazy launcher appears (not on cart/checkout)."
    23593110msgstr ""
    23603111
    2361 #: assets/admin/index.js:6
     3112#: assets/admin/index.js:13
    23623113msgid "Placement"
    23633114msgstr ""
    23643115
    2365 #: assets/admin/index.js:6
     3116#: assets/admin/index.js:13
    23663117msgid "Bottom right"
    23673118msgstr ""
    23683119
    2369 #: assets/admin/index.js:6
     3120#: assets/admin/index.js:13
    23703121msgid "Bottom left"
    23713122msgstr ""
    23723123
    2373 #: assets/admin/index.js:6
     3124#: assets/admin/index.js:13
    23743125msgid "Theme"
    23753126msgstr ""
    23763127
    2377 #: assets/admin/index.js:6
     3128#: assets/admin/index.js:13
    23783129msgid "System"
    23793130msgstr ""
    23803131
    2381 #: assets/admin/index.js:6
     3132#: assets/admin/index.js:13
    23823133msgid "Light"
    23833134msgstr ""
    23843135
    2385 #: assets/admin/index.js:6
     3136#: assets/admin/index.js:13
    23863137msgid "Dark"
    23873138msgstr ""
    23883139
    2389 #: assets/admin/index.js:6
     3140#: assets/admin/index.js:13
    23903141msgid "Launcher button label"
    23913142msgstr ""
    23923143
    2393 #: assets/admin/index.js:6
     3144#: assets/admin/index.js:13
    23943145msgid "Leave empty to show an icon-only button. Add a short label like 'Chat with us' if you want text next to the icon."
    23953146msgstr ""
    23963147
    2397 #: assets/admin/index.js:6
     3148#: assets/admin/index.js:13
    23983149msgid "Live behavior"
    23993150msgstr ""
    24003151
    2401 #: assets/admin/index.js:6
     3152#: assets/admin/index.js:13
    24023153msgid "Logged-in shoppers and verified guests (order + email OTP) can open tickets. Unread badges poll while the panel is open. Full UI loads only after the launcher is opened; cart/checkout never get the bundle."
    24033154msgstr ""
    24043155
    2405 #: assets/admin/index.js:6
     3156#: assets/admin/index.js:13
     3157msgid "My Account"
     3158msgstr ""
     3159
     3160#: assets/admin/index.js:13
     3161msgid "Support tab and \"Get help\" on orders"
     3162msgstr ""
     3163
     3164#: assets/admin/index.js:13
     3165msgid "Adds a Support tab to WooCommerce My Account where customers see, open and reply to their tickets, and a \"Get help\" button on each order that starts a ticket already linked to it. Works even when the launcher above is off."
     3166msgstr ""
     3167
     3168#: assets/admin/index.js:13
     3169msgid "To show the same panel on any page, add the \"Deskovi support\" block or the [deskovi_support] shortcode. Use [deskovi_support view=\"new\"] to open the new ticket form first."
     3170msgstr ""
     3171
     3172#: assets/admin/index.js:13
     3173msgid "Suggest help articles while the customer writes"
     3174msgstr ""
     3175
     3176#: assets/admin/index.js:13
     3177msgid "Shows up to three of your published help articles that match the subject (or the start of the message) in the new ticket form, wherever it appears: the launcher, My Account and the support block. Nothing shows until you publish articles under Deskovi → Help center."
     3178msgstr ""
     3179
     3180#: assets/admin/index.js:13
    24063181msgid "Save widget settings"
    24073182msgstr ""
    24083183
    2409 #: assets/admin/index.js:6
     3184#: assets/admin/index.js:13
    24103185msgid "Work"
    24113186msgstr ""
    24123187
    2413 #: assets/admin/index.js:6
     3188#: assets/admin/index.js:13
    24143189msgid "Insights"
    24153190msgstr ""
    24163191
    2417 #: assets/admin/index.js:6
     3192#: assets/admin/index.js:13
    24183193msgid "Automate"
    24193194msgstr ""
    24203195
    2421 #: assets/admin/index.js:6
     3196#: assets/admin/index.js:13
    24223197msgid "Channels"
    24233198msgstr ""
    24243199
    2425 #: assets/admin/index.js:6
    2426 msgid "Settings"
    2427 msgstr ""
    2428 
    2429 #: assets/admin/index.js:6
     3200#: assets/admin/index.js:13
    24303201msgid "Failed to load Deskovi admin data."
    24313202msgstr ""
    24323203
    2433 #: assets/admin/index.js:6
     3204#: assets/admin/index.js:13
    24343205msgid "Widget settings saved."
    24353206msgstr ""
    24363207
    2437 #: assets/admin/index.js:6
     3208#: assets/admin/index.js:13
    24383209msgid "Privacy settings saved."
    24393210msgstr ""
    24403211
    2441 #: assets/admin/index.js:6
     3212#: assets/admin/index.js:13
    24423213msgid "Deskovi sections"
    24433214msgstr ""
  • deskovi/trunk/readme.txt

    r3803408 r3843768  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.5.0
     7Stable tag: 1.6.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    2424* CSV export of tickets (respects the current search/filter)
    2525* Canned replies (macros): reusable reply templates with one-click insert and placeholder substitution
     26* Help center: help articles grouped by topic, a public help page with search, and a search block for any page
     27* Matching help articles suggested in the new ticket form while the customer types
     28* A Support tab in WooCommerce My Account, "Get help" buttons on orders, and a "Deskovi support" block and shortcode for your own Support page
     29* Up to 8 questions of your own on the new ticket form, and your own ticket categories
     30* A three-step setup for new stores
     31* Bengali, French, German and Spanish translations included
    2632* Configurable email notifications for ticket events
    2733* Optional customer chat widget on the storefront
    … …  
    5763= How do I remove the chat widget? =
    5864
    59 Disable the widget from the Deskovi admin settings. When the widget is off, storefront assets are not loaded.
     65Disable the widget from the Deskovi admin settings. When the widget is off, storefront assets are not loaded, except on pages that show the support panel themselves (the My Account Support tab, the block or the shortcode below).
     66
     67= Can I put the ticket form on my own Support page? =
     68
     69Yes. Add the "Deskovi support" block, or the shortcode `[deskovi_support]`, to any page. Logged-in customers see their tickets and can reply; guests can log in or continue with their order number and billing email. Use `[deskovi_support view="new"]` (or "Start on: New ticket form" in the block settings) to open the new-ticket form first. Customers also find the same panel under My Account → Support.
     70
     71= Can customers find answers themselves? =
     72
     73Yes. Write help articles under Deskovi → Help articles and group them by topic. Deskovi → Help center creates a public "Help center" page that lists them with a search box (or add the "Deskovi help center" block, or `[deskovi_help]`, to a page of your own). The "Deskovi help search" block puts a search box on any other page. Articles are ordinary WordPress content, so they stay on your site if Deskovi is removed.
     74
     75= Who can write help articles? =
     76
     77Help articles use the same permissions as WordPress posts: anyone who may write posts (administrators, shop managers, editors, authors) can write them, and publishing needs the right to publish posts. A role that only handles tickets cannot; give that person the Editor role as well.
    6078
    6179= How do privacy requests work? =
    … …  
    84102
    85103== Changelog ==
     104
     105= 1.6.0 =
     106* Support tab in WooCommerce My Account: customers see, open and reply to their tickets there, and each order gets a "Get help" button that starts a ticket about it (and lists open tickets already about that order). On by default, can be switched off under Widget
     107* "Deskovi support" block and `[deskovi_support]` shortcode to put the same panel on your own Support page
     108* Help center: help articles grouped by topic, a public help page with search, a search block, and `[deskovi_help]`
     109* The new ticket form suggests up to three matching help articles while the customer types
     110* Your own questions on the new ticket form (up to 8: short text, dropdown or checkbox, optionally required); agents see the answers on the ticket
     111* Ticket categories can be switched off, and up to 12 of your own added
     112* A three-step setup for new installs (stores already using Deskovi never see it)
     113* Notifications: an optional team email address for agent alerts; an invalid address is now reported instead of clearing the saved one
     114* Bengali, French, German and Spanish translations
     115* For add-ons: `itsdesk_ticket_exclude_ids`, `itsdesk_help_suggest_post_type`, `itsdesk_help_suggest_browse_url`, `itsdesk_form_fields`, `itsdesk_setup_state` and `itsdesk_account_endpoint` filters
     116* The database gains one column for form answers; it is added automatically
     117* Fix: in the dark theme the heading of the support panel was unreadable, and the main button had too little contrast
    86118
    87119= 1.5.0 =
    … …  
    141173== Upgrade Notice ==
    142174
     175= 1.6.0 =
     176Adds the My Account Support tab, a help center, your own form questions and four translations. Update Deskovi before updating Deskovi Pro to 1.1.
     177
    143178= 1.5.0 =
    144179Adds ticket splitting and the hooks Deskovi Pro 1.0 needs (quiet import, own-tickets-only scope). Update Deskovi before installing Deskovi Pro.
  • deskovi/trunk/uninstall.php

    r3763520 r3843768  
    2727        'itsdesk_tickets_db_version',
    2828        'itsdesk_caps_granted',
     29        'itsdesk_account_rewrite',
     30        'itsdesk_setup',
     31        'itsdesk_categories',
     32        'itsdesk_form_fields',
     33        'itsdesk_team_email',
     34        'itsdesk_help',
     35        'itsdesk_help_rewrite',
    2936);
    3037
Note: See TracChangeset for help on using the changeset viewer.