Changeset 3843768
- Timestamp:
- 12/04/2026 05:28:07 AM (less than one hour ago)
- Location:
- deskovi/trunk
- Files:
-
- 29 added
- 24 edited
-
assets/admin/blocks.asset.php (added)
-
assets/admin/blocks.js (added)
-
assets/admin/index-rtl.css (modified) (1 diff)
-
assets/admin/index.asset.php (modified) (1 diff)
-
assets/admin/index.css (modified) (1 diff)
-
assets/admin/index.js (modified) (1 diff)
-
assets/help (added)
-
assets/help/help.css (added)
-
assets/widget/loader.asset.php (modified) (1 diff)
-
assets/widget/loader.js (modified) (1 diff)
-
assets/widget/panel.js (modified) (1 diff)
-
deskovi.php (modified) (3 diffs)
-
includes/Admin/AdminMenu.php (modified) (1 diff)
-
includes/Admin/Setup.php (added)
-
includes/Help (added)
-
includes/Help/Articles.php (added)
-
includes/Help/Center.php (added)
-
includes/Help/index.php (added)
-
includes/Plugin.php (modified) (2 diffs)
-
includes/Privacy/PersonalData.php (modified) (2 diffs)
-
includes/Rest/AdminController.php (modified) (6 diffs)
-
includes/Rest/HelpController.php (added)
-
includes/Rest/TicketController.php (modified) (3 diffs)
-
includes/Tickets/Categories.php (modified) (2 diffs)
-
includes/Tickets/FormFields.php (added)
-
includes/Tickets/NotificationSettings.php (modified) (1 diff)
-
includes/Tickets/Notifications.php (modified) (3 diffs)
-
includes/Tickets/Schema.php (modified) (2 diffs)
-
includes/Tickets/TicketRepository.php (modified) (4 diffs)
-
includes/Tickets/TicketService.php (modified) (5 diffs)
-
includes/Widget/Account.php (added)
-
includes/Widget/Embed.php (added)
-
includes/Widget/Frontend.php (modified) (6 diffs)
-
includes/Widget/Settings.php (modified) (2 diffs)
-
languages/deskovi-bn_BD-518e2f8a1fe5f3317ac05c2f9f8a8e0e.json (added)
-
languages/deskovi-bn_BD-8208a25ec1f06d2921f7fc79e8095e71.json (added)
-
languages/deskovi-bn_BD.mo (added)
-
languages/deskovi-bn_BD.po (added)
-
languages/deskovi-de_DE-518e2f8a1fe5f3317ac05c2f9f8a8e0e.json (added)
-
languages/deskovi-de_DE-8208a25ec1f06d2921f7fc79e8095e71.json (added)
-
languages/deskovi-de_DE.mo (added)
-
languages/deskovi-de_DE.po (added)
-
languages/deskovi-es_ES-518e2f8a1fe5f3317ac05c2f9f8a8e0e.json (added)
-
languages/deskovi-es_ES-8208a25ec1f06d2921f7fc79e8095e71.json (added)
-
languages/deskovi-es_ES.mo (added)
-
languages/deskovi-es_ES.po (added)
-
languages/deskovi-fr_FR-518e2f8a1fe5f3317ac05c2f9f8a8e0e.json (added)
-
languages/deskovi-fr_FR-8208a25ec1f06d2921f7fc79e8095e71.json (added)
-
languages/deskovi-fr_FR.mo (added)
-
languages/deskovi-fr_FR.po (added)
-
languages/deskovi.pot (modified) (26 diffs)
-
readme.txt (modified) (5 diffs)
-
uninstall.php (modified) (1 diff)
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 */ 2 9 (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,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}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,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}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 3 3 * Plugin Name: Deskovi 4 4 * Description: A local WooCommerce helpdesk: support tickets, order context for agents, and an optional customer chat widget. 5 * Version: 1. 5.05 * Version: 1.6.0 6 6 * Requires at least: 6.6 7 7 * Requires PHP: 7.4 … … 21 21 defined( 'ABSPATH' ) || exit; 22 22 23 define( 'ITSDESK_VERSION', '1. 5.0' );23 define( 'ITSDESK_VERSION', '1.6.0' ); 24 24 25 25 /** … … 82 82 'plugins_loaded', 83 83 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' ); 84 86 itsdesk()->init(); 85 87 } -
deskovi/trunk/includes/Admin/AdminMenu.php
r3763520 r3843768 22 22 */ 23 23 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 ); 25 26 } 26 27 -
deskovi/trunk/includes/Plugin.php
r3763520 r3843768 20 20 use Itsdesk\Rest\OrderController; 21 21 use Itsdesk\Rest\TicketController; 22 use Itsdesk\Rest\HelpController; 22 23 use Itsdesk\Rest\ViewsController; 23 24 use Itsdesk\Tickets\Notifications as TicketNotifications; 24 25 use Itsdesk\Tickets\Schema as TicketSchema; 26 use Itsdesk\Widget\Account as WidgetAccount; 25 27 use Itsdesk\Widget\Frontend as WidgetFrontend; 26 28 … … 73 75 ( new TicketController() )->register(); 74 76 ( new ViewsController() )->register(); 77 ( new HelpController() )->register(); 75 78 ( new TicketNotifications() )->register(); 76 79 ( new OrderController() )->register(); 77 80 ( new GuestController() )->register(); 78 81 ( 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(); 79 86 ( new PersonalData() )->register(); 80 87 -
deskovi/trunk/includes/Privacy/PersonalData.php
r3763520 r3843768 11 11 defined( 'ABSPATH' ) || exit; 12 12 13 use Itsdesk\Tickets\FormFields; 13 14 use Itsdesk\Tickets\TicketRepository; 14 15 … … 114 115 ), 115 116 ); 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 } 116 124 117 125 foreach ( (array) ( $ticket['messages'] ?? array() ) as $message ) { -
deskovi/trunk/includes/Rest/AdminController.php
r3803408 r3843768 12 12 13 13 use Itsdesk\Admin\Capabilities; 14 use Itsdesk\Admin\Setup; 14 15 use Itsdesk\Diagnostics\ActivityLogger; 15 16 use Itsdesk\Diagnostics\EnvironmentReport; 17 use Itsdesk\Help\Articles as HelpArticles; 18 use Itsdesk\Help\Center as HelpCenter; 16 19 use Itsdesk\Privacy\Settings as PrivacySettings; 17 20 use Itsdesk\Tickets\CannedReplies; 21 use Itsdesk\Tickets\Categories; 22 use Itsdesk\Tickets\FormFields; 18 23 use Itsdesk\Tickets\NotificationSettings; 19 24 use Itsdesk\Tickets\TicketService; 25 use Itsdesk\Widget\Account as WidgetAccount; 20 26 use Itsdesk\Widget\Settings as WidgetSettings; 21 27 use WP_Error; … … 140 146 register_rest_route( 141 147 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, 142 219 '/diagnostics', 143 220 array( … … 178 255 'privacy' => $privacy, 179 256 'desk' => $this->desk_stats(), 257 'setup' => $this->setup_info(), 180 258 ), 181 259 200 … … 313 391 */ 314 392 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; 316 405 } 317 406 … … 323 412 */ 324 413 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 ); 331 425 } 332 426 … … 391 485 392 486 /** 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 /** 393 666 * GET /diagnostics 394 667 */ -
deskovi/trunk/includes/Rest/TicketController.php
r3803408 r3843768 15 15 use Itsdesk\Tickets\AttachmentService; 16 16 use Itsdesk\Tickets\Categories; 17 use Itsdesk\Tickets\FormFields; 17 18 use Itsdesk\Tickets\TicketService; 18 19 use WP_Error; … … 284 285 */ 285 286 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 ) { 288 290 $items[] = array( 289 291 'id' => $id, … … 291 293 ); 292 294 } 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 ); 294 313 } 295 314 -
deskovi/trunk/includes/Tickets/Categories.php
r3624800 r3843768 12 12 13 13 /** 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. 15 17 */ 16 18 final class Categories { 17 19 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. 20 26 * 21 27 * @return array<string, string> 22 28 */ 23 public static function all(): array {29 public static function builtin(): array { 24 30 return array( 25 31 'order' => __( 'Order question', 'deskovi' ), … … 33 39 34 40 /** 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. 36 112 */ 37 113 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; 39 228 } 40 229 } -
deskovi/trunk/includes/Tickets/NotificationSettings.php
r3763520 r3843768 17 17 18 18 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 } 19 53 20 54 /** -
deskovi/trunk/includes/Tickets/Notifications.php
r3763520 r3843768 85 85 (string) ( $ticket['customer_name'] ?? '' ), 86 86 (string) ( $ticket['customer_email'] ?? '' ), 87 $this->excerpt( $first_body ) ,87 $this->excerpt( $first_body ) . $this->answers_text( $ticket ), 88 88 admin_url( 'admin.php?page=' . AdminMenu::PAGE_SLUG ) 89 89 ); … … 365 365 } 366 366 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 367 373 return $emails; 368 374 } … … 406 412 407 413 /** 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 /** 408 427 * Strip tags and truncate to a plain-text excerpt. 409 428 */ -
deskovi/trunk/includes/Tickets/Schema.php
r3763520 r3843768 17 17 18 18 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'; 20 20 21 21 /** … … 52 52 guest_order_id BIGINT UNSIGNED DEFAULT NULL, 53 53 order_snapshot LONGTEXT DEFAULT NULL, 54 form_answers LONGTEXT DEFAULT NULL, 54 55 customer_user_id BIGINT UNSIGNED DEFAULT NULL, 55 56 customer_email VARCHAR(190) DEFAULT '', -
deskovi/trunk/includes/Tickets/TicketRepository.php
r3803408 r3843768 22 22 */ 23 23 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 } 24 34 25 35 /** … … 162 172 $where[] = 'id IN (' . implode( ', ', array_fill( 0, count( $ids ), '%s' ) ) . ')'; 163 173 $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 ); 164 182 } 165 183 } … … 462 480 ); 463 481 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 464 488 $exists = (bool) $wpdb->get_var( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- custom plugin table, no core caching API applies. 465 489 $wpdb->prepare( "SELECT COUNT(*) FROM {$tickets_table} WHERE id = %s", $id ) // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared … … 560 584 'guest_order_id' => null !== $row['guest_order_id'] ? (int) $row['guest_order_id'] : null, 561 585 '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(), 562 587 'customer_user_id' => null !== $row['customer_user_id'] ? (int) $row['customer_user_id'] : null, 563 588 'customer_email' => $row['customer_email'] ?? '', -
deskovi/trunk/includes/Tickets/TicketService.php
r3803408 r3843768 268 268 array( 'status' => 400 ) 269 269 ); 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; 270 276 } 271 277 … … 339 345 'guest_order_id' => $guest_order_id, 340 346 'order_snapshot' => $order_snapshot, 347 'form_answers' => $answers, 341 348 'customer_user_id' => $user_id, 342 349 'customer_email' => $email, … … 589 596 $target['assigned_agent_id'] = (int) $source['assigned_agent_id']; 590 597 } 598 $target['form_answers'] = FormFields::merge( 599 FormFields::from_storage( $target['form_answers'] ?? array() ), 600 FormFields::from_storage( $source['form_answers'] ?? array() ) 601 ); 591 602 if ( in_array( $previous, array( 'resolved', 'closed' ), true ) && in_array( (string) ( $source['status'] ?? '' ), array( 'open', 'pending' ), true ) ) { 592 603 $target['status'] = 'open'; … … 882 893 'status' => in_array( $status, array( 'open', 'pending', 'resolved', 'closed' ), true ) ? $status : 'closed', 883 894 '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, 885 896 'subject' => '' !== $subject ? $subject : __( '(no subject)', 'deskovi' ), 886 897 'customer_user_id' => $user ? (int) $user->ID : 0, … … 1022 1033 if ( is_array( $ids ) ) { 1023 1034 $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; 1024 1047 } 1025 1048 -
deskovi/trunk/includes/Widget/Frontend.php
r3763520 r3843768 19 19 20 20 /** 21 * Whether the loader was already enqueued in this request. 22 * 23 * @var bool 24 */ 25 private static bool $enqueued = false; 26 27 /** 21 28 * Register hooks. 22 29 */ … … 29 36 */ 30 37 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 31 48 $settings = ( new Settings() )->get(); 32 49 if ( empty( $settings['enabled'] ) ) { … … 41 58 } 42 59 43 $script = ITSDESK_PATH . 'assets/widget/loader.js'; 44 return is_readable( $script ); 60 return true; 45 61 } 46 62 … … 52 68 return; 53 69 } 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; 54 84 55 85 $asset_file = ITSDESK_PATH . 'assets/widget/loader.asset.php'; … … 92 122 'guestAuthenticated' => null !== $guest, 93 123 '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'] ), 95 127 'placement' => (string) ( $settings['placement'] ?? 'bottom-right' ), 96 128 'theme' => (string) ( $settings['theme'] ?? 'system' ), 97 129 'launcherLabel' => (string) ( $settings['launcher_label'] ?? '' ), 98 130 '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 ), 99 137 'i18n' => array( 100 138 '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' ), 101 142 'close' => __( 'Close', 'deskovi' ), 102 143 'tickets' => __( 'Your tickets', 'deskovi' ), … … 134 175 'requestCancel' => __( 'Request cancel', 'deskovi' ), 135 176 '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' ), 136 185 ), 137 186 ); -
deskovi/trunk/includes/Widget/Settings.php
r3640704 r3843768 29 29 'theme' => 'system', 30 30 '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, 31 35 ); 32 36 } … … 57 61 if ( array_key_exists( 'enabled', $input ) ) { 58 62 $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']; 59 71 } 60 72 -
deskovi/trunk/languages/deskovi.pot
r3803408 r3843768 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Deskovi 1. 5.0\n"5 "Project-Id-Version: Deskovi 1.6.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/deskovi\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2026-1 1-15T14:36:21+00:00\n"12 "POT-Creation-Date: 2026-12-04T03:47:21+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" … … 18 18 #. Author of the plugin 19 19 #: deskovi.php 20 #: includes/Admin/AdminMenu.php:3221 20 #: 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 24 24 msgid "Deskovi" 25 25 msgstr "" … … 35 35 msgstr "" 36 36 37 #: includes/Admin/AdminMenu.php:5 437 #: includes/Admin/AdminMenu.php:55 38 38 msgid "You do not have permission to access Deskovi." 39 39 msgstr "" … … 60 60 #: includes/Orders/OrderContext.php:136 61 61 #: includes/Orders/OrderContext.php:145 62 #: includes/Tickets/TicketService.php:1 29662 #: includes/Tickets/TicketService.php:1319 63 63 msgid "Order not found." 64 64 msgstr "" … … 111 111 msgstr "" 112 112 113 #: includes/Help/Articles.php:66 114 #: includes/Help/Articles.php:68 115 #: includes/Help/Articles.php:186 116 #: includes/Help/Articles.php:187 117 msgid "Help topics" 118 msgstr "" 119 120 #: includes/Help/Articles.php:67 121 msgid "Help topic" 122 msgstr "" 123 124 #: includes/Help/Articles.php:69 125 msgid "All topics" 126 msgstr "" 127 128 #: includes/Help/Articles.php:70 129 msgid "Edit topic" 130 msgstr "" 131 132 #: includes/Help/Articles.php:71 133 msgid "View topic" 134 msgstr "" 135 136 #: includes/Help/Articles.php:72 137 msgid "Update topic" 138 msgstr "" 139 140 #: includes/Help/Articles.php:73 141 msgid "Add new topic" 142 msgstr "" 143 144 #: includes/Help/Articles.php:74 145 msgid "New topic name" 146 msgstr "" 147 148 #: includes/Help/Articles.php:75 149 msgid "Search topics" 150 msgstr "" 151 152 #: includes/Help/Articles.php:76 153 msgid "No topics found." 154 msgstr "" 155 156 #: includes/Help/Articles.php:77 157 msgid "← Go to topics" 158 msgstr "" 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 164 msgid "Help articles" 165 msgstr "" 166 167 #: includes/Help/Articles.php:97 168 msgid "Help article" 169 msgstr "" 170 171 #: includes/Help/Articles.php:100 172 msgid "Add article" 173 msgstr "" 174 175 #: includes/Help/Articles.php:101 176 msgid "Add new help article" 177 msgstr "" 178 179 #: includes/Help/Articles.php:102 180 msgid "Edit help article" 181 msgstr "" 182 183 #: includes/Help/Articles.php:103 184 msgid "New help article" 185 msgstr "" 186 187 #: includes/Help/Articles.php:104 188 msgid "View help article" 189 msgstr "" 190 191 #: includes/Help/Articles.php:105 192 msgid "View help articles" 193 msgstr "" 194 195 #: includes/Help/Articles.php:106 196 #: includes/Help/Center.php:303 197 msgid "Search help articles" 198 msgstr "" 199 200 #: includes/Help/Articles.php:107 201 #: includes/Help/Center.php:197 202 msgid "No help articles yet." 203 msgstr "" 204 205 #: includes/Help/Articles.php:108 206 msgid "No help articles in the trash." 207 msgstr "" 208 209 #: includes/Help/Articles.php:109 210 msgid "Help article published." 211 msgstr "" 212 213 #: includes/Help/Articles.php:110 214 msgid "Help article updated." 215 msgstr "" 216 217 #: includes/Help/Articles.php:111 218 msgid "Help article scheduled." 219 msgstr "" 220 221 #: includes/Help/Articles.php:112 222 msgid "Help article reverted to draft." 223 msgstr "" 224 225 #: includes/Help/Articles.php:114 226 msgid "Answers customers can read before they write to you." 227 msgstr "" 228 229 #: includes/Help/Articles.php:233 230 msgid "Choose an existing page for the help center." 231 msgstr "" 232 233 #: includes/Help/Articles.php:240 234 msgid "The contact link must be a web address starting with http:// or https://." 235 msgstr "" 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 241 msgid "Help center" 242 msgstr "" 243 244 #: includes/Help/Center.php:66 245 #: assets/admin/blocks.js:1 246 msgid "Deskovi help center" 247 msgstr "" 248 249 #: includes/Help/Center.php:78 250 #: assets/admin/blocks.js:1 251 msgid "Deskovi help search" 252 msgstr "" 253 254 #. translators: %d: number of articles in the topic 255 #: includes/Help/Center.php:175 256 #, php-format 257 msgid "See all %d article" 258 msgid_plural "See all %d articles" 259 msgstr[0] "" 260 msgstr[1] "" 261 262 #: includes/Help/Center.php:191 263 msgid "Other articles" 264 msgstr "" 265 266 #: includes/Help/Center.php:211 267 #: includes/Help/Center.php:234 268 msgid "← All topics" 269 msgstr "" 270 271 #: includes/Help/Center.php:214 272 msgid "This topic was not found." 273 msgstr "" 274 275 #: includes/Help/Center.php:223 276 msgid "No articles in this topic yet." 277 msgstr "" 278 279 #. translators: %s: the customer's search words 280 #: includes/Help/Center.php:240 281 #, php-format 282 msgid "No articles match “%s”" 283 msgstr "" 284 285 #: includes/Help/Center.php:243 286 msgid "Try other or fewer words, or browse the topics." 287 msgstr "" 288 289 #. translators: %s: the customer's search words 290 #: includes/Help/Center.php:249 291 #, php-format 292 msgid "Results for “%s”" 293 msgstr "" 294 295 #: includes/Help/Center.php:304 296 msgid "Search help articles…" 297 msgstr "" 298 299 #: includes/Help/Center.php:306 300 msgid "Search" 301 msgstr "" 302 303 #: includes/Help/Center.php:319 304 msgid "Still need help?" 305 msgstr "" 306 307 #: includes/Help/Center.php:319 308 msgid "Our team is happy to help." 309 msgstr "" 310 311 #: includes/Help/Center.php:319 312 msgid "Contact support" 313 msgstr "" 314 315 #: includes/Help/Center.php:344 316 msgid "Breadcrumb" 317 msgstr "" 318 319 #: includes/Help/Center.php:356 320 msgid "Related articles" 321 msgstr "" 322 113 323 #: includes/Orders/OrderActions.php:35 114 324 msgid "Nothing left to refund on this order." … … 132 342 msgstr "" 133 343 134 #: includes/Privacy/PersonalData.php: 39344 #: includes/Privacy/PersonalData.php:40 135 345 msgid "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." 136 346 msgstr "" 137 347 138 #: includes/Privacy/PersonalData.php:5 3139 #: includes/Privacy/PersonalData.php:6 5140 #: includes/Privacy/PersonalData.php:1 44348 #: includes/Privacy/PersonalData.php:54 349 #: includes/Privacy/PersonalData.php:66 350 #: includes/Privacy/PersonalData.php:152 141 351 msgid "Deskovi support tickets" 142 352 msgstr "" 143 353 144 #: includes/Privacy/PersonalData.php:9 2145 #: includes/Widget/Frontend.php:1 04146 #: assets/admin/index.js: 6354 #: includes/Privacy/PersonalData.php:93 355 #: includes/Widget/Frontend.php:145 356 #: assets/admin/index.js:13 147 357 msgid "Subject" 148 358 msgstr "" 149 359 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 153 364 msgid "Status" 154 365 msgstr "" 155 366 156 #: includes/Privacy/PersonalData.php:10 0367 #: includes/Privacy/PersonalData.php:101 157 368 msgid "Name" 158 369 msgstr "" 159 370 160 #: includes/Privacy/PersonalData.php:10 4371 #: includes/Privacy/PersonalData.php:105 161 372 msgid "Email" 162 373 msgstr "" 163 374 164 #: includes/Privacy/PersonalData.php:10 8165 #: assets/admin/index.js: 6375 #: includes/Privacy/PersonalData.php:109 376 #: assets/admin/index.js:13 166 377 msgid "Order ID" 167 378 msgstr "" 168 379 169 #: includes/Privacy/PersonalData.php:11 2380 #: includes/Privacy/PersonalData.php:113 170 381 msgid "Created" 171 382 msgstr "" 172 383 173 384 #. translators: 1: message author (customer/agent/system), 2: date 174 #: includes/Privacy/PersonalData.php:1 24385 #: includes/Privacy/PersonalData.php:132 175 386 #, php-format 176 387 msgid "Message (%1$s, %2$s)" 177 388 msgstr "" 178 389 179 #: includes/Privacy/PersonalData.php:1 37390 #: includes/Privacy/PersonalData.php:145 180 391 msgid "Attachment" 181 392 msgstr "" 182 393 183 #: includes/Privacy/PersonalData.php:1 45394 #: includes/Privacy/PersonalData.php:153 184 395 msgid "Support tickets stored on this store." 185 396 msgstr "" 186 397 187 #: includes/Privacy/PersonalData.php:1 84398 #: includes/Privacy/PersonalData.php:192 188 399 msgid "Deskovi support tickets could not be removed from this store." 189 400 msgstr "" 190 401 191 402 #. translators: %d: count 192 #: includes/Privacy/PersonalData.php: 196403 #: includes/Privacy/PersonalData.php:204 193 404 #, php-format 194 405 msgid "Removed %d Deskovi support ticket(s) from this store." … … 203 414 msgstr "" 204 415 205 #: includes/Rest/AdminController.php: 384416 #: includes/Rest/AdminController.php:478 206 417 #: includes/Tickets/CannedReplies.php:115 207 418 msgid "Canned reply not found." 208 419 msgstr "" 209 420 421 #: includes/Rest/AdminController.php:520 422 msgid "Unknown setup state." 423 msgstr "" 424 425 #: includes/Rest/AdminController.php:598 426 msgid "You are not allowed to publish pages. Ask an administrator to create the help page." 427 msgstr "" 428 429 #: includes/Rest/AdminController.php:602 430 msgid "The help page could not be created. Try again, or create a page with the “Deskovi help center” block yourself." 431 msgstr "" 432 210 433 #: includes/Rest/OrderController.php:210 211 434 msgid "You can only view your verified order." 212 435 msgstr "" 213 436 214 #: includes/Rest/TicketController.php:4 23437 #: includes/Rest/TicketController.php:442 215 438 msgid "You cannot work on that ticket." 216 439 msgstr "" 217 440 218 #: includes/Rest/TicketController.php: 493441 #: includes/Rest/TicketController.php:512 219 442 msgid "No tickets selected." 220 443 msgstr "" 221 444 222 #: includes/Rest/TicketController.php:5 16445 #: includes/Rest/TicketController.php:535 223 446 msgid "Invalid bulk action." 224 447 msgstr "" 225 448 226 #: includes/Rest/TicketController.php: 785449 #: includes/Rest/TicketController.php:804 227 450 msgid "That message does not belong to this ticket." 228 451 msgstr "" 229 452 230 #: includes/Rest/TicketController.php: 793453 #: includes/Rest/TicketController.php:812 231 454 #: includes/Tickets/AttachmentService.php:107 232 455 msgid "No file was provided." 233 456 msgstr "" 234 457 235 #: includes/Rest/TicketController.php:8 15458 #: includes/Rest/TicketController.php:834 236 459 msgid "Attachment not found." 237 460 msgstr "" 238 461 239 #: includes/Rest/TicketController.php:8 24240 #: includes/Rest/TicketController.php:8 29241 #: includes/Rest/TicketController.php:8 34462 #: includes/Rest/TicketController.php:843 463 #: includes/Rest/TicketController.php:848 464 #: includes/Rest/TicketController.php:853 242 465 msgid "You cannot access this file." 243 466 msgstr "" 244 467 245 #: includes/Rest/TicketController.php:8 39468 #: includes/Rest/TicketController.php:858 246 469 msgid "File no longer exists." 247 470 msgstr "" … … 292 515 msgstr "" 293 516 294 #: includes/Tickets/Categories.php: 25517 #: includes/Tickets/Categories.php:31 295 518 msgid "Order question" 296 519 msgstr "" 297 520 298 #: includes/Tickets/Categories.php: 26521 #: includes/Tickets/Categories.php:32 299 522 msgid "Shipping / tracking" 300 523 msgstr "" 301 524 302 #: includes/Tickets/Categories.php: 27525 #: includes/Tickets/Categories.php:33 303 526 msgid "Refund / return" 304 527 msgstr "" 305 528 306 #: includes/Tickets/Categories.php: 28529 #: includes/Tickets/Categories.php:34 307 530 msgid "Cancel request" 308 531 msgstr "" 309 532 310 #: includes/Tickets/Categories.php: 29533 #: includes/Tickets/Categories.php:35 311 534 msgid "Product question" 312 535 msgstr "" 313 536 314 #: includes/Tickets/Categories.php:3 0537 #: includes/Tickets/Categories.php:36 315 538 msgid "Other" 539 msgstr "" 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 545 msgid "You can add up to %d categories of your own." 546 msgstr "" 547 548 #: includes/Tickets/Categories.php:171 549 msgid "Keep at least one category for customers to choose." 550 msgstr "" 551 552 #. translators: %d: maximum number of fields 553 #: includes/Tickets/FormFields.php:109 554 #, php-format 555 msgid "You can add up to %d fields." 556 msgstr "" 557 558 #: includes/Tickets/FormFields.php:128 559 msgid "Give every field a question." 560 msgstr "" 561 562 #: includes/Tickets/FormFields.php:132 563 msgid "Two fields ask the same question." 564 msgstr "" 565 566 #: includes/Tickets/FormFields.php:138 567 msgid "Choose a type for every field." 568 msgstr "" 569 570 #. translators: 1: field question, 2: maximum number of choices 571 #: includes/Tickets/FormFields.php:160 572 #, php-format 573 msgid "A dropdown needs between 1 and %2$d choices (\"%1$s\")." 574 msgstr "" 575 576 #. translators: %s: field question 577 #: includes/Tickets/FormFields.php:207 578 #, php-format 579 msgid "The answer to \"%s\" is not valid." 580 msgstr "" 581 582 #. translators: %s: question on the ticket form 583 #: includes/Tickets/FormFields.php:219 584 #: includes/Widget/Frontend.php:184 585 #, php-format 586 msgid "Please answer \"%s\"." 587 msgstr "" 588 589 #: includes/Tickets/FormFields.php:290 590 #: includes/Widget/Frontend.php:182 591 #: assets/admin/index.js:8 592 msgid "Yes" 316 593 msgstr "" 317 594 … … 395 672 396 673 #. translators: 1: recipient email, 2: ticket subject 397 #: includes/Tickets/Notifications.php:3 86674 #: includes/Tickets/Notifications.php:392 398 675 #, php-format 399 676 msgid "Failed to email %1$s about ticket %2$s" … … 401 678 402 679 #. translators: 1: recipient email, 2: ticket subject 403 #: includes/Tickets/Notifications.php: 399680 #: includes/Tickets/Notifications.php:405 404 681 #, php-format 405 682 msgid "Emailed %1$s about ticket %2$s" 683 msgstr "" 684 685 #: includes/Tickets/NotificationSettings.php:46 686 msgid "Please enter a valid email address." 406 687 msgstr "" 407 688 … … 423 704 424 705 #: includes/Tickets/TicketService.php:187 425 #: includes/Tickets/TicketService.php:48 1426 #: includes/Tickets/TicketService.php:5 28427 #: includes/Tickets/TicketService.php:57 2428 #: includes/Tickets/TicketService.php:6 18429 #: includes/Tickets/TicketService.php:6 65430 #: includes/Tickets/TicketService.php:7 74431 #: includes/Tickets/TicketService.php:10 45432 #: includes/Tickets/TicketService.php:1 099433 #: includes/Tickets/TicketService.php:11 54434 #: includes/Tickets/TicketService.php:12 34706 #: 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 435 716 msgid "Ticket not found." 436 717 msgstr "" … … 448 729 msgstr "" 449 730 450 #: includes/Tickets/TicketService.php:2 79731 #: includes/Tickets/TicketService.php:285 451 732 msgid "The email address is too long." 452 733 msgstr "" 453 734 454 #: includes/Tickets/TicketService.php:29 0735 #: includes/Tickets/TicketService.php:296 455 736 msgid "Login or guest verification required to open a ticket." 456 737 msgstr "" 457 738 458 #: includes/Tickets/TicketService.php: 298739 #: includes/Tickets/TicketService.php:304 459 740 msgid "Guest" 460 741 msgstr "" 461 742 462 #: includes/Tickets/TicketService.php:3 78463 #: includes/Tickets/TicketService.php:9 00743 #: includes/Tickets/TicketService.php:385 744 #: includes/Tickets/TicketService.php:911 464 745 msgid "The ticket could not be saved." 465 746 msgstr "" 466 747 467 748 #. translators: %s: subject 468 #: includes/Tickets/TicketService.php:3 87749 #: includes/Tickets/TicketService.php:394 469 750 #, php-format 470 751 msgid "Ticket created: %s" 471 752 msgstr "" 472 753 473 #: includes/Tickets/TicketService.php:4 15754 #: includes/Tickets/TicketService.php:422 474 755 msgid "Reply message is required." 475 756 msgstr "" 476 757 477 #: includes/Tickets/TicketService.php:45 0758 #: includes/Tickets/TicketService.php:457 478 759 msgid "Reply added to ticket" 479 760 msgstr "" 480 761 481 #: includes/Tickets/TicketService.php:47 2482 #: includes/Tickets/TicketService.php:9 49762 #: includes/Tickets/TicketService.php:479 763 #: includes/Tickets/TicketService.php:960 483 764 msgid "Invalid ticket status." 484 765 msgstr "" 485 766 486 767 #. translators: %s: status 487 #: includes/Tickets/TicketService.php: 495768 #: includes/Tickets/TicketService.php:502 488 769 #, php-format 489 770 msgid "Ticket status set to %s" 490 771 msgstr "" 491 772 492 #: includes/Tickets/TicketService.php:5 19773 #: includes/Tickets/TicketService.php:526 493 774 msgid "Invalid ticket priority." 494 775 msgstr "" 495 776 496 777 #. translators: %s: priority 497 #: includes/Tickets/TicketService.php:54 2778 #: includes/Tickets/TicketService.php:549 498 779 #, php-format 499 780 msgid "Ticket priority set to %s" 500 781 msgstr "" 501 782 502 #: includes/Tickets/TicketService.php:5 66783 #: includes/Tickets/TicketService.php:573 503 784 msgid "Choose a different ticket to merge into." 504 785 msgstr "" 505 786 506 787 #. translators: 1: merged ticket subject, 2: merged ticket id, 3: number of messages moved, 4: agent name 507 #: includes/Tickets/TicketService.php:6 04788 #: includes/Tickets/TicketService.php:615 508 789 #, php-format 509 790 msgid "Ticket \"%1$s\" (%2$s) was merged into this one by %4$s. %3$d message was moved here." … … 512 793 msgstr[1] "" 513 794 514 #: includes/Tickets/TicketService.php:6 08515 #: includes/Tickets/TicketService.php: 698795 #: includes/Tickets/TicketService.php:619 796 #: includes/Tickets/TicketService.php:709 516 797 msgid "an agent" 517 798 msgstr "" 518 799 519 800 #. translators: 1: merged ticket id, 2: target ticket id 520 #: includes/Tickets/TicketService.php:6 38801 #: includes/Tickets/TicketService.php:649 521 802 #, php-format 522 803 msgid "Ticket %1$s merged into %2$s" 523 804 msgstr "" 524 805 525 #: includes/Tickets/TicketService.php:6 77806 #: includes/Tickets/TicketService.php:688 526 807 msgid "That message is not on this ticket." 527 808 msgstr "" 528 809 529 #: includes/Tickets/TicketService.php:6 80810 #: includes/Tickets/TicketService.php:691 530 811 msgid "Choose a later message: the first message has to stay on this ticket." 531 812 msgstr "" 532 813 533 #: includes/Tickets/TicketService.php: 693814 #: includes/Tickets/TicketService.php:704 534 815 msgid "Choose a message written by the customer or an agent." 535 816 msgstr "" 536 817 537 818 #. translators: 1: original ticket subject, 2: original ticket id, 3: agent name 538 #: includes/Tickets/TicketService.php:7 40819 #: includes/Tickets/TicketService.php:751 539 820 #, php-format 540 821 msgid "Split from ticket \"%1$s\" (%2$s) by %3$s." … … 542 823 543 824 #. translators: 1: number of messages, 2: new ticket subject, 3: new ticket id, 4: agent name 544 #: includes/Tickets/TicketService.php:7 59825 #: includes/Tickets/TicketService.php:770 545 826 #, php-format 546 827 msgid "%1$d message was moved to the new ticket \"%2$s\" (%3$s) by %4$s." … … 550 831 551 832 #. translators: 1: original ticket id, 2: new ticket id 552 #: includes/Tickets/TicketService.php:7 81833 #: includes/Tickets/TicketService.php:792 553 834 #, php-format 554 835 msgid "Ticket %1$s split, new ticket %2$s" 555 836 msgstr "" 556 837 557 #: includes/Tickets/TicketService.php:8 17838 #: includes/Tickets/TicketService.php:828 558 839 msgid "An imported ticket needs a unique key." 559 840 msgstr "" 560 841 561 #: includes/Tickets/TicketService.php:8 30842 #: includes/Tickets/TicketService.php:841 562 843 msgid "The customer email address is not valid." 563 844 msgstr "" 564 845 565 #: includes/Tickets/TicketService.php:8 59846 #: includes/Tickets/TicketService.php:870 566 847 msgid "An imported ticket needs at least one message." 567 848 msgstr "" 568 849 569 #: includes/Tickets/TicketService.php:8 85850 #: includes/Tickets/TicketService.php:896 570 851 msgid "(no subject)" 571 852 msgstr "" 572 853 573 854 #. translators: %d: number of tickets deleted 574 #: includes/Tickets/TicketService.php:9 28855 #: includes/Tickets/TicketService.php:939 575 856 #, php-format 576 857 msgid "%d ticket(s) deleted in bulk" … … 578 859 579 860 #. translators: 1: number of tickets updated, 2: status 580 #: includes/Tickets/TicketService.php:9 76861 #: includes/Tickets/TicketService.php:987 581 862 #, php-format 582 863 msgid "%1$d ticket(s) set to %2$s in bulk" 583 864 msgstr "" 584 865 585 #: includes/Tickets/TicketService.php:10 56866 #: includes/Tickets/TicketService.php:1079 586 867 msgid "Ticket unassigned" 587 868 msgstr "" 588 869 589 #: includes/Tickets/TicketService.php:10 65870 #: includes/Tickets/TicketService.php:1088 590 871 msgid "That user is not a support agent." 591 872 msgstr "" 592 873 593 874 #. translators: %s: agent display name 594 #: includes/Tickets/TicketService.php:1 078875 #: includes/Tickets/TicketService.php:1101 595 876 #, php-format 596 877 msgid "Ticket assigned to %s" 597 878 msgstr "" 598 879 599 #: includes/Tickets/TicketService.php:11 11880 #: includes/Tickets/TicketService.php:1134 600 881 msgid "Order unlinked from ticket" 601 882 msgstr "" 602 883 603 884 #. translators: %d: order id 604 #: includes/Tickets/TicketService.php:11 34885 #: includes/Tickets/TicketService.php:1157 605 886 #, php-format 606 887 msgid "Order #%d linked to ticket" 607 888 msgstr "" 608 889 609 #: includes/Tickets/TicketService.php:11 63610 #: includes/Tickets/TicketService.php:12 43890 #: includes/Tickets/TicketService.php:1186 891 #: includes/Tickets/TicketService.php:1266 611 892 msgid "This ticket has no linked order." 612 893 msgstr "" 613 894 614 895 #. translators: 1: refunded amount, 2: currency code, 3: order id 615 #: includes/Tickets/TicketService.php:1 177896 #: includes/Tickets/TicketService.php:1200 616 897 #, php-format 617 898 msgid "Refund of %1$s %2$s issued on order #%3$d via the payment gateway." … … 619 900 620 901 #. translators: 1: refunded amount, 2: currency code, 3: order id 621 #: includes/Tickets/TicketService.php:1 184902 #: includes/Tickets/TicketService.php:1207 622 903 #, php-format 623 904 msgid "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." … … 625 906 626 907 #. translators: 1: order id, 2: ticket id 627 #: includes/Tickets/TicketService.php:12 03908 #: includes/Tickets/TicketService.php:1226 628 909 #, php-format 629 910 msgid "Refund issued on order #%1$d from ticket %2$s" … … 631 912 632 913 #. translators: %s: customer email 633 #: includes/Tickets/TicketService.php:12 59914 #: includes/Tickets/TicketService.php:1282 634 915 #, php-format 635 916 msgid "Invoice email resent to %s." … … 637 918 638 919 #. translators: 1: order id, 2: ticket id 639 #: includes/Tickets/TicketService.php:12 72920 #: includes/Tickets/TicketService.php:1295 640 921 #, php-format 641 922 msgid "Invoice resent for order #%1$d from ticket %2$s" 642 923 msgstr "" 643 924 644 #: includes/Tickets/TicketService.php:13 19925 #: includes/Tickets/TicketService.php:1342 645 926 msgid "You can only link your own orders." 646 927 msgstr "" 647 928 648 #: includes/Widget/Frontend.php:100 929 #: includes/Widget/Account.php:124 930 #: includes/Widget/Account.php:148 931 #: includes/Widget/Frontend.php:138 649 932 msgid "Support" 650 933 msgstr "" 651 934 652 #: includes/Widget/Frontend.php:101 935 #: includes/Widget/Account.php:199 936 msgid "Get help" 937 msgstr "" 938 939 #: includes/Widget/Account.php:222 940 msgid "Get help with this order" 941 msgstr "" 942 943 #: includes/Widget/Embed.php:51 944 msgid "Please turn on JavaScript to see and send support messages." 945 msgstr "" 946 947 #: includes/Widget/Embed.php:101 948 #: assets/admin/blocks.js:1 949 msgid "Deskovi support" 950 msgstr "" 951 952 #: includes/Widget/Frontend.php:139 953 msgid "These articles may answer your question" 954 msgstr "" 955 956 #: includes/Widget/Frontend.php:140 957 msgid "Browse all help articles" 958 msgstr "" 959 960 #: includes/Widget/Frontend.php:141 961 msgid "(opens in a new tab)" 962 msgstr "" 963 964 #: includes/Widget/Frontend.php:142 653 965 msgid "Close" 654 966 msgstr "" 655 967 656 #: includes/Widget/Frontend.php:1 02968 #: includes/Widget/Frontend.php:143 657 969 msgid "Your tickets" 658 970 msgstr "" 659 971 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 662 975 msgid "New ticket" 663 976 msgstr "" 664 977 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 981 msgid "Message" 982 msgstr "" 983 984 #: includes/Widget/Frontend.php:147 985 #: assets/admin/index.js:8 986 #: assets/admin/index.js:13 987 msgid "Category" 988 msgstr "" 989 990 #: includes/Widget/Frontend.php:148 991 msgid "Related order" 992 msgstr "" 993 994 #: includes/Widget/Frontend.php:149 995 msgid "No order" 996 msgstr "" 997 998 #: includes/Widget/Frontend.php:150 999 msgid "Send" 1000 msgstr "" 1001 1002 #: includes/Widget/Frontend.php:151 1003 #: assets/admin/index.js:13 1004 msgid "Reply" 1005 msgstr "" 1006 1007 #: includes/Widget/Frontend.php:152 1008 #: assets/admin/index.js:7 1009 msgid "Back" 1010 msgstr "" 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 1016 msgid "Loading…" 1017 msgstr "" 1018 1019 #: includes/Widget/Frontend.php:154 1020 msgid "No tickets yet." 1021 msgstr "" 1022 1023 #: includes/Widget/Frontend.php:155 1024 msgid "Get support" 1025 msgstr "" 1026 1027 #: includes/Widget/Frontend.php:156 1028 msgid "Log in, or continue with your order number and billing email." 1029 msgstr "" 1030 1031 #: includes/Widget/Frontend.php:157 1032 msgid "Log in" 1033 msgstr "" 1034 1035 #: includes/Widget/Frontend.php:158 1036 msgid "Continue with order" 1037 msgstr "" 1038 1039 #: includes/Widget/Frontend.php:159 1040 msgid "Order number" 1041 msgstr "" 1042 1043 #: includes/Widget/Frontend.php:160 1044 msgid "Billing email" 1045 msgstr "" 1046 1047 #: includes/Widget/Frontend.php:161 1048 msgid "Verification code" 1049 msgstr "" 1050 1051 #: includes/Widget/Frontend.php:162 1052 msgid "Send code" 1053 msgstr "" 1054 1055 #: includes/Widget/Frontend.php:163 1056 msgid "Verify" 1057 msgstr "" 1058 1059 #: includes/Widget/Frontend.php:164 1060 msgid "Check your email for a one-time code." 1061 msgstr "" 1062 1063 #: includes/Widget/Frontend.php:165 1064 msgid "Something went wrong. Please try again." 1065 msgstr "" 1066 1067 #: includes/Widget/Frontend.php:166 1068 #: assets/admin/index.js:13 1069 msgid "Create ticket" 1070 msgstr "" 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 1077 msgid "Open" 1078 msgstr "" 1079 1080 #: includes/Widget/Frontend.php:168 1081 msgid "Unread" 1082 msgstr "" 1083 1084 #: includes/Widget/Frontend.php:169 1085 msgid "Your orders" 1086 msgstr "" 1087 1088 #: includes/Widget/Frontend.php:170 1089 msgid "Order details" 1090 msgstr "" 1091 1092 #: includes/Widget/Frontend.php:171 1093 msgid "Tracking" 1094 msgstr "" 1095 1096 #: includes/Widget/Frontend.php:172 1097 msgid "No tracking number yet." 1098 msgstr "" 1099 1100 #: includes/Widget/Frontend.php:173 1101 msgid "View order / invoice" 1102 msgstr "" 1103 1104 #: includes/Widget/Frontend.php:174 1105 msgid "Request return" 1106 msgstr "" 1107 1108 #: includes/Widget/Frontend.php:175 1109 msgid "Request cancel" 1110 msgstr "" 1111 1112 #: includes/Widget/Frontend.php:176 1113 msgid "No recent orders." 1114 msgstr "" 1115 1116 #. translators: %s: order number 1117 #: includes/Widget/Frontend.php:178 1118 #, php-format 1119 msgid "Help with order #%s" 1120 msgstr "" 1121 1122 #: includes/Widget/Frontend.php:179 1123 msgid "Earlier tickets about this order" 1124 msgstr "" 1125 1126 #: includes/Widget/Frontend.php:180 1127 msgid "required" 1128 msgstr "" 1129 1130 #: includes/Widget/Frontend.php:181 1131 msgid "Choose…" 1132 msgstr "" 1133 1134 #: includes/Widget/Settings.php:79 1135 msgid "Invalid widget placement." 1136 msgstr "" 1137 1138 #: includes/Widget/Settings.php:92 1139 msgid "Invalid widget theme." 1140 msgstr "" 1141 1142 #: assets/admin/blocks.js:1 1143 msgid "Customers see their tickets, reply and open new ones. Guests can log in or continue with their order number and billing email." 1144 msgstr "" 1145 1146 #: assets/admin/blocks.js:1 1147 msgid "support" 1148 msgstr "" 1149 1150 #: assets/admin/blocks.js:1 1151 msgid "tickets" 1152 msgstr "" 1153 1154 #: assets/admin/blocks.js:1 1155 msgid "help" 1156 msgstr "" 1157 1158 #: assets/admin/blocks.js:1 1159 #: assets/admin/index.js:13 1160 msgid "Settings" 1161 msgstr "" 1162 1163 #: assets/admin/blocks.js:1 1164 msgid "Start on" 1165 msgstr "" 1166 1167 #: assets/admin/blocks.js:1 1168 msgid "Their tickets" 1169 msgstr "" 1170 1171 #: assets/admin/blocks.js:1 1172 msgid "New ticket form" 1173 msgstr "" 1174 1175 #: assets/admin/blocks.js:1 1176 msgid "Shows the new ticket form here on the live page." 1177 msgstr "" 1178 1179 #: assets/admin/blocks.js:1 1180 msgid "Shows the customer's tickets here on the live page." 1181 msgstr "" 1182 1183 #: assets/admin/blocks.js:1 1184 msgid "Your help articles grouped by topic, with a search box. Customers can find an answer before they write to you." 1185 msgstr "" 1186 1187 #: assets/admin/blocks.js:1 1188 msgid "knowledge base" 1189 msgstr "" 1190 1191 #: assets/admin/blocks.js:1 1192 msgid "faq" 1193 msgstr "" 1194 1195 #: assets/admin/blocks.js:1 1196 msgid "Shows your published help articles by topic, with a search box, on the live page. Write articles under Deskovi → Help articles." 1197 msgstr "" 1198 1199 #: assets/admin/blocks.js:1 1200 msgid "A search box for your help articles. Results open on your help center page." 1201 msgstr "" 1202 1203 #: assets/admin/blocks.js:1 1204 msgid "search" 1205 msgstr "" 1206 1207 #: assets/admin/blocks.js:1 1208 msgid "Shows a search box on the live page. It needs a help center page, chosen under Deskovi → Help center." 1209 msgstr "" 1210 1211 #: assets/admin/index.js:1 1212 msgid "Dismiss" 1213 msgstr "" 1214 1215 #: assets/admin/index.js:1 1216 msgid "Failed to load activity." 1217 msgstr "" 1218 1219 #: assets/admin/index.js:1 1220 msgid "No activity data." 1221 msgstr "" 1222 1223 #: assets/admin/index.js:1 1224 #: assets/admin/index.js:13 1225 msgid "Activity" 1226 msgstr "" 1227 1228 #: assets/admin/index.js:1 1229 msgid "A running log of ticket and account events on this site." 1230 msgstr "" 1231 1232 #: assets/admin/index.js:1 1233 msgid "When" 1234 msgstr "" 1235 1236 #: assets/admin/index.js:1 1237 msgid "Type" 1238 msgstr "" 1239 1240 #: assets/admin/index.js:1 1241 msgid "Event" 1242 msgstr "" 1243 1244 #: assets/admin/index.js:1 1245 msgid "Result" 1246 msgstr "" 1247 1248 #: assets/admin/index.js:1 1249 msgid "Failed to load diagnostics." 1250 msgstr "" 1251 1252 #: assets/admin/index.js:1 1253 msgid "Pass" 1254 msgstr "" 1255 1256 #: assets/admin/index.js:1 1257 msgid "OK" 1258 msgstr "" 1259 1260 #: assets/admin/index.js:1 1261 msgid "Fail" 1262 msgstr "" 1263 1264 #: assets/admin/index.js:1 1265 msgid "Info" 1266 msgstr "" 1267 1268 #: assets/admin/index.js:1 1269 #: assets/admin/index.js:7 1270 #: assets/admin/index.js:13 1271 msgid "Diagnostics" 1272 msgstr "" 1273 1274 #: assets/admin/index.js:1 1275 msgid "Support-safe environment snapshot. Share intentionally — never automatic full log upload." 1276 msgstr "" 1277 1278 #: assets/admin/index.js:1 1279 msgid "Report copied to clipboard." 1280 msgstr "" 1281 1282 #: assets/admin/index.js:1 1283 msgid "Could not copy report." 1284 msgstr "" 1285 1286 #: assets/admin/index.js:1 1287 msgid "Copy report" 1288 msgstr "" 1289 1290 #: assets/admin/index.js:1 1291 msgid "Diagnostics refreshed." 1292 msgstr "" 1293 1294 #: assets/admin/index.js:1 1295 msgid "Run health check" 1296 msgstr "" 1297 1298 #: assets/admin/index.js:1 1299 msgid "Check" 1300 msgstr "" 1301 1302 #: assets/admin/index.js:1 1303 msgid "Value" 1304 msgstr "" 1305 1306 #: assets/admin/index.js:1 1307 msgid "Active theme" 1308 msgstr "" 1309 1310 #: assets/admin/index.js:1 1311 msgid "Sanitized recent errors" 1312 msgstr "" 1313 1314 #: assets/admin/index.js:1 1315 msgid "No diagnostic errors recorded." 1316 msgstr "" 1317 1318 #: assets/admin/index.js:1 1319 msgid "Time" 1320 msgstr "" 1321 1322 #: assets/admin/index.js:1 1323 msgid "Code" 1324 msgstr "" 1325 1326 #: assets/admin/index.js:1 1327 msgid "Email channel" 1328 msgstr "" 1329 1330 #: assets/admin/index.js:1 1331 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." 1332 msgstr "" 1333 1334 #: assets/admin/index.js:1 1335 msgid "Gmail / Google Workspace, Microsoft 365 / Outlook or any IMAP mailbox, with your own app, no relay server" 1336 msgstr "" 1337 1338 #: assets/admin/index.js:1 1339 msgid "Replies are matched to the right ticket, quoted history and signatures are removed, attachments are saved" 1340 msgstr "" 1341 1342 #: assets/admin/index.js:1 1343 msgid "Agents can answer a notification by replying to the email" 1344 msgstr "" 1345 1346 #: assets/admin/index.js:1 1347 msgid "Automation" 1348 msgstr "" 1349 1350 #: assets/admin/index.js:1 1351 msgid "Rules that assign, prioritise and annotate tickets for you when something happens." 1352 msgstr "" 1353 1354 #: assets/admin/index.js:1 1355 msgid "Assign to one agent, in turn, or to whoever has the fewest open tickets" 1356 msgstr "" 1357 1358 #: assets/admin/index.js:1 1359 msgid "Practice mode shows what a rule would do before it changes anything" 1360 msgstr "" 1361 1362 #: assets/admin/index.js:1 1363 msgid "Rules never email customers, refund or delete anything" 1364 msgstr "" 1365 1366 #: assets/admin/index.js:1 1367 msgid "Tags" 1368 msgstr "" 1369 1370 #: assets/admin/index.js:1 1371 msgid "Put your own labels on tickets and find them again." 1372 msgstr "" 1373 1374 #: assets/admin/index.js:1 1375 msgid "Labels such as “vip” or “damaged-item”, shown in the ticket list" 1376 msgstr "" 1377 1378 #: assets/admin/index.js:1 1379 msgid "Filter the list by tag, save it as a view, and let automation rules add tags" 1380 msgstr "" 1381 1382 #: assets/admin/index.js:1 1383 msgid "Custom fields" 1384 msgstr "" 1385 1386 #: assets/admin/index.js:1 1387 msgid "Add your own details to tickets, such as the return reason or the carrier." 1388 msgstr "" 1389 1390 #: assets/admin/index.js:1 1391 msgid "Text, number, dropdown, checkbox and date fields that only your team sees" 1392 msgstr "" 1393 1394 #: assets/admin/index.js:1 1395 msgid "They move with a merge and are deleted with the ticket" 1396 msgstr "" 1397 1398 #: assets/admin/index.js:1 1399 msgid "Roles & permissions" 1400 msgstr "" 1401 1402 #: assets/admin/index.js:1 1403 msgid "Decide which role may refund, see reports, set up rules or manage mailboxes." 1404 msgstr "" 1405 1406 #: assets/admin/index.js:1 1407 msgid "A Support Manager role next to the Support Agent role" 1408 msgstr "" 1409 1410 #: assets/admin/index.js:1 1411 msgid "One table that shows what every role may do" 1412 msgstr "" 1413 1414 #: assets/admin/index.js:1 1415 msgid "Response times (SLA)" 1416 msgstr "" 1417 1418 #: assets/admin/index.js:1 1419 msgid "First-reply and resolution targets per priority, counted in your working hours." 1420 msgstr "" 1421 1422 #: assets/admin/index.js:1 1423 msgid "Timers on every ticket and a “Needs attention” queue" 1424 msgstr "" 1425 1426 #: assets/admin/index.js:1 1427 msgid "The clock can pause while you wait for the customer" 1428 msgstr "" 1429 1430 #: assets/admin/index.js:1 1431 msgid "One-time warning and breach emails to your team" 1432 msgstr "" 1433 1434 #: assets/admin/index.js:1 1435 msgid "Team tools" 1436 msgstr "" 1437 1438 #: assets/admin/index.js:1 1439 msgid "Work on tickets together without stepping on each other." 1440 msgstr "" 1441 1442 #: assets/admin/index.js:1 1443 msgid "A notice when a colleague has the same ticket open or is writing a reply" 1444 msgstr "" 1445 1446 #: assets/admin/index.js:1 1447 msgid "@mentions in internal notes, reply drafts, and handover with a note" 1448 msgstr "" 1449 1450 #: assets/admin/index.js:1 1451 msgid "Star and watch tickets, log the time you spend, and work from the keyboard" 1452 msgstr "" 1453 1454 #: assets/admin/index.js:1 1455 msgid "Order tools" 1456 msgstr "" 1457 1458 #: assets/admin/index.js:1 1459 msgid "Do more with the order without leaving the ticket." 1460 msgstr "" 1461 1462 #: assets/admin/index.js:1 1463 msgid "Refund chosen items or an amount, change the status, cancel, add a note or fix the shipping address" 1464 msgstr "" 1465 1466 #: assets/admin/index.js:1 1467 msgid "A customer card with lifetime value, orders and earlier tickets" 1468 msgstr "" 1469 1470 #: assets/admin/index.js:1 1471 msgid "Send a replacement order or a one-time coupon" 1472 msgstr "" 1473 1474 #: assets/admin/index.js:1 1475 msgid "Import tickets" 1476 msgstr "" 1477 1478 #: assets/admin/index.js:1 1479 msgid "Move your history from another helpdesk without emailing a single customer." 1480 msgstr "" 1481 1482 #: assets/admin/index.js:1 1483 msgid "Bring in a CSV export from Help Scout, Zendesk, Freshdesk and others" 1484 msgstr "" 1485 1486 #: assets/admin/index.js:1 1487 msgid "Check first, keep the original dates and tags, and never import the same ticket twice" 1488 msgstr "" 1489 1490 #: assets/admin/index.js:1 1491 msgid "Connections and API" 1492 msgstr "" 1493 1494 #: assets/admin/index.js:1 1495 msgid "Tell the other tools you use what happens in your helpdesk." 1496 msgstr "" 1497 1498 #: assets/admin/index.js:1 1499 msgid "Signed webhooks for Zapier, Make or your CRM, and messages to Slack, Discord, Teams or Telegram" 1500 msgstr "" 1501 1502 #: assets/admin/index.js:1 1503 msgid "A REST API with read and write keys, a customer lookup for your CRM, and a hook for your own code" 1504 msgstr "" 1505 1506 #: assets/admin/index.js:1 1507 msgid "Self-service" 1508 msgstr "" 1509 1510 #: assets/admin/index.js:1 1511 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." 1512 msgstr "" 1513 1514 #: assets/admin/index.js:1 1515 msgid "Order status and tracking for the customer’s own order" 1516 msgstr "" 1517 1518 #: assets/admin/index.js:1 1519 msgid "Suggested public pages, then “Did this answer your question?”" 1520 msgstr "" 1521 1522 #: assets/admin/index.js:1 1523 msgid "AI assistant" 1524 msgstr "" 1525 1526 #: assets/admin/index.js:1 1527 msgid "Order-aware reply drafts, summaries, translation and suggestions inside the ticket, with your own OpenAI or Anthropic key." 1528 msgstr "" 1529 1530 #: assets/admin/index.js:1 1531 msgid "Customer details are masked before anything leaves your site" 1532 msgstr "" 1533 1534 #: assets/admin/index.js:1 1535 msgid "Drafts only: nothing is sent or changed unless an agent does it" 1536 msgstr "" 1537 1538 #: assets/admin/index.js:1 1539 msgid "Reports and satisfaction" 1540 msgstr "" 1541 1542 #: assets/admin/index.js:1 1543 msgid "How fast you answer, what is waiting, who is busy and how customers feel, plus store views such as tickets per product." 1544 msgstr "" 1545 1546 #: assets/admin/index.js:1 1547 msgid "Optional one-click satisfaction survey when a ticket is resolved" 1548 msgstr "" 1549 1550 #: assets/admin/index.js:1 1551 msgid "Weekly or monthly summary email and optional deletion of old tickets" 1552 msgstr "" 1553 1554 #: assets/admin/index.js:1 1555 msgid "Deskovi Pro" 1556 msgstr "" 1557 1558 #: assets/admin/index.js:1 1559 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." 1560 msgstr "" 1561 1562 #: assets/admin/index.js:1 1563 msgid "Learn more" 1564 msgstr "" 1565 1566 #: assets/admin/index.js:1 1567 msgid "Pro" 1568 msgstr "" 1569 1570 #: assets/admin/index.js:1 1571 msgid "Everything in Deskovi (free) keeps working as it is. Installing Deskovi Pro turns these features on and replaces this page with their settings." 1572 msgstr "" 1573 1574 #: assets/admin/index.js:1 1575 msgid "Support tickets" 1576 msgstr "" 1577 1578 #: assets/admin/index.js:1 1579 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." 1580 msgstr "" 1581 1582 #: assets/admin/index.js:1 1583 msgid "Order-aware support" 1584 msgstr "" 1585 1586 #: assets/admin/index.js:1 1587 msgid "Link a ticket to a WooCommerce order and see its items, total, shipping, status and timeline beside the conversation." 1588 msgstr "" 1589 1590 #: assets/admin/index.js:1 1591 msgid "Refunds from a ticket" 1592 msgstr "" 1593 1594 #: assets/admin/index.js:1 1595 msgid "Issue a full or partial refund, or resend the order invoice email, without opening the order." 1596 msgstr "" 1597 1598 #: assets/admin/index.js:1 1599 msgid "Filters and saved views" 1600 msgstr "" 1601 1602 #: assets/admin/index.js:1 1603 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." 1604 msgstr "" 1605 1606 #: assets/admin/index.js:1 1607 msgid "Merge duplicate tickets" 1608 msgstr "" 1609 1610 #: assets/admin/index.js:1 1611 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." 1612 msgstr "" 1613 1614 #: assets/admin/index.js:1 1615 msgid "Priority and assignment" 1616 msgstr "" 1617 1618 #: assets/admin/index.js:1 1619 msgid "Mark tickets Low, Normal, High or Urgent, hand them to an agent, and filter by Unassigned or Assigned to me." 1620 msgstr "" 1621 1622 #: assets/admin/index.js:1 1623 msgid "Internal notes" 1624 msgstr "" 1625 1626 #: assets/admin/index.js:1 1627 msgid "Leave a note only your team can see. It is never shown to the customer and its attachments stay private too." 1628 msgstr "" 1629 1630 #: assets/admin/index.js:1 1631 msgid "Canned replies" 1632 msgstr "" 1633 1634 #: assets/admin/index.js:1 1635 msgid "Save reusable answers with placeholders such as {customer_name} and {order_id}, and insert one with a click." 1636 msgstr "" 1637 1638 #: assets/admin/index.js:1 1639 msgid "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." 1640 msgstr "" 1641 1642 #: assets/admin/index.js:1 1643 msgid "Attachments" 1644 msgstr "" 1645 1646 #: assets/admin/index.js:1 1647 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." 1648 msgstr "" 1649 1650 #: assets/admin/index.js:1 1651 msgid "Bulk actions and CSV export" 1652 msgstr "" 1653 1654 #: assets/admin/index.js:1 1655 msgid "Change the status of, or delete, many tickets at once. Export the list you are looking at to a spreadsheet." 1656 msgstr "" 1657 1658 #: assets/admin/index.js:1 1659 msgid "Email notifications" 1660 msgstr "" 1661 1662 #: assets/admin/index.js:1 1663 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." 1664 msgstr "" 1665 1666 #: assets/admin/index.js:1 1667 msgid "Storefront chat widget" 1668 msgstr "" 1669 1670 #: assets/admin/index.js:1 1671 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." 1672 msgstr "" 1673 1674 #: assets/admin/index.js:1 1675 #: assets/admin/index.js:7 1676 #: assets/admin/index.js:13 1677 msgid "Overview" 1678 msgstr "" 1679 1680 #: assets/admin/index.js:1 1681 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." 1682 msgstr "" 1683 1684 #: assets/admin/index.js:1 1685 msgid "Privacy by design" 1686 msgstr "" 1687 1688 #: assets/admin/index.js:1 1689 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." 1690 msgstr "" 1691 1692 #: assets/admin/index.js:1 1693 msgid "Diagnostics and activity log" 1694 msgstr "" 1695 1696 #: assets/admin/index.js:1 1697 msgid "Health checks for your setup and a log of what Deskovi has done, so a problem is easy to explain and fix." 1698 msgstr "" 1699 1700 #: assets/admin/index.js:1 1701 msgid "Built for add-ons" 1702 msgstr "" 1703 1704 #: assets/admin/index.js:1 1705 msgid "Other plugins can add screens, buttons and panels through a documented extension API, without changing Deskovi." 1706 msgstr "" 1707 1708 #: assets/admin/index.js:1 1709 msgid "Finding your way around" 1710 msgstr "" 1711 1712 #: assets/admin/index.js:1 1713 msgid "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." 1714 msgstr "" 1715 1716 #: assets/admin/index.js:1 1717 msgid "Reading the Overview" 1718 msgstr "" 1719 1720 #: assets/admin/index.js:1 1721 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)." 1722 msgstr "" 1723 1724 #: assets/admin/index.js:1 1725 msgid "How customers open a ticket" 1726 msgstr "" 1727 1728 #: assets/admin/index.js:1 1729 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." 1730 msgstr "" 1731 1732 #: assets/admin/index.js:1 1733 msgid "Replying to a ticket" 1734 msgstr "" 1735 1736 #: assets/admin/index.js:1 1737 msgid "Open Deskovi → Tickets and click a ticket. The conversation is on the right." 1738 msgstr "" 1739 1740 #: assets/admin/index.js:1 1741 msgid "Write your answer in the reply box. Insert a canned reply from the menu above it if you have one." 1742 msgstr "" 1743 1744 #: assets/admin/index.js:1 1745 msgid "Tick “Internal note (not visible to customer)” for a message only your team should see." 1746 msgstr "" 1747 1748 #: assets/admin/index.js:1 1749 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." 1750 msgstr "" 1751 1752 #: assets/admin/index.js:1 1753 msgid "Help articles and the help center" 1754 msgstr "" 1755 1756 #: assets/admin/index.js:1 1757 msgid "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." 1758 msgstr "" 1759 1760 #: assets/admin/index.js:1 1761 msgid "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." 1762 msgstr "" 1763 1764 #: assets/admin/index.js:1 1765 msgid "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." 1766 msgstr "" 1767 1768 #: assets/admin/index.js:1 1769 msgid "The help page lists every topic with its first five articles, then the articles without a topic, each list in alphabetical order." 1770 msgstr "" 1771 1772 #: assets/admin/index.js:1 1773 msgid "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." 1774 msgstr "" 1775 1776 #: assets/admin/index.js:1 1777 msgid "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." 1778 msgstr "" 1779 1780 #: assets/admin/index.js:1 1781 msgid "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." 1782 msgstr "" 1783 1784 #: assets/admin/index.js:1 1785 msgid "Articles live at /help-center/article-name/. A developer can change that with the itsdesk_help_article_base filter (then save Settings → Permalinks once)." 1786 msgstr "" 1787 1788 #: assets/admin/index.js:1 1789 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." 1790 msgstr "" 1791 1792 #: assets/admin/index.js:1 1793 msgid "Set the filters you use often, for example status “Open or pending” and priority “Urgent”." 1794 msgstr "" 1795 1796 #: assets/admin/index.js:1 1797 msgid "Click “Save this view”, give it a name and press Enter. It appears as a button above the list." 1798 msgstr "" 1799 1800 #: assets/admin/index.js:1 1801 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." 1802 msgstr "" 1803 1804 #: assets/admin/index.js:1 1805 msgid "Add-ons can add their own filters beside the built-in ones (Deskovi Pro adds a tag filter)." 1806 msgstr "" 1807 1808 #: assets/admin/index.js:1 1809 msgid "Merging duplicate tickets" 1810 msgstr "" 1811 1812 #: assets/admin/index.js:1 1813 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." 1814 msgstr "" 1815 1816 #: assets/admin/index.js:1 1817 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." 1818 msgstr "" 1819 1820 #: assets/admin/index.js:1 1821 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." 1822 msgstr "" 1823 1824 #: assets/admin/index.js:1 1825 msgid "An internal note on it records which ticket was merged, when and by whom. Nobody is emailed." 1826 msgstr "" 1827 1828 #: assets/admin/index.js:1 1829 msgid "Merging tickets of two different customers is allowed, so check the email address before you confirm." 1830 msgstr "" 1831 1832 #: assets/admin/index.js:1 1833 msgid "Status and priority" 1834 msgstr "" 1835 1836 #: assets/admin/index.js:1 1837 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." 1838 msgstr "" 1839 1840 #: assets/admin/index.js:1 1841 msgid "Assigning tickets" 1842 msgstr "" 1843 1844 #: assets/admin/index.js:1 1845 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)." 1846 msgstr "" 1847 1848 #: assets/admin/index.js:1 1849 msgid "Linking a ticket to an order" 1850 msgstr "" 1851 1852 #: assets/admin/index.js:1 1853 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." 1854 msgstr "" 1855 1856 #: assets/admin/index.js:1 1857 msgid "Issuing a refund or resending an invoice" 1858 msgstr "" 1859 1860 #: assets/admin/index.js:1 1861 msgid "You need the permission to edit WooCommerce orders. In the linked order card:" 1862 msgstr "" 1863 1864 #: assets/admin/index.js:1 1865 msgid "Leave the amount empty to refund what is left of the order, or type a smaller amount for a partial refund." 1866 msgstr "" 1867 1868 #: assets/admin/index.js:1 1869 msgid "Add a short reason if you like; it is saved with the refund." 1870 msgstr "" 1871 1872 #: assets/admin/index.js:1 1873 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." 1874 msgstr "" 1875 1876 #: assets/admin/index.js:1 1877 msgid "To send the customer their order email again instead, click “Resend invoice”. No money moves." 1878 msgstr "" 1879 1880 #: assets/admin/index.js:1 1881 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." 1882 msgstr "" 1883 1884 #: assets/admin/index.js:1 1885 msgid "Answers you give again and again." 1886 msgstr "" 1887 1888 #: assets/admin/index.js:1 1889 msgid "Go to Deskovi → Canned Replies and click “Add canned reply”." 1890 msgstr "" 1891 1892 #: assets/admin/index.js:1 1893 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." 1894 msgstr "" 1895 1896 #: assets/admin/index.js:1 1897 msgid "In a ticket, choose it from “Insert canned reply”. It is added to your draft, so you can still edit it before sending." 1898 msgstr "" 1899 1900 #: assets/admin/index.js:1 1901 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." 1902 msgstr "" 1903 1904 #: assets/admin/index.js:1 1905 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." 1906 msgstr "" 1907 1908 #: assets/admin/index.js:1 1909 msgid "Setting up the chat widget" 1910 msgstr "" 1911 1912 #: assets/admin/index.js:1 1913 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." 1914 msgstr "" 1915 1916 #: assets/admin/index.js:1 1917 msgid "Privacy and your data" 1918 msgstr "" 1919 1920 #: assets/admin/index.js:1 1921 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." 1922 msgstr "" 1923 1924 #: assets/admin/index.js:1 1925 msgid "Diagnostics and the activity log" 1926 msgstr "" 1927 1928 #: assets/admin/index.js:1 1929 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." 1930 msgstr "" 1931 1932 #: assets/admin/index.js:1 1933 msgid "Who can use Deskovi" 1934 msgstr "" 1935 1936 #: assets/admin/index.js:1 1937 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." 1938 msgstr "" 1939 1940 #: assets/admin/index.js:1 1941 msgid "For developers: add-ons" 1942 msgstr "" 1943 1944 #: assets/admin/index.js:1 1945 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." 1946 msgstr "" 1947 1948 #: assets/admin/index.js:1 1949 #: assets/admin/index.js:13 1950 msgid "Docs & Features" 1951 msgstr "" 1952 1953 #: assets/admin/index.js:1 1954 msgid "What Deskovi can do and how to set it up. Everything is stored in your own WordPress database; there is no outside account." 1955 msgstr "" 1956 1957 #: assets/admin/index.js:1 1958 msgid "Features" 1959 msgstr "" 1960 1961 #: assets/admin/index.js:1 1962 msgid "Documentation" 1963 msgstr "" 1964 1965 #: assets/admin/index.js:1 1966 msgid "Available with Deskovi Pro" 1967 msgstr "" 1968 1969 #: assets/admin/index.js:1 1970 msgid "Deskovi Pro is a separate add-on. These features turn on when it is installed; they are not part of the free plugin." 1971 msgstr "" 1972 1973 #: assets/admin/index.js:1 1974 msgid "See what Pro adds" 1975 msgstr "" 1976 1977 #: assets/admin/index.js:1 1978 msgid "On this page" 1979 msgstr "" 1980 1981 #: assets/admin/index.js:1 1982 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." 1983 msgstr "" 1984 1985 #: assets/admin/index.js:1 1986 msgid "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." 1987 msgstr "" 1988 1989 #: assets/admin/index.js:1 1990 msgid "Articles" 1991 msgstr "" 1992 1993 #. translators: %d: number of published help articles 1994 #: assets/admin/index.js:2 1995 #, js-format 1996 msgid "%d published article" 1997 msgid_plural "%d published articles" 1998 msgstr[0] "" 1999 msgstr[1] "" 2000 2001 #. translators: %d: number of draft help articles 2002 #: assets/admin/index.js:3 2003 #, js-format 2004 msgid "%d draft" 2005 msgid_plural "%d drafts" 2006 msgstr[0] "" 2007 msgstr[1] "" 2008 2009 #. translators: %d: number of help topics 2010 #: assets/admin/index.js:4 2011 #, js-format 2012 msgid "%d topic" 2013 msgid_plural "%d topics" 2014 msgstr[0] "" 2015 msgstr[1] "" 2016 2017 #: assets/admin/index.js:4 2018 msgid "Write an article" 2019 msgstr "" 2020 2021 #: assets/admin/index.js:4 2022 msgid "All articles" 2023 msgstr "" 2024 2025 #: assets/admin/index.js:4 2026 msgid "Topics" 2027 msgstr "" 2028 2029 #: assets/admin/index.js:4 2030 msgid "Help center page" 2031 msgstr "" 2032 2033 #: assets/admin/index.js:4 2034 msgid "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." 2035 msgstr "" 2036 2037 #: assets/admin/index.js:4 2038 msgid "(no title)" 2039 msgstr "" 2040 2041 #: assets/admin/index.js:4 2042 msgid "Edit page" 2043 msgstr "" 2044 2045 #: assets/admin/index.js:4 2046 msgid "Not published yet, so customers cannot see it." 2047 msgstr "" 2048 2049 #: assets/admin/index.js:4 2050 msgid "This page does not show the help center yet: add the “Deskovi help center” block to it." 2051 msgstr "" 2052 2053 #: assets/admin/index.js:4 2054 msgid "The help center page was created and published." 2055 msgstr "" 2056 2057 #: assets/admin/index.js:4 2058 #: assets/admin/index.js:13 2059 msgid "Creating…" 2060 msgstr "" 2061 2062 #: assets/admin/index.js:4 2063 msgid "Create the help center page" 2064 msgstr "" 2065 2066 #: assets/admin/index.js:4 2067 msgid "Or choose a page" 2068 msgstr "" 2069 2070 #: assets/admin/index.js:4 2071 msgid "— None —" 2072 msgstr "" 2073 2074 #. translators: %d: page id 2075 #: assets/admin/index.js:4 2076 #, js-format 2077 msgid "Page #%d" 2078 msgstr "" 2079 2080 #: assets/admin/index.js:4 2081 msgid "“Contact support” link" 2082 msgstr "" 2083 2084 #: assets/admin/index.js:4 2085 msgid "Shown under the help center and every article. Leave empty to use the Support tab in My Account." 2086 msgstr "" 2087 2088 #: assets/admin/index.js:4 2089 msgid "Shown under the help center and every article. Leave empty to hide it." 2090 msgstr "" 2091 2092 #: assets/admin/index.js:4 2093 msgid "Help center settings saved." 2094 msgstr "" 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 2100 msgid "Saving…" 2101 msgstr "" 2102 2103 #: assets/admin/index.js:4 2104 #: assets/admin/index.js:8 2105 msgid "Save" 2106 msgstr "" 2107 2108 #: assets/admin/index.js:4 2109 #: assets/admin/index.js:13 2110 msgid "Canned Replies" 2111 msgstr "" 2112 2113 #: assets/admin/index.js:4 2114 msgid "Reusable reply templates agents can insert into the ticket reply composer with one click." 2115 msgstr "" 2116 2117 #: assets/admin/index.js:4 2118 msgid "Add canned reply" 2119 msgstr "" 2120 2121 #: assets/admin/index.js:4 2122 msgid "Edit canned reply" 2123 msgstr "" 2124 2125 #: assets/admin/index.js:4 2126 msgid "New canned reply" 2127 msgstr "" 2128 2129 #: assets/admin/index.js:4 2130 msgid "Title" 2131 msgstr "" 2132 2133 #: assets/admin/index.js:4 2134 msgid "Body" 2135 msgstr "" 2136 2137 #: assets/admin/index.js:4 2138 msgid "Available placeholders: {customer_name}, {customer_email}, {order_id}, {agent_name}" 2139 msgstr "" 2140 2141 #: assets/admin/index.js:4 2142 msgid "Canned reply updated." 2143 msgstr "" 2144 2145 #: assets/admin/index.js:4 2146 msgid "Canned reply created." 2147 msgstr "" 2148 2149 #: assets/admin/index.js:4 2150 #: assets/admin/index.js:8 2151 #: assets/admin/index.js:13 2152 msgid "Cancel" 2153 msgstr "" 2154 2155 #: assets/admin/index.js:4 2156 msgid "No canned replies yet." 2157 msgstr "" 2158 2159 #: assets/admin/index.js:4 2160 msgid "Preview" 2161 msgstr "" 2162 2163 #: assets/admin/index.js:4 2164 msgid "Actions" 2165 msgstr "" 2166 2167 #: assets/admin/index.js:4 2168 #: assets/admin/index.js:7 2169 msgid "Edit" 2170 msgstr "" 2171 2172 #: assets/admin/index.js:4 2173 msgid "Delete this canned reply?" 2174 msgstr "" 2175 2176 #: assets/admin/index.js:4 2177 msgid "Canned reply deleted." 2178 msgstr "" 2179 2180 #: assets/admin/index.js:4 2181 msgid "Deleting…" 2182 msgstr "" 2183 2184 #: assets/admin/index.js:4 2185 #: assets/admin/index.js:12 2186 msgid "Delete" 2187 msgstr "" 2188 2189 #: assets/admin/index.js:4 2190 #: assets/admin/index.js:13 2191 msgid "Notifications" 2192 msgstr "" 2193 2194 #: assets/admin/index.js:4 2195 msgid "Local email notifications only — sent via wp_mail(), nothing leaves your site." 2196 msgstr "" 2197 2198 #: assets/admin/index.js:4 2199 msgid "Ticket event emails" 2200 msgstr "" 2201 2202 #: assets/admin/index.js:4 2203 msgid "Email every support agent when a customer opens a new ticket." 2204 msgstr "" 2205 2206 #: assets/admin/index.js:4 2207 msgid "Customer reply" 2208 msgstr "" 2209 2210 #: assets/admin/index.js:4 2211 msgid "Email the assigned agent (or all agents, if unassigned) when a customer replies." 2212 msgstr "" 2213 2214 #: assets/admin/index.js:4 2215 msgid "Agent reply" 2216 msgstr "" 2217 2218 #: assets/admin/index.js:4 2219 msgid "Email the customer when an agent replies to their ticket." 2220 msgstr "" 2221 2222 #: assets/admin/index.js:4 2223 msgid "Ticket assigned" 2224 msgstr "" 2225 2226 #: assets/admin/index.js:4 2227 msgid "Email an agent when a ticket is assigned to them." 2228 msgstr "" 2229 2230 #: assets/admin/index.js:4 2231 msgid "Also send agent alerts to" 2232 msgstr "" 2233 2234 #: assets/admin/index.js:4 2235 msgid "Optional. A shared inbox that gets new ticket and reply emails along with the agents. Leave empty for none." 2236 msgstr "" 2237 2238 #: assets/admin/index.js:4 2239 msgid "Notification settings saved." 2240 msgstr "" 2241 2242 #: assets/admin/index.js:4 2243 msgid "Save notification settings" 2244 msgstr "" 2245 2246 #: assets/admin/index.js:4 2247 msgid "Built in" 2248 msgstr "" 2249 2250 #: assets/admin/index.js:4 2251 msgid "Your own" 2252 msgstr "" 2253 2254 #: assets/admin/index.js:4 2255 msgid "None yet." 2256 msgstr "" 2257 2258 #: assets/admin/index.js:4 2259 msgid "Category name" 2260 msgstr "" 2261 2262 #: assets/admin/index.js:4 2263 #: assets/admin/index.js:7 2264 msgid "Remove" 2265 msgstr "" 2266 2267 #: assets/admin/index.js:4 2268 msgid "New category name" 2269 msgstr "" 2270 2271 #: assets/admin/index.js:4 2272 msgid "For example: Wholesale" 2273 msgstr "" 2274 2275 #: assets/admin/index.js:4 2276 msgid "Add" 2277 msgstr "" 2278 2279 #: assets/admin/index.js:5 2280 msgid "Ticket categories" 2281 msgstr "" 2282 2283 #: assets/admin/index.js:5 2284 msgid "What customers pick from when they open a ticket. Turning one off keeps it on older tickets." 2285 msgstr "" 2286 2287 #: assets/admin/index.js:5 2288 msgid "Categories saved." 2289 msgstr "" 2290 2291 #: assets/admin/index.js:5 2292 msgid "Save categories" 2293 msgstr "" 2294 2295 #: assets/admin/index.js:5 2296 msgid "Let customers reach you" 2297 msgstr "" 2298 2299 #: assets/admin/index.js:5 2300 msgid "Who gets new ticket emails" 2301 msgstr "" 2302 2303 #: assets/admin/index.js:5 2304 msgid "What customers can ask about" 2305 msgstr "" 2306 2307 #. translators: 1: current step, 2: number of steps 667 2308 #: 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 2310 msgid "Setup · step %1$d of %2$d" 2311 msgstr "" 2312 673 2313 #: 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 2314 msgid "Skip setup" 2315 msgstr "" 2316 690 2317 #: 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 2318 msgid "Show the support button on your store" 2319 msgstr "" 2320 753 2321 #: 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 2322 msgid "A small button in the corner of every page except cart and checkout. Customers can also always reach you from My Account → Support." 2323 msgstr "" 2324 2325 #. translators: %d: number of people who can answer tickets 2326 #: assets/admin/index.js:7 2327 #, js-format 2328 msgid "New tickets and replies are emailed to the %d person who can answer tickets." 2329 msgid_plural "New tickets and replies are emailed to the %d people who can answer tickets." 2330 msgstr[0] "" 2331 msgstr[1] "" 2332 2333 #: assets/admin/index.js:7 2334 msgid "Also send them to (optional)" 2335 msgstr "" 2336 2337 #: assets/admin/index.js:7 2338 msgid "For example a shared support inbox. You can change this later under Notifications." 2339 msgstr "" 2340 2341 #: assets/admin/index.js:7 2342 #: assets/admin/index.js:13 2343 msgid "Next" 2344 msgstr "" 2345 2346 #: assets/admin/index.js:7 2347 msgid "Finish" 2348 msgstr "" 2349 2350 #: assets/admin/index.js:7 1677 2351 msgid "just now" 1678 2352 msgstr "" 1679 2353 1680 2354 #. translators: %d: minutes 1681 #: assets/admin/index.js: 12355 #: assets/admin/index.js:7 1682 2356 #, js-format 1683 2357 msgid "%d minute" … … 1687 2361 1688 2362 #. translators: %d: hours 1689 #: assets/admin/index.js: 12363 #: assets/admin/index.js:7 1690 2364 #, js-format 1691 2365 msgid "%d hour" … … 1695 2369 1696 2370 #. translators: %d: days 1697 #: assets/admin/index.js: 12371 #: assets/admin/index.js:7 1698 2372 #, js-format 1699 2373 msgid "%d day" … … 1702 2376 msgstr[1] "" 1703 2377 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 1706 2381 msgid "Pending" 1707 2382 msgstr "" 1708 2383 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 1711 2387 msgid "Resolved" 1712 2388 msgstr "" 1713 2389 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 1716 2393 msgid "Closed" 1717 2394 msgstr "" 1718 2395 1719 #: assets/admin/index.js: 12396 #: assets/admin/index.js:7 1720 2397 msgid "New tickets per day, last 7 days" 1721 2398 msgstr "" 1722 2399 1723 #: assets/admin/index.js: 12400 #: assets/admin/index.js:7 1724 2401 msgid "What needs you today." 1725 2402 msgstr "" 1726 2403 1727 #: assets/admin/index.js:1 2404 #: assets/admin/index.js:7 2405 #: assets/admin/index.js:8 1728 2406 msgid "Refresh" 1729 2407 msgstr "" 1730 2408 1731 #: assets/admin/index.js: 12409 #: assets/admin/index.js:7 1732 2410 msgid "Open tickets" 1733 2411 msgstr "" 1734 2412 1735 #: assets/admin/index.js: 12413 #: assets/admin/index.js:7 1736 2414 msgid "Customers cannot reach you yet" 1737 2415 msgstr "" 1738 2416 1739 #: assets/admin/index.js: 12417 #: assets/admin/index.js:7 1740 2418 msgid "The chat widget is off. Turn it on so customers can write to you from your store." 1741 2419 msgstr "" 1742 2420 1743 #: assets/admin/index.js: 12421 #: assets/admin/index.js:7 1744 2422 msgid "Set up the widget" 1745 2423 msgstr "" 1746 2424 1747 2425 #. translators: %s: how long 1748 #: assets/admin/index.js: 12426 #: assets/admin/index.js:7 1749 2427 #, js-format 1750 2428 msgid "oldest waiting %s" 1751 2429 msgstr "" 1752 2430 1753 #: assets/admin/index.js: 12431 #: assets/admin/index.js:7 1754 2432 msgid "nothing waiting" 1755 2433 msgstr "" 1756 2434 1757 #: assets/admin/index.js: 12435 #: assets/admin/index.js:7 1758 2436 msgid "waiting for the customer" 1759 2437 msgstr "" 1760 2438 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 1764 2443 msgid "Unassigned" 1765 2444 msgstr "" 1766 2445 1767 #: assets/admin/index.js: 12446 #: assets/admin/index.js:7 1768 2447 msgid "nobody owns these yet" 1769 2448 msgstr "" 1770 2449 1771 #: assets/admin/index.js: 12450 #: assets/admin/index.js:7 1772 2451 msgid "everything has an owner" 1773 2452 msgstr "" 1774 2453 1775 #: assets/admin/index.js: 12454 #: assets/admin/index.js:7 1776 2455 msgid "New, last 7 days" 1777 2456 msgstr "" 1778 2457 1779 2458 #. translators: %d: tickets 1780 #: assets/admin/index.js: 12459 #: assets/admin/index.js:7 1781 2460 #, js-format 1782 2461 msgid "%d ticket waiting now" … … 1785 2464 msgstr[1] "" 1786 2465 1787 #: assets/admin/index.js: 12466 #: assets/admin/index.js:7 1788 2467 msgid "all caught up" 1789 2468 msgstr "" 1790 2469 1791 #: assets/admin/index.js: 12470 #: assets/admin/index.js:7 1792 2471 msgid "New tickets, last 7 days" 1793 2472 msgstr "" 1794 2473 1795 #: assets/admin/index.js: 12474 #: assets/admin/index.js:7 1796 2475 msgid "Latest tickets" 1797 2476 msgstr "" 1798 2477 1799 #: assets/admin/index.js: 12478 #: assets/admin/index.js:7 1800 2479 msgid "View all" 1801 2480 msgstr "" 1802 2481 1803 #: assets/admin/index.js: 12482 #: assets/admin/index.js:7 1804 2483 msgid "No tickets yet. They show up here as soon as a customer writes in." 1805 2484 msgstr "" 1806 2485 1807 #: assets/admin/index.js: 12486 #: assets/admin/index.js:7 1808 2487 msgid "Setup and status" 1809 2488 msgstr "" 1810 2489 1811 #: assets/admin/index.js: 12490 #: assets/admin/index.js:7 1812 2491 msgid "Support widget" 1813 2492 msgstr "" 1814 2493 1815 #: assets/admin/index.js: 12494 #: assets/admin/index.js:7 1816 2495 msgid "Off: customers cannot start a ticket from your store." 1817 2496 msgstr "" 1818 2497 1819 #: assets/admin/index.js:1 2498 #: assets/admin/index.js:7 2499 #: assets/admin/index.js:13 1820 2500 msgid "On" 1821 2501 msgstr "" 1822 2502 1823 #: assets/admin/index.js:1 2503 #: assets/admin/index.js:7 2504 #: assets/admin/index.js:13 1824 2505 msgid "Off" 1825 2506 msgstr "" 1826 2507 1827 #: assets/admin/index.js: 12508 #: assets/admin/index.js:7 1828 2509 msgid "Privacy" 1829 2510 msgstr "" 1830 2511 1831 2512 #. translators: %d: days 1832 #: assets/admin/index.js: 12513 #: assets/admin/index.js:7 1833 2514 #, js-format 1834 2515 msgid "Tickets are kept for %d days." 1835 2516 msgstr "" 1836 2517 1837 #: assets/admin/index.js: 12518 #: assets/admin/index.js:7 1838 2519 msgid "Set" 1839 2520 msgstr "" 1840 2521 1841 #: assets/admin/index.js: 12522 #: assets/admin/index.js:7 1842 2523 msgid "Order storage" 1843 2524 msgstr "" 1844 2525 1845 #: assets/admin/index.js: 12526 #: assets/admin/index.js:7 1846 2527 msgid "Works with WooCommerce high-performance order storage." 1847 2528 msgstr "" 1848 2529 1849 #: assets/admin/index.js: 12530 #: assets/admin/index.js:7 1850 2531 msgid "Compatible" 1851 2532 msgstr "" 1852 2533 1853 #: assets/admin/index.js: 12534 #: assets/admin/index.js:7 1854 2535 msgid "Everything is stored in your own WordPress database. No outside account is needed." 1855 2536 msgstr "" 1856 2537 1857 #: assets/admin/index.js: 11858 #: assets/admin/index.js: 62538 #: assets/admin/index.js:7 2539 #: assets/admin/index.js:13 1859 2540 msgid "Data & Privacy" 1860 2541 msgstr "" 1861 2542 1862 #: assets/admin/index.js: 12543 #: assets/admin/index.js:7 1863 2544 msgid "Data minimization by default — sync only what agents need. Historical import stays off unless you opt in." 1864 2545 msgstr "" 1865 2546 1866 #: assets/admin/index.js: 12547 #: assets/admin/index.js:7 1867 2548 msgid "Customer fields" 1868 2549 msgstr "" 1869 2550 1870 #: assets/admin/index.js: 12551 #: assets/admin/index.js:7 1871 2552 msgid "Allow billing address sync" 1872 2553 msgstr "" 1873 2554 1874 #: assets/admin/index.js: 12555 #: assets/admin/index.js:7 1875 2556 msgid "Useful for shipping disputes. Off by default." 1876 2557 msgstr "" 1877 2558 1878 #: assets/admin/index.js: 12559 #: assets/admin/index.js:7 1879 2560 msgid "Allow phone number sync" 1880 2561 msgstr "" 1881 2562 1882 #: assets/admin/index.js: 12563 #: assets/admin/index.js:7 1883 2564 msgid "Only when agents need to call the customer." 1884 2565 msgstr "" 1885 2566 1886 #: assets/admin/index.js: 12567 #: assets/admin/index.js:7 1887 2568 msgid "Share diagnostics with consent" 1888 2569 msgstr "" 1889 2570 1890 #: assets/admin/index.js: 12571 #: assets/admin/index.js:7 1891 2572 msgid "Sanitized environment data only — never automatic full log upload." 1892 2573 msgstr "" 1893 2574 1894 #: assets/admin/index.js: 12575 #: assets/admin/index.js:7 1895 2576 msgid "Historical import" 1896 2577 msgstr "" 1897 2578 1898 #: assets/admin/index.js: 12579 #: assets/admin/index.js:7 1899 2580 msgid "Import window" 1900 2581 msgstr "" 1901 2582 1902 #: assets/admin/index.js: 12583 #: assets/admin/index.js:7 1903 2584 msgid "Off (recommended)" 1904 2585 msgstr "" 1905 2586 1906 #: assets/admin/index.js: 12587 #: assets/admin/index.js:7 1907 2588 msgid "Last 30 days" 1908 2589 msgstr "" 1909 2590 1910 #: assets/admin/index.js: 12591 #: assets/admin/index.js:7 1911 2592 msgid "Last 60 days" 1912 2593 msgstr "" 1913 2594 1914 #: assets/admin/index.js: 12595 #: assets/admin/index.js:7 1915 2596 msgid "Last 90 days" 1916 2597 msgstr "" 1917 2598 1918 #: assets/admin/index.js: 12599 #: assets/admin/index.js:7 1919 2600 msgid "Retention" 1920 2601 msgstr "" 1921 2602 1922 #: assets/admin/index.js: 12603 #: assets/admin/index.js:7 1923 2604 msgid "Synced context retention (days)" 1924 2605 msgstr "" 1925 2606 1926 #: assets/admin/index.js: 12607 #: assets/admin/index.js:7 1927 2608 msgid "WordPress privacy tools" 1928 2609 msgstr "" 1929 2610 1930 #: assets/admin/index.js: 12611 #: assets/admin/index.js:7 1931 2612 msgid "Deskovi registers a privacy-policy suggestion and ticket export/erase under Tools → Export/Erase Personal Data." 1932 2613 msgstr "" 1933 2614 1934 #: assets/admin/index.js: 11935 #: assets/admin/index.js: 62615 #: assets/admin/index.js:7 2616 #: assets/admin/index.js:13 1936 2617 msgid "Save failed." 1937 2618 msgstr "" 1938 2619 1939 #: assets/admin/index.js: 12620 #: assets/admin/index.js:7 1940 2621 msgid "Save privacy settings" 1941 2622 msgstr "" 1942 2623 1943 #: assets/admin/index.js: 12624 #: assets/admin/index.js:7 1944 2625 msgid "Request remote data deletion" 1945 2626 msgstr "" 1946 2627 1947 #: assets/admin/index.js:1 1948 #: assets/admin/index.js:6 2628 #: assets/admin/index.js:7 2629 msgid "Dropdown" 2630 msgstr "" 2631 2632 #: assets/admin/index.js:7 2633 msgid "Checkbox" 2634 msgstr "" 2635 2636 #: assets/admin/index.js:7 2637 msgid "Short text" 2638 msgstr "" 2639 2640 #: assets/admin/index.js:7 2641 msgid "Questions on the ticket form" 2642 msgstr "" 2643 2644 #: assets/admin/index.js:7 2645 msgid "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." 2646 msgstr "" 2647 2648 #: assets/admin/index.js:7 2649 msgid "No extra questions. The form asks only for a subject, category, order and message." 2650 msgstr "" 2651 2652 #: assets/admin/index.js:7 2653 msgid "Question" 2654 msgstr "" 2655 2656 #: assets/admin/index.js:7 2657 msgid "For example: Which phone model?" 2658 msgstr "" 2659 2660 #: assets/admin/index.js:7 2661 msgid "Answer type" 2662 msgstr "" 2663 2664 #: assets/admin/index.js:7 2665 msgid "Choices, one per line" 2666 msgstr "" 2667 2668 #: assets/admin/index.js:7 2669 msgid "Required" 2670 msgstr "" 2671 2672 #: assets/admin/index.js:7 2673 msgid "Customers can leave it unticked." 2674 msgstr "" 2675 2676 #: assets/admin/index.js:7 2677 msgid "Move up" 2678 msgstr "" 2679 2680 #: assets/admin/index.js:7 2681 msgid "Move down" 2682 msgstr "" 2683 2684 #: assets/admin/index.js:7 2685 msgid "Add a question" 2686 msgstr "" 2687 2688 #: assets/admin/index.js:7 2689 msgid "Form fields saved." 2690 msgstr "" 2691 2692 #: assets/admin/index.js:7 2693 msgid "Save questions" 2694 msgstr "" 2695 2696 #. translators: %d: maximum number of questions 2697 #: assets/admin/index.js:8 2698 #, js-format 2699 msgid "You can add up to %d questions." 2700 msgstr "" 2701 2702 #: assets/admin/index.js:8 2703 msgid "Answers from the ticket form" 2704 msgstr "" 2705 2706 #: assets/admin/index.js:8 2707 #: assets/admin/index.js:13 1949 2708 msgid "Urgent" 1950 2709 msgstr "" 1951 2710 1952 #: assets/admin/index.js: 11953 #: assets/admin/index.js: 62711 #: assets/admin/index.js:8 2712 #: assets/admin/index.js:13 1954 2713 msgid "High" 1955 2714 msgstr "" 1956 2715 1957 #: assets/admin/index.js: 11958 #: assets/admin/index.js: 62716 #: assets/admin/index.js:8 2717 #: assets/admin/index.js:13 1959 2718 msgid "Low" 1960 2719 msgstr "" 1961 2720 1962 #: assets/admin/index.js: 11963 #: assets/admin/index.js: 62721 #: assets/admin/index.js:8 2722 #: assets/admin/index.js:13 1964 2723 msgid "Normal" 1965 2724 msgstr "" 1966 2725 1967 #: assets/admin/index.js: 12726 #: assets/admin/index.js:8 1968 2727 msgid "View saved." 1969 2728 msgstr "" 1970 2729 1971 #: assets/admin/index.js: 12730 #: assets/admin/index.js:8 1972 2731 msgid "Ticket split." 1973 2732 msgstr "" 1974 2733 1975 #: assets/admin/index.js: 11976 #: assets/admin/index.js: 62734 #: assets/admin/index.js:8 2735 #: assets/admin/index.js:13 1977 2736 msgid "Tickets" 1978 2737 msgstr "" 1979 2738 1980 #: assets/admin/index.js: 12739 #: assets/admin/index.js:8 1981 2740 msgid "Tickets are created, replied to, and stored locally in your WordPress database." 1982 2741 msgstr "" 1983 2742 1984 #: assets/admin/index.js: 12743 #: assets/admin/index.js:8 1985 2744 msgid "Search tickets" 1986 2745 msgstr "" 1987 2746 1988 #: assets/admin/index.js: 12747 #: assets/admin/index.js:8 1989 2748 msgid "Search subject, name, or email…" 1990 2749 msgstr "" 1991 2750 1992 #: assets/admin/index.js: 12751 #: assets/admin/index.js:8 1993 2752 msgid "Export CSV" 1994 2753 msgstr "" 1995 2754 1996 #: assets/admin/index.js: 12755 #: assets/admin/index.js:8 1997 2756 msgid "All" 1998 2757 msgstr "" 1999 2758 2000 #: assets/admin/index.js: 12759 #: assets/admin/index.js:8 2001 2760 msgid "Assigned to me" 2002 2761 msgstr "" 2003 2762 2004 #: assets/admin/index.js: 12763 #: assets/admin/index.js:8 2005 2764 msgid "Any status" 2006 2765 msgstr "" 2007 2766 2008 #: assets/admin/index.js: 12767 #: assets/admin/index.js:8 2009 2768 msgid "Open or pending" 2010 2769 msgstr "" 2011 2770 2012 #: assets/admin/index.js: 12013 #: assets/admin/index.js: 62771 #: assets/admin/index.js:8 2772 #: assets/admin/index.js:13 2014 2773 msgid "Priority" 2015 2774 msgstr "" 2016 2775 2017 #: assets/admin/index.js: 12776 #: assets/admin/index.js:8 2018 2777 msgid "Any priority" 2019 2778 msgstr "" 2020 2779 2021 #: assets/admin/index.js: 12780 #: assets/admin/index.js:8 2022 2781 msgid "Any category" 2023 2782 msgstr "" 2024 2783 2025 #: assets/admin/index.js: 12784 #: assets/admin/index.js:8 2026 2785 msgid "Clear filters" 2027 2786 msgstr "" 2028 2787 2029 2788 #. translators: %s: view name 2030 #: assets/admin/index.js: 12789 #: assets/admin/index.js:8 2031 2790 #, js-format 2032 2791 msgid "Delete the view %s" 2033 2792 msgstr "" 2034 2793 2035 #: assets/admin/index.js: 12794 #: assets/admin/index.js:8 2036 2795 msgid "Choose a filter first" 2037 2796 msgstr "" 2038 2797 2039 #: assets/admin/index.js: 12798 #: assets/admin/index.js:8 2040 2799 msgid "Save this view" 2041 2800 msgstr "" 2042 2801 2043 #: assets/admin/index.js: 12802 #: assets/admin/index.js:8 2044 2803 msgid "Name, for example \"Urgent refunds\"" 2045 2804 msgstr "" 2046 2805 2047 2806 #. translators: 1: result count, 2: search query 2048 #: assets/admin/index.js: 22807 #: assets/admin/index.js:9 2049 2808 #, js-format 2050 2809 msgid "%1$d result(s) for \"%2$s\"" … … 2052 2811 2053 2812 #. translators: %d: total ticket count 2054 #: assets/admin/index.js: 32813 #: assets/admin/index.js:10 2055 2814 #, js-format 2056 2815 msgid "%d ticket(s) found" 2057 2816 msgstr "" 2058 2817 2059 #: assets/admin/index.js: 32818 #: assets/admin/index.js:10 2060 2819 msgid "Select all" 2061 2820 msgstr "" 2062 2821 2063 2822 #. translators: %d: number of selected tickets 2064 #: assets/admin/index.js: 42823 #: assets/admin/index.js:11 2065 2824 #, js-format 2066 2825 msgid "%d selected" 2067 2826 msgstr "" 2068 2827 2069 #: assets/admin/index.js: 42828 #: assets/admin/index.js:11 2070 2829 msgid "Status updated for selected tickets." 2071 2830 msgstr "" 2072 2831 2073 #: assets/admin/index.js: 42832 #: assets/admin/index.js:11 2074 2833 msgid "Set status…" 2075 2834 msgstr "" 2076 2835 2077 2836 #. translators: %d: number of tickets to delete 2078 #: assets/admin/index.js: 52837 #: assets/admin/index.js:12 2079 2838 #, js-format 2080 2839 msgid "Delete %d ticket(s)? This can't be undone." 2081 2840 msgstr "" 2082 2841 2083 #: assets/admin/index.js: 52842 #: assets/admin/index.js:12 2084 2843 msgid "Selected tickets deleted." 2085 2844 msgstr "" 2086 2845 2087 #: assets/admin/index.js: 52846 #: assets/admin/index.js:12 2088 2847 msgid "No tickets match this search/filter." 2089 2848 msgstr "" 2090 2849 2091 #: assets/admin/index.js: 52850 #: assets/admin/index.js:12 2092 2851 msgid "No tickets yet. Create one to test the bridge." 2093 2852 msgstr "" 2094 2853 2095 2854 #. translators: %s: ticket subject 2096 #: assets/admin/index.js: 52855 #: assets/admin/index.js:12 2097 2856 #, js-format 2098 2857 msgid "Select ticket: %s" 2099 2858 msgstr "" 2100 2859 2101 #: assets/admin/index.js: 52860 #: assets/admin/index.js:12 2102 2861 msgid "Prev" 2103 2862 msgstr "" 2104 2863 2105 2864 #. translators: 1: current page, 2: total pages 2106 #: assets/admin/index.js: 62865 #: assets/admin/index.js:13 2107 2866 #, js-format 2108 2867 msgid "Page %1$d of %2$d" 2109 2868 msgstr "" 2110 2869 2111 #: assets/admin/index.js:6 2112 msgid "Next" 2113 msgstr "" 2114 2115 #: assets/admin/index.js:6 2870 #: assets/admin/index.js:13 2116 2871 msgid "Order ID (optional)" 2117 2872 msgstr "" 2118 2873 2119 #: assets/admin/index.js: 62874 #: assets/admin/index.js:13 2120 2875 msgid "Ticket created." 2121 2876 msgstr "" 2122 2877 2123 #: assets/admin/index.js:6 2124 msgid "Creating…" 2125 msgstr "" 2126 2127 #: assets/admin/index.js:6 2878 #: assets/admin/index.js:13 2128 2879 msgid "Select a ticket or create a new one to exercise the bridge." 2129 2880 msgstr "" 2130 2881 2131 #: assets/admin/index.js: 62882 #: assets/admin/index.js:13 2132 2883 msgid "Order context" 2133 2884 msgstr "" 2134 2885 2135 #: assets/admin/index.js: 62886 #: assets/admin/index.js:13 2136 2887 msgid "Order" 2137 2888 msgstr "" 2138 2889 2139 #: assets/admin/index.js: 62890 #: assets/admin/index.js:13 2140 2891 msgid "Shipping" 2141 2892 msgstr "" 2142 2893 2143 #: assets/admin/index.js: 62894 #: assets/admin/index.js:13 2144 2895 msgid "Billing" 2145 2896 msgstr "" 2146 2897 2147 #: assets/admin/index.js: 62898 #: assets/admin/index.js:13 2148 2899 msgid "Phone" 2149 2900 msgstr "" 2150 2901 2151 #: assets/admin/index.js: 62902 #: assets/admin/index.js:13 2152 2903 msgid "Address/phone hidden by privacy settings." 2153 2904 msgstr "" 2154 2905 2155 #: assets/admin/index.js: 62906 #: assets/admin/index.js:13 2156 2907 msgid "Hide timeline" 2157 2908 msgstr "" 2158 2909 2159 #: assets/admin/index.js: 62910 #: assets/admin/index.js:13 2160 2911 msgid "Show timeline" 2161 2912 msgstr "" 2162 2913 2163 #: assets/admin/index.js: 62914 #: assets/admin/index.js:13 2164 2915 msgid "Refund" 2165 2916 msgstr "" 2166 2917 2167 #: assets/admin/index.js: 62918 #: assets/admin/index.js:13 2168 2919 msgid "Amount (leave blank for full remaining amount)" 2169 2920 msgstr "" 2170 2921 2171 #: assets/admin/index.js: 62922 #: assets/admin/index.js:13 2172 2923 msgid "Reason (optional)" 2173 2924 msgstr "" 2174 2925 2175 #: assets/admin/index.js: 62926 #: assets/admin/index.js:13 2176 2927 msgid "Enter a valid refund amount, or leave it blank for the full remaining amount." 2177 2928 msgstr "" 2178 2929 2179 #: assets/admin/index.js: 62930 #: assets/admin/index.js:13 2180 2931 msgid "Refund issued." 2181 2932 msgstr "" 2182 2933 2183 #: assets/admin/index.js: 62934 #: assets/admin/index.js:13 2184 2935 msgid "Processing…" 2185 2936 msgstr "" 2186 2937 2187 #: assets/admin/index.js: 62938 #: assets/admin/index.js:13 2188 2939 msgid "Issue refund" 2189 2940 msgstr "" 2190 2941 2191 #: assets/admin/index.js: 62942 #: assets/admin/index.js:13 2192 2943 msgid "Invoice email resent." 2193 2944 msgstr "" 2194 2945 2195 #: assets/admin/index.js: 62946 #: assets/admin/index.js:13 2196 2947 msgid "Resend invoice" 2197 2948 msgstr "" 2198 2949 2199 #: assets/admin/index.js: 62950 #: assets/admin/index.js:13 2200 2951 msgid "Order unlinked." 2201 2952 msgstr "" 2202 2953 2203 #: assets/admin/index.js: 62954 #: assets/admin/index.js:13 2204 2955 msgid "Unlink order" 2205 2956 msgstr "" 2206 2957 2207 #: assets/admin/index.js: 62958 #: assets/admin/index.js:13 2208 2959 msgid "No order linked. Enter a WooCommerce order ID to attach context." 2209 2960 msgstr "" 2210 2961 2211 #: assets/admin/index.js: 62962 #: assets/admin/index.js:13 2212 2963 msgid "Order linked." 2213 2964 msgstr "" 2214 2965 2215 #: assets/admin/index.js: 62966 #: assets/admin/index.js:13 2216 2967 msgid "Enter a valid order ID." 2217 2968 msgstr "" 2218 2969 2219 #: assets/admin/index.js: 62970 #: assets/admin/index.js:13 2220 2971 msgid "Linking…" 2221 2972 msgstr "" 2222 2973 2223 #: assets/admin/index.js: 62974 #: assets/admin/index.js:13 2224 2975 msgid "Link order" 2225 2976 msgstr "" 2226 2977 2227 #: assets/admin/index.js: 62978 #: assets/admin/index.js:13 2228 2979 msgid "Assigned to" 2229 2980 msgstr "" 2230 2981 2231 #: assets/admin/index.js: 62982 #: assets/admin/index.js:13 2232 2983 msgid "Assignment updated." 2233 2984 msgstr "" 2234 2985 2235 #: assets/admin/index.js: 62986 #: assets/admin/index.js:13 2236 2987 msgid "Priority updated." 2237 2988 msgstr "" 2238 2989 2239 #: assets/admin/index.js: 62990 #: assets/admin/index.js:13 2240 2991 msgid "Status updated." 2241 2992 msgstr "" 2242 2993 2243 #: assets/admin/index.js: 62994 #: assets/admin/index.js:13 2244 2995 msgid "Merge into another ticket…" 2245 2996 msgstr "" 2246 2997 2247 #: assets/admin/index.js: 62998 #: assets/admin/index.js:13 2248 2999 msgid "Find the ticket this one belongs to" 2249 3000 msgstr "" 2250 3001 2251 #: assets/admin/index.js: 63002 #: assets/admin/index.js:13 2252 3003 msgid "No other tickets found. Try a subject, a name or an email." 2253 3004 msgstr "" 2254 3005 2255 3006 #. translators: 1: this ticket, 2: the ticket it goes into 2256 #: assets/admin/index.js: 63007 #: assets/admin/index.js:13 2257 3008 #, js-format 2258 3009 msgid "Move all messages and files of \"%1$s\" into \"%2$s\" and delete \"%1$s\"? This cannot be undone. Nobody is emailed." 2259 3010 msgstr "" 2260 3011 2261 #: assets/admin/index.js: 63012 #: assets/admin/index.js:13 2262 3013 msgid "Tickets merged." 2263 3014 msgstr "" 2264 3015 2265 #: assets/admin/index.js: 63016 #: assets/admin/index.js:13 2266 3017 msgid "Merge into this" 2267 3018 msgstr "" 2268 3019 2269 #: assets/admin/index.js: 63020 #: assets/admin/index.js:13 2270 3021 msgid "internal" 2271 3022 msgstr "" 2272 3023 2273 #: assets/admin/index.js: 63024 #: assets/admin/index.js:13 2274 3025 msgid "Split into a new ticket from here…" 2275 3026 msgstr "" 2276 3027 2277 #: assets/admin/index.js: 63028 #: assets/admin/index.js:13 2278 3029 msgid "This message and every message after it move to a new ticket. Nobody is emailed. Subject of the new ticket:" 2279 3030 msgstr "" 2280 3031 2281 #: assets/admin/index.js: 63032 #: assets/admin/index.js:13 2282 3033 msgid "Split ticket" 2283 3034 msgstr "" 2284 3035 2285 #: assets/admin/index.js: 63036 #: assets/admin/index.js:13 2286 3037 msgid "is too large (max 5 MB)." 2287 3038 msgstr "" 2288 3039 2289 #: assets/admin/index.js: 63040 #: assets/admin/index.js:13 2290 3041 msgid "is not an allowed type (jpg, jpeg, png, gif, webp, pdf, txt)." 2291 3042 msgstr "" 2292 3043 2293 #: assets/admin/index.js: 63044 #: assets/admin/index.js:13 2294 3045 msgid "Remove file" 2295 3046 msgstr "" 2296 3047 2297 #: assets/admin/index.js: 63048 #: assets/admin/index.js:13 2298 3049 msgid "Internal note (not visible to customer)" 2299 3050 msgstr "" 2300 3051 2301 #: assets/admin/index.js: 63052 #: assets/admin/index.js:13 2302 3053 msgid "Reply sent." 2303 3054 msgstr "" 2304 3055 2305 #: assets/admin/index.js: 63056 #: assets/admin/index.js:13 2306 3057 msgid "Uploading files…" 2307 3058 msgstr "" 2308 3059 2309 #: assets/admin/index.js: 63060 #: assets/admin/index.js:13 2310 3061 msgid "Sending…" 2311 3062 msgstr "" 2312 3063 2313 #: assets/admin/index.js: 63064 #: assets/admin/index.js:13 2314 3065 msgid "Send reply" 2315 3066 msgstr "" 2316 3067 2317 #: assets/admin/index.js: 63068 #: assets/admin/index.js:13 2318 3069 msgid "Attach file" 2319 3070 msgstr "" 2320 3071 2321 #: assets/admin/index.js: 63072 #: assets/admin/index.js:13 2322 3073 msgid "Attach" 2323 3074 msgstr "" 2324 3075 2325 #: assets/admin/index.js: 63076 #: assets/admin/index.js:13 2326 3077 msgid "Insert canned reply" 2327 3078 msgstr "" 2328 3079 2329 #: assets/admin/index.js: 63080 #: assets/admin/index.js:13 2330 3081 msgid "Insert canned reply…" 2331 3082 msgstr "" 2332 3083 2333 #: assets/admin/index.js: 63084 #: assets/admin/index.js:13 2334 3085 msgid "Widget" 2335 3086 msgstr "" 2336 3087 2337 #: assets/admin/index.js: 63088 #: assets/admin/index.js:13 2338 3089 msgid "Theme-safe launcher with lazy load after interaction — not another always-on chat bubble that taxes every page view." 2339 3090 msgstr "" 2340 3091 2341 #: assets/admin/index.js: 63092 #: assets/admin/index.js:13 2342 3093 msgid "Storefront launcher" 2343 3094 msgstr "" 2344 3095 2345 #: assets/admin/index.js: 63096 #: assets/admin/index.js:13 2346 3097 msgid "Loads on storefront (skips checkout)" 2347 3098 msgstr "" 2348 3099 2349 #: assets/admin/index.js: 63100 #: assets/admin/index.js:13 2350 3101 msgid "No frontend assets" 2351 3102 msgstr "" 2352 3103 2353 #: assets/admin/index.js: 63104 #: assets/admin/index.js:13 2354 3105 msgid "Enable support widget" 2355 3106 msgstr "" 2356 3107 2357 #: assets/admin/index.js: 63108 #: assets/admin/index.js:13 2358 3109 msgid "When off, Deskovi adds zero scripts on the storefront. When on, a lazy launcher appears (not on cart/checkout)." 2359 3110 msgstr "" 2360 3111 2361 #: assets/admin/index.js: 63112 #: assets/admin/index.js:13 2362 3113 msgid "Placement" 2363 3114 msgstr "" 2364 3115 2365 #: assets/admin/index.js: 63116 #: assets/admin/index.js:13 2366 3117 msgid "Bottom right" 2367 3118 msgstr "" 2368 3119 2369 #: assets/admin/index.js: 63120 #: assets/admin/index.js:13 2370 3121 msgid "Bottom left" 2371 3122 msgstr "" 2372 3123 2373 #: assets/admin/index.js: 63124 #: assets/admin/index.js:13 2374 3125 msgid "Theme" 2375 3126 msgstr "" 2376 3127 2377 #: assets/admin/index.js: 63128 #: assets/admin/index.js:13 2378 3129 msgid "System" 2379 3130 msgstr "" 2380 3131 2381 #: assets/admin/index.js: 63132 #: assets/admin/index.js:13 2382 3133 msgid "Light" 2383 3134 msgstr "" 2384 3135 2385 #: assets/admin/index.js: 63136 #: assets/admin/index.js:13 2386 3137 msgid "Dark" 2387 3138 msgstr "" 2388 3139 2389 #: assets/admin/index.js: 63140 #: assets/admin/index.js:13 2390 3141 msgid "Launcher button label" 2391 3142 msgstr "" 2392 3143 2393 #: assets/admin/index.js: 63144 #: assets/admin/index.js:13 2394 3145 msgid "Leave empty to show an icon-only button. Add a short label like 'Chat with us' if you want text next to the icon." 2395 3146 msgstr "" 2396 3147 2397 #: assets/admin/index.js: 63148 #: assets/admin/index.js:13 2398 3149 msgid "Live behavior" 2399 3150 msgstr "" 2400 3151 2401 #: assets/admin/index.js: 63152 #: assets/admin/index.js:13 2402 3153 msgid "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." 2403 3154 msgstr "" 2404 3155 2405 #: assets/admin/index.js:6 3156 #: assets/admin/index.js:13 3157 msgid "My Account" 3158 msgstr "" 3159 3160 #: assets/admin/index.js:13 3161 msgid "Support tab and \"Get help\" on orders" 3162 msgstr "" 3163 3164 #: assets/admin/index.js:13 3165 msgid "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." 3166 msgstr "" 3167 3168 #: assets/admin/index.js:13 3169 msgid "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." 3170 msgstr "" 3171 3172 #: assets/admin/index.js:13 3173 msgid "Suggest help articles while the customer writes" 3174 msgstr "" 3175 3176 #: assets/admin/index.js:13 3177 msgid "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." 3178 msgstr "" 3179 3180 #: assets/admin/index.js:13 2406 3181 msgid "Save widget settings" 2407 3182 msgstr "" 2408 3183 2409 #: assets/admin/index.js: 63184 #: assets/admin/index.js:13 2410 3185 msgid "Work" 2411 3186 msgstr "" 2412 3187 2413 #: assets/admin/index.js: 63188 #: assets/admin/index.js:13 2414 3189 msgid "Insights" 2415 3190 msgstr "" 2416 3191 2417 #: assets/admin/index.js: 63192 #: assets/admin/index.js:13 2418 3193 msgid "Automate" 2419 3194 msgstr "" 2420 3195 2421 #: assets/admin/index.js: 63196 #: assets/admin/index.js:13 2422 3197 msgid "Channels" 2423 3198 msgstr "" 2424 3199 2425 #: assets/admin/index.js:6 2426 msgid "Settings" 2427 msgstr "" 2428 2429 #: assets/admin/index.js:6 3200 #: assets/admin/index.js:13 2430 3201 msgid "Failed to load Deskovi admin data." 2431 3202 msgstr "" 2432 3203 2433 #: assets/admin/index.js: 63204 #: assets/admin/index.js:13 2434 3205 msgid "Widget settings saved." 2435 3206 msgstr "" 2436 3207 2437 #: assets/admin/index.js: 63208 #: assets/admin/index.js:13 2438 3209 msgid "Privacy settings saved." 2439 3210 msgstr "" 2440 3211 2441 #: assets/admin/index.js: 63212 #: assets/admin/index.js:13 2442 3213 msgid "Deskovi sections" 2443 3214 msgstr "" -
deskovi/trunk/readme.txt
r3803408 r3843768 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1. 5.07 Stable tag: 1.6.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 24 24 * CSV export of tickets (respects the current search/filter) 25 25 * 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 26 32 * Configurable email notifications for ticket events 27 33 * Optional customer chat widget on the storefront … … 57 63 = How do I remove the chat widget? = 58 64 59 Disable the widget from the Deskovi admin settings. When the widget is off, storefront assets are not loaded. 65 Disable 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 69 Yes. 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 73 Yes. 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 77 Help 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. 60 78 61 79 = How do privacy requests work? = … … 84 102 85 103 == 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 86 118 87 119 = 1.5.0 = … … 141 173 == Upgrade Notice == 142 174 175 = 1.6.0 = 176 Adds 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 143 178 = 1.5.0 = 144 179 Adds 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 27 27 'itsdesk_tickets_db_version', 28 28 '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', 29 36 ); 30 37
Note:
See TracChangeset
for help on using the changeset viewer.