diff --git a/examples/Button/index.html b/examples/Button/index.html index 8ee6ee24..fd747f4e 100644 --- a/examples/Button/index.html +++ b/examples/Button/index.html @@ -35,10 +35,11 @@ } - - - - + + + + + diff --git a/examples/Checkbox/index.html b/examples/Checkbox/index.html index 891a1393..3e79e4ae 100644 --- a/examples/Checkbox/index.html +++ b/examples/Checkbox/index.html @@ -15,10 +15,11 @@ } - - - - + + + + + diff --git a/examples/ClassificationsTree/index.html b/examples/ClassificationsTree/index.html index de34da01..d16e9beb 100644 --- a/examples/ClassificationsTree/index.html +++ b/examples/ClassificationsTree/index.html @@ -23,10 +23,11 @@ } - - - - + + + + + diff --git a/examples/ColorInput/index.html b/examples/ColorInput/index.html index ccf26568..8f096cfc 100644 --- a/examples/ColorInput/index.html +++ b/examples/ColorInput/index.html @@ -19,10 +19,11 @@ } - - - - + + + + + diff --git a/examples/Component/index.html b/examples/Component/index.html index 81b0f7bb..a8c20d72 100644 --- a/examples/Component/index.html +++ b/examples/Component/index.html @@ -17,10 +17,11 @@ } - - - - + + + + + diff --git a/examples/ContextMenu/index.html b/examples/ContextMenu/index.html index bb620c05..0359002d 100644 --- a/examples/ContextMenu/index.html +++ b/examples/ContextMenu/index.html @@ -28,10 +28,11 @@ } - - - - + + + + + diff --git a/examples/Dropdown/index.html b/examples/Dropdown/index.html index d491e124..33f0db7c 100644 --- a/examples/Dropdown/index.html +++ b/examples/Dropdown/index.html @@ -25,10 +25,11 @@ } - - - - + + + + + diff --git a/examples/ElementProperties/index.html b/examples/ElementProperties/index.html index 39908752..9443b57d 100644 --- a/examples/ElementProperties/index.html +++ b/examples/ElementProperties/index.html @@ -27,9 +27,10 @@ } - - - + + + + diff --git a/examples/EntityAttributes/index.html b/examples/EntityAttributes/index.html index 196bfc1a..075785dc 100644 --- a/examples/EntityAttributes/index.html +++ b/examples/EntityAttributes/index.html @@ -33,9 +33,10 @@ } - - - + + + + diff --git a/examples/Grid/index.html b/examples/Grid/index.html index 1807b531..99f3072c 100644 --- a/examples/Grid/index.html +++ b/examples/Grid/index.html @@ -36,10 +36,11 @@ } - - - - + + + + + diff --git a/examples/Label/index.html b/examples/Label/index.html index d6c423e0..22e7fd07 100644 --- a/examples/Label/index.html +++ b/examples/Label/index.html @@ -20,10 +20,11 @@ } - - - - + + + + + diff --git a/examples/ModelsList/index.html b/examples/ModelsList/index.html index 5e1ed5c5..7d8dce8e 100644 --- a/examples/ModelsList/index.html +++ b/examples/ModelsList/index.html @@ -23,10 +23,11 @@ } - - - - + + + + + diff --git a/examples/NumberInput/index.html b/examples/NumberInput/index.html index 175c7ced..9d2369b8 100644 --- a/examples/NumberInput/index.html +++ b/examples/NumberInput/index.html @@ -19,10 +19,11 @@ } - - - - + + + + + diff --git a/examples/Panel/index.html b/examples/Panel/index.html index 450cf946..77665e17 100644 --- a/examples/Panel/index.html +++ b/examples/Panel/index.html @@ -42,10 +42,11 @@ } - - - - + + + + + diff --git a/examples/RelationsTree/index.html b/examples/RelationsTree/index.html index 36426244..07f7a5b4 100644 --- a/examples/RelationsTree/index.html +++ b/examples/RelationsTree/index.html @@ -23,10 +23,11 @@ } - - - - + + + + + diff --git a/examples/Selector/index.html b/examples/Selector/index.html index b04de033..0cad01c7 100644 --- a/examples/Selector/index.html +++ b/examples/Selector/index.html @@ -19,10 +19,11 @@ } - - - - + + + + + diff --git a/examples/Table/DataTransform/index.html b/examples/Table/DataTransform/index.html index 5ad27e57..ef1f37a9 100644 --- a/examples/Table/DataTransform/index.html +++ b/examples/Table/DataTransform/index.html @@ -22,10 +22,11 @@ } - - - - + + + + + diff --git a/examples/Table/ExportingData/index.html b/examples/Table/ExportingData/index.html index 7ef9c813..1a0f42ab 100644 --- a/examples/Table/ExportingData/index.html +++ b/examples/Table/ExportingData/index.html @@ -22,10 +22,11 @@ } - - - - + + + + + diff --git a/examples/Table/LoadFunction/index.html b/examples/Table/LoadFunction/index.html index 6f00ce7f..6876ba82 100644 --- a/examples/Table/LoadFunction/index.html +++ b/examples/Table/LoadFunction/index.html @@ -22,10 +22,11 @@ } - - - - + + + + + diff --git a/examples/Table/Searching/index.html b/examples/Table/Searching/index.html index c6a9a975..52b0929b 100644 --- a/examples/Table/Searching/index.html +++ b/examples/Table/Searching/index.html @@ -22,10 +22,11 @@ } - - - - + + + + + diff --git a/examples/Table/index.html b/examples/Table/index.html index 2c2dd6be..335e9d02 100644 --- a/examples/Table/index.html +++ b/examples/Table/index.html @@ -22,10 +22,11 @@ } - - - - + + + + + diff --git a/examples/Tabs/index.html b/examples/Tabs/index.html index 806b588e..8a32dc37 100644 --- a/examples/Tabs/index.html +++ b/examples/Tabs/index.html @@ -32,10 +32,11 @@ } - - - - + + + + + diff --git a/examples/TextInput/index.html b/examples/TextInput/index.html index 1115c46a..9d67ea3d 100644 --- a/examples/TextInput/index.html +++ b/examples/TextInput/index.html @@ -22,10 +22,11 @@ } - - - - + + + + + diff --git a/examples/Toolbar/index.html b/examples/Toolbar/index.html index 22db91d4..3f7f105d 100644 --- a/examples/Toolbar/index.html +++ b/examples/Toolbar/index.html @@ -19,10 +19,11 @@ } - - - - + + + + + diff --git a/examples/TopicForm/index.html b/examples/TopicForm/index.html index 688988ca..21dbf32a 100644 --- a/examples/TopicForm/index.html +++ b/examples/TopicForm/index.html @@ -26,9 +26,10 @@ } - - - + + + + diff --git a/examples/TopicsList/index.html b/examples/TopicsList/index.html index 5ae085dd..4458c0e2 100644 --- a/examples/TopicsList/index.html +++ b/examples/TopicsList/index.html @@ -37,8 +37,8 @@ } - - + + diff --git a/examples/ViewCube/index.html b/examples/ViewCube/index.html index 5803e413..2d017a6b 100644 --- a/examples/ViewCube/index.html +++ b/examples/ViewCube/index.html @@ -16,11 +16,12 @@ } - - - - - + + + + + + diff --git a/examples/World/index.html b/examples/World/index.html index 9637e64f..e0b1e929 100644 --- a/examples/World/index.html +++ b/examples/World/index.html @@ -18,11 +18,12 @@ } - - - - - + + + + + + diff --git a/examples/World2D/index.html b/examples/World2D/index.html index 3c5bc804..dcf22715 100644 --- a/examples/World2D/index.html +++ b/examples/World2D/index.html @@ -17,11 +17,12 @@ } - - - - - + + + + + + diff --git a/examples/WorldsConfiguration/index.html b/examples/WorldsConfiguration/index.html index 4b6dcc3f..45a5efc5 100644 --- a/examples/WorldsConfiguration/index.html +++ b/examples/WorldsConfiguration/index.html @@ -27,9 +27,10 @@ } - - - + + + + diff --git a/examples/assets/button.js b/examples/assets/button.js index 4c4dd546..f668c2a0 100644 --- a/examples/assets/button.js +++ b/examples/assets/button.js @@ -1 +1 @@ -import"./lit-element-CToom8Wf.js";import{M as t}from"./index-BCngLrVF.js";import"./state-H9kisBvQ.js";import"./ref-CyNRy2Tn.js";t.init();const e=document.body.querySelector("bim-button");e.addEventListener("click",()=>{alert("Your schedule has been created!")});const n=document.getElementById("context-btn");n.addEventListener("click",()=>{console.log("asdasd")}); +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as t}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";t.init();const e=document.body.querySelector("bim-button");e.addEventListener("click",()=>{alert("Your schedule has been created!")});const n=document.getElementById("context-btn");n.addEventListener("click",()=>{console.log("asdasd")}); diff --git a/examples/assets/checkbox.js b/examples/assets/checkbox.js index 41e50e11..f7e9326c 100644 --- a/examples/assets/checkbox.js +++ b/examples/assets/checkbox.js @@ -1 +1 @@ -import"./lit-element-CToom8Wf.js";import{M as t}from"./index-BCngLrVF.js";import"./state-H9kisBvQ.js";import"./ref-CyNRy2Tn.js";t.init();const e=document.body.querySelector("bim-checkbox");e.addEventListener("change",()=>{const{checked:o}=e;alert(o?"You want BIM Tiles! :)":"You don't want BIM Tiles :(")}); +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as t}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";t.init();const e=document.body.querySelector("bim-checkbox");e.addEventListener("change",()=>{const{checked:o}=e;alert(o?"You want BIM Tiles! :)":"You don't want BIM Tiles :(")}); diff --git a/examples/assets/classificationsTree.js b/examples/assets/classificationsTree.js index 274cccf7..e594faee 100644 --- a/examples/assets/classificationsTree.js +++ b/examples/assets/classificationsTree.js @@ -1,13 +1,13 @@ -import{x as l}from"./lit-element-CToom8Wf.js";import{P as p,C as d,W as f,S as b,a as g,b as w,G as y,I as u,F as C,r as T,T as v}from"./index-DNiVoluI.js";import{b as E}from"./index-CqhcBaEU.js";import{t as I}from"./index-kdXv3cq4.js";p.init();const e=new d,t=document.createElement("bim-viewport");t.name="viewer";const L=e.get(f),n=L.create(),o=new b(e);o.setup();n.scene=o;const r=new g(e,t);n.renderer=r;const c=new w(e);n.camera=c;t.addEventListener("resize",()=>{r.resize(),c.updateAspect()});const S=e.get(y);S.create(n);e.init();const F=e.get(u);await F.setup();const m=e.get(C);m.onFragmentsLoaded.add(s=>{n.scene&&n.scene.three.add(s)});const[P,G]=I.classificationTree({components:e,classifications:[]}),i=e.get(T);m.onFragmentsLoaded.add(async s=>{i.byEntity(s),await i.byPredefinedType(s),G({classifications:[{system:"entities",label:"Entities"},{system:"predefinedTypes",label:"Predefined Types"}]})});const z=v.create(()=>{const[s]=E.loadIfc({components:e});return l` +import"./modulepreload-polyfill-B5Qt9EMX.js";import{T as l,C as p,W as d,S as f,a as b,b as g,G as w,I as y,F as u,t as C,l as T,m as v}from"./index-N2x2mgv3.js";import{b as L}from"./index-DAXFTtA6.js";import{t as E}from"./index-BazQpUSZ.js";import"./lit-html-paDGiEfB.js";l.init();const e=new p,n=document.createElement("bim-viewport");n.name="viewer";const I=e.get(d),t=I.create(),o=new f(e);o.setup();t.scene=o;const r=new b(e,n);t.renderer=r;const c=new g(e);t.camera=c;n.addEventListener("resize",()=>{r.resize(),c.updateAspect()});const S=e.get(w);S.create(t);e.init();const F=e.get(y);await F.setup();const m=e.get(u);m.onFragmentsLoaded.add(s=>{t.scene&&t.scene.three.add(s)});const[G,z]=E.classificationTree({components:e,classifications:[]}),i=e.get(C);m.onFragmentsLoaded.add(async s=>{i.byEntity(s),await i.byPredefinedType(s),z({classifications:[{system:"entities",label:"Entities"},{system:"predefinedTypes",label:"Predefined Types"}]})});const M=T.create(()=>{const[s]=L.loadIfc({components:e});return v` ${s} - ${P} + ${G} `}),a=document.createElement("bim-grid");a.layouts={main:{template:` "panel viewport" / 23rem 1fr - `,elements:{panel:z,viewport:t}}};a.layout="main";document.body.append(a); + `,elements:{panel:M,viewport:n}}};a.layout="main";document.body.append(a); diff --git a/examples/assets/colorInput.js b/examples/assets/colorInput.js index 4ab41c8d..256d1946 100644 --- a/examples/assets/colorInput.js +++ b/examples/assets/colorInput.js @@ -1 +1 @@ -import"./lit-element-CToom8Wf.js";import{M as r}from"./index-BCngLrVF.js";import"./state-H9kisBvQ.js";import"./ref-CyNRy2Tn.js";r.init();const o=document.body.querySelector("bim-color-input");o.addEventListener("input",()=>{const{color:t}=o;console.log(t)}); +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as r}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";r.init();const o=document.body.querySelector("bim-color-input");o.addEventListener("input",()=>{const{color:t}=o;console.log(t)}); diff --git a/examples/assets/component.js b/examples/assets/component.js index ecffcd7b..65c88006 100644 --- a/examples/assets/component.js +++ b/examples/assets/component.js @@ -1,12 +1,12 @@ -import{x as t}from"./lit-element-CToom8Wf.js";import{M as c,C as n}from"./index-BCngLrVF.js";import"./state-H9kisBvQ.js";import"./ref-CyNRy2Tn.js";c.init();const b=n.create(()=>t` +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as c,C as t}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import{x as n}from"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";c.init();const b=t.create(()=>n` - `),[s,o]=n.create(e=>{const{label:l,counter:a}=e,i=`This panel section has been updated ${a} ${a===1?"time":"times"}`;return t` + `),[s,o]=t.create(e=>{const{label:l,counter:a}=e,i=`This panel section has been updated ${a} ${a===1?"time":"times"}`;return n` ${i} - `},{label:"Statefull Panel Section",counter:0}),m=n.create(()=>{let e=0;return t` + `},{label:"Statefull Panel Section",counter:0}),m=t.create(()=>{let e=0;return n` {e++,e>=5?o({label:"Powered Statefull Panel Section 💪",counter:e}):o({counter:e})}} label="Update Statefull Section"> diff --git a/examples/assets/contextMenu.js b/examples/assets/contextMenu.js index 40e3a7c7..205a3c47 100644 --- a/examples/assets/contextMenu.js +++ b/examples/assets/contextMenu.js @@ -1 +1 @@ -import"./lit-element-CToom8Wf.js";import{M as i}from"./index-BCngLrVF.js";import"./state-H9kisBvQ.js";import"./ref-CyNRy2Tn.js";i.init(); +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as i}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";i.init(); diff --git a/examples/assets/dataTransform.js b/examples/assets/dataTransform.js index 97438ba4..730949b4 100644 --- a/examples/assets/dataTransform.js +++ b/examples/assets/dataTransform.js @@ -1,6 +1,6 @@ -import{x as t}from"./lit-element-CToom8Wf.js";import{M as s,C as m,a as f,T as b}from"./index-BCngLrVF.js";import"./state-H9kisBvQ.js";import"./ref-CyNRy2Tn.js";s.init();const d=[{data:{Class:"IfcWall",PredefinedType:"EXTERNAL",Name:"Exterior Wall",Description:"Main structural exterior wall",LoadBearing:!0,Area:45.5}},{data:{Class:"IfcDoor",PredefinedType:"SINGLE_SWING_RIGHT",Name:"Entrance Door",Description:"Main entrance door",LoadBearing:!1,Area:2.1}},{data:{Class:"IfcWindow",PredefinedType:"STANDARD",Name:"Office Window",Description:"Double-pane office window",LoadBearing:!1,Area:3.6}},{data:{Class:"IfcColumn",PredefinedType:"ROUND",Name:"Support Column",Description:"Load-bearing column in lobby",LoadBearing:!0,Area:1.2}},{data:{Class:"IfcSlab",PredefinedType:"FLOOR",Name:"Main Floor Slab",Description:"Primary floor slab for ground level",LoadBearing:!0,Area:150}}],o=document.createElement("bim-table");o.data=d;const n=document.createElement("bim-table");n.data=d;n.dataTransform.Area=e=>`${e} m²`;n.dataTransform.LoadBearing=(e,a)=>t` - {const r=l.target;r instanceof f&&(a.LoadBearing=r.checked,window.alert(`${a.Name} changed to LoadBearing = ${r.checked}`),o.requestUpdate())}} .checked=${e}> - `;n.dataTransform.Class=e=>{const a="padding: 0.125rem 0.375rem; border-radius: 999px";return e==="IfcDoor"||e==="IfcSlab"?t` +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as s,C as m,a as f,T as b}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import{x as t}from"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";s.init();const d=[{data:{Class:"IfcWall",PredefinedType:"EXTERNAL",Name:"Exterior Wall",Description:"Main structural exterior wall",LoadBearing:!0,Area:45.5}},{data:{Class:"IfcDoor",PredefinedType:"SINGLE_SWING_RIGHT",Name:"Entrance Door",Description:"Main entrance door",LoadBearing:!1,Area:2.1}},{data:{Class:"IfcWindow",PredefinedType:"STANDARD",Name:"Office Window",Description:"Double-pane office window",LoadBearing:!1,Area:3.6}},{data:{Class:"IfcColumn",PredefinedType:"ROUND",Name:"Support Column",Description:"Load-bearing column in lobby",LoadBearing:!0,Area:1.2}},{data:{Class:"IfcSlab",PredefinedType:"FLOOR",Name:"Main Floor Slab",Description:"Primary floor slab for ground level",LoadBearing:!0,Area:150}}],o=document.createElement("bim-table");o.data=d;const r=document.createElement("bim-table");r.data=d;r.dataTransform.Area=e=>`${e} m²`;r.dataTransform.LoadBearing=(e,a)=>t` + {const n=l.target;n instanceof f&&(a.LoadBearing=n.checked,window.alert(`${a.Name} changed to LoadBearing = ${n.checked}`),o.requestUpdate())}} .checked=${e}> + `;r.dataTransform.Class=e=>{const a="padding: 0.125rem 0.375rem; border-radius: 999px";return e==="IfcDoor"||e==="IfcSlab"?t` ${e} @@ -8,13 +8,13 @@ import{x as t}from"./lit-element-CToom8Wf.js";import{M as s,C as m,a as f,T as b ${e} - `:e};n.dataTransform.Description=(e,a)=>{const{Class:i}=a;return i==="IfcDoor"?t` - {const c=r.target;c instanceof b&&(a.Description=c.value,o.requestUpdate())}} value=${e} debounce=350> + `:e};r.dataTransform.Description=(e,a)=>{const{Class:i}=a;return i==="IfcDoor"?t` + {const c=n.target;c instanceof b&&(a.Description=c.value,o.requestUpdate())}} value=${e} debounce=350> `:e};const p=m.create(()=>t`
Without Data Transform ${o} Data Transform applied! - ${n} + ${r}
`);document.body.append(p); diff --git a/examples/assets/dropdown.js b/examples/assets/dropdown.js index 06340602..627fbe9b 100644 --- a/examples/assets/dropdown.js +++ b/examples/assets/dropdown.js @@ -1 +1 @@ -import"./lit-element-CToom8Wf.js";import{M as d}from"./index-BCngLrVF.js";import"./state-H9kisBvQ.js";import"./ref-CyNRy2Tn.js";d.init();const t=document.getElementById("my-dropdown-1");t.addEventListener("change",()=>{const e=t.value;alert(`You've selected: ${e.join(", ")}.`)});const n=document.getElementById("my-dropdown-2");for(let e=0;e<300;e++){const o=document.createElement("bim-option");o.label=`Option ${e}`,o.value=e,n.append(o)}n.value=[100]; +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as d}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";d.init();const t=document.getElementById("my-dropdown-1");t.addEventListener("change",()=>{const e=t.value;alert(`You've selected: ${e.join(", ")}.`)});const n=document.getElementById("my-dropdown-2");for(let e=0;e<300;e++){const o=document.createElement("bim-option");o.label=`Option ${e}`,o.value=e,n.append(o)}n.value=[100]; diff --git a/examples/assets/elementProperties.js b/examples/assets/elementProperties.js index 183d4449..ef6734a4 100644 --- a/examples/assets/elementProperties.js +++ b/examples/assets/elementProperties.js @@ -1,4 +1,4 @@ -import{x as w}from"./lit-element-CToom8Wf.js";import{P as x,C as y,W as v,S as h,a as C,b as S,G as T,I,l as P,s as E,T as A}from"./index-DNiVoluI.js";import{t as $}from"./index-kdXv3cq4.js";x.init();const s=document.createElement("bim-viewport"),e=new y,L=e.get(v),n=L.create(),c=new h(e);c.setup();n.scene=c;const d=new C(e,s);n.renderer=d;const i=new S(e);n.camera=i;i.controls.setLookAt(10,5.5,5,-4,-1,-6.5);s.addEventListener("resize",()=>{d.resize(),i.updateAspect()});e.init();const k=e.get(T);k.create(n);const m=e.get(I);await m.setup();const z=await fetch("https://thatopen.github.io/engine_ui-components/resources/small.ifc"),G=await z.arrayBuffer(),M=new Uint8Array(G),u=await m.load(M);n.scene.three.add(u);const R=e.get(P);await R.process(u);const[t,b]=$.elementProperties({components:e,fragmentIdMap:{}});t.preserveStructureOnFilter=!0;t.indentationInText=!1;const p=e.get(E);p.setup({world:n});p.events.select.onHighlight.add(o=>{b({fragmentIdMap:o})});p.events.select.onClear.add(()=>b({fragmentIdMap:{}}));const V=A.create(()=>{const o=r=>{const a=r.target;t.queryString=a.value!==""?a.value:null},g=r=>{const a=r.target;t.expanded=!t.expanded,a.label=t.expanded?"Collapse":"Expand"},f=async()=>{await navigator.clipboard.writeText(t.tsv)};return w` +import"./modulepreload-polyfill-B5Qt9EMX.js";import{T as w,C as x,W as y,S as v,a as h,b as C,G as S,I as T,p as I,u as E,l as P,m as A}from"./index-N2x2mgv3.js";import{t as L}from"./index-BazQpUSZ.js";import"./lit-html-paDGiEfB.js";w.init();const s=document.createElement("bim-viewport"),e=new x,$=e.get(y),n=$.create(),c=new v(e);c.setup();n.scene=c;const d=new h(e,s);n.renderer=d;const i=new C(e);n.camera=i;i.controls.setLookAt(10,5.5,5,-4,-1,-6.5);s.addEventListener("resize",()=>{d.resize(),i.updateAspect()});e.init();const k=e.get(S);k.create(n);const m=e.get(T);await m.setup();const z=await fetch("https://thatopen.github.io/engine_ui-components/resources/small.ifc"),G=await z.arrayBuffer(),M=new Uint8Array(G),u=await m.load(M);n.scene.three.add(u);const R=e.get(I);await R.process(u);const[t,b]=L.elementProperties({components:e,fragmentIdMap:{}});t.preserveStructureOnFilter=!0;t.indentationInText=!1;const p=e.get(E);p.setup({world:n});p.events.select.onHighlight.add(o=>{b({fragmentIdMap:o})});p.events.select.onClear.add(()=>b({fragmentIdMap:{}}));const V=P.create(()=>{const o=r=>{const a=r.target;t.queryString=a.value!==""?a.value:null},g=r=>{const a=r.target;t.expanded=!t.expanded,a.label=t.expanded?"Collapse":"Expand"},f=async()=>{await navigator.clipboard.writeText(t.tsv)};return A`
diff --git a/examples/assets/entityAttributes.js b/examples/assets/entityAttributes.js index 5276988b..b280bfd9 100644 --- a/examples/assets/entityAttributes.js +++ b/examples/assets/entityAttributes.js @@ -1,13 +1,13 @@ -import{x as p}from"./lit-element-CToom8Wf.js";import{P as v,C as T,W as k,S as P,a as A,b as $,G as E,I as L,l as W,s as N,T as R,_ as b,w as H,z as M}from"./index-DNiVoluI.js";import{t as O}from"./index-kdXv3cq4.js";v.init();const o=new T,V=o.get(k),a=V.create(),S=new P(o);S.setup();a.scene=S;const d=document.createElement("bim-viewport"),w=new A(o,d);a.renderer=w;const m=new $(o);a.camera=m;m.controls.setLookAt(10,5.5,5,-4,-1,-6.5);d.addEventListener("resize",()=>{w.resize(),m.updateAspect()});o.init();const B=o.get(E);B.create(a);const C=o.get(L);await C.setup();const D=await fetch("https://thatopen.github.io/engine_ui-components/resources/small.ifc"),F=await D.arrayBuffer(),G=new Uint8Array(F),x=await C.load(G);a.scene.three.add(x);const J=o.get(W);await J.process(x);const l={padding:"0.25rem",borderRadius:"0.25rem"},z={Entity:t=>{let e={};return t===H[M]&&(e={...l,backgroundColor:"purple",color:"white"}),String(t).includes("IFCWALL")&&(e={...l,backgroundColor:"green",color:"white"}),p`${t}`},PredefinedType:t=>{const e=["#1c8d83","#3c1c8d","#386c19","#837c24"],c=Math.floor(Math.random()*e.length),g=e[c],f={...l,backgroundColor:g,color:"white"};return p`${t}`},NominalValue:t=>{let e={};return typeof t=="boolean"&&t===!1&&(e={...l,backgroundColor:"#b13535",color:"white"}),typeof t=="boolean"&&t===!0&&(e={...l,backgroundColor:"#18882c",color:"white"}),p`${t}`}},[i,u]=O.entityAttributes({components:o,fragmentIdMap:{},tableDefinition:z,attributesToInclude:()=>["Name","ContainedInStructure","HasProperties","HasPropertySets",e=>e.includes("Value"),e=>e.startsWith("Material"),e=>e.startsWith("Relating"),e=>{const c=["IsGroupedBy","IsDecomposedBy"];return e.startsWith("Is")&&!c.includes(e)}]});i.expanded=!0;i.indentationInText=!0;i.preserveStructureOnFilter=!0;const h=o.get(N);h.setup({world:a});h.events.select.onHighlight.add(t=>{u({fragmentIdMap:t})});h.events.select.onClear.add(()=>u({fragmentIdMap:{}}));const Q=R.create(()=>p` +import"./modulepreload-polyfill-B5Qt9EMX.js";import{T as v,C as T,W as k,S as A,a as P,b as $,G as E,I as L,p as W,u as N,l as R,m as p,$ as b,x as H,E as M}from"./index-N2x2mgv3.js";import{t as O}from"./index-BazQpUSZ.js";import"./lit-html-paDGiEfB.js";v.init();const o=new T,V=o.get(k),a=V.create(),S=new A(o);S.setup();a.scene=S;const d=document.createElement("bim-viewport"),w=new P(o,d);a.renderer=w;const m=new $(o);a.camera=m;m.controls.setLookAt(10,5.5,5,-4,-1,-6.5);d.addEventListener("resize",()=>{w.resize(),m.updateAspect()});o.init();const B=o.get(E);B.create(a);const C=o.get(L);await C.setup();const D=await fetch("https://thatopen.github.io/engine_ui-components/resources/small.ifc"),F=await D.arrayBuffer(),G=new Uint8Array(F),x=await C.load(G);a.scene.three.add(x);const J=o.get(W);await J.process(x);const l={padding:"0.25rem",borderRadius:"0.25rem"},z={Entity:t=>{let e={};return t===H[M]&&(e={...l,backgroundColor:"purple",color:"white"}),String(t).includes("IFCWALL")&&(e={...l,backgroundColor:"green",color:"white"}),p`${t}`},PredefinedType:t=>{const e=["#1c8d83","#3c1c8d","#386c19","#837c24"],c=Math.floor(Math.random()*e.length),g=e[c],f={...l,backgroundColor:g,color:"white"};return p`${t}`},NominalValue:t=>{let e={};return typeof t=="boolean"&&t===!1&&(e={...l,backgroundColor:"#b13535",color:"white"}),typeof t=="boolean"&&t===!0&&(e={...l,backgroundColor:"#18882c",color:"white"}),p`${t}`}},[n,u]=O.entityAttributes({components:o,fragmentIdMap:{},tableDefinition:z,attributesToInclude:()=>["Name","ContainedInStructure","HasProperties","HasPropertySets",e=>e.includes("Value"),e=>e.startsWith("Material"),e=>e.startsWith("Relating"),e=>{const c=["IsGroupedBy","IsDecomposedBy"];return e.startsWith("Is")&&!c.includes(e)}]});n.expanded=!0;n.indentationInText=!0;n.preserveStructureOnFilter=!0;const h=o.get(N);h.setup({world:a});h.events.select.onHighlight.add(t=>{u({fragmentIdMap:t})});h.events.select.onClear.add(()=>u({fragmentIdMap:{}}));const j=R.create(()=>p`
- {const s=r.target;i.queryString=s.value}} type="search" placeholder="Search" debounce="250"> - {const s=r.target;i.preserveStructureOnFilter=s.checked}} label="Preserve Structure" inverted checked> + {const s=r.target;n.queryString=s.value}} type="search" placeholder="Search" debounce="250"> + {const s=r.target;n.preserveStructureOnFilter=s.checked}} label="Preserve Structure" inverted checked>
- {const s=r.target;u({attributesToInclude:()=>[...s.value,n=>n.includes("Value"),n=>n.startsWith("Material"),n=>n.startsWith("Relating"),n=>{const I=["IsGroupedBy","IsDecomposedBy"];return n.startsWith("Is")&&!I.includes(n)}]})}} multiple> + {const s=r.target;u({attributesToInclude:()=>[...s.value,i=>i.includes("Value"),i=>i.startsWith("Material"),i=>i.startsWith("Relating"),i=>{const I=["IsGroupedBy","IsDecomposedBy"];return i.startsWith("Is")&&!I.includes(i)}]})}} multiple> @@ -23,14 +23,14 @@ import{x as p}from"./lit-element-CToom8Wf.js";import{P as v,C as T,W as k,S as P - {await navigator.clipboard.writeText(i.tsv),alert("Table data copied as TSV in clipboard! Try to paste it in a spreadsheet app.")}} icon="solar:copy-bold" tooltip-title="Copy TSV" tooltip-text="Copy the table contents as tab separated text values, so you can copy them into a spreadsheet."> - {i.downloadData("entities-attributes")}} icon="ph:export-fill" tooltip-title="Export JSON" tooltip-text="Download the table contents as a JSON file."> + {await navigator.clipboard.writeText(n.tsv),alert("Table data copied as TSV in clipboard! Try to paste it in a spreadsheet app.")}} icon="solar:copy-bold" tooltip-title="Copy TSV" tooltip-text="Copy the table contents as tab separated text values, so you can copy them into a spreadsheet."> + {n.downloadData("entities-attributes")}} icon="ph:export-fill" tooltip-title="Export JSON" tooltip-text="Download the table contents as a JSON file.">
- ${i} + ${n}
`),y=document.createElement("bim-grid");y.layouts={main:{template:` "viewport" 1fr "entityAttributesPanel" 1fr - `,elements:{entityAttributesPanel:Q,viewport:d}}};y.layout="main";document.body.append(y); + `,elements:{entityAttributesPanel:j,viewport:d}}};y.layout="main";document.body.append(y); diff --git a/examples/assets/exportingData.js b/examples/assets/exportingData.js index 8f706371..fca44408 100644 --- a/examples/assets/exportingData.js +++ b/examples/assets/exportingData.js @@ -1,18 +1,18 @@ -import{x as n}from"./lit-element-CToom8Wf.js";import{M as c,C as a,T as d,a as s}from"./index-BCngLrVF.js";import"./state-H9kisBvQ.js";import"./ref-CyNRy2Tn.js";c.init();const o=document.createElement("bim-table");o.expanded=!0;o.data=[{data:{Class:"IfcWall",PredefinedType:"EXTERNAL",Name:"Exterior Wall",Description:"Main structural exterior wall",LoadBearing:!0,Area:45.5},children:[{data:{Class:"IfcWindow",PredefinedType:"STANDARD",Name:"Office Window",Description:"Double-pane office window",LoadBearing:!1,Area:3.6}}]},{data:{Class:"IfcDoor",PredefinedType:"SINGLE_SWING_RIGHT",Name:"Entrance Door",Description:"Main entrance door",LoadBearing:!1,Area:2.1}},{data:{Class:"IfcColumn",PredefinedType:"ROUND",Name:"Support Column",Description:"Load-bearing column in lobby",LoadBearing:!0,Area:1.2}},{data:{Class:"IfcSlab",PredefinedType:"FLOOR",Name:"Main Floor Slab",Description:"Primary floor slab for ground level",LoadBearing:!0,Area:150}}];const p=a.create(()=>n` +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as c,C as n,T as d,a as s}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import{x as a}from"./lit-html-paDGiEfB.js";import"./ref-CInB0H-f.js";c.init();const o=document.createElement("bim-table");o.expanded=!0;o.data=[{data:{Class:"IfcWall",PredefinedType:"EXTERNAL",Name:"Exterior Wall",Description:"Main structural exterior wall",LoadBearing:!0,Area:45.5},children:[{data:{Class:"IfcWindow",PredefinedType:"STANDARD",Name:"Office Window",Description:"Double-pane office window",LoadBearing:!1,Area:3.6}}]},{data:{Class:"IfcDoor",PredefinedType:"SINGLE_SWING_RIGHT",Name:"Entrance Door",Description:"Main entrance door",LoadBearing:!1,Area:2.1}},{data:{Class:"IfcColumn",PredefinedType:"ROUND",Name:"Support Column",Description:"Load-bearing column in lobby",LoadBearing:!0,Area:1.2}},{data:{Class:"IfcSlab",PredefinedType:"FLOOR",Name:"Main Floor Slab",Description:"Primary floor slab for ground level",LoadBearing:!0,Area:150}}];const p=n.create(()=>a` {const t=e.target;t instanceof d&&(o.queryString=t.value)}} placeholder="Search..."> - `),l=a.create(()=>n` + `),l=n.create(()=>a` - `),r=a.create(()=>n``),u=a.create(()=>n` + `),r=n.create(()=>a``),u=n.create(()=>a` {const e=l.value[0];if(e===void 0)return;const t=r.value.trim()!==""?r.value:void 0;o.downloadData(t,e)}} label="Download" style="flex: 0"> - `),m=a.create(()=>n` + `),m=n.create(()=>a` {const t=e.target;t instanceof s&&(o.indentationInText=t.checked)}} label="Include Indentation" inverted> - `),b=a.create(()=>n` + `),b=n.create(()=>a` {const e=l.value[0];e===void 0||e==="json"||(await navigator.clipboard.writeText(o[e]),window.alert("Table data copied as CSV in clipboard!"))}} label="Copy to Clipboard" style="flex: 0"> - `),f=a.create(()=>n` + `),f=n.create(()=>a`
${p} diff --git a/examples/assets/grid.js b/examples/assets/grid.js index 4f8a8c12..2e133b30 100644 --- a/examples/assets/grid.js +++ b/examples/assets/grid.js @@ -1,8 +1,8 @@ -import{T as p,x as b}from"./lit-element-CToom8Wf.js";import{M as g,C as s}from"./index-BCngLrVF.js";import{a as h,i as D,t as T,n as y}from"./ref-CyNRy2Tn.js";import"./state-H9kisBvQ.js";/** +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as p,C as s}from"./index-CcrzIsUO.js";import"./state-DYefyXr3.js";import{T as g,x as b}from"./lit-html-paDGiEfB.js";import{a as h,i as D,t as T,n as y}from"./ref-CInB0H-f.js";/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const u="important",f=" !"+u,r=h(class extends D{constructor(e){var n;if(super(e),e.type!==T.ATTRIBUTE||e.name!=="style"||((n=e.strings)==null?void 0:n.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((n,i)=>{const o=e[i];return o==null?n:n+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(e,[n]){const{style:i}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(n)),this.render(n);for(const o of this.ft)n[o]==null&&(this.ft.delete(o),o.includes("-")?i.removeProperty(o):i[o]=null);for(const o in n){const t=n[o];if(t!=null){this.ft.add(o);const a=typeof t=="string"&&t.endsWith(f);o.includes("-")||a?i.setProperty(o,a?t.slice(0,-11):t,a?u:""):i[o]=t}}return p}});g.init();const c=s.create(()=>b` + */const u="important",f=" !"+u,r=h(class extends D{constructor(e){var n;if(super(e),e.type!==T.ATTRIBUTE||e.name!=="style"||((n=e.strings)==null?void 0:n.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((n,i)=>{const o=e[i];return o==null?n:n+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(e,[n]){const{style:i}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(n)),this.render(n);for(const o of this.ft)n[o]==null&&(this.ft.delete(o),o.includes("-")?i.removeProperty(o):i[o]=null);for(const o in n){const t=n[o];if(t!=null){this.ft.add(o);const a=typeof t=="string"&&t.endsWith(f);o.includes("-")||a?i.setProperty(o,a?t.slice(0,-11):t,a?u:""):i[o]=t}}return g}});p.init();const c=s.create(()=>b` This is just a panel section... cool, right? diff --git a/examples/assets/index-kdXv3cq4.js b/examples/assets/index-BazQpUSZ.js similarity index 89% rename from examples/assets/index-kdXv3cq4.js rename to examples/assets/index-BazQpUSZ.js index b4a414f7..445a87e7 100644 --- a/examples/assets/index-kdXv3cq4.js +++ b/examples/assets/index-BazQpUSZ.js @@ -1,9 +1,9 @@ -import{F as M,$ as _,H as te,q as be,T as v,l as $,w as Y,r as he,K as ne,X as oe,U as ie,Z as ye,z as se,E as re,R as Ce,J as Ie,N as we,Q as xe,Y as Ne,s as Te,x as Ae,W as ae,t as z,u as j,i as R,v as Re,D as Ee,A as $e,k as U,G as Se,_ as q,m as ce,P as le,p as ue}from"./index-DNiVoluI.js";import{x as C}from"./lit-element-CToom8Wf.js";const De=n=>{const{components:i,actions:t,tags:l}=n,a=(t==null?void 0:t.dispose)??!0,c=(t==null?void 0:t.download)??!0,s=(t==null?void 0:t.visibility)??!0,d=(l==null?void 0:l.schema)??!0,r=(l==null?void 0:l.viewDefinition)??!0,o=i.get(M),p=({detail:f})=>{const{cell:e}=f;e.style.padding="0.25rem 0"};return C` - {if(!f)return;const e=f;e.hiddenColumns=["modelID"];const m=[];for(const[,h]of o.groups){if(!h)continue;const x={data:{Name:h.name||h.uuid,modelID:h.uuid}};m.push(x)}e.dataTransform={Name:(h,x)=>{const{modelID:w}=x;if(typeof w!="string")return h;const N=o.groups.get(w);if(!N)return w;const g={};for(const S of N.items)g[S.id]=S.ids;let b;const{schema:y}=N.ifcMetadata;d&&y&&(b=C` +import{F as M,m as C,a0 as _,H as te,s as be,l as v,p as $,x as Y,t as he,N as ne,Y as oe,X as ie,_ as ye,E as se,J as re,R as Ce,K as Ie,Q as we,U as Ne,Z as xe,u as Te,y as Ae,W as ae,P as z,v as j,i as R,w as Re,D as Ee,A as $e,k as U,G as Se,$ as q,q as ce,T as le,r as ue}from"./index-N2x2mgv3.js";import"./lit-html-paDGiEfB.js";const De=n=>{const{components:i,actions:t,tags:l}=n,a=(t==null?void 0:t.dispose)??!0,c=(t==null?void 0:t.download)??!0,s=(t==null?void 0:t.visibility)??!0,d=(l==null?void 0:l.schema)??!0,r=(l==null?void 0:l.viewDefinition)??!0,o=i.get(M),p=({detail:f})=>{const{cell:e}=f;e.style.padding="0.25rem 0"};return C` + {if(!f)return;const e=f;e.hiddenColumns=["modelID"];const m=[];for(const[,h]of o.groups){if(!h)continue;const N={data:{Name:h.name||h.uuid,modelID:h.uuid}};m.push(N)}e.dataTransform={Name:(h,N)=>{const{modelID:w}=N;if(typeof w!="string")return h;const x=o.groups.get(w);if(!x)return w;const g={};for(const S of x.items)g[S.id]=S.ids;let b;const{schema:y}=x.ifcMetadata;d&&y&&(b=C` ${y} - `);let I;if(r&&"viewDefinition"in N.ifcMetadata){const S=N.ifcMetadata.viewDefinition;I=C` + `);let I;if(r&&"viewDefinition"in x.ifcMetadata){const S=x.ifcMetadata.viewDefinition;I=C` ${S.split(",").map(E=>C`${E}`)} - `}let A;a&&(A=C`o.disposeGroup(N)} icon="mdi:delete">`);let k;s&&(k=C`{const V=i.get(te),G=E.target;V.set(G.hasAttribute("data-model-hidden"),g),G.toggleAttribute("data-model-hidden"),G.icon=G.hasAttribute("data-model-hidden")?"mdi:eye-off":"mdi:eye"}} icon="mdi:eye">`);let O;return c&&(O=C`{const E=document.createElement("input");E.type="file",E.accept=".ifc",E.multiple=!1,E.addEventListener("change",async()=>{if(!(E.files&&E.files.length===1))return;const V=E.files[0],G=await V.arrayBuffer(),ge=await i.get(be).saveToIfc(N,new Uint8Array(G)),ee=new File([ge],V.name),B=document.createElement("a");B.href=URL.createObjectURL(ee),B.download=ee.name,B.click(),URL.revokeObjectURL(B.href)}),E.click()}} icon="flowbite:download-solid">`),C` + `}let A;a&&(A=C`o.disposeGroup(x)} icon="mdi:delete">`);let k;s&&(k=C`{const V=i.get(te),G=E.target;V.set(G.hasAttribute("data-model-hidden"),g),G.toggleAttribute("data-model-hidden"),G.icon=G.hasAttribute("data-model-hidden")?"mdi:eye-off":"mdi:eye"}} icon="mdi:eye">`);let O;return c&&(O=C`{const E=document.createElement("input");E.type="file",E.accept=".ifc",E.multiple=!1,E.addEventListener("change",async()=>{if(!(E.files&&E.files.length===1))return;const V=E.files[0],G=await V.arrayBuffer(),ge=await i.get(be).saveToIfc(x,new Uint8Array(G)),ee=new File([ge],V.name),B=document.createElement("a");B.href=URL.createObjectURL(ee),B.download=ee.name,B.click(),URL.revokeObjectURL(B.href)}),E.click()}} icon="flowbite:download-solid">`),C`
@@ -25,11 +25,11 @@ import{F as M,$ as _,H as te,q as be,T as v,l as $,w as Y,r as he,K as ne,X as o No models has been loaded yet - `},ve=(n,i=!0)=>{const t=v.create(De,n);if(i){const{components:l}=n,a=l.get(M),[,c]=t;a.onFragmentsLoaded.add(()=>setTimeout(()=>c())),a.onFragmentsDisposed.add(()=>c())}return t},ke=Object.freeze(Object.defineProperty({__proto__:null,modelsList:ve},Symbol.toStringTag,{value:"Module"})),de=["Name","ContainedInStructure","ForLayerSet","LayerThickness","HasProperties","HasAssociations","HasAssignments","HasPropertySets","PredefinedType","Quantities","ReferencedSource","Identification",n=>n.includes("Value"),n=>n.startsWith("Material"),n=>n.startsWith("Relating"),n=>{const i=["IsGroupedBy","IsDecomposedBy"];return n.startsWith("Is")&&!i.includes(n)}];async function Q(n,i,t,l=de,a=!1){const c=n.get($),s=await i.getProperties(t);if(!s)return{data:{Entity:`${t} properties not found...`}};const d=c.relationMaps[i.uuid],r={data:{}};for(const o in s){const p=l.map(f=>typeof f=="string"?o===f:f(o)).includes(!0);if(!(o==="type"||p))continue;const u=s[o];if(u)if(u.type===5){r.children||(r.children=[]);const f=await Q(n,i,u.value,l,a);r.children.push(f)}else if(typeof u=="object"&&!Array.isArray(u)){const{value:f,type:e}=u;if(a)e===1||e===2||e===3||(r.data[o]=f);else{const m=typeof f=="number"?Number(f.toFixed(3)):f;r.data[o]=m}}else if(Array.isArray(u))for(const f of u){if(f.type!==5)continue;r.children||(r.children=[]);const e=await Q(n,i,f.value,l,a);r.children.push(e)}else if(o==="type"){const f=Y[u];r.data.Entity=f}else r.data[o]=u}if(d&&d.get(s.expressID)){const o=d.get(s.expressID);for(const p of l){const u=[];if(typeof p=="string"){const f=c._inverseAttributes.indexOf(p);f!==-1&&u.push(f)}else{const f=c._inverseAttributes.filter(e=>p(e));for(const e of f){const m=c._inverseAttributes.indexOf(e);u.push(m)}}for(const f of u){const e=o.get(f);if(e)for(const m of e){const h=await Q(n,i,m,l,a);r.children||(r.children=[]),r.children.push(h)}}}}return r}const Oe=n=>{const{components:i,fragmentIdMap:t,attributesToInclude:l,editable:a,tableDefinition:c}=n,s=i.get(M);let d;return typeof l=="function"?d=l(de):d=l,C`{if(!o)return;const p=o,u=[],f=[];for(const e in t){const m=s.list.get(e);if(!(m&&m.group))continue;const h=m.group,x=f.find(w=>w.model===h);if(x)for(const w of t[e])x.expressIDs.add(w);else{const w={model:h,expressIDs:new Set(t[e])};f.push(w)}}for(const e of f){const{model:m,expressIDs:h}=e;for(const x of h){const w=await Q(i,m,x,d,a);u.push(w)}}p.dataTransform=c,p.data=u,p.columns=[{name:"Entity",width:"minmax(15rem, 1fr)"}]})}>`},Le=n=>v.create(Oe,n),Fe=Object.freeze(Object.defineProperty({__proto__:null,entityAttributes:Le},Symbol.toStringTag,{value:"Module"}));let L;const Me=n=>{const{components:i,classifications:t}=n,l=i.get(he),a=i.get(te);L||(L=document.createElement("bim-table"),L.headersHidden=!0,L.hiddenColumns=["system"],L.columns=["Name",{name:"Actions",width:"auto"}],L.dataTransform={Actions:(s,d)=>{const{system:r,Name:o}=d;if(!(typeof r=="string"&&typeof o=="string"))return s;const p=l.list[r];if(!(p&&p[o]))return s;const u=p[o],{map:f}=u;return C` + `},ve=(n,i=!0)=>{const t=v.create(De,n);if(i){const{components:l}=n,a=l.get(M),[,c]=t;a.onFragmentsLoaded.add(()=>setTimeout(()=>c())),a.onFragmentsDisposed.add(()=>c())}return t},ke=Object.freeze(Object.defineProperty({__proto__:null,modelsList:ve},Symbol.toStringTag,{value:"Module"})),de=["Name","ContainedInStructure","ForLayerSet","LayerThickness","HasProperties","HasAssociations","HasAssignments","HasPropertySets","PredefinedType","Quantities","ReferencedSource","Identification",n=>n.includes("Value"),n=>n.startsWith("Material"),n=>n.startsWith("Relating"),n=>{const i=["IsGroupedBy","IsDecomposedBy"];return n.startsWith("Is")&&!i.includes(n)}];async function Q(n,i,t,l=de,a=!1){const c=n.get($),s=await i.getProperties(t);if(!s)return{data:{Entity:`${t} properties not found...`}};const d=c.relationMaps[i.uuid],r={data:{}};for(const o in s){const p=l.map(f=>typeof f=="string"?o===f:f(o)).includes(!0);if(!(o==="type"||p))continue;const u=s[o];if(u)if(u.type===5){r.children||(r.children=[]);const f=await Q(n,i,u.value,l,a);r.children.push(f)}else if(typeof u=="object"&&!Array.isArray(u)){const{value:f,type:e}=u;if(a)e===1||e===2||e===3||(r.data[o]=f);else{const m=typeof f=="number"?Number(f.toFixed(3)):f;r.data[o]=m}}else if(Array.isArray(u))for(const f of u){if(f.type!==5)continue;r.children||(r.children=[]);const e=await Q(n,i,f.value,l,a);r.children.push(e)}else if(o==="type"){const f=Y[u];r.data.Entity=f}else r.data[o]=u}if(d&&d.get(s.expressID)){const o=d.get(s.expressID);for(const p of l){const u=[];if(typeof p=="string"){const f=c._inverseAttributes.indexOf(p);f!==-1&&u.push(f)}else{const f=c._inverseAttributes.filter(e=>p(e));for(const e of f){const m=c._inverseAttributes.indexOf(e);u.push(m)}}for(const f of u){const e=o.get(f);if(e)for(const m of e){const h=await Q(n,i,m,l,a);r.children||(r.children=[]),r.children.push(h)}}}}return r}const Oe=n=>{const{components:i,fragmentIdMap:t,attributesToInclude:l,editable:a,tableDefinition:c}=n,s=i.get(M);let d;return typeof l=="function"?d=l(de):d=l,C`{if(!o)return;const p=o,u=[],f=[];for(const e in t){const m=s.list.get(e);if(!(m&&m.group))continue;const h=m.group,N=f.find(w=>w.model===h);if(N)for(const w of t[e])N.expressIDs.add(w);else{const w={model:h,expressIDs:new Set(t[e])};f.push(w)}}for(const e of f){const{model:m,expressIDs:h}=e;for(const N of h){const w=await Q(i,m,N,d,a);u.push(w)}}p.dataTransform=c,p.data=u,p.columns=[{name:"Entity",width:"minmax(15rem, 1fr)"}]})}>`},Le=n=>v.create(Oe,n),Fe=Object.freeze(Object.defineProperty({__proto__:null,entityAttributes:Le},Symbol.toStringTag,{value:"Module"}));let L;const Me=n=>{const{components:i,classifications:t}=n,l=i.get(he),a=i.get(te);L||(L=document.createElement("bim-table"),L.headersHidden=!0,L.hiddenColumns=["system"],L.columns=["Name",{name:"Actions",width:"auto"}],L.dataTransform={Actions:(s,d)=>{const{system:r,Name:o}=d;if(!(typeof r=="string"&&typeof o=="string"))return s;const p=l.list[r];if(!(p&&p[o]))return s;const u=p[o],{map:f}=u;return C`
{const h=m.target;a.set(h.value,f)}}>
- `}});const c=[];for(const s of t){const d=typeof s=="string"?s:s.system,r=typeof s=="string"?s:s.label,o=l.list[d];o&&c.push({data:{Name:r,system:d},children:Object.keys(o).map(p=>({data:{Name:p,system:d,Actions:""}}))})}return L.data=c,C`${L}`},_e=(n,i=!0)=>{const t=v.create(Me,n);if(i){const{components:l}=n,a=l.get(M),[,c]=t;a.onFragmentsDisposed.add(()=>c())}return t},Ve=Object.freeze(Object.defineProperty({__proto__:null,classificationTree:_e},Symbol.toStringTag,{value:"Module"})),me=async(n,i,t)=>{var d,r,o,p;const l=n.get($),a={data:{Name:(d=t.Name)==null?void 0:d.value},children:[{data:{Name:"Identification",Value:(r=t.Identification)==null?void 0:r.value}},{data:{Name:"Name",Value:(o=t.Name)==null?void 0:o.value}},{data:{Name:"Description",Value:(p=t.Description)==null?void 0:p.value}}]},c=l.getEntityRelations(i,t.expressID,"IsNestedBy");if(!c)return a;a.children||(a.children=[]);const s=[];a.children.push({data:{Name:"Tasks"},children:s});for(const u of c){const f=await i.getProperties(u);if(!f)continue;const e=await me(n,i,f);s.push(e)}return a},Ge=async(n,i,t)=>{const l=[];for(const c of t){const s=await me(n,i,c);l.push(s)}return{data:{Name:"Tasks"},children:l}},Pe=async(n,i)=>{var l,a,c,s;const t={data:{Name:"Classifications"}};for(const d of i){const{value:r}=d.ReferencedSource,o=await n.getProperties(r);if(!o)continue;const p={data:{Name:(l=o.Name)==null?void 0:l.value},children:[{data:{Name:"Identification",Value:((a=d.Identification)==null?void 0:a.value)||((c=d.ItemReference)==null?void 0:c.value)}},{data:{Name:"Name",Value:(s=d.Name)==null?void 0:s.value}}]};t.children||(t.children=[]),t.children.push(p)}return t},We=async(n,i)=>{var l,a,c,s,d,r;const t={data:{Name:"Materials"}};for(const o of i){if(o.type===ne){const p=(l=o.ForLayerSet)==null?void 0:l.value,u=await n.getProperties(p);if(!u)continue;for(const f of u.MaterialLayers){const{value:e}=f,m=await n.getProperties(e);if(!m)continue;const h=await n.getProperties((a=m.Material)==null?void 0:a.value);if(!h)continue;const x={data:{Name:"Layer"},children:[{data:{Name:"Thickness",Value:(c=m.LayerThickness)==null?void 0:c.value}},{data:{Name:"Material",Value:(s=h.Name)==null?void 0:s.value}}]};t.children||(t.children=[]),t.children.push(x)}}if(o.type===oe)for(const p of o.Materials){const{value:u}=p,f=await n.getProperties(u);if(!f)continue;const e={data:{Name:"Name",Value:(d=f.Name)==null?void 0:d.value}};t.children||(t.children=[]),t.children.push(e)}if(o.type===ie){const p={data:{Name:"Name",Value:(r=o.Name)==null?void 0:r.value}};t.children||(t.children=[]),t.children.push(p)}}return t},je={IFCLENGTHMEASURE:"LENGTHUNIT",IFCAREAMEASURE:"AREAUNIT",IFCVOLUMEMEASURE:"VOLUMEUNIT",IFCPLANEANGLEMEASURE:"PLANEANGLEUNIT"},He={MILLIMETRE:{symbol:"mm",digits:0},METRE:{symbol:"m",digits:2},KILOMETRE:{symbol:"km",digits:2},SQUARE_METRE:{symbol:"m²",digits:2},CUBIC_METRE:{symbol:"m³",digits:2},DEGREE:{symbol:"°",digits:2},RADIAN:{symbol:"rad",digits:2},GRAM:{symbol:"g",digits:0},KILOGRAM:{symbol:"kg",digits:2},MILLISECOND:{symbol:"ms",digits:0},SECOND:{symbol:"s",digits:0}},fe=async(n,i)=>{var a,c,s;const t=Object.values(await n.getAllPropertiesOfType(ye))[0];let l;for(const d of t.Units){const r=await n.getProperties(d.value);if(r&&((a=r.UnitType)==null?void 0:a.value)===je[i]){l=`${((c=r.Prefix)==null?void 0:c.value)??""}${((s=r.Name)==null?void 0:s.value)??""}`;break}}return l?He[l]:null},Ue=async(n,i,t)=>{var c,s;const{displayUnits:l}=t,a={data:{Name:"PropertySets"}};for(const d of i){const r={data:{Name:(c=d.Name)==null?void 0:c.value}};if(d.type===se){for(const o of d.HasProperties){const{value:p}=o,u=await n.getProperties(p);if(!u)continue;const f=Object.keys(u).find(x=>x.includes("Value"));if(!(f&&u[f]))continue;let e=u[f].value,m="";if(l){const{name:x}=u[f],w=await fe(n,x)??{};m=w.symbol,e=u[f].value,typeof e=="number"&&w.digits&&(e=e.toFixed(w.digits))}const h={data:{Name:(s=u.Name)==null?void 0:s.value,Value:`${e} ${m??""}`}};r.children||(r.children=[]),r.children.push(h)}r.children&&(a.children||(a.children=[]),a.children.push(r))}}return a},Be=async(n,i,t)=>{var c,s;const{displayUnits:l}=t,a={data:{Name:"QuantitySets"}};for(const d of i){const r={data:{Name:(c=d.Name)==null?void 0:c.value}};if(d.type===re){for(const o of d.Quantities){const{value:p}=o,u=await n.getProperties(p);if(!u)continue;const f=Object.keys(u).find(x=>x.includes("Value"));if(!(f&&u[f]))continue;let e=u[f].value,m="";if(l){const{name:x}=u[f],w=await fe(n,x)??{};m=w.symbol,e=u[f].value,typeof e=="number"&&w.digits&&(e=e.toFixed(w.digits))}const h={data:{Name:(s=u.Name)==null?void 0:s.value,Value:`${e} ${m??""}`}};r.children||(r.children=[]),r.children.push(h)}r.children&&(a.children||(a.children=[]),a.children.push(r))}}return a},ze=["OwnerHistory","ObjectPlacement","CompositionType"],pe=async(n,i)=>{const l={...{groupName:"Attributes",includeClass:!1},...i},{groupName:a,includeClass:c}=l,s={data:{Name:a}};c&&(s.children||(s.children=[]),s.children.push({data:{Name:"Class",Value:Y[n.type]}}));for(const d in n){if(ze.includes(d))continue;const r=n[d];if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===Ce)continue;const o={data:{Name:d,Value:r.value}};s.children||(s.children=[]),s.children.push(o)}}return s},W=(n,...i)=>{n.children||(n.children=[]),n.children.push(...i)},Je=async(n,i,t,l,a)=>{const s=n.get($).getEntityRelations(i,t,"IsDefinedBy");if(s){const d=[],r=[];for(const u of s){const f=await i.getProperties(u);f&&(f.type===se&&d.push(f),f.type===re&&r.push(f))}const o=await Ue(i,d,a);o.children&&W(l,o);const p=await Be(i,r,a);p.children&&W(l,p)}},qe=async(n,i,t,l)=>{const c=n.get($).getEntityRelations(i,t,"HasAssociations");if(c){const s=[],d=[];for(const p of c){const u=await i.getProperties(p);u&&(u.type===Ie&&s.push(u),(u.type===ne||u.type===we||u.type===xe||u.type===ie||u.type===oe)&&d.push(u))}const r=await Pe(i,s);r.children&&W(l,r);const o=await We(i,d);o.children&&W(l,o)}},Qe=async(n,i,t,l)=>{const c=n.get($).getEntityRelations(i,t,"HasAssignments");if(c){const s=[];for(const r of c){const o=await i.getProperties(r);o&&o.type===Ne&&s.push(o)}const d=await Ge(n,i,s);d.children&&W(l,d)}},Ye=async(n,i,t,l)=>{const c=n.get($).getEntityRelations(i,t,"ContainedInStructure");if(c&&c[0]){const s=c[0],d=await i.getProperties(s);if(d){const r=await pe(d,{groupName:"SpatialContainer"});W(l,r)}}};let J={};const Ke=async(n,i,t)=>{var d;const l=n.get($),a=n.get(M),c=a.getModelIdMap(i);Object.keys(i).length===0&&(J={});const s=[];for(const r in c){const o=a.groups.get(r);if(!o)continue;const p=l.relationMaps[o.uuid];if(!p)continue;r in J||(J[r]=new Map);const u=J[r],f=c[r];for(const e of f){let m=u.get(e);if(m){s.push(m);continue}const h=await o.getProperties(e);if(!h)continue;m={data:{Name:(d=h.Name)==null?void 0:d.value}},s.push(m),u.set(e,m);const x=await pe(h,{includeClass:!0});m.children||(m.children=[]),m.children.push(x),p.get(e)&&(await Je(n,o,e,m,t),await qe(n,o,e,m),await Qe(n,o,e,m),await Ye(n,o,e,m))}}return s},Xe=n=>{const i={emptySelectionWarning:!0,...n},{components:t,fragmentIdMap:l,emptySelectionWarning:a}=i;return C` + `}});const c=[];for(const s of t){const d=typeof s=="string"?s:s.system,r=typeof s=="string"?s:s.label,o=l.list[d];o&&c.push({data:{Name:r,system:d},children:Object.keys(o).map(p=>({data:{Name:p,system:d,Actions:""}}))})}return L.data=c,C`${L}`},_e=(n,i=!0)=>{const t=v.create(Me,n);if(i){const{components:l}=n,a=l.get(M),[,c]=t;a.onFragmentsDisposed.add(()=>c())}return t},Ve=Object.freeze(Object.defineProperty({__proto__:null,classificationTree:_e},Symbol.toStringTag,{value:"Module"})),me=async(n,i,t)=>{var d,r,o,p;const l=n.get($),a={data:{Name:(d=t.Name)==null?void 0:d.value},children:[{data:{Name:"Identification",Value:(r=t.Identification)==null?void 0:r.value}},{data:{Name:"Name",Value:(o=t.Name)==null?void 0:o.value}},{data:{Name:"Description",Value:(p=t.Description)==null?void 0:p.value}}]},c=l.getEntityRelations(i,t.expressID,"IsNestedBy");if(!c)return a;a.children||(a.children=[]);const s=[];a.children.push({data:{Name:"Tasks"},children:s});for(const u of c){const f=await i.getProperties(u);if(!f)continue;const e=await me(n,i,f);s.push(e)}return a},Ge=async(n,i,t)=>{const l=[];for(const c of t){const s=await me(n,i,c);l.push(s)}return{data:{Name:"Tasks"},children:l}},Pe=async(n,i)=>{var l,a,c,s;const t={data:{Name:"Classifications"}};for(const d of i){const{value:r}=d.ReferencedSource,o=await n.getProperties(r);if(!o)continue;const p={data:{Name:(l=o.Name)==null?void 0:l.value},children:[{data:{Name:"Identification",Value:((a=d.Identification)==null?void 0:a.value)||((c=d.ItemReference)==null?void 0:c.value)}},{data:{Name:"Name",Value:(s=d.Name)==null?void 0:s.value}}]};t.children||(t.children=[]),t.children.push(p)}return t},We=async(n,i)=>{var l,a,c,s,d,r;const t={data:{Name:"Materials"}};for(const o of i){if(o.type===ne){const p=(l=o.ForLayerSet)==null?void 0:l.value,u=await n.getProperties(p);if(!u)continue;for(const f of u.MaterialLayers){const{value:e}=f,m=await n.getProperties(e);if(!m)continue;const h=await n.getProperties((a=m.Material)==null?void 0:a.value);if(!h)continue;const N={data:{Name:"Layer"},children:[{data:{Name:"Thickness",Value:(c=m.LayerThickness)==null?void 0:c.value}},{data:{Name:"Material",Value:(s=h.Name)==null?void 0:s.value}}]};t.children||(t.children=[]),t.children.push(N)}}if(o.type===oe)for(const p of o.Materials){const{value:u}=p,f=await n.getProperties(u);if(!f)continue;const e={data:{Name:"Name",Value:(d=f.Name)==null?void 0:d.value}};t.children||(t.children=[]),t.children.push(e)}if(o.type===ie){const p={data:{Name:"Name",Value:(r=o.Name)==null?void 0:r.value}};t.children||(t.children=[]),t.children.push(p)}}return t},je={IFCLENGTHMEASURE:"LENGTHUNIT",IFCAREAMEASURE:"AREAUNIT",IFCVOLUMEMEASURE:"VOLUMEUNIT",IFCPLANEANGLEMEASURE:"PLANEANGLEUNIT"},He={MILLIMETRE:{symbol:"mm",digits:0},METRE:{symbol:"m",digits:2},KILOMETRE:{symbol:"km",digits:2},SQUARE_METRE:{symbol:"m²",digits:2},CUBIC_METRE:{symbol:"m³",digits:2},DEGREE:{symbol:"°",digits:2},RADIAN:{symbol:"rad",digits:2},GRAM:{symbol:"g",digits:0},KILOGRAM:{symbol:"kg",digits:2},MILLISECOND:{symbol:"ms",digits:0},SECOND:{symbol:"s",digits:0}},fe=async(n,i)=>{var a,c,s;const t=Object.values(await n.getAllPropertiesOfType(ye))[0];let l;for(const d of t.Units){const r=await n.getProperties(d.value);if(r&&((a=r.UnitType)==null?void 0:a.value)===je[i]){l=`${((c=r.Prefix)==null?void 0:c.value)??""}${((s=r.Name)==null?void 0:s.value)??""}`;break}}return l?He[l]:null},Ue=async(n,i,t)=>{var c,s;const{displayUnits:l}=t,a={data:{Name:"PropertySets"}};for(const d of i){const r={data:{Name:(c=d.Name)==null?void 0:c.value}};if(d.type===se){for(const o of d.HasProperties){const{value:p}=o,u=await n.getProperties(p);if(!u)continue;const f=Object.keys(u).find(N=>N.includes("Value"));if(!(f&&u[f]))continue;let e=u[f].value,m="";if(l){const{name:N}=u[f],w=await fe(n,N)??{};m=w.symbol,e=u[f].value,typeof e=="number"&&w.digits&&(e=e.toFixed(w.digits))}const h={data:{Name:(s=u.Name)==null?void 0:s.value,Value:`${e} ${m??""}`}};r.children||(r.children=[]),r.children.push(h)}r.children&&(a.children||(a.children=[]),a.children.push(r))}}return a},Be=async(n,i,t)=>{var c,s;const{displayUnits:l}=t,a={data:{Name:"QuantitySets"}};for(const d of i){const r={data:{Name:(c=d.Name)==null?void 0:c.value}};if(d.type===re){for(const o of d.Quantities){const{value:p}=o,u=await n.getProperties(p);if(!u)continue;const f=Object.keys(u).find(N=>N.includes("Value"));if(!(f&&u[f]))continue;let e=u[f].value,m="";if(l){const{name:N}=u[f],w=await fe(n,N)??{};m=w.symbol,e=u[f].value,typeof e=="number"&&w.digits&&(e=e.toFixed(w.digits))}const h={data:{Name:(s=u.Name)==null?void 0:s.value,Value:`${e} ${m??""}`}};r.children||(r.children=[]),r.children.push(h)}r.children&&(a.children||(a.children=[]),a.children.push(r))}}return a},ze=["OwnerHistory","ObjectPlacement","CompositionType"],pe=async(n,i)=>{const l={...{groupName:"Attributes",includeClass:!1},...i},{groupName:a,includeClass:c}=l,s={data:{Name:a}};c&&(s.children||(s.children=[]),s.children.push({data:{Name:"Class",Value:Y[n.type]}}));for(const d in n){if(ze.includes(d))continue;const r=n[d];if(r&&typeof r=="object"&&!Array.isArray(r)){if(r.type===Ce)continue;const o={data:{Name:d,Value:r.value}};s.children||(s.children=[]),s.children.push(o)}}return s},W=(n,...i)=>{n.children||(n.children=[]),n.children.push(...i)},Je=async(n,i,t,l,a)=>{const s=n.get($).getEntityRelations(i,t,"IsDefinedBy");if(s){const d=[],r=[];for(const u of s){const f=await i.getProperties(u);f&&(f.type===se&&d.push(f),f.type===re&&r.push(f))}const o=await Ue(i,d,a);o.children&&W(l,o);const p=await Be(i,r,a);p.children&&W(l,p)}},qe=async(n,i,t,l)=>{const c=n.get($).getEntityRelations(i,t,"HasAssociations");if(c){const s=[],d=[];for(const p of c){const u=await i.getProperties(p);u&&(u.type===Ie&&s.push(u),(u.type===ne||u.type===we||u.type===Ne||u.type===ie||u.type===oe)&&d.push(u))}const r=await Pe(i,s);r.children&&W(l,r);const o=await We(i,d);o.children&&W(l,o)}},Qe=async(n,i,t,l)=>{const c=n.get($).getEntityRelations(i,t,"HasAssignments");if(c){const s=[];for(const r of c){const o=await i.getProperties(r);o&&o.type===xe&&s.push(o)}const d=await Ge(n,i,s);d.children&&W(l,d)}},Ye=async(n,i,t,l)=>{const c=n.get($).getEntityRelations(i,t,"ContainedInStructure");if(c&&c[0]){const s=c[0],d=await i.getProperties(s);if(d){const r=await pe(d,{groupName:"SpatialContainer"});W(l,r)}}};let J={};const Ke=async(n,i,t)=>{var d;const l=n.get($),a=n.get(M),c=a.getModelIdMap(i);Object.keys(i).length===0&&(J={});const s=[];for(const r in c){const o=a.groups.get(r);if(!o)continue;const p=l.relationMaps[o.uuid];if(!p)continue;r in J||(J[r]=new Map);const u=J[r],f=c[r];for(const e of f){let m=u.get(e);if(m){s.push(m);continue}const h=await o.getProperties(e);if(!h)continue;m={data:{Name:(d=h.Name)==null?void 0:d.value}},s.push(m),u.set(e,m);const N=await pe(h,{includeClass:!0});m.children||(m.children=[]),m.children.push(N),p.get(e)&&(await Je(n,o,e,m,t),await qe(n,o,e,m),await Qe(n,o,e,m),await Ye(n,o,e,m))}}return s},Xe=n=>{const i={emptySelectionWarning:!0,...n},{components:t,fragmentIdMap:l,emptySelectionWarning:a}=i;return C` {const{cell:r}=d;r.column==="Name"&&!("Value"in r.rowData)&&(r.style.gridColumn="1 / -1")}} ${_(async d=>{if(!d)return;const r=d;r.columns=[{name:"Name",width:"12rem"}],r.headersHidden=!0,r.loadFunction=()=>Ke(t,l,n),await r.loadData(!0)&&r.dispatchEvent(new Event("datacomputed"))})}> ${a?C` @@ -40,7 +40,7 @@ import{F as M,$ as _,H as te,q as be,T as v,l as $,w as Y,r as he,K as ne,X as o Something went wrong with the properties - `},Ze=n=>v.create(Xe,n),et=Object.freeze(Object.defineProperty({__proto__:null,elementProperties:Ze},Symbol.toStringTag,{value:"Module"})),X=async(n,i,t,l)=>{var o;const a=[],c=n.get($),s=await i.getProperties(t);if(!s)return a;const{type:d}=s,r={data:{Entity:Y[d],Name:(o=s.Name)==null?void 0:o.value,modelID:i.uuid,expressID:t}};for(const p of l){const u=c.getEntityRelations(i,t,p);if(!u)continue;r.children||(r.children=[]),r.data.relations=JSON.stringify(u);const f={};for(const e of u){const m=await X(n,i,e,l);for(const h of m)if(h.data.relations)r.children.push(h);else{const x=i.data.get(e);if(!x){r.children.push(h);continue}const w=x[1][1],N=Y[w];N in f||(f[N]=[]),h.data.Entity=h.data.Name,delete h.data.Name,f[N].push(h)}}for(const e in f){const m=f[e],h=m.map(w=>w.data.expressID),x={data:{Entity:e,modelID:i.uuid,relations:JSON.stringify(h)},children:m};r.children.push(x)}}return a.push(r),a},tt=async(n,i,t,l)=>{const a=n.get($),c=[];for(const s of i){let d;if(l)d={data:{Entity:s.name!==""?s.name:s.uuid},children:await X(n,s,l,t)};else{const r=a.relationMaps[s.uuid],o=await s.getAllPropertiesOfType(Ae);if(!(r&&o))continue;const{expressID:p}=Object.values(o)[0];d={data:{Entity:s.name!==""?s.name:s.uuid},children:await X(n,s,p,t)}}c.push(d)}return c};let D;const nt=(n,i)=>{const t=n.get(M),{modelID:l,expressID:a,relations:c}=i;if(!l)return null;const s=t.groups.get(l);return s?s.getFragmentMap([a,...JSON.parse(c??"[]")]):null},ot=n=>{const{components:i,models:t,expressID:l}=n,a=n.selectHighlighterName??"select",c=n.hoverHighlighterName??"hover";D||(D=document.createElement("bim-table"),D.hiddenColumns=["modelID","expressID","relations"],D.columns=["Entity","Name"],D.headersHidden=!0,D.addEventListener("cellcreated",({detail:d})=>{const{cell:r}=d;r.column==="Entity"&&!("Name"in r.rowData)&&(r.style.gridColumn="1 / -1")})),D.addEventListener("rowcreated",d=>{d.stopImmediatePropagation();const{row:r}=d.detail,o=i.get(Te),p=nt(i,r.data);p&&Object.keys(p).length!==0&&(r.onmouseover=()=>{c&&(r.style.backgroundColor="var(--bim-ui_bg-contrast-20)",o.highlightByID(c,p,!0,!1,o.selection[a]??{}))},r.onmouseout=()=>{r.style.backgroundColor="",o.clear(c)},r.onclick=()=>{a&&o.highlightByID(a,p,!0,!0)})});const s=n.inverseAttributes??["IsDecomposedBy","ContainsElements"];return tt(i,t,s,l).then(d=>D.data=d),C`${D}`},it=(n,i=!0)=>{const t=v.create(ot,n);if(i){const[,l]=t,{components:a}=n,c=a.get(M),s=a.get($),d=()=>l({models:c.groups.values()});s.onRelationsIndexed.add(d),c.onFragmentsDisposed.add(d)}return t},st=Object.freeze(Object.defineProperty({__proto__:null,relationsTree:it},Symbol.toStringTag,{value:"Module"})),H=(n,i)=>[...n.get(Se).list.values()].find(a=>a.world===i),rt=(n,i)=>C` + `},Ze=n=>v.create(Xe,n),et=Object.freeze(Object.defineProperty({__proto__:null,elementProperties:Ze},Symbol.toStringTag,{value:"Module"})),X=async(n,i,t,l)=>{var o;const a=[],c=n.get($),s=await i.getProperties(t);if(!s)return a;const{type:d}=s,r={data:{Entity:Y[d],Name:(o=s.Name)==null?void 0:o.value,modelID:i.uuid,expressID:t}};for(const p of l){const u=c.getEntityRelations(i,t,p);if(!u)continue;r.children||(r.children=[]),r.data.relations=JSON.stringify(u);const f={};for(const e of u){const m=await X(n,i,e,l);for(const h of m)if(h.data.relations)r.children.push(h);else{const N=i.data.get(e);if(!N){r.children.push(h);continue}const w=N[1][1],x=Y[w];x in f||(f[x]=[]),h.data.Entity=h.data.Name,delete h.data.Name,f[x].push(h)}}for(const e in f){const m=f[e],h=m.map(w=>w.data.expressID),N={data:{Entity:e,modelID:i.uuid,relations:JSON.stringify(h)},children:m};r.children.push(N)}}return a.push(r),a},tt=async(n,i,t,l)=>{const a=n.get($),c=[];for(const s of i){let d;if(l)d={data:{Entity:s.name!==""?s.name:s.uuid},children:await X(n,s,l,t)};else{const r=a.relationMaps[s.uuid],o=await s.getAllPropertiesOfType(Ae);if(!(r&&o))continue;const{expressID:p}=Object.values(o)[0];d={data:{Entity:s.name!==""?s.name:s.uuid},children:await X(n,s,p,t)}}c.push(d)}return c};let D;const nt=(n,i)=>{const t=n.get(M),{modelID:l,expressID:a,relations:c}=i;if(!l)return null;const s=t.groups.get(l);return s?s.getFragmentMap([a,...JSON.parse(c??"[]")]):null},ot=n=>{const{components:i,models:t,expressID:l}=n,a=n.selectHighlighterName??"select",c=n.hoverHighlighterName??"hover";D||(D=document.createElement("bim-table"),D.hiddenColumns=["modelID","expressID","relations"],D.columns=["Entity","Name"],D.headersHidden=!0,D.addEventListener("cellcreated",({detail:d})=>{const{cell:r}=d;r.column==="Entity"&&!("Name"in r.rowData)&&(r.style.gridColumn="1 / -1")})),D.addEventListener("rowcreated",d=>{d.stopImmediatePropagation();const{row:r}=d.detail,o=i.get(Te),p=nt(i,r.data);p&&Object.keys(p).length!==0&&(r.onmouseover=()=>{c&&(r.style.backgroundColor="var(--bim-ui_bg-contrast-20)",o.highlightByID(c,p,!0,!1,o.selection[a]??{}))},r.onmouseout=()=>{r.style.backgroundColor="",o.clear(c)},r.onclick=()=>{a&&o.highlightByID(a,p,!0,!0)})});const s=n.inverseAttributes??["IsDecomposedBy","ContainsElements"];return tt(i,t,s,l).then(d=>D.data=d),C`${D}`},it=(n,i=!0)=>{const t=v.create(ot,n);if(i){const[,l]=t,{components:a}=n,c=a.get(M),s=a.get($),d=()=>l({models:c.groups.values()});s.onRelationsIndexed.add(d),c.onFragmentsDisposed.add(d)}return t},st=Object.freeze(Object.defineProperty({__proto__:null,relationsTree:it},Symbol.toStringTag,{value:"Module"})),H=(n,i)=>[...n.get(Se).list.values()].find(a=>a.world===i),rt=(n,i)=>C` {const a=l.target;n.color=new U(a.color)}} color=${i}> `,at=(n,i)=>{const{postproduction:t}=n,l=t.n8ao.configuration;return C` {const s=c.target;l.color=new U(s.color)}} color=${i}> @@ -68,11 +68,11 @@ import{F as M,$ as _,H as te,q as be,T as v,l as $,w as Y,r as he,K as ne,X as o @change="${e=>{const h=e.target.value;n[i]=h,u(h)}}" > `},ft=n=>{const{components:i}=n,t=i.get(ae);return C` - {const s=c.cell.parentNode;if(!s)return;const d=s.querySelector("bim-table-cell[column='Name']"),r=s.querySelector("bim-table-cell[column='Value']");d&&!r&&(d.style.gridColumn="1 / -1")}} ${_(async c=>{var r,o,p,u,f;if(!c)return;const s=c;s.preserveStructureOnFilter=!0,s.dataTransform={Value:(e,m)=>{const h=m.World,x=t.list.get(h);if(!x)return e;const{scene:w,camera:N,renderer:g}=x,b=m.Name;if(b==="Grid"&&m.IsGridConfig&&typeof e=="boolean"){const y=H(i,x);return y?F(y,"visible",e):e}if(b==="Color"&&m.IsGridConfig&&typeof e=="string"){const y=H(i,x);return y?lt(y,e):e}if(b==="Distance"&&m.IsGridConfig&&typeof e=="number"){const y=H(i,x);return y?T(y.material.uniforms.uDistance,"value",e,{slider:!0,min:300,max:1e3}):e}if(b==="Size"&&m.IsGridConfig&&typeof e=="string"){const y=H(i,x);if(!y)return e;const{x:I,y:A}=JSON.parse(e),k=T(y.material.uniforms.uSize1,"value",I,{slider:!0,suffix:"m",prefix:"A",min:1,max:20}),O=T(y.material.uniforms.uSize2,"value",A,{slider:!0,suffix:"m",prefix:"B",min:1,max:20});return C` + {const s=c.cell.parentNode;if(!s)return;const d=s.querySelector("bim-table-cell[column='Name']"),r=s.querySelector("bim-table-cell[column='Value']");d&&!r&&(d.style.gridColumn="1 / -1")}} ${_(async c=>{var r,o,p,u,f;if(!c)return;const s=c;s.preserveStructureOnFilter=!0,s.dataTransform={Value:(e,m)=>{const h=m.World,N=t.list.get(h);if(!N)return e;const{scene:w,camera:x,renderer:g}=N,b=m.Name;if(b==="Grid"&&m.IsGridConfig&&typeof e=="boolean"){const y=H(i,N);return y?F(y,"visible",e):e}if(b==="Color"&&m.IsGridConfig&&typeof e=="string"){const y=H(i,N);return y?lt(y,e):e}if(b==="Distance"&&m.IsGridConfig&&typeof e=="number"){const y=H(i,N);return y?T(y.material.uniforms.uDistance,"value",e,{slider:!0,min:300,max:1e3}):e}if(b==="Size"&&m.IsGridConfig&&typeof e=="string"){const y=H(i,N);if(!y)return e;const{x:I,y:A}=JSON.parse(e),k=T(y.material.uniforms.uSize1,"value",I,{slider:!0,suffix:"m",prefix:"A",min:1,max:20}),O=T(y.material.uniforms.uSize2,"value",A,{slider:!0,suffix:"m",prefix:"B",min:1,max:20});return C`
${k}${O}
- `}if(b==="Near Frustum"&&N.three instanceof z&&typeof e=="number"){const y=N.three;return T(N.three,"near",e,{slider:!0,min:.1,max:10,step:.1,onInputSet:()=>y.updateProjectionMatrix()})}if(b==="Far Frustum"&&N.three instanceof z&&typeof e=="number"){const y=N.three;return T(N.three,"far",e,{slider:!0,min:300,max:2e3,step:10,onInputSet:()=>y.updateProjectionMatrix()})}if(b==="Field of View"&&N.three instanceof z&&typeof e=="number"){const y=N.three;return T(N.three,"fov",e,{slider:!0,min:10,max:120,onInputSet:()=>y.updateProjectionMatrix()})}if(b==="Invert Drag"&&N.hasCameraControls()&&typeof e=="boolean")return F(N.controls,"dollyDragInverted",e);if(b==="Dolly Speed"&&N.hasCameraControls()&&typeof e=="number")return T(N.controls,"dollySpeed",e,{slider:!0,min:.5,max:3,step:.1});if(b==="Truck Speed"&&N.hasCameraControls()&&typeof e=="number")return T(N.controls,"truckSpeed",e,{slider:!0,min:.5,max:6,step:.1});if(b==="Smooth Time"&&N.hasCameraControls()&&typeof e=="number")return T(N.controls,"smoothTime",e,{slider:!0,min:.01,max:2,step:.01});if(b==="Intensity"&&typeof e=="number"){if(m.Light&&typeof m.Light=="string"){const y=w.three.children.find(I=>I.uuid===m.Light);return y&&y instanceof j?T(y,"intensity",e,{slider:!0,min:0,max:10,step:.1}):e}if(m.IsAOConfig&&g instanceof R)return T(g.postproduction.n8ao.configuration,"intensity",e,{slider:!0,max:16,step:.1})}if(b==="Color"&&typeof e=="string"){const y=m.Light,I=w.three.children.find(A=>A.uuid===y);if(I&&I instanceof j)return rt(I,e);if(m.IsAOConfig&&g instanceof R)return at(g,e)}if(b==="Ambient Oclussion"&&typeof e=="boolean"&&m.IsAOConfig&&g instanceof R)return ut(g,e);if(b==="Half Resolution"&&m.IsAOConfig&&g instanceof R&&typeof e=="boolean")return F(g.postproduction.n8ao.configuration,"halfRes",e);if(b==="Screen Space Radius"&&m.IsAOConfig&&g instanceof R&&typeof e=="boolean")return F(g.postproduction.n8ao.configuration,"screenSpaceRadius",e);if(b==="Radius"&&m.IsAOConfig&&g instanceof R&&typeof e=="number")return T(g.postproduction.n8ao.configuration,"aoRadius",e,{slider:!0,max:2,step:.1});if(b==="Denoise Samples"&&m.IsAOConfig&&g instanceof R&&typeof e=="number")return T(g.postproduction.n8ao.configuration,"denoiseSamples",e,{slider:!0,min:1,max:16});if(b==="Samples"&&m.IsAOConfig&&g instanceof R&&typeof e=="number")return T(g.postproduction.n8ao.configuration,"aoSamples",e,{slider:!0,min:1,max:16});if(b==="Denoise Radius"&&m.IsAOConfig&&g instanceof R&&typeof e=="number")return T(g.postproduction.n8ao.configuration,"denoiseRadius",e,{slider:!0,min:0,max:16,step:.1});if(b==="Distance Falloff"&&m.IsAOConfig&&g instanceof R&&typeof e=="number")return T(g.postproduction.n8ao.configuration,"distanceFalloff",e,{slider:!0,min:0,max:4,step:.1});if(b==="Directional Light"&&m.Light&&typeof m.Light=="string"&&typeof e=="boolean"){const y=w.three.children.find(I=>I.uuid===m.Light);return y&&y instanceof j?F(y,"visible",e):e}if(b==="Ambient Light"&&m.Light&&typeof m.Light=="string"&&typeof e=="boolean"){const y=w.three.children.find(I=>I.uuid===m.Light);return y&&y instanceof j?F(y,"visible",e):e}if(b==="Position"&&m.Light&&typeof m.Light=="string"&&typeof e=="string"){const y=w.three.children.find(V=>V.uuid===m.Light);if(!(y&&y instanceof j))return e;const{x:I,y:A,z:k}=JSON.parse(e),O=T(y.position,"x",I,{slider:!0,prefix:"X",suffix:"m",min:-50,max:50}),S=T(y.position,"y",A,{slider:!0,prefix:"Y",suffix:"m",min:-50,max:50}),E=T(y.position,"z",k,{slider:!0,prefix:"Z",suffix:"m",min:-50,max:50});return C` + `}if(b==="Near Frustum"&&x.three instanceof z&&typeof e=="number"){const y=x.three;return T(x.three,"near",e,{slider:!0,min:.1,max:10,step:.1,onInputSet:()=>y.updateProjectionMatrix()})}if(b==="Far Frustum"&&x.three instanceof z&&typeof e=="number"){const y=x.three;return T(x.three,"far",e,{slider:!0,min:300,max:2e3,step:10,onInputSet:()=>y.updateProjectionMatrix()})}if(b==="Field of View"&&x.three instanceof z&&typeof e=="number"){const y=x.three;return T(x.three,"fov",e,{slider:!0,min:10,max:120,onInputSet:()=>y.updateProjectionMatrix()})}if(b==="Invert Drag"&&x.hasCameraControls()&&typeof e=="boolean")return F(x.controls,"dollyDragInverted",e);if(b==="Dolly Speed"&&x.hasCameraControls()&&typeof e=="number")return T(x.controls,"dollySpeed",e,{slider:!0,min:.5,max:3,step:.1});if(b==="Truck Speed"&&x.hasCameraControls()&&typeof e=="number")return T(x.controls,"truckSpeed",e,{slider:!0,min:.5,max:6,step:.1});if(b==="Smooth Time"&&x.hasCameraControls()&&typeof e=="number")return T(x.controls,"smoothTime",e,{slider:!0,min:.01,max:2,step:.01});if(b==="Intensity"&&typeof e=="number"){if(m.Light&&typeof m.Light=="string"){const y=w.three.children.find(I=>I.uuid===m.Light);return y&&y instanceof j?T(y,"intensity",e,{slider:!0,min:0,max:10,step:.1}):e}if(m.IsAOConfig&&g instanceof R)return T(g.postproduction.n8ao.configuration,"intensity",e,{slider:!0,max:16,step:.1})}if(b==="Color"&&typeof e=="string"){const y=m.Light,I=w.three.children.find(A=>A.uuid===y);if(I&&I instanceof j)return rt(I,e);if(m.IsAOConfig&&g instanceof R)return at(g,e)}if(b==="Ambient Oclussion"&&typeof e=="boolean"&&m.IsAOConfig&&g instanceof R)return ut(g,e);if(b==="Half Resolution"&&m.IsAOConfig&&g instanceof R&&typeof e=="boolean")return F(g.postproduction.n8ao.configuration,"halfRes",e);if(b==="Screen Space Radius"&&m.IsAOConfig&&g instanceof R&&typeof e=="boolean")return F(g.postproduction.n8ao.configuration,"screenSpaceRadius",e);if(b==="Radius"&&m.IsAOConfig&&g instanceof R&&typeof e=="number")return T(g.postproduction.n8ao.configuration,"aoRadius",e,{slider:!0,max:2,step:.1});if(b==="Denoise Samples"&&m.IsAOConfig&&g instanceof R&&typeof e=="number")return T(g.postproduction.n8ao.configuration,"denoiseSamples",e,{slider:!0,min:1,max:16});if(b==="Samples"&&m.IsAOConfig&&g instanceof R&&typeof e=="number")return T(g.postproduction.n8ao.configuration,"aoSamples",e,{slider:!0,min:1,max:16});if(b==="Denoise Radius"&&m.IsAOConfig&&g instanceof R&&typeof e=="number")return T(g.postproduction.n8ao.configuration,"denoiseRadius",e,{slider:!0,min:0,max:16,step:.1});if(b==="Distance Falloff"&&m.IsAOConfig&&g instanceof R&&typeof e=="number")return T(g.postproduction.n8ao.configuration,"distanceFalloff",e,{slider:!0,min:0,max:4,step:.1});if(b==="Directional Light"&&m.Light&&typeof m.Light=="string"&&typeof e=="boolean"){const y=w.three.children.find(I=>I.uuid===m.Light);return y&&y instanceof j?F(y,"visible",e):e}if(b==="Ambient Light"&&m.Light&&typeof m.Light=="string"&&typeof e=="boolean"){const y=w.three.children.find(I=>I.uuid===m.Light);return y&&y instanceof j?F(y,"visible",e):e}if(b==="Position"&&m.Light&&typeof m.Light=="string"&&typeof e=="string"){const y=w.three.children.find(V=>V.uuid===m.Light);if(!(y&&y instanceof j))return e;const{x:I,y:A,z:k}=JSON.parse(e),O=T(y.position,"x",I,{slider:!0,prefix:"X",suffix:"m",min:-50,max:50}),S=T(y.position,"y",A,{slider:!0,prefix:"Y",suffix:"m",min:-50,max:50}),E=T(y.position,"z",k,{slider:!0,prefix:"Z",suffix:"m",min:-50,max:50});return C`
${O}${S}${E}
- `}return b==="Custom Effects"&&m.IsCEConfig&&g instanceof R&&typeof e=="boolean"?mt(g,e):b==="Color"&&m.IsOutlineConfig&&g instanceof R&&typeof e=="string"?ct(g,e):b==="Tolerance"&&m.IsOutlineConfig&&g instanceof R&&typeof e=="number"?T(g.postproduction.customEffects,"tolerance",e,{slider:!0,min:0,max:6,step:.01}):b==="Outline"&&m.IsOutlineConfig&&g instanceof R&&typeof e=="boolean"?F(g.postproduction.customEffects,"outlineEnabled",e):b==="Gloss"&&m.IsGlossConfig&&g instanceof R&&typeof e=="boolean"?F(g.postproduction.customEffects,"glossEnabled",e):b==="Min"&&m.IsGlossConfig&&g instanceof R&&typeof e=="number"?T(g.postproduction.customEffects,"minGloss",e,{slider:!0,min:-.5,max:.5,step:.01}):b==="Max"&&m.IsGlossConfig&&g instanceof R&&typeof e=="number"?T(g.postproduction.customEffects,"maxGloss",e,{slider:!0,min:-.5,max:.5,step:.01}):b==="Exponent"&&m.IsGlossConfig&&g instanceof R&&typeof e=="number"?T(g.postproduction.customEffects,"glossExponent",e,{slider:!0,min:0,max:5,step:.01}):b==="Gamma Correction"&&m.IsGammaConfig&&g instanceof R&&typeof e=="boolean"?dt(g,e):e}};const d=[];for(const[,e]of t.list){const{scene:m,camera:h,renderer:x}=e,w=H(i,e),N={data:{Name:e instanceof Re&&e.name||e.uuid},children:[]};if(m){const g={data:{Name:"Scene"}};if(w){const A=`#${w.material.uniforms.uColor.value.getHexString()}`,k=JSON.stringify({x:w.material.uniforms.uSize1.value,y:w.material.uniforms.uSize2.value}),O={data:{Name:"Grid",Value:w.three.visible,World:e.uuid,IsGridConfig:!0},children:[{data:{Name:"Color",Value:A,World:e.uuid,IsGridConfig:!0}},{data:{Name:"Size",Value:k,World:e.uuid,IsGridConfig:!0}},{data:{Name:"Distance",Value:w.material.uniforms.uDistance.value,World:e.uuid,IsGridConfig:!0}}]};g.children||(g.children=[]),g.children.push(O)}const b=m.three.children.filter(I=>I instanceof Ee);for(const I of b){const A={data:{Name:"Directional Light",Value:I.visible,World:e.uuid,Light:I.uuid},children:[{data:{Name:"Position",Value:JSON.stringify(I.position),World:e.uuid,Light:I.uuid}},{data:{Name:"Intensity",Value:I.intensity,World:e.uuid,Light:I.uuid}},{data:{Name:"Color",Value:`#${I.color.getHexString()}`,World:e.uuid,Light:I.uuid}}]};g.children||(g.children=[]),g.children.push(A)}const y=m.three.children.filter(I=>I instanceof $e);for(const I of y){const A={data:{Name:"Ambient Light",Value:I.visible,World:e.uuid,Light:I.uuid},children:[{data:{Name:"Intensity",Value:I.intensity,World:e.uuid,Light:I.uuid}},{data:{Name:"Color",Value:`#${I.color.getHexString()}`,World:e.uuid,Light:I.uuid}}]};g.children||(g.children=[]),g.children.push(A)}g.children&&((r=g.children)==null?void 0:r.length)>0&&((o=N.children)==null||o.push(g))}if(h.three instanceof z){const g={data:{Name:"Perspective Camera"},children:[{data:{Name:"Near Frustum",Value:h.three.near,World:e.uuid}},{data:{Name:"Far Frustum",Value:h.three.far,World:e.uuid}},{data:{Name:"Field of View",Value:h.three.fov,World:e.uuid}}]};if(h.hasCameraControls()){const{controls:b}=h,y={dollyDragInverted:"Invert Drag",dollySpeed:"Dolly Speed",truckSpeed:"Truck Speed",smoothTime:"Smooth Time"};for(const I in y){const A=b[I];A!=null&&((p=g.children)==null||p.push({data:{Name:y[I],Value:A,World:e.uuid}}))}}(u=N.children)==null||u.push(g)}if(x instanceof R){const{postproduction:g}=x,b=g.n8ao.configuration,y={data:{Name:"Renderer"},children:[{data:{Name:"Gamma Correction",Value:g.settings.gamma??!1,World:e.uuid,IsGammaConfig:!0}},{data:{Name:"Ambient Oclussion",Value:g.settings.ao??!1,World:e.uuid,IsAOConfig:!0},children:[{data:{Name:"Samples",Value:b.aoSamples,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Color",Value:`#${b.color.getHexString()}`,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Half Resolution",Value:b.halfRes,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Screen Space Radius",Value:b.screenSpaceRadius,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Radius",Value:b.aoRadius,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Intensity",Value:b.intensity,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Distance Falloff",Value:b.distanceFalloff,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Denoise Samples",Value:b.denoiseSamples,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Denoise Radius",Value:b.denoiseRadius,World:e.uuid,IsAOConfig:!0}}]},{data:{Name:"Custom Effects",Value:g.settings.custom??!1,World:e.uuid,IsCEConfig:!0},children:[{data:{Name:"Gloss",Value:g.customEffects.glossEnabled,World:e.uuid,IsGlossConfig:!0},children:[{data:{Name:"Min",Value:g.customEffects.minGloss,World:e.uuid,IsGlossConfig:!0}},{data:{Name:"Max",Value:g.customEffects.maxGloss,World:e.uuid,IsGlossConfig:!0}},{data:{Name:"Exponent",Value:g.customEffects.glossExponent,World:e.uuid,IsGlossConfig:!0}}]},{data:{Name:"Outline",Value:g.customEffects.outlineEnabled,World:e.uuid,IsOutlineConfig:!0},children:[{data:{Name:"Color",get Value(){const I=new U(g.customEffects.lineColor),A=g.customEffects.opacity;return JSON.stringify({color:`#${I.getHexString()}`,opacity:A})},World:e.uuid,IsOutlineConfig:!0}},{data:{Name:"Tolerance",Value:g.customEffects.tolerance,World:e.uuid,IsOutlineConfig:!0}}]}]}]};(f=N.children)==null||f.push(y)}d.push(N)}s.columns=[{name:"Name",width:"11rem"}],s.hiddenColumns=["World","Light","IsAOConfig","IsCEConfig","IsGlossConfig","IsOutlineConfig","IsGammaConfig","IsGridConfig"],s.data=d})} headers-hidden expanded> + `}return b==="Custom Effects"&&m.IsCEConfig&&g instanceof R&&typeof e=="boolean"?mt(g,e):b==="Color"&&m.IsOutlineConfig&&g instanceof R&&typeof e=="string"?ct(g,e):b==="Tolerance"&&m.IsOutlineConfig&&g instanceof R&&typeof e=="number"?T(g.postproduction.customEffects,"tolerance",e,{slider:!0,min:0,max:6,step:.01}):b==="Outline"&&m.IsOutlineConfig&&g instanceof R&&typeof e=="boolean"?F(g.postproduction.customEffects,"outlineEnabled",e):b==="Gloss"&&m.IsGlossConfig&&g instanceof R&&typeof e=="boolean"?F(g.postproduction.customEffects,"glossEnabled",e):b==="Min"&&m.IsGlossConfig&&g instanceof R&&typeof e=="number"?T(g.postproduction.customEffects,"minGloss",e,{slider:!0,min:-.5,max:.5,step:.01}):b==="Max"&&m.IsGlossConfig&&g instanceof R&&typeof e=="number"?T(g.postproduction.customEffects,"maxGloss",e,{slider:!0,min:-.5,max:.5,step:.01}):b==="Exponent"&&m.IsGlossConfig&&g instanceof R&&typeof e=="number"?T(g.postproduction.customEffects,"glossExponent",e,{slider:!0,min:0,max:5,step:.01}):b==="Gamma Correction"&&m.IsGammaConfig&&g instanceof R&&typeof e=="boolean"?dt(g,e):e}};const d=[];for(const[,e]of t.list){const{scene:m,camera:h,renderer:N}=e,w=H(i,e),x={data:{Name:e instanceof Re&&e.name||e.uuid},children:[]};if(m){const g={data:{Name:"Scene"}};if(w){const A=`#${w.material.uniforms.uColor.value.getHexString()}`,k=JSON.stringify({x:w.material.uniforms.uSize1.value,y:w.material.uniforms.uSize2.value}),O={data:{Name:"Grid",Value:w.three.visible,World:e.uuid,IsGridConfig:!0},children:[{data:{Name:"Color",Value:A,World:e.uuid,IsGridConfig:!0}},{data:{Name:"Size",Value:k,World:e.uuid,IsGridConfig:!0}},{data:{Name:"Distance",Value:w.material.uniforms.uDistance.value,World:e.uuid,IsGridConfig:!0}}]};g.children||(g.children=[]),g.children.push(O)}const b=m.three.children.filter(I=>I instanceof Ee);for(const I of b){const A={data:{Name:"Directional Light",Value:I.visible,World:e.uuid,Light:I.uuid},children:[{data:{Name:"Position",Value:JSON.stringify(I.position),World:e.uuid,Light:I.uuid}},{data:{Name:"Intensity",Value:I.intensity,World:e.uuid,Light:I.uuid}},{data:{Name:"Color",Value:`#${I.color.getHexString()}`,World:e.uuid,Light:I.uuid}}]};g.children||(g.children=[]),g.children.push(A)}const y=m.three.children.filter(I=>I instanceof $e);for(const I of y){const A={data:{Name:"Ambient Light",Value:I.visible,World:e.uuid,Light:I.uuid},children:[{data:{Name:"Intensity",Value:I.intensity,World:e.uuid,Light:I.uuid}},{data:{Name:"Color",Value:`#${I.color.getHexString()}`,World:e.uuid,Light:I.uuid}}]};g.children||(g.children=[]),g.children.push(A)}g.children&&((r=g.children)==null?void 0:r.length)>0&&((o=x.children)==null||o.push(g))}if(h.three instanceof z){const g={data:{Name:"Perspective Camera"},children:[{data:{Name:"Near Frustum",Value:h.three.near,World:e.uuid}},{data:{Name:"Far Frustum",Value:h.three.far,World:e.uuid}},{data:{Name:"Field of View",Value:h.three.fov,World:e.uuid}}]};if(h.hasCameraControls()){const{controls:b}=h,y={dollyDragInverted:"Invert Drag",dollySpeed:"Dolly Speed",truckSpeed:"Truck Speed",smoothTime:"Smooth Time"};for(const I in y){const A=b[I];A!=null&&((p=g.children)==null||p.push({data:{Name:y[I],Value:A,World:e.uuid}}))}}(u=x.children)==null||u.push(g)}if(N instanceof R){const{postproduction:g}=N,b=g.n8ao.configuration,y={data:{Name:"Renderer"},children:[{data:{Name:"Gamma Correction",Value:g.settings.gamma??!1,World:e.uuid,IsGammaConfig:!0}},{data:{Name:"Ambient Oclussion",Value:g.settings.ao??!1,World:e.uuid,IsAOConfig:!0},children:[{data:{Name:"Samples",Value:b.aoSamples,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Color",Value:`#${b.color.getHexString()}`,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Half Resolution",Value:b.halfRes,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Screen Space Radius",Value:b.screenSpaceRadius,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Radius",Value:b.aoRadius,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Intensity",Value:b.intensity,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Distance Falloff",Value:b.distanceFalloff,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Denoise Samples",Value:b.denoiseSamples,World:e.uuid,IsAOConfig:!0}},{data:{Name:"Denoise Radius",Value:b.denoiseRadius,World:e.uuid,IsAOConfig:!0}}]},{data:{Name:"Custom Effects",Value:g.settings.custom??!1,World:e.uuid,IsCEConfig:!0},children:[{data:{Name:"Gloss",Value:g.customEffects.glossEnabled,World:e.uuid,IsGlossConfig:!0},children:[{data:{Name:"Min",Value:g.customEffects.minGloss,World:e.uuid,IsGlossConfig:!0}},{data:{Name:"Max",Value:g.customEffects.maxGloss,World:e.uuid,IsGlossConfig:!0}},{data:{Name:"Exponent",Value:g.customEffects.glossExponent,World:e.uuid,IsGlossConfig:!0}}]},{data:{Name:"Outline",Value:g.customEffects.outlineEnabled,World:e.uuid,IsOutlineConfig:!0},children:[{data:{Name:"Color",get Value(){const I=new U(g.customEffects.lineColor),A=g.customEffects.opacity;return JSON.stringify({color:`#${I.getHexString()}`,opacity:A})},World:e.uuid,IsOutlineConfig:!0}},{data:{Name:"Tolerance",Value:g.customEffects.tolerance,World:e.uuid,IsOutlineConfig:!0}}]}]}]};(f=x.children)==null||f.push(y)}d.push(x)}s.columns=[{name:"Name",width:"11rem"}],s.hiddenColumns=["World","Light","IsAOConfig","IsCEConfig","IsGlossConfig","IsOutlineConfig","IsGammaConfig","IsGridConfig"],s.data=d})} headers-hidden expanded> No worlds to configure @@ -148,7 +148,7 @@ import{F as M,$ as _,H as te,q as be,T as v,l as $,w as Y,r as he,K as ne,X as o `}};let r=i.comments.values();l&&(r=[...i.comments.values()].filter(o=>o.viewpoint===l)),d.data=[...r].map(o=>({data:{guid:o.guid,Comment:o.comment,author:(()=>{const p=t;if(!p)return o.author;const u=p[o.author];return(u==null?void 0:u.name)??o.author})()}}))})}> This topic has no comments
- `},It=(n,i=!0)=>{const t=v.create(Ct,n);if(i){const{topic:l}=n,[a,c]=t;l.comments.onItemSet.add(()=>c()),l.comments.onItemUpdated.add(()=>c()),l.comments.onItemDeleted.add(()=>c()),l.comments.onCleared.add(()=>c())}return t},wt=Object.freeze(Object.defineProperty({__proto__:null,topicComments:It},Symbol.toStringTag,{value:"Module"})),xt=n=>{var r;const{components:i,topic:t}=n,l={selectComponents:!0,colorizeComponent:!0,resetColors:!0,updateCamera:!0,delete:!0,unlink:!!t,...n.actions},a=i.get(ue),c=((r=n.topic)==null?void 0:r.viewpoints)??a.list.keys(),s=[];for(const o of c){const p=a.list.get(o);p&&s.push(p)}return C` + `},It=(n,i=!0)=>{const t=v.create(Ct,n);if(i){const{topic:l}=n,[a,c]=t;l.comments.onItemSet.add(()=>c()),l.comments.onItemUpdated.add(()=>c()),l.comments.onItemDeleted.add(()=>c()),l.comments.onCleared.add(()=>c())}return t},wt=Object.freeze(Object.defineProperty({__proto__:null,topicComments:It},Symbol.toStringTag,{value:"Module"})),Nt=n=>{var r;const{components:i,topic:t}=n,l={selectComponents:!0,colorizeComponent:!0,resetColors:!0,updateCamera:!0,delete:!0,unlink:!!t,...n.actions},a=i.get(ue),c=((r=n.topic)==null?void 0:r.viewpoints)??a.list.keys(),s=[];for(const o of c){const p=a.list.get(o);p&&s.push(p)}return C` {if(!o)return;const p=o;p.addEventListener("cellcreated",({detail:u})=>{const{cell:f}=u;f.style.padding="0.25rem"}),p.headersHidden=!0,p.hiddenColumns=["Guid"],p.columns=["Title",{name:"Actions",width:"auto"}],p.dataTransform={Actions:(u,f)=>{const{Guid:e}=f;if(!(e&&typeof e=="string"))return e||"";const m=a.list.get(e);return m?C` m.go()}> ${Object.values(l).includes(!0)?C` @@ -166,4 +166,4 @@ import{F as M,$ as _,H as te,q as be,T as v,l as $,w as Y,r as he,K as ne,X as o `:e}},p.data=s.map((u,f)=>({data:{Guid:u.guid,Title:u.title??`Viewpoint ${n.topic?f+1:""}`,Actions:""}}))})}> No viewpoints to show - `},Nt=(n,i=!0)=>{const t=v.create(xt,n),{components:l,topic:a}=n;if(i){const[,c]=t,s=l.get(ue);s.list.onItemUpdated.add(()=>c()),s.list.onItemDeleted.add(()=>c()),s.list.onCleared.add(()=>c()),a?(a.viewpoints.onItemAdded.add(()=>c()),a.viewpoints.onItemDeleted.add(()=>c()),a.viewpoints.onCleared.add(()=>c())):s.list.onItemSet.add(()=>c())}return t},Tt=Object.freeze(Object.defineProperty({__proto__:null,viewpointsList:Nt},Symbol.toStringTag,{value:"Module"})),$t={...ke,...Fe,...Ve,...et,...st,...gt,...yt,...wt,...Tt};export{$t as t}; + `},xt=(n,i=!0)=>{const t=v.create(Nt,n),{components:l,topic:a}=n;if(i){const[,c]=t,s=l.get(ue);s.list.onItemUpdated.add(()=>c()),s.list.onItemDeleted.add(()=>c()),s.list.onCleared.add(()=>c()),a?(a.viewpoints.onItemAdded.add(()=>c()),a.viewpoints.onItemDeleted.add(()=>c()),a.viewpoints.onCleared.add(()=>c())):s.list.onItemSet.add(()=>c())}return t},Tt=Object.freeze(Object.defineProperty({__proto__:null,viewpointsList:xt},Symbol.toStringTag,{value:"Module"})),$t={...ke,...Fe,...Ve,...et,...st,...gt,...yt,...wt,...Tt};export{$t as t}; diff --git a/examples/assets/index-BCngLrVF.js b/examples/assets/index-CcrzIsUO.js similarity index 88% rename from examples/assets/index-BCngLrVF.js rename to examples/assets/index-CcrzIsUO.js index 591d7016..14bf7282 100644 --- a/examples/assets/index-BCngLrVF.js +++ b/examples/assets/index-CcrzIsUO.js @@ -1,4 +1,4 @@ -var qn=Object.defineProperty;var Wn=(i,t,e)=>t in i?qn(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var rt=(i,t,e)=>(Wn(i,typeof t!="symbol"?t+"":t,e),e);import{i as C,r as $,B as Ht,x as p,E as Qn}from"./lit-element-CToom8Wf.js";import{n as u,r as It}from"./state-H9kisBvQ.js";import{e as St,n as kt}from"./ref-CyNRy2Tn.js";const Ot=Math.min,Y=Math.max,re=Math.round,ot=i=>({x:i,y:i}),Un={left:"right",right:"left",bottom:"top",top:"bottom"},Gn={start:"end",end:"start"};function $i(i,t,e){return Y(i,Ot(t,e))}function Ut(i,t){return typeof i=="function"?i(t):i}function J(i){return i.split("-")[0]}function ve(i){return i.split("-")[1]}function Ji(i){return i==="x"?"y":"x"}function Ki(i){return i==="y"?"height":"width"}function xt(i){return["top","bottom"].includes(J(i))?"y":"x"}function Zi(i){return Ji(xt(i))}function Xn(i,t,e){e===void 0&&(e=!1);const s=ve(i),n=Zi(i),r=Ki(n);let o=n==="x"?s===(e?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(o=oe(o)),[o,oe(o)]}function Yn(i){const t=oe(i);return[Le(i),t,Le(t)]}function Le(i){return i.replace(/start|end/g,t=>Gn[t])}function Jn(i,t,e){const s=["left","right"],n=["right","left"],r=["top","bottom"],o=["bottom","top"];switch(i){case"top":case"bottom":return e?t?n:s:t?s:n;case"left":case"right":return t?r:o;default:return[]}}function Kn(i,t,e,s){const n=ve(i);let r=Jn(J(i),e==="start",s);return n&&(r=r.map(o=>o+"-"+n),t&&(r=r.concat(r.map(Le)))),r}function oe(i){return i.replace(/left|right|bottom|top/g,t=>Un[t])}function Zn(i){return{top:0,right:0,bottom:0,left:0,...i}}function tn(i){return typeof i!="number"?Zn(i):{top:i,right:i,bottom:i,left:i}}function At(i){const{x:t,y:e,width:s,height:n}=i;return{width:s,height:n,top:e,left:t,right:t+s,bottom:e+n,x:t,y:e}}function Si(i,t,e){let{reference:s,floating:n}=i;const r=xt(t),o=Zi(t),l=Ki(o),a=J(t),c=r==="y",d=s.x+s.width/2-n.width/2,h=s.y+s.height/2-n.height/2,f=s[l]/2-n[l]/2;let m;switch(a){case"top":m={x:d,y:s.y-n.height};break;case"bottom":m={x:d,y:s.y+s.height};break;case"right":m={x:s.x+s.width,y:h};break;case"left":m={x:s.x-n.width,y:h};break;default:m={x:s.x,y:s.y}}switch(ve(t)){case"start":m[o]-=f*(e&&c?-1:1);break;case"end":m[o]+=f*(e&&c?-1:1);break}return m}const ts=async(i,t,e)=>{const{placement:s="bottom",strategy:n="absolute",middleware:r=[],platform:o}=e,l=r.filter(Boolean),a=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:i,floating:t,strategy:n}),{x:d,y:h}=Si(c,s,a),f=s,m={},b=0;for(let v=0;vW<=0)){var _t,Rt;const W=(((_t=r.flip)==null?void 0:_t.index)||0)+1,Et=P[W];if(Et)return{data:{index:W,overflows:k},reset:{placement:Et}};let it=(Rt=k.filter(nt=>nt.overflows[0]<=0).sort((nt,Q)=>nt.overflows[1]-Q.overflows[1])[0])==null?void 0:Rt.placement;if(!it)switch(m){case"bestFit":{var Ct;const nt=(Ct=k.filter(Q=>{if(x){const st=xt(Q.placement);return st===E||st==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(st=>st>0).reduce((st,Vn)=>st+Vn,0)]).sort((Q,st)=>Q[1]-st[1])[0])==null?void 0:Ct[0];nt&&(it=nt);break}case"initialPlacement":it=l;break}if(n!==it)return{reset:{placement:it}}}return{}}}};function nn(i){const t=Ot(...i.map(r=>r.left)),e=Ot(...i.map(r=>r.top)),s=Y(...i.map(r=>r.right)),n=Y(...i.map(r=>r.bottom));return{x:t,y:e,width:s-t,height:n-e}}function is(i){const t=i.slice().sort((n,r)=>n.y-r.y),e=[];let s=null;for(let n=0;ns.height/2?e.push([r]):e[e.length-1].push(r),s=r}return e.map(n=>At(nn(n)))}const ns=function(i){return i===void 0&&(i={}),{name:"inline",options:i,async fn(t){const{placement:e,elements:s,rects:n,platform:r,strategy:o}=t,{padding:l=2,x:a,y:c}=Ut(i,t),d=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(s.reference))||[]),h=is(d),f=At(nn(d)),m=tn(l);function b(){if(h.length===2&&h[0].left>h[1].right&&a!=null&&c!=null)return h.find(g=>a>g.left-m.left&&ag.top-m.top&&c=2){if(xt(e)==="y"){const k=h[0],_t=h[h.length-1],Rt=J(e)==="top",Ct=k.top,W=_t.bottom,Et=Rt?k.left:_t.left,it=Rt?k.right:_t.right,nt=it-Et,Q=W-Ct;return{top:Ct,bottom:W,left:Et,right:it,width:nt,height:Q,x:Et,y:Ct}}const g=J(e)==="left",S=Y(...h.map(k=>k.right)),E=Ot(...h.map(k=>k.left)),w=h.filter(k=>g?k.left===E:k.right===S),_=w[0].top,O=w[w.length-1].bottom,x=E,P=S,F=P-x,H=O-_;return{top:_,bottom:O,left:x,right:P,width:F,height:H,x,y:_}}return f}const v=await r.getElementRects({reference:{getBoundingClientRect:b},floating:s.floating,strategy:o});return n.reference.x!==v.reference.x||n.reference.y!==v.reference.y||n.reference.width!==v.reference.width||n.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}};async function ss(i,t){const{placement:e,platform:s,elements:n}=i,r=await(s.isRTL==null?void 0:s.isRTL(n.floating)),o=J(e),l=ve(e),a=xt(e)==="y",c=["left","top"].includes(o)?-1:1,d=r&&a?-1:1,h=Ut(t,i);let{mainAxis:f,crossAxis:m,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof b=="number"&&(m=l==="end"?b*-1:b),a?{x:m*d,y:f*c}:{x:f*c,y:m*d}}const sn=function(i){return{name:"offset",options:i,async fn(t){var e,s;const{x:n,y:r,placement:o,middlewareData:l}=t,a=await ss(t,i);return o===((e=l.offset)==null?void 0:e.placement)&&(s=l.arrow)!=null&&s.alignmentOffset?{}:{x:n+a.x,y:r+a.y,data:{...a,placement:o}}}}},rs=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(t){const{x:e,y:s,placement:n}=t,{mainAxis:r=!0,crossAxis:o=!1,limiter:l={fn:g=>{let{x:S,y:E}=g;return{x:S,y:E}}},...a}=Ut(i,t),c={x:e,y:s},d=await en(t,a),h=xt(J(n)),f=Ji(h);let m=c[f],b=c[h];if(r){const g=f==="y"?"top":"left",S=f==="y"?"bottom":"right",E=m+d[g],w=m-d[S];m=$i(E,m,w)}if(o){const g=h==="y"?"top":"left",S=h==="y"?"bottom":"right",E=b+d[g],w=b-d[S];b=$i(E,b,w)}const v=l.fn({...t,[f]:m,[h]:b});return{...v,data:{x:v.x-e,y:v.y-s,enabled:{[f]:r,[h]:o}}}}}};function ye(){return typeof window<"u"}function lt(i){return rn(i)?(i.nodeName||"").toLowerCase():"#document"}function j(i){var t;return(i==null||(t=i.ownerDocument)==null?void 0:t.defaultView)||window}function pt(i){var t;return(t=(rn(i)?i.ownerDocument:i.document)||window.document)==null?void 0:t.documentElement}function rn(i){return ye()?i instanceof Node||i instanceof j(i).Node:!1}function U(i){return ye()?i instanceof Element||i instanceof j(i).Element:!1}function G(i){return ye()?i instanceof HTMLElement||i instanceof j(i).HTMLElement:!1}function ki(i){return!ye()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof j(i).ShadowRoot}function Gt(i){const{overflow:t,overflowX:e,overflowY:s,display:n}=B(i);return/auto|scroll|overlay|hidden|clip/.test(t+s+e)&&!["inline","contents"].includes(n)}function os(i){return["table","td","th"].includes(lt(i))}function ls(i){return[":popover-open",":modal"].some(t=>{try{return i.matches(t)}catch{return!1}})}function Qe(i){const t=Ue(),e=U(i)?B(i):i;return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":!1)||!t&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!t&&(e.filter?e.filter!=="none":!1)||["transform","perspective","filter"].some(s=>(e.willChange||"").includes(s))||["paint","layout","strict","content"].some(s=>(e.contain||"").includes(s))}function as(i){let t=Tt(i);for(;G(t)&&!xe(t);){if(Qe(t))return t;if(ls(t))return null;t=Tt(t)}return null}function Ue(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function xe(i){return["html","body","#document"].includes(lt(i))}function B(i){return j(i).getComputedStyle(i)}function we(i){return U(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.scrollX,scrollTop:i.scrollY}}function Tt(i){if(lt(i)==="html")return i;const t=i.assignedSlot||i.parentNode||ki(i)&&i.host||pt(i);return ki(t)?t.host:t}function on(i){const t=Tt(i);return xe(t)?i.ownerDocument?i.ownerDocument.body:i.body:G(t)&&Gt(t)?t:on(t)}function Ie(i,t,e){var s;t===void 0&&(t=[]),e===void 0&&(e=!0);const n=on(i),r=n===((s=i.ownerDocument)==null?void 0:s.body),o=j(n);if(r){const l=cs(o);return t.concat(o,o.visualViewport||[],Gt(n)?n:[],l&&e?Ie(l):[])}return t.concat(n,Ie(n,[],e))}function cs(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function ln(i){const t=B(i);let e=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const n=G(i),r=n?i.offsetWidth:e,o=n?i.offsetHeight:s,l=re(e)!==r||re(s)!==o;return l&&(e=r,s=o),{width:e,height:s,$:l}}function an(i){return U(i)?i:i.contextElement}function $t(i){const t=an(i);if(!G(t))return ot(1);const e=t.getBoundingClientRect(),{width:s,height:n,$:r}=ln(t);let o=(r?re(e.width):e.width)/s,l=(r?re(e.height):e.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const us=ot(0);function cn(i){const t=j(i);return!Ue()||!t.visualViewport?us:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ds(i,t,e){return t===void 0&&(t=!1),!e||t&&e!==j(i)?!1:t}function Nt(i,t,e,s){t===void 0&&(t=!1),e===void 0&&(e=!1);const n=i.getBoundingClientRect(),r=an(i);let o=ot(1);t&&(s?U(s)&&(o=$t(s)):o=$t(i));const l=ds(r,e,s)?cn(r):ot(0);let a=(n.left+l.x)/o.x,c=(n.top+l.y)/o.y,d=n.width/o.x,h=n.height/o.y;if(r){const f=j(r),m=s&&U(s)?j(s):s;let b=f,v=b.frameElement;for(;v&&s&&m!==b;){const g=$t(v),S=v.getBoundingClientRect(),E=B(v),w=S.left+(v.clientLeft+parseFloat(E.paddingLeft))*g.x,_=S.top+(v.clientTop+parseFloat(E.paddingTop))*g.y;a*=g.x,c*=g.y,d*=g.x,h*=g.y,a+=w,c+=_,b=j(v),v=b.frameElement}}return At({width:d,height:h,x:a,y:c})}const hs=[":popover-open",":modal"];function un(i){return hs.some(t=>{try{return i.matches(t)}catch{return!1}})}function fs(i){let{elements:t,rect:e,offsetParent:s,strategy:n}=i;const r=n==="fixed",o=pt(s),l=t?un(t.floating):!1;if(s===o||l&&r)return e;let a={scrollLeft:0,scrollTop:0},c=ot(1);const d=ot(0),h=G(s);if((h||!h&&!r)&&((lt(s)!=="body"||Gt(o))&&(a=we(s)),G(s))){const f=Nt(s);c=$t(s),d.x=f.x+s.clientLeft,d.y=f.y+s.clientTop}return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-a.scrollLeft*c.x+d.x,y:e.y*c.y-a.scrollTop*c.y+d.y}}function ps(i){return Array.from(i.getClientRects())}function dn(i){return Nt(pt(i)).left+we(i).scrollLeft}function ms(i){const t=pt(i),e=we(i),s=i.ownerDocument.body,n=Y(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),r=Y(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let o=-e.scrollLeft+dn(i);const l=-e.scrollTop;return B(s).direction==="rtl"&&(o+=Y(t.clientWidth,s.clientWidth)-n),{width:n,height:r,x:o,y:l}}function bs(i,t){const e=j(i),s=pt(i),n=e.visualViewport;let r=s.clientWidth,o=s.clientHeight,l=0,a=0;if(n){r=n.width,o=n.height;const c=Ue();(!c||c&&t==="fixed")&&(l=n.offsetLeft,a=n.offsetTop)}return{width:r,height:o,x:l,y:a}}function gs(i,t){const e=Nt(i,!0,t==="fixed"),s=e.top+i.clientTop,n=e.left+i.clientLeft,r=G(i)?$t(i):ot(1),o=i.clientWidth*r.x,l=i.clientHeight*r.y,a=n*r.x,c=s*r.y;return{width:o,height:l,x:a,y:c}}function Oi(i,t,e){let s;if(t==="viewport")s=bs(i,e);else if(t==="document")s=ms(pt(i));else if(U(t))s=gs(t,e);else{const n=cn(i);s={...t,x:t.x-n.x,y:t.y-n.y}}return At(s)}function hn(i,t){const e=Tt(i);return e===t||!U(e)||xe(e)?!1:B(e).position==="fixed"||hn(e,t)}function vs(i,t){const e=t.get(i);if(e)return e;let s=Ie(i,[],!1).filter(l=>U(l)&<(l)!=="body"),n=null;const r=B(i).position==="fixed";let o=r?Tt(i):i;for(;U(o)&&!xe(o);){const l=B(o),a=Qe(o);!a&&l.position==="fixed"&&(n=null),(r?!a&&!n:!a&&l.position==="static"&&!!n&&["absolute","fixed"].includes(n.position)||Gt(o)&&!a&&hn(i,o))?s=s.filter(d=>d!==o):n=l,o=Tt(o)}return t.set(i,s),s}function ys(i){let{element:t,boundary:e,rootBoundary:s,strategy:n}=i;const o=[...e==="clippingAncestors"?vs(t,this._c):[].concat(e),s],l=o[0],a=o.reduce((c,d)=>{const h=Oi(t,d,n);return c.top=Y(h.top,c.top),c.right=Ot(h.right,c.right),c.bottom=Ot(h.bottom,c.bottom),c.left=Y(h.left,c.left),c},Oi(t,l,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function xs(i){const{width:t,height:e}=ln(i);return{width:t,height:e}}function ws(i,t,e){const s=G(t),n=pt(t),r=e==="fixed",o=Nt(i,!0,r,t);let l={scrollLeft:0,scrollTop:0};const a=ot(0);if(s||!s&&!r)if((lt(t)!=="body"||Gt(n))&&(l=we(t)),s){const h=Nt(t,!0,r,t);a.x=h.x+t.clientLeft,a.y=h.y+t.clientTop}else n&&(a.x=dn(n));const c=o.left+l.scrollLeft-a.x,d=o.top+l.scrollTop-a.y;return{x:c,y:d,width:o.width,height:o.height}}function Ai(i,t){return!G(i)||B(i).position==="fixed"?null:t?t(i):i.offsetParent}function fn(i,t){const e=j(i);if(!G(i)||un(i))return e;let s=Ai(i,t);for(;s&&os(s)&&B(s).position==="static";)s=Ai(s,t);return s&&(lt(s)==="html"||lt(s)==="body"&&B(s).position==="static"&&!Qe(s))?e:s||as(i)||e}const _s=async function(i){const t=this.getOffsetParent||fn,e=this.getDimensions;return{reference:ws(i.reference,await t(i.floating),i.strategy),floating:{x:0,y:0,...await e(i.floating)}}};function Cs(i){return B(i).direction==="rtl"}const Es={convertOffsetParentRelativeRectToViewportRelativeRect:fs,getDocumentElement:pt,getClippingRect:ys,getOffsetParent:fn,getElementRects:_s,getClientRects:ps,getDimensions:xs,getScale:$t,isElement:U,isRTL:Cs},pn=rs,mn=es,bn=ns,gn=(i,t,e)=>{const s=new Map,n={platform:Es,...e},r={...n.platform,_c:s};return ts(i,t,{...n,platform:r})};/** +var qn=Object.defineProperty;var Wn=(i,t,e)=>t in i?qn(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var rt=(i,t,e)=>(Wn(i,typeof t!="symbol"?t+"":t,e),e);import{i as C,r as $,n as u,a as It}from"./state-DYefyXr3.js";import{B as Ht,x as p,E as Qn}from"./lit-html-paDGiEfB.js";import{e as St,n as kt}from"./ref-CInB0H-f.js";const Ot=Math.min,Y=Math.max,re=Math.round,ot=i=>({x:i,y:i}),Un={left:"right",right:"left",bottom:"top",top:"bottom"},Gn={start:"end",end:"start"};function $i(i,t,e){return Y(i,Ot(t,e))}function Ut(i,t){return typeof i=="function"?i(t):i}function J(i){return i.split("-")[0]}function ve(i){return i.split("-")[1]}function Ji(i){return i==="x"?"y":"x"}function Ki(i){return i==="y"?"height":"width"}function xt(i){return["top","bottom"].includes(J(i))?"y":"x"}function Zi(i){return Ji(xt(i))}function Xn(i,t,e){e===void 0&&(e=!1);const s=ve(i),n=Zi(i),r=Ki(n);let o=n==="x"?s===(e?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(o=oe(o)),[o,oe(o)]}function Yn(i){const t=oe(i);return[Le(i),t,Le(t)]}function Le(i){return i.replace(/start|end/g,t=>Gn[t])}function Jn(i,t,e){const s=["left","right"],n=["right","left"],r=["top","bottom"],o=["bottom","top"];switch(i){case"top":case"bottom":return e?t?n:s:t?s:n;case"left":case"right":return t?r:o;default:return[]}}function Kn(i,t,e,s){const n=ve(i);let r=Jn(J(i),e==="start",s);return n&&(r=r.map(o=>o+"-"+n),t&&(r=r.concat(r.map(Le)))),r}function oe(i){return i.replace(/left|right|bottom|top/g,t=>Un[t])}function Zn(i){return{top:0,right:0,bottom:0,left:0,...i}}function tn(i){return typeof i!="number"?Zn(i):{top:i,right:i,bottom:i,left:i}}function At(i){const{x:t,y:e,width:s,height:n}=i;return{width:s,height:n,top:e,left:t,right:t+s,bottom:e+n,x:t,y:e}}function Si(i,t,e){let{reference:s,floating:n}=i;const r=xt(t),o=Zi(t),l=Ki(o),a=J(t),c=r==="y",d=s.x+s.width/2-n.width/2,h=s.y+s.height/2-n.height/2,f=s[l]/2-n[l]/2;let m;switch(a){case"top":m={x:d,y:s.y-n.height};break;case"bottom":m={x:d,y:s.y+s.height};break;case"right":m={x:s.x+s.width,y:h};break;case"left":m={x:s.x-n.width,y:h};break;default:m={x:s.x,y:s.y}}switch(ve(t)){case"start":m[o]-=f*(e&&c?-1:1);break;case"end":m[o]+=f*(e&&c?-1:1);break}return m}const ts=async(i,t,e)=>{const{placement:s="bottom",strategy:n="absolute",middleware:r=[],platform:o}=e,l=r.filter(Boolean),a=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:i,floating:t,strategy:n}),{x:d,y:h}=Si(c,s,a),f=s,m={},b=0;for(let v=0;vW<=0)){var _t,Rt;const W=(((_t=r.flip)==null?void 0:_t.index)||0)+1,Et=P[W];if(Et)return{data:{index:W,overflows:k},reset:{placement:Et}};let it=(Rt=k.filter(nt=>nt.overflows[0]<=0).sort((nt,Q)=>nt.overflows[1]-Q.overflows[1])[0])==null?void 0:Rt.placement;if(!it)switch(m){case"bestFit":{var Ct;const nt=(Ct=k.filter(Q=>{if(x){const st=xt(Q.placement);return st===E||st==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(st=>st>0).reduce((st,Vn)=>st+Vn,0)]).sort((Q,st)=>Q[1]-st[1])[0])==null?void 0:Ct[0];nt&&(it=nt);break}case"initialPlacement":it=l;break}if(n!==it)return{reset:{placement:it}}}return{}}}};function nn(i){const t=Ot(...i.map(r=>r.left)),e=Ot(...i.map(r=>r.top)),s=Y(...i.map(r=>r.right)),n=Y(...i.map(r=>r.bottom));return{x:t,y:e,width:s-t,height:n-e}}function is(i){const t=i.slice().sort((n,r)=>n.y-r.y),e=[];let s=null;for(let n=0;ns.height/2?e.push([r]):e[e.length-1].push(r),s=r}return e.map(n=>At(nn(n)))}const ns=function(i){return i===void 0&&(i={}),{name:"inline",options:i,async fn(t){const{placement:e,elements:s,rects:n,platform:r,strategy:o}=t,{padding:l=2,x:a,y:c}=Ut(i,t),d=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(s.reference))||[]),h=is(d),f=At(nn(d)),m=tn(l);function b(){if(h.length===2&&h[0].left>h[1].right&&a!=null&&c!=null)return h.find(g=>a>g.left-m.left&&ag.top-m.top&&c=2){if(xt(e)==="y"){const k=h[0],_t=h[h.length-1],Rt=J(e)==="top",Ct=k.top,W=_t.bottom,Et=Rt?k.left:_t.left,it=Rt?k.right:_t.right,nt=it-Et,Q=W-Ct;return{top:Ct,bottom:W,left:Et,right:it,width:nt,height:Q,x:Et,y:Ct}}const g=J(e)==="left",S=Y(...h.map(k=>k.right)),E=Ot(...h.map(k=>k.left)),w=h.filter(k=>g?k.left===E:k.right===S),_=w[0].top,O=w[w.length-1].bottom,x=E,P=S,F=P-x,H=O-_;return{top:_,bottom:O,left:x,right:P,width:F,height:H,x,y:_}}return f}const v=await r.getElementRects({reference:{getBoundingClientRect:b},floating:s.floating,strategy:o});return n.reference.x!==v.reference.x||n.reference.y!==v.reference.y||n.reference.width!==v.reference.width||n.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}};async function ss(i,t){const{placement:e,platform:s,elements:n}=i,r=await(s.isRTL==null?void 0:s.isRTL(n.floating)),o=J(e),l=ve(e),a=xt(e)==="y",c=["left","top"].includes(o)?-1:1,d=r&&a?-1:1,h=Ut(t,i);let{mainAxis:f,crossAxis:m,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof b=="number"&&(m=l==="end"?b*-1:b),a?{x:m*d,y:f*c}:{x:f*c,y:m*d}}const sn=function(i){return{name:"offset",options:i,async fn(t){var e,s;const{x:n,y:r,placement:o,middlewareData:l}=t,a=await ss(t,i);return o===((e=l.offset)==null?void 0:e.placement)&&(s=l.arrow)!=null&&s.alignmentOffset?{}:{x:n+a.x,y:r+a.y,data:{...a,placement:o}}}}},rs=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(t){const{x:e,y:s,placement:n}=t,{mainAxis:r=!0,crossAxis:o=!1,limiter:l={fn:g=>{let{x:S,y:E}=g;return{x:S,y:E}}},...a}=Ut(i,t),c={x:e,y:s},d=await en(t,a),h=xt(J(n)),f=Ji(h);let m=c[f],b=c[h];if(r){const g=f==="y"?"top":"left",S=f==="y"?"bottom":"right",E=m+d[g],w=m-d[S];m=$i(E,m,w)}if(o){const g=h==="y"?"top":"left",S=h==="y"?"bottom":"right",E=b+d[g],w=b-d[S];b=$i(E,b,w)}const v=l.fn({...t,[f]:m,[h]:b});return{...v,data:{x:v.x-e,y:v.y-s,enabled:{[f]:r,[h]:o}}}}}};function ye(){return typeof window<"u"}function lt(i){return rn(i)?(i.nodeName||"").toLowerCase():"#document"}function j(i){var t;return(i==null||(t=i.ownerDocument)==null?void 0:t.defaultView)||window}function pt(i){var t;return(t=(rn(i)?i.ownerDocument:i.document)||window.document)==null?void 0:t.documentElement}function rn(i){return ye()?i instanceof Node||i instanceof j(i).Node:!1}function U(i){return ye()?i instanceof Element||i instanceof j(i).Element:!1}function G(i){return ye()?i instanceof HTMLElement||i instanceof j(i).HTMLElement:!1}function ki(i){return!ye()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof j(i).ShadowRoot}function Gt(i){const{overflow:t,overflowX:e,overflowY:s,display:n}=B(i);return/auto|scroll|overlay|hidden|clip/.test(t+s+e)&&!["inline","contents"].includes(n)}function os(i){return["table","td","th"].includes(lt(i))}function ls(i){return[":popover-open",":modal"].some(t=>{try{return i.matches(t)}catch{return!1}})}function Qe(i){const t=Ue(),e=U(i)?B(i):i;return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":!1)||!t&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!t&&(e.filter?e.filter!=="none":!1)||["transform","perspective","filter"].some(s=>(e.willChange||"").includes(s))||["paint","layout","strict","content"].some(s=>(e.contain||"").includes(s))}function as(i){let t=Tt(i);for(;G(t)&&!xe(t);){if(Qe(t))return t;if(ls(t))return null;t=Tt(t)}return null}function Ue(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function xe(i){return["html","body","#document"].includes(lt(i))}function B(i){return j(i).getComputedStyle(i)}function we(i){return U(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.scrollX,scrollTop:i.scrollY}}function Tt(i){if(lt(i)==="html")return i;const t=i.assignedSlot||i.parentNode||ki(i)&&i.host||pt(i);return ki(t)?t.host:t}function on(i){const t=Tt(i);return xe(t)?i.ownerDocument?i.ownerDocument.body:i.body:G(t)&&Gt(t)?t:on(t)}function Ie(i,t,e){var s;t===void 0&&(t=[]),e===void 0&&(e=!0);const n=on(i),r=n===((s=i.ownerDocument)==null?void 0:s.body),o=j(n);if(r){const l=cs(o);return t.concat(o,o.visualViewport||[],Gt(n)?n:[],l&&e?Ie(l):[])}return t.concat(n,Ie(n,[],e))}function cs(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function ln(i){const t=B(i);let e=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const n=G(i),r=n?i.offsetWidth:e,o=n?i.offsetHeight:s,l=re(e)!==r||re(s)!==o;return l&&(e=r,s=o),{width:e,height:s,$:l}}function an(i){return U(i)?i:i.contextElement}function $t(i){const t=an(i);if(!G(t))return ot(1);const e=t.getBoundingClientRect(),{width:s,height:n,$:r}=ln(t);let o=(r?re(e.width):e.width)/s,l=(r?re(e.height):e.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const us=ot(0);function cn(i){const t=j(i);return!Ue()||!t.visualViewport?us:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ds(i,t,e){return t===void 0&&(t=!1),!e||t&&e!==j(i)?!1:t}function Nt(i,t,e,s){t===void 0&&(t=!1),e===void 0&&(e=!1);const n=i.getBoundingClientRect(),r=an(i);let o=ot(1);t&&(s?U(s)&&(o=$t(s)):o=$t(i));const l=ds(r,e,s)?cn(r):ot(0);let a=(n.left+l.x)/o.x,c=(n.top+l.y)/o.y,d=n.width/o.x,h=n.height/o.y;if(r){const f=j(r),m=s&&U(s)?j(s):s;let b=f,v=b.frameElement;for(;v&&s&&m!==b;){const g=$t(v),S=v.getBoundingClientRect(),E=B(v),w=S.left+(v.clientLeft+parseFloat(E.paddingLeft))*g.x,_=S.top+(v.clientTop+parseFloat(E.paddingTop))*g.y;a*=g.x,c*=g.y,d*=g.x,h*=g.y,a+=w,c+=_,b=j(v),v=b.frameElement}}return At({width:d,height:h,x:a,y:c})}const hs=[":popover-open",":modal"];function un(i){return hs.some(t=>{try{return i.matches(t)}catch{return!1}})}function fs(i){let{elements:t,rect:e,offsetParent:s,strategy:n}=i;const r=n==="fixed",o=pt(s),l=t?un(t.floating):!1;if(s===o||l&&r)return e;let a={scrollLeft:0,scrollTop:0},c=ot(1);const d=ot(0),h=G(s);if((h||!h&&!r)&&((lt(s)!=="body"||Gt(o))&&(a=we(s)),G(s))){const f=Nt(s);c=$t(s),d.x=f.x+s.clientLeft,d.y=f.y+s.clientTop}return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-a.scrollLeft*c.x+d.x,y:e.y*c.y-a.scrollTop*c.y+d.y}}function ps(i){return Array.from(i.getClientRects())}function dn(i){return Nt(pt(i)).left+we(i).scrollLeft}function ms(i){const t=pt(i),e=we(i),s=i.ownerDocument.body,n=Y(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),r=Y(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let o=-e.scrollLeft+dn(i);const l=-e.scrollTop;return B(s).direction==="rtl"&&(o+=Y(t.clientWidth,s.clientWidth)-n),{width:n,height:r,x:o,y:l}}function bs(i,t){const e=j(i),s=pt(i),n=e.visualViewport;let r=s.clientWidth,o=s.clientHeight,l=0,a=0;if(n){r=n.width,o=n.height;const c=Ue();(!c||c&&t==="fixed")&&(l=n.offsetLeft,a=n.offsetTop)}return{width:r,height:o,x:l,y:a}}function gs(i,t){const e=Nt(i,!0,t==="fixed"),s=e.top+i.clientTop,n=e.left+i.clientLeft,r=G(i)?$t(i):ot(1),o=i.clientWidth*r.x,l=i.clientHeight*r.y,a=n*r.x,c=s*r.y;return{width:o,height:l,x:a,y:c}}function Oi(i,t,e){let s;if(t==="viewport")s=bs(i,e);else if(t==="document")s=ms(pt(i));else if(U(t))s=gs(t,e);else{const n=cn(i);s={...t,x:t.x-n.x,y:t.y-n.y}}return At(s)}function hn(i,t){const e=Tt(i);return e===t||!U(e)||xe(e)?!1:B(e).position==="fixed"||hn(e,t)}function vs(i,t){const e=t.get(i);if(e)return e;let s=Ie(i,[],!1).filter(l=>U(l)&<(l)!=="body"),n=null;const r=B(i).position==="fixed";let o=r?Tt(i):i;for(;U(o)&&!xe(o);){const l=B(o),a=Qe(o);!a&&l.position==="fixed"&&(n=null),(r?!a&&!n:!a&&l.position==="static"&&!!n&&["absolute","fixed"].includes(n.position)||Gt(o)&&!a&&hn(i,o))?s=s.filter(d=>d!==o):n=l,o=Tt(o)}return t.set(i,s),s}function ys(i){let{element:t,boundary:e,rootBoundary:s,strategy:n}=i;const o=[...e==="clippingAncestors"?vs(t,this._c):[].concat(e),s],l=o[0],a=o.reduce((c,d)=>{const h=Oi(t,d,n);return c.top=Y(h.top,c.top),c.right=Ot(h.right,c.right),c.bottom=Ot(h.bottom,c.bottom),c.left=Y(h.left,c.left),c},Oi(t,l,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function xs(i){const{width:t,height:e}=ln(i);return{width:t,height:e}}function ws(i,t,e){const s=G(t),n=pt(t),r=e==="fixed",o=Nt(i,!0,r,t);let l={scrollLeft:0,scrollTop:0};const a=ot(0);if(s||!s&&!r)if((lt(t)!=="body"||Gt(n))&&(l=we(t)),s){const h=Nt(t,!0,r,t);a.x=h.x+t.clientLeft,a.y=h.y+t.clientTop}else n&&(a.x=dn(n));const c=o.left+l.scrollLeft-a.x,d=o.top+l.scrollTop-a.y;return{x:c,y:d,width:o.width,height:o.height}}function Ai(i,t){return!G(i)||B(i).position==="fixed"?null:t?t(i):i.offsetParent}function fn(i,t){const e=j(i);if(!G(i)||un(i))return e;let s=Ai(i,t);for(;s&&os(s)&&B(s).position==="static";)s=Ai(s,t);return s&&(lt(s)==="html"||lt(s)==="body"&&B(s).position==="static"&&!Qe(s))?e:s||as(i)||e}const _s=async function(i){const t=this.getOffsetParent||fn,e=this.getDimensions;return{reference:ws(i.reference,await t(i.floating),i.strategy),floating:{x:0,y:0,...await e(i.floating)}}};function Cs(i){return B(i).direction==="rtl"}const Es={convertOffsetParentRelativeRectToViewportRelativeRect:fs,getDocumentElement:pt,getClippingRect:ys,getOffsetParent:fn,getElementRects:_s,getClientRects:ps,getDimensions:xs,getScale:$t,isElement:U,isRTL:Cs},pn=rs,mn=es,bn=ns,gn=(i,t,e)=>{const s=new Map,n={platform:Es,...e},r={...n.platform,_c:s};return ts(i,t,{...n,platform:r})};/** * (c) Iconify * * For the full copyright and license information, please view the license.txt @@ -645,6 +645,7 @@ var qn=Object.defineProperty;var Wn=(i,t,e)=>t in i?qn(i,t,{enumerable:!0,config width: var(--bim-icon--fz, var(--bim-ui_size-sm)); color: var(--bim-icon--c); transition: all 0.15s; + display: flex; } `,ge.properties={icon:{type:String}};let We=ge;var Nr=Object.defineProperty,$e=(i,t,e,s)=>{for(var n=void 0,r=i.length-1,o;r>=0;r--)(o=i[r])&&(n=o(t,e,n)||n);return n&&Nr(t,e,n),n};const li=class li extends ${constructor(){super(...arguments),this.vertical=!1,this.onValueChange=new Event("change")}get value(){const t={};for(const e of this.children){const s=e;"value"in s?t[s.name||s.label]=s.value:"checked"in s&&(t[s.name||s.label]=s.checked)}return t}set value(t){const e=[...this.children];for(const s in t){const n=e.find(l=>{const a=l;return a.name===s||a.label===s});if(!n)continue;const r=n,o=t[s];typeof o=="boolean"?r.checked=o:r.value=o}}render(){return p`
@@ -715,7 +716,7 @@ var qn=Object.defineProperty;var Wn=(i,t,e)=>t in i?qn(i,t,{enumerable:!0,config overflow: hidden; display: block; white-space: nowrap; - line-height: 1.1rem; + line-height: 1.1em; transition: all 0.15s; } diff --git a/examples/assets/index-CqhcBaEU.js b/examples/assets/index-CqhcBaEU.js deleted file mode 100644 index 4b0605d0..00000000 --- a/examples/assets/index-CqhcBaEU.js +++ /dev/null @@ -1,8 +0,0 @@ -import{I as r,T as f}from"./index-DNiVoluI.js";import{x as s}from"./lit-element-CToom8Wf.js";const m=t=>{const{components:o}=t,c=o.get(r);return s` - {const e=document.createElement("input");e.type="file",e.accept=".ifc",e.onchange=async()=>{if(e.files===null||e.files.length===0)return;const n=e.files[0],a=n.name.replace(".ifc","");e.remove();const l=await n.arrayBuffer(),i=new Uint8Array(l);await c.load(i,!0,a)},e.click()}} - > - `},u=t=>f.create(m,t),d=Object.freeze(Object.defineProperty({__proto__:null,loadIfc:u},Symbol.toStringTag,{value:"Module"})),y={...d};export{y as b}; diff --git a/examples/assets/index-D5y7zaOe.js b/examples/assets/index-D6qWR67y.js similarity index 51% rename from examples/assets/index-D5y7zaOe.js rename to examples/assets/index-D6qWR67y.js index 42579c4e..c6260fdf 100644 --- a/examples/assets/index-D5y7zaOe.js +++ b/examples/assets/index-D6qWR67y.js @@ -1,4 +1,4 @@ -import{c as pt,V as gt,d as z,M as C,e as j,f as bt,L as _t,B as A,g as xt,h as vt,W as H,S as V,j as wt,O as W,i as yt,G as Ct,k as kt,P as D}from"./index-DNiVoluI.js";import{r as E,i as P,x as T}from"./lit-element-CToom8Wf.js";import{n as c,r as Mt}from"./state-H9kisBvQ.js";import{e as $t,n as St}from"./ref-CyNRy2Tn.js";class Xt extends pt{constructor(t=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=t,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new gt(.5,.5),this.addEventListener("removed",function(){this.traverse(function(e){e.element instanceof Element&&e.element.parentNode!==null&&e.element.parentNode.removeChild(e.element)})})}copy(t,e){return super.copy(t,e),this.element=t.element.cloneNode(!0),this.center=t.center,this}}new z;new C;new C;new z;new z;class Ot{constructor(t,e){this._group=new j,this._frustum=new bt,this._frustumMat=new C,this._regenerateDelay=200,this._regenerateCounter=0,this.material=new _t({color:"#2e3338"}),this.numbers=new j,this.maxRegenerateRetrys=4,this.gridsFactor=5,this._scaleX=1,this._scaleY=1,this._offsetX=0,this._offsetY=0,this._camera=t,this._container=e;const r=this.newGrid(-1),s=this.newGrid(-2);this.grids={main:r,secondary:s},this._group.add(s,r,this.numbers)}set scaleX(t){this._scaleX=t,this.regenerate()}get scaleX(){return this._scaleX}set scaleY(t){this._scaleY=t,this.regenerate()}get scaleY(){return this._scaleY}set offsetX(t){this._offsetX=t,this.regenerate()}get offsetX(){return this._offsetX}set offsetY(t){this._offsetY=t,this.regenerate()}get offsetY(){return this._offsetY}get(){return this._group}dispose(){const{main:t,secondary:e}=this.grids;t.removeFromParent(),e.removeFromParent(),t.geometry.dispose(),t.material.dispose(),e.geometry.dispose(),e.material.dispose()}regenerate(){if(!this.isGridReady()){if(this._regenerateCounter++,this._regenerateCounter>this.maxRegenerateRetrys)throw new Error("Grid could not be regenerated");setTimeout(()=>this.regenerate,this._regenerateDelay);return}this._regenerateCounter=0,this._camera.updateMatrix(),this._camera.updateMatrixWorld();const e=this._frustumMat.multiplyMatrices(this._camera.projectionMatrix,this._camera.matrixWorldInverse);this._frustum.setFromProjectionMatrix(e);const{planes:r}=this._frustum,s=r[0].constant*-r[0].normal.x,i=r[1].constant*-r[1].normal.x,o=r[2].constant*-r[2].normal.y,k=r[3].constant*-r[3].normal.y,v=Math.abs(s-i),w=Math.abs(k-o),{clientWidth:Z,clientHeight:I}=this._container,U=Math.max(Z,I),M=Math.max(v,w)/U,q=Math.ceil(Math.log10(v/this.scaleX)),J=Math.ceil(Math.log10(w/this.scaleY)),p=10**(q-2)*this.scaleX,g=10**(J-2)*this.scaleY,d=p*this.gridsFactor,b=g*this.gridsFactor,K=Math.ceil(w/b),B=Math.ceil(v/d),Q=Math.ceil(w/g),tt=Math.ceil(v/p),et=p*Math.ceil(i/p),st=g*Math.ceil(o/g),R=d*Math.ceil(i/d),rt=b*Math.ceil(o/b),it=[...this.numbers.children];for(const a of it)a.removeFromParent();this.numbers.children=[];const $=[],ot=9*M,u=1e4,F=R+this._offsetX,nt=Math.round(Math.abs(F/this.scaleX)*u)/u,at=(B-1)*d,ct=Math.round(Math.abs((F+at)/this.scaleX)*u)/u,lt=Math.max(nt,ct).toString().length*ot;let S=Math.ceil(lt/d)*d;for(let a=0;a.01)continue;const Y=this.newNumber((n+this._offsetX)/this.scaleX),mt=12*M;Y.position.set(n,o+mt,0)}for(let a=0;a{for(var s=Dt(t,e),i=l.length-1,o;i>=0;i--)(o=l[i])&&(s=o(t,e,s)||s);return s&&Yt(t,e,s),s};const L=class L extends E{constructor(){super(...arguments),this._grid=null,this._world=null,this.resize=()=>{this._world&&this._grid&&this._grid.regenerate()}}set gridColor(t){if(this._gridColor=t,!(t&&this._grid))return;const e=Number(t.replace("#","0x"));Number.isNaN(e)||this._grid.material.color.setHex(e)}get gridColor(){return this._gridColor}set gridScaleX(t){this._gridScaleX=t,t&&this._grid&&(this._grid.scaleX=t)}get gridScaleX(){return this._gridScaleX}set gridScaleY(t){this._gridScaleY=t,t&&this._grid&&(this._grid.scaleY=t)}get gridScaleY(){return this._gridScaleY}get gridOffsetX(){var t;return((t=this._grid)==null?void 0:t.offsetX)||0}set gridOffsetX(t){this._grid&&(this._grid.offsetX=t)}get gridOffsetY(){var t;return((t=this._grid)==null?void 0:t.offsetY)||0}set gridOffsetY(t){this._grid&&(this._grid.offsetY=t)}set components(t){this.dispose();const r=t.get(H).create();this._world=r,r.scene=new V(t),r.scene.setup(),r.renderer=new wt(t,this);const s=new W(t);r.camera=s;const i=new Ot(s.threeOrtho,this);this._grid=i,r.scene.three.add(i.get()),s.controls.addEventListener("update",()=>i.regenerate()),setTimeout(async()=>{r.camera.updateAspect(),s.set("Plan"),await s.controls.setLookAt(0,0,100,0,0,0),await s.projection.set("Orthographic"),s.controls.dollySpeed=3,s.controls.draggingSmoothTime=.085,s.controls.maxZoom=1e3,s.controls.zoom(4)})}get world(){return this._world}dispose(){var t;(t=this.world)==null||t.dispose(),this._world=null,this._grid=null}connectedCallback(){super.connectedCallback(),new ResizeObserver(this.resize).observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.dispose()}render(){return T``}};L.styles=P` +import{c as pt,V as gt,d as z,M as C,e as j,f as bt,L as _t,B as A,g as xt,h as vt,W as H,S as V,j as wt,O as W,i as yt,G as Ct,k as kt,T as D}from"./index-N2x2mgv3.js";import{r as E,i as T,n as c,a as Mt}from"./state-DYefyXr3.js";import{x as P}from"./lit-html-paDGiEfB.js";import{e as $t,n as St}from"./ref-CInB0H-f.js";class Xt extends pt{constructor(t=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=t,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new gt(.5,.5),this.addEventListener("removed",function(){this.traverse(function(e){e.element instanceof Element&&e.element.parentNode!==null&&e.element.parentNode.removeChild(e.element)})})}copy(t,e){return super.copy(t,e),this.element=t.element.cloneNode(!0),this.center=t.center,this}}new z;new C;new C;new z;new z;class Ot{constructor(t,e){this._group=new j,this._frustum=new bt,this._frustumMat=new C,this._regenerateDelay=200,this._regenerateCounter=0,this.material=new _t({color:"#2e3338"}),this.numbers=new j,this.maxRegenerateRetrys=4,this.gridsFactor=5,this._scaleX=1,this._scaleY=1,this._offsetX=0,this._offsetY=0,this._camera=t,this._container=e;const i=this.newGrid(-1),s=this.newGrid(-2);this.grids={main:i,secondary:s},this._group.add(s,i,this.numbers)}set scaleX(t){this._scaleX=t,this.regenerate()}get scaleX(){return this._scaleX}set scaleY(t){this._scaleY=t,this.regenerate()}get scaleY(){return this._scaleY}set offsetX(t){this._offsetX=t,this.regenerate()}get offsetX(){return this._offsetX}set offsetY(t){this._offsetY=t,this.regenerate()}get offsetY(){return this._offsetY}get(){return this._group}dispose(){const{main:t,secondary:e}=this.grids;t.removeFromParent(),e.removeFromParent(),t.geometry.dispose(),t.material.dispose(),e.geometry.dispose(),e.material.dispose()}regenerate(){if(!this.isGridReady()){if(this._regenerateCounter++,this._regenerateCounter>this.maxRegenerateRetrys)throw new Error("Grid could not be regenerated");setTimeout(()=>this.regenerate,this._regenerateDelay);return}this._regenerateCounter=0,this._camera.updateMatrix(),this._camera.updateMatrixWorld();const e=this._frustumMat.multiplyMatrices(this._camera.projectionMatrix,this._camera.matrixWorldInverse);this._frustum.setFromProjectionMatrix(e);const{planes:i}=this._frustum,s=i[0].constant*-i[0].normal.x,r=i[1].constant*-i[1].normal.x,o=i[2].constant*-i[2].normal.y,k=i[3].constant*-i[3].normal.y,v=Math.abs(s-r),w=Math.abs(k-o),{clientWidth:Z,clientHeight:I}=this._container,U=Math.max(Z,I),M=Math.max(v,w)/U,q=Math.ceil(Math.log10(v/this.scaleX)),J=Math.ceil(Math.log10(w/this.scaleY)),p=10**(q-2)*this.scaleX,g=10**(J-2)*this.scaleY,d=p*this.gridsFactor,b=g*this.gridsFactor,K=Math.ceil(w/b),B=Math.ceil(v/d),Q=Math.ceil(w/g),tt=Math.ceil(v/p),et=p*Math.ceil(r/p),st=g*Math.ceil(o/g),R=d*Math.ceil(r/d),it=b*Math.ceil(o/b),rt=[...this.numbers.children];for(const a of rt)a.removeFromParent();this.numbers.children=[];const $=[],ot=9*M,u=1e4,F=R+this._offsetX,nt=Math.round(Math.abs(F/this.scaleX)*u)/u,at=(B-1)*d,ct=Math.round(Math.abs((F+at)/this.scaleX)*u)/u,lt=Math.max(nt,ct).toString().length*ot;let S=Math.ceil(lt/d)*d;for(let a=0;a.01)continue;const Y=this.newNumber((n+this._offsetX)/this.scaleX),mt=12*M;Y.position.set(n,o+mt,0)}for(let a=0;a{for(var s=Dt(t,e),r=l.length-1,o;r>=0;r--)(o=l[r])&&(s=o(t,e,s)||s);return s&&Yt(t,e,s),s};const L=class L extends E{constructor(){super(...arguments),this._grid=null,this._world=null,this.resize=()=>{this._world&&this._grid&&this._grid.regenerate()}}set gridColor(t){if(this._gridColor=t,!(t&&this._grid))return;const e=Number(t.replace("#","0x"));Number.isNaN(e)||this._grid.material.color.setHex(e)}get gridColor(){return this._gridColor}set gridScaleX(t){this._gridScaleX=t,t&&this._grid&&(this._grid.scaleX=t)}get gridScaleX(){return this._gridScaleX}set gridScaleY(t){this._gridScaleY=t,t&&this._grid&&(this._grid.scaleY=t)}get gridScaleY(){return this._gridScaleY}get gridOffsetX(){var t;return((t=this._grid)==null?void 0:t.offsetX)||0}set gridOffsetX(t){this._grid&&(this._grid.offsetX=t)}get gridOffsetY(){var t;return((t=this._grid)==null?void 0:t.offsetY)||0}set gridOffsetY(t){this._grid&&(this._grid.offsetY=t)}set components(t){this.dispose();const i=t.get(H).create();this._world=i,i.scene=new V(t),i.scene.setup(),i.renderer=new wt(t,this);const s=new W(t);i.camera=s;const r=new Ot(s.threeOrtho,this);this._grid=r,i.scene.three.add(r.get()),s.controls.addEventListener("update",()=>r.regenerate()),setTimeout(async()=>{i.camera.updateAspect(),s.set("Plan"),await s.controls.setLookAt(0,0,100,0,0,0),await s.projection.set("Orthographic"),s.controls.dollySpeed=3,s.controls.draggingSmoothTime=.085,s.controls.maxZoom=1e3,s.controls.zoom(4)})}get world(){return this._world}dispose(){var t;(t=this.world)==null||t.dispose(),this._world=null,this._grid=null}connectedCallback(){super.connectedCallback(),new ResizeObserver(this.resize).observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.dispose()}render(){return P``}};L.styles=T` :host { position: relative; display: flex; @@ -6,7 +6,7 @@ import{c as pt,V as gt,d as z,M as C,e as j,f as bt,L as _t,B as A,g as xt,h as height: 100%; background-color: var(--bim-ui_bg-base); } - `;let f=L;x([c({type:String,attribute:"grid-color",reflect:!0})],f.prototype,"gridColor");x([c({type:Number,attribute:"grid-scale-x",reflect:!0})],f.prototype,"gridScaleX");x([c({type:Number,attribute:"grid-scale-y",reflect:!0})],f.prototype,"gridScaleY");x([c({type:Number,attribute:"grid-offset-x",reflect:!0})],f.prototype,"gridOffsetX");x([c({type:Number,attribute:"grid-offset-y",reflect:!0})],f.prototype,"gridOffsetY");var zt=Object.defineProperty,m=(l,t,e,r)=>{for(var s=void 0,i=l.length-1,o;i>=0;i--)(o=l[i])&&(s=o(t,e,s)||s);return s&&zt(t,e,s),s};const N=class N extends E{constructor(){super(...arguments),this._defaults={size:60},this._cssMatrix3D="",this._matrix=new C,this._onRightClick=new Event("rightclick"),this._onLeftClick=new Event("leftclick"),this._onTopClick=new Event("topclick"),this._onBottomClick=new Event("bottomclick"),this._onFrontClick=new Event("frontclick"),this._onBackClick=new Event("backclick"),this._camera=null,this._epsilon=t=>Math.abs(t)<1e-10?0:t}set camera(t){this._camera=t,this.updateOrientation()}get camera(){return this._camera}updateOrientation(){if(!this.camera)return;this._matrix.extractRotation(this.camera.matrixWorldInverse);const{elements:t}=this._matrix;this._cssMatrix3D=`matrix3d( + `;let f=L;x([c({type:String,attribute:"grid-color",reflect:!0})],f.prototype,"gridColor");x([c({type:Number,attribute:"grid-scale-x",reflect:!0})],f.prototype,"gridScaleX");x([c({type:Number,attribute:"grid-scale-y",reflect:!0})],f.prototype,"gridScaleY");x([c({type:Number,attribute:"grid-offset-x",reflect:!0})],f.prototype,"gridOffsetX");x([c({type:Number,attribute:"grid-offset-y",reflect:!0})],f.prototype,"gridOffsetY");var zt=Object.defineProperty,m=(l,t,e,i)=>{for(var s=void 0,r=l.length-1,o;r>=0;r--)(o=l[r])&&(s=o(t,e,s)||s);return s&&zt(t,e,s),s};const N=class N extends E{constructor(){super(...arguments),this._defaults={size:60},this._cssMatrix3D="",this._matrix=new C,this._onRightClick=new Event("rightclick"),this._onLeftClick=new Event("leftclick"),this._onTopClick=new Event("topclick"),this._onBottomClick=new Event("bottomclick"),this._onFrontClick=new Event("frontclick"),this._onBackClick=new Event("backclick"),this._camera=null,this._epsilon=t=>Math.abs(t)<1e-10?0:t}set camera(t){this._camera=t,this.updateOrientation()}get camera(){return this._camera}updateOrientation(){if(!this.camera)return;this._matrix.extractRotation(this.camera.matrixWorldInverse);const{elements:t}=this._matrix;this._cssMatrix3D=`matrix3d( ${this._epsilon(t[0])}, ${this._epsilon(-t[1])}, ${this._epsilon(t[2])}, @@ -23,7 +23,7 @@ import{c as pt,V as gt,d as z,M as C,e as j,f as bt,L as _t,B as A,g as xt,h as ${this._epsilon(-t[13])}, ${this._epsilon(t[14])}, ${this._epsilon(t[15])}) - `}render(){const t=this.size??this._defaults.size;return T` + `}render(){const t=this.size??this._defaults.size;return P` - `}};Ole.styles=Or` + `}};Ple.styles=br` :host { padding: 0.375rem; display: flex; @@ -1270,10 +1274,10 @@ import{i as Or,x as ls,r as Zr,B as qV}from"./lit-element-CToom8Wf.js";var due=O white-space: normal; text-align: center; } - `;let ble=Ole;Zhe([un({type:String,reflect:!0})],ble.prototype,"column");var Qhe=Object.defineProperty,$he=(e,t,n,s)=>{for(var l=void 0,r=e.length-1,a;r>=0;r--)(a=e[r])&&(l=a(t,n,l)||l);return l&&Qhe(t,n,l),l};const Lle=class extends Zr{constructor(){super(...arguments),this._groups=[],this.data=[],this.table=this.closest("bim-table")}toggleGroups(t,n=!1){for(const s of this._groups)s.childrenHidden=typeof t>"u"?!s.childrenHidden:!t,n&&s.toggleChildren(t,n)}render(){return this._groups=[],ls` + `;let Mle=Ple;Jhe([un({type:String,reflect:!0})],Mle.prototype,"column");var Xhe=Object.defineProperty,vhe=(e,t,n,s)=>{for(var l=void 0,r=e.length-1,a;r>=0;r--)(a=e[r])&&(l=a(t,n,l)||l);return l&&Xhe(t,n,l),l};const xle=class extends fr{constructor(){super(...arguments),this._groups=[],this.data=[],this.table=this.closest("bim-table")}toggleGroups(t,n=!1){for(const s of this._groups)s.childrenHidden=typeof t>"u"?!s.childrenHidden:!t,n&&s.toggleChildren(t,n)}render(){return this._groups=[],ls` ${this.data.map(t=>{const n=document.createElement("bim-table-group");return this._groups.push(n),n.table=this.table,n.data=t,n})} - `}};Lle.styles=Or` + `}};xle.styles=br` :host { --bim-button--bgc: transparent; position: relative; @@ -1288,7 +1292,7 @@ import{i as Or,x as ls,r as Zr,B as qV}from"./lit-element-CToom8Wf.js";var due=O top: 0; bottom: 1.125rem; } - `;let Ple=Lle;$he([un({type:Array,attribute:!1})],Ple.prototype,"data");var Jhe=Object.defineProperty,Xhe=(e,t,n,s)=>{for(var l=void 0,r=e.length-1,a;r>=0;r--)(a=e[r])&&(l=a(t,n,l)||l);return l&&Jhe(t,n,l),l};const Mle=class extends Zr{constructor(){super(...arguments),this.data={data:{}},this.childrenHidden=!0,this.table=this.closest("bim-table")}connectedCallback(){super.connectedCallback(),this.table&&this.table.expanded?this.childrenHidden=!1:this.childrenHidden=!0}toggleChildren(t,n=!1){this._children&&(this.childrenHidden=typeof t>"u"?!this.childrenHidden:!t,n&&this._children.toggleGroups(t,n))}render(){if(!this.table)throw new Error("TableGroup: parent table wasn't found!");const t=this.table.getGroupIndentation(this.data)??0,n=ls` + `;let Fle=xle;vhe([un({type:Array,attribute:!1})],Fle.prototype,"data");var efe=Object.defineProperty,tfe=(e,t,n,s)=>{for(var l=void 0,r=e.length-1,a;r>=0;r--)(a=e[r])&&(l=a(t,n,l)||l);return l&&efe(t,n,l),l};const Ule=class extends fr{constructor(){super(...arguments),this.data={data:{}},this.childrenHidden=!0,this.table=this.closest("bim-table")}connectedCallback(){super.connectedCallback(),this.table&&this.table.expanded?this.childrenHidden=!1:this.childrenHidden=!0}toggleChildren(t,n=!1){this._children&&(this.childrenHidden=typeof t>"u"?!this.childrenHidden:!t,n&&this._children.toggleGroups(t,n))}render(){if(!this.table)throw new Error("TableGroup: parent table wasn't found!");const t=this.table.getGroupIndentation(this.data)??0,n=ls` ${this.table.noIndentation?null:ls`
`} - `,s=document.createDocumentFragment();qV(n,s);let l=null;this.table.noIndentation||(l=document.createElement("div"),l.classList.add("branch","branch-horizontal"),l.style.left=`${t-1+(this.table.selectableRows?2.05:.5625)}rem`);let r=null;if(!this.table.noIndentation){const h=document.createElementNS("http://www.w3.org/2000/svg","svg");h.setAttribute("height","9.5"),h.setAttribute("width","7.5"),h.setAttribute("viewBox","0 0 4.6666672 7.3333333");const d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("d","m 1.7470835,6.9583848 2.5899999,-2.59 c 0.39,-0.39 0.39,-1.02 0,-1.41 L 1.7470835,0.36838483 c -0.63,-0.62000003 -1.71000005,-0.18 -1.71000005,0.70999997 v 5.17 c 0,0.9 1.08000005,1.34 1.71000005,0.71 z"),h.append(d);const p=document.createElementNS("http://www.w3.org/2000/svg","svg");p.setAttribute("height","6.5"),p.setAttribute("width","9.5"),p.setAttribute("viewBox","0 0 5.9111118 5.0175439");const y=document.createElementNS("http://www.w3.org/2000/svg","path");y.setAttribute("d","M -0.33616196,1.922522 2.253838,4.5125219 c 0.39,0.39 1.02,0.39 1.41,0 L 6.2538379,1.922522 c 0.6200001,-0.63 0.18,-1.71000007 -0.7099999,-1.71000007 H 0.37383804 c -0.89999997,0 -1.33999997,1.08000007 -0.71,1.71000007 z"),p.append(y),r=document.createElement("div"),r.addEventListener("click",m=>{m.stopPropagation(),this.toggleChildren()}),r.classList.add("caret"),r.style.left=`${(this.table.selectableRows?1.5:.125)+t}rem`,this.childrenHidden?r.append(h):r.append(p)}const a=document.createElement("bim-table-row");this.data.children&&!this.childrenHidden&&a.append(s),a.table=this.table,a.data=this.data.data,this.table.dispatchEvent(new CustomEvent("rowcreated",{detail:{row:a}})),r&&this.data.children&&a.append(r),t!==0&&(!this.data.children||this.childrenHidden)&&l&&a.append(l);let c;if(this.data.children){c=document.createElement("bim-table-children"),this._children=c,c.table=this.table,c.data=this.data.children;const h=document.createDocumentFragment();qV(n,h),c.append(h)}return ls` + `,s=document.createDocumentFragment();CF(n,s);let l=null;this.table.noIndentation||(l=document.createElement("div"),l.classList.add("branch","branch-horizontal"),l.style.left=`${t-1+(this.table.selectableRows?2.05:.5625)}rem`);let r=null;if(!this.table.noIndentation){const h=document.createElementNS("http://www.w3.org/2000/svg","svg");h.setAttribute("height","9.5"),h.setAttribute("width","7.5"),h.setAttribute("viewBox","0 0 4.6666672 7.3333333");const d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("d","m 1.7470835,6.9583848 2.5899999,-2.59 c 0.39,-0.39 0.39,-1.02 0,-1.41 L 1.7470835,0.36838483 c -0.63,-0.62000003 -1.71000005,-0.18 -1.71000005,0.70999997 v 5.17 c 0,0.9 1.08000005,1.34 1.71000005,0.71 z"),h.append(d);const p=document.createElementNS("http://www.w3.org/2000/svg","svg");p.setAttribute("height","6.5"),p.setAttribute("width","9.5"),p.setAttribute("viewBox","0 0 5.9111118 5.0175439");const y=document.createElementNS("http://www.w3.org/2000/svg","path");y.setAttribute("d","M -0.33616196,1.922522 2.253838,4.5125219 c 0.39,0.39 1.02,0.39 1.41,0 L 6.2538379,1.922522 c 0.6200001,-0.63 0.18,-1.71000007 -0.7099999,-1.71000007 H 0.37383804 c -0.89999997,0 -1.33999997,1.08000007 -0.71,1.71000007 z"),p.append(y),r=document.createElement("div"),r.addEventListener("click",m=>{m.stopPropagation(),this.toggleChildren()}),r.classList.add("caret"),r.style.left=`${(this.table.selectableRows?1.5:.125)+t}rem`,this.childrenHidden?r.append(h):r.append(p)}const a=document.createElement("bim-table-row");this.data.children&&!this.childrenHidden&&a.append(s),a.table=this.table,a.data=this.data.data,this.table.dispatchEvent(new CustomEvent("rowcreated",{detail:{row:a}})),r&&this.data.children&&a.append(r),t!==0&&(!this.data.children||this.childrenHidden)&&l&&a.append(l);let c;if(this.data.children){c=document.createElement("bim-table-children"),this._children=c,c.table=this.table,c.data=this.data.children;const h=document.createDocumentFragment();CF(n,h),c.append(h)}return ls`
${a} ${this.childrenHidden?null:c}
- `}};Mle.styles=Or` + `}};Ule.styles=br` :host { position: relative; } @@ -1340,15 +1344,15 @@ import{i as Or,x as ls,r as Zr,B as qV}from"./lit-element-CToom8Wf.js";var due=O .caret svg { fill: var(--bim-ui_bg-contrast-60); } - `;let xle=Mle;Xhe([un({type:Boolean,attribute:"children-hidden",reflect:!0})],xle.prototype,"childrenHidden");var vhe=Object.defineProperty,QF=(e,t,n,s)=>{for(var l=void 0,r=e.length-1,a;r>=0;r--)(a=e[r])&&(l=a(t,n,l)||l);return l&&vhe(t,n,l),l};const Fle=class extends Zr{constructor(){super(...arguments),this.selected=!1,this.columns=[],this.hiddenColumns=[],this.data={},this.isHeader=!1,this.table=this.closest("bim-table"),this.onTableColumnsChange=()=>{this.table&&(this.columns=this.table.columns)},this.onTableColumnsHidden=()=>{this.table&&(this.hiddenColumns=this.table.hiddenColumns)},this._observer=new IntersectionObserver(t=>{this._intersecting=t[0].isIntersecting},{rootMargin:"36px"})}get _columnNames(){return this.columns.filter(t=>!this.hiddenColumns.includes(t.name)).map(t=>t.name)}get _columnWidths(){return this.columns.filter(t=>!this.hiddenColumns.includes(t.name)).map(t=>t.width)}get _isSelected(){var t;return(t=this.table)==null?void 0:t.selection.has(this.data)}onSelectionChange(t){if(!this.table)return;const n=t.target;this.selected=n.value,n.value?(this.table.selection.add(this.data),this.table.dispatchEvent(new CustomEvent("rowselected",{detail:{data:this.data}}))):(this.table.selection.delete(this.data),this.table.dispatchEvent(new CustomEvent("rowdeselected",{detail:{data:this.data}})))}connectedCallback(){super.connectedCallback(),this._observer.observe(this),this.table&&(this.columns=this.table.columns,this.hiddenColumns=this.table.hiddenColumns,this.table.addEventListener("columnschange",this.onTableColumnsChange),this.table.addEventListener("columnshidden",this.onTableColumnsHidden),this.toggleAttribute("selected",this._isSelected))}disconnectedCallback(){super.disconnectedCallback(),this._observer.unobserve(this),this.table&&(this.columns=[],this.hiddenColumns=[],this.table.removeEventListener("columnschange",this.onTableColumnsChange),this.table.removeEventListener("columnshidden",this.onTableColumnsHidden),this.toggleAttribute("selected",!1))}toggleAll(t){var n,s,l,r;if(!this.table)return;const a=(r=(l=(s=(n=this.table)==null?void 0:n.shadowRoot)==null?void 0:s.querySelector("bim-table-children"))==null?void 0:l.shadowRoot)==null?void 0:r.querySelectorAll("bim-table-group");if(!a||a.length===0){console.warn("No table groups found!");return}a.forEach(c=>{var h;const d=(h=c.shadowRoot)==null?void 0:h.querySelectorAll("bim-table-row");d==null||d.forEach(p=>{var y,m,T;const S=(T=(m=(y=p.shadowRoot)==null?void 0:y.querySelector("bim-checkbox"))==null?void 0:m.shadowRoot)==null?void 0:T.querySelector("input");S&&(S.checked=t,S.dispatchEvent(new Event("change")))})})}compute(){if(!this.table)throw new Error("TableRow: parent table wasn't found!");const t=this.table.getRowIndentation(this.data)??0,n=this.isHeader?this.data:this.table.applyDataTransform(this.data)??this.data,s=[];for(const l in n){if(this.hiddenColumns.includes(l))continue;const r=n[l];let a;if(typeof r=="string"||typeof r=="boolean"||typeof r=="number"?(a=document.createElement("bim-label"),a.textContent=String(r)):r instanceof HTMLElement?a=r:(a=document.createDocumentFragment(),qV(r,a)),!a)continue;const c=document.createElement("bim-table-cell");c.append(a),c.column=l,this._columnNames.indexOf(l)===0&&(c.style.marginLeft=`${this.table.noIndentation?0:t+.75}rem`);const h=this._columnNames.indexOf(l);c.setAttribute("data-column-index",String(h)),c.toggleAttribute("data-no-indentation",h===0&&this.table.noIndentation),c.toggleAttribute("data-cell-header",this.isHeader),c.rowData=this.data,this.table.dispatchEvent(new CustomEvent("cellcreated",{detail:{cell:c}})),s.push(c)}return this.style.gridTemplateAreas=`"${this.table.selectableRows?"Selection":""} ${this._columnNames.join(" ")}"`,this.style.gridTemplateColumns=`${this.table.selectableRows?"1.6rem":""} ${this._columnWidths.join(" ")}`,this.table.selectableRows=!0,this.isHeader&&this.toggleAll(!!this._isSelected),ls` - ${this.table.selectableRows?ls`{for(var l=void 0,r=e.length-1,a;r>=0;r--)(a=e[r])&&(l=a(t,n,l)||l);return l&&nfe(t,n,l),l};const Hle=class extends fr{constructor(){super(...arguments),this.selected=!1,this.columns=[],this.hiddenColumns=[],this.data={},this.isHeader=!1,this.table=this.closest("bim-table"),this.onTableColumnsChange=()=>{this.table&&(this.columns=this.table.columns)},this.onTableColumnsHidden=()=>{this.table&&(this.hiddenColumns=this.table.hiddenColumns)},this._observer=new IntersectionObserver(t=>{this._intersecting=t[0].isIntersecting},{rootMargin:"36px"})}get _columnNames(){return this.columns.filter(t=>!this.hiddenColumns.includes(t.name)).map(t=>t.name)}get _columnWidths(){return this.columns.filter(t=>!this.hiddenColumns.includes(t.name)).map(t=>t.width)}get _isSelected(){var t;return(t=this.table)==null?void 0:t.selection.has(this.data)}onSelectionChange(t){if(!this.table)return;const n=t.target;this.selected=n.value,n.value?(this.table.selection.add(this.data),this.table.dispatchEvent(new CustomEvent("rowselected",{detail:{data:this.data}}))):(this.table.selection.delete(this.data),this.table.dispatchEvent(new CustomEvent("rowdeselected",{detail:{data:this.data}})))}connectedCallback(){super.connectedCallback(),this._observer.observe(this),this.table&&(this.columns=this.table.columns,this.hiddenColumns=this.table.hiddenColumns,this.table.addEventListener("columnschange",this.onTableColumnsChange),this.table.addEventListener("columnshidden",this.onTableColumnsHidden),this.toggleAttribute("selected",this._isSelected))}disconnectedCallback(){super.disconnectedCallback(),this._observer.unobserve(this),this.table&&(this.columns=[],this.hiddenColumns=[],this.table.removeEventListener("columnschange",this.onTableColumnsChange),this.table.removeEventListener("columnshidden",this.onTableColumnsHidden),this.toggleAttribute("selected",!1))}compute(){if(!this.table)throw new Error("TableRow: parent table wasn't found!");const t=this.table.getRowIndentation(this.data)??0,n=this.isHeader?this.data:this.table.applyDataTransform(this.data)??this.data,s=[];for(const l in n){if(this.hiddenColumns.includes(l))continue;const r=n[l];let a;if(typeof r=="string"||typeof r=="boolean"||typeof r=="number"?(a=document.createElement("bim-label"),a.textContent=String(r)):r instanceof HTMLElement?a=r:(a=document.createDocumentFragment(),CF(r,a)),!a)continue;const c=document.createElement("bim-table-cell");c.append(a),c.column=l,this._columnNames.indexOf(l)===0&&(c.style.marginLeft=`${this.table.noIndentation?0:t+.75}rem`);const h=this._columnNames.indexOf(l);c.setAttribute("data-column-index",String(h)),c.toggleAttribute("data-no-indentation",h===0&&this.table.noIndentation),c.toggleAttribute("data-cell-header",this.isHeader),c.rowData=this.data,this.table.dispatchEvent(new CustomEvent("cellcreated",{detail:{cell:c}})),s.push(c)}return this.style.gridTemplateAreas=`"${this.table.selectableRows?"Selection":""} ${this._columnNames.join(" ")}"`,this.style.gridTemplateColumns=`${this.table.selectableRows?"1.6rem":""} ${this._columnWidths.join(" ")}`,ls` + ${!this.isHeader&&this.table.selectableRows?ls``:null} ${s} - `}render(){return ls`${this._intersecting?this.compute():ls``}`}};Fle.styles=Or` + `}render(){return ls`${this._intersecting?this.compute():ls``}`}};Hle.styles=br` :host { position: relative; grid-area: Data; @@ -1369,14 +1373,14 @@ import{i as Or,x as ls,r as Zr,B as qV}from"./lit-element-CToom8Wf.js";var due=O var(--bim-ui_main-base) 10% ); } - `;let g8=Fle;QF([un({type:Boolean,reflect:!0})],g8.prototype,"selected");QF([un({attribute:!1})],g8.prototype,"columns");QF([un({attribute:!1})],g8.prototype,"hiddenColumns");QF([un({attribute:!1})],g8.prototype,"data");QF([un({type:Boolean,attribute:"is-header",reflect:!0})],g8.prototype,"isHeader");QF([YF()],g8.prototype,"_intersecting");var efe=Object.defineProperty,tfe=Object.getOwnPropertyDescriptor,e5=(e,t,n,s)=>{for(var l=s>1?void 0:s?tfe(t,n):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(l=(s?a(t,n,l):a(l))||l);return s&&l&&efe(t,n,l),l};const Ule=class extends Zr{constructor(){super(...arguments),this._filteredData=[],this.headersHidden=!1,this.minColWidth="4rem",this._columns=[],this._textDelimiters={comma:",",tab:" "},this._queryString=null,this._data=[],this.expanded=!1,this.preserveStructureOnFilter=!1,this.indentationInText=!1,this.dataTransform={},this.selectableRows=!1,this.selection=new Set,this.noIndentation=!1,this.loading=!1,this._errorLoading=!1,this._onColumnsHidden=new Event("columnshidden"),this._hiddenColumns=[],this._stringFilterFunction=(t,n)=>Object.values(n.data).some(s=>String(s).toLowerCase().includes(t.toLowerCase())),this._queryFilterFunction=(t,n)=>{let s=!1;const l=XZ(t)??[];for(const r of l){if("queries"in r){s=!1;break}const{condition:a,value:c}=r;let{key:h}=r;if(h.startsWith("[")&&h.endsWith("]")){const d=h.replace("[","").replace("]","");h=d,s=Object.keys(n.data).filter(p=>p.includes(d)).map(p=>iv(n.data[p],a,c)).some(p=>p)}else s=iv(n.data[h],a,c);if(!s)break}return s}}set columns(t){const n=[];for(const s of t){const l=typeof s=="string"?{name:s,width:`minmax(${this.minColWidth}, 1fr)`}:s;n.push(l)}this._columns=n,this.computeMissingColumns(this.data),this.dispatchEvent(new Event("columnschange"))}get columns(){return this._columns}get _headerRowData(){const t={};for(const n of this.columns){const{name:s}=n;t[s]=String(s)}return t}get value(){return this._filteredData}set queryString(t){this.toggleAttribute("data-processing",!0),this._queryString=t&&t.trim()!==""?t.trim():null,this.updateFilteredData(),this.toggleAttribute("data-processing",!1)}get queryString(){return this._queryString}set data(t){this._data=t,this.updateFilteredData(),this.computeMissingColumns(t)&&(this.columns=this._columns)}get data(){return this._data}get dataAsync(){return new Promise(t=>{setTimeout(()=>{t(this.data)})})}set hiddenColumns(t){this._hiddenColumns=t,setTimeout(()=>{this.dispatchEvent(this._onColumnsHidden)})}get hiddenColumns(){return this._hiddenColumns}updateFilteredData(){this.queryString?(XZ(this.queryString)?(this.filterFunction=this._queryFilterFunction,this._filteredData=this.filter(this.queryString)):(this.filterFunction=this._stringFilterFunction,this._filteredData=this.filter(this.queryString)),this.preserveStructureOnFilter&&(this._expandedBeforeFilter===void 0&&(this._expandedBeforeFilter=this.expanded),this.expanded=!0)):(this.preserveStructureOnFilter&&this._expandedBeforeFilter!==void 0&&(this.expanded=this._expandedBeforeFilter,this._expandedBeforeFilter=void 0),this._filteredData=this.data)}computeMissingColumns(t){let n=!1;for(const s of t){const{children:l,data:r}=s;for(const a in r)this._columns.map(c=>typeof c=="string"?c:c.name).includes(a)||(this._columns.push({name:a,width:`minmax(${this.minColWidth}, 1fr)`}),n=!0);if(l){const a=this.computeMissingColumns(l);a&&!n&&(n=a)}}return n}generateText(t="comma",n=this.value,s="",l=!0){const r=this._textDelimiters[t];let a="";const c=this.columns.map(h=>h.name);if(l){this.indentationInText&&(a+=`Indentation${r}`);const h=`${c.join(r)} + `;let A8=Hle;JF([un({type:Boolean,reflect:!0})],A8.prototype,"selected");JF([un({attribute:!1})],A8.prototype,"columns");JF([un({attribute:!1})],A8.prototype,"hiddenColumns");JF([un({attribute:!1})],A8.prototype,"data");JF([un({type:Boolean,attribute:"is-header",reflect:!0})],A8.prototype,"isHeader");JF([jF()],A8.prototype,"_intersecting");var sfe=Object.defineProperty,lfe=Object.getOwnPropertyDescriptor,e5=(e,t,n,s)=>{for(var l=s>1?void 0:s?lfe(t,n):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(l=(s?a(t,n,l):a(l))||l);return s&&l&&sfe(t,n,l),l};const _le=class extends fr{constructor(){super(...arguments),this._filteredData=[],this.headersHidden=!1,this.minColWidth="4rem",this._columns=[],this._textDelimiters={comma:",",tab:" "},this._queryString=null,this._data=[],this.expanded=!1,this.preserveStructureOnFilter=!1,this.indentationInText=!1,this.dataTransform={},this.selectableRows=!1,this.selection=new Set,this.noIndentation=!1,this.loading=!1,this._errorLoading=!1,this._onColumnsHidden=new Event("columnshidden"),this._hiddenColumns=[],this._stringFilterFunction=(t,n)=>Object.values(n.data).some(s=>String(s).toLowerCase().includes(t.toLowerCase())),this._queryFilterFunction=(t,n)=>{let s=!1;const l=XZ(t)??[];for(const r of l){if("queries"in r){s=!1;break}const{condition:a,value:c}=r;let{key:h}=r;if(h.startsWith("[")&&h.endsWith("]")){const d=h.replace("[","").replace("]","");h=d,s=Object.keys(n.data).filter(p=>p.includes(d)).map(p=>cv(n.data[p],a,c)).some(p=>p)}else s=cv(n.data[h],a,c);if(!s)break}return s}}set columns(t){const n=[];for(const s of t){const l=typeof s=="string"?{name:s,width:`minmax(${this.minColWidth}, 1fr)`}:s;n.push(l)}this._columns=n,this.computeMissingColumns(this.data),this.dispatchEvent(new Event("columnschange"))}get columns(){return this._columns}get _headerRowData(){const t={};for(const n of this.columns){const{name:s}=n;t[s]=String(s)}return t}get value(){return this._filteredData}set queryString(t){this.toggleAttribute("data-processing",!0),this._queryString=t&&t.trim()!==""?t.trim():null,this.updateFilteredData(),this.toggleAttribute("data-processing",!1)}get queryString(){return this._queryString}set data(t){this._data=t,this.updateFilteredData(),this.computeMissingColumns(t)&&(this.columns=this._columns)}get data(){return this._data}get dataAsync(){return new Promise(t=>{setTimeout(()=>{t(this.data)})})}set hiddenColumns(t){this._hiddenColumns=t,setTimeout(()=>{this.dispatchEvent(this._onColumnsHidden)})}get hiddenColumns(){return this._hiddenColumns}updateFilteredData(){this.queryString?(XZ(this.queryString)?(this.filterFunction=this._queryFilterFunction,this._filteredData=this.filter(this.queryString)):(this.filterFunction=this._stringFilterFunction,this._filteredData=this.filter(this.queryString)),this.preserveStructureOnFilter&&(this._expandedBeforeFilter===void 0&&(this._expandedBeforeFilter=this.expanded),this.expanded=!0)):(this.preserveStructureOnFilter&&this._expandedBeforeFilter!==void 0&&(this.expanded=this._expandedBeforeFilter,this._expandedBeforeFilter=void 0),this._filteredData=this.data)}computeMissingColumns(t){let n=!1;for(const s of t){const{children:l,data:r}=s;for(const a in r)this._columns.map(c=>typeof c=="string"?c:c.name).includes(a)||(this._columns.push({name:a,width:`minmax(${this.minColWidth}, 1fr)`}),n=!0);if(l){const a=this.computeMissingColumns(l);a&&!n&&(n=a)}}return n}generateText(t="comma",n=this.value,s="",l=!0){const r=this._textDelimiters[t];let a="";const c=this.columns.map(h=>h.name);if(l){this.indentationInText&&(a+=`Indentation${r}`);const h=`${c.join(r)} `;a+=h}for(const[h,d]of n.entries()){const{data:p,children:y}=d,m=this.indentationInText?`${s}${h+1}${r}`:"",T=c.map(D=>p[D]??""),S=`${m}${T.join(r)} -`;a+=S,y&&(a+=this.generateText(t,d.children,`${s}${h+1}.`,!1))}return a}get csv(){return this.generateText("comma")}get tsv(){return this.generateText("tab")}applyDataTransform(t){const n={};for(const l of Object.keys(this.dataTransform)){const r=this.columns.find(a=>a.name===l);r&&r.forceDataTransform&&(l in t||(t[l]=""))}const s=t;for(const l in s){const r=this.dataTransform[l];r?n[l]=r(s[l],t):n[l]=t[l]}return n}downloadData(t="BIM Table Data",n="json"){let s=null;if(n==="json"&&(s=new File([JSON.stringify(this.value,void 0,2)],`${t}.json`)),n==="csv"&&(s=new File([this.csv],`${t}.csv`)),n==="tsv"&&(s=new File([this.tsv],`${t}.tsv`)),!s)return;const l=document.createElement("a");l.href=URL.createObjectURL(s),l.download=s.name,l.click(),URL.revokeObjectURL(l.href)}getRowIndentation(t,n=this.value,s=0){for(const l of n){if(l.data===t)return s;if(l.children){const r=this.getRowIndentation(t,l.children,s+1);if(r!==null)return r}}return null}getGroupIndentation(t,n=this.value,s=0){for(const l of n){if(l===t)return s;if(l.children){const r=this.getGroupIndentation(t,l.children,s+1);if(r!==null)return r}}return null}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new Event("connected"))}disconnectedCallback(){super.disconnectedCallback(),this.dispatchEvent(new Event("disconnected"))}async loadData(t=!1){if(this._filteredData.length!==0&&!t||!this.loadFunction)return!1;this.loading=!0;try{const n=await this.loadFunction();return this.data=n,this.loading=!1,this._errorLoading=!1,!0}catch(n){if(this.loading=!1,this._filteredData.length!==0)return!1;const s=this.querySelector("[slot='error-loading']"),l=s==null?void 0:s.querySelector("[data-table-element='error-message']");return n instanceof Error&&l&&n.message.trim()!==""&&(l.textContent=n.message),this._errorLoading=!0,!1}}filter(t,n=this.filterFunction??this._stringFilterFunction,s=this.data){const l=[];for(const r of s)if(n(t,r)){if(this.preserveStructureOnFilter){const a={data:r.data};if(r.children){const c=this.filter(t,n,r.children);c.length&&(a.children=c)}l.push(a)}else if(l.push({data:r.data}),r.children){const a=this.filter(t,n,r.children);l.push(...a)}}else if(r.children){const a=this.filter(t,n,r.children);this.preserveStructureOnFilter&&a.length?l.push({data:r.data,children:a}):l.push(...a)}return l}get _missingDataElement(){return this.querySelector("[slot='missing-data']")}render(){if(this.loading)return jhe();if(this._errorLoading)return ls``;if(this._filteredData.length===0&&this._missingDataElement)return ls``;const t=document.createElement("bim-table-row");t.table=this,t.isHeader=!0,t.data=this._headerRowData,t.style.gridArea="Header",t.style.position="sticky",t.style.top="0",t.style.zIndex="5";const n=document.createElement("bim-table-children");return n.table=this,n.data=this.value,n.style.gridArea="Body",n.style.backgroundColor="transparent",ls` +`;a+=S,y&&(a+=this.generateText(t,d.children,`${s}${h+1}.`,!1))}return a}get csv(){return this.generateText("comma")}get tsv(){return this.generateText("tab")}applyDataTransform(t){const n={};for(const l of Object.keys(this.dataTransform)){const r=this.columns.find(a=>a.name===l);r&&r.forceDataTransform&&(l in t||(t[l]=""))}const s=t;for(const l in s){const r=this.dataTransform[l];r?n[l]=r(s[l],t):n[l]=t[l]}return n}downloadData(t="BIM Table Data",n="json"){let s=null;if(n==="json"&&(s=new File([JSON.stringify(this.value,void 0,2)],`${t}.json`)),n==="csv"&&(s=new File([this.csv],`${t}.csv`)),n==="tsv"&&(s=new File([this.tsv],`${t}.tsv`)),!s)return;const l=document.createElement("a");l.href=URL.createObjectURL(s),l.download=s.name,l.click(),URL.revokeObjectURL(l.href)}getRowIndentation(t,n=this.value,s=0){for(const l of n){if(l.data===t)return s;if(l.children){const r=this.getRowIndentation(t,l.children,s+1);if(r!==null)return r}}return null}getGroupIndentation(t,n=this.value,s=0){for(const l of n){if(l===t)return s;if(l.children){const r=this.getGroupIndentation(t,l.children,s+1);if(r!==null)return r}}return null}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new Event("connected"))}disconnectedCallback(){super.disconnectedCallback(),this.dispatchEvent(new Event("disconnected"))}async loadData(t=!1){if(this._filteredData.length!==0&&!t||!this.loadFunction)return!1;this.loading=!0;try{const n=await this.loadFunction();return this.data=n,this.loading=!1,this._errorLoading=!1,!0}catch(n){if(this.loading=!1,this._filteredData.length!==0)return!1;const s=this.querySelector("[slot='error-loading']"),l=s==null?void 0:s.querySelector("[data-table-element='error-message']");return n instanceof Error&&l&&n.message.trim()!==""&&(l.textContent=n.message),this._errorLoading=!0,!1}}filter(t,n=this.filterFunction??this._stringFilterFunction,s=this.data){const l=[];for(const r of s)if(n(t,r)){if(this.preserveStructureOnFilter){const a={data:r.data};if(r.children){const c=this.filter(t,n,r.children);c.length&&(a.children=c)}l.push(a)}else if(l.push({data:r.data}),r.children){const a=this.filter(t,n,r.children);l.push(...a)}}else if(r.children){const a=this.filter(t,n,r.children);this.preserveStructureOnFilter&&a.length?l.push({data:r.data,children:a}):l.push(...a)}return l}get _missingDataElement(){return this.querySelector("[slot='missing-data']")}render(){if(this.loading)return Zhe();if(this._errorLoading)return ls``;if(this._filteredData.length===0&&this._missingDataElement)return ls``;const t=document.createElement("bim-table-row");t.table=this,t.isHeader=!0,t.data=this._headerRowData,t.style.gridArea="Header",t.style.position="sticky",t.style.top="0",t.style.zIndex="5";const n=document.createElement("bim-table-children");return n.table=this,n.data=this.value,n.style.gridArea="Body",n.style.backgroundColor="transparent",ls`
- ${this.headersHidden?null:t} ${qhe()} + ${this.headersHidden?null:t} ${Qhe()}
${n}
- `}};Ule.styles=[wO.scrollbar,Or` + `}};_le.styles=[wO.scrollbar,br` :host { position: relative; overflow: auto; @@ -1413,14 +1417,14 @@ import{i as Or,x as ls,r as Zr,B as qV}from"./lit-element-CToom8Wf.js";var due=O flex-wrap: wrap; margin-bottom: 0.5rem; } - `];let _w=Ule;e5([YF()],_w.prototype,"_filteredData",2);e5([un({type:Boolean,attribute:"headers-hidden",reflect:!0})],_w.prototype,"headersHidden",2);e5([un({type:String,attribute:"min-col-width",reflect:!0})],_w.prototype,"minColWidth",2);e5([un({type:Array,attribute:!1})],_w.prototype,"columns",1);e5([un({type:Array,attribute:!1})],_w.prototype,"data",1);e5([un({type:Boolean,reflect:!0})],_w.prototype,"expanded",2);e5([un({type:Boolean,reflect:!0,attribute:"selectable-rows"})],_w.prototype,"selectableRows",2);e5([un({attribute:!1})],_w.prototype,"selection",2);e5([un({type:Boolean,attribute:"no-indentation",reflect:!0})],_w.prototype,"noIndentation",2);e5([un({type:Boolean,reflect:!0})],_w.prototype,"loading",2);e5([YF()],_w.prototype,"_errorLoading",2);var nfe=Object.defineProperty,sfe=Object.getOwnPropertyDescriptor,$F=(e,t,n,s)=>{for(var l=s>1?void 0:s?sfe(t,n):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(l=(s?a(t,n,l):a(l))||l);return s&&l&&nfe(t,n,l),l};const Ble=class extends Zr{constructor(){super(...arguments),this._switchers=[],this.bottom=!1,this.switchersHidden=!1,this.floating=!1,this.switchersFull=!1,this.onTabHiddenChange=t=>{const n=t.target;n instanceof cy&&!n.hidden&&(n.removeEventListener("hiddenchange",this.onTabHiddenChange),this.tab=n.name,n.addEventListener("hiddenchange",this.onTabHiddenChange))}}set tab(t){this._tab=t;const n=[...this.children],s=n.find(l=>l instanceof cy&&l.name===t);for(const l of n){if(!(l instanceof cy))continue;l.hidden=s!==l;const r=this.getTabSwitcher(l.name);r&&r.toggleAttribute("data-active",!l.hidden)}}get tab(){return this._tab}getTabSwitcher(t){return this._switchers.find(n=>n.getAttribute("data-name")===t)}createSwitchers(){this._switchers=[];for(const t of this.children){if(!(t instanceof cy))continue;const n=document.createElement("div");n.addEventListener("click",()=>{this.tab===t.name?this.toggleAttribute("tab",!1):this.tab=t.name}),n.setAttribute("data-name",t.name),n.className="switcher";const s=document.createElement("bim-label");s.textContent=t.label??null,s.icon=t.icon,n.append(s),this._switchers.push(n)}}updateSwitchers(){for(const t of this.children){if(!(t instanceof cy))continue;const n=this._switchers.find(l=>l.getAttribute("data-name")===t.name);if(!n)continue;const s=n.querySelector("bim-label");s&&(s.textContent=t.label??null,s.icon=t.icon)}}onSlotChange(t){this.createSwitchers();const n=t.target.assignedElements(),s=n.find(l=>l instanceof cy?this.tab?l.name===this.tab:!l.hidden:!1);s&&s instanceof cy&&(this.tab=s.name);for(const l of n){if(!(l instanceof cy)){l.remove();continue}l.removeEventListener("hiddenchange",this.onTabHiddenChange),s!==l&&(l.hidden=!0),l.addEventListener("hiddenchange",this.onTabHiddenChange)}}render(){return ls` + `];let _w=_le;e5([jF()],_w.prototype,"_filteredData",2);e5([un({type:Boolean,attribute:"headers-hidden",reflect:!0})],_w.prototype,"headersHidden",2);e5([un({type:String,attribute:"min-col-width",reflect:!0})],_w.prototype,"minColWidth",2);e5([un({type:Array,attribute:!1})],_w.prototype,"columns",1);e5([un({type:Array,attribute:!1})],_w.prototype,"data",1);e5([un({type:Boolean,reflect:!0})],_w.prototype,"expanded",2);e5([un({type:Boolean,reflect:!0,attribute:"selectable-rows"})],_w.prototype,"selectableRows",2);e5([un({attribute:!1})],_w.prototype,"selection",2);e5([un({type:Boolean,attribute:"no-indentation",reflect:!0})],_w.prototype,"noIndentation",2);e5([un({type:Boolean,reflect:!0})],_w.prototype,"loading",2);e5([jF()],_w.prototype,"_errorLoading",2);var rfe=Object.defineProperty,ife=Object.getOwnPropertyDescriptor,XF=(e,t,n,s)=>{for(var l=s>1?void 0:s?ife(t,n):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(l=(s?a(t,n,l):a(l))||l);return s&&l&&rfe(t,n,l),l};const Gle=class extends fr{constructor(){super(...arguments),this._switchers=[],this.bottom=!1,this.switchersHidden=!1,this.floating=!1,this.switchersFull=!1,this.onTabHiddenChange=t=>{const n=t.target;n instanceof cy&&!n.hidden&&(n.removeEventListener("hiddenchange",this.onTabHiddenChange),this.tab=n.name,n.addEventListener("hiddenchange",this.onTabHiddenChange))}}set tab(t){this._tab=t;const n=[...this.children],s=n.find(l=>l instanceof cy&&l.name===t);for(const l of n){if(!(l instanceof cy))continue;l.hidden=s!==l;const r=this.getTabSwitcher(l.name);r&&r.toggleAttribute("data-active",!l.hidden)}}get tab(){return this._tab}getTabSwitcher(t){return this._switchers.find(n=>n.getAttribute("data-name")===t)}createSwitchers(){this._switchers=[];for(const t of this.children){if(!(t instanceof cy))continue;const n=document.createElement("div");n.addEventListener("click",()=>{this.tab===t.name?this.toggleAttribute("tab",!1):this.tab=t.name}),n.setAttribute("data-name",t.name),n.className="switcher";const s=document.createElement("bim-label");s.textContent=t.label??null,s.icon=t.icon,n.append(s),this._switchers.push(n)}}updateSwitchers(){for(const t of this.children){if(!(t instanceof cy))continue;const n=this._switchers.find(l=>l.getAttribute("data-name")===t.name);if(!n)continue;const s=n.querySelector("bim-label");s&&(s.textContent=t.label??null,s.icon=t.icon)}}onSlotChange(t){this.createSwitchers();const n=t.target.assignedElements(),s=n.find(l=>l instanceof cy?this.tab?l.name===this.tab:!l.hidden:!1);s&&s instanceof cy&&(this.tab=s.name);for(const l of n){if(!(l instanceof cy)){l.remove();continue}l.removeEventListener("hiddenchange",this.onTabHiddenChange),s!==l&&(l.hidden=!0),l.addEventListener("hiddenchange",this.onTabHiddenChange)}}render(){return ls`
${this._switchers}
- `}};Ble.styles=[wO.scrollbar,Or` + `}};Gle.styles=[wO.scrollbar,br` * { box-sizing: border-box; } @@ -1531,7 +1535,7 @@ import{i as Or,x as ls,r as Zr,B as qV}from"./lit-element-CToom8Wf.js";var due=O border-radius: var(--bim-ui_size-2xs); background-color: var(--bim-ui_bg-base); } - `];let AO=Ble;$F([YF()],AO.prototype,"_switchers",2);$F([un({type:Boolean,reflect:!0})],AO.prototype,"bottom",2);$F([un({type:Boolean,attribute:"switchers-hidden",reflect:!0})],AO.prototype,"switchersHidden",2);$F([un({type:Boolean,reflect:!0})],AO.prototype,"floating",2);$F([un({type:String,reflect:!0})],AO.prototype,"tab",1);$F([un({type:Boolean,attribute:"switchers-full",reflect:!0})],AO.prototype,"switchersFull",2);var lfe=Object.defineProperty,rfe=Object.getOwnPropertyDescriptor,Nj=(e,t,n,s)=>{for(var l=s>1?void 0:s?rfe(t,n):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(l=(s?a(t,n,l):a(l))||l);return s&&l&&lfe(t,n,l),l};const Hle=class extends Zr{constructor(){super(...arguments),this._defaultName="__unnamed__",this.name=this._defaultName,this._hidden=!1}set label(t){this._label=t;const n=this.parentElement;n instanceof AO&&n.updateSwitchers()}get label(){return this._label}set hidden(t){this._hidden=t,this.dispatchEvent(new Event("hiddenchange"))}get hidden(){return this._hidden}connectedCallback(){super.connectedCallback();const{parentElement:t}=this;if(t&&this.name===this._defaultName){const n=[...t.children].indexOf(this);this.name=`${this._defaultName}${n}`}}render(){return ls` `}};Hle.styles=Or` + `];let AO=Gle;XF([jF()],AO.prototype,"_switchers",2);XF([un({type:Boolean,reflect:!0})],AO.prototype,"bottom",2);XF([un({type:Boolean,attribute:"switchers-hidden",reflect:!0})],AO.prototype,"switchersHidden",2);XF([un({type:Boolean,reflect:!0})],AO.prototype,"floating",2);XF([un({type:String,reflect:!0})],AO.prototype,"tab",1);XF([un({type:Boolean,attribute:"switchers-full",reflect:!0})],AO.prototype,"switchersFull",2);var afe=Object.defineProperty,ofe=Object.getOwnPropertyDescriptor,Nj=(e,t,n,s)=>{for(var l=s>1?void 0:s?ofe(t,n):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(l=(s?a(t,n,l):a(l))||l);return s&&l&&afe(t,n,l),l};const Vle=class extends fr{constructor(){super(...arguments),this._defaultName="__unnamed__",this.name=this._defaultName,this._hidden=!1}set label(t){this._label=t;const n=this.parentElement;n instanceof AO&&n.updateSwitchers()}get label(){return this._label}set hidden(t){this._hidden=t,this.dispatchEvent(new Event("hiddenchange"))}get hidden(){return this._hidden}connectedCallback(){super.connectedCallback();const{parentElement:t}=this;if(t&&this.name===this._defaultName){const n=[...t.children].indexOf(this);this.name=`${this._defaultName}${n}`}}render(){return ls` `}};Vle.styles=br` :host { display: block; height: 100%; @@ -1540,11 +1544,11 @@ import{i as Or,x as ls,r as Zr,B as qV}from"./lit-element-CToom8Wf.js";var due=O :host([hidden]) { display: none; } - `;let cy=Hle;Nj([un({type:String,reflect:!0})],cy.prototype,"name",2);Nj([un({type:String,reflect:!0})],cy.prototype,"label",1);Nj([un({type:String,reflect:!0})],cy.prototype,"icon",2);Nj([un({type:Boolean,reflect:!0})],cy.prototype,"hidden",1);/** + `;let cy=Vle;Nj([un({type:String,reflect:!0})],cy.prototype,"name",2);Nj([un({type:String,reflect:!0})],cy.prototype,"label",1);Nj([un({type:String,reflect:!0})],cy.prototype,"icon",2);Nj([un({type:Boolean,reflect:!0})],cy.prototype,"hidden",1);/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const av=e=>e??fu;var ife=Object.defineProperty,afe=Object.getOwnPropertyDescriptor,hN=(e,t,n,s)=>{for(var l=s>1?void 0:s?afe(t,n):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(l=(s?a(t,n,l):a(l))||l);return s&&l&&ife(t,n,l),l};const _le=class extends Zr{constructor(){super(...arguments),this._inputTypes=["date","datetime-local","email","month","password","search","tel","text","time","url","week","area"],this.value="",this.vertical=!1,this._type="text",this.onValueChange=new Event("input")}set type(t){this._inputTypes.includes(t)&&(this._type=t)}get type(){return this._type}get query(){return XZ(this.value)}onInputChange(t){t.stopPropagation();const n=t.target;clearTimeout(this._debounceTimeoutID),this._debounceTimeoutID=setTimeout(()=>{this.value=n.value,this.dispatchEvent(this.onValueChange)},this.debounce)}focus(){setTimeout(()=>{var t;const n=(t=this.shadowRoot)==null?void 0:t.querySelector("input");n==null||n.focus()})}render(){return ls` + */const hv=e=>e??fu;var ufe=Object.defineProperty,cfe=Object.getOwnPropertyDescriptor,hN=(e,t,n,s)=>{for(var l=s>1?void 0:s?cfe(t,n):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(l=(s?a(t,n,l):a(l))||l);return s&&l&&ufe(t,n,l),l};const zle=class extends fr{constructor(){super(...arguments),this._inputTypes=["date","datetime-local","email","month","password","search","tel","text","time","url","week","area"],this.value="",this.vertical=!1,this._type="text",this.onValueChange=new Event("input")}set type(t){this._inputTypes.includes(t)&&(this._type=t)}get type(){return this._type}get query(){return XZ(this.value)}onInputChange(t){t.stopPropagation();const n=t.target;clearTimeout(this._debounceTimeoutID),this._debounceTimeoutID=setTimeout(()=>{this.value=n.value,this.dispatchEvent(this.onValueChange)},this.debounce)}focus(){setTimeout(()=>{var t;const n=(t=this.shadowRoot)==null?void 0:t.querySelector("input");n==null||n.focus()})}render(){return ls` `:ls` `} - `}};_le.styles=[wO.scrollbar,Or` + `}};zle.styles=[wO.scrollbar,br` :host { --bim-input--bgc: var(--bim-ui_bg-contrast-20); flex: 1; @@ -1601,7 +1605,7 @@ import{i as Or,x as ls,r as Zr,B as qV}from"./lit-element-CToom8Wf.js";var due=O /* :host([disabled]) { --bim-input--bgc: var(--bim-ui_bg-contrast-20); } */ - `];let Yg=_le;hN([un({type:String,reflect:!0})],Yg.prototype,"icon",2);hN([un({type:String,reflect:!0})],Yg.prototype,"label",2);hN([un({type:String,reflect:!0})],Yg.prototype,"name",2);hN([un({type:String,reflect:!0})],Yg.prototype,"placeholder",2);hN([un({type:String,reflect:!0})],Yg.prototype,"value",2);hN([un({type:Boolean,reflect:!0})],Yg.prototype,"vertical",2);hN([un({type:Number,reflect:!0})],Yg.prototype,"debounce",2);hN([un({type:Number,reflect:!0})],Yg.prototype,"rows",2);hN([un({type:String,reflect:!0})],Yg.prototype,"type",1);var ofe=Object.defineProperty,ufe=Object.getOwnPropertyDescriptor,Gle=(e,t,n,s)=>{for(var l=s>1?void 0:s?ufe(t,n):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(l=(s?a(t,n,l):a(l))||l);return s&&l&&ofe(t,n,l),l};const Vle=class extends Zr{constructor(){super(...arguments),this.rows=2,this._vertical=!1}set vertical(t){this._vertical=t,this.updateChildren()}get vertical(){return this._vertical}updateChildren(){const t=this.children;for(const n of t)this.vertical?n.setAttribute("label-hidden",""):n.removeAttribute("label-hidden")}render(){return ls` + `];let Yg=zle;hN([un({type:String,reflect:!0})],Yg.prototype,"icon",2);hN([un({type:String,reflect:!0})],Yg.prototype,"label",2);hN([un({type:String,reflect:!0})],Yg.prototype,"name",2);hN([un({type:String,reflect:!0})],Yg.prototype,"placeholder",2);hN([un({type:String,reflect:!0})],Yg.prototype,"value",2);hN([un({type:Boolean,reflect:!0})],Yg.prototype,"vertical",2);hN([un({type:Number,reflect:!0})],Yg.prototype,"debounce",2);hN([un({type:Number,reflect:!0})],Yg.prototype,"rows",2);hN([un({type:String,reflect:!0})],Yg.prototype,"type",1);var hfe=Object.defineProperty,ffe=Object.getOwnPropertyDescriptor,kle=(e,t,n,s)=>{for(var l=s>1?void 0:s?ffe(t,n):t,r=e.length-1,a;r>=0;r--)(a=e[r])&&(l=(s?a(t,n,l):a(l))||l);return s&&l&&hfe(t,n,l),l};const Yle=class extends fr{constructor(){super(...arguments),this.rows=2,this._vertical=!1}set vertical(t){this._vertical=t,this.updateChildren()}get vertical(){return this._vertical}updateChildren(){const t=this.children;for(const n of t)this.vertical?n.setAttribute("label-hidden",""):n.removeAttribute("label-hidden")}render(){return ls` - - + +
- `},H=t=>r` + `},G=t=>r` - ${G(t)} + ${E(t)} - `,J=t=>N.create(H,t),K=Object.freeze(Object.defineProperty({__proto__:null,topic:J},Symbol.toStringTag,{value:"Module"})),Q={...K};g.init();const V=new U,[W]=Q.topic({components:V,onSubmit:t=>console.log(t)});document.body.append(W); + `,J=t=>M.create(G,t),K=Object.freeze(Object.defineProperty({__proto__:null,topic:J},Symbol.toStringTag,{value:"Module"})),Q={...K};g.init();const V=new N,[W]=Q.topic({components:V,onSubmit:t=>console.log(t)});document.body.append(W); diff --git a/examples/assets/topicsList.js b/examples/assets/topicsList.js index 625ae88d..4d11f008 100644 --- a/examples/assets/topicsList.js +++ b/examples/assets/topicsList.js @@ -1,42 +1,46 @@ -import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as Pi,d as Sn,W as We,S as kn,j as na,O as Xo,i as P,G as Tn,k as ce,F as Vt,l as pt,m as qe,p as Ri,e as Jn,f as oa,L as sa,B as Qn,g as ra,h as aa,I as Jo,H as Qo,q as la,r as ca,s as da,t as ai,u as we,v as ua,D as ha,A as pa,c as ma,V as ba,w as fi,x as fa,y as yt,R as ga,z as Zo,E as Ko,J as va,K as ts,N as ya,Q as _a,U as es,X as is,Y as wa,Z as xa,P as $a,C as Ca,a as Aa,b as Ea,T as Ge}from"./index-DNiVoluI.js";var Sa=Object.defineProperty,ka=(e,t,i)=>t in e?Sa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Pt=(e,t,i)=>(ka(e,typeof t!="symbol"?t+"":t,i),i);const Kt=Math.min,bt=Math.max,gi=Math.round,Ct=e=>({x:e,y:e}),Ta={left:"right",right:"left",bottom:"top",top:"bottom"},Oa={start:"end",end:"start"};function Zn(e,t,i){return bt(e,Kt(t,i))}function Ye(e,t){return typeof e=="function"?e(t):e}function ft(e){return e.split("-")[0]}function Li(e){return e.split("-")[1]}function ns(e){return e==="x"?"y":"x"}function os(e){return e==="y"?"height":"width"}function Ht(e){return["top","bottom"].includes(ft(e))?"y":"x"}function ss(e){return ns(Ht(e))}function Ia(e,t,i){i===void 0&&(i=!1);const n=Li(e),o=ss(e),s=os(o);let r=o==="x"?n===(i?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=vi(r)),[r,vi(r)]}function Na(e){const t=vi(e);return[dn(e),t,dn(t)]}function dn(e){return e.replace(/start|end/g,t=>Oa[t])}function Ma(e,t,i){const n=["left","right"],o=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(e){case"top":case"bottom":return i?t?o:n:t?n:o;case"left":case"right":return t?s:r;default:return[]}}function Pa(e,t,i,n){const o=Li(e);let s=Ma(ft(e),i==="start",n);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(dn)))),s}function vi(e){return e.replace(/left|right|bottom|top/g,t=>Ta[t])}function Ra(e){return{top:0,right:0,bottom:0,left:0,...e}}function rs(e){return typeof e!="number"?Ra(e):{top:e,right:e,bottom:e,left:e}}function te(e){const{x:t,y:i,width:n,height:o}=e;return{width:n,height:o,top:i,left:t,right:t+n,bottom:i+o,x:t,y:i}}function Kn(e,t,i){let{reference:n,floating:o}=e;const s=Ht(t),r=ss(t),l=os(r),a=ft(t),d=s==="y",u=n.x+n.width/2-o.width/2,c=n.y+n.height/2-o.height/2,h=n[l]/2-o[l]/2;let p;switch(a){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:c};break;case"left":p={x:n.x-o.width,y:c};break;default:p={x:n.x,y:n.y}}switch(Li(t)){case"start":p[r]-=h*(i&&d?-1:1);break;case"end":p[r]+=h*(i&&d?-1:1);break}return p}const La=async(e,t,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:r}=i,l=s.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(t));let d=await r.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:c}=Kn(d,n,a),h=n,p={},f=0;for(let w=0;w$<=0)){var B,G;const $=(((B=s.flip)==null?void 0:B.index)||0)+1,L=O[$];if(L)return{data:{index:$,overflows:E},reset:{placement:L}};let V=(G=E.filter(tt=>tt.overflows[0]<=0).sort((tt,et)=>tt.overflows[1]-et.overflows[1])[0])==null?void 0:G.placement;if(!V)switch(p){case"bestFit":{var W;const tt=(W=E.filter(et=>{if(C){const dt=Ht(et.placement);return dt===y||dt==="y"}return!0}).map(et=>[et.placement,et.overflows.filter(dt=>dt>0).reduce((dt,ye)=>dt+ye,0)]).sort((et,dt)=>et[1]-dt[1])[0])==null?void 0:W[0];tt&&(V=tt);break}case"initialPlacement":V=l;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function ls(e){const t=Kt(...e.map(s=>s.left)),i=Kt(...e.map(s=>s.top)),n=bt(...e.map(s=>s.right)),o=bt(...e.map(s=>s.bottom));return{x:t,y:i,width:n-t,height:o-i}}function za(e){const t=e.slice().sort((o,s)=>o.y-s.y),i=[];let n=null;for(let o=0;on.height/2?i.push([s]):i[i.length-1].push(s),n=s}return i.map(o=>te(ls(o)))}const Da=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:i,elements:n,rects:o,platform:s,strategy:r}=t,{padding:l=2,x:a,y:d}=Ye(e,t),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(n.reference))||[]),c=za(u),h=te(ls(u)),p=rs(l);function f(){if(c.length===2&&c[0].left>c[1].right&&a!=null&&d!=null)return c.find(v=>a>v.left-p.left&&av.top-p.top&&d=2){if(Ht(i)==="y"){const E=c[0],B=c[c.length-1],G=ft(i)==="top",W=E.top,$=B.bottom,L=G?E.left:B.left,V=G?E.right:B.right,tt=V-L,et=$-W;return{top:W,bottom:$,left:L,right:V,width:tt,height:et,x:L,y:W}}const v=ft(i)==="left",b=bt(...c.map(E=>E.right)),y=Kt(...c.map(E=>E.left)),_=c.filter(E=>v?E.left===y:E.right===b),x=_[0].top,A=_[_.length-1].bottom,C=y,O=b,M=O-C,S=A-x;return{top:x,bottom:A,left:C,right:O,width:M,height:S,x:C,y:x}}return h}const w=await s.getElementRects({reference:{getBoundingClientRect:f},floating:n.floating,strategy:r});return o.reference.x!==w.reference.x||o.reference.y!==w.reference.y||o.reference.width!==w.reference.width||o.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}};async function Fa(e,t){const{placement:i,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),r=ft(i),l=Li(i),a=Ht(i)==="y",d=["left","top"].includes(r)?-1:1,u=s&&a?-1:1,c=Ye(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return l&&typeof f=="number"&&(p=l==="end"?f*-1:f),a?{x:p*u,y:h*d}:{x:h*d,y:p*u}}const cs=function(e){return{name:"offset",options:e,async fn(t){var i,n;const{x:o,y:s,placement:r,middlewareData:l}=t,a=await Fa(t,e);return r===((i=l.offset)==null?void 0:i.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+a.x,y:s+a.y,data:{...a,placement:r}}}}},Ha=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:v=>{let{x:b,y}=v;return{x:b,y}}},...a}=Ye(e,t),d={x:i,y:n},u=await as(t,a),c=Ht(ft(o)),h=ns(c);let p=d[h],f=d[c];if(s){const v=h==="y"?"top":"left",b=h==="y"?"bottom":"right",y=p+u[v],_=p-u[b];p=Zn(y,p,_)}if(r){const v=c==="y"?"top":"left",b=c==="y"?"bottom":"right",y=f+u[v],_=f-u[b];f=Zn(y,f,_)}const w=l.fn({...t,[h]:p,[c]:f});return{...w,data:{x:w.x-i,y:w.y-n,enabled:{[h]:s,[c]:r}}}}}};function ji(){return typeof window<"u"}function At(e){return ds(e)?(e.nodeName||"").toLowerCase():"#document"}function Q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function St(e){var t;return(t=(ds(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ds(e){return ji()?e instanceof Node||e instanceof Q(e).Node:!1}function ut(e){return ji()?e instanceof Element||e instanceof Q(e).Element:!1}function ht(e){return ji()?e instanceof HTMLElement||e instanceof Q(e).HTMLElement:!1}function to(e){return!ji()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot}function Xe(e){const{overflow:t,overflowX:i,overflowY:n,display:o}=it(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+i)&&!["inline","contents"].includes(o)}function Ba(e){return["table","td","th"].includes(At(e))}function Ua(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function On(e){const t=In(),i=ut(e)?it(e):e;return i.transform!=="none"||i.perspective!=="none"||(i.containerType?i.containerType!=="normal":!1)||!t&&(i.backdropFilter?i.backdropFilter!=="none":!1)||!t&&(i.filter?i.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(i.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(i.contain||"").includes(n))}function Va(e){let t=ee(e);for(;ht(t)&&!zi(t);){if(On(t))return t;if(Ua(t))return null;t=ee(t)}return null}function In(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function zi(e){return["html","body","#document"].includes(At(e))}function it(e){return Q(e).getComputedStyle(e)}function Di(e){return ut(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ee(e){if(At(e)==="html")return e;const t=e.assignedSlot||e.parentNode||to(e)&&e.host||St(e);return to(t)?t.host:t}function us(e){const t=ee(e);return zi(t)?e.ownerDocument?e.ownerDocument.body:e.body:ht(t)&&Xe(t)?t:us(t)}function un(e,t,i){var n;t===void 0&&(t=[]),i===void 0&&(i=!0);const o=us(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),r=Q(o);if(s){const l=Wa(r);return t.concat(r,r.visualViewport||[],Xe(o)?o:[],l&&i?un(l):[])}return t.concat(o,un(o,[],i))}function Wa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function hs(e){const t=it(e);let i=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=ht(e),s=o?e.offsetWidth:i,r=o?e.offsetHeight:n,l=gi(i)!==s||gi(n)!==r;return l&&(i=s,n=r),{width:i,height:n,$:l}}function ps(e){return ut(e)?e:e.contextElement}function Xt(e){const t=ps(e);if(!ht(t))return Ct(1);const i=t.getBoundingClientRect(),{width:n,height:o,$:s}=hs(t);let r=(s?gi(i.width):i.width)/n,l=(s?gi(i.height):i.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const qa=Ct(0);function ms(e){const t=Q(e);return!In()||!t.visualViewport?qa:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ga(e,t,i){return t===void 0&&(t=!1),!i||t&&i!==Q(e)?!1:t}function Re(e,t,i,n){t===void 0&&(t=!1),i===void 0&&(i=!1);const o=e.getBoundingClientRect(),s=ps(e);let r=Ct(1);t&&(n?ut(n)&&(r=Xt(n)):r=Xt(e));const l=Ga(s,i,n)?ms(s):Ct(0);let a=(o.left+l.x)/r.x,d=(o.top+l.y)/r.y,u=o.width/r.x,c=o.height/r.y;if(s){const h=Q(s),p=n&&ut(n)?Q(n):n;let f=h,w=f.frameElement;for(;w&&n&&p!==f;){const v=Xt(w),b=w.getBoundingClientRect(),y=it(w),_=b.left+(w.clientLeft+parseFloat(y.paddingLeft))*v.x,x=b.top+(w.clientTop+parseFloat(y.paddingTop))*v.y;a*=v.x,d*=v.y,u*=v.x,c*=v.y,a+=_,d+=x,f=Q(w),w=f.frameElement}}return te({width:u,height:c,x:a,y:d})}const Ya=[":popover-open",":modal"];function bs(e){return Ya.some(t=>{try{return e.matches(t)}catch{return!1}})}function Xa(e){let{elements:t,rect:i,offsetParent:n,strategy:o}=e;const s=o==="fixed",r=St(n),l=t?bs(t.floating):!1;if(n===r||l&&s)return i;let a={scrollLeft:0,scrollTop:0},d=Ct(1);const u=Ct(0),c=ht(n);if((c||!c&&!s)&&((At(n)!=="body"||Xe(r))&&(a=Di(n)),ht(n))){const h=Re(n);d=Xt(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}return{width:i.width*d.x,height:i.height*d.y,x:i.x*d.x-a.scrollLeft*d.x+u.x,y:i.y*d.y-a.scrollTop*d.y+u.y}}function Ja(e){return Array.from(e.getClientRects())}function fs(e){return Re(St(e)).left+Di(e).scrollLeft}function Qa(e){const t=St(e),i=Di(e),n=e.ownerDocument.body,o=bt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=bt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-i.scrollLeft+fs(e);const l=-i.scrollTop;return it(n).direction==="rtl"&&(r+=bt(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:r,y:l}}function Za(e,t){const i=Q(e),n=St(e),o=i.visualViewport;let s=n.clientWidth,r=n.clientHeight,l=0,a=0;if(o){s=o.width,r=o.height;const d=In();(!d||d&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:r,x:l,y:a}}function Ka(e,t){const i=Re(e,!0,t==="fixed"),n=i.top+e.clientTop,o=i.left+e.clientLeft,s=ht(e)?Xt(e):Ct(1),r=e.clientWidth*s.x,l=e.clientHeight*s.y,a=o*s.x,d=n*s.y;return{width:r,height:l,x:a,y:d}}function eo(e,t,i){let n;if(t==="viewport")n=Za(e,i);else if(t==="document")n=Qa(St(e));else if(ut(t))n=Ka(t,i);else{const o=ms(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return te(n)}function gs(e,t){const i=ee(e);return i===t||!ut(i)||zi(i)?!1:it(i).position==="fixed"||gs(i,t)}function tl(e,t){const i=t.get(e);if(i)return i;let n=un(e,[],!1).filter(l=>ut(l)&&At(l)!=="body"),o=null;const s=it(e).position==="fixed";let r=s?ee(e):e;for(;ut(r)&&!zi(r);){const l=it(r),a=On(r);!a&&l.position==="fixed"&&(o=null),(s?!a&&!o:!a&&l.position==="static"&&o&&["absolute","fixed"].includes(o.position)||Xe(r)&&!a&&gs(e,r))?n=n.filter(d=>d!==r):o=l,r=ee(r)}return t.set(e,n),n}function el(e){let{element:t,boundary:i,rootBoundary:n,strategy:o}=e;const s=[...i==="clippingAncestors"?tl(t,this._c):[].concat(i),n],r=s[0],l=s.reduce((a,d)=>{const u=eo(t,d,o);return a.top=bt(u.top,a.top),a.right=Kt(u.right,a.right),a.bottom=Kt(u.bottom,a.bottom),a.left=bt(u.left,a.left),a},eo(t,r,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function il(e){const{width:t,height:i}=hs(e);return{width:t,height:i}}function nl(e,t,i){const n=ht(t),o=St(t),s=i==="fixed",r=Re(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const a=Ct(0);if(n||!n&&!s)if((At(t)!=="body"||Xe(o))&&(l=Di(t)),n){const c=Re(t,!0,s,t);a.x=c.x+t.clientLeft,a.y=c.y+t.clientTop}else o&&(a.x=fs(o));const d=r.left+l.scrollLeft-a.x,u=r.top+l.scrollTop-a.y;return{x:d,y:u,width:r.width,height:r.height}}function io(e,t){return!ht(e)||it(e).position==="fixed"?null:t?t(e):e.offsetParent}function vs(e,t){const i=Q(e);if(!ht(e)||bs(e))return i;let n=io(e,t);for(;n&&Ba(n)&&it(n).position==="static";)n=io(n,t);return n&&(At(n)==="html"||At(n)==="body"&&it(n).position==="static"&&!On(n))?i:n||Va(e)||i}const ol=async function(e){const t=this.getOffsetParent||vs,i=this.getDimensions;return{reference:nl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await i(e.floating)}}};function sl(e){return it(e).direction==="rtl"}const rl={convertOffsetParentRelativeRectToViewportRelativeRect:Xa,getDocumentElement:St,getClippingRect:el,getOffsetParent:vs,getElementRects:ol,getClientRects:Ja,getDimensions:il,getScale:Xt,isElement:ut,isRTL:sl},ys=Ha,_s=ja,ws=Da,xs=(e,t,i)=>{const n=new Map,o={platform:rl,...i},s={...o.platform,_c:n};return La(e,t,{...o,platform:s})};/** +import"./modulepreload-polyfill-B5Qt9EMX.js";import{M as zi,d as Tn,W as Xe,S as On,j as pa,O as ss,i as M,G as In,k as be,F as qt,p as mt,q as Je,r as Di,e as io,f as ma,L as ba,B as no,g as fa,h as ga,I as rs,H as as,s as va,t as ya,u as _a,P as pi,v as Se,w as wa,D as $a,A as xa,c as Ca,V as Aa,x as $i,y as Ea,z as _t,R as Sa,E as ls,J as cs,K as ka,N as ds,Q as Ta,U as Oa,X as us,Y as hs,Z as Ia,_ as Na,T as Pa,C as Ma,a as Ra,b as La,l as Qe,m as ut}from"./index-N2x2mgv3.js";var ja=Object.defineProperty,za=(e,t,i)=>t in e?ja(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Rt=(e,t,i)=>(za(e,typeof t!="symbol"?t+"":t,i),i);const oe=Math.min,ft=Math.max,xi=Math.round,At=e=>({x:e,y:e}),Da={left:"right",right:"left",bottom:"top",top:"bottom"},Fa={start:"end",end:"start"};function oo(e,t,i){return ft(e,oe(t,i))}function Ze(e,t){return typeof e=="function"?e(t):e}function gt(e){return e.split("-")[0]}function Fi(e){return e.split("-")[1]}function ps(e){return e==="x"?"y":"x"}function ms(e){return e==="y"?"height":"width"}function Ut(e){return["top","bottom"].includes(gt(e))?"y":"x"}function bs(e){return ps(Ut(e))}function Ha(e,t,i){i===void 0&&(i=!1);const n=Fi(e),o=bs(e),s=ms(o);let r=o==="x"?n===(i?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Ci(r)),[r,Ci(r)]}function Ba(e){const t=Ci(e);return[hn(e),t,hn(t)]}function hn(e){return e.replace(/start|end/g,t=>Fa[t])}function Ua(e,t,i){const n=["left","right"],o=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(e){case"top":case"bottom":return i?t?o:n:t?n:o;case"left":case"right":return t?s:r;default:return[]}}function Va(e,t,i,n){const o=Fi(e);let s=Ua(gt(e),i==="start",n);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(hn)))),s}function Ci(e){return e.replace(/left|right|bottom|top/g,t=>Da[t])}function Wa(e){return{top:0,right:0,bottom:0,left:0,...e}}function fs(e){return typeof e!="number"?Wa(e):{top:e,right:e,bottom:e,left:e}}function se(e){const{x:t,y:i,width:n,height:o}=e;return{width:n,height:o,top:i,left:t,right:t+n,bottom:i+o,x:t,y:i}}function so(e,t,i){let{reference:n,floating:o}=e;const s=Ut(t),r=bs(t),l=ms(r),a=gt(t),d=s==="y",u=n.x+n.width/2-o.width/2,c=n.y+n.height/2-o.height/2,h=n[l]/2-o[l]/2;let p;switch(a){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:c};break;case"left":p={x:n.x-o.width,y:c};break;default:p={x:n.x,y:n.y}}switch(Fi(t)){case"start":p[r]-=h*(i&&d?-1:1);break;case"end":p[r]+=h*(i&&d?-1:1);break}return p}const Ga=async(e,t,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:r}=i,l=s.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(t));let d=await r.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:c}=so(d,n,a),h=n,p={},f=0;for(let w=0;wx<=0)){var B,q;const x=(((B=s.flip)==null?void 0:B.index)||0)+1,L=O[x];if(L)return{data:{index:x,overflows:E},reset:{placement:L}};let V=(q=E.filter(tt=>tt.overflows[0]<=0).sort((tt,et)=>tt.overflows[1]-et.overflows[1])[0])==null?void 0:q.placement;if(!V)switch(p){case"bestFit":{var W;const tt=(W=E.filter(et=>{if(C){const dt=Ut(et.placement);return dt===y||dt==="y"}return!0}).map(et=>[et.placement,et.overflows.filter(dt=>dt>0).reduce((dt,Ae)=>dt+Ae,0)]).sort((et,dt)=>et[1]-dt[1])[0])==null?void 0:W[0];tt&&(V=tt);break}case"initialPlacement":V=l;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function vs(e){const t=oe(...e.map(s=>s.left)),i=oe(...e.map(s=>s.top)),n=ft(...e.map(s=>s.right)),o=ft(...e.map(s=>s.bottom));return{x:t,y:i,width:n-t,height:o-i}}function Ya(e){const t=e.slice().sort((o,s)=>o.y-s.y),i=[];let n=null;for(let o=0;on.height/2?i.push([s]):i[i.length-1].push(s),n=s}return i.map(o=>se(vs(o)))}const Xa=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:i,elements:n,rects:o,platform:s,strategy:r}=t,{padding:l=2,x:a,y:d}=Ze(e,t),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(n.reference))||[]),c=Ya(u),h=se(vs(u)),p=fs(l);function f(){if(c.length===2&&c[0].left>c[1].right&&a!=null&&d!=null)return c.find(v=>a>v.left-p.left&&av.top-p.top&&d=2){if(Ut(i)==="y"){const E=c[0],B=c[c.length-1],q=gt(i)==="top",W=E.top,x=B.bottom,L=q?E.left:B.left,V=q?E.right:B.right,tt=V-L,et=x-W;return{top:W,bottom:x,left:L,right:V,width:tt,height:et,x:L,y:W}}const v=gt(i)==="left",b=ft(...c.map(E=>E.right)),y=oe(...c.map(E=>E.left)),_=c.filter(E=>v?E.left===y:E.right===b),$=_[0].top,A=_[_.length-1].bottom,C=y,O=b,P=O-C,S=A-$;return{top:$,bottom:A,left:C,right:O,width:P,height:S,x:C,y:$}}return h}const w=await s.getElementRects({reference:{getBoundingClientRect:f},floating:n.floating,strategy:r});return o.reference.x!==w.reference.x||o.reference.y!==w.reference.y||o.reference.width!==w.reference.width||o.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}};async function Ja(e,t){const{placement:i,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),r=gt(i),l=Fi(i),a=Ut(i)==="y",d=["left","top"].includes(r)?-1:1,u=s&&a?-1:1,c=Ze(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return l&&typeof f=="number"&&(p=l==="end"?f*-1:f),a?{x:p*u,y:h*d}:{x:h*d,y:p*u}}const ys=function(e){return{name:"offset",options:e,async fn(t){var i,n;const{x:o,y:s,placement:r,middlewareData:l}=t,a=await Ja(t,e);return r===((i=l.offset)==null?void 0:i.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+a.x,y:s+a.y,data:{...a,placement:r}}}}},Qa=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:v=>{let{x:b,y}=v;return{x:b,y}}},...a}=Ze(e,t),d={x:i,y:n},u=await gs(t,a),c=Ut(gt(o)),h=ps(c);let p=d[h],f=d[c];if(s){const v=h==="y"?"top":"left",b=h==="y"?"bottom":"right",y=p+u[v],_=p-u[b];p=oo(y,p,_)}if(r){const v=c==="y"?"top":"left",b=c==="y"?"bottom":"right",y=f+u[v],_=f-u[b];f=oo(y,f,_)}const w=l.fn({...t,[h]:p,[c]:f});return{...w,data:{x:w.x-i,y:w.y-n,enabled:{[h]:s,[c]:r}}}}}};function Hi(){return typeof window<"u"}function Et(e){return _s(e)?(e.nodeName||"").toLowerCase():"#document"}function Q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kt(e){var t;return(t=(_s(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _s(e){return Hi()?e instanceof Node||e instanceof Q(e).Node:!1}function ht(e){return Hi()?e instanceof Element||e instanceof Q(e).Element:!1}function pt(e){return Hi()?e instanceof HTMLElement||e instanceof Q(e).HTMLElement:!1}function ro(e){return!Hi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot}function Ke(e){const{overflow:t,overflowX:i,overflowY:n,display:o}=it(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+i)&&!["inline","contents"].includes(o)}function Za(e){return["table","td","th"].includes(Et(e))}function Ka(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Nn(e){const t=Pn(),i=ht(e)?it(e):e;return i.transform!=="none"||i.perspective!=="none"||(i.containerType?i.containerType!=="normal":!1)||!t&&(i.backdropFilter?i.backdropFilter!=="none":!1)||!t&&(i.filter?i.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(i.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(i.contain||"").includes(n))}function tl(e){let t=re(e);for(;pt(t)&&!Bi(t);){if(Nn(t))return t;if(Ka(t))return null;t=re(t)}return null}function Pn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Bi(e){return["html","body","#document"].includes(Et(e))}function it(e){return Q(e).getComputedStyle(e)}function Ui(e){return ht(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function re(e){if(Et(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ro(e)&&e.host||kt(e);return ro(t)?t.host:t}function ws(e){const t=re(e);return Bi(t)?e.ownerDocument?e.ownerDocument.body:e.body:pt(t)&&Ke(t)?t:ws(t)}function pn(e,t,i){var n;t===void 0&&(t=[]),i===void 0&&(i=!0);const o=ws(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),r=Q(o);if(s){const l=el(r);return t.concat(r,r.visualViewport||[],Ke(o)?o:[],l&&i?pn(l):[])}return t.concat(o,pn(o,[],i))}function el(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $s(e){const t=it(e);let i=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=pt(e),s=o?e.offsetWidth:i,r=o?e.offsetHeight:n,l=xi(i)!==s||xi(n)!==r;return l&&(i=s,n=r),{width:i,height:n,$:l}}function xs(e){return ht(e)?e:e.contextElement}function te(e){const t=xs(e);if(!pt(t))return At(1);const i=t.getBoundingClientRect(),{width:n,height:o,$:s}=$s(t);let r=(s?xi(i.width):i.width)/n,l=(s?xi(i.height):i.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const il=At(0);function Cs(e){const t=Q(e);return!Pn()||!t.visualViewport?il:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nl(e,t,i){return t===void 0&&(t=!1),!i||t&&i!==Q(e)?!1:t}function ze(e,t,i,n){t===void 0&&(t=!1),i===void 0&&(i=!1);const o=e.getBoundingClientRect(),s=xs(e);let r=At(1);t&&(n?ht(n)&&(r=te(n)):r=te(e));const l=nl(s,i,n)?Cs(s):At(0);let a=(o.left+l.x)/r.x,d=(o.top+l.y)/r.y,u=o.width/r.x,c=o.height/r.y;if(s){const h=Q(s),p=n&&ht(n)?Q(n):n;let f=h,w=f.frameElement;for(;w&&n&&p!==f;){const v=te(w),b=w.getBoundingClientRect(),y=it(w),_=b.left+(w.clientLeft+parseFloat(y.paddingLeft))*v.x,$=b.top+(w.clientTop+parseFloat(y.paddingTop))*v.y;a*=v.x,d*=v.y,u*=v.x,c*=v.y,a+=_,d+=$,f=Q(w),w=f.frameElement}}return se({width:u,height:c,x:a,y:d})}const ol=[":popover-open",":modal"];function As(e){return ol.some(t=>{try{return e.matches(t)}catch{return!1}})}function sl(e){let{elements:t,rect:i,offsetParent:n,strategy:o}=e;const s=o==="fixed",r=kt(n),l=t?As(t.floating):!1;if(n===r||l&&s)return i;let a={scrollLeft:0,scrollTop:0},d=At(1);const u=At(0),c=pt(n);if((c||!c&&!s)&&((Et(n)!=="body"||Ke(r))&&(a=Ui(n)),pt(n))){const h=ze(n);d=te(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}return{width:i.width*d.x,height:i.height*d.y,x:i.x*d.x-a.scrollLeft*d.x+u.x,y:i.y*d.y-a.scrollTop*d.y+u.y}}function rl(e){return Array.from(e.getClientRects())}function Es(e){return ze(kt(e)).left+Ui(e).scrollLeft}function al(e){const t=kt(e),i=Ui(e),n=e.ownerDocument.body,o=ft(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=ft(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-i.scrollLeft+Es(e);const l=-i.scrollTop;return it(n).direction==="rtl"&&(r+=ft(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:r,y:l}}function ll(e,t){const i=Q(e),n=kt(e),o=i.visualViewport;let s=n.clientWidth,r=n.clientHeight,l=0,a=0;if(o){s=o.width,r=o.height;const d=Pn();(!d||d&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:r,x:l,y:a}}function cl(e,t){const i=ze(e,!0,t==="fixed"),n=i.top+e.clientTop,o=i.left+e.clientLeft,s=pt(e)?te(e):At(1),r=e.clientWidth*s.x,l=e.clientHeight*s.y,a=o*s.x,d=n*s.y;return{width:r,height:l,x:a,y:d}}function ao(e,t,i){let n;if(t==="viewport")n=ll(e,i);else if(t==="document")n=al(kt(e));else if(ht(t))n=cl(t,i);else{const o=Cs(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return se(n)}function Ss(e,t){const i=re(e);return i===t||!ht(i)||Bi(i)?!1:it(i).position==="fixed"||Ss(i,t)}function dl(e,t){const i=t.get(e);if(i)return i;let n=pn(e,[],!1).filter(l=>ht(l)&&Et(l)!=="body"),o=null;const s=it(e).position==="fixed";let r=s?re(e):e;for(;ht(r)&&!Bi(r);){const l=it(r),a=Nn(r);!a&&l.position==="fixed"&&(o=null),(s?!a&&!o:!a&&l.position==="static"&&o&&["absolute","fixed"].includes(o.position)||Ke(r)&&!a&&Ss(e,r))?n=n.filter(d=>d!==r):o=l,r=re(r)}return t.set(e,n),n}function ul(e){let{element:t,boundary:i,rootBoundary:n,strategy:o}=e;const s=[...i==="clippingAncestors"?dl(t,this._c):[].concat(i),n],r=s[0],l=s.reduce((a,d)=>{const u=ao(t,d,o);return a.top=ft(u.top,a.top),a.right=oe(u.right,a.right),a.bottom=oe(u.bottom,a.bottom),a.left=ft(u.left,a.left),a},ao(t,r,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function hl(e){const{width:t,height:i}=$s(e);return{width:t,height:i}}function pl(e,t,i){const n=pt(t),o=kt(t),s=i==="fixed",r=ze(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const a=At(0);if(n||!n&&!s)if((Et(t)!=="body"||Ke(o))&&(l=Ui(t)),n){const c=ze(t,!0,s,t);a.x=c.x+t.clientLeft,a.y=c.y+t.clientTop}else o&&(a.x=Es(o));const d=r.left+l.scrollLeft-a.x,u=r.top+l.scrollTop-a.y;return{x:d,y:u,width:r.width,height:r.height}}function lo(e,t){return!pt(e)||it(e).position==="fixed"?null:t?t(e):e.offsetParent}function ks(e,t){const i=Q(e);if(!pt(e)||As(e))return i;let n=lo(e,t);for(;n&&Za(n)&&it(n).position==="static";)n=lo(n,t);return n&&(Et(n)==="html"||Et(n)==="body"&&it(n).position==="static"&&!Nn(n))?i:n||tl(e)||i}const ml=async function(e){const t=this.getOffsetParent||ks,i=this.getDimensions;return{reference:pl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await i(e.floating)}}};function bl(e){return it(e).direction==="rtl"}const fl={convertOffsetParentRelativeRectToViewportRelativeRect:sl,getDocumentElement:kt,getClippingRect:ul,getOffsetParent:ks,getElementRects:ml,getClientRects:rl,getDimensions:hl,getScale:te,isElement:ht,isRTL:bl},Ts=Qa,Os=qa,Is=Xa,Ns=(e,t,i)=>{const n=new Map,o={platform:fl,...i},s={...o.platform,_c:n};return Ga(e,t,{...o,platform:s})};/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const hi=globalThis,Nn=hi.ShadowRoot&&(hi.ShadyCSS===void 0||hi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$s=Symbol(),no=new WeakMap;let al=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==$s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Nn&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=no.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&no.set(t,e))}return e}toString(){return this.cssText}};const ll=e=>new al(typeof e=="string"?e:e+"",void 0,$s),cl=(e,t)=>{if(Nn)e.adoptedStyleSheets=t.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(const i of t){const n=document.createElement("style"),o=hi.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=i.cssText,e.appendChild(n)}},oo=Nn?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let i="";for(const n of t.cssRules)i+=n.cssText;return ll(i)})(e):e;/** + */const vi=globalThis,Mn=vi.ShadowRoot&&(vi.ShadyCSS===void 0||vi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Rn=Symbol(),co=new WeakMap;let Ps=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Rn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Mn&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=co.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&co.set(t,e))}return e}toString(){return this.cssText}};const gl=e=>new Ps(typeof e=="string"?e:e+"",void 0,Rn),I=(e,...t)=>{const i=e.length===1?e[0]:t.reduce((n,o,s)=>n+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+e[s+1],e[0]);return new Ps(i,e,Rn)},vl=(e,t)=>{if(Mn)e.adoptedStyleSheets=t.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(const i of t){const n=document.createElement("style"),o=vi.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=i.cssText,e.appendChild(n)}},uo=Mn?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let i="";for(const n of t.cssRules)i+=n.cssText;return gl(i)})(e):e;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const{is:dl,defineProperty:ul,getOwnPropertyDescriptor:hl,getOwnPropertyNames:pl,getOwnPropertySymbols:ml,getPrototypeOf:bl}=Object,ie=globalThis,so=ie.trustedTypes,fl=so?so.emptyScript:"",ro=ie.reactiveElementPolyfillSupport,ke=(e,t)=>e,yi={toAttribute(e,t){switch(t){case Boolean:e=e?fl:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=e!==null;break;case Number:i=e===null?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch{i=null}}return i}},Mn=(e,t)=>!dl(e,t),ao={attribute:!0,type:String,converter:yi,reflect:!1,hasChanged:Mn};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),ie.litPropertyMetadata??(ie.litPropertyMetadata=new WeakMap);class xe extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,i=ao){if(i.state&&(i.attribute=!1),this._$Ei(),this.elementProperties.set(t,i),!i.noAccessor){const n=Symbol(),o=this.getPropertyDescriptor(t,n,i);o!==void 0&&ul(this.prototype,t,o)}}static getPropertyDescriptor(t,i,n){const{get:o,set:s}=hl(this.prototype,t)??{get(){return this[i]},set(r){this[i]=r}};return{get(){return o==null?void 0:o.call(this)},set(r){const l=o==null?void 0:o.call(this);s.call(this,r),this.requestUpdate(t,l,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ao}static _$Ei(){if(this.hasOwnProperty(ke("elementProperties")))return;const t=bl(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ke("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ke("properties"))){const i=this.properties,n=[...pl(i),...ml(i)];for(const o of n)this.createProperty(o,i[o])}const t=this[Symbol.metadata];if(t!==null){const i=litPropertyMetadata.get(t);if(i!==void 0)for(const[n,o]of i)this.elementProperties.set(n,o)}this._$Eh=new Map;for(const[i,n]of this.elementProperties){const o=this._$Eu(i,n);o!==void 0&&this._$Eh.set(o,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const o of n)i.unshift(oo(o))}else t!==void 0&&i.push(oo(t));return i}static _$Eu(t,i){const n=i.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(i=>this.enableUpdating=i),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(i=>i(this))}addController(t){var i;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)==null||i.call(t))}removeController(t){var i;(i=this._$EO)==null||i.delete(t)}_$E_(){const t=new Map,i=this.constructor.elementProperties;for(const n of i.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return cl(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(i=>{var n;return(n=i.hostConnected)==null?void 0:n.call(i)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(i=>{var n;return(n=i.hostDisconnected)==null?void 0:n.call(i)})}attributeChangedCallback(t,i,n){this._$AK(t,n)}_$EC(t,i){var n;const o=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,o);if(s!==void 0&&o.reflect===!0){const r=(((n=o.converter)==null?void 0:n.toAttribute)!==void 0?o.converter:yi).toAttribute(i,o.type);this._$Em=t,r==null?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(t,i){var n;const o=this.constructor,s=o._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const r=o.getPropertyOptions(s),l=typeof r.converter=="function"?{fromAttribute:r.converter}:((n=r.converter)==null?void 0:n.fromAttribute)!==void 0?r.converter:yi;this._$Em=s,this[s]=l.fromAttribute(i,r.type),this._$Em=null}}requestUpdate(t,i,n){if(t!==void 0){if(n??(n=this.constructor.getPropertyOptions(t)),!(n.hasChanged??Mn)(this[t],i))return;this.P(t,i,n)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,i,n){this._$AL.has(t)||this._$AL.set(t,i),n.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,r]of this._$Ep)this[s]=r;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[s,r]of o)r.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.P(s,this[s],r)}let i=!1;const n=this._$AL;try{i=this.shouldUpdate(n),i?(this.willUpdate(n),(t=this._$EO)==null||t.forEach(o=>{var s;return(s=o.hostUpdate)==null?void 0:s.call(o)}),this.update(n)):this._$EU()}catch(o){throw i=!1,this._$EU(),o}i&&this._$AE(n)}willUpdate(t){}_$AE(t){var i;(i=this._$EO)==null||i.forEach(n=>{var o;return(o=n.hostUpdated)==null?void 0:o.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(i=>this._$EC(i,this[i]))),this._$EU()}updated(t){}firstUpdated(t){}}xe.elementStyles=[],xe.shadowRootOptions={mode:"open"},xe[ke("elementProperties")]=new Map,xe[ke("finalized")]=new Map,ro==null||ro({ReactiveElement:xe}),(ie.reactiveElementVersions??(ie.reactiveElementVersions=[])).push("2.0.4");/** + */const{is:yl,defineProperty:_l,getOwnPropertyDescriptor:wl,getOwnPropertyNames:$l,getOwnPropertySymbols:xl,getPrototypeOf:Cl}=Object,ae=globalThis,ho=ae.trustedTypes,Al=ho?ho.emptyScript:"",po=ae.reactiveElementPolyfillSupport,Ne=(e,t)=>e,Ai={toAttribute(e,t){switch(t){case Boolean:e=e?Al:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=e!==null;break;case Number:i=e===null?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch{i=null}}return i}},Ln=(e,t)=>!yl(e,t),mo={attribute:!0,type:String,converter:Ai,reflect:!1,hasChanged:Ln};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),ae.litPropertyMetadata??(ae.litPropertyMetadata=new WeakMap);class Zt extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,i=mo){if(i.state&&(i.attribute=!1),this._$Ei(),this.elementProperties.set(t,i),!i.noAccessor){const n=Symbol(),o=this.getPropertyDescriptor(t,n,i);o!==void 0&&_l(this.prototype,t,o)}}static getPropertyDescriptor(t,i,n){const{get:o,set:s}=wl(this.prototype,t)??{get(){return this[i]},set(r){this[i]=r}};return{get(){return o==null?void 0:o.call(this)},set(r){const l=o==null?void 0:o.call(this);s.call(this,r),this.requestUpdate(t,l,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??mo}static _$Ei(){if(this.hasOwnProperty(Ne("elementProperties")))return;const t=Cl(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Ne("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ne("properties"))){const i=this.properties,n=[...$l(i),...xl(i)];for(const o of n)this.createProperty(o,i[o])}const t=this[Symbol.metadata];if(t!==null){const i=litPropertyMetadata.get(t);if(i!==void 0)for(const[n,o]of i)this.elementProperties.set(n,o)}this._$Eh=new Map;for(const[i,n]of this.elementProperties){const o=this._$Eu(i,n);o!==void 0&&this._$Eh.set(o,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const o of n)i.unshift(uo(o))}else t!==void 0&&i.push(uo(t));return i}static _$Eu(t,i){const n=i.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(i=>this.enableUpdating=i),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(i=>i(this))}addController(t){var i;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)==null||i.call(t))}removeController(t){var i;(i=this._$EO)==null||i.delete(t)}_$E_(){const t=new Map,i=this.constructor.elementProperties;for(const n of i.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return vl(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(i=>{var n;return(n=i.hostConnected)==null?void 0:n.call(i)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(i=>{var n;return(n=i.hostDisconnected)==null?void 0:n.call(i)})}attributeChangedCallback(t,i,n){this._$AK(t,n)}_$EC(t,i){var n;const o=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,o);if(s!==void 0&&o.reflect===!0){const r=(((n=o.converter)==null?void 0:n.toAttribute)!==void 0?o.converter:Ai).toAttribute(i,o.type);this._$Em=t,r==null?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(t,i){var n;const o=this.constructor,s=o._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const r=o.getPropertyOptions(s),l=typeof r.converter=="function"?{fromAttribute:r.converter}:((n=r.converter)==null?void 0:n.fromAttribute)!==void 0?r.converter:Ai;this._$Em=s,this[s]=l.fromAttribute(i,r.type),this._$Em=null}}requestUpdate(t,i,n){if(t!==void 0){if(n??(n=this.constructor.getPropertyOptions(t)),!(n.hasChanged??Ln)(this[t],i))return;this.P(t,i,n)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,i,n){this._$AL.has(t)||this._$AL.set(t,i),n.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,r]of this._$Ep)this[s]=r;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[s,r]of o)r.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.P(s,this[s],r)}let i=!1;const n=this._$AL;try{i=this.shouldUpdate(n),i?(this.willUpdate(n),(t=this._$EO)==null||t.forEach(o=>{var s;return(s=o.hostUpdate)==null?void 0:s.call(o)}),this.update(n)):this._$EU()}catch(o){throw i=!1,this._$EU(),o}i&&this._$AE(n)}willUpdate(t){}_$AE(t){var i;(i=this._$EO)==null||i.forEach(n=>{var o;return(o=n.hostUpdated)==null?void 0:o.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(i=>this._$EC(i,this[i]))),this._$EU()}updated(t){}firstUpdated(t){}}Zt.elementStyles=[],Zt.shadowRootOptions={mode:"open"},Zt[Ne("elementProperties")]=new Map,Zt[Ne("finalized")]=new Map,po==null||po({ReactiveElement:Zt}),(ae.reactiveElementVersions??(ae.reactiveElementVersions=[])).push("2.0.4");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const gl={attribute:!0,type:String,converter:yi,reflect:!1,hasChanged:Mn},vl=(e=gl,t,i)=>{const{kind:n,metadata:o}=i;let s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),s.set(i.name,e),n==="accessor"){const{name:r}=i;return{set(l){const a=t.get.call(this);t.set.call(this,l),this.requestUpdate(r,a,e)},init(l){return l!==void 0&&this.P(r,void 0,e),l}}}if(n==="setter"){const{name:r}=i;return function(l){const a=this[r];t.call(this,l),this.requestUpdate(r,a,e)}}throw Error("Unsupported decorator location: "+n)};function g(e){return(t,i)=>typeof i=="object"?vl(e,t,i):((n,o,s)=>{const r=o.hasOwnProperty(s);return o.constructor.createProperty(s,r?{...n,wrapped:!0}:n),r?Object.getOwnPropertyDescriptor(o,s):void 0})(e,t,i)}/** + */const Ei=globalThis,Si=Ei.trustedTypes,bo=Si?Si.createPolicy("lit-html",{createHTML:e=>e}):void 0,Ms="$lit$",xt=`lit$${Math.random().toFixed(9).slice(2)}$`,Rs="?"+xt,El=`<${Rs}>`,Vt=document,De=()=>Vt.createComment(""),Fe=e=>e===null||typeof e!="object"&&typeof e!="function",jn=Array.isArray,Sl=e=>jn(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",on=`[ +\f\r]`,ke=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,fo=/-->/g,go=/>/g,Lt=RegExp(`>|${on}(?:([^\\s"'>=/]+)(${on}*=${on}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),vo=/'/g,yo=/"/g,Ls=/^(?:script|style|textarea|title)$/i,kl=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),m=kl(1),Wt=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),_o=new WeakMap,zt=Vt.createTreeWalker(Vt,129);function js(e,t){if(!jn(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return bo!==void 0?bo.createHTML(t):t}const Tl=(e,t)=>{const i=e.length-1,n=[];let o,s=t===2?"":t===3?"":"",r=ke;for(let l=0;l"?(r=o??ke,c=-1):u[1]===void 0?c=-2:(c=r.lastIndex-u[2].length,d=u[1],r=u[3]===void 0?Lt:u[3]==='"'?yo:vo):r===yo||r===vo?r=Lt:r===fo||r===go?r=ke:(r=Lt,o=void 0);const p=r===Lt&&e[l+1].startsWith("/>")?" ":"";s+=r===ke?a+El:c>=0?(n.push(d),a.slice(0,c)+Ms+a.slice(c)+xt+p):a+xt+(c===-2?l:p)}return[js(e,s+(e[i]||"")+(t===2?"":t===3?"":"")),n]};class He{constructor({strings:t,_$litType$:i},n){let o;this.parts=[];let s=0,r=0;const l=t.length-1,a=this.parts,[d,u]=Tl(t,i);if(this.el=He.createElement(d,n),zt.currentNode=this.el.content,i===2||i===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(o=zt.nextNode())!==null&&a.length0){o.textContent=Si?Si.emptyScript:"";for(let p=0;p2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=R}_$AI(t,i=this,n,o){const s=this.strings;let r=!1;if(s===void 0)t=le(this,t,i,0),r=!Fe(t)||t!==this._$AH&&t!==Wt,r&&(this._$AH=t);else{const l=t;let a,d;for(t=s[0],a=0;a{const n=(i==null?void 0:i.renderBefore)??t;let o=n._$litPart$;if(o===void 0){const s=(i==null?void 0:i.renderBefore)??null;n._$litPart$=o=new ti(t.insertBefore(De(),s),s,void 0,i??{})}return o._$AI(e),o};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */function de(e){return g({...e,state:!0,attribute:!1})}/** + */let T=class extends Zt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ce(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return Wt}};var $o;T._$litElement$=!0,T.finalized=!0,($o=globalThis.litElementHydrateSupport)==null||$o.call(globalThis,{LitElement:T});const xo=globalThis.litElementPolyfillSupport;xo==null||xo({LitElement:T});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const _i=globalThis,wi=_i.trustedTypes,lo=wi?wi.createPolicy("lit-html",{createHTML:e=>e}):void 0,Cs="$lit$",xt=`lit$${Math.random().toFixed(9).slice(2)}$`,As="?"+xt,yl=`<${As}>`,Bt=document,xi=()=>Bt.createComment(""),Le=e=>e===null||typeof e!="object"&&typeof e!="function",Pn=Array.isArray,_l=e=>Pn(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",en=`[ -\f\r]`,$e=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,co=/-->/g,uo=/>/g,Rt=RegExp(`>|${en}(?:([^\\s"'>=/]+)(${en}*=${en}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`,"g"),ho=/'/g,po=/"/g,Es=/^(?:script|style|textarea|title)$/i,ne=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),mo=new WeakMap,jt=Bt.createTreeWalker(Bt,129);function Ss(e,t){if(!Pn(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return lo!==void 0?lo.createHTML(t):t}const wl=(e,t)=>{const i=e.length-1,n=[];let o,s=t===2?"":t===3?"":"",r=$e;for(let l=0;l"?(r=o??$e,c=-1):u[1]===void 0?c=-2:(c=r.lastIndex-u[2].length,d=u[1],r=u[3]===void 0?Rt:u[3]==='"'?po:ho):r===po||r===ho?r=Rt:r===co||r===uo?r=$e:(r=Rt,o=void 0);const p=r===Rt&&e[l+1].startsWith("/>")?" ":"";s+=r===$e?a+yl:c>=0?(n.push(d),a.slice(0,c)+Cs+a.slice(c)+xt+p):a+xt+(c===-2?l:p)}return[Ss(e,s+(e[i]||"")+(t===2?"":t===3?"":"")),n]};class je{constructor({strings:t,_$litType$:i},n){let o;this.parts=[];let s=0,r=0;const l=t.length-1,a=this.parts,[d,u]=wl(t,i);if(this.el=je.createElement(d,n),jt.currentNode=this.el.content,i===2||i===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(o=jt.nextNode())!==null&&a.length0){o.textContent=wi?wi.emptyScript:"";for(let p=0;p2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=R}_$AI(t,i=this,n,o){const s=this.strings;let r=!1;if(s===void 0)t=oe(this,t,i,0),r=!Le(t)||t!==this._$AH&&t!==ne,r&&(this._$AH=t);else{const l=t;let a,d;for(t=s[0],a=0;a{const{kind:n,metadata:o}=i;let s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),s.set(i.name,e),n==="accessor"){const{name:r}=i;return{set(l){const a=t.get.call(this);t.set.call(this,l),this.requestUpdate(r,a,e)},init(l){return l!==void 0&&this.P(r,void 0,e),l}}}if(n==="setter"){const{name:r}=i;return function(l){const a=this[r];t.call(this,l),this.requestUpdate(r,a,e)}}throw Error("Unsupported decorator location: "+n)};function g(e){return(t,i)=>typeof i=="object"?Ll(e,t,i):((n,o,s)=>{const r=o.hasOwnProperty(s);return o.constructor.createProperty(s,r?{...n,wrapped:!0}:n),r?Object.getOwnPropertyDescriptor(o,s):void 0})(e,t,i)}/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */function fe(e){return g({...e,state:!0,attribute:!1})}/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const Sl=e=>e.strings===void 0;/** + */const jl=e=>e.strings===void 0;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const ks={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ts=e=>(...t)=>({_$litDirective$:e,values:t});let Os=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/** + */const zs={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ds=e=>(...t)=>({_$litDirective$:e,values:t});let Fs=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const Te=(e,t)=>{var i;const n=e._$AN;if(n===void 0)return!1;for(const o of n)(i=o._$AO)==null||i.call(o,t,!1),Te(o,t);return!0},$i=e=>{let t,i;do{if((t=e._$AM)===void 0)break;i=t._$AN,i.delete(e),e=t}while((i==null?void 0:i.size)===0)},Is=e=>{for(let t;t=e._$AM;e=t){let i=t._$AN;if(i===void 0)t._$AN=i=new Set;else if(i.has(e))break;i.add(e),Ol(t)}};function kl(e){this._$AN!==void 0?($i(this),this._$AM=e,Is(this)):this._$AM=e}function Tl(e,t=!1,i=0){const n=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(n))for(let s=i;s{e.type==ks.CHILD&&(e._$AP??(e._$AP=Tl),e._$AQ??(e._$AQ=kl))};class Il extends Os{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,i,n){super._$AT(t,i,n),Is(this),this.isConnected=t._$AU}_$AO(t,i=!0){var n,o;t!==this.isConnected&&(this.isConnected=t,t?(n=this.reconnected)==null||n.call(this):(o=this.disconnected)==null||o.call(this)),i&&(Te(this,t),$i(this))}setValue(t){if(Sl(this._$Ct))this._$Ct._$AI(t,this);else{const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}}/** + */const Pe=(e,t)=>{var i;const n=e._$AN;if(n===void 0)return!1;for(const o of n)(i=o._$AO)==null||i.call(o,t,!1),Pe(o,t);return!0},ki=e=>{let t,i;do{if((t=e._$AM)===void 0)break;i=t._$AN,i.delete(e),e=t}while((i==null?void 0:i.size)===0)},Hs=e=>{for(let t;t=e._$AM;e=t){let i=t._$AN;if(i===void 0)t._$AN=i=new Set;else if(i.has(e))break;i.add(e),Fl(t)}};function zl(e){this._$AN!==void 0?(ki(this),this._$AM=e,Hs(this)):this._$AM=e}function Dl(e,t=!1,i=0){const n=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(n))for(let s=i;s{e.type==zs.CHILD&&(e._$AP??(e._$AP=Dl),e._$AQ??(e._$AQ=zl))};class Hl extends Fs{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,i,n){super._$AT(t,i,n),Hs(this),this.isConnected=t._$AU}_$AO(t,i=!0){var n,o;t!==this.isConnected&&(this.isConnected=t,t?(n=this.reconnected)==null||n.call(this):(o=this.disconnected)==null||o.call(this)),i&&(Pe(this,t),ki(this))}setValue(t){if(jl(this._$Ct))this._$Ct._$AI(t,this);else{const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}}/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const se=()=>new Nl;class Nl{}const nn=new WeakMap,q=Ts(class extends Il{render(e){return R}update(e,[t]){var i;const n=t!==this.Y;return n&&this.Y!==void 0&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.Y=t,this.ht=(i=e.options)==null?void 0:i.host,this.rt(this.ct=e.element)),R}rt(e){if(this.isConnected||(e=void 0),typeof this.Y=="function"){const t=this.ht??globalThis;let i=nn.get(t);i===void 0&&(i=new WeakMap,nn.set(t,i)),i.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),i.set(this.Y,e),e!==void 0&&this.Y.call(this.ht,e)}else this.Y.value=e}get lt(){var e,t;return typeof this.Y=="function"?(e=nn.get(this.ht??globalThis))==null?void 0:e.get(this.Y):(t=this.Y)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});/** + */const de=()=>new Bl;class Bl{}const sn=new WeakMap,G=Ds(class extends Hl{render(e){return R}update(e,[t]){var i;const n=t!==this.Y;return n&&this.Y!==void 0&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.Y=t,this.ht=(i=e.options)==null?void 0:i.host,this.rt(this.ct=e.element)),R}rt(e){if(this.isConnected||(e=void 0),typeof this.Y=="function"){const t=this.ht??globalThis;let i=sn.get(t);i===void 0&&(i=new WeakMap,sn.set(t,i)),i.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),i.set(this.Y,e),e!==void 0&&this.Y.call(this.ht,e)}else this.Y.value=e}get lt(){var e,t;return typeof this.Y=="function"?(e=sn.get(this.ht??globalThis))==null?void 0:e.get(this.Y):(t=this.Y)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});/** * (c) Iconify * * For the full copyright and license information, please view the license.txt @@ -46,7 +50,7 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as * * @license MIT * @version 2.0.0 -*/const Ns=Object.freeze({left:0,top:0,width:16,height:16}),Ci=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Je=Object.freeze({...Ns,...Ci}),hn=Object.freeze({...Je,body:"",hidden:!1}),Ml=Object.freeze({width:null,height:null}),Ms=Object.freeze({...Ml,...Ci});function Pl(e,t=0){const i=e.replace(/^-?[0-9.]*/,"");function n(o){for(;o<0;)o+=4;return o%4}if(i===""){const o=parseInt(e);return isNaN(o)?0:n(o)}else if(i!==e){let o=0;switch(i){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-i.length));return isNaN(s)?0:(s=s/o,s%1===0?n(s):0)}}return t}const Rl=/[\s,]+/;function Ll(e,t){t.split(Rl).forEach(i=>{switch(i.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Ps={...Ms,preserveAspectRatio:""};function fo(e){const t={...Ps},i=(n,o)=>e.getAttribute(n)||o;return t.width=i("width",null),t.height=i("height",null),t.rotate=Pl(i("rotate","")),Ll(t,i("flip","")),t.preserveAspectRatio=i("preserveAspectRatio",i("preserveaspectratio","")),t}function jl(e,t){for(const i in Ps)if(e[i]!==t[i])return!0;return!1}const Oe=/^[a-z0-9]+(-[a-z0-9]+)*$/,Qe=(e,t,i,n="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;n=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const l=o.pop(),a=o.pop(),d={provider:o.length>0?o[0]:n,prefix:a,name:l};return t&&!pi(d)?null:d}const s=o[0],r=s.split("-");if(r.length>1){const l={provider:n,prefix:r.shift(),name:r.join("-")};return t&&!pi(l)?null:l}if(i&&n===""){const l={provider:n,prefix:"",name:s};return t&&!pi(l,i)?null:l}return null},pi=(e,t)=>e?!!((e.provider===""||e.provider.match(Oe))&&(t&&e.prefix===""||e.prefix.match(Oe))&&e.name.match(Oe)):!1;function zl(e,t){const i={};!e.hFlip!=!t.hFlip&&(i.hFlip=!0),!e.vFlip!=!t.vFlip&&(i.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(i.rotate=n),i}function go(e,t){const i=zl(e,t);for(const n in hn)n in Ci?n in e&&!(n in i)&&(i[n]=Ci[n]):n in t?i[n]=t[n]:n in e&&(i[n]=e[n]);return i}function Dl(e,t){const i=e.icons,n=e.aliases||Object.create(null),o=Object.create(null);function s(r){if(i[r])return o[r]=[];if(!(r in o)){o[r]=null;const l=n[r]&&n[r].parent,a=l&&s(l);a&&(o[r]=[l].concat(a))}return o[r]}return Object.keys(i).concat(Object.keys(n)).forEach(s),o}function Fl(e,t,i){const n=e.icons,o=e.aliases||Object.create(null);let s={};function r(l){s=go(n[l]||o[l],s)}return r(t),i.forEach(r),go(e,s)}function Rs(e,t){const i=[];if(typeof e!="object"||typeof e.icons!="object")return i;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),i.push(o)});const n=Dl(e);for(const o in n){const s=n[o];s&&(t(o,Fl(e,o,s)),i.push(o))}return i}const Hl={provider:"",aliases:{},not_found:{},...Ns};function on(e,t){for(const i in t)if(i in e&&typeof e[i]!=typeof t[i])return!1;return!0}function Ls(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!on(e,Hl))return null;const i=t.icons;for(const o in i){const s=i[o];if(!o.match(Oe)||typeof s.body!="string"||!on(s,hn))return null}const n=t.aliases||Object.create(null);for(const o in n){const s=n[o],r=s.parent;if(!o.match(Oe)||typeof r!="string"||!i[r]&&!n[r]||!on(s,hn))return null}return t}const Ai=Object.create(null);function Bl(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Et(e,t){const i=Ai[e]||(Ai[e]=Object.create(null));return i[t]||(i[t]=Bl(e,t))}function Rn(e,t){return Ls(t)?Rs(t,(i,n)=>{n?e.icons[i]=n:e.missing.add(i)}):[]}function Ul(e,t,i){try{if(typeof i.body=="string")return e.icons[t]={...i},!0}catch{}return!1}function Vl(e,t){let i=[];return(typeof e=="string"?[e]:Object.keys(Ai)).forEach(n=>{(typeof n=="string"&&typeof t=="string"?[t]:Object.keys(Ai[n]||{})).forEach(o=>{const s=Et(n,o);i=i.concat(Object.keys(s.icons).map(r=>(n!==""?"@"+n+":":"")+o+":"+r))})}),i}let ze=!1;function js(e){return typeof e=="boolean"&&(ze=e),ze}function De(e){const t=typeof e=="string"?Qe(e,!0,ze):e;if(t){const i=Et(t.provider,t.prefix),n=t.name;return i.icons[n]||(i.missing.has(n)?null:void 0)}}function zs(e,t){const i=Qe(e,!0,ze);if(!i)return!1;const n=Et(i.provider,i.prefix);return Ul(n,i.name,t)}function vo(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),ze&&!t&&!e.prefix){let o=!1;return Ls(e)&&(e.prefix="",Rs(e,(s,r)=>{r&&zs(s,r)&&(o=!0)})),o}const i=e.prefix;if(!pi({provider:t,prefix:i,name:"a"}))return!1;const n=Et(t,i);return!!Rn(n,e)}function yo(e){return!!De(e)}function Wl(e){const t=De(e);return t?{...Je,...t}:null}function ql(e){const t={loaded:[],missing:[],pending:[]},i=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let n={provider:"",prefix:"",name:""};return e.forEach(o=>{if(n.name===o.name&&n.prefix===o.prefix&&n.provider===o.provider)return;n=o;const s=o.provider,r=o.prefix,l=o.name,a=i[s]||(i[s]=Object.create(null)),d=a[r]||(a[r]=Et(s,r));let u;l in d.icons?u=t.loaded:r===""||d.missing.has(l)?u=t.missing:u=t.pending;const c={provider:s,prefix:r,name:l};u.push(c)}),t}function Ds(e,t){e.forEach(i=>{const n=i.loaderCallbacks;n&&(i.loaderCallbacks=n.filter(o=>o.id!==t))})}function Gl(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let i=!1;const n=e.provider,o=e.prefix;t.forEach(s=>{const r=s.icons,l=r.pending.length;r.pending=r.pending.filter(a=>{if(a.prefix!==o)return!0;const d=a.name;if(e.icons[d])r.loaded.push({provider:n,prefix:o,name:d});else if(e.missing.has(d))r.missing.push({provider:n,prefix:o,name:d});else return i=!0,!0;return!1}),r.pending.length!==l&&(i||Ds([e],s.id),s.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),s.abort))})}))}let Yl=0;function Xl(e,t,i){const n=Yl++,o=Ds.bind(null,i,n);if(!t.pending.length)return o;const s={id:n,icons:t,callback:e,abort:o};return i.forEach(r=>{(r.loaderCallbacks||(r.loaderCallbacks=[])).push(s)}),o}const pn=Object.create(null);function _o(e,t){pn[e]=t}function mn(e){return pn[e]||pn[""]}function Jl(e,t=!0,i=!1){const n=[];return e.forEach(o=>{const s=typeof o=="string"?Qe(o,t,i):o;s&&n.push(s)}),n}var Ql={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Zl(e,t,i,n){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let r;if(e.random){let C=e.resources.slice(0);for(r=[];C.length>1;){const O=Math.floor(Math.random()*C.length);r.push(C[O]),C=C.slice(0,O).concat(C.slice(O+1))}r=r.concat(C)}else r=e.resources.slice(s).concat(e.resources.slice(0,s));const l=Date.now();let a="pending",d=0,u,c=null,h=[],p=[];typeof n=="function"&&p.push(n);function f(){c&&(clearTimeout(c),c=null)}function w(){a==="pending"&&(a="aborted"),f(),h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function v(C,O){O&&(p=[]),typeof C=="function"&&p.push(C)}function b(){return{startTime:l,payload:t,status:a,queriesSent:d,queriesPending:h.length,subscribe:v,abort:w}}function y(){a="failed",p.forEach(C=>{C(void 0,u)})}function _(){h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function x(C,O,M){const S=O!=="success";switch(h=h.filter(E=>E!==C),a){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(O==="abort"){u=M,y();return}if(S){u=M,h.length||(r.length?A():y());return}if(f(),_(),!e.random){const E=e.resources.indexOf(C.resource);E!==-1&&E!==e.index&&(e.index=E)}a="completed",p.forEach(E=>{E(M)})}function A(){if(a!=="pending")return;f();const C=r.shift();if(C===void 0){if(h.length){c=setTimeout(()=>{f(),a==="pending"&&(_(),y())},e.timeout);return}y();return}const O={status:"pending",resource:C,callback:(M,S)=>{x(O,M,S)}};h.push(O),d++,c=setTimeout(A,e.rotate),i(C,t,O.callback)}return setTimeout(A),b}function Fs(e){const t={...Ql,...e};let i=[];function n(){i=i.filter(r=>r().status==="pending")}function o(r,l,a){const d=Zl(t,r,l,(u,c)=>{n(),a&&a(u,c)});return i.push(d),d}function s(r){return i.find(l=>r(l))||null}return{query:o,find:s,setIndex:r=>{t.index=r},getIndex:()=>t.index,cleanup:n}}function Ln(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Bi=Object.create(null),li=["https://api.simplesvg.com","https://api.unisvg.com"],bn=[];for(;li.length>0;)li.length===1||Math.random()>.5?bn.push(li.shift()):bn.push(li.pop());Bi[""]=Ln({resources:["https://api.iconify.design"].concat(bn)});function wo(e,t){const i=Ln(t);return i===null?!1:(Bi[e]=i,!0)}function Ui(e){return Bi[e]}function Kl(){return Object.keys(Bi)}function xo(){}const sn=Object.create(null);function tc(e){if(!sn[e]){const t=Ui(e);if(!t)return;const i=Fs(t),n={config:t,redundancy:i};sn[e]=n}return sn[e]}function Hs(e,t,i){let n,o;if(typeof e=="string"){const s=mn(e);if(!s)return i(void 0,424),xo;o=s.send;const r=tc(e);r&&(n=r.redundancy)}else{const s=Ln(e);if(s){n=Fs(s);const r=e.resources?e.resources[0]:"",l=mn(r);l&&(o=l.send)}}return!n||!o?(i(void 0,424),xo):n.query(t,o,i)().abort}const $o="iconify2",Fe="iconify",Bs=Fe+"-count",Co=Fe+"-version",Us=36e5,ec=168,ic=50;function fn(e,t){try{return e.getItem(t)}catch{}}function jn(e,t,i){try{return e.setItem(t,i),!0}catch{}}function Ao(e,t){try{e.removeItem(t)}catch{}}function gn(e,t){return jn(e,Bs,t.toString())}function vn(e){return parseInt(fn(e,Bs))||0}const Dt={local:!0,session:!0},Vs={local:new Set,session:new Set};let zn=!1;function nc(e){zn=e}let ci=typeof window>"u"?{}:window;function Ws(e){const t=e+"Storage";try{if(ci&&ci[t]&&typeof ci[t].length=="number")return ci[t]}catch{}Dt[e]=!1}function qs(e,t){const i=Ws(e);if(!i)return;const n=fn(i,Co);if(n!==$o){if(n){const l=vn(i);for(let a=0;a{const a=Fe+l.toString(),d=fn(i,a);if(typeof d=="string"){try{const u=JSON.parse(d);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,l))return!0}catch{}Ao(i,a)}};let r=vn(i);for(let l=r-1;l>=0;l--)s(l)||(l===r-1?(r--,gn(i,r)):Vs[e].add(l))}function Gs(){if(!zn){nc(!0);for(const e in Dt)qs(e,t=>{const i=t.data,n=t.provider,o=i.prefix,s=Et(n,o);if(!Rn(s,i).length)return!1;const r=i.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,r):r,!0})}}function oc(e,t){const i=e.lastModifiedCached;if(i&&i>=t)return i===t;if(e.lastModifiedCached=t,i)for(const n in Dt)qs(n,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function sc(e,t){zn||Gs();function i(n){let o;if(!Dt[n]||!(o=Ws(n)))return;const s=Vs[n];let r;if(s.size)s.delete(r=Array.from(s).shift());else if(r=vn(o),r>=ic||!gn(o,r+1))return;const l={cached:Math.floor(Date.now()/Us),provider:e.provider,data:t};return jn(o,Fe+r.toString(),JSON.stringify(l))}t.lastModified&&!oc(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),i("local")||i("session"))}function Eo(){}function rc(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Gl(e)}))}function ac(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:i,prefix:n}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;!o||!(s=mn(i))||s.prepare(i,n,o).forEach(r=>{Hs(i,r,l=>{if(typeof l!="object")r.icons.forEach(a=>{e.missing.add(a)});else try{const a=Rn(e,l);if(!a.length)return;const d=e.pendingIcons;d&&a.forEach(u=>{d.delete(u)}),sc(e,l)}catch(a){console.error(a)}rc(e)})})}))}const Dn=(e,t)=>{const i=Jl(e,!0,js()),n=ql(i);if(!n.pending.length){let a=!0;return t&&setTimeout(()=>{a&&t(n.loaded,n.missing,n.pending,Eo)}),()=>{a=!1}}const o=Object.create(null),s=[];let r,l;return n.pending.forEach(a=>{const{provider:d,prefix:u}=a;if(u===l&&d===r)return;r=d,l=u,s.push(Et(d,u));const c=o[d]||(o[d]=Object.create(null));c[u]||(c[u]=[])}),n.pending.forEach(a=>{const{provider:d,prefix:u,name:c}=a,h=Et(d,u),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(c)||(p.add(c),o[d][u].push(c))}),s.forEach(a=>{const{provider:d,prefix:u}=a;o[d][u].length&&ac(a,o[d][u])}),t?Xl(t,n,s):Eo},lc=e=>new Promise((t,i)=>{const n=typeof e=="string"?Qe(e,!0):e;if(!n){i(e);return}Dn([n||e],o=>{if(o.length&&n){const s=De(n);if(s){t({...Je,...s});return}}i(e)})});function cc(e){try{const t=typeof e=="string"?JSON.parse(e):e;if(typeof t.body=="string")return{...t}}catch{}}function dc(e,t){const i=typeof e=="string"?Qe(e,!0,!0):null;if(!i){const s=cc(e);return{value:e,data:s}}const n=De(i);if(n!==void 0||!i.prefix)return{value:e,name:i,data:n};const o=Dn([i],()=>t(e,i,De(i)));return{value:e,name:i,loading:o}}function rn(e){return e.hasAttribute("inline")}let Ys=!1;try{Ys=navigator.vendor.indexOf("Apple")===0}catch{}function uc(e,t){switch(t){case"svg":case"bg":case"mask":return t}return t!=="style"&&(Ys||e.indexOf("=0;){const o=e.indexOf(">",n),s=e.indexOf("",s);if(r===-1)break;i+=e.slice(o+1,s).trim(),e=e.slice(0,n).trim()+e.slice(r+1)}return{defs:i,content:e}}function bc(e,t){return e?""+e+""+t:t}function fc(e,t,i){const n=mc(e);return bc(n.defs,t+n.content+i)}const gc=e=>e==="unset"||e==="undefined"||e==="none";function Xs(e,t){const i={...Je,...e},n={...Ms,...t},o={left:i.left,top:i.top,width:i.width,height:i.height};let s=i.body;[i,n].forEach(w=>{const v=[],b=w.hFlip,y=w.vFlip;let _=w.rotate;b?y?_+=2:(v.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),v.push("scale(-1 1)"),o.top=o.left=0):y&&(v.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),v.push("scale(1 -1)"),o.top=o.left=0);let x;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:x=o.height/2+o.top,v.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:v.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:x=o.width/2+o.left,v.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}_%2===1&&(o.left!==o.top&&(x=o.left,o.left=o.top,o.top=x),o.width!==o.height&&(x=o.width,o.width=o.height,o.height=x)),v.length&&(s=fc(s,'',""))});const r=n.width,l=n.height,a=o.width,d=o.height;let u,c;r===null?(c=l===null?"1em":l==="auto"?d:l,u=yn(c,a/d)):(u=r==="auto"?a:r,c=l===null?yn(u,d/a):l==="auto"?d:l);const h={},p=(w,v)=>{gc(v)||(h[w]=v.toString())};p("width",u),p("height",c);const f=[o.left,o.top,a,d];return h.viewBox=f.join(" "),{attributes:h,viewBox:f,body:s}}function Fn(e,t){let i=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)i+=" "+n+'="'+t[n]+'"';return'"+e+""}function vc(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function yc(e){return"data:image/svg+xml,"+vc(e)}function Js(e){return'url("'+yc(e)+'")'}const _c=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ei=_c();function wc(e){Ei=e}function xc(){return Ei}function $c(e,t){const i=Ui(e);if(!i)return 0;let n;if(!i.maxURL)n=0;else{let o=0;i.resources.forEach(r=>{o=Math.max(o,r.length)});const s=t+".json?icons=";n=i.maxURL-o-i.path.length-s.length}return n}function Cc(e){return e===404}const Ac=(e,t,i)=>{const n=[],o=$c(e,t),s="icons";let r={type:s,provider:e,prefix:t,icons:[]},l=0;return i.forEach((a,d)=>{l+=a.length+1,l>=o&&d>0&&(n.push(r),r={type:s,provider:e,prefix:t,icons:[]},l=a.length),r.icons.push(a)}),n.push(r),n};function Ec(e){if(typeof e=="string"){const t=Ui(e);if(t)return t.path}return"/"}const Sc=(e,t,i)=>{if(!Ei){i("abort",424);return}let n=Ec(t.provider);switch(t.type){case"icons":{const s=t.prefix,r=t.icons.join(","),l=new URLSearchParams({icons:r});n+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;n+=s.slice(0,1)==="/"?s.slice(1):s;break}default:i("abort",400);return}let o=503;Ei(e+n).then(s=>{const r=s.status;if(r!==200){setTimeout(()=>{i(Cc(r)?"abort":"next",r)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?i("abort",s):i("next",o)});return}setTimeout(()=>{i("success",s)})}).catch(()=>{i("next",o)})},kc={prepare:Ac,send:Sc};function So(e,t){switch(e){case"local":case"session":Dt[e]=t;break;case"all":for(const i in Dt)Dt[i]=t;break}}const an="data-style";let Qs="";function Tc(e){Qs=e}function ko(e,t){let i=Array.from(e.childNodes).find(n=>n.hasAttribute&&n.hasAttribute(an));i||(i=document.createElement("style"),i.setAttribute(an,an),e.appendChild(i)),i.textContent=":host{display:inline-block;vertical-align:"+(t?"-0.125em":"0")+"}span,svg{display:block}"+Qs}function Zs(){_o("",kc),js(!0);let e;try{e=window}catch{}if(e){if(Gs(),e.IconifyPreload!==void 0){const t=e.IconifyPreload,i="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!vo(n))&&console.error(i)}catch{console.error(i)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const i in t){const n="IconifyProviders["+i+"] is invalid.";try{const o=t[i];if(typeof o!="object"||!o||o.resources===void 0)continue;wo(i,o)||console.error(n)}catch{console.error(n)}}}}return{enableCache:t=>So(t,!0),disableCache:t=>So(t,!1),iconLoaded:yo,iconExists:yo,getIcon:Wl,listIcons:Vl,addIcon:zs,addCollection:vo,calculateSize:yn,buildIcon:Xs,iconToHTML:Fn,svgToURL:Js,loadIcons:Dn,loadIcon:lc,addAPIProvider:wo,appendCustomStyle:Tc,_api:{getAPIConfig:Ui,setAPIModule:_o,sendAPIQuery:Hs,setFetch:wc,getFetch:xc,listAPIProviders:Kl}}}const _n={"background-color":"currentColor"},Ks={"background-color":"transparent"},To={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Oo={"-webkit-mask":_n,mask:_n,background:Ks};for(const e in Oo){const t=Oo[e];for(const i in To)t[e+"-"+i]=To[i]}function Io(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Oc(e,t,i){const n=document.createElement("span");let o=e.body;o.indexOf("");const s=e.attributes,r=Fn(o,{...s,width:t.width+"",height:t.height+""}),l=Js(r),a=n.style,d={"--svg":l,width:Io(s.width),height:Io(s.height),...i?_n:Ks};for(const u in d)a.setProperty(u,d[u]);return n}let Ie;function Ic(){try{Ie=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Ie=null}}function Nc(e){return Ie===void 0&&Ic(),Ie?Ie.createHTML(e):e}function Mc(e){const t=document.createElement("span"),i=e.attributes;let n="";i.width||(n="width: inherit;"),i.height||(n+="height: inherit;"),n&&(i.style=n);const o=Fn(e.body,i);return t.innerHTML=Nc(o),t.firstChild}function wn(e){return Array.from(e.childNodes).find(t=>{const i=t.tagName&&t.tagName.toUpperCase();return i==="SPAN"||i==="SVG"})}function No(e,t){const i=t.icon.data,n=t.customisations,o=Xs(i,n);n.preserveAspectRatio&&(o.attributes.preserveAspectRatio=n.preserveAspectRatio);const s=t.renderedMode;let r;switch(s){case"svg":r=Mc(o);break;default:r=Oc(o,{...Je,...i},s==="mask")}const l=wn(e);l?r.tagName==="SPAN"&&l.tagName===r.tagName?l.setAttribute("style",r.getAttribute("style")):e.replaceChild(r,l):e.appendChild(r)}function Mo(e,t,i){const n=i&&(i.rendered?i:i.lastRender);return{rendered:!1,inline:t,icon:e,lastRender:n}}function Pc(e="iconify-icon"){let t,i;try{t=window.customElements,i=window.HTMLElement}catch{return}if(!t||!i)return;const n=t.get(e);if(n)return n;const o=["icon","mode","inline","observe","width","height","rotate","flip"],s=class extends i{constructor(){super(),Pt(this,"_shadowRoot"),Pt(this,"_initialised",!1),Pt(this,"_state"),Pt(this,"_checkQueued",!1),Pt(this,"_connected",!1),Pt(this,"_observer",null),Pt(this,"_visible",!0);const l=this._shadowRoot=this.attachShadow({mode:"open"}),a=rn(this);ko(l,a),this._state=Mo({value:""},a),this._queueCheck()}connectedCallback(){this._connected=!0,this.startObserver()}disconnectedCallback(){this._connected=!1,this.stopObserver()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(l){switch(l){case"inline":{const a=rn(this),d=this._state;a!==d.inline&&(d.inline=a,ko(this._shadowRoot,a));break}case"observer":{this.observer?this.startObserver():this.stopObserver();break}default:this._queueCheck()}}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return rn(this)}set inline(l){l?this.setAttribute("inline","true"):this.removeAttribute("inline")}get observer(){return this.hasAttribute("observer")}set observer(l){l?this.setAttribute("observer","true"):this.removeAttribute("observer")}restartAnimation(){const l=this._state;if(l.rendered){const a=this._shadowRoot;if(l.renderedMode==="svg")try{a.lastChild.setCurrentTime(0);return}catch{}No(a,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,a=this.getAttribute("icon");if(a!==l.icon.value){this._iconChanged(a);return}if(!l.rendered||!this._visible)return;const d=this.getAttribute("mode"),u=fo(this);(l.attrMode!==d||jl(l.customisations,u)||!wn(this._shadowRoot))&&this._renderIcon(l.icon,u,d)}_iconChanged(l){const a=dc(l,(d,u,c)=>{const h=this._state;if(h.rendered||this.getAttribute("icon")!==d)return;const p={value:d,name:u,data:c};p.data?this._gotIconData(p):h.icon=p});a.data?this._gotIconData(a):this._state=Mo(a,this._state.inline,this._state)}_forceRender(){if(!this._visible){const l=wn(this._shadowRoot);l&&this._shadowRoot.removeChild(l);return}this._queueCheck()}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,fo(this),this.getAttribute("mode"))}_renderIcon(l,a,d){const u=uc(l.data.body,d),c=this._state.inline;No(this._shadowRoot,this._state={rendered:!0,icon:l,inline:c,customisations:a,attrMode:d,renderedMode:u})}startObserver(){if(!this._observer)try{this._observer=new IntersectionObserver(l=>{const a=l.some(d=>d.isIntersecting);a!==this._visible&&(this._visible=a,this._forceRender())}),this._observer.observe(this)}catch{if(this._observer){try{this._observer.disconnect()}catch{}this._observer=null}}}stopObserver(){this._observer&&(this._observer.disconnect(),this._observer=null,this._visible=!0,this._connected&&this._forceRender())}};o.forEach(l=>{l in s.prototype||Object.defineProperty(s.prototype,l,{get:function(){return this.getAttribute(l)},set:function(a){a!==null?this.setAttribute(l,a):this.removeAttribute(l)}})});const r=Zs();for(const l in r)s[l]=s.prototype[l]=r[l];return t.define(e,s),s}Pc()||Zs();const Rc=T` +*/const Bs=Object.freeze({left:0,top:0,width:16,height:16}),Ti=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ei=Object.freeze({...Bs,...Ti}),mn=Object.freeze({...ei,body:"",hidden:!1}),Ul=Object.freeze({width:null,height:null}),Us=Object.freeze({...Ul,...Ti});function Vl(e,t=0){const i=e.replace(/^-?[0-9.]*/,"");function n(o){for(;o<0;)o+=4;return o%4}if(i===""){const o=parseInt(e);return isNaN(o)?0:n(o)}else if(i!==e){let o=0;switch(i){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-i.length));return isNaN(s)?0:(s=s/o,s%1===0?n(s):0)}}return t}const Wl=/[\s,]+/;function Gl(e,t){t.split(Wl).forEach(i=>{switch(i.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Vs={...Us,preserveAspectRatio:""};function Co(e){const t={...Vs},i=(n,o)=>e.getAttribute(n)||o;return t.width=i("width",null),t.height=i("height",null),t.rotate=Vl(i("rotate","")),Gl(t,i("flip","")),t.preserveAspectRatio=i("preserveAspectRatio",i("preserveaspectratio","")),t}function ql(e,t){for(const i in Vs)if(e[i]!==t[i])return!0;return!1}const Me=/^[a-z0-9]+(-[a-z0-9]+)*$/,ii=(e,t,i,n="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;n=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const l=o.pop(),a=o.pop(),d={provider:o.length>0?o[0]:n,prefix:a,name:l};return t&&!yi(d)?null:d}const s=o[0],r=s.split("-");if(r.length>1){const l={provider:n,prefix:r.shift(),name:r.join("-")};return t&&!yi(l)?null:l}if(i&&n===""){const l={provider:n,prefix:"",name:s};return t&&!yi(l,i)?null:l}return null},yi=(e,t)=>e?!!((e.provider===""||e.provider.match(Me))&&(t&&e.prefix===""||e.prefix.match(Me))&&e.name.match(Me)):!1;function Yl(e,t){const i={};!e.hFlip!=!t.hFlip&&(i.hFlip=!0),!e.vFlip!=!t.vFlip&&(i.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(i.rotate=n),i}function Ao(e,t){const i=Yl(e,t);for(const n in mn)n in Ti?n in e&&!(n in i)&&(i[n]=Ti[n]):n in t?i[n]=t[n]:n in e&&(i[n]=e[n]);return i}function Xl(e,t){const i=e.icons,n=e.aliases||Object.create(null),o=Object.create(null);function s(r){if(i[r])return o[r]=[];if(!(r in o)){o[r]=null;const l=n[r]&&n[r].parent,a=l&&s(l);a&&(o[r]=[l].concat(a))}return o[r]}return Object.keys(i).concat(Object.keys(n)).forEach(s),o}function Jl(e,t,i){const n=e.icons,o=e.aliases||Object.create(null);let s={};function r(l){s=Ao(n[l]||o[l],s)}return r(t),i.forEach(r),Ao(e,s)}function Ws(e,t){const i=[];if(typeof e!="object"||typeof e.icons!="object")return i;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),i.push(o)});const n=Xl(e);for(const o in n){const s=n[o];s&&(t(o,Jl(e,o,s)),i.push(o))}return i}const Ql={provider:"",aliases:{},not_found:{},...Bs};function rn(e,t){for(const i in t)if(i in e&&typeof e[i]!=typeof t[i])return!1;return!0}function Gs(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!rn(e,Ql))return null;const i=t.icons;for(const o in i){const s=i[o];if(!o.match(Me)||typeof s.body!="string"||!rn(s,mn))return null}const n=t.aliases||Object.create(null);for(const o in n){const s=n[o],r=s.parent;if(!o.match(Me)||typeof r!="string"||!i[r]&&!n[r]||!rn(s,mn))return null}return t}const Oi=Object.create(null);function Zl(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function St(e,t){const i=Oi[e]||(Oi[e]=Object.create(null));return i[t]||(i[t]=Zl(e,t))}function zn(e,t){return Gs(t)?Ws(t,(i,n)=>{n?e.icons[i]=n:e.missing.add(i)}):[]}function Kl(e,t,i){try{if(typeof i.body=="string")return e.icons[t]={...i},!0}catch{}return!1}function tc(e,t){let i=[];return(typeof e=="string"?[e]:Object.keys(Oi)).forEach(n=>{(typeof n=="string"&&typeof t=="string"?[t]:Object.keys(Oi[n]||{})).forEach(o=>{const s=St(n,o);i=i.concat(Object.keys(s.icons).map(r=>(n!==""?"@"+n+":":"")+o+":"+r))})}),i}let Be=!1;function qs(e){return typeof e=="boolean"&&(Be=e),Be}function Ue(e){const t=typeof e=="string"?ii(e,!0,Be):e;if(t){const i=St(t.provider,t.prefix),n=t.name;return i.icons[n]||(i.missing.has(n)?null:void 0)}}function Ys(e,t){const i=ii(e,!0,Be);if(!i)return!1;const n=St(i.provider,i.prefix);return Kl(n,i.name,t)}function Eo(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Be&&!t&&!e.prefix){let o=!1;return Gs(e)&&(e.prefix="",Ws(e,(s,r)=>{r&&Ys(s,r)&&(o=!0)})),o}const i=e.prefix;if(!yi({provider:t,prefix:i,name:"a"}))return!1;const n=St(t,i);return!!zn(n,e)}function So(e){return!!Ue(e)}function ec(e){const t=Ue(e);return t?{...ei,...t}:null}function ic(e){const t={loaded:[],missing:[],pending:[]},i=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let n={provider:"",prefix:"",name:""};return e.forEach(o=>{if(n.name===o.name&&n.prefix===o.prefix&&n.provider===o.provider)return;n=o;const s=o.provider,r=o.prefix,l=o.name,a=i[s]||(i[s]=Object.create(null)),d=a[r]||(a[r]=St(s,r));let u;l in d.icons?u=t.loaded:r===""||d.missing.has(l)?u=t.missing:u=t.pending;const c={provider:s,prefix:r,name:l};u.push(c)}),t}function Xs(e,t){e.forEach(i=>{const n=i.loaderCallbacks;n&&(i.loaderCallbacks=n.filter(o=>o.id!==t))})}function nc(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let i=!1;const n=e.provider,o=e.prefix;t.forEach(s=>{const r=s.icons,l=r.pending.length;r.pending=r.pending.filter(a=>{if(a.prefix!==o)return!0;const d=a.name;if(e.icons[d])r.loaded.push({provider:n,prefix:o,name:d});else if(e.missing.has(d))r.missing.push({provider:n,prefix:o,name:d});else return i=!0,!0;return!1}),r.pending.length!==l&&(i||Xs([e],s.id),s.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),s.abort))})}))}let oc=0;function sc(e,t,i){const n=oc++,o=Xs.bind(null,i,n);if(!t.pending.length)return o;const s={id:n,icons:t,callback:e,abort:o};return i.forEach(r=>{(r.loaderCallbacks||(r.loaderCallbacks=[])).push(s)}),o}const bn=Object.create(null);function ko(e,t){bn[e]=t}function fn(e){return bn[e]||bn[""]}function rc(e,t=!0,i=!1){const n=[];return e.forEach(o=>{const s=typeof o=="string"?ii(o,t,i):o;s&&n.push(s)}),n}var ac={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function lc(e,t,i,n){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let r;if(e.random){let C=e.resources.slice(0);for(r=[];C.length>1;){const O=Math.floor(Math.random()*C.length);r.push(C[O]),C=C.slice(0,O).concat(C.slice(O+1))}r=r.concat(C)}else r=e.resources.slice(s).concat(e.resources.slice(0,s));const l=Date.now();let a="pending",d=0,u,c=null,h=[],p=[];typeof n=="function"&&p.push(n);function f(){c&&(clearTimeout(c),c=null)}function w(){a==="pending"&&(a="aborted"),f(),h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function v(C,O){O&&(p=[]),typeof C=="function"&&p.push(C)}function b(){return{startTime:l,payload:t,status:a,queriesSent:d,queriesPending:h.length,subscribe:v,abort:w}}function y(){a="failed",p.forEach(C=>{C(void 0,u)})}function _(){h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function $(C,O,P){const S=O!=="success";switch(h=h.filter(E=>E!==C),a){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(O==="abort"){u=P,y();return}if(S){u=P,h.length||(r.length?A():y());return}if(f(),_(),!e.random){const E=e.resources.indexOf(C.resource);E!==-1&&E!==e.index&&(e.index=E)}a="completed",p.forEach(E=>{E(P)})}function A(){if(a!=="pending")return;f();const C=r.shift();if(C===void 0){if(h.length){c=setTimeout(()=>{f(),a==="pending"&&(_(),y())},e.timeout);return}y();return}const O={status:"pending",resource:C,callback:(P,S)=>{$(O,P,S)}};h.push(O),d++,c=setTimeout(A,e.rotate),i(C,t,O.callback)}return setTimeout(A),b}function Js(e){const t={...ac,...e};let i=[];function n(){i=i.filter(r=>r().status==="pending")}function o(r,l,a){const d=lc(t,r,l,(u,c)=>{n(),a&&a(u,c)});return i.push(d),d}function s(r){return i.find(l=>r(l))||null}return{query:o,find:s,setIndex:r=>{t.index=r},getIndex:()=>t.index,cleanup:n}}function Dn(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Wi=Object.create(null),mi=["https://api.simplesvg.com","https://api.unisvg.com"],gn=[];for(;mi.length>0;)mi.length===1||Math.random()>.5?gn.push(mi.shift()):gn.push(mi.pop());Wi[""]=Dn({resources:["https://api.iconify.design"].concat(gn)});function To(e,t){const i=Dn(t);return i===null?!1:(Wi[e]=i,!0)}function Gi(e){return Wi[e]}function cc(){return Object.keys(Wi)}function Oo(){}const an=Object.create(null);function dc(e){if(!an[e]){const t=Gi(e);if(!t)return;const i=Js(t),n={config:t,redundancy:i};an[e]=n}return an[e]}function Qs(e,t,i){let n,o;if(typeof e=="string"){const s=fn(e);if(!s)return i(void 0,424),Oo;o=s.send;const r=dc(e);r&&(n=r.redundancy)}else{const s=Dn(e);if(s){n=Js(s);const r=e.resources?e.resources[0]:"",l=fn(r);l&&(o=l.send)}}return!n||!o?(i(void 0,424),Oo):n.query(t,o,i)().abort}const Io="iconify2",Ve="iconify",Zs=Ve+"-count",No=Ve+"-version",Ks=36e5,uc=168,hc=50;function vn(e,t){try{return e.getItem(t)}catch{}}function Fn(e,t,i){try{return e.setItem(t,i),!0}catch{}}function Po(e,t){try{e.removeItem(t)}catch{}}function yn(e,t){return Fn(e,Zs,t.toString())}function _n(e){return parseInt(vn(e,Zs))||0}const Ft={local:!0,session:!0},tr={local:new Set,session:new Set};let Hn=!1;function pc(e){Hn=e}let bi=typeof window>"u"?{}:window;function er(e){const t=e+"Storage";try{if(bi&&bi[t]&&typeof bi[t].length=="number")return bi[t]}catch{}Ft[e]=!1}function ir(e,t){const i=er(e);if(!i)return;const n=vn(i,No);if(n!==Io){if(n){const l=_n(i);for(let a=0;a{const a=Ve+l.toString(),d=vn(i,a);if(typeof d=="string"){try{const u=JSON.parse(d);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,l))return!0}catch{}Po(i,a)}};let r=_n(i);for(let l=r-1;l>=0;l--)s(l)||(l===r-1?(r--,yn(i,r)):tr[e].add(l))}function nr(){if(!Hn){pc(!0);for(const e in Ft)ir(e,t=>{const i=t.data,n=t.provider,o=i.prefix,s=St(n,o);if(!zn(s,i).length)return!1;const r=i.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,r):r,!0})}}function mc(e,t){const i=e.lastModifiedCached;if(i&&i>=t)return i===t;if(e.lastModifiedCached=t,i)for(const n in Ft)ir(n,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function bc(e,t){Hn||nr();function i(n){let o;if(!Ft[n]||!(o=er(n)))return;const s=tr[n];let r;if(s.size)s.delete(r=Array.from(s).shift());else if(r=_n(o),r>=hc||!yn(o,r+1))return;const l={cached:Math.floor(Date.now()/Ks),provider:e.provider,data:t};return Fn(o,Ve+r.toString(),JSON.stringify(l))}t.lastModified&&!mc(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),i("local")||i("session"))}function Mo(){}function fc(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,nc(e)}))}function gc(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:i,prefix:n}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;!o||!(s=fn(i))||s.prepare(i,n,o).forEach(r=>{Qs(i,r,l=>{if(typeof l!="object")r.icons.forEach(a=>{e.missing.add(a)});else try{const a=zn(e,l);if(!a.length)return;const d=e.pendingIcons;d&&a.forEach(u=>{d.delete(u)}),bc(e,l)}catch(a){console.error(a)}fc(e)})})}))}const Bn=(e,t)=>{const i=rc(e,!0,qs()),n=ic(i);if(!n.pending.length){let a=!0;return t&&setTimeout(()=>{a&&t(n.loaded,n.missing,n.pending,Mo)}),()=>{a=!1}}const o=Object.create(null),s=[];let r,l;return n.pending.forEach(a=>{const{provider:d,prefix:u}=a;if(u===l&&d===r)return;r=d,l=u,s.push(St(d,u));const c=o[d]||(o[d]=Object.create(null));c[u]||(c[u]=[])}),n.pending.forEach(a=>{const{provider:d,prefix:u,name:c}=a,h=St(d,u),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(c)||(p.add(c),o[d][u].push(c))}),s.forEach(a=>{const{provider:d,prefix:u}=a;o[d][u].length&&gc(a,o[d][u])}),t?sc(t,n,s):Mo},vc=e=>new Promise((t,i)=>{const n=typeof e=="string"?ii(e,!0):e;if(!n){i(e);return}Bn([n||e],o=>{if(o.length&&n){const s=Ue(n);if(s){t({...ei,...s});return}}i(e)})});function yc(e){try{const t=typeof e=="string"?JSON.parse(e):e;if(typeof t.body=="string")return{...t}}catch{}}function _c(e,t){const i=typeof e=="string"?ii(e,!0,!0):null;if(!i){const s=yc(e);return{value:e,data:s}}const n=Ue(i);if(n!==void 0||!i.prefix)return{value:e,name:i,data:n};const o=Bn([i],()=>t(e,i,Ue(i)));return{value:e,name:i,loading:o}}function ln(e){return e.hasAttribute("inline")}let or=!1;try{or=navigator.vendor.indexOf("Apple")===0}catch{}function wc(e,t){switch(t){case"svg":case"bg":case"mask":return t}return t!=="style"&&(or||e.indexOf("=0;){const o=e.indexOf(">",n),s=e.indexOf("",s);if(r===-1)break;i+=e.slice(o+1,s).trim(),e=e.slice(0,n).trim()+e.slice(r+1)}return{defs:i,content:e}}function Ac(e,t){return e?""+e+""+t:t}function Ec(e,t,i){const n=Cc(e);return Ac(n.defs,t+n.content+i)}const Sc=e=>e==="unset"||e==="undefined"||e==="none";function sr(e,t){const i={...ei,...e},n={...Us,...t},o={left:i.left,top:i.top,width:i.width,height:i.height};let s=i.body;[i,n].forEach(w=>{const v=[],b=w.hFlip,y=w.vFlip;let _=w.rotate;b?y?_+=2:(v.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),v.push("scale(-1 1)"),o.top=o.left=0):y&&(v.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),v.push("scale(1 -1)"),o.top=o.left=0);let $;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:$=o.height/2+o.top,v.unshift("rotate(90 "+$.toString()+" "+$.toString()+")");break;case 2:v.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:$=o.width/2+o.left,v.unshift("rotate(-90 "+$.toString()+" "+$.toString()+")");break}_%2===1&&(o.left!==o.top&&($=o.left,o.left=o.top,o.top=$),o.width!==o.height&&($=o.width,o.width=o.height,o.height=$)),v.length&&(s=Ec(s,'',""))});const r=n.width,l=n.height,a=o.width,d=o.height;let u,c;r===null?(c=l===null?"1em":l==="auto"?d:l,u=wn(c,a/d)):(u=r==="auto"?a:r,c=l===null?wn(u,d/a):l==="auto"?d:l);const h={},p=(w,v)=>{Sc(v)||(h[w]=v.toString())};p("width",u),p("height",c);const f=[o.left,o.top,a,d];return h.viewBox=f.join(" "),{attributes:h,viewBox:f,body:s}}function Un(e,t){let i=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)i+=" "+n+'="'+t[n]+'"';return'"+e+""}function kc(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function Tc(e){return"data:image/svg+xml,"+kc(e)}function rr(e){return'url("'+Tc(e)+'")'}const Oc=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ii=Oc();function Ic(e){Ii=e}function Nc(){return Ii}function Pc(e,t){const i=Gi(e);if(!i)return 0;let n;if(!i.maxURL)n=0;else{let o=0;i.resources.forEach(r=>{o=Math.max(o,r.length)});const s=t+".json?icons=";n=i.maxURL-o-i.path.length-s.length}return n}function Mc(e){return e===404}const Rc=(e,t,i)=>{const n=[],o=Pc(e,t),s="icons";let r={type:s,provider:e,prefix:t,icons:[]},l=0;return i.forEach((a,d)=>{l+=a.length+1,l>=o&&d>0&&(n.push(r),r={type:s,provider:e,prefix:t,icons:[]},l=a.length),r.icons.push(a)}),n.push(r),n};function Lc(e){if(typeof e=="string"){const t=Gi(e);if(t)return t.path}return"/"}const jc=(e,t,i)=>{if(!Ii){i("abort",424);return}let n=Lc(t.provider);switch(t.type){case"icons":{const s=t.prefix,r=t.icons.join(","),l=new URLSearchParams({icons:r});n+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;n+=s.slice(0,1)==="/"?s.slice(1):s;break}default:i("abort",400);return}let o=503;Ii(e+n).then(s=>{const r=s.status;if(r!==200){setTimeout(()=>{i(Mc(r)?"abort":"next",r)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?i("abort",s):i("next",o)});return}setTimeout(()=>{i("success",s)})}).catch(()=>{i("next",o)})},zc={prepare:Rc,send:jc};function Ro(e,t){switch(e){case"local":case"session":Ft[e]=t;break;case"all":for(const i in Ft)Ft[i]=t;break}}const cn="data-style";let ar="";function Dc(e){ar=e}function Lo(e,t){let i=Array.from(e.childNodes).find(n=>n.hasAttribute&&n.hasAttribute(cn));i||(i=document.createElement("style"),i.setAttribute(cn,cn),e.appendChild(i)),i.textContent=":host{display:inline-block;vertical-align:"+(t?"-0.125em":"0")+"}span,svg{display:block}"+ar}function lr(){ko("",zc),qs(!0);let e;try{e=window}catch{}if(e){if(nr(),e.IconifyPreload!==void 0){const t=e.IconifyPreload,i="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!Eo(n))&&console.error(i)}catch{console.error(i)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const i in t){const n="IconifyProviders["+i+"] is invalid.";try{const o=t[i];if(typeof o!="object"||!o||o.resources===void 0)continue;To(i,o)||console.error(n)}catch{console.error(n)}}}}return{enableCache:t=>Ro(t,!0),disableCache:t=>Ro(t,!1),iconLoaded:So,iconExists:So,getIcon:ec,listIcons:tc,addIcon:Ys,addCollection:Eo,calculateSize:wn,buildIcon:sr,iconToHTML:Un,svgToURL:rr,loadIcons:Bn,loadIcon:vc,addAPIProvider:To,appendCustomStyle:Dc,_api:{getAPIConfig:Gi,setAPIModule:ko,sendAPIQuery:Qs,setFetch:Ic,getFetch:Nc,listAPIProviders:cc}}}const $n={"background-color":"currentColor"},cr={"background-color":"transparent"},jo={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},zo={"-webkit-mask":$n,mask:$n,background:cr};for(const e in zo){const t=zo[e];for(const i in jo)t[e+"-"+i]=jo[i]}function Do(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Fc(e,t,i){const n=document.createElement("span");let o=e.body;o.indexOf("");const s=e.attributes,r=Un(o,{...s,width:t.width+"",height:t.height+""}),l=rr(r),a=n.style,d={"--svg":l,width:Do(s.width),height:Do(s.height),...i?$n:cr};for(const u in d)a.setProperty(u,d[u]);return n}let Re;function Hc(){try{Re=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Re=null}}function Bc(e){return Re===void 0&&Hc(),Re?Re.createHTML(e):e}function Uc(e){const t=document.createElement("span"),i=e.attributes;let n="";i.width||(n="width: inherit;"),i.height||(n+="height: inherit;"),n&&(i.style=n);const o=Un(e.body,i);return t.innerHTML=Bc(o),t.firstChild}function xn(e){return Array.from(e.childNodes).find(t=>{const i=t.tagName&&t.tagName.toUpperCase();return i==="SPAN"||i==="SVG"})}function Fo(e,t){const i=t.icon.data,n=t.customisations,o=sr(i,n);n.preserveAspectRatio&&(o.attributes.preserveAspectRatio=n.preserveAspectRatio);const s=t.renderedMode;let r;switch(s){case"svg":r=Uc(o);break;default:r=Fc(o,{...ei,...i},s==="mask")}const l=xn(e);l?r.tagName==="SPAN"&&l.tagName===r.tagName?l.setAttribute("style",r.getAttribute("style")):e.replaceChild(r,l):e.appendChild(r)}function Ho(e,t,i){const n=i&&(i.rendered?i:i.lastRender);return{rendered:!1,inline:t,icon:e,lastRender:n}}function Vc(e="iconify-icon"){let t,i;try{t=window.customElements,i=window.HTMLElement}catch{return}if(!t||!i)return;const n=t.get(e);if(n)return n;const o=["icon","mode","inline","observe","width","height","rotate","flip"],s=class extends i{constructor(){super(),Rt(this,"_shadowRoot"),Rt(this,"_initialised",!1),Rt(this,"_state"),Rt(this,"_checkQueued",!1),Rt(this,"_connected",!1),Rt(this,"_observer",null),Rt(this,"_visible",!0);const l=this._shadowRoot=this.attachShadow({mode:"open"}),a=ln(this);Lo(l,a),this._state=Ho({value:""},a),this._queueCheck()}connectedCallback(){this._connected=!0,this.startObserver()}disconnectedCallback(){this._connected=!1,this.stopObserver()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(l){switch(l){case"inline":{const a=ln(this),d=this._state;a!==d.inline&&(d.inline=a,Lo(this._shadowRoot,a));break}case"observer":{this.observer?this.startObserver():this.stopObserver();break}default:this._queueCheck()}}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return ln(this)}set inline(l){l?this.setAttribute("inline","true"):this.removeAttribute("inline")}get observer(){return this.hasAttribute("observer")}set observer(l){l?this.setAttribute("observer","true"):this.removeAttribute("observer")}restartAnimation(){const l=this._state;if(l.rendered){const a=this._shadowRoot;if(l.renderedMode==="svg")try{a.lastChild.setCurrentTime(0);return}catch{}Fo(a,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,a=this.getAttribute("icon");if(a!==l.icon.value){this._iconChanged(a);return}if(!l.rendered||!this._visible)return;const d=this.getAttribute("mode"),u=Co(this);(l.attrMode!==d||ql(l.customisations,u)||!xn(this._shadowRoot))&&this._renderIcon(l.icon,u,d)}_iconChanged(l){const a=_c(l,(d,u,c)=>{const h=this._state;if(h.rendered||this.getAttribute("icon")!==d)return;const p={value:d,name:u,data:c};p.data?this._gotIconData(p):h.icon=p});a.data?this._gotIconData(a):this._state=Ho(a,this._state.inline,this._state)}_forceRender(){if(!this._visible){const l=xn(this._shadowRoot);l&&this._shadowRoot.removeChild(l);return}this._queueCheck()}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,Co(this),this.getAttribute("mode"))}_renderIcon(l,a,d){const u=wc(l.data.body,d),c=this._state.inline;Fo(this._shadowRoot,this._state={rendered:!0,icon:l,inline:c,customisations:a,attrMode:d,renderedMode:u})}startObserver(){if(!this._observer)try{this._observer=new IntersectionObserver(l=>{const a=l.some(d=>d.isIntersecting);a!==this._visible&&(this._visible=a,this._forceRender())}),this._observer.observe(this)}catch{if(this._observer){try{this._observer.disconnect()}catch{}this._observer=null}}}stopObserver(){this._observer&&(this._observer.disconnect(),this._observer=null,this._visible=!0,this._connected&&this._forceRender())}};o.forEach(l=>{l in s.prototype||Object.defineProperty(s.prototype,l,{get:function(){return this.getAttribute(l)},set:function(a){a!==null?this.setAttribute(l,a):this.removeAttribute(l)}})});const r=lr();for(const l in r)s[l]=s.prototype[l]=r[l];return t.define(e,s),s}Vc()||lr();const Wc=I` ::-webkit-scrollbar { width: 0.4rem; height: 0.4rem; @@ -64,7 +68,7 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as ::-webkit-scrollbar-track { background-color: var(--bim-scrollbar--bgc, var(--bim-ui_bg-base)); } -`,Lc=T` +`,Gc=I` :root { /* Grayscale Colors */ --bim-ui_gray-0: hsl(210 10% 5%); @@ -159,7 +163,7 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as [data-context-dialog]::backdrop { background-color: transparent; } -`,kt={scrollbar:Rc,globalStyles:Lc},tr=class k{static set config(t){this._config={...k._config,...t}}static get config(){return k._config}static addGlobalStyles(){let t=document.querySelector("style[id='bim-ui']");if(t)return;t=document.createElement("style"),t.id="bim-ui",t.textContent=kt.globalStyles.cssText;const i=document.head.firstChild;i?document.head.insertBefore(t,i):document.head.append(t)}static defineCustomElement(t,i){customElements.get(t)||customElements.define(t,i)}static registerComponents(){k.init()}static init(){k.addGlobalStyles(),k.defineCustomElement("bim-button",Bc),k.defineCustomElement("bim-checkbox",ue),k.defineCustomElement("bim-color-input",Wt),k.defineCustomElement("bim-context-menu",$n),k.defineCustomElement("bim-dropdown",gt),k.defineCustomElement("bim-grid",Bn),k.defineCustomElement("bim-icon",Jc),k.defineCustomElement("bim-input",Ke),k.defineCustomElement("bim-label",pe),k.defineCustomElement("bim-number-input",K),k.defineCustomElement("bim-option",H),k.defineCustomElement("bim-panel",qt),k.defineCustomElement("bim-panel-section",me),k.defineCustomElement("bim-selector",be),k.defineCustomElement("bim-table",st),k.defineCustomElement("bim-tabs",It),k.defineCustomElement("bim-tab",X),k.defineCustomElement("bim-table-cell",br),k.defineCustomElement("bim-table-children",gr),k.defineCustomElement("bim-table-group",yr),k.defineCustomElement("bim-table-row",Gt),k.defineCustomElement("bim-text-input",rt),k.defineCustomElement("bim-toolbar",Xi),k.defineCustomElement("bim-toolbar-group",Gi),k.defineCustomElement("bim-toolbar-section",ve),k.defineCustomElement("bim-viewport",Or)}static newRandomId(){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let i="";for(let n=0;n<10;n++){const o=Math.floor(Math.random()*t.length);i+=t.charAt(o)}return i}};tr._config={sectionLabelOnVerticalToolbar:!1};let Z=tr;class z extends I{constructor(){super(...arguments),this._lazyLoadObserver=null,this._visibleElements=[],this.ELEMENTS_BEFORE_OBSERVER=20,this.useObserver=!1,this.elements=new Set,this.observe=t=>{if(!this.useObserver)return;for(const n of t)this.elements.add(n);const i=t.slice(this.ELEMENTS_BEFORE_OBSERVER);for(const n of i)n.remove();this.observeLastElement()}}set visibleElements(t){this._visibleElements=this.useObserver?t:[],this.requestUpdate()}get visibleElements(){return this._visibleElements}getLazyObserver(){if(!this.useObserver)return null;if(this._lazyLoadObserver)return this._lazyLoadObserver;const t=new IntersectionObserver(i=>{const n=i[0];if(!n.isIntersecting)return;const o=n.target;t.unobserve(o);const s=this.ELEMENTS_BEFORE_OBSERVER+this.visibleElements.length,r=[...this.elements][s];r&&(this.visibleElements=[...this.visibleElements,r],t.observe(r))},{threshold:.5});return t}observeLastElement(){const t=this.getLazyObserver();if(!t)return;const i=this.ELEMENTS_BEFORE_OBSERVER+this.visibleElements.length-1,n=[...this.elements][i];n&&t.observe(n)}resetVisibleElements(){const t=this.getLazyObserver();if(t){for(const i of this.elements)t.unobserve(i);this.visibleElements=[],this.observeLastElement()}}static create(t,i){const n=document.createDocumentFragment();if(t.length===0)return Pe(t(),n),n.firstElementChild;if(!i)throw new Error("UIComponent: Initial state is required for statefull components.");let o=i;const s=t,r=a=>(o={...o,...a},Pe(s(o,r),n),o);r(i);const l=()=>o;return[n.firstElementChild,r,l]}}const He=(e,t={},i=!0)=>{let n={};for(const o of e.children){const s=o,r=s.getAttribute("name")||s.getAttribute("label"),l=t[r];if(r){if("value"in s&&typeof s.value<"u"&&s.value!==null){const a=s.value;if(typeof a=="object"&&!Array.isArray(a)&&Object.keys(a).length===0)continue;n[r]=l?l(s.value):s.value}else if(i){const a=He(s,t);if(Object.keys(a).length===0)continue;n[r]=l?l(a):a}}else i&&(n={...n,...He(s,t)})}return n},Vi=e=>e==="true"||e==="false"?e==="true":e&&!isNaN(Number(e))&&e.trim()!==""?Number(e):e,jc=[">=","<=","=",">","<","?","/","#"];function Po(e){const t=jc.find(r=>e.split(r).length===2),i=e.split(t).map(r=>r.trim()),[n,o]=i,s=o.startsWith("'")&&o.endsWith("'")?o.replace(/'/g,""):Vi(o);return{key:n,condition:t,value:s}}const xn=e=>{try{const t=[],i=e.split(/&(?![^()]*\))/).map(n=>n.trim());for(const n of i){const o=!n.startsWith("(")&&!n.endsWith(")"),s=n.startsWith("(")&&n.endsWith(")");if(o){const r=Po(n);t.push(r)}if(s){const r={operator:"&",queries:n.replace(/^(\()|(\))$/g,"").split("&").map(l=>l.trim()).map((l,a)=>{const d=Po(l);return a>0&&(d.operator="&"),d})};t.push(r)}}return t}catch{return null}},Ro=(e,t,i)=>{let n=!1;switch(t){case"=":n=e===i;break;case"?":n=String(e).includes(String(i));break;case"<":(typeof e=="number"||typeof i=="number")&&(n=e":(typeof e=="number"||typeof i=="number")&&(n=e>i);break;case">=":(typeof e=="number"||typeof i=="number")&&(n=e>=i);break;case"/":n=String(e).startsWith(String(i));break}return n};var zc=Object.defineProperty,Dc=Object.getOwnPropertyDescriptor,er=(e,t,i,n)=>{for(var o=Dc(t,i),s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&zc(t,i,o),o},F;const Hn=(F=class extends I{constructor(){super(...arguments),this._previousContainer=null,this._visible=!1}get placement(){return this._placement}set placement(e){this._placement=e,this.updatePosition()}static removeMenus(){for(const e of F.menus)e instanceof F&&(e.visible=!1);F.dialog.close(),F.dialog.remove()}get visible(){return this._visible}set visible(e){var t;this._visible=e,e?(F.dialog.parentElement||document.body.append(F.dialog),this._previousContainer=this.parentElement,F.dialog.style.top=`${window.scrollY||document.documentElement.scrollTop}px`,F.dialog.append(this),F.dialog.showModal(),this.updatePosition(),this.dispatchEvent(new Event("visible"))):((t=this._previousContainer)==null||t.append(this),this._previousContainer=null,this.dispatchEvent(new Event("hidden")))}async updatePosition(){if(!(this.visible&&this._previousContainer))return;const e=this.placement??"right",t=await xs(this._previousContainer,this,{placement:e,middleware:[cs(10),ws(),_s(),ys({padding:5})]}),{x:i,y:n}=t;this.style.left=`${i}px`,this.style.top=`${n}px`}connectedCallback(){super.connectedCallback(),F.menus.push(this)}render(){return m` `}},F.styles=[kt.scrollbar,T` +`,Tt={scrollbar:Wc,globalStyles:Gc},dr=class k{static set config(t){this._config={...k._config,...t}}static get config(){return k._config}static addGlobalStyles(){let t=document.querySelector("style[id='bim-ui']");if(t)return;t=document.createElement("style"),t.id="bim-ui",t.textContent=Tt.globalStyles.cssText;const i=document.head.firstChild;i?document.head.insertBefore(t,i):document.head.append(t)}static defineCustomElement(t,i){customElements.get(t)||customElements.define(t,i)}static registerComponents(){k.init()}static init(){k.addGlobalStyles(),k.defineCustomElement("bim-button",Zc),k.defineCustomElement("bim-checkbox",ge),k.defineCustomElement("bim-color-input",Yt),k.defineCustomElement("bim-context-menu",An),k.defineCustomElement("bim-dropdown",vt),k.defineCustomElement("bim-grid",Wn),k.defineCustomElement("bim-icon",rd),k.defineCustomElement("bim-input",oi),k.defineCustomElement("bim-label",ye),k.defineCustomElement("bim-number-input",K),k.defineCustomElement("bim-option",H),k.defineCustomElement("bim-panel",Xt),k.defineCustomElement("bim-panel-section",_e),k.defineCustomElement("bim-selector",we),k.defineCustomElement("bim-table",st),k.defineCustomElement("bim-tabs",Nt),k.defineCustomElement("bim-tab",X),k.defineCustomElement("bim-table-cell",Ar),k.defineCustomElement("bim-table-children",Sr),k.defineCustomElement("bim-table-group",Tr),k.defineCustomElement("bim-table-row",Jt),k.defineCustomElement("bim-text-input",rt),k.defineCustomElement("bim-toolbar",Zi),k.defineCustomElement("bim-toolbar-group",Ji),k.defineCustomElement("bim-toolbar-section",Ce),k.defineCustomElement("bim-viewport",Fr)}static newRandomId(){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let i="";for(let n=0;n<10;n++){const o=Math.floor(Math.random()*t.length);i+=t.charAt(o)}return i}};dr._config={sectionLabelOnVerticalToolbar:!1};let Z=dr;class z extends T{constructor(){super(...arguments),this._lazyLoadObserver=null,this._visibleElements=[],this.ELEMENTS_BEFORE_OBSERVER=20,this.useObserver=!1,this.elements=new Set,this.observe=t=>{if(!this.useObserver)return;for(const n of t)this.elements.add(n);const i=t.slice(this.ELEMENTS_BEFORE_OBSERVER);for(const n of i)n.remove();this.observeLastElement()}}set visibleElements(t){this._visibleElements=this.useObserver?t:[],this.requestUpdate()}get visibleElements(){return this._visibleElements}getLazyObserver(){if(!this.useObserver)return null;if(this._lazyLoadObserver)return this._lazyLoadObserver;const t=new IntersectionObserver(i=>{const n=i[0];if(!n.isIntersecting)return;const o=n.target;t.unobserve(o);const s=this.ELEMENTS_BEFORE_OBSERVER+this.visibleElements.length,r=[...this.elements][s];r&&(this.visibleElements=[...this.visibleElements,r],t.observe(r))},{threshold:.5});return t}observeLastElement(){const t=this.getLazyObserver();if(!t)return;const i=this.ELEMENTS_BEFORE_OBSERVER+this.visibleElements.length-1,n=[...this.elements][i];n&&t.observe(n)}resetVisibleElements(){const t=this.getLazyObserver();if(t){for(const i of this.elements)t.unobserve(i);this.visibleElements=[],this.observeLastElement()}}static create(t,i){const n=document.createDocumentFragment();if(t.length===0)return ce(t(),n),n.firstElementChild;if(!i)throw new Error("UIComponent: Initial state is required for statefull components.");let o=i;const s=t,r=a=>(o={...o,...a},ce(s(o,r),n),o);r(i);const l=()=>o;return[n.firstElementChild,r,l]}}const We=(e,t={},i=!0)=>{let n={};for(const o of e.children){const s=o,r=s.getAttribute("name")||s.getAttribute("label"),l=t[r];if(r){if("value"in s&&typeof s.value<"u"&&s.value!==null){const a=s.value;if(typeof a=="object"&&!Array.isArray(a)&&Object.keys(a).length===0)continue;n[r]=l?l(s.value):s.value}else if(i){const a=We(s,t);if(Object.keys(a).length===0)continue;n[r]=l?l(a):a}}else i&&(n={...n,...We(s,t)})}return n},qi=e=>e==="true"||e==="false"?e==="true":e&&!isNaN(Number(e))&&e.trim()!==""?Number(e):e,qc=[">=","<=","=",">","<","?","/","#"];function Bo(e){const t=qc.find(r=>e.split(r).length===2),i=e.split(t).map(r=>r.trim()),[n,o]=i,s=o.startsWith("'")&&o.endsWith("'")?o.replace(/'/g,""):qi(o);return{key:n,condition:t,value:s}}const Cn=e=>{try{const t=[],i=e.split(/&(?![^()]*\))/).map(n=>n.trim());for(const n of i){const o=!n.startsWith("(")&&!n.endsWith(")"),s=n.startsWith("(")&&n.endsWith(")");if(o){const r=Bo(n);t.push(r)}if(s){const r={operator:"&",queries:n.replace(/^(\()|(\))$/g,"").split("&").map(l=>l.trim()).map((l,a)=>{const d=Bo(l);return a>0&&(d.operator="&"),d})};t.push(r)}}return t}catch{return null}},Uo=(e,t,i)=>{let n=!1;switch(t){case"=":n=e===i;break;case"?":n=String(e).includes(String(i));break;case"<":(typeof e=="number"||typeof i=="number")&&(n=e":(typeof e=="number"||typeof i=="number")&&(n=e>i);break;case">=":(typeof e=="number"||typeof i=="number")&&(n=e>=i);break;case"/":n=String(e).startsWith(String(i));break}return n};var Yc=Object.defineProperty,Xc=Object.getOwnPropertyDescriptor,ur=(e,t,i,n)=>{for(var o=Xc(t,i),s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&Yc(t,i,o),o},F;const Vn=(F=class extends T{constructor(){super(...arguments),this._previousContainer=null,this._visible=!1}get placement(){return this._placement}set placement(e){this._placement=e,this.updatePosition()}static removeMenus(){for(const e of F.menus)e instanceof F&&(e.visible=!1);F.dialog.close(),F.dialog.remove()}get visible(){return this._visible}set visible(e){var t;this._visible=e,e?(F.dialog.parentElement||document.body.append(F.dialog),this._previousContainer=this.parentElement,F.dialog.style.top=`${window.scrollY||document.documentElement.scrollTop}px`,F.dialog.append(this),F.dialog.showModal(),this.updatePosition(),this.dispatchEvent(new Event("visible"))):((t=this._previousContainer)==null||t.append(this),this._previousContainer=null,this.dispatchEvent(new Event("hidden")))}async updatePosition(){if(!(this.visible&&this._previousContainer))return;const e=this.placement??"right",t=await Ns(this._previousContainer,this,{placement:e,middleware:[ys(10),Is(),Os(),Ts({padding:5})]}),{x:i,y:n}=t;this.style.left=`${i}px`,this.style.top=`${n}px`}connectedCallback(){super.connectedCallback(),F.menus.push(this)}render(){return m` `}},F.styles=[Tt.scrollbar,I` :host { pointer-events: auto; position: absolute; @@ -198,8 +202,8 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as overflow: visible; background-color: transparent; " - >`),F.menus=[],F);er([g({type:String,reflect:!0})],Hn.prototype,"placement");er([g({type:Boolean,reflect:!0})],Hn.prototype,"visible");let $n=Hn;var Fc=Object.defineProperty,Hc=Object.getOwnPropertyDescriptor,lt=(e,t,i,n)=>{for(var o=n>1?void 0:n?Hc(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&Fc(t,i,o),o},Ce;const nt=(Ce=class extends I{constructor(){super(),this.labelHidden=!1,this.active=!1,this.disabled=!1,this.vertical=!1,this.tooltipVisible=!1,this._stateBeforeLoading={disabled:!1,icon:""},this._loading=!1,this._parent=se(),this._tooltip=se(),this._mouseLeave=!1,this.onClick=e=>{e.stopPropagation(),this.disabled||this.dispatchEvent(new Event("click"))},this.showContextMenu=()=>{const e=this._contextMenu;if(e){const t=this.getAttribute("data-context-group");t&&e.setAttribute("data-context-group",t),this.closeNestedContexts();const i=Z.newRandomId();for(const n of e.children)n instanceof Ce&&n.setAttribute("data-context-group",i);e.visible=!0}},this.mouseLeave=!0}set loading(e){if(this._loading=e,e)this._stateBeforeLoading={disabled:this.disabled,icon:this.icon},this.disabled=e,this.icon="eos-icons:loading";else{const{disabled:t,icon:i}=this._stateBeforeLoading;this.disabled=t,this.icon=i}}get loading(){return this._loading}set mouseLeave(e){this._mouseLeave=e,e&&(this.tooltipVisible=!1,clearTimeout(this.timeoutID))}get mouseLeave(){return this._mouseLeave}computeTooltipPosition(){const{value:e}=this._parent,{value:t}=this._tooltip;e&&t&&xs(e,t,{placement:"bottom",middleware:[cs(10),ws(),_s(),ys({padding:5})]}).then(i=>{const{x:n,y:o}=i;Object.assign(t.style,{left:`${n}px`,top:`${o}px`})})}onMouseEnter(){if(!(this.tooltipTitle||this.tooltipText))return;this.mouseLeave=!1;const e=this.tooltipTime??700;this.timeoutID=setTimeout(()=>{this.mouseLeave||(this.computeTooltipPosition(),this.tooltipVisible=!0)},e)}closeNestedContexts(){const e=this.getAttribute("data-context-group");if(e)for(const t of $n.dialog.children){const i=t.getAttribute("data-context-group");if(t instanceof $n&&i===e){t.visible=!1,t.removeAttribute("data-context-group");for(const n of t.children)n instanceof Ce&&(n.closeNestedContexts(),n.removeAttribute("data-context-group"))}}}click(){this.disabled||super.click()}get _contextMenu(){return this.querySelector("bim-context-menu")}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.showContextMenu)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.showContextMenu)}render(){const e=m` -
+ >`),F.menus=[],F);ur([g({type:String,reflect:!0})],Vn.prototype,"placement");ur([g({type:Boolean,reflect:!0})],Vn.prototype,"visible");let An=Vn;var Jc=Object.defineProperty,Qc=Object.getOwnPropertyDescriptor,lt=(e,t,i,n)=>{for(var o=n>1?void 0:n?Qc(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&Jc(t,i,o),o},Te;const nt=(Te=class extends T{constructor(){super(),this.labelHidden=!1,this.active=!1,this.disabled=!1,this.vertical=!1,this.tooltipVisible=!1,this._stateBeforeLoading={disabled:!1,icon:""},this._loading=!1,this._parent=de(),this._tooltip=de(),this._mouseLeave=!1,this.onClick=e=>{e.stopPropagation(),this.disabled||this.dispatchEvent(new Event("click"))},this.showContextMenu=()=>{const e=this._contextMenu;if(e){const t=this.getAttribute("data-context-group");t&&e.setAttribute("data-context-group",t),this.closeNestedContexts();const i=Z.newRandomId();for(const n of e.children)n instanceof Te&&n.setAttribute("data-context-group",i);e.visible=!0}},this.mouseLeave=!0}set loading(e){if(this._loading=e,e)this._stateBeforeLoading={disabled:this.disabled,icon:this.icon},this.disabled=e,this.icon="eos-icons:loading";else{const{disabled:t,icon:i}=this._stateBeforeLoading;this.disabled=t,this.icon=i}}get loading(){return this._loading}set mouseLeave(e){this._mouseLeave=e,e&&(this.tooltipVisible=!1,clearTimeout(this.timeoutID))}get mouseLeave(){return this._mouseLeave}computeTooltipPosition(){const{value:e}=this._parent,{value:t}=this._tooltip;e&&t&&Ns(e,t,{placement:"bottom",middleware:[ys(10),Is(),Os(),Ts({padding:5})]}).then(i=>{const{x:n,y:o}=i;Object.assign(t.style,{left:`${n}px`,top:`${o}px`})})}onMouseEnter(){if(!(this.tooltipTitle||this.tooltipText))return;this.mouseLeave=!1;const e=this.tooltipTime??700;this.timeoutID=setTimeout(()=>{this.mouseLeave||(this.computeTooltipPosition(),this.tooltipVisible=!0)},e)}closeNestedContexts(){const e=this.getAttribute("data-context-group");if(e)for(const t of An.dialog.children){const i=t.getAttribute("data-context-group");if(t instanceof An&&i===e){t.visible=!1,t.removeAttribute("data-context-group");for(const n of t.children)n instanceof Te&&(n.closeNestedContexts(),n.removeAttribute("data-context-group"))}}}click(){this.disabled||super.click()}get _contextMenu(){return this.querySelector("bim-context-menu")}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.showContextMenu)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.showContextMenu)}render(){const e=m` +
${this.tooltipTitle?m`

${this.tooltipTitle}

`:null} @@ -215,7 +219,7 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as `;return m` -
+
${this.label||this.icon?m`
- `}},Ce.styles=T` + `}},Te.styles=I` :host { --bim-label--c: var(--bim-ui_bg-contrast-100, white); display: block; @@ -344,7 +348,7 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as :host(:not([tooltip-visible])) .tooltip { display: none; } - `,Ce);lt([g({type:String,reflect:!0})],nt.prototype,"label",2);lt([g({type:Boolean,attribute:"label-hidden",reflect:!0})],nt.prototype,"labelHidden",2);lt([g({type:Boolean,reflect:!0})],nt.prototype,"active",2);lt([g({type:Boolean,reflect:!0,attribute:"disabled"})],nt.prototype,"disabled",2);lt([g({type:String,reflect:!0})],nt.prototype,"icon",2);lt([g({type:Boolean,reflect:!0})],nt.prototype,"vertical",2);lt([g({type:Number,attribute:"tooltip-time",reflect:!0})],nt.prototype,"tooltipTime",2);lt([g({type:Boolean,attribute:"tooltip-visible",reflect:!0})],nt.prototype,"tooltipVisible",2);lt([g({type:String,attribute:"tooltip-title",reflect:!0})],nt.prototype,"tooltipTitle",2);lt([g({type:String,attribute:"tooltip-text",reflect:!0})],nt.prototype,"tooltipText",2);lt([g({type:Boolean,reflect:!0})],nt.prototype,"loading",1);let Bc=nt;var Uc=Object.defineProperty,Ze=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&Uc(t,i,o),o};const ir=class extends I{constructor(){super(...arguments),this.checked=!1,this.inverted=!1,this.onValueChange=new Event("change")}get value(){return this.checked}onChange(e){e.stopPropagation(),this.checked=e.target.checked,this.dispatchEvent(this.onValueChange)}render(){return m` + `,Te);lt([g({type:String,reflect:!0})],nt.prototype,"label",2);lt([g({type:Boolean,attribute:"label-hidden",reflect:!0})],nt.prototype,"labelHidden",2);lt([g({type:Boolean,reflect:!0})],nt.prototype,"active",2);lt([g({type:Boolean,reflect:!0,attribute:"disabled"})],nt.prototype,"disabled",2);lt([g({type:String,reflect:!0})],nt.prototype,"icon",2);lt([g({type:Boolean,reflect:!0})],nt.prototype,"vertical",2);lt([g({type:Number,attribute:"tooltip-time",reflect:!0})],nt.prototype,"tooltipTime",2);lt([g({type:Boolean,attribute:"tooltip-visible",reflect:!0})],nt.prototype,"tooltipVisible",2);lt([g({type:String,attribute:"tooltip-title",reflect:!0})],nt.prototype,"tooltipTitle",2);lt([g({type:String,attribute:"tooltip-text",reflect:!0})],nt.prototype,"tooltipText",2);lt([g({type:Boolean,reflect:!0})],nt.prototype,"loading",1);let Zc=nt;var Kc=Object.defineProperty,ni=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&Kc(t,i,o),o};const hr=class extends T{constructor(){super(...arguments),this.checked=!1,this.inverted=!1,this.onValueChange=new Event("change")}get value(){return this.checked}onChange(e){e.stopPropagation(),this.checked=e.target.checked,this.dispatchEvent(this.onValueChange)}render(){return m`
${this.label?m`${this.label} `:null}
- `}};ir.styles=T` + `}};hr.styles=I` :host { display: block; } @@ -388,7 +392,7 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as outline: var(--bim-checkbox--olw, 2px) solid var(--bim-checkbox--olc, var(--bim-ui_accent-base)); } - `;let ue=ir;Ze([g({type:String,reflect:!0})],ue.prototype,"icon");Ze([g({type:String,reflect:!0})],ue.prototype,"name");Ze([g({type:String,reflect:!0})],ue.prototype,"label");Ze([g({type:Boolean,reflect:!0})],ue.prototype,"checked");Ze([g({type:Boolean,reflect:!0})],ue.prototype,"inverted");var Vc=Object.defineProperty,he=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&Vc(t,i,o),o};const nr=class extends I{constructor(){super(...arguments),this.vertical=!1,this.color="#bcf124",this._colorInput=se(),this._textInput=se(),this.onValueChange=new Event("input"),this.onOpacityInput=e=>{const t=e.target;this.opacity=t.value,this.dispatchEvent(this.onValueChange)}}set value(e){const{color:t,opacity:i}=e;this.color=t,i&&(this.opacity=i)}get value(){const e={color:this.color};return this.opacity&&(e.opacity=this.opacity),e}onColorInput(e){e.stopPropagation();const{value:t}=this._colorInput;t&&(this.color=t.value,this.dispatchEvent(this.onValueChange))}onTextInput(e){e.stopPropagation();const{value:t}=this._textInput;if(!t)return;const{value:i}=t;let n=i.replace(/[^a-fA-F0-9]/g,"");n.startsWith("#")||(n=`#${n}`),t.value=n.slice(0,7),t.value.length===7&&(this.color=t.value,this.dispatchEvent(this.onValueChange))}focus(){const{value:e}=this._colorInput;e&&e.click()}render(){return m` + `;let ge=hr;ni([g({type:String,reflect:!0})],ge.prototype,"icon");ni([g({type:String,reflect:!0})],ge.prototype,"name");ni([g({type:String,reflect:!0})],ge.prototype,"label");ni([g({type:Boolean,reflect:!0})],ge.prototype,"checked");ni([g({type:Boolean,reflect:!0})],ge.prototype,"inverted");var td=Object.defineProperty,ve=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&td(t,i,o),o};const pr=class extends T{constructor(){super(...arguments),this.vertical=!1,this.color="#bcf124",this._colorInput=de(),this._textInput=de(),this.onValueChange=new Event("input"),this.onOpacityInput=e=>{const t=e.target;this.opacity=t.value,this.dispatchEvent(this.onValueChange)}}set value(e){const{color:t,opacity:i}=e;this.color=t,i&&(this.opacity=i)}get value(){const e={color:this.color};return this.opacity&&(e.opacity=this.opacity),e}onColorInput(e){e.stopPropagation();const{value:t}=this._colorInput;t&&(this.color=t.value,this.dispatchEvent(this.onValueChange))}onTextInput(e){e.stopPropagation();const{value:t}=this._textInput;if(!t)return;const{value:i}=t;let n=i.replace(/[^a-fA-F0-9]/g,"");n.startsWith("#")||(n=`#${n}`),t.value=n.slice(0,7),t.value.length===7&&(this.color=t.value,this.dispatchEvent(this.onValueChange))}focus(){const{value:e}=this._colorInput;e&&e.click()}render(){return m`
- `}};nr.styles=T` + `}};pr.styles=I` :host { --bim-input--bgc: var(--bim-ui_bg-contrast-20); flex: 1; @@ -490,7 +494,7 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as bim-number-input { flex-grow: 0; } - `;let Wt=nr;he([g({type:String,reflect:!0})],Wt.prototype,"name");he([g({type:String,reflect:!0})],Wt.prototype,"label");he([g({type:String,reflect:!0})],Wt.prototype,"icon");he([g({type:Boolean,reflect:!0})],Wt.prototype,"vertical");he([g({type:Number,reflect:!0})],Wt.prototype,"opacity");he([g({type:String,reflect:!0})],Wt.prototype,"color");var Wc=Object.defineProperty,qc=Object.getOwnPropertyDescriptor,Tt=(e,t,i,n)=>{for(var o=n>1?void 0:n?qc(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&Wc(t,i,o),o};const or=class extends I{constructor(){super(...arguments),this.checked=!1,this.checkbox=!1,this.noMark=!1,this.vertical=!1}get value(){return this._value!==void 0?this._value:this.label?Vi(this.label):this.label}set value(e){this._value=e}render(){return m` + `;let Yt=pr;ve([g({type:String,reflect:!0})],Yt.prototype,"name");ve([g({type:String,reflect:!0})],Yt.prototype,"label");ve([g({type:String,reflect:!0})],Yt.prototype,"icon");ve([g({type:Boolean,reflect:!0})],Yt.prototype,"vertical");ve([g({type:Number,reflect:!0})],Yt.prototype,"opacity");ve([g({type:String,reflect:!0})],Yt.prototype,"color");var ed=Object.defineProperty,id=Object.getOwnPropertyDescriptor,Ot=(e,t,i,n)=>{for(var o=n>1?void 0:n?id(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&ed(t,i,o),o};const mr=class extends T{constructor(){super(...arguments),this.checked=!1,this.checkbox=!1,this.noMark=!1,this.vertical=!1}get value(){return this._value!==void 0?this._value:this.label?qi(this.label):this.label}set value(e){this._value=e}render(){return m`
${this.img||this.icon||this.label?m`
${this.checkbox&&!this.noMark?m``:null}
- `}};or.styles=T` + `}};mr.styles=I` :host { --bim-label--c: var(--bim-ui_bg-contrast-100); display: block; @@ -571,7 +575,7 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as bim-label { pointer-events: none; } - `;let H=or;Tt([g({type:String,reflect:!0})],H.prototype,"img",2);Tt([g({type:String,reflect:!0})],H.prototype,"label",2);Tt([g({type:String,reflect:!0})],H.prototype,"icon",2);Tt([g({type:Boolean,reflect:!0})],H.prototype,"checked",2);Tt([g({type:Boolean,reflect:!0})],H.prototype,"checkbox",2);Tt([g({type:Boolean,attribute:"no-mark",reflect:!0})],H.prototype,"noMark",2);Tt([g({converter:{fromAttribute(e){return e&&Vi(e)}}})],H.prototype,"value",1);Tt([g({type:Boolean,reflect:!0})],H.prototype,"vertical",2);var Gc=Object.defineProperty,Yc=Object.getOwnPropertyDescriptor,Ot=(e,t,i,n)=>{for(var o=n>1?void 0:n?Yc(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&Gc(t,i,o),o};const sr=class extends z{constructor(){super(),this.multiple=!1,this.required=!1,this.vertical=!1,this._visible=!1,this._value=new Set,this.onValueChange=new Event("change"),this._contextMenu=se(),this.onOptionClick=e=>{const t=e.target,i=this._value.has(t);if(!this.multiple&&!this.required&&!i)this._value=new Set([t]);else if(!this.multiple&&!this.required&&i)this._value=new Set([]);else if(!this.multiple&&this.required&&!i)this._value=new Set([t]);else if(this.multiple&&!this.required&&!i)this._value=new Set([...this._value,t]);else if(this.multiple&&!this.required&&i){const n=[...this._value].filter(o=>o!==t);this._value=new Set(n)}else if(this.multiple&&this.required&&!i)this._value=new Set([...this._value,t]);else if(this.multiple&&this.required&&i){const n=[...this._value].filter(s=>s!==t),o=new Set(n);o.size!==0&&(this._value=o)}this.updateOptionsState(),this.dispatchEvent(this.onValueChange)},this.useObserver=!0}set visible(e){if(e){const{value:t}=this._contextMenu;if(!t)return;for(const i of this.elements)t.append(i);this._visible=!0}else{for(const t of this.elements)this.append(t);this._visible=!1,this.resetVisibleElements()}}get visible(){return this._visible}set value(e){if(this.required&&Object.keys(e).length===0)return;const t=new Set;for(const i of e){const n=this.findOption(i);if(n&&(t.add(n),!this.multiple&&Object.keys(e).length===1))break}this._value=t,this.updateOptionsState(),this.dispatchEvent(this.onValueChange)}get value(){return[...this._value].filter(e=>e instanceof H&&e.checked).map(e=>e.value)}get _options(){const e=new Set([...this.elements]);for(const t of this.children)t instanceof H&&e.add(t);return[...e]}onSlotChange(e){const t=e.target.assignedElements();this.observe(t);const i=new Set;for(const n of this.elements){if(!(n instanceof H)){n.remove();continue}n.checked&&i.add(n),n.removeEventListener("click",this.onOptionClick),n.addEventListener("click",this.onOptionClick)}this._value=i}updateOptionsState(){for(const e of this._options)e instanceof H&&(e.checked=this._value.has(e))}findOption(e){return this._options.find(t=>t instanceof H?t.label===e||t.value===e:!1)}render(){let e,t,i;if(this._value.size===0)e="Select an option...";else if(this._value.size===1){const n=[...this._value][0];e=(n==null?void 0:n.label)||(n==null?void 0:n.value),t=n==null?void 0:n.img,i=n==null?void 0:n.icon}else e=`Multiple (${this._value.size})`;return m` + `;let H=mr;Ot([g({type:String,reflect:!0})],H.prototype,"img",2);Ot([g({type:String,reflect:!0})],H.prototype,"label",2);Ot([g({type:String,reflect:!0})],H.prototype,"icon",2);Ot([g({type:Boolean,reflect:!0})],H.prototype,"checked",2);Ot([g({type:Boolean,reflect:!0})],H.prototype,"checkbox",2);Ot([g({type:Boolean,attribute:"no-mark",reflect:!0})],H.prototype,"noMark",2);Ot([g({converter:{fromAttribute(e){return e&&qi(e)}}})],H.prototype,"value",1);Ot([g({type:Boolean,reflect:!0})],H.prototype,"vertical",2);var nd=Object.defineProperty,od=Object.getOwnPropertyDescriptor,It=(e,t,i,n)=>{for(var o=n>1?void 0:n?od(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&nd(t,i,o),o};const br=class extends z{constructor(){super(),this.multiple=!1,this.required=!1,this.vertical=!1,this._visible=!1,this._value=new Set,this.onValueChange=new Event("change"),this._contextMenu=de(),this.onOptionClick=e=>{const t=e.target,i=this._value.has(t);if(!this.multiple&&!this.required&&!i)this._value=new Set([t]);else if(!this.multiple&&!this.required&&i)this._value=new Set([]);else if(!this.multiple&&this.required&&!i)this._value=new Set([t]);else if(this.multiple&&!this.required&&!i)this._value=new Set([...this._value,t]);else if(this.multiple&&!this.required&&i){const n=[...this._value].filter(o=>o!==t);this._value=new Set(n)}else if(this.multiple&&this.required&&!i)this._value=new Set([...this._value,t]);else if(this.multiple&&this.required&&i){const n=[...this._value].filter(s=>s!==t),o=new Set(n);o.size!==0&&(this._value=o)}this.updateOptionsState(),this.dispatchEvent(this.onValueChange)},this.useObserver=!0}set visible(e){if(e){const{value:t}=this._contextMenu;if(!t)return;for(const i of this.elements)t.append(i);this._visible=!0}else{for(const t of this.elements)this.append(t);this._visible=!1,this.resetVisibleElements()}}get visible(){return this._visible}set value(e){if(this.required&&Object.keys(e).length===0)return;const t=new Set;for(const i of e){const n=this.findOption(i);if(n&&(t.add(n),!this.multiple&&Object.keys(e).length===1))break}this._value=t,this.updateOptionsState(),this.dispatchEvent(this.onValueChange)}get value(){return[...this._value].filter(e=>e instanceof H&&e.checked).map(e=>e.value)}get _options(){const e=new Set([...this.elements]);for(const t of this.children)t instanceof H&&e.add(t);return[...e]}onSlotChange(e){const t=e.target.assignedElements();this.observe(t);const i=new Set;for(const n of this.elements){if(!(n instanceof H)){n.remove();continue}n.checked&&i.add(n),n.removeEventListener("click",this.onOptionClick),n.addEventListener("click",this.onOptionClick)}this._value=i}updateOptionsState(){for(const e of this._options)e instanceof H&&(e.checked=this._value.has(e))}findOption(e){return this._options.find(t=>t instanceof H?t.label===e||t.value===e:!1)}render(){let e,t,i;if(this._value.size===0)e="Select an option...";else if(this._value.size===1){const n=[...this._value][0];e=(n==null?void 0:n.label)||(n==null?void 0:n.value),t=n==null?void 0:n.img,i=n==null?void 0:n.icon}else e=`Multiple (${this._value.size})`;return m` {this.visible&&(this.visible=!1)}} > @@ -605,7 +609,7 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as
- `}};sr.styles=[kt.scrollbar,T` + `}};br.styles=[Tt.scrollbar,I` :host { --bim-input--bgc: var( --bim-dropdown--bgc, @@ -640,8 +644,8 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as bim-label { pointer-events: none; } - `];let gt=sr;Ot([g({type:String,reflect:!0})],gt.prototype,"name",2);Ot([g({type:String,reflect:!0})],gt.prototype,"icon",2);Ot([g({type:String,reflect:!0})],gt.prototype,"label",2);Ot([g({type:Boolean,reflect:!0})],gt.prototype,"multiple",2);Ot([g({type:Boolean,reflect:!0})],gt.prototype,"required",2);Ot([g({type:Boolean,reflect:!0})],gt.prototype,"vertical",2);Ot([g({type:Boolean,reflect:!0})],gt.prototype,"visible",1);Ot([de()],gt.prototype,"_value",2);var Xc=Object.defineProperty,rr=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&Xc(t,i,o),o};const ar=class extends I{constructor(){super(...arguments),this.floating=!1,this._layouts={},this._updateFunctions={}}set layouts(e){this._layouts=e;const t={};for(const[i,n]of Object.entries(e))for(const o in n.elements)t[i]||(t[i]={}),t[i][o]=s=>{const r=this._updateFunctions[i];if(!r)return;const l=r[o];l&&l(s)};this.updateComponent=t}get layouts(){return this._layouts}getLayoutAreas(e){const{template:t}=e,i=t.split(` -`).map(n=>n.trim()).map(n=>n.split('"')[1]).filter(n=>n!==void 0).flatMap(n=>n.split(/\s+/));return[...new Set(i)].filter(n=>n!=="")}firstUpdated(){this._onLayoutChange=new Event("layoutchange")}render(){if(this.layout){if(this._updateFunctions={},this.layouts[this.layout]){this.innerHTML="",this._updateFunctions[this.layout]={};const e=this._updateFunctions[this.layout],t=this.layouts[this.layout],i=this.getLayoutAreas(t).map(n=>{const o=t.elements[n];if(!o)return null;if(o instanceof HTMLElement)return o.style.gridArea=n,o;if("template"in o){const{template:s,initialState:r}=o,[l,a]=z.create(s,r);return l.style.gridArea=n,e[n]=a,l}return z.create(o)}).filter(n=>!!n);this.style.gridTemplate=t.template,this.append(...i),this._onLayoutChange&&this.dispatchEvent(this._onLayoutChange)}}else this._updateFunctions={},this.innerHTML="",this.style.gridTemplate="",this._onLayoutChange&&this.dispatchEvent(this._onLayoutChange);return m``}};ar.styles=T` + `];let vt=br;It([g({type:String,reflect:!0})],vt.prototype,"name",2);It([g({type:String,reflect:!0})],vt.prototype,"icon",2);It([g({type:String,reflect:!0})],vt.prototype,"label",2);It([g({type:Boolean,reflect:!0})],vt.prototype,"multiple",2);It([g({type:Boolean,reflect:!0})],vt.prototype,"required",2);It([g({type:Boolean,reflect:!0})],vt.prototype,"vertical",2);It([g({type:Boolean,reflect:!0})],vt.prototype,"visible",1);It([fe()],vt.prototype,"_value",2);var sd=Object.defineProperty,fr=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&sd(t,i,o),o};const gr=class extends T{constructor(){super(...arguments),this.floating=!1,this._layouts={},this._updateFunctions={}}set layouts(e){this._layouts=e;const t={};for(const[i,n]of Object.entries(e))for(const o in n.elements)t[i]||(t[i]={}),t[i][o]=s=>{const r=this._updateFunctions[i];if(!r)return;const l=r[o];l&&l(s)};this.updateComponent=t}get layouts(){return this._layouts}getLayoutAreas(e){const{template:t}=e,i=t.split(` +`).map(n=>n.trim()).map(n=>n.split('"')[1]).filter(n=>n!==void 0).flatMap(n=>n.split(/\s+/));return[...new Set(i)].filter(n=>n!=="")}firstUpdated(){this._onLayoutChange=new Event("layoutchange")}render(){if(this.layout){if(this._updateFunctions={},this.layouts[this.layout]){this.innerHTML="",this._updateFunctions[this.layout]={};const e=this._updateFunctions[this.layout],t=this.layouts[this.layout],i=this.getLayoutAreas(t).map(n=>{const o=t.elements[n];if(!o)return null;if(o instanceof HTMLElement)return o.style.gridArea=n,o;if("template"in o){const{template:s,initialState:r}=o,[l,a]=z.create(s,r);return l.style.gridArea=n,e[n]=a,l}return z.create(o)}).filter(n=>!!n);this.style.gridTemplate=t.template,this.append(...i),this._onLayoutChange&&this.dispatchEvent(this._onLayoutChange)}}else this._updateFunctions={},this.innerHTML="",this.style.gridTemplate="",this._onLayoutChange&&this.dispatchEvent(this._onLayoutChange);return m``}};gr.styles=I` :host { display: grid; height: 100%; @@ -670,9 +674,9 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as background-color: var(--bim-ui_bg-contrast-20); gap: 1px; } - `;let Bn=ar;rr([g({type:Boolean,reflect:!0})],Bn.prototype,"floating");rr([g({type:String,reflect:!0})],Bn.prototype,"layout");const Cn=class extends I{render(){return m` + `;let Wn=gr;fr([g({type:Boolean,reflect:!0})],Wn.prototype,"floating");fr([g({type:String,reflect:!0})],Wn.prototype,"layout");const En=class extends T{render(){return m` - `}};Cn.styles=T` + `}};En.styles=I` :host { height: var(--bim-icon--fz, var(--bim-ui_size-sm)); width: var(--bim-icon--fz, var(--bim-ui_size-sm)); @@ -685,14 +689,14 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as transition: all 0.15s; display: flex; } - `,Cn.properties={icon:{type:String}};let Jc=Cn;var Qc=Object.defineProperty,Wi=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&Qc(t,i,o),o};const lr=class extends I{constructor(){super(...arguments),this.vertical=!1,this.onValueChange=new Event("change")}get value(){const e={};for(const t of this.children){const i=t;"value"in i?e[i.name||i.label]=i.value:"checked"in i&&(e[i.name||i.label]=i.checked)}return e}set value(e){const t=[...this.children];for(const i in e){const n=t.find(r=>{const l=r;return l.name===i||l.label===i});if(!n)continue;const o=n,s=e[i];typeof s=="boolean"?o.checked=s:o.value=s}}render(){return m` + `,En.properties={icon:{type:String}};let rd=En;var ad=Object.defineProperty,Yi=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&ad(t,i,o),o};const vr=class extends T{constructor(){super(...arguments),this.vertical=!1,this.onValueChange=new Event("change")}get value(){const e={};for(const t of this.children){const i=t;"value"in i?e[i.name||i.label]=i.value:"checked"in i&&(e[i.name||i.label]=i.checked)}return e}set value(e){const t=[...this.children];for(const i in e){const n=t.find(r=>{const l=r;return l.name===i||l.label===i});if(!n)continue;const o=n,s=e[i];typeof s=="boolean"?o.checked=s:o.value=s}}render(){return m`
${this.label||this.icon?m`${this.label}`:null}
- `}};lr.styles=T` + `}};vr.styles=I` :host { flex: 1; display: block; @@ -740,13 +744,13 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as :host(:not([vertical])[label]) .input { max-width: fit-content; } - `;let Ke=lr;Wi([g({type:String,reflect:!0})],Ke.prototype,"name");Wi([g({type:String,reflect:!0})],Ke.prototype,"label");Wi([g({type:String,reflect:!0})],Ke.prototype,"icon");Wi([g({type:Boolean,reflect:!0})],Ke.prototype,"vertical");var Zc=Object.defineProperty,ti=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&Zc(t,i,o),o};const cr=class extends I{constructor(){super(...arguments),this.labelHidden=!1,this.iconHidden=!1,this.vertical=!1}get value(){return this.textContent?Vi(this.textContent):this.textContent}render(){return m` + `;let oi=vr;Yi([g({type:String,reflect:!0})],oi.prototype,"name");Yi([g({type:String,reflect:!0})],oi.prototype,"label");Yi([g({type:String,reflect:!0})],oi.prototype,"icon");Yi([g({type:Boolean,reflect:!0})],oi.prototype,"vertical");var ld=Object.defineProperty,si=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&ld(t,i,o),o};const yr=class extends T{constructor(){super(...arguments),this.labelHidden=!1,this.iconHidden=!1,this.vertical=!1}get value(){return this.textContent?qi(this.textContent):this.textContent}render(){return m`
${this.img?m``:null} ${!this.iconHidden&&this.icon?m``:null}

- `}};cr.styles=T` + `}};yr.styles=I` :host { --bim-icon--c: var(--bim-label--c); color: var(--bim-label--c, var(--bim-ui_bg-contrast-60)); @@ -805,7 +809,7 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as calc(var(--bim-label--fz, var(--bim-ui_size-xs)) * 4) ); } - `;let pe=cr;ti([g({type:String,reflect:!0})],pe.prototype,"img");ti([g({type:Boolean,attribute:"label-hidden",reflect:!0})],pe.prototype,"labelHidden");ti([g({type:String,reflect:!0})],pe.prototype,"icon");ti([g({type:Boolean,attribute:"icon-hidden",reflect:!0})],pe.prototype,"iconHidden");ti([g({type:Boolean,reflect:!0})],pe.prototype,"vertical");var Kc=Object.defineProperty,td=Object.getOwnPropertyDescriptor,ot=(e,t,i,n)=>{for(var o=n>1?void 0:n?td(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&Kc(t,i,o),o};const dr=class extends I{constructor(){super(...arguments),this._value=0,this.vertical=!1,this.slider=!1,this._input=se(),this.onValueChange=new Event("change")}set value(e){this.setValue(e.toString())}get value(){return this._value}onChange(e){e.stopPropagation();const{value:t}=this._input;t&&this.setValue(t.value)}setValue(e){const{value:t}=this._input;let i=e;if(i=i.replace(/[^0-9.-]/g,""),i=i.replace(/(\..*)\./g,"$1"),i.endsWith(".")||(i.lastIndexOf("-")>0&&(i=i[0]+i.substring(1).replace(/-/g,"")),i==="-"||i==="-0"))return;let n=Number(i);Number.isNaN(n)||(n=this.min!==void 0?Math.max(n,this.min):n,n=this.max!==void 0?Math.min(n,this.max):n,this.value!==n&&(this._value=n,t&&(t.value=this.value.toString()),this.requestUpdate(),this.dispatchEvent(this.onValueChange)))}onBlur(){const{value:e}=this._input;e&&Number.isNaN(Number(e.value))&&(e.value=this.value.toString())}onSliderMouseDown(e){document.body.style.cursor="w-resize";const{clientX:t}=e,i=this.value;let n=!1;const o=l=>{var a;n=!0;const{clientX:d}=l,u=this.step??1,c=((a=u.toString().split(".")[1])==null?void 0:a.length)||0,h=1/(this.sensitivity??1),p=(d-t)/h;if(Math.floor(Math.abs(p))!==Math.abs(p))return;const f=i+p*u;this.setValue(f.toFixed(c))},s=()=>{this.slider=!0,this.removeEventListener("blur",s)},r=()=>{document.removeEventListener("mousemove",o),document.body.style.cursor="default",n?n=!1:(this.addEventListener("blur",s),this.slider=!1,requestAnimationFrame(()=>this.focus())),document.removeEventListener("mouseup",r)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",r)}onFocus(e){e.stopPropagation();const t=i=>{i.key==="Escape"&&(this.blur(),window.removeEventListener("keydown",t))};window.addEventListener("keydown",t)}connectedCallback(){super.connectedCallback(),this.min&&this.min>this.value&&(this._value=this.min),this.max&&this.max{for(var o=n>1?void 0:n?dd(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&cd(t,i,o),o};const _r=class extends T{constructor(){super(...arguments),this._value=0,this.vertical=!1,this.slider=!1,this._input=de(),this.onValueChange=new Event("change")}set value(e){this.setValue(e.toString())}get value(){return this._value}onChange(e){e.stopPropagation();const{value:t}=this._input;t&&this.setValue(t.value)}setValue(e){const{value:t}=this._input;let i=e;if(i=i.replace(/[^0-9.-]/g,""),i=i.replace(/(\..*)\./g,"$1"),i.endsWith(".")||(i.lastIndexOf("-")>0&&(i=i[0]+i.substring(1).replace(/-/g,"")),i==="-"||i==="-0"))return;let n=Number(i);Number.isNaN(n)||(n=this.min!==void 0?Math.max(n,this.min):n,n=this.max!==void 0?Math.min(n,this.max):n,this.value!==n&&(this._value=n,t&&(t.value=this.value.toString()),this.requestUpdate(),this.dispatchEvent(this.onValueChange)))}onBlur(){const{value:e}=this._input;e&&Number.isNaN(Number(e.value))&&(e.value=this.value.toString())}onSliderMouseDown(e){document.body.style.cursor="w-resize";const{clientX:t}=e,i=this.value;let n=!1;const o=l=>{var a;n=!0;const{clientX:d}=l,u=this.step??1,c=((a=u.toString().split(".")[1])==null?void 0:a.length)||0,h=1/(this.sensitivity??1),p=(d-t)/h;if(Math.floor(Math.abs(p))!==Math.abs(p))return;const f=i+p*u;this.setValue(f.toFixed(c))},s=()=>{this.slider=!0,this.removeEventListener("blur",s)},r=()=>{document.removeEventListener("mousemove",o),document.body.style.cursor="default",n?n=!1:(this.addEventListener("blur",s),this.slider=!1,requestAnimationFrame(()=>this.focus())),document.removeEventListener("mouseup",r)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",r)}onFocus(e){e.stopPropagation();const t=i=>{i.key==="Escape"&&(this.blur(),window.removeEventListener("keydown",t))};window.addEventListener("keydown",t)}connectedCallback(){super.connectedCallback(),this.min&&this.min>this.value&&(this._value=this.min),this.max&&this.max${this.pref}`:null} ${this.slider?o:e} - `}};dr.styles=T` + `}};_r.styles=I` :host { --bim-input--bgc: var( --bim-number-input--bgc, @@ -942,14 +946,14 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as bim-label { pointer-events: none; } - `;let K=dr;ot([g({type:String,reflect:!0})],K.prototype,"name",2);ot([g({type:String,reflect:!0})],K.prototype,"icon",2);ot([g({type:String,reflect:!0})],K.prototype,"label",2);ot([g({type:String,reflect:!0})],K.prototype,"pref",2);ot([g({type:Number,reflect:!0})],K.prototype,"min",2);ot([g({type:Number,reflect:!0})],K.prototype,"value",1);ot([g({type:Number,reflect:!0})],K.prototype,"step",2);ot([g({type:Number,reflect:!0})],K.prototype,"sensitivity",2);ot([g({type:Number,reflect:!0})],K.prototype,"max",2);ot([g({type:String,reflect:!0})],K.prototype,"suffix",2);ot([g({type:Boolean,reflect:!0})],K.prototype,"vertical",2);ot([g({type:Boolean,reflect:!0})],K.prototype,"slider",2);var ed=Object.defineProperty,id=Object.getOwnPropertyDescriptor,ei=(e,t,i,n)=>{for(var o=n>1?void 0:n?id(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&ed(t,i,o),o};const ur=class extends I{constructor(){super(...arguments),this.onValueChange=new Event("change"),this._hidden=!1,this.headerHidden=!1,this.valueTransform={},this.activationButton=document.createElement("bim-button")}set hidden(e){this._hidden=e,this.activationButton.active=!e,this.dispatchEvent(new Event("hiddenchange"))}get hidden(){return this._hidden}get value(){return He(this,this.valueTransform)}set value(e){const t=[...this.children];for(const i in e){const n=t.find(s=>{const r=s;return r.name===i||r.label===i});if(!n)continue;const o=n;o.value=e[i]}}connectedCallback(){super.connectedCallback(),this.activationButton.active=!this.hidden,this.activationButton.onclick=()=>this.hidden=!this.hidden}disconnectedCallback(){super.disconnectedCallback(),this.activationButton.remove()}collapseSections(){const e=this.querySelectorAll("bim-panel-section");for(const t of e)t.collapsed=!0}expandSections(){const e=this.querySelectorAll("bim-panel-section");for(const t of e)t.collapsed=!1}render(){return this.activationButton.icon=this.icon,this.activationButton.label=this.label||this.name,this.activationButton.tooltipTitle=this.label||this.name,m` + `;let K=_r;ot([g({type:String,reflect:!0})],K.prototype,"name",2);ot([g({type:String,reflect:!0})],K.prototype,"icon",2);ot([g({type:String,reflect:!0})],K.prototype,"label",2);ot([g({type:String,reflect:!0})],K.prototype,"pref",2);ot([g({type:Number,reflect:!0})],K.prototype,"min",2);ot([g({type:Number,reflect:!0})],K.prototype,"value",1);ot([g({type:Number,reflect:!0})],K.prototype,"step",2);ot([g({type:Number,reflect:!0})],K.prototype,"sensitivity",2);ot([g({type:Number,reflect:!0})],K.prototype,"max",2);ot([g({type:String,reflect:!0})],K.prototype,"suffix",2);ot([g({type:Boolean,reflect:!0})],K.prototype,"vertical",2);ot([g({type:Boolean,reflect:!0})],K.prototype,"slider",2);var ud=Object.defineProperty,hd=Object.getOwnPropertyDescriptor,ri=(e,t,i,n)=>{for(var o=n>1?void 0:n?hd(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&ud(t,i,o),o};const wr=class extends T{constructor(){super(...arguments),this.onValueChange=new Event("change"),this._hidden=!1,this.headerHidden=!1,this.valueTransform={},this.activationButton=document.createElement("bim-button")}set hidden(e){this._hidden=e,this.activationButton.active=!e,this.dispatchEvent(new Event("hiddenchange"))}get hidden(){return this._hidden}get value(){return We(this,this.valueTransform)}set value(e){const t=[...this.children];for(const i in e){const n=t.find(s=>{const r=s;return r.name===i||r.label===i});if(!n)continue;const o=n;o.value=e[i]}}connectedCallback(){super.connectedCallback(),this.activationButton.active=!this.hidden,this.activationButton.onclick=()=>this.hidden=!this.hidden}disconnectedCallback(){super.disconnectedCallback(),this.activationButton.remove()}collapseSections(){const e=this.querySelectorAll("bim-panel-section");for(const t of e)t.collapsed=!0}expandSections(){const e=this.querySelectorAll("bim-panel-section");for(const t of e)t.collapsed=!1}render(){return this.activationButton.icon=this.icon,this.activationButton.label=this.label||this.name,this.activationButton.tooltipTitle=this.label||this.name,m`
${this.label||this.name||this.icon?m`${this.label}`:null}
- `}};ur.styles=[kt.scrollbar,T` + `}};wr.styles=[Tt.scrollbar,I` :host { display: flex; border-radius: var(--bim-ui_size-base); @@ -991,7 +995,7 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as ::slotted(bim-panel-section:not(:last-child)) { border-bottom: 1px solid var(--bim-ui_bg-contrast-20); } - `];let qt=ur;ei([g({type:String,reflect:!0})],qt.prototype,"icon",2);ei([g({type:String,reflect:!0})],qt.prototype,"name",2);ei([g({type:String,reflect:!0})],qt.prototype,"label",2);ei([g({type:Boolean,reflect:!0})],qt.prototype,"hidden",1);ei([g({type:Boolean,attribute:"header-hidden",reflect:!0})],qt.prototype,"headerHidden",2);var nd=Object.defineProperty,ii=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&nd(t,i,o),o};const hr=class extends I{constructor(){super(...arguments),this.onValueChange=new Event("change"),this.valueTransform={}}get value(){const e=this.parentElement;let t;return e instanceof qt&&(t=e.valueTransform),Object.values(this.valueTransform).length!==0&&(t=this.valueTransform),He(this,t)}set value(e){const t=[...this.children];for(const i in e){const n=t.find(s=>{const r=s;return r.name===i||r.label===i});if(!n)continue;const o=n;o.value=e[i]}}onHeaderClick(){this.fixed||(this.collapsed=!this.collapsed)}render(){const e=this.label||this.icon||this.name||this.fixed,t=m`{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&pd(t,i,o),o};const $r=class extends T{constructor(){super(...arguments),this.onValueChange=new Event("change"),this.valueTransform={}}get value(){const e=this.parentElement;let t;return e instanceof Xt&&(t=e.valueTransform),Object.values(this.valueTransform).length!==0&&(t=this.valueTransform),We(this,t)}set value(e){const t=[...this.children];for(const i in e){const n=t.find(s=>{const r=s;return r.name===i||r.label===i});if(!n)continue;const o=n;o.value=e[i]}}onHeaderClick(){this.fixed||(this.collapsed=!this.collapsed)}render(){const e=this.label||this.icon||this.name||this.fixed,t=m`
- `}};hr.styles=[kt.scrollbar,T` + `}};$r.styles=[Tt.scrollbar,I` :host { display: block; pointer-events: auto; @@ -1079,7 +1083,7 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as bim-label { pointer-events: none; } - `];let me=hr;ii([g({type:String,reflect:!0})],me.prototype,"icon");ii([g({type:String,reflect:!0})],me.prototype,"label");ii([g({type:String,reflect:!0})],me.prototype,"name");ii([g({type:Boolean,reflect:!0})],me.prototype,"fixed");ii([g({type:Boolean,reflect:!0})],me.prototype,"collapsed");var od=Object.defineProperty,ni=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&od(t,i,o),o};const pr=class extends I{constructor(){super(...arguments),this.vertical=!1,this.onValueChange=new Event("change"),this._canEmitEvents=!1,this._value=document.createElement("bim-option"),this.onOptionClick=e=>{this._value=e.target,this.dispatchEvent(this.onValueChange);for(const t of this.children)t instanceof H&&(t.checked=t===e.target)}}get _options(){return[...this.querySelectorAll("bim-option")]}set value(e){const t=this.findOption(e);if(t){for(const i of this._options)i.checked=i===t;this._value=t,this._canEmitEvents&&this.dispatchEvent(this.onValueChange)}}get value(){return this._value.value}onSlotChange(e){const t=e.target.assignedElements();for(const i of t)i instanceof H&&(i.noMark=!0,i.removeEventListener("click",this.onOptionClick),i.addEventListener("click",this.onOptionClick))}findOption(e){return this._options.find(t=>t instanceof H?t.label===e||t.value===e:!1)}firstUpdated(){const e=[...this.children].find(t=>t instanceof H&&t.checked);e&&(this._value=e)}render(){return m` + `];let _e=$r;ai([g({type:String,reflect:!0})],_e.prototype,"icon");ai([g({type:String,reflect:!0})],_e.prototype,"label");ai([g({type:String,reflect:!0})],_e.prototype,"name");ai([g({type:Boolean,reflect:!0})],_e.prototype,"fixed");ai([g({type:Boolean,reflect:!0})],_e.prototype,"collapsed");var md=Object.defineProperty,li=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&md(t,i,o),o};const xr=class extends T{constructor(){super(...arguments),this.vertical=!1,this.onValueChange=new Event("change"),this._canEmitEvents=!1,this._value=document.createElement("bim-option"),this.onOptionClick=e=>{this._value=e.target,this.dispatchEvent(this.onValueChange);for(const t of this.children)t instanceof H&&(t.checked=t===e.target)}}get _options(){return[...this.querySelectorAll("bim-option")]}set value(e){const t=this.findOption(e);if(t){for(const i of this._options)i.checked=i===t;this._value=t,this._canEmitEvents&&this.dispatchEvent(this.onValueChange)}}get value(){return this._value.value}onSlotChange(e){const t=e.target.assignedElements();for(const i of t)i instanceof H&&(i.noMark=!0,i.removeEventListener("click",this.onOptionClick),i.addEventListener("click",this.onOptionClick))}findOption(e){return this._options.find(t=>t instanceof H?t.label===e||t.value===e:!1)}firstUpdated(){const e=[...this.children].find(t=>t instanceof H&&t.checked);e&&(this._value=e)}render(){return m` - `}};pr.styles=T` + `}};xr.styles=I` :host { --bim-input--bgc: var(--bim-ui_bg-contrast-20); --bim-input--g: 0; @@ -1104,7 +1108,7 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as --bim-label--c: var(--bim-ui_main-contrast); background-color: var(--bim-ui_main-base); } - `;let be=pr;ni([g({type:String,reflect:!0})],be.prototype,"name");ni([g({type:String,reflect:!0})],be.prototype,"icon");ni([g({type:String,reflect:!0})],be.prototype,"label");ni([g({type:Boolean,reflect:!0})],be.prototype,"vertical");ni([de()],be.prototype,"_value");const sd=()=>m` + `;let we=xr;li([g({type:String,reflect:!0})],we.prototype,"name");li([g({type:String,reflect:!0})],we.prototype,"icon");li([g({type:String,reflect:!0})],we.prototype,"label");li([g({type:Boolean,reflect:!0})],we.prototype,"vertical");li([fe()],we.prototype,"_value");const bd=()=>m` - `}};mr.styles=T` + `}};Cr.styles=I` :host { padding: 0.375rem; display: flex; @@ -1270,10 +1274,10 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as white-space: normal; text-align: center; } - `;let br=mr;ld([g({type:String,reflect:!0})],br.prototype,"column");var cd=Object.defineProperty,dd=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&cd(t,i,o),o};const fr=class extends I{constructor(){super(...arguments),this._groups=[],this.data=[],this.table=this.closest("bim-table")}toggleGroups(e,t=!1){for(const i of this._groups)i.childrenHidden=typeof e>"u"?!i.childrenHidden:!e,t&&i.toggleChildren(e,t)}render(){return this._groups=[],m` + `;let Ar=Cr;vd([g({type:String,reflect:!0})],Ar.prototype,"column");var yd=Object.defineProperty,_d=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&yd(t,i,o),o};const Er=class extends T{constructor(){super(...arguments),this._groups=[],this.data=[],this.table=this.closest("bim-table")}toggleGroups(e,t=!1){for(const i of this._groups)i.childrenHidden=typeof e>"u"?!i.childrenHidden:!e,t&&i.toggleChildren(e,t)}render(){return this._groups=[],m` ${this.data.map(e=>{const t=document.createElement("bim-table-group");return this._groups.push(t),t.table=this.table,t.data=e,t})} - `}};fr.styles=T` + `}};Er.styles=I` :host { --bim-button--bgc: transparent; position: relative; @@ -1288,7 +1292,7 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as top: 0; bottom: 1.125rem; } - `;let gr=fr;dd([g({type:Array,attribute:!1})],gr.prototype,"data");var ud=Object.defineProperty,hd=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&ud(t,i,o),o};const vr=class extends I{constructor(){super(...arguments),this.data={data:{}},this.childrenHidden=!0,this.table=this.closest("bim-table")}connectedCallback(){super.connectedCallback(),this.table&&this.table.expanded?this.childrenHidden=!1:this.childrenHidden=!0}toggleChildren(e,t=!1){this._children&&(this.childrenHidden=typeof e>"u"?!this.childrenHidden:!e,t&&this._children.toggleGroups(e,t))}render(){if(!this.table)throw new Error("TableGroup: parent table wasn't found!");const e=this.table.getGroupIndentation(this.data)??0,t=m` + `;let Sr=Er;_d([g({type:Array,attribute:!1})],Sr.prototype,"data");var wd=Object.defineProperty,$d=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&wd(t,i,o),o};const kr=class extends T{constructor(){super(...arguments),this.data={data:{}},this.childrenHidden=!0,this.table=this.closest("bim-table")}connectedCallback(){super.connectedCallback(),this.table&&this.table.expanded?this.childrenHidden=!1:this.childrenHidden=!0}toggleChildren(e,t=!1){this._children&&(this.childrenHidden=typeof e>"u"?!this.childrenHidden:!e,t&&this._children.toggleGroups(e,t))}render(){if(!this.table)throw new Error("TableGroup: parent table wasn't found!");const e=this.table.getGroupIndentation(this.data)??0,t=m` ${this.table.noIndentation?null:m`
`} - `,i=document.createDocumentFragment();Pe(t,i);let n=null;this.table.noIndentation||(n=document.createElement("div"),n.classList.add("branch","branch-horizontal"),n.style.left=`${e-1+(this.table.selectableRows?2.05:.5625)}rem`);let o=null;if(!this.table.noIndentation){const l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("height","9.5"),l.setAttribute("width","7.5"),l.setAttribute("viewBox","0 0 4.6666672 7.3333333");const a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("d","m 1.7470835,6.9583848 2.5899999,-2.59 c 0.39,-0.39 0.39,-1.02 0,-1.41 L 1.7470835,0.36838483 c -0.63,-0.62000003 -1.71000005,-0.18 -1.71000005,0.70999997 v 5.17 c 0,0.9 1.08000005,1.34 1.71000005,0.71 z"),l.append(a);const d=document.createElementNS("http://www.w3.org/2000/svg","svg");d.setAttribute("height","6.5"),d.setAttribute("width","9.5"),d.setAttribute("viewBox","0 0 5.9111118 5.0175439");const u=document.createElementNS("http://www.w3.org/2000/svg","path");u.setAttribute("d","M -0.33616196,1.922522 2.253838,4.5125219 c 0.39,0.39 1.02,0.39 1.41,0 L 6.2538379,1.922522 c 0.6200001,-0.63 0.18,-1.71000007 -0.7099999,-1.71000007 H 0.37383804 c -0.89999997,0 -1.33999997,1.08000007 -0.71,1.71000007 z"),d.append(u),o=document.createElement("div"),o.addEventListener("click",c=>{c.stopPropagation(),this.toggleChildren()}),o.classList.add("caret"),o.style.left=`${(this.table.selectableRows?1.5:.125)+e}rem`,this.childrenHidden?o.append(l):o.append(d)}const s=document.createElement("bim-table-row");this.data.children&&!this.childrenHidden&&s.append(i),s.table=this.table,s.data=this.data.data,this.table.dispatchEvent(new CustomEvent("rowcreated",{detail:{row:s}})),o&&this.data.children&&s.append(o),e!==0&&(!this.data.children||this.childrenHidden)&&n&&s.append(n);let r;if(this.data.children){r=document.createElement("bim-table-children"),this._children=r,r.table=this.table,r.data=this.data.children;const l=document.createDocumentFragment();Pe(t,l),r.append(l)}return m` + `,i=document.createDocumentFragment();ce(t,i);let n=null;this.table.noIndentation||(n=document.createElement("div"),n.classList.add("branch","branch-horizontal"),n.style.left=`${e-1+(this.table.selectableRows?2.05:.5625)}rem`);let o=null;if(!this.table.noIndentation){const l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("height","9.5"),l.setAttribute("width","7.5"),l.setAttribute("viewBox","0 0 4.6666672 7.3333333");const a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("d","m 1.7470835,6.9583848 2.5899999,-2.59 c 0.39,-0.39 0.39,-1.02 0,-1.41 L 1.7470835,0.36838483 c -0.63,-0.62000003 -1.71000005,-0.18 -1.71000005,0.70999997 v 5.17 c 0,0.9 1.08000005,1.34 1.71000005,0.71 z"),l.append(a);const d=document.createElementNS("http://www.w3.org/2000/svg","svg");d.setAttribute("height","6.5"),d.setAttribute("width","9.5"),d.setAttribute("viewBox","0 0 5.9111118 5.0175439");const u=document.createElementNS("http://www.w3.org/2000/svg","path");u.setAttribute("d","M -0.33616196,1.922522 2.253838,4.5125219 c 0.39,0.39 1.02,0.39 1.41,0 L 6.2538379,1.922522 c 0.6200001,-0.63 0.18,-1.71000007 -0.7099999,-1.71000007 H 0.37383804 c -0.89999997,0 -1.33999997,1.08000007 -0.71,1.71000007 z"),d.append(u),o=document.createElement("div"),o.addEventListener("click",c=>{c.stopPropagation(),this.toggleChildren()}),o.classList.add("caret"),o.style.left=`${(this.table.selectableRows?1.5:.125)+e}rem`,this.childrenHidden?o.append(l):o.append(d)}const s=document.createElement("bim-table-row");this.data.children&&!this.childrenHidden&&s.append(i),s.table=this.table,s.data=this.data.data,this.table.dispatchEvent(new CustomEvent("rowcreated",{detail:{row:s}})),o&&this.data.children&&s.append(o),e!==0&&(!this.data.children||this.childrenHidden)&&n&&s.append(n);let r;if(this.data.children){r=document.createElement("bim-table-children"),this._children=r,r.table=this.table,r.data=this.data.children;const l=document.createDocumentFragment();ce(t,l),r.append(l)}return m`
${s} ${this.childrenHidden?null:r}
- `}};vr.styles=T` + `}};kr.styles=I` :host { position: relative; } @@ -1340,15 +1344,15 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as .caret svg { fill: var(--bim-ui_bg-contrast-60); } - `;let yr=vr;hd([g({type:Boolean,attribute:"children-hidden",reflect:!0})],yr.prototype,"childrenHidden");var pd=Object.defineProperty,fe=(e,t,i,n)=>{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&pd(t,i,o),o};const _r=class extends I{constructor(){super(...arguments),this.selected=!1,this.columns=[],this.hiddenColumns=[],this.data={},this.isHeader=!1,this.table=this.closest("bim-table"),this.onTableColumnsChange=()=>{this.table&&(this.columns=this.table.columns)},this.onTableColumnsHidden=()=>{this.table&&(this.hiddenColumns=this.table.hiddenColumns)},this._observer=new IntersectionObserver(e=>{this._intersecting=e[0].isIntersecting},{rootMargin:"36px"})}get _columnNames(){return this.columns.filter(e=>!this.hiddenColumns.includes(e.name)).map(e=>e.name)}get _columnWidths(){return this.columns.filter(e=>!this.hiddenColumns.includes(e.name)).map(e=>e.width)}get _isSelected(){var e;return(e=this.table)==null?void 0:e.selection.has(this.data)}onSelectionChange(e){if(!this.table)return;const t=e.target;this.selected=t.value,t.value?(this.table.selection.add(this.data),this.table.dispatchEvent(new CustomEvent("rowselected",{detail:{data:this.data}}))):(this.table.selection.delete(this.data),this.table.dispatchEvent(new CustomEvent("rowdeselected",{detail:{data:this.data}})))}connectedCallback(){super.connectedCallback(),this._observer.observe(this),this.table&&(this.columns=this.table.columns,this.hiddenColumns=this.table.hiddenColumns,this.table.addEventListener("columnschange",this.onTableColumnsChange),this.table.addEventListener("columnshidden",this.onTableColumnsHidden),this.toggleAttribute("selected",this._isSelected))}disconnectedCallback(){super.disconnectedCallback(),this._observer.unobserve(this),this.table&&(this.columns=[],this.hiddenColumns=[],this.table.removeEventListener("columnschange",this.onTableColumnsChange),this.table.removeEventListener("columnshidden",this.onTableColumnsHidden),this.toggleAttribute("selected",!1))}toggleAll(e){var t,i,n,o;if(!this.table)return;const s=(o=(n=(i=(t=this.table)==null?void 0:t.shadowRoot)==null?void 0:i.querySelector("bim-table-children"))==null?void 0:n.shadowRoot)==null?void 0:o.querySelectorAll("bim-table-group");if(!s||s.length===0){console.warn("No table groups found!");return}s.forEach(r=>{var l;const a=(l=r.shadowRoot)==null?void 0:l.querySelectorAll("bim-table-row");a==null||a.forEach(d=>{var u,c,h;const p=(h=(c=(u=d.shadowRoot)==null?void 0:u.querySelector("bim-checkbox"))==null?void 0:c.shadowRoot)==null?void 0:h.querySelector("input");p&&(p.checked=e,p.dispatchEvent(new Event("change")))})})}compute(){if(!this.table)throw new Error("TableRow: parent table wasn't found!");const e=this.table.getRowIndentation(this.data)??0,t=this.isHeader?this.data:this.table.applyDataTransform(this.data)??this.data,i=[];for(const n in t){if(this.hiddenColumns.includes(n))continue;const o=t[n];let s;if(typeof o=="string"||typeof o=="boolean"||typeof o=="number"?(s=document.createElement("bim-label"),s.textContent=String(o)):o instanceof HTMLElement?s=o:(s=document.createDocumentFragment(),Pe(o,s)),!s)continue;const r=document.createElement("bim-table-cell");r.append(s),r.column=n,this._columnNames.indexOf(n)===0&&(r.style.marginLeft=`${this.table.noIndentation?0:e+.75}rem`);const l=this._columnNames.indexOf(n);r.setAttribute("data-column-index",String(l)),r.toggleAttribute("data-no-indentation",l===0&&this.table.noIndentation),r.toggleAttribute("data-cell-header",this.isHeader),r.rowData=this.data,this.table.dispatchEvent(new CustomEvent("cellcreated",{detail:{cell:r}})),i.push(r)}return this.style.gridTemplateAreas=`"${this.table.selectableRows?"Selection":""} ${this._columnNames.join(" ")}"`,this.style.gridTemplateColumns=`${this.table.selectableRows?"1.6rem":""} ${this._columnWidths.join(" ")}`,this.table.selectableRows=!0,this.isHeader&&this.toggleAll(!!this._isSelected),m` - ${this.table.selectableRows?m`{for(var o=void 0,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=r(t,i,o)||o);return o&&xd(t,i,o),o};const Or=class extends T{constructor(){super(...arguments),this.selected=!1,this.columns=[],this.hiddenColumns=[],this.data={},this.isHeader=!1,this.table=this.closest("bim-table"),this.onTableColumnsChange=()=>{this.table&&(this.columns=this.table.columns)},this.onTableColumnsHidden=()=>{this.table&&(this.hiddenColumns=this.table.hiddenColumns)},this._observer=new IntersectionObserver(e=>{this._intersecting=e[0].isIntersecting},{rootMargin:"36px"})}get _columnNames(){return this.columns.filter(e=>!this.hiddenColumns.includes(e.name)).map(e=>e.name)}get _columnWidths(){return this.columns.filter(e=>!this.hiddenColumns.includes(e.name)).map(e=>e.width)}get _isSelected(){var e;return(e=this.table)==null?void 0:e.selection.has(this.data)}onSelectionChange(e){if(!this.table)return;const t=e.target;this.selected=t.value,t.value?(this.table.selection.add(this.data),this.table.dispatchEvent(new CustomEvent("rowselected",{detail:{data:this.data}}))):(this.table.selection.delete(this.data),this.table.dispatchEvent(new CustomEvent("rowdeselected",{detail:{data:this.data}})))}connectedCallback(){super.connectedCallback(),this._observer.observe(this),this.table&&(this.columns=this.table.columns,this.hiddenColumns=this.table.hiddenColumns,this.table.addEventListener("columnschange",this.onTableColumnsChange),this.table.addEventListener("columnshidden",this.onTableColumnsHidden),this.toggleAttribute("selected",this._isSelected))}disconnectedCallback(){super.disconnectedCallback(),this._observer.unobserve(this),this.table&&(this.columns=[],this.hiddenColumns=[],this.table.removeEventListener("columnschange",this.onTableColumnsChange),this.table.removeEventListener("columnshidden",this.onTableColumnsHidden),this.toggleAttribute("selected",!1))}compute(){if(!this.table)throw new Error("TableRow: parent table wasn't found!");const e=this.table.getRowIndentation(this.data)??0,t=this.isHeader?this.data:this.table.applyDataTransform(this.data)??this.data,i=[];for(const n in t){if(this.hiddenColumns.includes(n))continue;const o=t[n];let s;if(typeof o=="string"||typeof o=="boolean"||typeof o=="number"?(s=document.createElement("bim-label"),s.textContent=String(o)):o instanceof HTMLElement?s=o:(s=document.createDocumentFragment(),ce(o,s)),!s)continue;const r=document.createElement("bim-table-cell");r.append(s),r.column=n,this._columnNames.indexOf(n)===0&&(r.style.marginLeft=`${this.table.noIndentation?0:e+.75}rem`);const l=this._columnNames.indexOf(n);r.setAttribute("data-column-index",String(l)),r.toggleAttribute("data-no-indentation",l===0&&this.table.noIndentation),r.toggleAttribute("data-cell-header",this.isHeader),r.rowData=this.data,this.table.dispatchEvent(new CustomEvent("cellcreated",{detail:{cell:r}})),i.push(r)}return this.style.gridTemplateAreas=`"${this.table.selectableRows?"Selection":""} ${this._columnNames.join(" ")}"`,this.style.gridTemplateColumns=`${this.table.selectableRows?"1.6rem":""} ${this._columnWidths.join(" ")}`,m` + ${!this.isHeader&&this.table.selectableRows?m``:null} ${i} - `}render(){return m`${this._intersecting?this.compute():m``}`}};_r.styles=T` + `}render(){return m`${this._intersecting?this.compute():m``}`}};Or.styles=I` :host { position: relative; grid-area: Data; @@ -1369,14 +1373,14 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as var(--bim-ui_main-base) 10% ); } - `;let Gt=_r;fe([g({type:Boolean,reflect:!0})],Gt.prototype,"selected");fe([g({attribute:!1})],Gt.prototype,"columns");fe([g({attribute:!1})],Gt.prototype,"hiddenColumns");fe([g({attribute:!1})],Gt.prototype,"data");fe([g({type:Boolean,attribute:"is-header",reflect:!0})],Gt.prototype,"isHeader");fe([de()],Gt.prototype,"_intersecting");var md=Object.defineProperty,bd=Object.getOwnPropertyDescriptor,ct=(e,t,i,n)=>{for(var o=n>1?void 0:n?bd(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&md(t,i,o),o};const wr=class extends I{constructor(){super(...arguments),this._filteredData=[],this.headersHidden=!1,this.minColWidth="4rem",this._columns=[],this._textDelimiters={comma:",",tab:" "},this._queryString=null,this._data=[],this.expanded=!1,this.preserveStructureOnFilter=!1,this.indentationInText=!1,this.dataTransform={},this.selectableRows=!1,this.selection=new Set,this.noIndentation=!1,this.loading=!1,this._errorLoading=!1,this._onColumnsHidden=new Event("columnshidden"),this._hiddenColumns=[],this._stringFilterFunction=(e,t)=>Object.values(t.data).some(i=>String(i).toLowerCase().includes(e.toLowerCase())),this._queryFilterFunction=(e,t)=>{let i=!1;const n=xn(e)??[];for(const o of n){if("queries"in o){i=!1;break}const{condition:s,value:r}=o;let{key:l}=o;if(l.startsWith("[")&&l.endsWith("]")){const a=l.replace("[","").replace("]","");l=a,i=Object.keys(t.data).filter(d=>d.includes(a)).map(d=>Ro(t.data[d],s,r)).some(d=>d)}else i=Ro(t.data[l],s,r);if(!i)break}return i}}set columns(e){const t=[];for(const i of e){const n=typeof i=="string"?{name:i,width:`minmax(${this.minColWidth}, 1fr)`}:i;t.push(n)}this._columns=t,this.computeMissingColumns(this.data),this.dispatchEvent(new Event("columnschange"))}get columns(){return this._columns}get _headerRowData(){const e={};for(const t of this.columns){const{name:i}=t;e[i]=String(i)}return e}get value(){return this._filteredData}set queryString(e){this.toggleAttribute("data-processing",!0),this._queryString=e&&e.trim()!==""?e.trim():null,this.updateFilteredData(),this.toggleAttribute("data-processing",!1)}get queryString(){return this._queryString}set data(e){this._data=e,this.updateFilteredData(),this.computeMissingColumns(e)&&(this.columns=this._columns)}get data(){return this._data}get dataAsync(){return new Promise(e=>{setTimeout(()=>{e(this.data)})})}set hiddenColumns(e){this._hiddenColumns=e,setTimeout(()=>{this.dispatchEvent(this._onColumnsHidden)})}get hiddenColumns(){return this._hiddenColumns}updateFilteredData(){this.queryString?(xn(this.queryString)?(this.filterFunction=this._queryFilterFunction,this._filteredData=this.filter(this.queryString)):(this.filterFunction=this._stringFilterFunction,this._filteredData=this.filter(this.queryString)),this.preserveStructureOnFilter&&(this._expandedBeforeFilter===void 0&&(this._expandedBeforeFilter=this.expanded),this.expanded=!0)):(this.preserveStructureOnFilter&&this._expandedBeforeFilter!==void 0&&(this.expanded=this._expandedBeforeFilter,this._expandedBeforeFilter=void 0),this._filteredData=this.data)}computeMissingColumns(e){let t=!1;for(const i of e){const{children:n,data:o}=i;for(const s in o)this._columns.map(r=>typeof r=="string"?r:r.name).includes(s)||(this._columns.push({name:s,width:`minmax(${this.minColWidth}, 1fr)`}),t=!0);if(n){const s=this.computeMissingColumns(n);s&&!t&&(t=s)}}return t}generateText(e="comma",t=this.value,i="",n=!0){const o=this._textDelimiters[e];let s="";const r=this.columns.map(l=>l.name);if(n){this.indentationInText&&(s+=`Indentation${o}`);const l=`${r.join(o)} + `;let Jt=Or;$e([g({type:Boolean,reflect:!0})],Jt.prototype,"selected");$e([g({attribute:!1})],Jt.prototype,"columns");$e([g({attribute:!1})],Jt.prototype,"hiddenColumns");$e([g({attribute:!1})],Jt.prototype,"data");$e([g({type:Boolean,attribute:"is-header",reflect:!0})],Jt.prototype,"isHeader");$e([fe()],Jt.prototype,"_intersecting");var Cd=Object.defineProperty,Ad=Object.getOwnPropertyDescriptor,ct=(e,t,i,n)=>{for(var o=n>1?void 0:n?Ad(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&Cd(t,i,o),o};const Ir=class extends T{constructor(){super(...arguments),this._filteredData=[],this.headersHidden=!1,this.minColWidth="4rem",this._columns=[],this._textDelimiters={comma:",",tab:" "},this._queryString=null,this._data=[],this.expanded=!1,this.preserveStructureOnFilter=!1,this.indentationInText=!1,this.dataTransform={},this.selectableRows=!1,this.selection=new Set,this.noIndentation=!1,this.loading=!1,this._errorLoading=!1,this._onColumnsHidden=new Event("columnshidden"),this._hiddenColumns=[],this._stringFilterFunction=(e,t)=>Object.values(t.data).some(i=>String(i).toLowerCase().includes(e.toLowerCase())),this._queryFilterFunction=(e,t)=>{let i=!1;const n=Cn(e)??[];for(const o of n){if("queries"in o){i=!1;break}const{condition:s,value:r}=o;let{key:l}=o;if(l.startsWith("[")&&l.endsWith("]")){const a=l.replace("[","").replace("]","");l=a,i=Object.keys(t.data).filter(d=>d.includes(a)).map(d=>Uo(t.data[d],s,r)).some(d=>d)}else i=Uo(t.data[l],s,r);if(!i)break}return i}}set columns(e){const t=[];for(const i of e){const n=typeof i=="string"?{name:i,width:`minmax(${this.minColWidth}, 1fr)`}:i;t.push(n)}this._columns=t,this.computeMissingColumns(this.data),this.dispatchEvent(new Event("columnschange"))}get columns(){return this._columns}get _headerRowData(){const e={};for(const t of this.columns){const{name:i}=t;e[i]=String(i)}return e}get value(){return this._filteredData}set queryString(e){this.toggleAttribute("data-processing",!0),this._queryString=e&&e.trim()!==""?e.trim():null,this.updateFilteredData(),this.toggleAttribute("data-processing",!1)}get queryString(){return this._queryString}set data(e){this._data=e,this.updateFilteredData(),this.computeMissingColumns(e)&&(this.columns=this._columns)}get data(){return this._data}get dataAsync(){return new Promise(e=>{setTimeout(()=>{e(this.data)})})}set hiddenColumns(e){this._hiddenColumns=e,setTimeout(()=>{this.dispatchEvent(this._onColumnsHidden)})}get hiddenColumns(){return this._hiddenColumns}updateFilteredData(){this.queryString?(Cn(this.queryString)?(this.filterFunction=this._queryFilterFunction,this._filteredData=this.filter(this.queryString)):(this.filterFunction=this._stringFilterFunction,this._filteredData=this.filter(this.queryString)),this.preserveStructureOnFilter&&(this._expandedBeforeFilter===void 0&&(this._expandedBeforeFilter=this.expanded),this.expanded=!0)):(this.preserveStructureOnFilter&&this._expandedBeforeFilter!==void 0&&(this.expanded=this._expandedBeforeFilter,this._expandedBeforeFilter=void 0),this._filteredData=this.data)}computeMissingColumns(e){let t=!1;for(const i of e){const{children:n,data:o}=i;for(const s in o)this._columns.map(r=>typeof r=="string"?r:r.name).includes(s)||(this._columns.push({name:s,width:`minmax(${this.minColWidth}, 1fr)`}),t=!0);if(n){const s=this.computeMissingColumns(n);s&&!t&&(t=s)}}return t}generateText(e="comma",t=this.value,i="",n=!0){const o=this._textDelimiters[e];let s="";const r=this.columns.map(l=>l.name);if(n){this.indentationInText&&(s+=`Indentation${o}`);const l=`${r.join(o)} `;s+=l}for(const[l,a]of t.entries()){const{data:d,children:u}=a,c=this.indentationInText?`${i}${l+1}${o}`:"",h=r.map(f=>d[f]??""),p=`${c}${h.join(o)} -`;s+=p,u&&(s+=this.generateText(e,a.children,`${i}${l+1}.`,!1))}return s}get csv(){return this.generateText("comma")}get tsv(){return this.generateText("tab")}applyDataTransform(e){const t={};for(const n of Object.keys(this.dataTransform)){const o=this.columns.find(s=>s.name===n);o&&o.forceDataTransform&&(n in e||(e[n]=""))}const i=e;for(const n in i){const o=this.dataTransform[n];o?t[n]=o(i[n],e):t[n]=e[n]}return t}downloadData(e="BIM Table Data",t="json"){let i=null;if(t==="json"&&(i=new File([JSON.stringify(this.value,void 0,2)],`${e}.json`)),t==="csv"&&(i=new File([this.csv],`${e}.csv`)),t==="tsv"&&(i=new File([this.tsv],`${e}.tsv`)),!i)return;const n=document.createElement("a");n.href=URL.createObjectURL(i),n.download=i.name,n.click(),URL.revokeObjectURL(n.href)}getRowIndentation(e,t=this.value,i=0){for(const n of t){if(n.data===e)return i;if(n.children){const o=this.getRowIndentation(e,n.children,i+1);if(o!==null)return o}}return null}getGroupIndentation(e,t=this.value,i=0){for(const n of t){if(n===e)return i;if(n.children){const o=this.getGroupIndentation(e,n.children,i+1);if(o!==null)return o}}return null}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new Event("connected"))}disconnectedCallback(){super.disconnectedCallback(),this.dispatchEvent(new Event("disconnected"))}async loadData(e=!1){if(this._filteredData.length!==0&&!e||!this.loadFunction)return!1;this.loading=!0;try{const t=await this.loadFunction();return this.data=t,this.loading=!1,this._errorLoading=!1,!0}catch(t){if(this.loading=!1,this._filteredData.length!==0)return!1;const i=this.querySelector("[slot='error-loading']"),n=i==null?void 0:i.querySelector("[data-table-element='error-message']");return t instanceof Error&&n&&t.message.trim()!==""&&(n.textContent=t.message),this._errorLoading=!0,!1}}filter(e,t=this.filterFunction??this._stringFilterFunction,i=this.data){const n=[];for(const o of i)if(t(e,o)){if(this.preserveStructureOnFilter){const s={data:o.data};if(o.children){const r=this.filter(e,t,o.children);r.length&&(s.children=r)}n.push(s)}else if(n.push({data:o.data}),o.children){const s=this.filter(e,t,o.children);n.push(...s)}}else if(o.children){const s=this.filter(e,t,o.children);this.preserveStructureOnFilter&&s.length?n.push({data:o.data,children:s}):n.push(...s)}return n}get _missingDataElement(){return this.querySelector("[slot='missing-data']")}render(){if(this.loading)return sd();if(this._errorLoading)return m``;if(this._filteredData.length===0&&this._missingDataElement)return m``;const e=document.createElement("bim-table-row");e.table=this,e.isHeader=!0,e.data=this._headerRowData,e.style.gridArea="Header",e.style.position="sticky",e.style.top="0",e.style.zIndex="5";const t=document.createElement("bim-table-children");return t.table=this,t.data=this.value,t.style.gridArea="Body",t.style.backgroundColor="transparent",m` +`;s+=p,u&&(s+=this.generateText(e,a.children,`${i}${l+1}.`,!1))}return s}get csv(){return this.generateText("comma")}get tsv(){return this.generateText("tab")}applyDataTransform(e){const t={};for(const n of Object.keys(this.dataTransform)){const o=this.columns.find(s=>s.name===n);o&&o.forceDataTransform&&(n in e||(e[n]=""))}const i=e;for(const n in i){const o=this.dataTransform[n];o?t[n]=o(i[n],e):t[n]=e[n]}return t}downloadData(e="BIM Table Data",t="json"){let i=null;if(t==="json"&&(i=new File([JSON.stringify(this.value,void 0,2)],`${e}.json`)),t==="csv"&&(i=new File([this.csv],`${e}.csv`)),t==="tsv"&&(i=new File([this.tsv],`${e}.tsv`)),!i)return;const n=document.createElement("a");n.href=URL.createObjectURL(i),n.download=i.name,n.click(),URL.revokeObjectURL(n.href)}getRowIndentation(e,t=this.value,i=0){for(const n of t){if(n.data===e)return i;if(n.children){const o=this.getRowIndentation(e,n.children,i+1);if(o!==null)return o}}return null}getGroupIndentation(e,t=this.value,i=0){for(const n of t){if(n===e)return i;if(n.children){const o=this.getGroupIndentation(e,n.children,i+1);if(o!==null)return o}}return null}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new Event("connected"))}disconnectedCallback(){super.disconnectedCallback(),this.dispatchEvent(new Event("disconnected"))}async loadData(e=!1){if(this._filteredData.length!==0&&!e||!this.loadFunction)return!1;this.loading=!0;try{const t=await this.loadFunction();return this.data=t,this.loading=!1,this._errorLoading=!1,!0}catch(t){if(this.loading=!1,this._filteredData.length!==0)return!1;const i=this.querySelector("[slot='error-loading']"),n=i==null?void 0:i.querySelector("[data-table-element='error-message']");return t instanceof Error&&n&&t.message.trim()!==""&&(n.textContent=t.message),this._errorLoading=!0,!1}}filter(e,t=this.filterFunction??this._stringFilterFunction,i=this.data){const n=[];for(const o of i)if(t(e,o)){if(this.preserveStructureOnFilter){const s={data:o.data};if(o.children){const r=this.filter(e,t,o.children);r.length&&(s.children=r)}n.push(s)}else if(n.push({data:o.data}),o.children){const s=this.filter(e,t,o.children);n.push(...s)}}else if(o.children){const s=this.filter(e,t,o.children);this.preserveStructureOnFilter&&s.length?n.push({data:o.data,children:s}):n.push(...s)}return n}get _missingDataElement(){return this.querySelector("[slot='missing-data']")}render(){if(this.loading)return bd();if(this._errorLoading)return m``;if(this._filteredData.length===0&&this._missingDataElement)return m``;const e=document.createElement("bim-table-row");e.table=this,e.isHeader=!0,e.data=this._headerRowData,e.style.gridArea="Header",e.style.position="sticky",e.style.top="0",e.style.zIndex="5";const t=document.createElement("bim-table-children");return t.table=this,t.data=this.value,t.style.gridArea="Body",t.style.backgroundColor="transparent",m`
- ${this.headersHidden?null:e} ${rd()} + ${this.headersHidden?null:e} ${fd()}
${t}
- `}};wr.styles=[kt.scrollbar,T` + `}};Ir.styles=[Tt.scrollbar,I` :host { position: relative; overflow: auto; @@ -1413,14 +1417,14 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as flex-wrap: wrap; margin-bottom: 0.5rem; } - `];let st=wr;ct([de()],st.prototype,"_filteredData",2);ct([g({type:Boolean,attribute:"headers-hidden",reflect:!0})],st.prototype,"headersHidden",2);ct([g({type:String,attribute:"min-col-width",reflect:!0})],st.prototype,"minColWidth",2);ct([g({type:Array,attribute:!1})],st.prototype,"columns",1);ct([g({type:Array,attribute:!1})],st.prototype,"data",1);ct([g({type:Boolean,reflect:!0})],st.prototype,"expanded",2);ct([g({type:Boolean,reflect:!0,attribute:"selectable-rows"})],st.prototype,"selectableRows",2);ct([g({attribute:!1})],st.prototype,"selection",2);ct([g({type:Boolean,attribute:"no-indentation",reflect:!0})],st.prototype,"noIndentation",2);ct([g({type:Boolean,reflect:!0})],st.prototype,"loading",2);ct([de()],st.prototype,"_errorLoading",2);var fd=Object.defineProperty,gd=Object.getOwnPropertyDescriptor,ge=(e,t,i,n)=>{for(var o=n>1?void 0:n?gd(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&fd(t,i,o),o};const xr=class extends I{constructor(){super(...arguments),this._switchers=[],this.bottom=!1,this.switchersHidden=!1,this.floating=!1,this.switchersFull=!1,this.onTabHiddenChange=e=>{const t=e.target;t instanceof X&&!t.hidden&&(t.removeEventListener("hiddenchange",this.onTabHiddenChange),this.tab=t.name,t.addEventListener("hiddenchange",this.onTabHiddenChange))}}set tab(e){this._tab=e;const t=[...this.children],i=t.find(n=>n instanceof X&&n.name===e);for(const n of t){if(!(n instanceof X))continue;n.hidden=i!==n;const o=this.getTabSwitcher(n.name);o&&o.toggleAttribute("data-active",!n.hidden)}}get tab(){return this._tab}getTabSwitcher(e){return this._switchers.find(t=>t.getAttribute("data-name")===e)}createSwitchers(){this._switchers=[];for(const e of this.children){if(!(e instanceof X))continue;const t=document.createElement("div");t.addEventListener("click",()=>{this.tab===e.name?this.toggleAttribute("tab",!1):this.tab=e.name}),t.setAttribute("data-name",e.name),t.className="switcher";const i=document.createElement("bim-label");i.textContent=e.label??null,i.icon=e.icon,t.append(i),this._switchers.push(t)}}updateSwitchers(){for(const e of this.children){if(!(e instanceof X))continue;const t=this._switchers.find(n=>n.getAttribute("data-name")===e.name);if(!t)continue;const i=t.querySelector("bim-label");i&&(i.textContent=e.label??null,i.icon=e.icon)}}onSlotChange(e){this.createSwitchers();const t=e.target.assignedElements(),i=t.find(n=>n instanceof X?this.tab?n.name===this.tab:!n.hidden:!1);i&&i instanceof X&&(this.tab=i.name);for(const n of t){if(!(n instanceof X)){n.remove();continue}n.removeEventListener("hiddenchange",this.onTabHiddenChange),i!==n&&(n.hidden=!0),n.addEventListener("hiddenchange",this.onTabHiddenChange)}}render(){return m` + `];let st=Ir;ct([fe()],st.prototype,"_filteredData",2);ct([g({type:Boolean,attribute:"headers-hidden",reflect:!0})],st.prototype,"headersHidden",2);ct([g({type:String,attribute:"min-col-width",reflect:!0})],st.prototype,"minColWidth",2);ct([g({type:Array,attribute:!1})],st.prototype,"columns",1);ct([g({type:Array,attribute:!1})],st.prototype,"data",1);ct([g({type:Boolean,reflect:!0})],st.prototype,"expanded",2);ct([g({type:Boolean,reflect:!0,attribute:"selectable-rows"})],st.prototype,"selectableRows",2);ct([g({attribute:!1})],st.prototype,"selection",2);ct([g({type:Boolean,attribute:"no-indentation",reflect:!0})],st.prototype,"noIndentation",2);ct([g({type:Boolean,reflect:!0})],st.prototype,"loading",2);ct([fe()],st.prototype,"_errorLoading",2);var Ed=Object.defineProperty,Sd=Object.getOwnPropertyDescriptor,xe=(e,t,i,n)=>{for(var o=n>1?void 0:n?Sd(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&Ed(t,i,o),o};const Nr=class extends T{constructor(){super(...arguments),this._switchers=[],this.bottom=!1,this.switchersHidden=!1,this.floating=!1,this.switchersFull=!1,this.onTabHiddenChange=e=>{const t=e.target;t instanceof X&&!t.hidden&&(t.removeEventListener("hiddenchange",this.onTabHiddenChange),this.tab=t.name,t.addEventListener("hiddenchange",this.onTabHiddenChange))}}set tab(e){this._tab=e;const t=[...this.children],i=t.find(n=>n instanceof X&&n.name===e);for(const n of t){if(!(n instanceof X))continue;n.hidden=i!==n;const o=this.getTabSwitcher(n.name);o&&o.toggleAttribute("data-active",!n.hidden)}}get tab(){return this._tab}getTabSwitcher(e){return this._switchers.find(t=>t.getAttribute("data-name")===e)}createSwitchers(){this._switchers=[];for(const e of this.children){if(!(e instanceof X))continue;const t=document.createElement("div");t.addEventListener("click",()=>{this.tab===e.name?this.toggleAttribute("tab",!1):this.tab=e.name}),t.setAttribute("data-name",e.name),t.className="switcher";const i=document.createElement("bim-label");i.textContent=e.label??null,i.icon=e.icon,t.append(i),this._switchers.push(t)}}updateSwitchers(){for(const e of this.children){if(!(e instanceof X))continue;const t=this._switchers.find(n=>n.getAttribute("data-name")===e.name);if(!t)continue;const i=t.querySelector("bim-label");i&&(i.textContent=e.label??null,i.icon=e.icon)}}onSlotChange(e){this.createSwitchers();const t=e.target.assignedElements(),i=t.find(n=>n instanceof X?this.tab?n.name===this.tab:!n.hidden:!1);i&&i instanceof X&&(this.tab=i.name);for(const n of t){if(!(n instanceof X)){n.remove();continue}n.removeEventListener("hiddenchange",this.onTabHiddenChange),i!==n&&(n.hidden=!0),n.addEventListener("hiddenchange",this.onTabHiddenChange)}}render(){return m`
${this._switchers}
- `}};xr.styles=[kt.scrollbar,T` + `}};Nr.styles=[Tt.scrollbar,I` * { box-sizing: border-box; } @@ -1531,7 +1535,7 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as border-radius: var(--bim-ui_size-2xs); background-color: var(--bim-ui_bg-base); } - `];let It=xr;ge([de()],It.prototype,"_switchers",2);ge([g({type:Boolean,reflect:!0})],It.prototype,"bottom",2);ge([g({type:Boolean,attribute:"switchers-hidden",reflect:!0})],It.prototype,"switchersHidden",2);ge([g({type:Boolean,reflect:!0})],It.prototype,"floating",2);ge([g({type:String,reflect:!0})],It.prototype,"tab",1);ge([g({type:Boolean,attribute:"switchers-full",reflect:!0})],It.prototype,"switchersFull",2);var vd=Object.defineProperty,yd=Object.getOwnPropertyDescriptor,qi=(e,t,i,n)=>{for(var o=n>1?void 0:n?yd(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&vd(t,i,o),o};const $r=class extends I{constructor(){super(...arguments),this._defaultName="__unnamed__",this.name=this._defaultName,this._hidden=!1}set label(e){this._label=e;const t=this.parentElement;t instanceof It&&t.updateSwitchers()}get label(){return this._label}set hidden(e){this._hidden=e,this.dispatchEvent(new Event("hiddenchange"))}get hidden(){return this._hidden}connectedCallback(){super.connectedCallback();const{parentElement:e}=this;if(e&&this.name===this._defaultName){const t=[...e.children].indexOf(this);this.name=`${this._defaultName}${t}`}}render(){return m` `}};$r.styles=T` + `];let Nt=Nr;xe([fe()],Nt.prototype,"_switchers",2);xe([g({type:Boolean,reflect:!0})],Nt.prototype,"bottom",2);xe([g({type:Boolean,attribute:"switchers-hidden",reflect:!0})],Nt.prototype,"switchersHidden",2);xe([g({type:Boolean,reflect:!0})],Nt.prototype,"floating",2);xe([g({type:String,reflect:!0})],Nt.prototype,"tab",1);xe([g({type:Boolean,attribute:"switchers-full",reflect:!0})],Nt.prototype,"switchersFull",2);var kd=Object.defineProperty,Td=Object.getOwnPropertyDescriptor,Xi=(e,t,i,n)=>{for(var o=n>1?void 0:n?Td(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&kd(t,i,o),o};const Pr=class extends T{constructor(){super(...arguments),this._defaultName="__unnamed__",this.name=this._defaultName,this._hidden=!1}set label(e){this._label=e;const t=this.parentElement;t instanceof Nt&&t.updateSwitchers()}get label(){return this._label}set hidden(e){this._hidden=e,this.dispatchEvent(new Event("hiddenchange"))}get hidden(){return this._hidden}connectedCallback(){super.connectedCallback();const{parentElement:e}=this;if(e&&this.name===this._defaultName){const t=[...e.children].indexOf(this);this.name=`${this._defaultName}${t}`}}render(){return m` `}};Pr.styles=I` :host { display: block; height: 100%; @@ -1540,11 +1544,11 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as :host([hidden]) { display: none; } - `;let X=$r;qi([g({type:String,reflect:!0})],X.prototype,"name",2);qi([g({type:String,reflect:!0})],X.prototype,"label",1);qi([g({type:String,reflect:!0})],X.prototype,"icon",2);qi([g({type:Boolean,reflect:!0})],X.prototype,"hidden",1);/** + `;let X=Pr;Xi([g({type:String,reflect:!0})],X.prototype,"name",2);Xi([g({type:String,reflect:!0})],X.prototype,"label",1);Xi([g({type:String,reflect:!0})],X.prototype,"icon",2);Xi([g({type:Boolean,reflect:!0})],X.prototype,"hidden",1);/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const Lo=e=>e??R;var _d=Object.defineProperty,wd=Object.getOwnPropertyDescriptor,vt=(e,t,i,n)=>{for(var o=n>1?void 0:n?wd(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&_d(t,i,o),o};const Cr=class extends I{constructor(){super(...arguments),this._inputTypes=["date","datetime-local","email","month","password","search","tel","text","time","url","week","area"],this.value="",this.vertical=!1,this._type="text",this.onValueChange=new Event("input")}set type(e){this._inputTypes.includes(e)&&(this._type=e)}get type(){return this._type}get query(){return xn(this.value)}onInputChange(e){e.stopPropagation();const t=e.target;clearTimeout(this._debounceTimeoutID),this._debounceTimeoutID=setTimeout(()=>{this.value=t.value,this.dispatchEvent(this.onValueChange)},this.debounce)}focus(){setTimeout(()=>{var e;const t=(e=this.shadowRoot)==null?void 0:e.querySelector("input");t==null||t.focus()})}render(){return m` + */const Vo=e=>e??R;var Od=Object.defineProperty,Id=Object.getOwnPropertyDescriptor,yt=(e,t,i,n)=>{for(var o=n>1?void 0:n?Id(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&Od(t,i,o),o};const Mr=class extends T{constructor(){super(...arguments),this._inputTypes=["date","datetime-local","email","month","password","search","tel","text","time","url","week","area"],this.value="",this.vertical=!1,this._type="text",this.onValueChange=new Event("input")}set type(e){this._inputTypes.includes(e)&&(this._type=e)}get type(){return this._type}get query(){return Cn(this.value)}onInputChange(e){e.stopPropagation();const t=e.target;clearTimeout(this._debounceTimeoutID),this._debounceTimeoutID=setTimeout(()=>{this.value=t.value,this.dispatchEvent(this.onValueChange)},this.debounce)}focus(){setTimeout(()=>{var e;const t=(e=this.shadowRoot)==null?void 0:e.querySelector("input");t==null||t.focus()})}render(){return m` `:m` `} - `}};Cr.styles=[kt.scrollbar,T` + `}};Mr.styles=[Tt.scrollbar,I` :host { --bim-input--bgc: var(--bim-ui_bg-contrast-20); flex: 1; @@ -1601,7 +1605,7 @@ import{i as T,x as m,r as I,B as Pe}from"./lit-element-CToom8Wf.js";import{M as /* :host([disabled]) { --bim-input--bgc: var(--bim-ui_bg-contrast-20); } */ - `];let rt=Cr;vt([g({type:String,reflect:!0})],rt.prototype,"icon",2);vt([g({type:String,reflect:!0})],rt.prototype,"label",2);vt([g({type:String,reflect:!0})],rt.prototype,"name",2);vt([g({type:String,reflect:!0})],rt.prototype,"placeholder",2);vt([g({type:String,reflect:!0})],rt.prototype,"value",2);vt([g({type:Boolean,reflect:!0})],rt.prototype,"vertical",2);vt([g({type:Number,reflect:!0})],rt.prototype,"debounce",2);vt([g({type:Number,reflect:!0})],rt.prototype,"rows",2);vt([g({type:String,reflect:!0})],rt.prototype,"type",1);var xd=Object.defineProperty,$d=Object.getOwnPropertyDescriptor,Ar=(e,t,i,n)=>{for(var o=n>1?void 0:n?$d(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&xd(t,i,o),o};const Er=class extends I{constructor(){super(...arguments),this.rows=2,this._vertical=!1}set vertical(e){this._vertical=e,this.updateChildren()}get vertical(){return this._vertical}updateChildren(){const e=this.children;for(const t of e)this.vertical?t.setAttribute("label-hidden",""):t.removeAttribute("label-hidden")}render(){return m` + `];let rt=Mr;yt([g({type:String,reflect:!0})],rt.prototype,"icon",2);yt([g({type:String,reflect:!0})],rt.prototype,"label",2);yt([g({type:String,reflect:!0})],rt.prototype,"name",2);yt([g({type:String,reflect:!0})],rt.prototype,"placeholder",2);yt([g({type:String,reflect:!0})],rt.prototype,"value",2);yt([g({type:Boolean,reflect:!0})],rt.prototype,"vertical",2);yt([g({type:Number,reflect:!0})],rt.prototype,"debounce",2);yt([g({type:Number,reflect:!0})],rt.prototype,"rows",2);yt([g({type:String,reflect:!0})],rt.prototype,"type",1);var Nd=Object.defineProperty,Pd=Object.getOwnPropertyDescriptor,Rr=(e,t,i,n)=>{for(var o=n>1?void 0:n?Pd(t,i):t,s=e.length-1,r;s>=0;s--)(r=e[s])&&(o=(n?r(t,i,o):r(o))||o);return n&&o&&Nd(t,i,o),o};const Lr=class extends T{constructor(){super(...arguments),this.rows=2,this._vertical=!1}set vertical(e){this._vertical=e,this.updateChildren()}get vertical(){return this._vertical}updateChildren(){const e=this.children;for(const t of e)this.vertical?t.setAttribute("label-hidden",""):t.removeAttribute("label-hidden")}render(){return m` - +
- `},Du=e=>{const{components:t,dataStyles:i,onTopicEnter:n}=e,o=t.get(qe),s=e.topics??o.list.values();return m` - {if(!r)return;const l=r;l.hiddenColumns.length===0&&(l.hiddenColumns=["Guid"]),l.columns=["Title"],l.dataTransform={Title:(a,d)=>{const{Guid:u}=d;if(typeof u!="string")return a;const c=o.list.get(u);if(!c)return a;const h=`btn-${Z.newRandomId()}`;return m` + `},Qu=e=>{const{components:t,dataStyles:i,onTopicEnter:n}=e,o=t.get(Je),s=e.topics??o.list.values();return m` + {if(!r)return;const l=r;l.hiddenColumns.length===0&&(l.hiddenColumns=["Guid"]),l.columns=["Title"],l.dataTransform={Title:(a,d)=>{const{Guid:u}=d;if(typeof u!="string")return a;const c=o.list.get(u);if(!c)return a;const h=`btn-${Z.newRandomId()}`;return m`