aptechka 0.50.8 → 0.50.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.
@@ -6,6 +6,7 @@ export declare class PopoverButtonElement extends HTMLElement {
6
6
  constructor();
7
7
  get type(): CSSProperty<PopoverButtonType>;
8
8
  get popoverElement(): PopoverElement | undefined;
9
+ changePopover(targetId: string): void;
9
10
  protected connectedCallback(): void;
10
11
  protected disconnectedCallback(): void;
11
12
  }
@@ -1 +1 @@
1
- "use strict";var K=c=>{throw TypeError(c)};var D=(c,r,t)=>r.has(c)||K("Cannot "+t);var e=(c,r,t)=>(D(c,r,"read from private field"),t?t.call(c):r.get(c)),o=(c,r,t)=>r.has(c)?K("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(c):r.set(c,t),n=(c,r,t,s)=>(D(c,r,"write to private field"),s?s.call(c,t):r.set(c,t),t),B=(c,r,t)=>(D(c,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../class-linked-status/index.cjs"),v=require("../css-property/index.cjs"),F=require("../index-Cqw2NKev.cjs"),G=require("../events-KVanG9sR.cjs"),ee=require("../function-MthRj-GJ.cjs"),te=require("../style-At6aDoqG.cjs"),Q=require("../url-CLvdjbII.cjs"),X=require("../window-resizer/index.cjs");var l,f,U,j;class se{constructor(){o(this,l,new Map);o(this,f,[]);o(this,U,r=>{var s;const t=[...e(this,f)].reverse().find(i=>i.clickOutside.current);if(t){const i=r.composedPath();if(i.find(J=>J instanceof HTMLElement&&J.hasAttribute("data-popover-content")))return;const a=i[0],R=a instanceof Node&&(t.contains(a)||((s=t.shadowRoot)==null?void 0:s.contains(a))),N=a instanceof HTMLElement&&a.hasAttribute("data-outside");(!R||N)&&t.close()}});o(this,j,r=>{if(r.code==="Escape"){const t=[...e(this,f)].reverse().find(s=>s.escape.current);t&&t.close()}});addEventListener("click",e(this,U)),addEventListener("keydown",e(this,j))}get groups(){return e(this,l)}get stack(){return e(this,f)}add(r,t){if(t.closeRest.current)e(this,l).forEach(i=>{i.forEach(a=>{a.close()})});else if(t.closeRestInGroup.current){let i=e(this,l).get(r);i==null||i.forEach(a=>{a.close()})}let s=e(this,l).get(r);s!=null&&s.length||(s=[],e(this,l).set(r,s)),e(this,f).push(t),s.push(t)}remove(r,t){if(n(this,f,e(this,f).filter(s=>s!==t)),t.closeRest.current){let s=[];e(this,l).forEach(i=>{i.forEach(a=>s.push(a))}),e(this,l).clear(),s.forEach(i=>i.close())}else if(t.closeRestInGroup.current){const s=e(this,l).get(r);e(this,l).delete(r),s==null||s.forEach(i=>{i.close()})}else{let s=e(this,l).get(r);s&&(s=s.filter(i=>i!==t),e(this,l).set(r,s))}}}l=new WeakMap,f=new WeakMap,U=new WeakMap,j=new WeakMap;var d,x,S,p,b,w,T,g,k,P,E,C,u,L,Y,W,A,$,O,q;const m=class m extends HTMLElement{constructor(){super();o(this,L);o(this,d);o(this,x);o(this,S);o(this,p);o(this,b);o(this,w);o(this,T);o(this,g);o(this,k);o(this,P);o(this,E);o(this,C);o(this,u);o(this,A);o(this,$);o(this,O);o(this,q);this.urlValue="",n(this,d,!1),n(this,p,new v.CSSProperty(this,"--history",!1)),n(this,b,new v.CSSProperty(this,"--restore",!1)),n(this,w,new v.CSSProperty(this,"--close-rest",!1)),n(this,T,new v.CSSProperty(this,"--close-rest-in-group",!1)),n(this,g,new v.CSSProperty(this,"--group","")),n(this,k,new v.CSSProperty(this,"--click-outside",!1)),n(this,P,new v.CSSProperty(this,"--escape",!1)),n(this,E,!1),n(this,u,new _.ClassLinkedStatus(this,{opened:!1,closing:!1,triggered:!1})),n(this,A,()=>{n(this,E,!1),e(this,d)&&e(this,p).current&&!location.search.includes(this.id)?this.close():!e(this,d)&&e(this,p).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),n(this,E,!0)}),n(this,$,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),e(this,O).call(this)}),n(this,O,ee.debounce(()=>{e(this,q).call(this)},10)),n(this,q,()=>{this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px")}),e(this,g).subscribe(t=>{t.previous&&(m.stack.remove(t.previous,this),t.current||(document.documentElement.classList.remove(`${this.group.previous}-closing`),document.documentElement.classList.remove(`${this.group.previous}-opened`)))}),e(this,u).subscribe(t=>{if(this.group.current){document.documentElement.classList.toggle(`${this.group.current}-closing`,t.current.closing);const s=m.stack.groups.get(this.group.current),i=s==null?void 0:s.find(a=>a.opened);document.documentElement.classList.toggle(`${this.group.current}-opened`,!!i)}})}get history(){return e(this,p)}get restore(){return e(this,b)}get closeRest(){return e(this,w)}get closeRestInGroup(){return e(this,T)}get group(){return e(this,g)}get clickOutside(){return e(this,k)}get escape(){return e(this,P)}get opened(){return e(this,d)}get lastTrigger(){return e(this,C)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,d)&&Q.updateSearchParameter(this.id,t)}open(t){if(e(this,d))return;n(this,C,t==null?void 0:t.trigger),clearTimeout(e(this,x)),e(this,u).set("closing",!1),e(this,u).set("triggered",!0),G.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,C)}}),e(this,p).current&&e(this,E)&&history.pushState(history.state,"",e(this,L,Y)),n(this,d,!0);const s=()=>{m.stack.add(e(this,g).current,this),e(this,q).call(this),e(this,u).set("opened",!0),G.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,C)}}),n(this,S,void 0)};t!=null&&t.skipTransition?s():n(this,S,setTimeout(s,10))}close(){e(this,d)&&(clearTimeout(e(this,S)),m.stack.remove(e(this,g).current,this),n(this,d,!1),B(this,L,W).call(this),e(this,u).set("opened",!1),e(this,u).set("closing",!0),G.dispatchEvent(this,"popoverClosing",{custom:!0}),n(this,x,setTimeout(()=>{e(this,u).set("triggered",!1),e(this,u).set("closing",!1),G.dispatchEvent(this,"popoverClosed",{custom:!0})},te.getElementTransitionDurationMS(this)+10)))}connectedCallback(){e(this,p).observe(),e(this,b).observe(),e(this,w).observe(),e(this,T).observe(),e(this,g).observe(),e(this,k).observe(),e(this,P).observe(),this.setAttribute("role","dialog"),addEventListener("popstate",e(this,A)),setTimeout(()=>{e(this,b).current?(this.urlValue=Q.parseSearchParameters(location.search)[this.id],e(this,A).call(this)):(B(this,L,W).call(this),n(this,E,!0))},0),X.windowResizer.subscribe(e(this,$))}disconnectedCallback(){m.stack.remove(e(this,g).current,this),X.windowResizer.unsubscribe(e(this,$)),e(this,u).close(),e(this,p).close(),e(this,b).close(),e(this,w).close(),e(this,T).close(),e(this,g).close(),e(this,k).close(),e(this,P).close(),this.removeAttribute("role"),clearTimeout(e(this,x)),clearTimeout(e(this,S)),removeEventListener("popstate",e(this,A)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),B(this,L,W).call(this)}};d=new WeakMap,x=new WeakMap,S=new WeakMap,p=new WeakMap,b=new WeakMap,w=new WeakMap,T=new WeakMap,g=new WeakMap,k=new WeakMap,P=new WeakMap,E=new WeakMap,C=new WeakMap,u=new WeakMap,L=new WeakSet,Y=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},W=function(){if(e(this,p).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},A=new WeakMap,$=new WeakMap,O=new WeakMap,q=new WeakMap,m.stack=new se;let M=m;F.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",M);var h,y,V,I,H,z;class Z extends HTMLElement{constructor(){super();o(this,h);o(this,y,new v.CSSProperty(this,"--type","open"));o(this,V,()=>{this.classList.add("triggered")});o(this,I,()=>{this.classList.add("opened"),this.setAttribute("aria-expanded","true")});o(this,H,()=>{this.classList.remove("opened")});o(this,z,()=>{this.classList.remove("triggered"),this.setAttribute("aria-expanded","false")});F.isBrowser&&(this.addEventListener("click",()=>{if(e(this,h)){const t=e(this,y).current;t==="open"||t==="toggle"&&!e(this,h).opened?e(this,h).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,h).opened)&&e(this,h).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&t.currentTarget.click()}))}get type(){return e(this,y)}get popoverElement(){return e(this,h)}connectedCallback(){var s;e(this,y).subscribe(i=>{e(this,h)instanceof M&&(i.current!=="close"?(this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",e(this,h).opened?"true":"false"),this.setAttribute("aria-controls",e(this,h).id||"")):(this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))}),this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");if(t){let i=null;if(t==="parent"){const a=this.closest("[popover-target]");if(a)i=a;else{const R=this.getRootNode();R instanceof ShadowRoot?i=R.host.closest("[popover-target]"):R instanceof HTMLElement&&(i=R.closest("[popover-target]"))}}else t==="sibling"?i=(s=this.parentElement)==null?void 0:s.querySelector("[popover-target]"):i=document.querySelector(`#${t}`)||this.getRootNode().querySelector(`#${t}`);i instanceof HTMLElement?(n(this,h,i),e(this,h).addEventListener("popoverTriggered",e(this,V)),e(this,h).addEventListener("popoverOpened",e(this,I)),e(this,h).addEventListener("popoverClosing",e(this,H)),e(this,h).addEventListener("popoverClosed",e(this,z))):console.warn(this,`target ${t} not found`)}this.isConnected&&e(this,y).observe()}disconnectedCallback(){e(this,y).unobserve(),this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),e(this,h)&&(e(this,h).removeEventListener("popoverTriggered",e(this,V)),e(this,h).removeEventListener("popoverOpened",e(this,I)),e(this,h).removeEventListener("popoverClosing",e(this,H)),e(this,h).removeEventListener("popoverClosed",e(this,z)))}}h=new WeakMap,y=new WeakMap,V=new WeakMap,I=new WeakMap,H=new WeakMap,z=new WeakMap;F.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",Z);exports.PopoverButtonElement=Z;exports.PopoverElement=M;
1
+ "use strict";var Z=c=>{throw TypeError(c)};var J=(c,r,t)=>r.has(c)||Z("Cannot "+t);var e=(c,r,t)=>(J(c,r,"read from private field"),t?t.call(c):r.get(c)),i=(c,r,t)=>r.has(c)?Z("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(c):r.set(c,t),n=(c,r,t,s)=>(J(c,r,"write to private field"),s?s.call(c,t):r.set(c,t),t),m=(c,r,t)=>(J(c,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const se=require("../class-linked-status/index.cjs"),b=require("../css-property/index.cjs"),X=require("../index-Cqw2NKev.cjs"),U=require("../events-KVanG9sR.cjs"),ie=require("../function-MthRj-GJ.cjs"),re=require("../style-At6aDoqG.cjs"),I=require("../url-CLvdjbII.cjs"),N=require("../window-resizer/index.cjs");var a,f,D,F;class oe{constructor(){i(this,a,new Map);i(this,f,[]);i(this,D,r=>{var s;const t=[...e(this,f)].reverse().find(o=>o.clickOutside.current);if(t){const o=r.composedPath();if(o.find(Y=>Y instanceof HTMLElement&&Y.hasAttribute("data-popover-content")))return;const l=o[0],q=l instanceof Node&&(t.contains(l)||((s=t.shadowRoot)==null?void 0:s.contains(l))),te=l instanceof HTMLElement&&l.hasAttribute("data-outside");(!q||te)&&t.close()}});i(this,F,r=>{if(r.code==="Escape"){const t=[...e(this,f)].reverse().find(s=>s.escape.current);t&&t.close()}});addEventListener("click",e(this,D)),addEventListener("keydown",e(this,F))}get groups(){return e(this,a)}get stack(){return e(this,f)}add(r,t){if(t.closeRest.current)e(this,a).forEach(o=>{o.forEach(l=>{l.close()})});else if(t.closeRestInGroup.current){let o=e(this,a).get(r);o==null||o.forEach(l=>{l.close()})}let s=e(this,a).get(r);s!=null&&s.length||(s=[],e(this,a).set(r,s)),e(this,f).push(t),s.push(t)}remove(r,t){if(n(this,f,e(this,f).filter(s=>s!==t)),t.closeRest.current){let s=[];e(this,a).forEach(o=>{o.forEach(l=>s.push(l))}),e(this,a).clear(),s.forEach(o=>o.close())}else if(t.closeRestInGroup.current){const s=e(this,a).get(r);e(this,a).delete(r),s==null||s.forEach(o=>{o.close()})}else{let s=e(this,a).get(r);s&&(s=s.filter(o=>o!==t),e(this,a).set(r,s))}}}a=new WeakMap,f=new WeakMap,D=new WeakMap,F=new WeakMap;var p,$,T,d,y,P,k,g,C,A,L,R,u,S,_,j,x,M,H,O;const E=class E extends HTMLElement{constructor(){super();i(this,S);i(this,p);i(this,$);i(this,T);i(this,d);i(this,y);i(this,P);i(this,k);i(this,g);i(this,C);i(this,A);i(this,L);i(this,R);i(this,u);i(this,x);i(this,M);i(this,H);i(this,O);this.urlValue="",n(this,p,!1),n(this,d,new b.CSSProperty(this,"--history",!1)),n(this,y,new b.CSSProperty(this,"--restore",!1)),n(this,P,new b.CSSProperty(this,"--close-rest",!1)),n(this,k,new b.CSSProperty(this,"--close-rest-in-group",!1)),n(this,g,new b.CSSProperty(this,"--group","")),n(this,C,new b.CSSProperty(this,"--click-outside",!1)),n(this,A,new b.CSSProperty(this,"--escape",!1)),n(this,L,!1),n(this,u,new se.ClassLinkedStatus(this,{opened:!1,closing:!1,triggered:!1})),n(this,x,()=>{n(this,L,!1),e(this,p)&&e(this,d).current&&!location.search.includes(this.id)?this.close():!e(this,p)&&e(this,d).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),n(this,L,!0)}),n(this,M,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),e(this,H).call(this)}),n(this,H,ie.debounce(()=>{e(this,O).call(this)},10)),n(this,O,()=>{this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px")}),e(this,g).subscribe(t=>{t.previous&&(E.stack.remove(t.previous,this),t.current||(document.documentElement.classList.remove(`${this.group.previous}-closing`),document.documentElement.classList.remove(`${this.group.previous}-opened`)))}),e(this,u).subscribe(t=>{if(this.group.current){document.documentElement.classList.toggle(`${this.group.current}-closing`,t.current.closing);const s=E.stack.groups.get(this.group.current),o=s==null?void 0:s.find(l=>l.opened);document.documentElement.classList.toggle(`${this.group.current}-opened`,!!o)}})}get history(){return e(this,d)}get restore(){return e(this,y)}get closeRest(){return e(this,P)}get closeRestInGroup(){return e(this,k)}get group(){return e(this,g)}get clickOutside(){return e(this,C)}get escape(){return e(this,A)}get opened(){return e(this,p)}get lastTrigger(){return e(this,R)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,p)&&I.updateSearchParameter(this.id,t)}open(t){if(e(this,p))return;n(this,R,t==null?void 0:t.trigger),clearTimeout(e(this,$)),e(this,u).set("closing",!1),e(this,u).set("triggered",!0),U.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,R)}}),e(this,d).current&&e(this,L)&&history.pushState(history.state,"",e(this,S,_)),n(this,p,!0);const s=()=>{E.stack.add(e(this,g).current,this),e(this,O).call(this),e(this,u).set("opened",!0),U.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,R)}}),n(this,T,void 0)};t!=null&&t.skipTransition?s():n(this,T,setTimeout(s,10))}close(){e(this,p)&&(clearTimeout(e(this,T)),E.stack.remove(e(this,g).current,this),n(this,p,!1),m(this,S,j).call(this),e(this,u).set("opened",!1),e(this,u).set("closing",!0),U.dispatchEvent(this,"popoverClosing",{custom:!0}),n(this,$,setTimeout(()=>{e(this,u).set("triggered",!1),e(this,u).set("closing",!1),U.dispatchEvent(this,"popoverClosed",{custom:!0})},re.getElementTransitionDurationMS(this)+10)))}connectedCallback(){e(this,d).observe(),e(this,y).observe(),e(this,P).observe(),e(this,k).observe(),e(this,g).observe(),e(this,C).observe(),e(this,A).observe(),this.setAttribute("role","dialog"),addEventListener("popstate",e(this,x)),setTimeout(()=>{e(this,y).current?(this.urlValue=I.parseSearchParameters(location.search)[this.id],e(this,x).call(this)):(m(this,S,j).call(this),n(this,L,!0))},0),N.windowResizer.subscribe(e(this,M))}disconnectedCallback(){E.stack.remove(e(this,g).current,this),N.windowResizer.unsubscribe(e(this,M)),e(this,u).close(),e(this,d).close(),e(this,y).close(),e(this,P).close(),e(this,k).close(),e(this,g).close(),e(this,C).close(),e(this,A).close(),this.removeAttribute("role"),clearTimeout(e(this,$)),clearTimeout(e(this,T)),removeEventListener("popstate",e(this,x)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),m(this,S,j).call(this)}};p=new WeakMap,$=new WeakMap,T=new WeakMap,d=new WeakMap,y=new WeakMap,P=new WeakMap,k=new WeakMap,g=new WeakMap,C=new WeakMap,A=new WeakMap,L=new WeakMap,R=new WeakMap,u=new WeakMap,S=new WeakSet,_=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},j=function(){if(e(this,d).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},x=new WeakMap,M=new WeakMap,H=new WeakMap,O=new WeakMap,E.stack=new oe;let V=E;X.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",V);var h,v,w,K,z,W,B,G,Q;class ee extends HTMLElement{constructor(){super();i(this,w);i(this,h);i(this,v,new b.CSSProperty(this,"--type","open"));i(this,z,()=>{this.classList.add("triggered")});i(this,W,()=>{this.classList.add("opened"),this.setAttribute("aria-expanded","true")});i(this,B,()=>{this.classList.remove("opened")});i(this,G,()=>{this.classList.remove("triggered"),this.setAttribute("aria-expanded","false")});X.isBrowser&&(this.addEventListener("click",()=>{if(e(this,h)){const t=e(this,v).current;t==="open"||t==="toggle"&&!e(this,h).opened?e(this,h).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,h).opened)&&e(this,h).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&t.currentTarget.click()}))}get type(){return e(this,v)}get popoverElement(){return e(this,h)}changePopover(t){var s;if(m(this,w,K).call(this),t){let o=null;if(t==="parent"){const l=this.closest("[popover-target]");if(l)o=l;else{const q=this.getRootNode();q instanceof ShadowRoot?o=q.host.closest("[popover-target]"):q instanceof HTMLElement&&(o=q.closest("[popover-target]"))}}else t==="sibling"?o=(s=this.parentElement)==null?void 0:s.querySelector("[popover-target]"):(!t.startsWith(".")&&!t.startsWith("[")&&(t=`#${t}`),o=document.querySelector(t)||this.getRootNode().querySelector(t));o instanceof HTMLElement?(n(this,h,o),e(this,h).addEventListener("popoverTriggered",e(this,z)),e(this,h).addEventListener("popoverOpened",e(this,W)),e(this,h).addEventListener("popoverClosing",e(this,B)),e(this,h).addEventListener("popoverClosed",e(this,G))):console.warn(this,`target ${t} not found`)}m(this,w,Q).call(this,e(this,v).current)}connectedCallback(){e(this,v).subscribe(s=>{m(this,w,Q).call(this,s.current)}),this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");t&&this.changePopover(t),this.isConnected&&e(this,v).observe()}disconnectedCallback(){e(this,v).unobserve(),this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),m(this,w,K).call(this)}}h=new WeakMap,v=new WeakMap,w=new WeakSet,K=function(){e(this,h)&&(e(this,h).removeEventListener("popoverTriggered",e(this,z)),e(this,h).removeEventListener("popoverOpened",e(this,W)),e(this,h).removeEventListener("popoverClosing",e(this,B)),e(this,h).removeEventListener("popoverClosed",e(this,G)))},z=new WeakMap,W=new WeakMap,B=new WeakMap,G=new WeakMap,Q=function(t){e(this,h)instanceof V&&(t!=="close"?(this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",e(this,h).opened?"true":"false"),this.setAttribute("aria-controls",e(this,h).id||"")):(this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))};X.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",ee);exports.PopoverButtonElement=ee;exports.PopoverElement=V;
@@ -1,122 +1,122 @@
1
- var K = (c) => {
1
+ var Z = (c) => {
2
2
  throw TypeError(c);
3
3
  };
4
- var j = (c, r, t) => r.has(c) || K("Cannot " + t);
5
- var e = (c, r, t) => (j(c, r, "read from private field"), t ? t.call(c) : r.get(c)), o = (c, r, t) => r.has(c) ? K("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(c) : r.set(c, t), h = (c, r, t, s) => (j(c, r, "write to private field"), s ? s.call(c, t) : r.set(c, t), t), z = (c, r, t) => (j(c, r, "access private method"), t);
6
- import { ClassLinkedStatus as Z } from "../class-linked-status/index.js";
7
- import { CSSProperty as m } from "../css-property/index.js";
8
- import { i as F } from "../index-euf5anj6.js";
9
- import { d as W } from "../events-CsVF98U6.js";
10
- import { d as N } from "../function-C10DGppn.js";
11
- import { g as _ } from "../style-j2TwriJ_.js";
12
- import { u as ee, p as te } from "../url-CfcHdBT6.js";
13
- import { windowResizer as Q } from "../window-resizer/index.js";
14
- var l, f, U, D;
15
- class se {
4
+ var J = (c, r, t) => r.has(c) || Z("Cannot " + t);
5
+ var e = (c, r, t) => (J(c, r, "read from private field"), t ? t.call(c) : r.get(c)), i = (c, r, t) => r.has(c) ? Z("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(c) : r.set(c, t), h = (c, r, t, s) => (J(c, r, "write to private field"), s ? s.call(c, t) : r.set(c, t), t), m = (c, r, t) => (J(c, r, "access private method"), t);
6
+ import { ClassLinkedStatus as ee } from "../class-linked-status/index.js";
7
+ import { CSSProperty as b } from "../css-property/index.js";
8
+ import { i as X } from "../index-euf5anj6.js";
9
+ import { d as B } from "../events-CsVF98U6.js";
10
+ import { d as te } from "../function-C10DGppn.js";
11
+ import { g as se } from "../style-j2TwriJ_.js";
12
+ import { u as ie, p as re } from "../url-CfcHdBT6.js";
13
+ import { windowResizer as I } from "../window-resizer/index.js";
14
+ var l, g, j, F;
15
+ class oe {
16
16
  constructor() {
17
- o(this, l, /* @__PURE__ */ new Map());
18
- o(this, f, []);
19
- o(this, U, (r) => {
17
+ i(this, l, /* @__PURE__ */ new Map());
18
+ i(this, g, []);
19
+ i(this, j, (r) => {
20
20
  var s;
21
- const t = [...e(this, f)].reverse().find((i) => i.clickOutside.current);
21
+ const t = [...e(this, g)].reverse().find((o) => o.clickOutside.current);
22
22
  if (t) {
23
- const i = r.composedPath();
24
- if (i.find(
25
- (J) => J instanceof HTMLElement && J.hasAttribute("data-popover-content")
23
+ const o = r.composedPath();
24
+ if (o.find(
25
+ (Y) => Y instanceof HTMLElement && Y.hasAttribute("data-popover-content")
26
26
  ))
27
27
  return;
28
- const a = i[0], P = a instanceof Node && (t.contains(a) || ((s = t.shadowRoot) == null ? void 0 : s.contains(a))), Y = a instanceof HTMLElement && a.hasAttribute("data-outside");
29
- (!P || Y) && t.close();
28
+ const a = o[0], $ = a instanceof Node && (t.contains(a) || ((s = t.shadowRoot) == null ? void 0 : s.contains(a))), _ = a instanceof HTMLElement && a.hasAttribute("data-outside");
29
+ (!$ || _) && t.close();
30
30
  }
31
31
  });
32
- o(this, D, (r) => {
32
+ i(this, F, (r) => {
33
33
  if (r.code === "Escape") {
34
- const t = [...e(this, f)].reverse().find((s) => s.escape.current);
34
+ const t = [...e(this, g)].reverse().find((s) => s.escape.current);
35
35
  t && t.close();
36
36
  }
37
37
  });
38
- addEventListener("click", e(this, U)), addEventListener("keydown", e(this, D));
38
+ addEventListener("click", e(this, j)), addEventListener("keydown", e(this, F));
39
39
  }
40
40
  get groups() {
41
41
  return e(this, l);
42
42
  }
43
43
  get stack() {
44
- return e(this, f);
44
+ return e(this, g);
45
45
  }
46
46
  add(r, t) {
47
47
  if (t.closeRest.current)
48
- e(this, l).forEach((i) => {
49
- i.forEach((a) => {
48
+ e(this, l).forEach((o) => {
49
+ o.forEach((a) => {
50
50
  a.close();
51
51
  });
52
52
  });
53
53
  else if (t.closeRestInGroup.current) {
54
- let i = e(this, l).get(r);
55
- i == null || i.forEach((a) => {
54
+ let o = e(this, l).get(r);
55
+ o == null || o.forEach((a) => {
56
56
  a.close();
57
57
  });
58
58
  }
59
59
  let s = e(this, l).get(r);
60
- s != null && s.length || (s = [], e(this, l).set(r, s)), e(this, f).push(t), s.push(t);
60
+ s != null && s.length || (s = [], e(this, l).set(r, s)), e(this, g).push(t), s.push(t);
61
61
  }
62
62
  remove(r, t) {
63
- if (h(this, f, e(this, f).filter((s) => s !== t)), t.closeRest.current) {
63
+ if (h(this, g, e(this, g).filter((s) => s !== t)), t.closeRest.current) {
64
64
  let s = [];
65
- e(this, l).forEach((i) => {
66
- i.forEach((a) => s.push(a));
67
- }), e(this, l).clear(), s.forEach((i) => i.close());
65
+ e(this, l).forEach((o) => {
66
+ o.forEach((a) => s.push(a));
67
+ }), e(this, l).clear(), s.forEach((o) => o.close());
68
68
  } else if (t.closeRestInGroup.current) {
69
69
  const s = e(this, l).get(r);
70
- e(this, l).delete(r), s == null || s.forEach((i) => {
71
- i.close();
70
+ e(this, l).delete(r), s == null || s.forEach((o) => {
71
+ o.close();
72
72
  });
73
73
  } else {
74
74
  let s = e(this, l).get(r);
75
- s && (s = s.filter((i) => i !== t), e(this, l).set(r, s));
75
+ s && (s = s.filter((o) => o !== t), e(this, l).set(r, s));
76
76
  }
77
77
  }
78
78
  }
79
- l = new WeakMap(), f = new WeakMap(), U = new WeakMap(), D = new WeakMap();
80
- var p, x, T, d, b, k, w, g, A, S, E, C, u, y, X, q, R, $, I, V;
81
- const v = class v extends HTMLElement {
79
+ l = new WeakMap(), g = new WeakMap(), j = new WeakMap(), F = new WeakMap();
80
+ var p, V, w, d, L, A, P, f, S, C, y, R, u, T, N, U, x, M, H, O;
81
+ const E = class E extends HTMLElement {
82
82
  constructor() {
83
83
  super();
84
- o(this, y);
85
- o(this, p);
86
- o(this, x);
87
- o(this, T);
88
- o(this, d);
89
- o(this, b);
90
- o(this, k);
91
- o(this, w);
92
- o(this, g);
93
- o(this, A);
94
- o(this, S);
95
- o(this, E);
96
- o(this, C);
97
- o(this, u);
98
- o(this, R);
99
- o(this, $);
100
- o(this, I);
101
- o(this, V);
102
- this.urlValue = "", h(this, p, !1), h(this, d, new m(this, "--history", !1)), h(this, b, new m(this, "--restore", !1)), h(this, k, new m(this, "--close-rest", !1)), h(this, w, new m(
84
+ i(this, T);
85
+ i(this, p);
86
+ i(this, V);
87
+ i(this, w);
88
+ i(this, d);
89
+ i(this, L);
90
+ i(this, A);
91
+ i(this, P);
92
+ i(this, f);
93
+ i(this, S);
94
+ i(this, C);
95
+ i(this, y);
96
+ i(this, R);
97
+ i(this, u);
98
+ i(this, x);
99
+ i(this, M);
100
+ i(this, H);
101
+ i(this, O);
102
+ this.urlValue = "", h(this, p, !1), h(this, d, new b(this, "--history", !1)), h(this, L, new b(this, "--restore", !1)), h(this, A, new b(this, "--close-rest", !1)), h(this, P, new b(
103
103
  this,
104
104
  "--close-rest-in-group",
105
105
  !1
106
- )), h(this, g, new m(this, "--group", "")), h(this, A, new m(this, "--click-outside", !1)), h(this, S, new m(this, "--escape", !1)), h(this, E, !1), h(this, u, new Z(this, {
106
+ )), h(this, f, new b(this, "--group", "")), h(this, S, new b(this, "--click-outside", !1)), h(this, C, new b(this, "--escape", !1)), h(this, y, !1), h(this, u, new ee(this, {
107
107
  opened: !1,
108
108
  closing: !1,
109
109
  triggered: !1
110
- })), h(this, R, () => {
111
- h(this, E, !1), e(this, p) && e(this, d).current && !location.search.includes(this.id) ? this.close() : !e(this, p) && e(this, d).current && location.search.includes(this.id) && this.open({ trigger: this.idWithValue }), h(this, E, !0);
112
- }), h(this, $, () => {
113
- this.style.setProperty("--content-width", "initial"), this.style.setProperty("--content-height", "initial"), e(this, I).call(this);
114
- }), h(this, I, N(() => {
115
- e(this, V).call(this);
116
- }, 10)), h(this, V, () => {
110
+ })), h(this, x, () => {
111
+ h(this, y, !1), e(this, p) && e(this, d).current && !location.search.includes(this.id) ? this.close() : !e(this, p) && e(this, d).current && location.search.includes(this.id) && this.open({ trigger: this.idWithValue }), h(this, y, !0);
112
+ }), h(this, M, () => {
113
+ this.style.setProperty("--content-width", "initial"), this.style.setProperty("--content-height", "initial"), e(this, H).call(this);
114
+ }), h(this, H, te(() => {
115
+ e(this, O).call(this);
116
+ }, 10)), h(this, O, () => {
117
117
  this.style.setProperty("--content-width", this.scrollWidth + "px"), this.style.setProperty("--content-height", this.scrollHeight + "px");
118
- }), e(this, g).subscribe((t) => {
119
- t.previous && (v.stack.remove(t.previous, this), t.current || (document.documentElement.classList.remove(
118
+ }), e(this, f).subscribe((t) => {
119
+ t.previous && (E.stack.remove(t.previous, this), t.current || (document.documentElement.classList.remove(
120
120
  `${this.group.previous}-closing`
121
121
  ), document.documentElement.classList.remove(
122
122
  `${this.group.previous}-opened`
@@ -127,10 +127,10 @@ const v = class v extends HTMLElement {
127
127
  `${this.group.current}-closing`,
128
128
  t.current.closing
129
129
  );
130
- const s = v.stack.groups.get(this.group.current), i = s == null ? void 0 : s.find((a) => a.opened);
130
+ const s = E.stack.groups.get(this.group.current), o = s == null ? void 0 : s.find((a) => a.opened);
131
131
  document.documentElement.classList.toggle(
132
132
  `${this.group.current}-opened`,
133
- !!i
133
+ !!o
134
134
  );
135
135
  }
136
136
  });
@@ -139,103 +139,104 @@ const v = class v extends HTMLElement {
139
139
  return e(this, d);
140
140
  }
141
141
  get restore() {
142
- return e(this, b);
142
+ return e(this, L);
143
143
  }
144
144
  get closeRest() {
145
- return e(this, k);
145
+ return e(this, A);
146
146
  }
147
147
  get closeRestInGroup() {
148
- return e(this, w);
148
+ return e(this, P);
149
149
  }
150
150
  get group() {
151
- return e(this, g);
151
+ return e(this, f);
152
152
  }
153
153
  get clickOutside() {
154
- return e(this, A);
154
+ return e(this, S);
155
155
  }
156
156
  get escape() {
157
- return e(this, S);
157
+ return e(this, C);
158
158
  }
159
159
  get opened() {
160
160
  return e(this, p);
161
161
  }
162
162
  get lastTrigger() {
163
- return e(this, C);
163
+ return e(this, R);
164
164
  }
165
165
  get idWithValue() {
166
166
  return `${this.id}${this.urlValue ? "=" + this.urlValue : ""}`;
167
167
  }
168
168
  updateUrlValue(t) {
169
- this.urlValue = (t == null ? void 0 : t.toString()) || "", e(this, p) && ee(this.id, t);
169
+ this.urlValue = (t == null ? void 0 : t.toString()) || "", e(this, p) && ie(this.id, t);
170
170
  }
171
171
  open(t) {
172
172
  if (e(this, p))
173
173
  return;
174
- h(this, C, t == null ? void 0 : t.trigger), clearTimeout(e(this, x)), e(this, u).set("closing", !1), e(this, u).set("triggered", !0), W(this, "popoverTriggered", {
174
+ h(this, R, t == null ? void 0 : t.trigger), clearTimeout(e(this, V)), e(this, u).set("closing", !1), e(this, u).set("triggered", !0), B(this, "popoverTriggered", {
175
175
  custom: !0,
176
176
  detail: {
177
- trigger: e(this, C)
177
+ trigger: e(this, R)
178
178
  }
179
- }), e(this, d).current && e(this, E) && history.pushState(history.state, "", e(this, y, X)), h(this, p, !0);
179
+ }), e(this, d).current && e(this, y) && history.pushState(history.state, "", e(this, T, N)), h(this, p, !0);
180
180
  const s = () => {
181
- v.stack.add(e(this, g).current, this), e(this, V).call(this), e(this, u).set("opened", !0), W(this, "popoverOpened", {
181
+ E.stack.add(e(this, f).current, this), e(this, O).call(this), e(this, u).set("opened", !0), B(this, "popoverOpened", {
182
182
  custom: !0,
183
183
  detail: {
184
- trigger: e(this, C)
184
+ trigger: e(this, R)
185
185
  }
186
- }), h(this, T, void 0);
186
+ }), h(this, w, void 0);
187
187
  };
188
- t != null && t.skipTransition ? s() : h(this, T, setTimeout(s, 10));
188
+ t != null && t.skipTransition ? s() : h(this, w, setTimeout(s, 10));
189
189
  }
190
190
  close() {
191
- e(this, p) && (clearTimeout(e(this, T)), v.stack.remove(e(this, g).current, this), h(this, p, !1), z(this, y, q).call(this), e(this, u).set("opened", !1), e(this, u).set("closing", !0), W(this, "popoverClosing", {
191
+ e(this, p) && (clearTimeout(e(this, w)), E.stack.remove(e(this, f).current, this), h(this, p, !1), m(this, T, U).call(this), e(this, u).set("opened", !1), e(this, u).set("closing", !0), B(this, "popoverClosing", {
192
192
  custom: !0
193
- }), h(this, x, setTimeout(() => {
194
- e(this, u).set("triggered", !1), e(this, u).set("closing", !1), W(this, "popoverClosed", {
193
+ }), h(this, V, setTimeout(() => {
194
+ e(this, u).set("triggered", !1), e(this, u).set("closing", !1), B(this, "popoverClosed", {
195
195
  custom: !0
196
196
  });
197
- }, _(this) + 10)));
197
+ }, se(this) + 10)));
198
198
  }
199
199
  connectedCallback() {
200
- e(this, d).observe(), e(this, b).observe(), e(this, k).observe(), e(this, w).observe(), e(this, g).observe(), e(this, A).observe(), e(this, S).observe(), this.setAttribute("role", "dialog"), addEventListener("popstate", e(this, R)), setTimeout(() => {
201
- e(this, b).current ? (this.urlValue = te(location.search)[this.id], e(this, R).call(this)) : (z(this, y, q).call(this), h(this, E, !0));
202
- }, 0), Q.subscribe(e(this, $));
200
+ e(this, d).observe(), e(this, L).observe(), e(this, A).observe(), e(this, P).observe(), e(this, f).observe(), e(this, S).observe(), e(this, C).observe(), this.setAttribute("role", "dialog"), addEventListener("popstate", e(this, x)), setTimeout(() => {
201
+ e(this, L).current ? (this.urlValue = re(location.search)[this.id], e(this, x).call(this)) : (m(this, T, U).call(this), h(this, y, !0));
202
+ }, 0), I.subscribe(e(this, M));
203
203
  }
204
204
  disconnectedCallback() {
205
- v.stack.remove(e(this, g).current, this), Q.unsubscribe(e(this, $)), e(this, u).close(), e(this, d).close(), e(this, b).close(), e(this, k).close(), e(this, w).close(), e(this, g).close(), e(this, A).close(), e(this, S).close(), this.removeAttribute("role"), clearTimeout(e(this, x)), clearTimeout(e(this, T)), removeEventListener("popstate", e(this, R)), this.style.removeProperty("--content-width"), this.style.removeProperty("--content-height"), z(this, y, q).call(this);
205
+ E.stack.remove(e(this, f).current, this), I.unsubscribe(e(this, M)), e(this, u).close(), e(this, d).close(), e(this, L).close(), e(this, A).close(), e(this, P).close(), e(this, f).close(), e(this, S).close(), e(this, C).close(), this.removeAttribute("role"), clearTimeout(e(this, V)), clearTimeout(e(this, w)), removeEventListener("popstate", e(this, x)), this.style.removeProperty("--content-width"), this.style.removeProperty("--content-height"), m(this, T, U).call(this);
206
206
  }
207
207
  };
208
- p = new WeakMap(), x = new WeakMap(), T = new WeakMap(), d = new WeakMap(), b = new WeakMap(), k = new WeakMap(), w = new WeakMap(), g = new WeakMap(), A = new WeakMap(), S = new WeakMap(), E = new WeakMap(), C = new WeakMap(), u = new WeakMap(), y = new WeakSet(), X = function() {
208
+ p = new WeakMap(), V = new WeakMap(), w = new WeakMap(), d = new WeakMap(), L = new WeakMap(), A = new WeakMap(), P = new WeakMap(), f = new WeakMap(), S = new WeakMap(), C = new WeakMap(), y = new WeakMap(), R = new WeakMap(), u = new WeakMap(), T = new WeakSet(), N = function() {
209
209
  return `${location.pathname}${location.search ? location.search + "&" : "?"}${this.idWithValue}`;
210
- }, q = function() {
210
+ }, U = function() {
211
211
  if (e(this, d).current) {
212
212
  const t = new URL(location.href);
213
213
  t.searchParams.delete(this.id), history.replaceState(history.state, "", t.href);
214
214
  }
215
- }, R = new WeakMap(), $ = new WeakMap(), I = new WeakMap(), V = new WeakMap(), v.stack = new se();
216
- let B = v;
217
- F && !customElements.get("e-popover") && customElements.define("e-popover", B);
218
- var n, L, M, O, H, G;
219
- class ie extends HTMLElement {
215
+ }, x = new WeakMap(), M = new WeakMap(), H = new WeakMap(), O = new WeakMap(), E.stack = new oe();
216
+ let D = E;
217
+ X && !customElements.get("e-popover") && customElements.define("e-popover", D);
218
+ var n, v, k, K, W, G, z, q, Q;
219
+ class he extends HTMLElement {
220
220
  constructor() {
221
221
  super();
222
- o(this, n);
223
- o(this, L, new m(this, "--type", "open"));
224
- o(this, M, () => {
222
+ i(this, k);
223
+ i(this, n);
224
+ i(this, v, new b(this, "--type", "open"));
225
+ i(this, W, () => {
225
226
  this.classList.add("triggered");
226
227
  });
227
- o(this, O, () => {
228
+ i(this, G, () => {
228
229
  this.classList.add("opened"), this.setAttribute("aria-expanded", "true");
229
230
  });
230
- o(this, H, () => {
231
+ i(this, z, () => {
231
232
  this.classList.remove("opened");
232
233
  });
233
- o(this, G, () => {
234
+ i(this, q, () => {
234
235
  this.classList.remove("triggered"), this.setAttribute("aria-expanded", "false");
235
236
  });
236
- F && (this.addEventListener("click", () => {
237
+ X && (this.addEventListener("click", () => {
237
238
  if (e(this, n)) {
238
- const t = e(this, L).current;
239
+ const t = e(this, v).current;
239
240
  t === "open" || t === "toggle" && !e(this, n).opened ? e(this, n).open({ trigger: this }) : (t === "close" || t === "toggle" && e(this, n).opened) && e(this, n).close();
240
241
  }
241
242
  }), this.addEventListener("keydown", (t) => {
@@ -243,66 +244,73 @@ class ie extends HTMLElement {
243
244
  }));
244
245
  }
245
246
  get type() {
246
- return e(this, L);
247
+ return e(this, v);
247
248
  }
248
249
  get popoverElement() {
249
250
  return e(this, n);
250
251
  }
251
- connectedCallback() {
252
+ changePopover(t) {
252
253
  var s;
253
- e(this, L).subscribe((i) => {
254
- e(this, n) instanceof B && (i.current !== "close" ? (this.setAttribute("aria-haspopup", "true"), this.setAttribute(
255
- "aria-expanded",
256
- e(this, n).opened ? "true" : "false"
257
- ), this.setAttribute("aria-controls", e(this, n).id || "")) : (this.removeAttribute("aria-haspopup"), this.removeAttribute("aria-expanded"), this.removeAttribute("aria-controls")));
258
- }), this.hasAttribute("tabindex") || (this.tabIndex = 0);
259
- const t = this.getAttribute("target");
260
- if (t) {
261
- let i = null;
254
+ if (m(this, k, K).call(this), t) {
255
+ let o = null;
262
256
  if (t === "parent") {
263
257
  const a = this.closest("[popover-target]");
264
258
  if (a)
265
- i = a;
259
+ o = a;
266
260
  else {
267
- const P = this.getRootNode();
268
- P instanceof ShadowRoot ? i = P.host.closest("[popover-target]") : P instanceof HTMLElement && (i = P.closest("[popover-target]"));
261
+ const $ = this.getRootNode();
262
+ $ instanceof ShadowRoot ? o = $.host.closest("[popover-target]") : $ instanceof HTMLElement && (o = $.closest("[popover-target]"));
269
263
  }
270
- } else t === "sibling" ? i = (s = this.parentElement) == null ? void 0 : s.querySelector("[popover-target]") : i = document.querySelector(`#${t}`) || this.getRootNode().querySelector(`#${t}`);
271
- i instanceof HTMLElement ? (h(this, n, i), e(this, n).addEventListener(
264
+ } else t === "sibling" ? o = (s = this.parentElement) == null ? void 0 : s.querySelector("[popover-target]") : (!t.startsWith(".") && !t.startsWith("[") && (t = `#${t}`), o = document.querySelector(t) || this.getRootNode().querySelector(t));
265
+ o instanceof HTMLElement ? (h(this, n, o), e(this, n).addEventListener(
272
266
  "popoverTriggered",
273
- e(this, M)
267
+ e(this, W)
274
268
  ), e(this, n).addEventListener(
275
269
  "popoverOpened",
276
- e(this, O)
270
+ e(this, G)
277
271
  ), e(this, n).addEventListener(
278
272
  "popoverClosing",
279
- e(this, H)
273
+ e(this, z)
280
274
  ), e(this, n).addEventListener(
281
275
  "popoverClosed",
282
- e(this, G)
276
+ e(this, q)
283
277
  )) : console.warn(this, `target ${t} not found`);
284
278
  }
285
- this.isConnected && e(this, L).observe();
279
+ m(this, k, Q).call(this, e(this, v).current);
280
+ }
281
+ connectedCallback() {
282
+ e(this, v).subscribe((s) => {
283
+ m(this, k, Q).call(this, s.current);
284
+ }), this.hasAttribute("tabindex") || (this.tabIndex = 0);
285
+ const t = this.getAttribute("target");
286
+ t && this.changePopover(t), this.isConnected && e(this, v).observe();
286
287
  }
287
288
  disconnectedCallback() {
288
- e(this, L).unobserve(), this.removeAttribute("aria-haspopup"), this.removeAttribute("aria-expanded"), this.removeAttribute("aria-controls"), e(this, n) && (e(this, n).removeEventListener(
289
- "popoverTriggered",
290
- e(this, M)
291
- ), e(this, n).removeEventListener(
292
- "popoverOpened",
293
- e(this, O)
294
- ), e(this, n).removeEventListener(
295
- "popoverClosing",
296
- e(this, H)
297
- ), e(this, n).removeEventListener(
298
- "popoverClosed",
299
- e(this, G)
300
- ));
289
+ e(this, v).unobserve(), this.removeAttribute("aria-haspopup"), this.removeAttribute("aria-expanded"), this.removeAttribute("aria-controls"), m(this, k, K).call(this);
301
290
  }
302
291
  }
303
- n = new WeakMap(), L = new WeakMap(), M = new WeakMap(), O = new WeakMap(), H = new WeakMap(), G = new WeakMap();
304
- F && !customElements.get("e-popover-button") && customElements.define("e-popover-button", ie);
292
+ n = new WeakMap(), v = new WeakMap(), k = new WeakSet(), K = function() {
293
+ e(this, n) && (e(this, n).removeEventListener(
294
+ "popoverTriggered",
295
+ e(this, W)
296
+ ), e(this, n).removeEventListener(
297
+ "popoverOpened",
298
+ e(this, G)
299
+ ), e(this, n).removeEventListener(
300
+ "popoverClosing",
301
+ e(this, z)
302
+ ), e(this, n).removeEventListener(
303
+ "popoverClosed",
304
+ e(this, q)
305
+ ));
306
+ }, W = new WeakMap(), G = new WeakMap(), z = new WeakMap(), q = new WeakMap(), Q = function(t) {
307
+ e(this, n) instanceof D && (t !== "close" ? (this.setAttribute("aria-haspopup", "true"), this.setAttribute(
308
+ "aria-expanded",
309
+ e(this, n).opened ? "true" : "false"
310
+ ), this.setAttribute("aria-controls", e(this, n).id || "")) : (this.removeAttribute("aria-haspopup"), this.removeAttribute("aria-expanded"), this.removeAttribute("aria-controls")));
311
+ };
312
+ X && !customElements.get("e-popover-button") && customElements.define("e-popover-button", he);
305
313
  export {
306
- ie as PopoverButtonElement,
307
- B as PopoverElement
314
+ he as PopoverButtonElement,
315
+ D as PopoverElement
308
316
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.50.8",
3
+ "version": "0.50.9",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"