@siteping/widget 0.10.8 → 0.10.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-BJFC7TVL.cjs → chunk-AFLWWD6M.cjs} +2 -2
- package/dist/chunk-AFLWWD6M.cjs.map +1 -0
- package/dist/{chunk-4CK3N4YE.js → chunk-ATTI2TS4.js} +2 -2
- package/dist/chunk-ATTI2TS4.js.map +1 -0
- package/dist/{chunk-EYISG4OI.js → chunk-BP5TH2CD.js} +2 -2
- package/dist/chunk-BP5TH2CD.js.map +1 -0
- package/dist/{chunk-OK2KX3KN.cjs → chunk-OSADAHGS.cjs} +2 -2
- package/dist/chunk-OSADAHGS.cjs.map +1 -0
- package/dist/index.cjs +30 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.global.js +107 -119
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/{panel-KCYUMYAI.cjs → panel-2FEECS2N.cjs} +2 -2
- package/dist/{panel-KCYUMYAI.cjs.map → panel-2FEECS2N.cjs.map} +1 -1
- package/dist/{panel-LYS3425X.cjs → panel-CSFFA5FF.cjs} +2 -2
- package/dist/{panel-LYS3425X.cjs.map → panel-CSFFA5FF.cjs.map} +1 -1
- package/dist/{panel-W2LHYGFS.js → panel-S2UR5BSD.js} +2 -2
- package/dist/{panel-W2LHYGFS.js.map → panel-S2UR5BSD.js.map} +1 -1
- package/dist/{panel-KV2AQHC2.js → panel-SGSUHR7V.js} +2 -2
- package/dist/{panel-KV2AQHC2.js.map → panel-SGSUHR7V.js.map} +1 -1
- package/dist/react.cjs +30 -30
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +3 -3
- package/dist/react.js.map +1 -1
- package/dist/types.d.cts +2 -2
- package/dist/types.d.ts +2 -2
- package/package.json +2 -2
- package/dist/chunk-4CK3N4YE.js.map +0 -1
- package/dist/chunk-BJFC7TVL.cjs.map +0 -1
- package/dist/chunk-EYISG4OI.js.map +0 -1
- package/dist/chunk-OK2KX3KN.cjs.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkBJFC7TVL_cjs=require('./chunk-BJFC7TVL.cjs');var M=class{element;current;opts;onChange;datasetKey;constructor(e){this.opts=e.options,this.current=e.value,this.onChange=e.onChange,this.datasetKey=e.datasetKey,this.element=chunkBJFC7TVL_cjs.n("div",{class:`sp-segmented${e.extraClass?` ${e.extraClass}`:""}`,role:"radiogroup"}),this.element.setAttribute("aria-label",e.ariaLabel);for(let t of this.opts){let s=document.createElement("button");s.type="button",s.className=e.modifierPrefix!==void 0?`sp-segmented__btn ${e.modifierPrefix}${t.value}`:"sp-segmented__btn",s.dataset[this.datasetKey]=t.value,s.setAttribute("role","radio");let n=this.current===t.value;if(s.setAttribute("aria-checked",String(n)),s.tabIndex=n?0:-1,n&&s.classList.add("sp-segmented__btn--active"),t.color&&s.style.setProperty("--sp-chip-color",t.color),t.bg&&s.style.setProperty("--sp-chip-bg",t.bg),t.icon){let a=chunkBJFC7TVL_cjs.n("span",{class:"sp-segmented__icon"});a.appendChild(chunkBJFC7TVL_cjs.m(t.icon)),s.appendChild(a);}let o=chunkBJFC7TVL_cjs.n("span",{class:"sp-segmented__label"});chunkBJFC7TVL_cjs.o(o,t.label),s.appendChild(o),s.addEventListener("click",()=>this.select(t.value)),s.addEventListener("keydown",a=>this.handleKey(a,t.value)),this.element.appendChild(s);}}select(e){this.current=e,this.syncSelection(),this.onChange(e);}syncSelection(){let e=this.element.querySelectorAll(".sp-segmented__btn");for(let t of e){let s=t.dataset[this.datasetKey]===this.current;t.classList.toggle("sp-segmented__btn--active",s),t.setAttribute("aria-checked",String(s)),t.tabIndex=s?0:-1;}}setOptionVisible(e,t){let s=this.element.querySelector(`[data-${this.kebabKey()}="${e}"]`);return s?(s.style.display=t?"":"none",true):false}get value(){return this.current}focusOption(e){this.element.querySelector(`[data-${this.kebabKey()}="${e}"]`)?.focus();}handleKey(e,t){let s=this.opts.map(d=>d.value).filter(d=>{let c=this.element.querySelector(`[data-${this.kebabKey()}="${d}"]`);return c!==null&&c.style.display!=="none"}),n=s.indexOf(t);if(n<0)return;let o;switch(e.key){case "ArrowLeft":o=(n-1+s.length)%s.length;break;case "ArrowRight":o=(n+1)%s.length;break;case "Home":o=0;break;case "End":o=s.length-1;break;default:return}e.preventDefault();let a=s[o];a!==void 0&&(this.select(a),this.focusOption(a));}kebabKey(){return this.datasetKey.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}};var me=chunkBJFC7TVL_cjs.e.filter(O=>!chunkBJFC7TVL_cjs.g(O)),ue=class{constructor(e,t,s,n,o,a,d,c,b){this.colors=t;this.bus=s;this.client=n;this.projectName=o;this.markers=a;this.t=d;this.locale=c;this.shadowRoot=e,this.getScope=b?.getScope??(()=>({url:window.location.pathname,urlPattern:null})),this.scopeAnnotationsByUrl=b?.scopeAnnotationsByUrl??true,this.root=chunkBJFC7TVL_cjs.n("div",{class:"sp-panel"}),this.root.setAttribute("role","complementary"),this.root.setAttribute("aria-label",this.t("panel.ariaLabel")),this.root.setAttribute("aria-hidden","true");let m=chunkBJFC7TVL_cjs.n("div",{class:"sp-panel-header"}),p=chunkBJFC7TVL_cjs.n("span",{class:"sp-panel-title"});chunkBJFC7TVL_cjs.o(p,this.t("panel.title")),this.closeBtn=document.createElement("button"),this.closeBtn.className="sp-panel-close",this.closeBtn.setAttribute("aria-label",this.t("panel.close")),this.closeBtn.appendChild(chunkBJFC7TVL_cjs.m(chunkBJFC7TVL_cjs.u)),this.closeBtn.addEventListener("click",()=>this.close()),this.deleteAllBtn=document.createElement("button"),this.deleteAllBtn.className="sp-btn-delete-all",this.deleteAllBtn.setAttribute("aria-label",this.t("panel.deleteAll")),this.deleteAllBtn.appendChild(chunkBJFC7TVL_cjs.m(chunkBJFC7TVL_cjs.F));let y=document.createElement("span");chunkBJFC7TVL_cjs.o(y,` ${this.t("panel.deleteAll")}`),this.deleteAllBtn.appendChild(y),this.deleteAllBtn.addEventListener("click",()=>this.confirmDeleteAll()),this.exportBtn=new chunkBJFC7TVL_cjs.V(t,()=>this.feedbacks,this.t);let C=chunkBJFC7TVL_cjs.n("div",{class:"sp-panel-header-right"});C.appendChild(this.exportBtn.element),C.appendChild(this.deleteAllBtn),C.appendChild(this.closeBtn),m.appendChild(p),m.appendChild(C),this.stats=new chunkBJFC7TVL_cjs.ea(t,this.t);let k=chunkBJFC7TVL_cjs.n("div",{class:"sp-filters"}),T=chunkBJFC7TVL_cjs.n("div",{class:"sp-search-wrap"}),f=chunkBJFC7TVL_cjs.m(chunkBJFC7TVL_cjs.v);f.setAttribute("class","sp-search-icon"),this.searchInput=document.createElement("input"),this.searchInput.type="text",this.searchInput.className="sp-search",this.searchInput.placeholder=this.t("panel.search"),this.searchInput.setAttribute("aria-label",this.t("panel.searchAria")),this.searchInput.addEventListener("input",()=>{this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>this.loadFeedbacks().catch(()=>{}),200);}),T.appendChild(f),T.appendChild(this.searchInput);let L=chunkBJFC7TVL_cjs.n("div",{class:"sp-filter-bar"});L.appendChild(this.buildTypeDropdown()),L.appendChild(this.buildStatusSegmented()),L.appendChild(this.buildScopeSegmented()),this.sortControls=new chunkBJFC7TVL_cjs.ba(t,()=>this.renderList(),this.t),k.appendChild(T),k.appendChild(L),k.appendChild(this.sortControls.element),this.listContainer=chunkBJFC7TVL_cjs.n("div",{class:"sp-list"}),this.listContainer.setAttribute("role","list"),this.listContainer.setAttribute("aria-label",this.t("panel.feedbackList")),this.bulk=new chunkBJFC7TVL_cjs.X(t,{onResolve:i=>this.bulkResolve(i),onDelete:i=>this.bulkDelete(i)},this.t),this.bulk.setListContainer(this.listContainer),this.detail=new chunkBJFC7TVL_cjs.Z(t,{onBack:()=>this.detail.hide(),onResolve:async i=>{try{let r=!chunkBJFC7TVL_cjs.g(i.status);await this.client.resolveFeedback(i.id,r),await this.loadFeedbacks(),this.detail.hide();}catch(r){throw this.bus.emit("feedback:error",r instanceof Error?r:new Error(String(r))),r}},onDelete:async i=>{try{await this.client.deleteFeedback(i.id),this.bus.emit("feedback:deleted",i.id),await this.loadFeedbacks(),this.detail.hide();}catch(r){throw this.bus.emit("feedback:error",r instanceof Error?r:new Error(String(r))),r}},onGoToAnnotation:i=>{if(i.annotations.length>0){let r=i.annotations[0];if(!r)return;window.scrollTo({left:r.scrollX,top:r.scrollY,behavior:"smooth"}),this.markers.pinHighlight(i);}}},this.t,c),this.shortcuts=new chunkBJFC7TVL_cjs.ia(t,{onNavigate:i=>{let r=chunkBJFC7TVL_cjs.fa(this.listContainer);chunkBJFC7TVL_cjs.ga(this.listContainer,i==="down"?r+1:r-1);},onResolve:()=>{let i=this.getFocusedFeedback();if(i&&!this.pendingMutations.has(i.id)){let u=this.listContainer.querySelector(`[data-feedback-id="${CSS.escape(i.id)}"]`)?.querySelector('[data-action="resolve"]');u&&this.toggleResolve(i,u).catch(()=>{});}},onDelete:()=>{let i=this.getFocusedFeedback();if(i&&!this.pendingMutations.has(i.id)){let u=this.listContainer.querySelector(`[data-feedback-id="${CSS.escape(i.id)}"]`)?.querySelector('[data-action="delete"]');u&&this.deleteFeedback(i,u).catch(()=>{});}},onFocusSearch:()=>this.searchInput.focus(),onToggleSelect:()=>{let i=this.getFocusedFeedback();i&&this.bulk.toggle(i.id);}},this.t),this.root.appendChild(m),this.root.appendChild(this.stats.element),this.root.appendChild(k),this.root.appendChild(this.listContainer),this.root.appendChild(this.bulk.barElement),this.root.appendChild(this.detail.element),this.root.appendChild(this.shortcuts.helpOverlay),this.root.appendChild(this.shortcuts.hintButton),e.appendChild(this.root),this.onListClick=i=>{let r=i.target;if(r.closest(".sp-bulk-checkbox"))return;let u=r.closest("[data-action]");if(u){i.stopPropagation();let A=u.closest(".sp-card");if(!A)return;let w=A.dataset.feedbackId,g=this.feedbacks.find(E=>E.id===w);if(!g)return;let B=u.dataset.action;if(B==="expand"){let E=A.querySelector(".sp-card-message");if(!E)return;let R=E.classList.toggle("sp-card-message--expanded");chunkBJFC7TVL_cjs.o(u,R?this.t("panel.showLess"):this.t("panel.showMore")),u.setAttribute("aria-expanded",String(R));}else if(B==="resolve"){if(this.pendingMutations.has(g.id))return;let E=u;this.toggleResolve(g,E).catch(()=>{});}else if(B==="delete"){if(this.pendingMutations.has(g.id))return;let E=u;this.deleteFeedback(g,E).catch(()=>{});}return}let v=r.closest(".sp-card");if(v){let A=v.dataset.feedbackId,w=this.feedbacks.find(g=>g.id===A);if(w){let g=this.feedbacks.indexOf(w)+1;this.detail.show(w,g);}}},this.listContainer.addEventListener("click",this.onListClick),this.onListKeydown=i=>{let r=i;if(r.key!=="Enter"&&r.key!==" ")return;let u=r.target,v=u.closest(".sp-card");if(!v||u!==v)return;r.preventDefault();let A=v.dataset.feedbackId,w=this.feedbacks.find(g=>g.id===A);if(w){let g=this.feedbacks.indexOf(w)+1;this.detail.show(w,g);}},this.listContainer.addEventListener("keydown",this.onListKeydown),this.onListMouseover=i=>{let u=i.target.closest(".sp-card");if(!u)return;let v=u.dataset.feedbackId;v&&this.markers.highlight(v);},this.listContainer.addEventListener("mouseover",this.onListMouseover),this.onListMouseout=i=>{let r=i.relatedTarget;r&&this.listContainer.contains(r)||this.markers.highlight("");},this.listContainer.addEventListener("mouseout",this.onListMouseout),this.bus.on("panel:toggle",i=>{i?this.open():this.close();}),e.addEventListener("keydown",i=>{let r=i;if(r.key==="Escape"&&this.isOpen){if(this.detail.isVisible){this.detail.hide();return}this.close();return}if(r.key==="Tab"&&this.isOpen){let u=B=>{let E=B;for(;E&&E!==this.root;){if(E.style.display==="none")return false;E=E.parentElement;}return true},v=Array.from(this.root.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(B=>u(B)&&!B.hasAttribute("disabled"));if(v.length===0)return;let A=v[0],w=v[v.length-1];if(!A||!w)return;let g=e.activeElement;r.shiftKey&&g===A?(r.preventDefault(),w.focus()):!r.shiftKey&&g===w&&(r.preventDefault(),A.focus());}}),this.onMarkerClick=(i=>{this.scrollToFeedback(i.detail.feedbackId);}),document.addEventListener("sp-marker-click",this.onMarkerClick);}colors;bus;client;projectName;markers;t;locale;root;listContainer;searchInput;closeBtn;deleteAllBtn;activeFilters=new Set(["all"]);typeDropdownBtn;typeDropdownContainer;typeDropdownMenu=null;typeDropdownOutsideHandler=null;statusSegmented;typeOptions;feedbacks=[];currentPage=1;totalFeedbacks=0;isLoadingMore=false;isOpen=false;searchTimeout=null;loadController=null;pendingMutations=new Set;stats;sortControls;bulk;exportBtn;shortcuts;detail;shadowRoot;getScope;scopeAnnotationsByUrl;scopeSegmented;initialScopeFilter="this";onMarkerClick;onListClick;onListKeydown;onListMouseover;onListMouseout;async open(){this.isOpen||(this.isOpen=true,this.root.classList.add("sp-panel--open"),this.root.setAttribute("aria-hidden","false"),this.bus.emit("open"),this.shortcuts.enable(this.shadowRoot),await this.loadFeedbacks(),requestAnimationFrame(()=>{this.searchInput?this.searchInput.focus():this.closeBtn.focus();}));}close(){if(!this.isOpen)return;this.isOpen=false,this.root.classList.remove("sp-panel--open"),this.root.setAttribute("aria-hidden","true"),this.bus.emit("close"),this.shortcuts.disable(),this.detail.hide(),this.root.getRootNode().querySelector(".sp-fab")?.focus();}showLoading(){this.listContainer.replaceChildren();let e=chunkBJFC7TVL_cjs.n("div",{class:"sp-loading"});e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-label",this.t("panel.loading"));let t=chunkBJFC7TVL_cjs.n("div",{class:"sp-spinner"});e.appendChild(t),this.listContainer.appendChild(e);}showError(){this.listContainer.replaceChildren();let e=chunkBJFC7TVL_cjs.n("div",{class:"sp-empty"});e.setAttribute("role","status"),e.setAttribute("aria-live","polite");let t=chunkBJFC7TVL_cjs.n("div",{class:"sp-empty-text"});chunkBJFC7TVL_cjs.o(t,this.t("panel.loadError"));let s=document.createElement("button");s.className="sp-btn-ghost",s.style.marginTop="8px",chunkBJFC7TVL_cjs.o(s,this.t("panel.retry")),s.addEventListener("click",()=>this.loadFeedbacks().catch(()=>{})),e.appendChild(t),e.appendChild(s),this.listContainer.appendChild(e);}statusBucket(e){if(e!=="all")return chunkBJFC7TVL_cjs.g(e)?chunkBJFC7TVL_cjs.f:me}async loadFeedbacks(){this.loadController?.abort(),this.loadController=new AbortController;let{signal:e}=this.loadController;this.currentPage=1;let t=this.searchInput.value.trim()||void 0,s=this.activeFilters.has("all")?void 0:Array.from(this.activeFilters)[0],n=this.statusBucket(this.statusSegmented.value),o=this.getScope();this.syncScopeAvailability();let a=this.scopeSegmented.value,d={page:1,limit:20};s&&(d.type=s),n&&(d.statuses=n),t&&(d.search=t),a==="this"?d.url=o.url:a==="template"&&o.urlPattern&&(d.urlPattern=o.urlPattern);let c=this.feedbacks.length>0;c||this.showLoading();try{let{feedbacks:b,total:m}=await this.client.getFeedbacks(this.projectName,d);if(e.aborted)return;this.feedbacks=b,this.totalFeedbacks=m,this.stats.update(b,m),this.bulk.reset(),this.renderList();let p=this.scopeAnnotationsByUrl?b.filter(y=>y.url===o.url):b;this.markers.render(p);}catch(b){if(e.aborted)return;c||this.showError(),this.bus.emit("feedback:error",b instanceof Error?b:new Error(String(b)));}}async loadMoreFeedbacks(){if(this.isLoadingMore)return;this.isLoadingMore=true;let e=this.loadController,t=this.currentPage+1,s=this.searchInput.value.trim()||void 0,n=this.activeFilters.has("all")?void 0:Array.from(this.activeFilters)[0],o=this.statusBucket(this.statusSegmented.value),a=this.getScope(),d=this.scopeSegmented.value,c={page:t,limit:20};n&&(c.type=n),o&&(c.statuses=o),s&&(c.search=s),d==="this"?c.url=a.url:d==="template"&&a.urlPattern&&(c.urlPattern=a.urlPattern);let b=this.listContainer.querySelector(".sp-btn-load-more"),m;b&&(m=chunkBJFC7TVL_cjs.p(b));try{let{feedbacks:p,total:y}=await this.client.getFeedbacks(this.projectName,c);if(e!==this.loadController)return;this.currentPage=t,this.totalFeedbacks=y,this.feedbacks=[...this.feedbacks,...p],this.stats.update(this.feedbacks,y),this.renderList();let C=this.scopeAnnotationsByUrl?this.feedbacks.filter(k=>k.url===a.url):this.feedbacks;this.markers.render(C);}catch(p){m&&m(),this.bus.emit("feedback:error",p instanceof Error?p:new Error(String(p)));}finally{this.isLoadingMore=false;}}renderList(){if(this.listContainer.replaceChildren(),this.feedbacks.length===0){let o=chunkBJFC7TVL_cjs.n("div",{class:"sp-empty"});o.setAttribute("role","status"),o.setAttribute("aria-live","polite");let a=chunkBJFC7TVL_cjs.n("div",{class:"sp-empty-text"});chunkBJFC7TVL_cjs.o(a,this.t("panel.empty")),o.appendChild(a),this.listContainer.appendChild(o);return}let e=chunkBJFC7TVL_cjs._(this.feedbacks,this.sortControls.sortMode),t=e.map(o=>o.id),s=this.bulk.createSelectAllBar(t,this.t("bulk.selectAll"));if(this.listContainer.appendChild(s),this.sortControls.groupByPage){let o=chunkBJFC7TVL_cjs.$(e),a=0;for(let[d,c]of o){let b=chunkBJFC7TVL_cjs.aa(d,c.length,this.colors);this.listContainer.appendChild(b);let m=chunkBJFC7TVL_cjs.n("div",{class:"sp-group-content"});for(let p of c){let y=this.createCard(p,a+1);y.style.setProperty("--sp-card-i",String(a)),m.appendChild(y),a++;}this.listContainer.appendChild(m);}}else e.forEach((o,a)=>{let d=this.createCard(o,a+1);d.style.setProperty("--sp-card-i",String(a)),this.listContainer.appendChild(d);});let n=this.totalFeedbacks-this.feedbacks.length;if(n>0){let o=chunkBJFC7TVL_cjs.n("div",{class:"sp-load-more-wrap"}),a=document.createElement("button");a.className="sp-btn-ghost sp-btn-load-more",chunkBJFC7TVL_cjs.o(a,chunkBJFC7TVL_cjs.R(this.t,"panel.loadMore",{remaining:n})),a.addEventListener("click",()=>this.loadMoreFeedbacks().catch(()=>{})),o.appendChild(a),this.listContainer.appendChild(o);}}createCard(e,t){let s=chunkBJFC7TVL_cjs.g(e.status),n=chunkBJFC7TVL_cjs.J(e.type,this.colors),o=chunkBJFC7TVL_cjs.n("div",{class:`sp-card ${s?"sp-card--resolved":""}`});o.setAttribute("role","listitem"),o.setAttribute("tabindex","0"),o.setAttribute("aria-label",`Feedback #${t}: ${chunkBJFC7TVL_cjs.S(e.type,this.t)} \u2014 ${e.message.slice(0,80)}`),o.dataset.feedbackId=e.id;let a=chunkBJFC7TVL_cjs.n("div",{class:"sp-card-bar"});a.style.background=s?"#9ca3af":n;let d=chunkBJFC7TVL_cjs.n("div",{class:"sp-card-body"}),c=chunkBJFC7TVL_cjs.n("div",{class:"sp-card-header"}),b=this.bulk.createCheckbox(e.id);c.appendChild(b);let m=chunkBJFC7TVL_cjs.n("span",{class:"sp-card-number"});chunkBJFC7TVL_cjs.o(m,`#${t}`);let p=chunkBJFC7TVL_cjs.n("span",{class:"sp-badge"}),y=chunkBJFC7TVL_cjs.M(e.type,this.colors);p.style.background=y,p.style.color=n,chunkBJFC7TVL_cjs.o(p,chunkBJFC7TVL_cjs.S(e.type,this.t));let C=chunkBJFC7TVL_cjs.n("span",{class:"sp-badge sp-badge--status"});C.dataset.status=e.status,C.style.background=chunkBJFC7TVL_cjs.L(e.status,this.colors),C.style.color=chunkBJFC7TVL_cjs.K(e.status,this.colors),chunkBJFC7TVL_cjs.o(C,chunkBJFC7TVL_cjs.T(e.status,this.t));let k=chunkBJFC7TVL_cjs.n("span",{class:"sp-card-date"});chunkBJFC7TVL_cjs.o(k,chunkBJFC7TVL_cjs.q(e.createdAt,this.locale)),c.appendChild(m),c.appendChild(p),c.appendChild(C),c.appendChild(k);let T=chunkBJFC7TVL_cjs.n("div",{class:"sp-card-message"});chunkBJFC7TVL_cjs.o(T,e.message);let f=document.createElement("button");f.className="sp-card-expand",f.dataset.action="expand",chunkBJFC7TVL_cjs.o(f,this.t("panel.showMore")),f.style.display="none",f.setAttribute("aria-expanded","false"),requestAnimationFrame(()=>{T.scrollHeight>T.clientHeight&&(f.style.display="block");});let L=chunkBJFC7TVL_cjs.n("div",{class:"sp-card-footer"}),i=document.createElement("button");if(i.className="sp-btn-resolve",i.dataset.action="resolve",s){i.appendChild(chunkBJFC7TVL_cjs.m(chunkBJFC7TVL_cjs.E));let v=document.createElement("span");chunkBJFC7TVL_cjs.o(v,` ${this.t("panel.reopen")}`),i.appendChild(v);}else {i.appendChild(chunkBJFC7TVL_cjs.m(chunkBJFC7TVL_cjs.w));let v=document.createElement("span");chunkBJFC7TVL_cjs.o(v,` ${this.t("panel.resolve")}`),i.appendChild(v);}let r=document.createElement("button");r.className="sp-btn-delete",r.dataset.action="delete",r.appendChild(chunkBJFC7TVL_cjs.m(chunkBJFC7TVL_cjs.F));let u=document.createElement("span");return chunkBJFC7TVL_cjs.o(u,` ${this.t("panel.delete")}`),r.appendChild(u),L.appendChild(i),L.appendChild(r),d.appendChild(c),d.appendChild(T),d.appendChild(f),d.appendChild(L),o.appendChild(a),o.appendChild(d),o}async bulkResolve(e){try{await Promise.all(e.map(t=>this.client.resolveFeedback(t,!0))),await this.loadFeedbacks();}catch(t){throw this.bus.emit("feedback:error",t instanceof Error?t:new Error(String(t))),t}}async bulkDelete(e){try{await Promise.all(e.map(t=>this.client.deleteFeedback(t)));for(let t of e)this.bus.emit("feedback:deleted",t);await this.loadFeedbacks();}catch(t){throw this.bus.emit("feedback:error",t instanceof Error?t:new Error(String(t))),t}}async confirmDeleteAll(){if(await this.showConfirmDialog(this.t("panel.deleteAllConfirmTitle"),this.t("panel.deleteAllConfirmMessage"))){this.deleteAllBtn.disabled=true;try{await this.client.deleteAllFeedbacks(this.projectName),this.bus.emit("feedback:all-deleted"),await this.loadFeedbacks();}catch(t){this.bus.emit("feedback:error",t instanceof Error?t:new Error(String(t)));}finally{this.deleteAllBtn.disabled=false;}}}showConfirmDialog(e,t){return new Promise(s=>{let n=chunkBJFC7TVL_cjs.n("div",{class:"sp-confirm-backdrop"}),o=`sp-confirm-title-${Date.now()}`,a=`sp-confirm-msg-${Date.now()}`,d=chunkBJFC7TVL_cjs.n("div",{class:"sp-confirm-dialog"});d.setAttribute("role","alertdialog"),d.setAttribute("aria-modal","true"),d.setAttribute("aria-labelledby",o),d.setAttribute("aria-describedby",a);let c=chunkBJFC7TVL_cjs.n("div",{class:"sp-confirm-title"});c.id=o,chunkBJFC7TVL_cjs.o(c,e);let b=chunkBJFC7TVL_cjs.n("div",{class:"sp-confirm-message"});b.id=a,chunkBJFC7TVL_cjs.o(b,t);let m=chunkBJFC7TVL_cjs.n("div",{class:"sp-confirm-actions"}),p=document.createElement("button");p.type="button",p.className="sp-btn-ghost",chunkBJFC7TVL_cjs.o(p,this.t("panel.cancel"));let y=document.createElement("button");y.type="button",y.className="sp-btn-danger",chunkBJFC7TVL_cjs.o(y,this.t("panel.confirmDelete"));let C=false,k=f=>{C||(C=true,n.removeEventListener("keydown",T),n.style.opacity="0",d.style.transform="translateY(8px) scale(0.97)",setTimeout(()=>{n.remove(),s(f);},200));},T=f=>{let L=f;if(L.key==="Escape"){k(false);return}L.key==="Tab"&&(L.preventDefault(),n.getRootNode().activeElement===p?y.focus():p.focus());};n.addEventListener("keydown",T),p.addEventListener("click",()=>k(false)),y.addEventListener("click",()=>k(true)),n.addEventListener("click",f=>{f.target===n&&k(false);}),m.appendChild(p),m.appendChild(y),d.appendChild(c),d.appendChild(b),d.appendChild(m),n.appendChild(d),this.root.getRootNode()instanceof ShadowRoot?this.root.getRootNode().appendChild(n):this.root.appendChild(n),requestAnimationFrame(()=>{n.style.opacity="1",d.style.transform="translateY(0) scale(1)",p.focus();});})}async deleteFeedback(e,t){this.pendingMutations.add(e.id);let s=chunkBJFC7TVL_cjs.p(t);try{await this.client.deleteFeedback(e.id),this.bus.emit("feedback:deleted",e.id),await this.loadFeedbacks();}catch(n){s(),this.bus.emit("feedback:error",n instanceof Error?n:new Error(String(n)));}finally{this.pendingMutations.delete(e.id);}}async toggleResolve(e,t){this.pendingMutations.add(e.id);let s=chunkBJFC7TVL_cjs.p(t);try{let n=!chunkBJFC7TVL_cjs.g(e.status);await this.client.resolveFeedback(e.id,n),await this.loadFeedbacks();}catch(n){s(),this.bus.emit("feedback:error",n instanceof Error?n:new Error(String(n)));}finally{this.pendingMutations.delete(e.id);}}buildTypeDropdown(){return this.typeOptions=[{value:"all",label:this.t("panel.filterAll"),icon:chunkBJFC7TVL_cjs.B,color:this.colors.accent,bg:this.colors.accentLight},{value:"question",label:this.t("type.question"),icon:chunkBJFC7TVL_cjs.x,color:this.colors.typeQuestion,bg:this.colors.typeQuestionBg},{value:"change",label:this.t("type.change"),icon:chunkBJFC7TVL_cjs.y,color:this.colors.typeChange,bg:this.colors.typeChangeBg},{value:"bug",label:this.t("type.bug"),icon:chunkBJFC7TVL_cjs.z,color:this.colors.typeBug,bg:this.colors.typeBugBg},{value:"other",label:this.t("type.other"),icon:chunkBJFC7TVL_cjs.A,color:this.colors.typeOther,bg:this.colors.typeOtherBg}],this.typeDropdownContainer=chunkBJFC7TVL_cjs.n("div",{class:"sp-filter-dropdown"}),this.typeDropdownBtn=document.createElement("button"),this.typeDropdownBtn.type="button",this.typeDropdownBtn.className="sp-filter-dropdown-btn",this.typeDropdownBtn.setAttribute("aria-haspopup","listbox"),this.typeDropdownBtn.setAttribute("aria-expanded","false"),this.renderTypeDropdownTrigger(),this.typeDropdownBtn.addEventListener("click",e=>{e.stopPropagation(),this.typeDropdownMenu?this.closeTypeDropdown():this.openTypeDropdown();}),this.typeDropdownContainer.appendChild(this.typeDropdownBtn),this.typeDropdownContainer}renderTypeDropdownTrigger(){let e=this.typeOptions.find(d=>this.activeFilters.has(d.value))??this.typeOptions[0];if(!e)return;this.typeDropdownBtn.replaceChildren(),this.typeDropdownBtn.style.setProperty("--sp-chip-color",e.color),this.typeDropdownBtn.style.setProperty("--sp-chip-bg",e.bg),this.typeDropdownBtn.dataset.filter=e.value,this.typeDropdownBtn.classList.toggle("sp-filter-dropdown-btn--filtered",e.value!=="all"),this.typeDropdownBtn.setAttribute("aria-label",`${this.t("type.label")}: ${e.label}`);let t=chunkBJFC7TVL_cjs.n("span",{class:"sp-filter-dropdown-btn__icon"});t.appendChild(chunkBJFC7TVL_cjs.m(e.icon)),this.typeDropdownBtn.appendChild(t);let s=chunkBJFC7TVL_cjs.n("span",{class:"sp-filter-dropdown-btn__label"}),n=chunkBJFC7TVL_cjs.n("span",{class:"sp-filter-dropdown-btn__prefix"});chunkBJFC7TVL_cjs.o(n,this.t("type.label"));let o=chunkBJFC7TVL_cjs.n("span",{class:"sp-filter-dropdown-btn__value"});chunkBJFC7TVL_cjs.o(o,e.label),s.appendChild(n),s.appendChild(o),this.typeDropdownBtn.appendChild(s);let a=chunkBJFC7TVL_cjs.n("span",{class:"sp-filter-dropdown-btn__chevron"});a.appendChild(chunkBJFC7TVL_cjs.m(chunkBJFC7TVL_cjs.D)),this.typeDropdownBtn.appendChild(a);}openTypeDropdown(){this.typeDropdownMenu=chunkBJFC7TVL_cjs.n("div",{class:"sp-filter-dropdown-menu"}),this.typeDropdownMenu.setAttribute("role","listbox"),this.typeDropdownMenu.setAttribute("aria-label",this.t("type.label")),this.typeDropdownBtn.setAttribute("aria-expanded","true");for(let e of this.typeOptions){let t=document.createElement("button");t.type="button";let s=this.activeFilters.has(e.value);t.className=`sp-filter-dropdown-option${s?" sp-filter-dropdown-option--active":""}`,t.style.setProperty("--sp-chip-color",e.color),t.style.setProperty("--sp-chip-bg",e.bg),t.dataset.filter=e.value,t.setAttribute("role","option"),t.setAttribute("aria-selected",String(s));let n=chunkBJFC7TVL_cjs.n("span",{class:"sp-filter-dropdown-option__icon"});n.appendChild(chunkBJFC7TVL_cjs.m(e.icon)),t.appendChild(n);let o=chunkBJFC7TVL_cjs.n("span",{class:"sp-filter-dropdown-option__label"});if(chunkBJFC7TVL_cjs.o(o,e.label),t.appendChild(o),s){let a=chunkBJFC7TVL_cjs.n("span",{class:"sp-filter-dropdown-option__check"});a.appendChild(chunkBJFC7TVL_cjs.m(chunkBJFC7TVL_cjs.w)),t.appendChild(a);}t.addEventListener("click",a=>{a.stopPropagation(),this.selectTypeFilter(e.value);}),this.typeDropdownMenu.appendChild(t);}this.typeDropdownContainer.appendChild(this.typeDropdownMenu),requestAnimationFrame(()=>{this.typeDropdownOutsideHandler=e=>{this.typeDropdownMenu&&!this.typeDropdownContainer.contains(e.target)&&this.closeTypeDropdown();},document.addEventListener("click",this.typeDropdownOutsideHandler,true);}),this.typeDropdownMenu.addEventListener("keydown",e=>{e.key==="Escape"&&(this.closeTypeDropdown(),this.typeDropdownBtn.focus());});}closeTypeDropdown(){this.typeDropdownMenu&&(this.typeDropdownMenu.remove(),this.typeDropdownMenu=null),this.typeDropdownBtn.setAttribute("aria-expanded","false"),this.typeDropdownOutsideHandler&&(document.removeEventListener("click",this.typeDropdownOutsideHandler,true),this.typeDropdownOutsideHandler=null);}selectTypeFilter(e){this.activeFilters.clear(),this.activeFilters.add(e),this.renderTypeDropdownTrigger(),this.closeTypeDropdown(),this.loadFeedbacks().catch(()=>{});}buildStatusSegmented(){return this.statusSegmented=new M({options:[{value:"all",label:this.t("panel.statusAll"),icon:chunkBJFC7TVL_cjs.B,color:this.colors.accent,bg:this.colors.accentLight},{value:"open",label:this.t("panel.statusOpen"),icon:chunkBJFC7TVL_cjs.C,color:this.colors.statusOpen,bg:this.colors.statusOpenBg},{value:"resolved",label:this.t("panel.statusResolved"),icon:chunkBJFC7TVL_cjs.w,color:this.colors.statusResolved,bg:this.colors.statusResolvedBg}],value:"all",onChange:()=>{this.loadFeedbacks().catch(()=>{});},ariaLabel:this.t("status.label"),datasetKey:"statusFilter",modifierPrefix:"sp-segmented__btn--"}),this.statusSegmented.element}buildScopeSegmented(){return this.scopeSegmented=new M({options:[{value:"this",label:this.t("scope.thisPage")},{value:"template",label:this.t("scope.thisType")},{value:"all",label:this.t("scope.all")}],value:this.initialScopeFilter,onChange:()=>{this.loadFeedbacks().catch(()=>{});},ariaLabel:this.t("scope.label"),datasetKey:"scopeFilter",modifierPrefix:"sp-segmented__btn--scope-",extraClass:"sp-segmented--scope"}),this.syncScopeAvailability(),this.scopeSegmented.element}syncScopeAvailability(){if(!this.scopeSegmented)return;let t=!!this.getScope().urlPattern;this.scopeSegmented.setOptionVisible("template",t),!t&&this.scopeSegmented.value==="template"&&this.scopeSegmented.select("this");}getFocusedFeedback(){let e=chunkBJFC7TVL_cjs.fa(this.listContainer);if(e<0)return;let t=this.listContainer.querySelectorAll(".sp-card")[e];if(t)return this.feedbacks.find(s=>s.id===t.dataset.feedbackId)}scrollToFeedback(e){let t=CSS.escape(e),s=this.listContainer.querySelector(`[data-feedback-id="${t}"]`);s&&(s.scrollIntoView({behavior:"smooth",block:"center"}),s.classList.add("sp-anim-flash"),s.addEventListener("animationend",()=>{s.classList.remove("sp-anim-flash");},{once:true}));}async refresh(){this.isOpen&&await this.loadFeedbacks();}get isCurrentlyOpen(){return this.isOpen}destroy(){this.loadController?.abort(),this.searchTimeout&&clearTimeout(this.searchTimeout),this.listContainer.removeEventListener("click",this.onListClick),this.listContainer.removeEventListener("keydown",this.onListKeydown),this.listContainer.removeEventListener("mouseover",this.onListMouseover),this.listContainer.removeEventListener("mouseout",this.onListMouseout),document.removeEventListener("sp-marker-click",this.onMarkerClick),this.closeTypeDropdown(),this.sortControls.destroy(),this.bulk.destroy(),this.exportBtn.destroy(),this.shortcuts.destroy(),this.detail.destroy(),this.root.remove();}};exports.Panel=ue;//# sourceMappingURL=panel-KCYUMYAI.cjs.map
|
|
2
|
-
//# sourceMappingURL=panel-
|
|
1
|
+
'use strict';var chunkAFLWWD6M_cjs=require('./chunk-AFLWWD6M.cjs');var M=class{element;current;opts;onChange;datasetKey;constructor(e){this.opts=e.options,this.current=e.value,this.onChange=e.onChange,this.datasetKey=e.datasetKey,this.element=chunkAFLWWD6M_cjs.n("div",{class:`sp-segmented${e.extraClass?` ${e.extraClass}`:""}`,role:"radiogroup"}),this.element.setAttribute("aria-label",e.ariaLabel);for(let t of this.opts){let s=document.createElement("button");s.type="button",s.className=e.modifierPrefix!==void 0?`sp-segmented__btn ${e.modifierPrefix}${t.value}`:"sp-segmented__btn",s.dataset[this.datasetKey]=t.value,s.setAttribute("role","radio");let n=this.current===t.value;if(s.setAttribute("aria-checked",String(n)),s.tabIndex=n?0:-1,n&&s.classList.add("sp-segmented__btn--active"),t.color&&s.style.setProperty("--sp-chip-color",t.color),t.bg&&s.style.setProperty("--sp-chip-bg",t.bg),t.icon){let a=chunkAFLWWD6M_cjs.n("span",{class:"sp-segmented__icon"});a.appendChild(chunkAFLWWD6M_cjs.m(t.icon)),s.appendChild(a);}let o=chunkAFLWWD6M_cjs.n("span",{class:"sp-segmented__label"});chunkAFLWWD6M_cjs.o(o,t.label),s.appendChild(o),s.addEventListener("click",()=>this.select(t.value)),s.addEventListener("keydown",a=>this.handleKey(a,t.value)),this.element.appendChild(s);}}select(e){this.current=e,this.syncSelection(),this.onChange(e);}syncSelection(){let e=this.element.querySelectorAll(".sp-segmented__btn");for(let t of e){let s=t.dataset[this.datasetKey]===this.current;t.classList.toggle("sp-segmented__btn--active",s),t.setAttribute("aria-checked",String(s)),t.tabIndex=s?0:-1;}}setOptionVisible(e,t){let s=this.element.querySelector(`[data-${this.kebabKey()}="${e}"]`);return s?(s.style.display=t?"":"none",true):false}get value(){return this.current}focusOption(e){this.element.querySelector(`[data-${this.kebabKey()}="${e}"]`)?.focus();}handleKey(e,t){let s=this.opts.map(d=>d.value).filter(d=>{let c=this.element.querySelector(`[data-${this.kebabKey()}="${d}"]`);return c!==null&&c.style.display!=="none"}),n=s.indexOf(t);if(n<0)return;let o;switch(e.key){case "ArrowLeft":o=(n-1+s.length)%s.length;break;case "ArrowRight":o=(n+1)%s.length;break;case "Home":o=0;break;case "End":o=s.length-1;break;default:return}e.preventDefault();let a=s[o];a!==void 0&&(this.select(a),this.focusOption(a));}kebabKey(){return this.datasetKey.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}};var me=chunkAFLWWD6M_cjs.e.filter(O=>!chunkAFLWWD6M_cjs.g(O)),ue=class{constructor(e,t,s,n,o,a,d,c,b){this.colors=t;this.bus=s;this.client=n;this.projectName=o;this.markers=a;this.t=d;this.locale=c;this.shadowRoot=e,this.getScope=b?.getScope??(()=>({url:window.location.pathname,urlPattern:null})),this.scopeAnnotationsByUrl=b?.scopeAnnotationsByUrl??true,this.root=chunkAFLWWD6M_cjs.n("div",{class:"sp-panel"}),this.root.setAttribute("role","complementary"),this.root.setAttribute("aria-label",this.t("panel.ariaLabel")),this.root.setAttribute("aria-hidden","true");let m=chunkAFLWWD6M_cjs.n("div",{class:"sp-panel-header"}),p=chunkAFLWWD6M_cjs.n("span",{class:"sp-panel-title"});chunkAFLWWD6M_cjs.o(p,this.t("panel.title")),this.closeBtn=document.createElement("button"),this.closeBtn.className="sp-panel-close",this.closeBtn.setAttribute("aria-label",this.t("panel.close")),this.closeBtn.appendChild(chunkAFLWWD6M_cjs.m(chunkAFLWWD6M_cjs.u)),this.closeBtn.addEventListener("click",()=>this.close()),this.deleteAllBtn=document.createElement("button"),this.deleteAllBtn.className="sp-btn-delete-all",this.deleteAllBtn.setAttribute("aria-label",this.t("panel.deleteAll")),this.deleteAllBtn.appendChild(chunkAFLWWD6M_cjs.m(chunkAFLWWD6M_cjs.F));let y=document.createElement("span");chunkAFLWWD6M_cjs.o(y,` ${this.t("panel.deleteAll")}`),this.deleteAllBtn.appendChild(y),this.deleteAllBtn.addEventListener("click",()=>this.confirmDeleteAll()),this.exportBtn=new chunkAFLWWD6M_cjs.V(t,()=>this.feedbacks,this.t);let C=chunkAFLWWD6M_cjs.n("div",{class:"sp-panel-header-right"});C.appendChild(this.exportBtn.element),C.appendChild(this.deleteAllBtn),C.appendChild(this.closeBtn),m.appendChild(p),m.appendChild(C),this.stats=new chunkAFLWWD6M_cjs.ea(t,this.t);let k=chunkAFLWWD6M_cjs.n("div",{class:"sp-filters"}),T=chunkAFLWWD6M_cjs.n("div",{class:"sp-search-wrap"}),f=chunkAFLWWD6M_cjs.m(chunkAFLWWD6M_cjs.v);f.setAttribute("class","sp-search-icon"),this.searchInput=document.createElement("input"),this.searchInput.type="text",this.searchInput.className="sp-search",this.searchInput.placeholder=this.t("panel.search"),this.searchInput.setAttribute("aria-label",this.t("panel.searchAria")),this.searchInput.addEventListener("input",()=>{this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>this.loadFeedbacks().catch(()=>{}),200);}),T.appendChild(f),T.appendChild(this.searchInput);let L=chunkAFLWWD6M_cjs.n("div",{class:"sp-filter-bar"});L.appendChild(this.buildTypeDropdown()),L.appendChild(this.buildStatusSegmented()),L.appendChild(this.buildScopeSegmented()),this.sortControls=new chunkAFLWWD6M_cjs.ba(t,()=>this.renderList(),this.t),k.appendChild(T),k.appendChild(L),k.appendChild(this.sortControls.element),this.listContainer=chunkAFLWWD6M_cjs.n("div",{class:"sp-list"}),this.listContainer.setAttribute("role","list"),this.listContainer.setAttribute("aria-label",this.t("panel.feedbackList")),this.bulk=new chunkAFLWWD6M_cjs.X(t,{onResolve:i=>this.bulkResolve(i),onDelete:i=>this.bulkDelete(i)},this.t),this.bulk.setListContainer(this.listContainer),this.detail=new chunkAFLWWD6M_cjs.Z(t,{onBack:()=>this.detail.hide(),onResolve:async i=>{try{let r=!chunkAFLWWD6M_cjs.g(i.status);await this.client.resolveFeedback(i.id,r),await this.loadFeedbacks(),this.detail.hide();}catch(r){throw this.bus.emit("feedback:error",r instanceof Error?r:new Error(String(r))),r}},onDelete:async i=>{try{await this.client.deleteFeedback(i.id),this.bus.emit("feedback:deleted",i.id),await this.loadFeedbacks(),this.detail.hide();}catch(r){throw this.bus.emit("feedback:error",r instanceof Error?r:new Error(String(r))),r}},onGoToAnnotation:i=>{if(i.annotations.length>0){let r=i.annotations[0];if(!r)return;window.scrollTo({left:r.scrollX,top:r.scrollY,behavior:"smooth"}),this.markers.pinHighlight(i);}}},this.t,c),this.shortcuts=new chunkAFLWWD6M_cjs.ia(t,{onNavigate:i=>{let r=chunkAFLWWD6M_cjs.fa(this.listContainer);chunkAFLWWD6M_cjs.ga(this.listContainer,i==="down"?r+1:r-1);},onResolve:()=>{let i=this.getFocusedFeedback();if(i&&!this.pendingMutations.has(i.id)){let u=this.listContainer.querySelector(`[data-feedback-id="${CSS.escape(i.id)}"]`)?.querySelector('[data-action="resolve"]');u&&this.toggleResolve(i,u).catch(()=>{});}},onDelete:()=>{let i=this.getFocusedFeedback();if(i&&!this.pendingMutations.has(i.id)){let u=this.listContainer.querySelector(`[data-feedback-id="${CSS.escape(i.id)}"]`)?.querySelector('[data-action="delete"]');u&&this.deleteFeedback(i,u).catch(()=>{});}},onFocusSearch:()=>this.searchInput.focus(),onToggleSelect:()=>{let i=this.getFocusedFeedback();i&&this.bulk.toggle(i.id);}},this.t),this.root.appendChild(m),this.root.appendChild(this.stats.element),this.root.appendChild(k),this.root.appendChild(this.listContainer),this.root.appendChild(this.bulk.barElement),this.root.appendChild(this.detail.element),this.root.appendChild(this.shortcuts.helpOverlay),this.root.appendChild(this.shortcuts.hintButton),e.appendChild(this.root),this.onListClick=i=>{let r=i.target;if(r.closest(".sp-bulk-checkbox"))return;let u=r.closest("[data-action]");if(u){i.stopPropagation();let A=u.closest(".sp-card");if(!A)return;let w=A.dataset.feedbackId,g=this.feedbacks.find(E=>E.id===w);if(!g)return;let B=u.dataset.action;if(B==="expand"){let E=A.querySelector(".sp-card-message");if(!E)return;let R=E.classList.toggle("sp-card-message--expanded");chunkAFLWWD6M_cjs.o(u,R?this.t("panel.showLess"):this.t("panel.showMore")),u.setAttribute("aria-expanded",String(R));}else if(B==="resolve"){if(this.pendingMutations.has(g.id))return;let E=u;this.toggleResolve(g,E).catch(()=>{});}else if(B==="delete"){if(this.pendingMutations.has(g.id))return;let E=u;this.deleteFeedback(g,E).catch(()=>{});}return}let v=r.closest(".sp-card");if(v){let A=v.dataset.feedbackId,w=this.feedbacks.find(g=>g.id===A);if(w){let g=this.feedbacks.indexOf(w)+1;this.detail.show(w,g);}}},this.listContainer.addEventListener("click",this.onListClick),this.onListKeydown=i=>{let r=i;if(r.key!=="Enter"&&r.key!==" ")return;let u=r.target,v=u.closest(".sp-card");if(!v||u!==v)return;r.preventDefault();let A=v.dataset.feedbackId,w=this.feedbacks.find(g=>g.id===A);if(w){let g=this.feedbacks.indexOf(w)+1;this.detail.show(w,g);}},this.listContainer.addEventListener("keydown",this.onListKeydown),this.onListMouseover=i=>{let u=i.target.closest(".sp-card");if(!u)return;let v=u.dataset.feedbackId;v&&this.markers.highlight(v);},this.listContainer.addEventListener("mouseover",this.onListMouseover),this.onListMouseout=i=>{let r=i.relatedTarget;r&&this.listContainer.contains(r)||this.markers.highlight("");},this.listContainer.addEventListener("mouseout",this.onListMouseout),this.bus.on("panel:toggle",i=>{i?this.open():this.close();}),e.addEventListener("keydown",i=>{let r=i;if(r.key==="Escape"&&this.isOpen){if(this.detail.isVisible){this.detail.hide();return}this.close();return}if(r.key==="Tab"&&this.isOpen){let u=B=>{let E=B;for(;E&&E!==this.root;){if(E.style.display==="none")return false;E=E.parentElement;}return true},v=Array.from(this.root.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(B=>u(B)&&!B.hasAttribute("disabled"));if(v.length===0)return;let A=v[0],w=v[v.length-1];if(!A||!w)return;let g=e.activeElement;r.shiftKey&&g===A?(r.preventDefault(),w.focus()):!r.shiftKey&&g===w&&(r.preventDefault(),A.focus());}}),this.onMarkerClick=(i=>{this.scrollToFeedback(i.detail.feedbackId);}),document.addEventListener("sp-marker-click",this.onMarkerClick);}colors;bus;client;projectName;markers;t;locale;root;listContainer;searchInput;closeBtn;deleteAllBtn;activeFilters=new Set(["all"]);typeDropdownBtn;typeDropdownContainer;typeDropdownMenu=null;typeDropdownOutsideHandler=null;statusSegmented;typeOptions;feedbacks=[];currentPage=1;totalFeedbacks=0;isLoadingMore=false;isOpen=false;searchTimeout=null;loadController=null;pendingMutations=new Set;stats;sortControls;bulk;exportBtn;shortcuts;detail;shadowRoot;getScope;scopeAnnotationsByUrl;scopeSegmented;initialScopeFilter="this";onMarkerClick;onListClick;onListKeydown;onListMouseover;onListMouseout;async open(){this.isOpen||(this.isOpen=true,this.root.classList.add("sp-panel--open"),this.root.setAttribute("aria-hidden","false"),this.bus.emit("open"),this.shortcuts.enable(this.shadowRoot),await this.loadFeedbacks(),requestAnimationFrame(()=>{this.searchInput?this.searchInput.focus():this.closeBtn.focus();}));}close(){if(!this.isOpen)return;this.isOpen=false,this.root.classList.remove("sp-panel--open"),this.root.setAttribute("aria-hidden","true"),this.bus.emit("close"),this.shortcuts.disable(),this.detail.hide(),this.root.getRootNode().querySelector(".sp-fab")?.focus();}showLoading(){this.listContainer.replaceChildren();let e=chunkAFLWWD6M_cjs.n("div",{class:"sp-loading"});e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-label",this.t("panel.loading"));let t=chunkAFLWWD6M_cjs.n("div",{class:"sp-spinner"});e.appendChild(t),this.listContainer.appendChild(e);}showError(){this.listContainer.replaceChildren();let e=chunkAFLWWD6M_cjs.n("div",{class:"sp-empty"});e.setAttribute("role","status"),e.setAttribute("aria-live","polite");let t=chunkAFLWWD6M_cjs.n("div",{class:"sp-empty-text"});chunkAFLWWD6M_cjs.o(t,this.t("panel.loadError"));let s=document.createElement("button");s.className="sp-btn-ghost",s.style.marginTop="8px",chunkAFLWWD6M_cjs.o(s,this.t("panel.retry")),s.addEventListener("click",()=>this.loadFeedbacks().catch(()=>{})),e.appendChild(t),e.appendChild(s),this.listContainer.appendChild(e);}statusBucket(e){if(e!=="all")return chunkAFLWWD6M_cjs.g(e)?chunkAFLWWD6M_cjs.f:me}async loadFeedbacks(){this.loadController?.abort(),this.loadController=new AbortController;let{signal:e}=this.loadController;this.currentPage=1;let t=this.searchInput.value.trim()||void 0,s=this.activeFilters.has("all")?void 0:Array.from(this.activeFilters)[0],n=this.statusBucket(this.statusSegmented.value),o=this.getScope();this.syncScopeAvailability();let a=this.scopeSegmented.value,d={page:1,limit:20};s&&(d.type=s),n&&(d.statuses=n),t&&(d.search=t),a==="this"?d.url=o.url:a==="template"&&o.urlPattern&&(d.urlPattern=o.urlPattern);let c=this.feedbacks.length>0;c||this.showLoading();try{let{feedbacks:b,total:m}=await this.client.getFeedbacks(this.projectName,d);if(e.aborted)return;this.feedbacks=b,this.totalFeedbacks=m,this.stats.update(b,m),this.bulk.reset(),this.renderList();let p=this.scopeAnnotationsByUrl?b.filter(y=>y.url===o.url):b;this.markers.render(p);}catch(b){if(e.aborted)return;c||this.showError(),this.bus.emit("feedback:error",b instanceof Error?b:new Error(String(b)));}}async loadMoreFeedbacks(){if(this.isLoadingMore)return;this.isLoadingMore=true;let e=this.loadController,t=this.currentPage+1,s=this.searchInput.value.trim()||void 0,n=this.activeFilters.has("all")?void 0:Array.from(this.activeFilters)[0],o=this.statusBucket(this.statusSegmented.value),a=this.getScope(),d=this.scopeSegmented.value,c={page:t,limit:20};n&&(c.type=n),o&&(c.statuses=o),s&&(c.search=s),d==="this"?c.url=a.url:d==="template"&&a.urlPattern&&(c.urlPattern=a.urlPattern);let b=this.listContainer.querySelector(".sp-btn-load-more"),m;b&&(m=chunkAFLWWD6M_cjs.p(b));try{let{feedbacks:p,total:y}=await this.client.getFeedbacks(this.projectName,c);if(e!==this.loadController)return;this.currentPage=t,this.totalFeedbacks=y,this.feedbacks=[...this.feedbacks,...p],this.stats.update(this.feedbacks,y),this.renderList();let C=this.scopeAnnotationsByUrl?this.feedbacks.filter(k=>k.url===a.url):this.feedbacks;this.markers.render(C);}catch(p){m&&m(),this.bus.emit("feedback:error",p instanceof Error?p:new Error(String(p)));}finally{this.isLoadingMore=false;}}renderList(){if(this.listContainer.replaceChildren(),this.feedbacks.length===0){let o=chunkAFLWWD6M_cjs.n("div",{class:"sp-empty"});o.setAttribute("role","status"),o.setAttribute("aria-live","polite");let a=chunkAFLWWD6M_cjs.n("div",{class:"sp-empty-text"});chunkAFLWWD6M_cjs.o(a,this.t("panel.empty")),o.appendChild(a),this.listContainer.appendChild(o);return}let e=chunkAFLWWD6M_cjs._(this.feedbacks,this.sortControls.sortMode),t=e.map(o=>o.id),s=this.bulk.createSelectAllBar(t,this.t("bulk.selectAll"));if(this.listContainer.appendChild(s),this.sortControls.groupByPage){let o=chunkAFLWWD6M_cjs.$(e),a=0;for(let[d,c]of o){let b=chunkAFLWWD6M_cjs.aa(d,c.length,this.colors);this.listContainer.appendChild(b);let m=chunkAFLWWD6M_cjs.n("div",{class:"sp-group-content"});for(let p of c){let y=this.createCard(p,a+1);y.style.setProperty("--sp-card-i",String(a)),m.appendChild(y),a++;}this.listContainer.appendChild(m);}}else e.forEach((o,a)=>{let d=this.createCard(o,a+1);d.style.setProperty("--sp-card-i",String(a)),this.listContainer.appendChild(d);});let n=this.totalFeedbacks-this.feedbacks.length;if(n>0){let o=chunkAFLWWD6M_cjs.n("div",{class:"sp-load-more-wrap"}),a=document.createElement("button");a.className="sp-btn-ghost sp-btn-load-more",chunkAFLWWD6M_cjs.o(a,chunkAFLWWD6M_cjs.R(this.t,"panel.loadMore",{remaining:n})),a.addEventListener("click",()=>this.loadMoreFeedbacks().catch(()=>{})),o.appendChild(a),this.listContainer.appendChild(o);}}createCard(e,t){let s=chunkAFLWWD6M_cjs.g(e.status),n=chunkAFLWWD6M_cjs.J(e.type,this.colors),o=chunkAFLWWD6M_cjs.n("div",{class:`sp-card ${s?"sp-card--resolved":""}`});o.setAttribute("role","listitem"),o.setAttribute("tabindex","0"),o.setAttribute("aria-label",`Feedback #${t}: ${chunkAFLWWD6M_cjs.S(e.type,this.t)} \u2014 ${e.message.slice(0,80)}`),o.dataset.feedbackId=e.id;let a=chunkAFLWWD6M_cjs.n("div",{class:"sp-card-bar"});a.style.background=s?"#9ca3af":n;let d=chunkAFLWWD6M_cjs.n("div",{class:"sp-card-body"}),c=chunkAFLWWD6M_cjs.n("div",{class:"sp-card-header"}),b=this.bulk.createCheckbox(e.id);c.appendChild(b);let m=chunkAFLWWD6M_cjs.n("span",{class:"sp-card-number"});chunkAFLWWD6M_cjs.o(m,`#${t}`);let p=chunkAFLWWD6M_cjs.n("span",{class:"sp-badge"}),y=chunkAFLWWD6M_cjs.M(e.type,this.colors);p.style.background=y,p.style.color=n,chunkAFLWWD6M_cjs.o(p,chunkAFLWWD6M_cjs.S(e.type,this.t));let C=chunkAFLWWD6M_cjs.n("span",{class:"sp-badge sp-badge--status"});C.dataset.status=e.status,C.style.background=chunkAFLWWD6M_cjs.L(e.status,this.colors),C.style.color=chunkAFLWWD6M_cjs.K(e.status,this.colors),chunkAFLWWD6M_cjs.o(C,chunkAFLWWD6M_cjs.T(e.status,this.t));let k=chunkAFLWWD6M_cjs.n("span",{class:"sp-card-date"});chunkAFLWWD6M_cjs.o(k,chunkAFLWWD6M_cjs.q(e.createdAt,this.locale)),c.appendChild(m),c.appendChild(p),c.appendChild(C),c.appendChild(k);let T=chunkAFLWWD6M_cjs.n("div",{class:"sp-card-message"});chunkAFLWWD6M_cjs.o(T,e.message);let f=document.createElement("button");f.className="sp-card-expand",f.dataset.action="expand",chunkAFLWWD6M_cjs.o(f,this.t("panel.showMore")),f.style.display="none",f.setAttribute("aria-expanded","false"),requestAnimationFrame(()=>{T.scrollHeight>T.clientHeight&&(f.style.display="block");});let L=chunkAFLWWD6M_cjs.n("div",{class:"sp-card-footer"}),i=document.createElement("button");if(i.className="sp-btn-resolve",i.dataset.action="resolve",s){i.appendChild(chunkAFLWWD6M_cjs.m(chunkAFLWWD6M_cjs.E));let v=document.createElement("span");chunkAFLWWD6M_cjs.o(v,` ${this.t("panel.reopen")}`),i.appendChild(v);}else {i.appendChild(chunkAFLWWD6M_cjs.m(chunkAFLWWD6M_cjs.w));let v=document.createElement("span");chunkAFLWWD6M_cjs.o(v,` ${this.t("panel.resolve")}`),i.appendChild(v);}let r=document.createElement("button");r.className="sp-btn-delete",r.dataset.action="delete",r.appendChild(chunkAFLWWD6M_cjs.m(chunkAFLWWD6M_cjs.F));let u=document.createElement("span");return chunkAFLWWD6M_cjs.o(u,` ${this.t("panel.delete")}`),r.appendChild(u),L.appendChild(i),L.appendChild(r),d.appendChild(c),d.appendChild(T),d.appendChild(f),d.appendChild(L),o.appendChild(a),o.appendChild(d),o}async bulkResolve(e){try{await Promise.all(e.map(t=>this.client.resolveFeedback(t,!0))),await this.loadFeedbacks();}catch(t){throw this.bus.emit("feedback:error",t instanceof Error?t:new Error(String(t))),t}}async bulkDelete(e){try{await Promise.all(e.map(t=>this.client.deleteFeedback(t)));for(let t of e)this.bus.emit("feedback:deleted",t);await this.loadFeedbacks();}catch(t){throw this.bus.emit("feedback:error",t instanceof Error?t:new Error(String(t))),t}}async confirmDeleteAll(){if(await this.showConfirmDialog(this.t("panel.deleteAllConfirmTitle"),this.t("panel.deleteAllConfirmMessage"))){this.deleteAllBtn.disabled=true;try{await this.client.deleteAllFeedbacks(this.projectName),this.bus.emit("feedback:all-deleted"),await this.loadFeedbacks();}catch(t){this.bus.emit("feedback:error",t instanceof Error?t:new Error(String(t)));}finally{this.deleteAllBtn.disabled=false;}}}showConfirmDialog(e,t){return new Promise(s=>{let n=chunkAFLWWD6M_cjs.n("div",{class:"sp-confirm-backdrop"}),o=`sp-confirm-title-${Date.now()}`,a=`sp-confirm-msg-${Date.now()}`,d=chunkAFLWWD6M_cjs.n("div",{class:"sp-confirm-dialog"});d.setAttribute("role","alertdialog"),d.setAttribute("aria-modal","true"),d.setAttribute("aria-labelledby",o),d.setAttribute("aria-describedby",a);let c=chunkAFLWWD6M_cjs.n("div",{class:"sp-confirm-title"});c.id=o,chunkAFLWWD6M_cjs.o(c,e);let b=chunkAFLWWD6M_cjs.n("div",{class:"sp-confirm-message"});b.id=a,chunkAFLWWD6M_cjs.o(b,t);let m=chunkAFLWWD6M_cjs.n("div",{class:"sp-confirm-actions"}),p=document.createElement("button");p.type="button",p.className="sp-btn-ghost",chunkAFLWWD6M_cjs.o(p,this.t("panel.cancel"));let y=document.createElement("button");y.type="button",y.className="sp-btn-danger",chunkAFLWWD6M_cjs.o(y,this.t("panel.confirmDelete"));let C=false,k=f=>{C||(C=true,n.removeEventListener("keydown",T),n.style.opacity="0",d.style.transform="translateY(8px) scale(0.97)",setTimeout(()=>{n.remove(),s(f);},200));},T=f=>{let L=f;if(L.key==="Escape"){k(false);return}L.key==="Tab"&&(L.preventDefault(),n.getRootNode().activeElement===p?y.focus():p.focus());};n.addEventListener("keydown",T),p.addEventListener("click",()=>k(false)),y.addEventListener("click",()=>k(true)),n.addEventListener("click",f=>{f.target===n&&k(false);}),m.appendChild(p),m.appendChild(y),d.appendChild(c),d.appendChild(b),d.appendChild(m),n.appendChild(d),this.root.getRootNode()instanceof ShadowRoot?this.root.getRootNode().appendChild(n):this.root.appendChild(n),requestAnimationFrame(()=>{n.style.opacity="1",d.style.transform="translateY(0) scale(1)",p.focus();});})}async deleteFeedback(e,t){this.pendingMutations.add(e.id);let s=chunkAFLWWD6M_cjs.p(t);try{await this.client.deleteFeedback(e.id),this.bus.emit("feedback:deleted",e.id),await this.loadFeedbacks();}catch(n){s(),this.bus.emit("feedback:error",n instanceof Error?n:new Error(String(n)));}finally{this.pendingMutations.delete(e.id);}}async toggleResolve(e,t){this.pendingMutations.add(e.id);let s=chunkAFLWWD6M_cjs.p(t);try{let n=!chunkAFLWWD6M_cjs.g(e.status);await this.client.resolveFeedback(e.id,n),await this.loadFeedbacks();}catch(n){s(),this.bus.emit("feedback:error",n instanceof Error?n:new Error(String(n)));}finally{this.pendingMutations.delete(e.id);}}buildTypeDropdown(){return this.typeOptions=[{value:"all",label:this.t("panel.filterAll"),icon:chunkAFLWWD6M_cjs.B,color:this.colors.accent,bg:this.colors.accentLight},{value:"question",label:this.t("type.question"),icon:chunkAFLWWD6M_cjs.x,color:this.colors.typeQuestion,bg:this.colors.typeQuestionBg},{value:"change",label:this.t("type.change"),icon:chunkAFLWWD6M_cjs.y,color:this.colors.typeChange,bg:this.colors.typeChangeBg},{value:"bug",label:this.t("type.bug"),icon:chunkAFLWWD6M_cjs.z,color:this.colors.typeBug,bg:this.colors.typeBugBg},{value:"other",label:this.t("type.other"),icon:chunkAFLWWD6M_cjs.A,color:this.colors.typeOther,bg:this.colors.typeOtherBg}],this.typeDropdownContainer=chunkAFLWWD6M_cjs.n("div",{class:"sp-filter-dropdown"}),this.typeDropdownBtn=document.createElement("button"),this.typeDropdownBtn.type="button",this.typeDropdownBtn.className="sp-filter-dropdown-btn",this.typeDropdownBtn.setAttribute("aria-haspopup","listbox"),this.typeDropdownBtn.setAttribute("aria-expanded","false"),this.renderTypeDropdownTrigger(),this.typeDropdownBtn.addEventListener("click",e=>{e.stopPropagation(),this.typeDropdownMenu?this.closeTypeDropdown():this.openTypeDropdown();}),this.typeDropdownContainer.appendChild(this.typeDropdownBtn),this.typeDropdownContainer}renderTypeDropdownTrigger(){let e=this.typeOptions.find(d=>this.activeFilters.has(d.value))??this.typeOptions[0];if(!e)return;this.typeDropdownBtn.replaceChildren(),this.typeDropdownBtn.style.setProperty("--sp-chip-color",e.color),this.typeDropdownBtn.style.setProperty("--sp-chip-bg",e.bg),this.typeDropdownBtn.dataset.filter=e.value,this.typeDropdownBtn.classList.toggle("sp-filter-dropdown-btn--filtered",e.value!=="all"),this.typeDropdownBtn.setAttribute("aria-label",`${this.t("type.label")}: ${e.label}`);let t=chunkAFLWWD6M_cjs.n("span",{class:"sp-filter-dropdown-btn__icon"});t.appendChild(chunkAFLWWD6M_cjs.m(e.icon)),this.typeDropdownBtn.appendChild(t);let s=chunkAFLWWD6M_cjs.n("span",{class:"sp-filter-dropdown-btn__label"}),n=chunkAFLWWD6M_cjs.n("span",{class:"sp-filter-dropdown-btn__prefix"});chunkAFLWWD6M_cjs.o(n,this.t("type.label"));let o=chunkAFLWWD6M_cjs.n("span",{class:"sp-filter-dropdown-btn__value"});chunkAFLWWD6M_cjs.o(o,e.label),s.appendChild(n),s.appendChild(o),this.typeDropdownBtn.appendChild(s);let a=chunkAFLWWD6M_cjs.n("span",{class:"sp-filter-dropdown-btn__chevron"});a.appendChild(chunkAFLWWD6M_cjs.m(chunkAFLWWD6M_cjs.D)),this.typeDropdownBtn.appendChild(a);}openTypeDropdown(){this.typeDropdownMenu=chunkAFLWWD6M_cjs.n("div",{class:"sp-filter-dropdown-menu"}),this.typeDropdownMenu.setAttribute("role","listbox"),this.typeDropdownMenu.setAttribute("aria-label",this.t("type.label")),this.typeDropdownBtn.setAttribute("aria-expanded","true");for(let e of this.typeOptions){let t=document.createElement("button");t.type="button";let s=this.activeFilters.has(e.value);t.className=`sp-filter-dropdown-option${s?" sp-filter-dropdown-option--active":""}`,t.style.setProperty("--sp-chip-color",e.color),t.style.setProperty("--sp-chip-bg",e.bg),t.dataset.filter=e.value,t.setAttribute("role","option"),t.setAttribute("aria-selected",String(s));let n=chunkAFLWWD6M_cjs.n("span",{class:"sp-filter-dropdown-option__icon"});n.appendChild(chunkAFLWWD6M_cjs.m(e.icon)),t.appendChild(n);let o=chunkAFLWWD6M_cjs.n("span",{class:"sp-filter-dropdown-option__label"});if(chunkAFLWWD6M_cjs.o(o,e.label),t.appendChild(o),s){let a=chunkAFLWWD6M_cjs.n("span",{class:"sp-filter-dropdown-option__check"});a.appendChild(chunkAFLWWD6M_cjs.m(chunkAFLWWD6M_cjs.w)),t.appendChild(a);}t.addEventListener("click",a=>{a.stopPropagation(),this.selectTypeFilter(e.value);}),this.typeDropdownMenu.appendChild(t);}this.typeDropdownContainer.appendChild(this.typeDropdownMenu),requestAnimationFrame(()=>{this.typeDropdownOutsideHandler=e=>{this.typeDropdownMenu&&!this.typeDropdownContainer.contains(e.target)&&this.closeTypeDropdown();},document.addEventListener("click",this.typeDropdownOutsideHandler,true);}),this.typeDropdownMenu.addEventListener("keydown",e=>{e.key==="Escape"&&(this.closeTypeDropdown(),this.typeDropdownBtn.focus());});}closeTypeDropdown(){this.typeDropdownMenu&&(this.typeDropdownMenu.remove(),this.typeDropdownMenu=null),this.typeDropdownBtn.setAttribute("aria-expanded","false"),this.typeDropdownOutsideHandler&&(document.removeEventListener("click",this.typeDropdownOutsideHandler,true),this.typeDropdownOutsideHandler=null);}selectTypeFilter(e){this.activeFilters.clear(),this.activeFilters.add(e),this.renderTypeDropdownTrigger(),this.closeTypeDropdown(),this.loadFeedbacks().catch(()=>{});}buildStatusSegmented(){return this.statusSegmented=new M({options:[{value:"all",label:this.t("panel.statusAll"),icon:chunkAFLWWD6M_cjs.B,color:this.colors.accent,bg:this.colors.accentLight},{value:"open",label:this.t("panel.statusOpen"),icon:chunkAFLWWD6M_cjs.C,color:this.colors.statusOpen,bg:this.colors.statusOpenBg},{value:"resolved",label:this.t("panel.statusResolved"),icon:chunkAFLWWD6M_cjs.w,color:this.colors.statusResolved,bg:this.colors.statusResolvedBg}],value:"all",onChange:()=>{this.loadFeedbacks().catch(()=>{});},ariaLabel:this.t("status.label"),datasetKey:"statusFilter",modifierPrefix:"sp-segmented__btn--"}),this.statusSegmented.element}buildScopeSegmented(){return this.scopeSegmented=new M({options:[{value:"this",label:this.t("scope.thisPage")},{value:"template",label:this.t("scope.thisType")},{value:"all",label:this.t("scope.all")}],value:this.initialScopeFilter,onChange:()=>{this.loadFeedbacks().catch(()=>{});},ariaLabel:this.t("scope.label"),datasetKey:"scopeFilter",modifierPrefix:"sp-segmented__btn--scope-",extraClass:"sp-segmented--scope"}),this.syncScopeAvailability(),this.scopeSegmented.element}syncScopeAvailability(){if(!this.scopeSegmented)return;let t=!!this.getScope().urlPattern;this.scopeSegmented.setOptionVisible("template",t),!t&&this.scopeSegmented.value==="template"&&this.scopeSegmented.select("this");}getFocusedFeedback(){let e=chunkAFLWWD6M_cjs.fa(this.listContainer);if(e<0)return;let t=this.listContainer.querySelectorAll(".sp-card")[e];if(t)return this.feedbacks.find(s=>s.id===t.dataset.feedbackId)}scrollToFeedback(e){let t=CSS.escape(e),s=this.listContainer.querySelector(`[data-feedback-id="${t}"]`);s&&(s.scrollIntoView({behavior:"smooth",block:"center"}),s.classList.add("sp-anim-flash"),s.addEventListener("animationend",()=>{s.classList.remove("sp-anim-flash");},{once:true}));}async refresh(){this.isOpen&&await this.loadFeedbacks();}get isCurrentlyOpen(){return this.isOpen}destroy(){this.loadController?.abort(),this.searchTimeout&&clearTimeout(this.searchTimeout),this.listContainer.removeEventListener("click",this.onListClick),this.listContainer.removeEventListener("keydown",this.onListKeydown),this.listContainer.removeEventListener("mouseover",this.onListMouseover),this.listContainer.removeEventListener("mouseout",this.onListMouseout),document.removeEventListener("sp-marker-click",this.onMarkerClick),this.closeTypeDropdown(),this.sortControls.destroy(),this.bulk.destroy(),this.exportBtn.destroy(),this.shortcuts.destroy(),this.detail.destroy(),this.root.remove();}};exports.Panel=ue;//# sourceMappingURL=panel-2FEECS2N.cjs.map
|
|
2
|
+
//# sourceMappingURL=panel-2FEECS2N.cjs.map
|