@mantou/gem 2.3.1 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md ADDED
@@ -0,0 +1,150 @@
1
+ # Gem
2
+
3
+ Rules for writing [Gem](https://gemjs.org) elements. Gem elements extend `GemElement` or its derived classes.
4
+
5
+ ## Gem Syntax Example
6
+
7
+ ```ts
8
+ // Create a store for global state
9
+ // It may also be imported from another module
10
+ const store = createStore({
11
+ globalCount: 1,
12
+ text: '',
13
+ });
14
+
15
+ // A function that updates the store. A store is a data object and also a function that updates it
16
+ // Usually defined in the same module as the store; it may be omitted since `store({})` can be called directly
17
+ const addCount = () => store({ globalCount: store.globalCount + 1 });
18
+
19
+ // Create a theme for element instances
20
+ // Use it when the element's styles depend on its attributes or properties
21
+ // It is a special theme that is also a decorator on the element, updating theme values when the element changes
22
+ const elementTheme = createDecoratorTheme({ color: 'red' });
23
+
24
+ // `css` creates a style sheet that can be adopted by Gem elements, CSS nesting is supported
25
+ // `:host` can only be used when the element uses Shadow DOM via `@shadow`
26
+ // Otherwise use `:scope`; they behave differently, don't just swap one for the other
27
+ // Don't write inline styles in templates; style sheets are shared and separated from the DOM
28
+ // If the project defines a theme, read CSS values from it
29
+ const style = css`
30
+ :scope {
31
+ display: block;
32
+ color: ${theme.textColor};
33
+ }
34
+ `;
35
+
36
+ // For complex elements, define class names this way and reference them in templates as `style1.content`
37
+ const style1 = css({
38
+ // `$` means `:host` or `:scope`
39
+ $: `
40
+ font-size: small;
41
+ `,
42
+ content: `
43
+ font-size: 24px;
44
+ color: ${elementTheme.color};
45
+ `,
46
+ });
47
+
48
+ // Custom element tag name, using the project's namespace, e.g. `dy`
49
+ @customElement('dy-test')
50
+ // Adopt a style sheet, use it multiple times to adopt multiple style sheets
51
+ @adoptedStyle(style)
52
+ @adoptedStyle(style1)
53
+ // Connect a store, the element updates when the store updates; use it multiple times to connect multiple stores
54
+ @connectStore(store)
55
+ // Light DOM by default, `@shadow()` makes it Shadow DOM, the argument is `ShadowRootInit`
56
+ @shadow()
57
+ // Rarely needed, only when the element's content must be styleable from outside
58
+ @light({ penetrable: true })
59
+ // Render without blocking the main thread, useful when many instances render at once
60
+ @async()
61
+ // ARIA properties of the element for accessibility
62
+ @aria({ role: 'region' })
63
+ // Class name: `Duoyun` is the full name of `dy`, followed by `Element`, like native HTML element class names
64
+ class DuoyunTestElement extends GemElement {
65
+ // Define a part; as a static field it can be referenced from outside. No initial value needed, the decorator provides one with the same name
66
+ static @part img: string;
67
+ // Define a slot, same as `@part`
68
+ static @slot content: string;
69
+ // An attribute named `src`, an empty string when not set
70
+ @attribute src: string;
71
+ // An attribute named `count` parsed as a number, `0` when not set
72
+ @numattribute count: number;
73
+ // An attribute named `show` parsed as a boolean, `false` when not set
74
+ @boolattribute show: boolean;
75
+ // Use a property for values attributes can't represent. It may not be set, so always handle the empty case; changes re-render the element
76
+ @property data?: {};
77
+ // Defines a `display-content` event, dispatched by calling `this.displayContent(true)`
78
+ // Only the type is needed, its parameter is the `detail` of the custom event
79
+ // Use `null` when there is no data to pass
80
+ // `@globalemitter` events bubble across Shadow DOM boundaries
81
+ @emitter displayContent: Emitter<boolean>;
82
+ // A CSS custom state, only for outside CSS selectors such as `dy-test:state(open)`
83
+ // Update it with `this.open = true`, no special restrictions
84
+ @state open: boolean;
85
+
86
+ // A `{ value?: HTMLImageElement }` object to access the DOM
87
+ #imgRef = createRef<HTMLImageElement>();
88
+ // Internal state, update it with `this.#state({ ... })`
89
+ // Like native elements, an element should not update its own attributes/properties
90
+ // Unrelated to the CSS state `@state`
91
+ #state = createState({ internalCount: 1 });
92
+
93
+ // Don't give attributes initial values, they would appear in the serialized DOM; use a getter for defaults
94
+ // Properties can have initial values, or also use a getter
95
+ get #src() {
96
+ return this.src || 'test';
97
+ }
98
+
99
+ // Use `@memo` for expensive computations, its argument receives the instance and returns a dependency array
100
+ // Runs before each render, the body only runs when dependencies change
101
+ // `@willMount` is built on `@memo`
102
+ @memo((i) => [i.src])
103
+ get #text() {
104
+ return this.src.repeat(10);
105
+ }
106
+
107
+ // Side effect after each render, same argument as `@memo`, runs every time without one
108
+ // The returned function is the cleanup, called before the next run
109
+ // Similar to React's `useLayoutEffect`
110
+ // `@mounted` and `@unmounted` are built on `@effect`
111
+ @effect()
112
+ #print = () => {
113
+ console.log('updated');
114
+ return () => console.log('clear');
115
+ }
116
+
117
+ // `@template` marks the render function, its optional argument is a condition to render different content
118
+ // Without a condition it always applies
119
+ @template()
120
+ #content = () => {
121
+ const imgProps = { dataTest: 1 };
122
+ // Template syntax is lit-html plus Vue-like `v-if`, refs and spread attributes
123
+ // Use `classMap` `styleMap` `partMap` `exportPartsMap` when needed
124
+ return html`
125
+ <img ${this.#imgRef} ${imgProps} src=${this.#src} part=${DuoyunTestElement.part} />
126
+ <div class=${classMap({ div: true })} v-if=${this.show}>Show</div>
127
+ <div v-else class=${style1.content} style=${styleMap({ fontSize: '10px' })}>None</div>
128
+ `;
129
+ }
130
+
131
+ // After each update, recompute the theme when dependencies change; without dependencies it updates every time
132
+ @elementTheme((i) => [i.show])
133
+ #updateTheme = () => ({ color: this.show ? 'red' : 'blue' });
134
+
135
+ // Fallback content when rendering fails, only needed when rendering can fail
136
+ @fallback()
137
+ #errorContent = (err) => {
138
+ return html`Error: ${err}`;
139
+ }
140
+
141
+ // Gem elements use ES decorators, which fully describe the element, no extra custom element declarations needed
142
+ // Don't use lifecycle methods, they are deprecated! Decorate plain functions instead
143
+ // Prefer ES private fields (`#aaa`) over class methods to avoid `this` binding issues
144
+ }
145
+
146
+ ```
147
+
148
+ ## Gem Best Practices
149
+
150
+ - [Create standard and reliable custom elements](https://github.com/mantou132/gem/blob/main/packages/gem/docs/en/004-blog/001-create-standard-element.md)
package/dist/gem.js CHANGED
@@ -1,6 +1,6 @@
1
1
  !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Gem=e():t.Gem=e()}(globalThis,()=>(()=>{"use strict";let t,e,n,i,s,r,a,o,l,h,c,u,d,p,f,m,g,y,b,$,_,S,v,w,E,C,x,L,P,k,T,N,O,R,M,A,H,I,V,j,D,W,K,U,G,q,B,z,F,J,Y,Z,Q,X,tt,te,tn,ti,ts,tr,ta,to,tl,th,tc,tu,td,tp,tf,tm,tg,ty,tb,t$,t_,tS,tv,tw,tE,tC,tx,tL,tP,tk,tT,tN,tO,tR,tM,tA,tH,tI,tV,tj,tD,tW,tK,tU,tG,tq,tB,tz,tF,tJ,tY,tZ,tQ,tX,t0,t1,t2,t3,t8,t4,t6,t5,t9,t7,et,ee,en,ei,es,er,ea,eo,el,eh,ec,eu,ed,ep,ef,em,eg,ey,eb,e$,e_,eS,ev,ew,eE,eC,ex,eL,eP,ek,eT,eN,eO,eR,eM,eA,eH,eI,eV,ej,eD,eW,eK,eU,eG,eq,eB,ez,eF;var eJ={};eJ.d=(t,e,n)=>{var i=(e,n)=>{for(var i in e)eJ.o(e,i)&&!eJ.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,[n]:e[i]})};i(e,"get"),i(n,"value")},eJ.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),eJ.r=t=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var eY={};eJ.r(eY),eJ.d(eY,{GemActiveLinkElement:()=>tQ,GemDialogBaseElement:()=>f,GemElement:()=>n3,GemError:()=>nC,GemLightRouteElement:()=>ti,GemLinkElement:()=>tZ,GemReflectElement:()=>rc,GemRouteElement:()=>ts,GemTitleElement:()=>ey,GemUnsafeElement:()=>eO,GemUseElement:()=>eF,I18n:()=>rC,LinkedList:()=>ng,Logger:()=>r$,PropProxyMap:()=>ny,QueryString:()=>nb,SheetToken:()=>nU,TemplateResult:()=>i9,UpdateToken:()=>nG,_RenderErrorEvent:()=>nB,_StoreListenerMap:()=>nO,_createTemplate:()=>e,_renderRoot:()=>nj,absoluteLocation:()=>nf,addListener:()=>nm,addMicrotask:()=>nu,adoptedStyle:()=>iR,aria:()=>iV,assignState:()=>nd,async:()=>iI,attribute:()=>im,basePathStore:()=>sz,boolattribute:()=>ig,camelToKebabCase:()=>nv,classMap:()=>nk,cleanObject:()=>nE,connect:()=>nA,connectStore:()=>iM,createDecoratorTheme:()=>rK,createHistoryParams:()=>s6,createModalClass:()=>s1,createOverrideTheme:()=>rW,createPath:()=>s4,createRef:()=>sg,createScopedTheme:()=>rj,createState:()=>t,createStore:()=>nM,createTheme:()=>rD,createUpdater:()=>np,css:()=>nY,customElement:()=>ij,del:()=>rT,directive:()=>s$,effect:()=>i_,emitter:()=>iT,exportPartsMap:()=>nN,fallback:()=>iC,get:()=>rN,getLogicalParent:()=>rh,getThemeProps:()=>rI,getThemeStore:()=>rH,globalemitter:()=>iN,history:()=>sq,html:()=>nH,initRequest:()=>rP,isArrayChange:()=>nx,kebabToCamelCase:()=>nw,light:()=>iH,logger:()=>r_,matchPath:()=>s8,mathml:()=>sn,mediaQuery:()=>rx,memo:()=>i$,mounted:()=>iw,numattribute:()=>iy,objectMapToString:()=>nL,part:()=>ik,partMap:()=>nT,post:()=>rO,property:()=>ib,put:()=>rR,randomStr:()=>nS,raw:()=>n$,render:()=>nI,repeat:()=>sx,request:()=>rk,setEngine:()=>nV,shadow:()=>iA,slot:()=>iP,splice:()=>rw,state:()=>ix,styleMap:()=>nP,styled:()=>n_,svg:()=>se,template:()=>iE,titleStore:()=>sB,unmounted:()=>iS,version:()=>sb,willMount:()=>iv});var eZ={};eJ.r(eZ),eJ.d(eZ,{_StoreListenerMap:()=>nO,connect:()=>nA,createStore:()=>nM});var eQ={};eJ.r(eQ),eJ.d(eQ,{GemElement:()=>n3,SheetToken:()=>nU,UpdateToken:()=>nG,_RenderErrorEvent:()=>nB,_createTemplate:()=>e,_renderRoot:()=>nj,createState:()=>t,css:()=>nY,html:()=>nH,render:()=>nI,setEngine:()=>nV});var eX={};eJ.r(eX),eJ.d(eX,{adoptedStyle:()=>iR,aria:()=>iV,async:()=>iI,attribute:()=>im,boolattribute:()=>ig,connectStore:()=>iM,customElement:()=>ij,effect:()=>i_,emitter:()=>iT,fallback:()=>iC,globalemitter:()=>iN,light:()=>iH,memo:()=>i$,mounted:()=>iw,numattribute:()=>iy,part:()=>ik,property:()=>ib,shadow:()=>iA,slot:()=>iP,state:()=>ix,template:()=>iE,unmounted:()=>iS,willMount:()=>iv});var e0={};eJ.r(e0),eJ.d(e0,{version:()=>sb});let{get:e1,set:e2,has:e3,deleteProperty:e8,defineProperty:e4,getOwnPropertyDescriptor:e6,ownKeys:e5}=Reflect,e9=globalThis.__GEM_SSR__,e7=!!e9,nt={},ne=e9?(t,e)=>{let n=e9();return n?(n.has(t)||n.set(t,e()),n.get(t)):t}:t=>t,nn=e9?t=>{let e=()=>({...t});return new Proxy(t,{get:(n,i)=>e1(ne(t,e),i),set:(n,i,s)=>e2(ne(t,e),i,s),has:(n,i)=>e3(ne(t,e),i),deleteProperty:(n,i)=>e8(ne(t,e),i),defineProperty:(n,i,s)=>e4(ne(t,e),i,s),getOwnPropertyDescriptor:(n,i)=>e6(ne(t,e),i),ownKeys:()=>e5(ne(t,e))})}:t=>t,{assign:ni,fromEntries:ns,entries:nr,keys:na,defineProperty:no,hasOwn:nl}=Object,nh=new Set,nc=()=>new Set;function nu(t){let e=ne(nh,nc);!e.has(t)&&(Promise.resolve().then(()=>{e.delete(t),t()}),e.add(t))}function nd(t,e){for(let n of["name","length"])e&&nl(e,n)&&no(t,n,{value:e[n],writable:!0,enumerable:!0,configurable:!0});ni(t,e)}function np(t,e){return delete e.name,delete e.length,nd(e,t),e}function nf(t="",e=""){let{pathname:n,search:i,hash:s}=new URL(e,location.origin+t);return n+i+decodeURIComponent(s)}function nm(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}class ng extends EventTarget{#t=new Map;#e;#n;#i(t){let e=this.#t.get(t);return e&&(e.prev?e.prev.next=e.next:this.#e=e.next,e.next?e.next.prev=e.prev:this.#n=e.prev,this.#t.delete(t)),e}get size(){return this.#t.size}get first(){return this.#e}get last(){return this.#n}isSuperLinkOf(t,e=!1){let n=t.first;if(!n)return!0;let i=e?this.#e:this.find(n.value);for(;i&&n;){if(i.value===n.value)n=n.next;else if(!e)return!1;i=i.next}return!n}find(t){return this.#t.get(t)}add(t){this.#n||this.dispatchEvent(new CustomEvent("start"));let e=this.#i(t)||{value:t};e.prev=this.#n,e.prev&&(e.prev.next=e),e.next=void 0,this.#n=e,this.#e||(this.#e=e),this.#t.set(t,e)}delete(t){let e=this.#i(t);return this.#e||this.dispatchEvent(new CustomEvent("end")),e}clear(){this.#t.clear(),this.#e=this.#n=void 0}get(){let t=this.#e;if(t)return this.delete(t.value),t.value}}class ny extends WeakMap{get(t){let e=super.get(t);return e||(e={},this.set(t,e)),e}}class nb extends URLSearchParams{concat(t){nr("string"==typeof t?ns(new URLSearchParams(t).entries()):t).forEach(([t,e])=>{this.append(t,this.#s(e))})}#s=t=>"string"==typeof t?t:JSON.stringify(t);setAny(t,e){if(Array.isArray(e))this.delete(t),e.forEach(e=>this.append(t,this.#s(e)));else{let n=this.#s(e);n?this.set(t,n):this.delete(t)}}#r=t=>{if(!t)return null;try{return JSON.parse(t)}catch{return null}};getAny(t){return this.getAnyAll(t)[0]}getAnyAll(t){return this.getAll(t).filter(t=>""!==t).map(t=>this.#r(t))}toString(){let t=super.toString();return t?`?${t}`:""}toJSON(){return this.toString()}}function n$(t,...e){return t.reduce((t,n,i)=>t+(e[i-1]??"")+n)}let n_=n$;function nS(t=5){let e=Math.random().toString(36).slice(2,2+t);return e.length<t?e+nS(t-e.length):e}function nv(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function nw(t){return t.replace(/-(.)/g,(t,e)=>e.toUpperCase())}function nE(t){return na(t).forEach(e=>{delete t[e]}),t}class nC extends Error{constructor(t){super(t),this.message=`gem: ${this.message}`}}function nx(t,e){let n=t.length;if(e.length!==n)return!0;for(let i=0;i<n;i++)if(t[i]!==e[i])return!0;return!1}function nL(t,e,n){let i=e;for(let s in t){let r=n(s,t[s]);i+=r?r+e:""}return i}function nP(t){return nL(t,";",(t,e)=>e||0===e?`${nv(t)}:${e}`:"")}function nk(t){return nL(t," ",(t,e)=>e?t:"")}let nT=nk;function nN(t){return nL(t,",",(t,e)=>!0===e||t===e?t:e?`${t}:${e}`:"")}let nO=new WeakMap,nR=()=>new Set;function nM(t,e){let n=nR(),i=nn(np(t,t=>{nd(i,t),n.forEach(nu),e7&&(ne(n,nR).forEach(nu),e&&nt.updateStore?.(e,i))}));return e&&nd(i,nt.createStore?.(e)),nO.set(i,n),i}function nA(t,e){let n=nO.get(t),i=n&&ne(n,nR);return i?.add(e),()=>i?.delete(e)}let nH=(t,...e)=>n$(t,...e.map(t=>t instanceof Element?t.outerHTML:t)),nI=(t,e)=>e.innerHTML=t;function nV(t,e){nH=t,nI=e}let nj=(t,e)=>nt.render?.(t,e)||nI(t,e),{assign:nD,defineProperty:nW}=Object;nW(Symbol,"metadata",{value:Symbol.for("Symbol.metadata")});let nK=t=>"function"==typeof t&&t(),nU=Symbol.for("gem@sheetToken"),nG=Symbol.for("gem@update"),nq="gem-style-boundary",nB="gem@render-error",nz=new WeakMap;class nF extends CSSStyleSheet{#a;cssText="";get element(){return this.#a||(this.#a=document.createElement("style"),this.#a.textContent=this.cssText),this.#a}replaceSync(t){this.cssText=t,this.#a&&(this.#a.textContent=t),super.replaceSync(t)}}class nJ{#o="";#l="";constructor(t=""){this.#l=t}setContent(t){this.#o=t}#h=new Map;#c({sheet:t,scope:e}){t.replaceSync(e?`${e}{ ${this.#o} }`:this.#o)}getStyle(t,e){let n=t&&!t.internals?.shadowRoot,i=n?t.constructor:this,s=this.#h.get(i);if(!s){let r=n?e?"@scope":`@scope (${t.tagName}) to (:state(${nq}) > *)`:"";s={sheet:new nF({media:this.#l}),scope:r},this.#h.set(i,s),this.#c(s)}return s.sheet}updateStyle(){this.#h.forEach(t=>this.#c(t))}}function nY(t,...e){let n="",i="",s=e.at(0);Array.isArray(t)?i=n$(t,...e):void 0!==s?(n=t,i=s):i=t;let r=new nJ(n),a={[nU]:r},o="";return"string"==typeof i?o=i:Object.keys(i).forEach(t=>{let e="$"===t;a[t]=e||t.includes("-")?t:`${t}-${nS()}`,o+=`${e?":where(&:not([hidden])),:host(:where(:not([hidden])))":`.${a[t]}`} {${i[t]}}`}),r.setContent(o),a}let nZ=({counts:t,update:e},n,i)=>{let s=!1;n.forEach(e=>{let n=t.get(e)||0;s||=1===i&&0===n||-1===i&&1===n,t.set(e,n+i)}),s&&nu(e)};function nQ(t,e){nK(t.preCallback),t.preCallback=t.callback(e,t.values),t.values=e,t.initialized=!0}function nX(t){t.forEach(t=>{let e=t.getDep?.();(!t.getDep||!t.values||nx(t.values,e))&&nQ(t,e)})}function n0(t){return t.filter(t=>(nK(t.preCallback),t.preCallback=void 0,t.initialized=!1,t.values=void 0,t.fixed))}let n1=new ng,n2=(t=performance.now())=>{if(performance.now()>t+50)return requestAnimationFrame(n2);let e=n1.get();if(e){try{e()}catch(t){reportError(t)}n2(t)}};n1.addEventListener("start",()=>nu(n2));class n3 extends HTMLElement{#u;#d;#p=[];#f=[];#m=[];#g;#y;#b;#$;#_;[nG](){this.#S()}static{t=t=>{let e=n,i=np(t,t=>{let n=e.#p.at(0);if(!e7&&e.#y&&n&&!n.initialized)throw new nC("Don't set state sync before insert the DOM");nd(i,t),e.#$||e.#S()});return e.#d.stateList.push(i),i},e=(t,e)=>t.#m.push(e)}constructor(){let t;super(),n=this;const{aria:e,mode:i,delegatesFocus:s,...r}=this.#v,{focusable:a,...o}=e||{};this.#u=i?this.shadowRoot||this.attachShadow({mode:i,delegatesFocus:s,...r}):this,this.#d=this.attachInternals(),this.#u===this||this.#d.shadowRoot||nW(this.#d,"shadowRoot",{value:this.#u}),this.#d.stateList=[],this.#d.sheets=[],nD(this.#d,o),this.#p.push({fixed:!0,getDep:()=>[this.disabled],callback:([e=!1])=>{if(void 0===t&&(t=this.hasAttribute("tabindex")),this.#d.ariaDisabled=String(e),a&&!t&&(this.tabIndex=-Number(e)),(a||s)&&e)return nm(this,"click",t=>t.isTrusted&&t.stopImmediatePropagation(),{capture:!0})}})}get #v(){return this.constructor[Symbol.metadata]}get #w(){return this.#m.findLast(t=>!t.condition||t.condition())}get internals(){return this.#d}#E=()=>{nX(this.#p)};#C=t=>{try{this.#$=!0,nX(this.#f);let e=this.#u===this,n=t?t.render():e?void 0:nH`<slot></slot>`;if(void 0===n)return;let i=n??(e?nH`<style>@scope{&{display:none!important;}}</style>`:nH`<style>:host{&{display:none!important;}}</style>`);nj(i,this.#u)}catch(e){let t=new CustomEvent(nB,{bubbles:!0,composed:!0,cancelable:!0,detail:e});if(this.dispatchEvent(t))throw e}finally{this.#$=!1}};#x=()=>{let t=this.#w;this.#y&&(t||!this.#m.length)&&(this.#C(t),e7||nu(this.#E))};#L=t=>{this.#v.noBlocking&&!e7?n1.add(t):t()};#P=()=>this.#L(this.#x);#S=()=>{this.#y&&nu(this.#P)};#k=()=>{let{adoptedStyleSheets:t=[]}=this.#v,{shadowRoot:e,sheets:n}=this.#d,i=t.map(t=>t[nU].getStyle(this));if(!e)return this.prepend(...n.map(t=>t.element)),((t,e)=>{let n=t.getRootNode(),i=nz.get(n);if(!i){let t=new Map;i={counts:t,update:()=>{let e=(n.adoptedStyleSheets||[]).filter(e=>!t.has(e));t.forEach((t,n)=>t&&e.push(n)),n.adoptedStyleSheets=e.reverse()}},nz.set(n,i)}return nZ(i,e,1),()=>nZ(i,e,-1)})(this,i);e.adoptedStyleSheets=i.concat(n)};#T=()=>{this.#p.forEach(t=>!t.initialized&&nQ(t,t.getDep?.()))};#N=()=>{this.willMount&&this.memo(this.willMount.bind(this),()=>[]),this.mounted&&this.effect(this.mounted.bind(this),()=>[]),this.updated&&this.effect((t,e)=>e&&this.updated.apply(this)),this.unmounted&&this.effect(()=>this.unmounted.bind(this),()=>[]),!this.#m.length&&this.render&&this.#m.push({render:this.render.bind(this),condition:this.shouldUpdate?.bind(this)})};#O;#R=()=>{if(this.#g){this.#g=!1,this.#_?.(),this.#_=this.#k();return}if(nt.connect?.(this,this.#R))return;this.#b=!0,this.#N();let{observedStores:t,mode:e,penetrable:n}=this.#v;this.#d.states.add("gem-element"),e||!this.#m.length||n||this.#d.states.add(nq),this.#O=t?.map(t=>nA(t,this.#P)),this.#C(this.#w),this.#y=!0,this.#_=this.#k(),e7||nu(this.#T)};connectedCallback(){this.#L(this.#R)}disconnectedCallback(){if(this.isConnected){this.#g=!0;return}n1.delete(this.#R),n1.delete(this.#x),this.#y=!1,this.#O?.forEach(t=>t()),this.#p=n0(this.#p),this.#f=n0(this.#f),this.#_?.()}effect=(t,e)=>{let n={callback:t,getDep:e,fixed:!this.#b};this.#y&&nQ(n,e?.()),this.#p.push(n)};memo=(t,e)=>{this.#f.push({callback:t,getDep:e,fixed:!this.#b})};update=()=>this.#S()}let{deleteProperty:n8,getOwnPropertyDescriptor:n4,defineProperty:n6}=Reflect,{getPrototypeOf:n5,assign:n9,hasOwn:n7}=Object,it=new ny;function ie(t,e,n){let i=t.metadata;n4(i,e)||n6(i,e,{value:i[e]?.filter(t=>t!==n)||[]}),i[e].push(n)}function ii(t,e,n,i){let s=t.name;ie(t,e,n),t.addInitializer(function(){let e=id(this,t);n7(e,s)||i(e,s),function(t,e){let{value:n}=n4(t,e)||{};n8(t,e),t[e]=n}(this,s)})}let{setAttribute:is,toggleAttribute:ir,removeAttribute:ia}=Element.prototype,io=(t,e)=>t.constructor[Symbol.metadata]?.attrProps?.[e];function il(){}n3.prototype.setAttribute=function(t,e){let n=io(this,t);if(!n)return is.call(this,t,e);this[n]=e},n3.prototype.removeAttribute=function(t){let e=io(this,t);if(!e)return ia.call(this,t);this[e]=null},n3.prototype.toggleAttribute=function(t,e){let n=io(this,t);return n?this[n]=e??!this.hasAttribute(t):ir.call(this,t,e)};let ih=Symbol("event handle");function ic(t,e,{attr:n,attrType:i,event:s,eventOptions:r}={}){n6(t,e,{configurable:!0,get(){let t=it.get(this)[e];return s&&!t?(this[e]=il,this[e]):t},set(t){let a=this,o=it.get(a);n&&((t=i===Boolean&&""===t||i(t||""))?is.call(this,n,i===Boolean?"":t):ia.call(this,n)),t!==o[e]&&(s?(o[e]=t?.[ih]?t:async(e,n)=>{await Promise.resolve();let i=new CustomEvent(s,{...n,...r,detail:e});a.dispatchEvent(i),await t(e,n)},o[e][ih]=!0):(o[e]=t,this[nG]()))}})}let iu=new WeakMap;function id(t,{metadata:e}){let n=iu.get(e);if(n)return n;let i=t;do i=n5(i);while(i.constructor[Symbol.metadata]!==e);return iu.set(e,i),i}function ip(t,e){let n=t.name,i=nv(n),s=t.metadata;return n7(s,"attrProps")||(s.attrProps=Object.create(s.attrProps||null)),s.attrProps[i]=n,ii(t,"observedAttributes",i,t=>ic(t,n,{attr:i,attrType:e})),function(t){return this.getAttribute(i)??t}}function im(t,e){return ip(e,String)}function ig(t,e){return ip(e,Boolean)}function iy(t,e){return ip(e,Number)}function ib(t,e){let n=e.name;return ii(e,"observedProperties",n,ic),function(t){return this[n]??t}}function i$(t){return(e,n)=>{let{addInitializer:i,name:s,access:r,kind:a}=n;i(function(){let e=t&&(()=>t(this));if("getter"===a){if(n.private)throw new nC("not support");let t=n4(id(this,n),s).get.bind(this);this.memo(()=>{n6(this,s,{configurable:!0,value:t()})},e)}else this.memo(r.get.call(this,this).bind(this),e)})}}function i_(t){return(e,{addInitializer:n,access:i})=>{n(function(){this.effect(i.get.call(this,this).bind(this),t&&(()=>t(this)))})}}function iS(){return(t,{addInitializer:e,access:n})=>{e(function(){this.effect(()=>n.get.call(this,this).bind(this),()=>[])})}}function iv(){return i$(()=>[])}function iw(){return i_(()=>[])}function iE(t){return(n,{addInitializer:i,access:s})=>{i(function(){e(this,{render:s.get.call(this,this).bind(this),condition:t&&(()=>t(this))})})}}function iC(){return(t,{addInitializer:e,access:n})=>{e(function(){this.addEventListener(nB,t=>{t.preventDefault(),nj(n.get.call(this,this).apply(this,[t.detail]),this.internals.shadowRoot||this)})})}}function ix(t,e){let n=nv(e.name);ii(e,"definedCSSStates",n,(t,e)=>{n6(t,e,{configurable:!0,get(){let{states:t}=this.internals;return t?.has(n)},set(t){let{states:e}=this.internals;t?e?.add(n):e?.delete(n)}})})}function iL(t,e,n,i){let s=t.name,r=nv(s);if(t.static)ie(t,n,r);else{let i=n5(e);i[s]||(i[s]=r,ie(t,n,r))}return i||r}function iP(t,e){return function(t){return iL(e,this,"definedSlots",t)}}function ik(t,e){return function(t){return iL(e,this,"definedParts",t)}}function iT(t,e){iO(e)}function iN(t,e){iO(e,{bubbles:!0,composed:!0})}function iO(t,e){let n=nv(t.name);ii(t,"definedEvents",n,(t,i)=>ic(t,i,{event:n,eventOptions:e}))}function iR(t){return(e,n)=>{ie(n,"adoptedStyleSheets",t)}}function iM(t){return(e,n)=>{ie(n,"observedStores",t)}}function iA({mode:t="open",serializable:e=!0,...n}={}){return(i,s)=>{n9(s.metadata,{mode:t,serializable:e,...n})}}function iH({penetrable:t}){return(e,n)=>{n.metadata.penetrable=t}}function iI(){return(t,e)=>{e.metadata.noBlocking=!0}}function iV(t){return(e,n)=>{let i=n.metadata;i.aria={...i.aria,...t}}}function ij(t){return(e,{addInitializer:n})=>{n(()=>{customElements.define(t,e)})}}let iD=globalThis.trustedTypes,iW=iD?.createPolicy("lit-html",{createHTML:t=>t}),iK="$lit$",iU=`lit$${Math.random().toFixed(9).slice(2)}$`,iG="?"+iU,iq=`<${iG}>`,iB=document,iz=()=>iB.createComment(""),iF=t=>null===t||"object"!=typeof t&&"function"!=typeof t,iJ=t=>null==t,iY=`[
2
2
  \f\r]`,iZ=`[^
3
- \f\r"'\`<>=]`,iQ=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,iX=/-->/g,i0=/>/g,i1=RegExp(`>|${iY}(?:([^\\s"'>=/]+)(${iY}*=${iY}*(?:${iZ}|("|')|))|$)`,"g"),i2=/'/g,i3=/"/g,i8=/^(?:script|style|textarea|title)$/i,i4="v-if",i6="v-else-if",i5="v-else";class i9{type;strings;values;constructor(t,e,n){this.type=t,this.strings=e,this.values=n}}let i7=t=>(e,...n)=>new i9(t,e,n),st=i7(1),se=i7(2),sn=i7(3),si=Symbol.for("lit-noChange"),ss=new WeakMap,sr=iB.createTreeWalker(iB,129);class sa{el;parts=[];constructor({strings:t,type:e},n){let i,s=0,r=0;const a=t.length-1,o=this.parts,[l,h]=((t,e)=>{let n,i=t.length-1,s=[],r=2===e?"<svg>":3===e?"<math>":"",a=iQ;for(let e=0;e<i;e++){let i,o,l=t[e],h=-1,c=0;for(;c<l.length&&(a.lastIndex=c,null!==(o=a.exec(l)));)c=a.lastIndex,a===iQ?"!--"===o[1]?a=iX:void 0!==o[1]?a=i0:void 0!==o[2]?(i8.test(o[2])&&(n=RegExp(`</${o[2]}`,"g")),a=i1):void 0!==o[3]&&(a=i1):a===i1?">"===o[0]?(a=n??iQ,h=-1):void 0===o[1]?h=-2:(h=a.lastIndex-o[2].length,i=o[1],a=void 0===o[3]?i1:'"'===o[3]?i3:i2):a===i3||a===i2?a=i1:a===iX||a===i0?a=iQ:(a=i1,n=void 0);let u=a===i1&&t[e+1].startsWith("/>")?" ":"";r+=a===iQ?l+iq:h>=0?(s.push(i),l.slice(0,h)+iK+l.slice(h)+iU+u):l+iU+(-2===h?e:u)}let o=r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"");return[function(t,e){if(!Array.isArray(t))throw Error("invalid template");return void 0!==iW?iW.createHTML(e):e}(t,o),s]})(t,e);if(this.el=sa.createElement(l,n),sr.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=sr.nextNode())&&o.length<a;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(iK)){const e=h[r++],n=i.getAttribute(t).split(iU),a=/([.?@])?(.*)/.exec(e);o.push({type:1,index:s,name:a[2],strings:n,ctor:"."===a[1]?sd:"?"===a[1]?sp:"@"===a[1]?sf:su}),i.removeAttribute(t)}else t.startsWith(iU)&&(o.push({type:6,index:s}),i.removeAttribute(t));if(i8.test(i.tagName)){const t=i.textContent.split(iU),e=t.length-1;if(e>0){i.textContent=iD?iD.emptyScript:"";for(let n=0;n<e;n++)i.append(t[n],iz()),sr.nextNode(),o.push({type:2,index:++s});i.append(t[e],iz())}}}else if(8===i.nodeType)if(i.data===iG)o.push({type:2,index:s});else{let t=-1;for(;-1!==(t=i.data.indexOf(iU,t+1));)o.push({type:7,index:s}),t+=iU.length-1}s++}}static createElement(t,e){let n=iB.createElement("template");return n.innerHTML=t,n}}function so(t,e,n=t,i){if(e===si)return e;let s=void 0!==i?n.__directives?.[i]:n.__directive,r=iF(e)?void 0:e._$litDirective$;return s?.constructor!==r&&(s?._$notifyDirectiveConnectionChanged?.(!1),void 0===r?s=void 0:(s=new r(t))._$initialize(t,n,i),void 0!==i?(n.__directives??=[])[i]=s:n.__directive=s),void 0!==s&&(e=so(t,s._$resolve(t,e.values),s,i)),e}class sl{_$template;_$parts=[];_$conditions=[];_$parent;_$disconnectableChildren=void 0;constructor(t,e){this._$template=t,this._$parent=e}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(t){let{el:{content:e},parts:n}=this._$template,i=new Map,s=new Map,r=(t?.creationScope??iB).importNode(e,!0);sr.currentNode=r;let a=sr.nextNode(),o=0,l=0,h=n[0];for(;void 0!==h;){if(o===h.index){let e;2===h.type?e=new sc(a,a.nextSibling,this,t):1===h.type?(h.name===i4&&i.set(a,l),h.name===i6&&s.set(a,l),e=new h.ctor(a,h.name,h.strings,this,t)):6===h.type&&(e=new sm(a,this,t)),this._$parts.push(e),h=n[++l]}o!==h?.index&&(a=sr.nextNode(),o++)}let c=new Map;for(let t of(i.forEach((t,e)=>{let n=new sh(e,t);this._$conditions.push(n),c.set(e,n);let i=e;for(;i=i.nextElementSibling;){let t=s.get(i);if(void 0===t)break;n.push(i,t)}}),this._$parts)){if(t?.type!==2)continue;let e=c.get(t._$endNode);e&&(t._$endNode=e.mark)}return sr.currentNode=iB,r}_update(t){let e=0;for(let n of this._$parts)void 0!==n&&(void 0!==n.strings?(n._$setValue(t,n,e),e+=n.strings.length-2):n.name===i4||n.name===i6||n._$setValue(t[e])),e++;this._$conditions.forEach(e=>e.update(t))}}class sh{mark;list;constructor(t,e){const n=iz();n._$chain=this,t.before(n),this.mark=n,this.list=[{ele:t,idx:e}],this.check()}get next(){return this.list.at(-1).ele.nextElementSibling}push(t,e){this.list.push({ele:t,idx:e}),this.check()}check(){let t=this.next;t?.attributes.getNamedItem(i5)&&(this.list.push({ele:t}),t.removeAttribute(i5))}update(t){let{mark:e,list:n}=this,i=n.find(({idx:e})=>void 0===e||!!t[e]);i&&!i.ele.parentNode&&e.after(i.ele),n.forEach(({ele:t})=>(!i||t!==i.ele)&&t.remove())}}class sc{type=2;options;_$committedValue;__directive;_$startNode;_$endNode;_$parent;__isConnected;get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}_$disconnectableChildren=void 0;constructor(t,e,n,i){this._$startNode=t,this._$endNode=e,this._$parent=n,this.options=i,this.__isConnected=i?.isConnected??!0}get parentNode(){let t=this._$startNode.parentNode,e=this._$parent;return void 0!==e&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(t,e=this){this.parentNode&&(iF(t=so(this,t,e))?iJ(t)||""===t?(iJ(this._$committedValue)||this._$clear(),this._$committedValue=void 0):t!==this._$committedValue&&t!==si&&this._commitText(t):t instanceof i9?this._commitTemplateResult(t):void 0!==t.nodeType?this._commitNode(t):Symbol.iterator in t?this._commitIterable(t):this._commitText(t))}_insert(t){return this._$startNode.parentNode.insertBefore(t,this._$endNode)}_commitNode(t){this._$committedValue!==t&&(this._$clear(),this._$committedValue=this._insert(t))}_commitText(t){!iJ(this._$committedValue)&&iF(this._$committedValue)?this._$startNode.nextSibling.data=t:this._commitNode(iB.createTextNode(t)),this._$committedValue=t}_commitTemplateResult(t){let{values:e}=t,n=this._$getTemplate(t);if(this._$committedValue?._$template===n)this._$committedValue._update(e);else{let t=new sl(n,this),i=t._clone(this.options);t._update(e),this._commitNode(i),this._$committedValue=t}}_$getTemplate(t){let e=ss.get(t.strings);return void 0===e&&ss.set(t.strings,e=new sa(t)),e}_commitIterable(t){let e;Array.isArray(this._$committedValue)||(this._$committedValue=[],this._$clear());let n=this._$committedValue,i=0;for(let s of t)i===n.length?n.push(e=new sc(this._insert(iz()),this._insert(iz()),this,this.options)):e=n[i],e._$setValue(s),i++;i<n.length&&(this._$clear(e&&e._$endNode.nextSibling,i),n.length=i)}_$clear(t=this._$startNode.nextSibling,e){for(this._$notifyConnectionChanged?.(!1,!0,e);t&&t!==this._$endNode;){let e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$parent&&(this.__isConnected=t,this._$notifyConnectionChanged?.(t))}}class su{type=1;element;name;options;strings;_$committedValue;__directives;_$parent;_$disconnectableChildren=void 0;get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(t,e,n,i,s){this.element=t,this.name=e,this._$parent=i,this.options=s,n.length>2||""!==n[0]||""!==n[1]?(this._$committedValue=Array(n.length-1).fill(new String),this.strings=n):this._$committedValue=void 0}_$setValue(t,e=this,n,i){let s=this.strings,r=!1;if(void 0===s)(r=!iF(t=so(this,t,e,0))||t!==this._$committedValue)&&(this._$committedValue=t);else{let i,a,o=t;for(t=s[0],i=0;i<s.length-1;i++)a=so(this,o[n+i],e,i),r||=!iF(a)||a!==this._$committedValue[i],iJ(a)?t=void 0:iJ(t)||(t+=a+s[i+1]),this._$committedValue[i]=a}r&&!i&&this._commitValue(t)}_commitValue(t){iJ(t)?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t)}}class sd extends su{type=3;_commitValue(t){this.element[this.name]=t}}class sp extends su{type=4;_commitValue(t){this.element.toggleAttribute(this.name,!!t)}}class sf extends su{type=5;_$setValue(t,e=this){t=so(this,t,e,0);let n=this._$committedValue,i=n&&(!t||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive),s=t&&(!n||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,t),this._$committedValue=t}handleEvent(t){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,t):this._$committedValue.handleEvent(t)}}class sm{element;type=6;__directive;_$committedValue;_$parent;_$disconnectableChildren=void 0;_$props;options;constructor(t,e,n){this.element=t,this._$parent=e,this.options=n}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t){if(t)if(t instanceof sy)t.value=this.element;else if(t._$litDirective$)so(this,t);else{if(this._$props)for(let t in this._$props)Reflect.set(this.element,t,void 0);Object.assign(this.element,t),this._$props=t}}}let sg=()=>new sy;class sy{value}let sb="2.3.1",s$=t=>(...e)=>({_$litDirective$:t,values:e});class s_{__part;__attributeIndex;__directive;_$parent;_$disconnectableChildren;get _$isConnected(){return this._$parent._$isConnected}_$initialize(t,e,n){this.__part=t,this._$parent=e,this.__attributeIndex=n}_$resolve(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}let sS=(t,e,n)=>{let i=t._$startNode.parentNode,s=void 0===e?t._$endNode:e._$startNode;if(void 0===n)n=new sc(i.insertBefore(document.createComment(""),s),i.insertBefore(document.createComment(""),s),t,t.options);else{let e=n._$endNode.nextSibling,r=n._$parent,a=r!==t;if(a){let e;n._$reparentDisconnectables?.(t),n._$parent=t,void 0!==n._$notifyConnectionChanged&&(e=t._$isConnected)!==r._$isConnected&&n._$notifyConnectionChanged(e)}if(e!==s||a){let t=n._$startNode;for(;t!==e;){let e=t.nextSibling;i.insertBefore(t,s),t=e}}}return n},sv=(t,e,n=t)=>(t._$setValue(e,n),t),sw={},sE=t=>{t._$notifyConnectionChanged?.(!1,!0);let e=t._$startNode,n=t._$endNode.nextSibling;for(;e!==n;){let t=e.nextSibling;e.remove(),e=t}},sC=(t,e,n)=>{let i=new Map;for(let s=e;s<=n;s++)i.set(t[s],s);return i},sx=s$(class extends s_{_itemKeys;constructor(t){if(super(),2!==t.type)throw Error("repeat() can only be used in text expressions")}_getValuesAndKeys(t,e,n){let i;void 0===n?n=e:void 0!==e&&(i=e);let s=[],r=[],a=0;for(let e of t)s[a]=i?i(e,a):a,r[a]=n(e,a),a++;return{values:r,keys:s}}render(t,e,n){return this._getValuesAndKeys(t,e,n).values}update(t,[e,n,i]){let s,r,a=t._$committedValue,{values:o,keys:l}=this._getValuesAndKeys(e,n,i);if(!Array.isArray(a))return this._itemKeys=l,o;let h=this._itemKeys??=[],c=[],u=0,d=a.length-1,p=0,f=o.length-1;for(;u<=d&&p<=f;)if(null===a[u])u++;else if(null===a[d])d--;else if(h[u]===l[p])c[p]=sv(a[u],o[p]),u++,p++;else if(h[d]===l[f])c[f]=sv(a[d],o[f]),d--,f--;else if(h[u]===l[f])c[f]=sv(a[u],o[f]),sS(t,c[f+1],a[u]),u++,f--;else if(h[d]===l[p])c[p]=sv(a[d],o[p]),sS(t,a[u],a[d]),d--,p++;else if(void 0===s&&(s=sC(l,p,f),r=sC(h,u,d)),s.has(h[u]))if(s.has(h[d])){let e=r.get(l[p]),n=void 0!==e?a[e]:null;if(null===n){let e=sS(t,a[u]);sv(e,o[p]),c[p]=e}else c[p]=sv(n,o[p]),sS(t,a[u],n),a[e]=null;p++}else sE(a[d]),d--;else sE(a[u]),u++;for(;p<=f;){let e=sS(t,c[f+1]);sv(e,o[p]),c[p++]=e}for(;u<=d;){let t=a[u++];null!==t&&sE(t)}return this._itemKeys=l,((t,e=sw)=>t._$committedValue=e)(t,c),si}});nV(st,(t,e,n)=>{let i=n?.renderBefore??e,s=i._$litPart$;if(void 0===s){let t=n?.renderBefore??null;i._$litPart$=s=new sc(e.insertBefore(iz(),t),t,void 0,n??{})}return s._$setValue(t),s}),globalThis.__GEM_DEVTOOLS__HOOK__&&!globalThis.__GEM_DEVTOOLS__HOOK__.GemElement&&Object.assign(globalThis.__GEM_DEVTOOLS__HOOK__,{...eQ,...eX,...eZ,...e0});let sL=globalThis.history,sP=sL.pushState.bind(sL),sk=sL.replaceState.bind(sL),sT=0,sN=()=>`${performance.now()}-${++sT}`,sO=nM({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),sR=new Map,sM=()=>new Map([...sR].map(([t,e])=>[t,{...e}])),sA=["$key","$hasCloseHandle","$hasOpenHandle","$hasShouldCloseHandle"];function sH(t){return t===sU.basePath?"/":t.replace(RegExp(`^${sU.basePath}/`),"/")}function sI(t){sU.dispatchEvent(new CustomEvent("beforechange")),nE(sO),sO(t)}function sV(t){let e=sU.getParams()||{path:sH(location.pathname),query:new nb,title:document.title},n=t.path?nf(e.path,t.path):sH(location.pathname),i=new nb(t.query??(t.path?"":location.search)),s=String(i)!==String(e.query),r=s?i:e.query,a=n!==e.path||s,o=t.title||(a?"":e.title),l=t.close||t.data||t.open||t.shouldClose,h=decodeURIComponent(t.hash??(!a&&l?location.hash:""));return{...t,title:o,path:n,query:r,hash:h}}function sj(t,e){var n=t.data;if(sO.$key!==n?.$key){for(let t of sA)if(n?.[t])throw new nC(`\`${t}\` is not allowed`)}let i=sV(t),{title:s,path:r,query:a,hash:o,close:l,open:h,shouldClose:c,data:u}=i,d={$hasCloseHandle:!!l,$hasOpenHandle:!!h,$hasShouldCloseHandle:!!c,$key:sN(),$title:s,...u};ne(sR,sM).set(d.$key,i),sI(d);let p=(sU.basePath?sU.basePath+r:r)+new nb(a)+o,f=decodeURIComponent(location.hash);e(d,s,p),f!==o&&dispatchEvent(new CustomEvent("hashchange"))}function sD(t,e,n,i){let{pathname:s,search:r,hash:a}=new URL(n,location.origin+location.pathname);sj({path:s,query:r,hash:a,title:e,data:t},i)}let sW=nM({basePath:""});class sK extends EventTarget{get store(){return sO}get currentKey(){return sO.$key}get basePath(){return sW.basePath}set basePath(t){sW({basePath:t}),Object.assign(this.getParams(),{path:sH(location.pathname)})}getParams(){return ne(sR,sM).get(sO.$key)}updateParams(t){Object.assign(this.getParams(),t),sO()}push(t){sj(t,sP)}replace(t){sj(t,sk)}pushIgnoreCloseHandle(t){sO.$hasCloseHandle?(this.getParams()?.close?.(),this.replace(t)):this.push(t)}forward(){sL.forward()}back(){sL.back()}}let sU=new sK,sG=nM({defaultTitle:document.title,url:"",title:""});if(!globalThis._GEMHISTORY){if(globalThis._GEMHISTORY={history:sU,titleStore:sG,basePathStore:sW},sL.pushState=(t,e,n)=>{sD(t,e,n,sP)},sL.replaceState=(t,e,n)=>{sD(t,e,n,sk)},addEventListener("hashchange",({isTrusted:t})=>{t&&sU.replace({hash:location.hash})}),sL.state)if(sL.state.$hasCloseHandle){sO(sL.state);let t=sV({title:document.title});ne(sR,sM).set(sO.$key,t),sU.back()}else{let t=sV({title:document.title,hash:location.hash});sO({$key:sN(),...sL.state||{}}),ne(sR,sM).set(sO.$key,t)}else{let{protocol:t,pathname:e,search:n,hash:i}=location;(t.startsWith("http")||t.startsWith("tauri"))&&sU.replace({path:e,query:n,hash:i})}nA(sG,()=>{let t=sU.getParams();t&&(t.title=sG.title)}),nA(sO,()=>{let{title:t}=sU.getParams();t!==sG.title&&sG({title:t})});let t=!1;addEventListener("popstate",e=>{let n=e.state;if(n?.$key){if(t){t=!1;return}if(!ne(sR,sM).has(n.$key)){let{pathname:t,search:e,hash:i}=location;ne(sR,sM).set(n.$key,{path:sH(t),query:new nb(e),hash:decodeURIComponent(i),title:sG.title||n.$title,data:n})}if(parseFloat(n.$key)>parseFloat(sO.$key)&&n.$hasOpenHandle)ne(sR,sM).get(n.$key)?.open?.();else if(sO.$hasCloseHandle){let e=ne(sR,sM).get(sO.$key),i=e?.close,s=e?.shouldClose;if(s&&!s()){t=!0,sU.forward();return}i?i():n.$hasCloseHandle&&(t=!0,sU.back())}sI(n)}})}let{history:sq,titleStore:sB,basePathStore:sz}=globalThis._GEMHISTORY;function sF(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}function sJ(t,e,n,i,s,r){var a,o,l,h,c,u,d,p=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,m=Object.create,g=[m(null),m(null)],y=e.length;function b(e,n,i){return function(s,r){n&&(r=s,s=t);for(var a=0;a<e.length;a++)r=e[a].apply(s,i?[r]:[]);return i?r:s}}function $(t,e,n,i){if("function"!=typeof t&&(i||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(i?"":" or undefined"));return t}function _(t,e,n,i,s,r,a,o,l,h,c){function p(t){if(!c(t))throw TypeError("Attempted to access private element on non-instance")}var m=[].concat(e[0]),y=e[3],_=!a,S=1===s,v=3===s,w=4===s,E=2===s;function C(e,n,i){return function(s,r){return n&&(r=s,s=t),i&&i(s),x[e].call(s,r)}}var x={},L=[],P=v?"get":w||S?"set":"value";if(!_&&(l?(h||S?x={get:sF(function(){return y(this)},i,"get"),set:function(t){e[4](this,t)}}:x[P]=y,h||sF(x[P],i,E?"":P)):h||(x=Object.getOwnPropertyDescriptor(t,i)),!h&&!l)){if((d=g[+o][i])&&(d^s)!=7)throw Error("Decorating two elements with the same name ("+x[P].name+") is not supported yet");g[+o][i]=s<3?1:s}for(var k=t,T=m.length-1;T>=0;T-=n?2:1){var N=$(m[T],"A decorator","be",!0),O=n?m[T-1]:void 0,R={},M={kind:["field","accessor","method","getter","setter","class"][s],name:i,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");$(e,"An initializer","be",!0),r.push(e)}).bind(null,R)};if(_){d=N.call(O,k,M),R.v=1,$(d,"class decorators","return")&&(k=d);continue}if(M.static=o,M.private=l,d=M.access={has:l?c.bind():function(t){return i in t}},w||(d.get=l?E?function(t){return p(t),x.value}:C("get",0,p):function(t){return t[i]}),E||v||(d.set=l?C("set",0,p):function(t,e){t[i]=e}),k=N.call(O,S?{get:x.get,set:x.set}:x[P],M),R.v=1,S){if("object"==typeof k&&k)(d=$(k.get,"accessor.get"))&&(x.get=d),(d=$(k.set,"accessor.set"))&&(x.set=d),(d=$(k.init,"accessor.init"))&&L.unshift(d);else if(void 0!==k)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else $(k,(h?"field":"method")+" decorators","return")&&(h?L.unshift(k):x[P]=k)}return s<2&&a.push(b(L,o,1),b(r,o,0)),h||_||(l?S?a.splice(-1,0,C("get",o),C("set",o)):a.push(E?x[P]:$.call.bind(x[P])):f(t,i,x)),k}function S(t){return f(t,p,{configurable:!0,enumerable:!0,value:u})}return void 0!==r&&(u=r[p]),u=m(null==u?null:u),l=[],h=function(t){t&&l.push(b(t))},(c=function(e,i){for(var r=0;r<n.length;r++){var h=n[r],c=h[1],u=7&c;if((8&c)==e&&!u==i){var d=h[2],p=!!h[3],f=16&c;_(e?t:t.prototype,h,f,p?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),u,u<2?[]:e?o=o||[]:a=a||[],l,!!e,p,i,e&&p?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:s)}}})(8,0),c(0,0),c(8,1),c(0,1),h(a),h(o),d=l,y||S(t),{e:d,get c(){var v=[];return y&&[S(t=_(t,[e],i,t.name,5,v)),b(v,1)]}}}let sY=Symbol();i=iM(sq.store),s=iV({role:"dialog",ariaModal:"true"}),a=n3,o=iv();class sZ extends a{static{({e:[l,h,c,u,d,p],c:[f,r]}=sJ(this,[i,s],[[im,0,"label"],[ix,0,"opened"],[o,0,"init",function(t){return t.#M},function(t,e){t.#M=e}]],0,t=>#M in t,a))}label=l(this);opened=(h(this),c(this));#A=void u(this);#H;#I=[];#V=()=>{this.inert=!0,this.#I.forEach(t=>t.inert=!1),this.#A?this.#A.before(this):this.#H&&this.#H?.appendChild(this),this.dispatchEvent(new CustomEvent("close")),this.opened=!1};#j=()=>{this.hidden=!1,this.inert=!1,this.#A=this.nextSibling,this.#H=this.parentElement||this.getRootNode(),this.#I=[...document.body.children].filter(t=>!t.inert),this.#I.forEach(t=>t.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0};#M=d(this,()=>this.inert=!0);open=(p(this),()=>{if(!this.opened)return this.#j(),sq.push({title:this.label,open:this.#j,close:this.#V,shouldClose:this.shouldClose}),sY});shouldClose(){return!0}close=()=>(sq.back(),sY);forceClose=()=>(this.opened=!1,setTimeout(this.close,100),sY);static{r()}}function sQ(t){return t}let sX=Symbol("open mark"),s0=Symbol();function s1(t){let e,n,i,s,r,a,o,l,h,c,u;return e=iA(),n=iV({role:"alertdialog",ariaModal:"true"}),s=n3,r=iw(),a=iw(),new class extends sQ{constructor(){super(u),i()}static [class extends s{static{({e:[o,l,h,c],c:[u,i]}=sJ(this,[e,n],[[r,0,"connectHistory",function(t){return t.#D},function(t,e){t.#D=e}],[a,0,"connectStore",function(t){return t.#W},function(t,e){t.#W=e}]],0,t=>#D in t,s))}constructor(...t){super(...t),c(this)}static get isOpen(){return this.store[sX]}static open(t){let e=new this;this.instance=e,this.inertStore=[...document.body.children].filter(t=>!t.inert),this.inertStore.forEach(t=>t.inert=!0),document.body.append(e);let n=()=>this.store({[sX]:!0,...t});return setTimeout(()=>{n(),sq.push({title:e.label,open:n,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),s0}static close(){return sq.back(),s0}static closeHandle(){return this.inertStore.forEach(t=>t.inert=!1),this.instance?.remove(),this.store({[sX]:!1,...t}),s0}static shouldClose(){return!0}label="";#D=o(this,()=>nA(sq.store,this.update));#W=(l(this),h(this,()=>nA(u.store,this.update)))}];inertStore=[];instance=null;store=nM({[sX]:!1,...t})},u}let s2=/^[\w\-./~]*/,s3=new Map;function s8(t,e){let n=s3.get(t);return n||s3.set(t,n=function(t){let e=s2.exec(t)[0];if(e===t)return e=>e===t?{}:null;if("*"===t)return t=>({0:t});if(!globalThis.URLPattern){let e,n,i;return e=0,n=t.replace(/:[^/$]+|\*/g,t=>"*"===t?`(?<_${e++}>.*)`:`(?<${t.slice(1)}>[^/]+)`),i=RegExp(`^${n}$`),t=>{let e=t.match(i);if(!e)return null;let n={};for(let t in e.groups)n[t.startsWith("_")?t.slice(1):t]=e.groups[t];return n}}let n=new URLPattern({pathname:t}),i=e.replace(/\/$/,"");return t=>t.startsWith(i)?n.exec({pathname:t})?.pathname.groups:null}(t)),n(e)||n(`${e}/`)||null}function s4(t,e){let n=0,i=t.pattern.replaceAll("*",()=>`:${n++}`),s=e?.params;return s&&Object.keys(s).forEach(t=>{i=i.replace(RegExp(`:${t}`,"g"),s[t])}),i}function s6(t,e){return{path:s4(t,e),...e}}let s5=nH``,s9=new Map,s7=!1;m=iH({penetrable:!0}),y=n3,b=i_(t=>[t.scrollContainer]),$=i_(t=>[t.scrollContainer]),_=iE(t=>!t.inert),new class extends sQ{constructor(){super(ti),g()}static [class extends y{static{({e:[S,v,w,E,C,x,L,P,k,T,N,O,R,M,A,H,I,V,j,D,W,K,U,G,q,B,z,F,J,Y,Z,Q],c:[ti,g]}=sJ(this,[m],[[ig,0,"transition"],[ib,0,"routes"],[ib,0,"locationStore"],[ib,0,"key"],[iT,0,"loading"],[iT,0,"beforeroutechange"],[iT,0,"routechange"],[iT,0,"error"],[ib,0,"scrollContainer"],[ib,0,"scrollWait"],[ib,0,"scrollIgnoreHash"],[ib,0,"trigger"],[b,0,"rememberScrollPosition",function(t){return t.#K},function(t,e){t.#K=e}],[$,0,"connectTriggerStore",function(t){return t.#U},function(t,e){t.#U=e}],[i_(t=>t.#G()),0,"updateContent",function(t){return t.#q},function(t,e){t.#q=e}],[_,0,"content",function(t){return t.#o},function(t,e){t.#o=e}]],0,t=>#K in t,y))}transition=S(this);routes=(v(this),w(this));locationStore=(E(this),C(this));key=(x(this),L(this));loading=(P(this),k(this));beforeroutechange=(T(this),N(this));routechange=(O(this),R(this));error=(M(this),A(this));scrollContainer=(H(this),I(this));scrollWait=(V(this),j(this));scrollIgnoreHash=(D(this),W(this));trigger=(K(this),U(this,sq));currentRoute=void G(this);currentParams={};get #B(){return"function"==typeof this.scrollContainer?this.scrollContainer():this.scrollContainer}#z=t({content:s5});#F=()=>{if(!this.locationStore)return;let{path:t,query:e,hash:n,data:i}=sq.getParams();this.locationStore({path:t,params:this.currentParams,query:e,hash:n,data:i})};#J;#Y=async()=>{let t=this.#B,e=sq.currentKey;if(!t||e===this.#J)return;this.#J=e;let n=s9.get(e);if(!s7&&void 0!==n){await this.scrollWait?.(),e===sq.currentKey&&t.scroll(0,n);return}(s7||t!==document.scrollingElement)&&(this.scrollIgnoreHash||!sq.getParams().hash)&&t.scroll(0,0)};#Z;#Q=(t,e,n)=>{this.beforeroutechange(t),this.#Z=void 0,this.currentRoute=t,this.currentParams=e;let i=async()=>{this.#z({content:n}),this.#F(),await Promise.resolve(),this.#Y(),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>i()):i()};#K=q(this,()=>{if(this.scrollContainer)return nm(sq,"beforechange",()=>{s7=globalThis.history.state?.$key===sq.currentKey;let t=this.#B;t&&s9.set(sq.currentKey,t.scrollTop)})});#U=(B(this),z(this,()=>this.trigger.store&&nA(this.trigger.store,()=>this.#z())));#G=(F(this),()=>{let{path:t,query:e,hash:n}=this.trigger.getParams();return[this.key,t,e,n]});#q=J(this,([t,e],n)=>{n&&t===n[0]&&e===n[1]?this.#F():this.update()});#o=(Y(this),Z(this,()=>{let{content:t}=this.#z;if(void 0!==t){if(!this.shadowRoot){if(t===s5)return;return nH`${t}`}return t===s5?nH`<slot></slot>`:t}}));update=(Q(this),async()=>{let{path:t,hash:e,query:n}=this.trigger.getParams(),{route:i,params:s={}}=ts.findRoute(this.routes,t),{redirect:r,content:a,getContent:o}=i||{};if(r)return void this.trigger.replace({path:s4({pattern:r},{params:s}),query:n,hash:e});this.trigger===sq&&(location.href!==sB.url||i?.title)&&sB({url:location.href,title:i?.title});let l=a||o?.(s,this.shadowRoot||this);this.loading(i),this.#Z=l;let h=()=>this.#Z===l;try{let t=await l;h()&&this.#Q(i,s,t)}catch(t){h()&&this.error(t)}})}];createLocationStore=()=>{let{path:t,query:e,hash:n,data:i}=sq.getParams();return nM({path:t,query:e,hash:n,data:i,params:{}})};findRoute=(t=[],e)=>{let n=null;for(let i of Array.isArray(t)?t:Object.values(t))if("*"===i.pattern)n=i;else{let t=s8(i.pattern,e);if(t)return{route:i,params:t}}return{route:n}}};let rt=nY`
3
+ \f\r"'\`<>=]`,iQ=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,iX=/-->/g,i0=/>/g,i1=RegExp(`>|${iY}(?:([^\\s"'>=/]+)(${iY}*=${iY}*(?:${iZ}|("|')|))|$)`,"g"),i2=/'/g,i3=/"/g,i8=/^(?:script|style|textarea|title)$/i,i4="v-if",i6="v-else-if",i5="v-else";class i9{type;strings;values;constructor(t,e,n){this.type=t,this.strings=e,this.values=n}}let i7=t=>(e,...n)=>new i9(t,e,n),st=i7(1),se=i7(2),sn=i7(3),si=Symbol.for("lit-noChange"),ss=new WeakMap,sr=iB.createTreeWalker(iB,129);class sa{el;parts=[];constructor({strings:t,type:e},n){let i,s=0,r=0;const a=t.length-1,o=this.parts,[l,h]=((t,e)=>{let n,i=t.length-1,s=[],r=2===e?"<svg>":3===e?"<math>":"",a=iQ;for(let e=0;e<i;e++){let i,o,l=t[e],h=-1,c=0;for(;c<l.length&&(a.lastIndex=c,null!==(o=a.exec(l)));)c=a.lastIndex,a===iQ?"!--"===o[1]?a=iX:void 0!==o[1]?a=i0:void 0!==o[2]?(i8.test(o[2])&&(n=RegExp(`</${o[2]}`,"g")),a=i1):void 0!==o[3]&&(a=i1):a===i1?">"===o[0]?(a=n??iQ,h=-1):void 0===o[1]?h=-2:(h=a.lastIndex-o[2].length,i=o[1],a=void 0===o[3]?i1:'"'===o[3]?i3:i2):a===i3||a===i2?a=i1:a===iX||a===i0?a=iQ:(a=i1,n=void 0);let u=a===i1&&t[e+1].startsWith("/>")?" ":"";r+=a===iQ?l+iq:h>=0?(s.push(i),l.slice(0,h)+iK+l.slice(h)+iU+u):l+iU+(-2===h?e:u)}let o=r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"");return[function(t,e){if(!Array.isArray(t))throw Error("invalid template");return void 0!==iW?iW.createHTML(e):e}(t,o),s]})(t,e);if(this.el=sa.createElement(l,n),sr.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=sr.nextNode())&&o.length<a;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(iK)){const e=h[r++],n=i.getAttribute(t).split(iU),a=/([.?@])?(.*)/.exec(e);o.push({type:1,index:s,name:a[2],strings:n,ctor:"."===a[1]?sd:"?"===a[1]?sp:"@"===a[1]?sf:su}),i.removeAttribute(t)}else t.startsWith(iU)&&(o.push({type:6,index:s}),i.removeAttribute(t));if(i8.test(i.tagName)){const t=i.textContent.split(iU),e=t.length-1;if(e>0){i.textContent=iD?iD.emptyScript:"";for(let n=0;n<e;n++)i.append(t[n],iz()),sr.nextNode(),o.push({type:2,index:++s});i.append(t[e],iz())}}}else if(8===i.nodeType)if(i.data===iG)o.push({type:2,index:s});else{let t=-1;for(;-1!==(t=i.data.indexOf(iU,t+1));)o.push({type:7,index:s}),t+=iU.length-1}s++}}static createElement(t,e){let n=iB.createElement("template");return n.innerHTML=t,n}}function so(t,e,n=t,i){if(e===si)return e;let s=void 0!==i?n.__directives?.[i]:n.__directive,r=iF(e)?void 0:e._$litDirective$;return s?.constructor!==r&&(s?._$notifyDirectiveConnectionChanged?.(!1),void 0===r?s=void 0:(s=new r(t))._$initialize(t,n,i),void 0!==i?(n.__directives??=[])[i]=s:n.__directive=s),void 0!==s&&(e=so(t,s._$resolve(t,e.values),s,i)),e}class sl{_$template;_$parts=[];_$conditions=[];_$parent;_$disconnectableChildren=void 0;constructor(t,e){this._$template=t,this._$parent=e}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(t){let{el:{content:e},parts:n}=this._$template,i=new Map,s=new Map,r=(t?.creationScope??iB).importNode(e,!0);sr.currentNode=r;let a=sr.nextNode(),o=0,l=0,h=n[0];for(;void 0!==h;){if(o===h.index){let e;2===h.type?e=new sc(a,a.nextSibling,this,t):1===h.type?(h.name===i4&&i.set(a,l),h.name===i6&&s.set(a,l),e=new h.ctor(a,h.name,h.strings,this,t)):6===h.type&&(e=new sm(a,this,t)),this._$parts.push(e),h=n[++l]}o!==h?.index&&(a=sr.nextNode(),o++)}let c=new Map;for(let t of(i.forEach((t,e)=>{let n=new sh(e,t);this._$conditions.push(n),c.set(e,n);let i=e;for(;i=i.nextElementSibling;){let t=s.get(i);if(void 0===t)break;n.push(i,t)}}),this._$parts)){if(t?.type!==2)continue;let e=c.get(t._$endNode);e&&(t._$endNode=e.mark)}return sr.currentNode=iB,r}_update(t){let e=0;for(let n of this._$parts)void 0!==n&&(void 0!==n.strings?(n._$setValue(t,n,e),e+=n.strings.length-2):n.name===i4||n.name===i6||n._$setValue(t[e])),e++;this._$conditions.forEach(e=>e.update(t))}}class sh{mark;list;constructor(t,e){const n=iz();n._$chain=this,t.before(n),this.mark=n,this.list=[{ele:t,idx:e}],this.check()}get next(){return this.list.at(-1).ele.nextElementSibling}push(t,e){this.list.push({ele:t,idx:e}),this.check()}check(){let t=this.next;t?.attributes.getNamedItem(i5)&&(this.list.push({ele:t}),t.removeAttribute(i5))}update(t){let{mark:e,list:n}=this,i=n.find(({idx:e})=>void 0===e||!!t[e]);i&&!i.ele.parentNode&&e.after(i.ele),n.forEach(({ele:t})=>(!i||t!==i.ele)&&t.remove())}}class sc{type=2;options;_$committedValue;__directive;_$startNode;_$endNode;_$parent;__isConnected;get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}_$disconnectableChildren=void 0;constructor(t,e,n,i){this._$startNode=t,this._$endNode=e,this._$parent=n,this.options=i,this.__isConnected=i?.isConnected??!0}get parentNode(){let t=this._$startNode.parentNode,e=this._$parent;return void 0!==e&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(t,e=this){this.parentNode&&(iF(t=so(this,t,e))?iJ(t)||""===t?(iJ(this._$committedValue)||this._$clear(),this._$committedValue=void 0):t!==this._$committedValue&&t!==si&&this._commitText(t):t instanceof i9?this._commitTemplateResult(t):void 0!==t.nodeType?this._commitNode(t):Symbol.iterator in t?this._commitIterable(t):this._commitText(t))}_insert(t){return this._$startNode.parentNode.insertBefore(t,this._$endNode)}_commitNode(t){this._$committedValue!==t&&(this._$clear(),this._$committedValue=this._insert(t))}_commitText(t){!iJ(this._$committedValue)&&iF(this._$committedValue)?this._$startNode.nextSibling.data=t:this._commitNode(iB.createTextNode(t)),this._$committedValue=t}_commitTemplateResult(t){let{values:e}=t,n=this._$getTemplate(t);if(this._$committedValue?._$template===n)this._$committedValue._update(e);else{let t=new sl(n,this),i=t._clone(this.options);t._update(e),this._commitNode(i),this._$committedValue=t}}_$getTemplate(t){let e=ss.get(t.strings);return void 0===e&&ss.set(t.strings,e=new sa(t)),e}_commitIterable(t){let e;Array.isArray(this._$committedValue)||(this._$committedValue=[],this._$clear());let n=this._$committedValue,i=0;for(let s of t)i===n.length?n.push(e=new sc(this._insert(iz()),this._insert(iz()),this,this.options)):e=n[i],e._$setValue(s),i++;i<n.length&&(this._$clear(e&&e._$endNode.nextSibling,i),n.length=i)}_$clear(t=this._$startNode.nextSibling,e){for(this._$notifyConnectionChanged?.(!1,!0,e);t&&t!==this._$endNode;){let e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$parent&&(this.__isConnected=t,this._$notifyConnectionChanged?.(t))}}class su{type=1;element;name;options;strings;_$committedValue;__directives;_$parent;_$disconnectableChildren=void 0;get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(t,e,n,i,s){this.element=t,this.name=e,this._$parent=i,this.options=s,n.length>2||""!==n[0]||""!==n[1]?(this._$committedValue=Array(n.length-1).fill(new String),this.strings=n):this._$committedValue=void 0}_$setValue(t,e=this,n,i){let s=this.strings,r=!1;if(void 0===s)(r=!iF(t=so(this,t,e,0))||t!==this._$committedValue)&&(this._$committedValue=t);else{let i,a,o=t;for(t=s[0],i=0;i<s.length-1;i++)a=so(this,o[n+i],e,i),r||=!iF(a)||a!==this._$committedValue[i],iJ(a)?t=void 0:iJ(t)||(t+=a+s[i+1]),this._$committedValue[i]=a}r&&!i&&this._commitValue(t)}_commitValue(t){iJ(t)?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t)}}class sd extends su{type=3;_commitValue(t){this.element[this.name]=t}}class sp extends su{type=4;_commitValue(t){this.element.toggleAttribute(this.name,!!t)}}class sf extends su{type=5;_$setValue(t,e=this){t=so(this,t,e,0);let n=this._$committedValue,i=n&&(!t||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive),s=t&&(!n||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,t),this._$committedValue=t}handleEvent(t){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,t):this._$committedValue.handleEvent(t)}}class sm{element;type=6;__directive;_$committedValue;_$parent;_$disconnectableChildren=void 0;_$props;options;constructor(t,e,n){this.element=t,this._$parent=e,this.options=n}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t){if(t)if(t instanceof sy)t.value=this.element;else if(t._$litDirective$)so(this,t);else{if(this._$props)for(let t in this._$props)Reflect.set(this.element,t,void 0);Object.assign(this.element,t),this._$props=t}}}let sg=()=>new sy;class sy{value}let sb="2.3.2",s$=t=>(...e)=>({_$litDirective$:t,values:e});class s_{__part;__attributeIndex;__directive;_$parent;_$disconnectableChildren;get _$isConnected(){return this._$parent._$isConnected}_$initialize(t,e,n){this.__part=t,this._$parent=e,this.__attributeIndex=n}_$resolve(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}let sS=(t,e,n)=>{let i=t._$startNode.parentNode,s=void 0===e?t._$endNode:e._$startNode;if(void 0===n)n=new sc(i.insertBefore(document.createComment(""),s),i.insertBefore(document.createComment(""),s),t,t.options);else{let e=n._$endNode.nextSibling,r=n._$parent,a=r!==t;if(a){let e;n._$reparentDisconnectables?.(t),n._$parent=t,void 0!==n._$notifyConnectionChanged&&(e=t._$isConnected)!==r._$isConnected&&n._$notifyConnectionChanged(e)}if(e!==s||a){let t=n._$startNode;for(;t!==e;){let e=t.nextSibling;i.insertBefore(t,s),t=e}}}return n},sv=(t,e,n=t)=>(t._$setValue(e,n),t),sw={},sE=t=>{t._$notifyConnectionChanged?.(!1,!0);let e=t._$startNode,n=t._$endNode.nextSibling;for(;e!==n;){let t=e.nextSibling;e.remove(),e=t}},sC=(t,e,n)=>{let i=new Map;for(let s=e;s<=n;s++)i.set(t[s],s);return i},sx=s$(class extends s_{_itemKeys;constructor(t){if(super(),2!==t.type)throw Error("repeat() can only be used in text expressions")}_getValuesAndKeys(t,e,n){let i;void 0===n?n=e:void 0!==e&&(i=e);let s=[],r=[],a=0;for(let e of t)s[a]=i?i(e,a):a,r[a]=n(e,a),a++;return{values:r,keys:s}}render(t,e,n){return this._getValuesAndKeys(t,e,n).values}update(t,[e,n,i]){let s,r,a=t._$committedValue,{values:o,keys:l}=this._getValuesAndKeys(e,n,i);if(!Array.isArray(a))return this._itemKeys=l,o;let h=this._itemKeys??=[],c=[],u=0,d=a.length-1,p=0,f=o.length-1;for(;u<=d&&p<=f;)if(null===a[u])u++;else if(null===a[d])d--;else if(h[u]===l[p])c[p]=sv(a[u],o[p]),u++,p++;else if(h[d]===l[f])c[f]=sv(a[d],o[f]),d--,f--;else if(h[u]===l[f])c[f]=sv(a[u],o[f]),sS(t,c[f+1],a[u]),u++,f--;else if(h[d]===l[p])c[p]=sv(a[d],o[p]),sS(t,a[u],a[d]),d--,p++;else if(void 0===s&&(s=sC(l,p,f),r=sC(h,u,d)),s.has(h[u]))if(s.has(h[d])){let e=r.get(l[p]),n=void 0!==e?a[e]:null;if(null===n){let e=sS(t,a[u]);sv(e,o[p]),c[p]=e}else c[p]=sv(n,o[p]),sS(t,a[u],n),a[e]=null;p++}else sE(a[d]),d--;else sE(a[u]),u++;for(;p<=f;){let e=sS(t,c[f+1]);sv(e,o[p]),c[p++]=e}for(;u<=d;){let t=a[u++];null!==t&&sE(t)}return this._itemKeys=l,((t,e=sw)=>t._$committedValue=e)(t,c),si}});nV(st,(t,e,n)=>{let i=n?.renderBefore??e,s=i._$litPart$;if(void 0===s){let t=n?.renderBefore??null;i._$litPart$=s=new sc(e.insertBefore(iz(),t),t,void 0,n??{})}return s._$setValue(t),s}),globalThis.__GEM_DEVTOOLS__HOOK__&&!globalThis.__GEM_DEVTOOLS__HOOK__.GemElement&&Object.assign(globalThis.__GEM_DEVTOOLS__HOOK__,{...eQ,...eX,...eZ,...e0});let sL=globalThis.history,sP=sL.pushState.bind(sL),sk=sL.replaceState.bind(sL),sT=0,sN=()=>`${performance.now()}-${++sT}`,sO=nM({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),sR=new Map,sM=()=>new Map([...sR].map(([t,e])=>[t,{...e}])),sA=["$key","$hasCloseHandle","$hasOpenHandle","$hasShouldCloseHandle"];function sH(t){return t===sU.basePath?"/":t.replace(RegExp(`^${sU.basePath}/`),"/")}function sI(t){sU.dispatchEvent(new CustomEvent("beforechange")),nE(sO),sO(t)}function sV(t){let e=sU.getParams()||{path:sH(location.pathname),query:new nb,title:document.title},n=t.path?nf(e.path,t.path):sH(location.pathname),i=new nb(t.query??(t.path?"":location.search)),s=String(i)!==String(e.query),r=s?i:e.query,a=n!==e.path||s,o=t.title||(a?"":e.title),l=t.close||t.data||t.open||t.shouldClose,h=decodeURIComponent(t.hash??(!a&&l?location.hash:""));return{...t,title:o,path:n,query:r,hash:h}}function sj(t,e){var n=t.data;if(sO.$key!==n?.$key){for(let t of sA)if(n?.[t])throw new nC(`\`${t}\` is not allowed`)}let i=sV(t),{title:s,path:r,query:a,hash:o,close:l,open:h,shouldClose:c,data:u}=i,d={$hasCloseHandle:!!l,$hasOpenHandle:!!h,$hasShouldCloseHandle:!!c,$key:sN(),$title:s,...u};ne(sR,sM).set(d.$key,i),sI(d);let p=(sU.basePath?sU.basePath+r:r)+new nb(a)+o,f=decodeURIComponent(location.hash);e(d,s,p),f!==o&&dispatchEvent(new CustomEvent("hashchange"))}function sD(t,e,n,i){let{pathname:s,search:r,hash:a}=new URL(n,location.origin+location.pathname);sj({path:s,query:r,hash:a,title:e,data:t},i)}let sW=nM({basePath:""});class sK extends EventTarget{get store(){return sO}get currentKey(){return sO.$key}get basePath(){return sW.basePath}set basePath(t){sW({basePath:t}),Object.assign(this.getParams(),{path:sH(location.pathname)})}getParams(){return ne(sR,sM).get(sO.$key)}updateParams(t){Object.assign(this.getParams(),t),sO()}push(t){sj(t,sP)}replace(t){sj(t,sk)}pushIgnoreCloseHandle(t){sO.$hasCloseHandle?(this.getParams()?.close?.(),this.replace(t)):this.push(t)}forward(){sL.forward()}back(){sL.back()}}let sU=new sK,sG=nM({defaultTitle:document.title,url:"",title:""});if(!globalThis._GEMHISTORY){if(globalThis._GEMHISTORY={history:sU,titleStore:sG,basePathStore:sW},sL.pushState=(t,e,n)=>{sD(t,e,n,sP)},sL.replaceState=(t,e,n)=>{sD(t,e,n,sk)},addEventListener("hashchange",({isTrusted:t})=>{t&&sU.replace({hash:location.hash})}),sL.state)if(sL.state.$hasCloseHandle){sO(sL.state);let t=sV({title:document.title});ne(sR,sM).set(sO.$key,t),sU.back()}else{let t=sV({title:document.title,hash:location.hash});sO({$key:sN(),...sL.state||{}}),ne(sR,sM).set(sO.$key,t)}else{let{protocol:t,pathname:e,search:n,hash:i}=location;(t.startsWith("http")||t.startsWith("tauri"))&&sU.replace({path:e,query:n,hash:i})}nA(sG,()=>{let t=sU.getParams();t&&(t.title=sG.title)}),nA(sO,()=>{let{title:t}=sU.getParams();t!==sG.title&&sG({title:t})});let t=!1;addEventListener("popstate",e=>{let n=e.state;if(n?.$key){if(t){t=!1;return}if(!ne(sR,sM).has(n.$key)){let{pathname:t,search:e,hash:i}=location;ne(sR,sM).set(n.$key,{path:sH(t),query:new nb(e),hash:decodeURIComponent(i),title:sG.title||n.$title,data:n})}if(parseFloat(n.$key)>parseFloat(sO.$key)&&n.$hasOpenHandle)ne(sR,sM).get(n.$key)?.open?.();else if(sO.$hasCloseHandle){let e=ne(sR,sM).get(sO.$key),i=e?.close,s=e?.shouldClose;if(s&&!s()){t=!0,sU.forward();return}i?i():n.$hasCloseHandle&&(t=!0,sU.back())}sI(n)}})}let{history:sq,titleStore:sB,basePathStore:sz}=globalThis._GEMHISTORY;function sF(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}function sJ(t,e,n,i,s,r){var a,o,l,h,c,u,d,p=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,m=Object.create,g=[m(null),m(null)],y=e.length;function b(e,n,i){return function(s,r){n&&(r=s,s=t);for(var a=0;a<e.length;a++)r=e[a].apply(s,i?[r]:[]);return i?r:s}}function $(t,e,n,i){if("function"!=typeof t&&(i||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(i?"":" or undefined"));return t}function _(t,e,n,i,s,r,a,o,l,h,c){function p(t){if(!c(t))throw TypeError("Attempted to access private element on non-instance")}var m=[].concat(e[0]),y=e[3],_=!a,S=1===s,v=3===s,w=4===s,E=2===s;function C(e,n,i){return function(s,r){return n&&(r=s,s=t),i&&i(s),x[e].call(s,r)}}var x={},L=[],P=v?"get":w||S?"set":"value";if(!_&&(l?(h||S?x={get:sF(function(){return y(this)},i,"get"),set:function(t){e[4](this,t)}}:x[P]=y,h||sF(x[P],i,E?"":P)):h||(x=Object.getOwnPropertyDescriptor(t,i)),!h&&!l)){if((d=g[+o][i])&&(d^s)!=7)throw Error("Decorating two elements with the same name ("+x[P].name+") is not supported yet");g[+o][i]=s<3?1:s}for(var k=t,T=m.length-1;T>=0;T-=n?2:1){var N=$(m[T],"A decorator","be",!0),O=n?m[T-1]:void 0,R={},M={kind:["field","accessor","method","getter","setter","class"][s],name:i,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");$(e,"An initializer","be",!0),r.push(e)}).bind(null,R)};if(_){d=N.call(O,k,M),R.v=1,$(d,"class decorators","return")&&(k=d);continue}if(M.static=o,M.private=l,d=M.access={has:l?c.bind():function(t){return i in t}},w||(d.get=l?E?function(t){return p(t),x.value}:C("get",0,p):function(t){return t[i]}),E||v||(d.set=l?C("set",0,p):function(t,e){t[i]=e}),k=N.call(O,S?{get:x.get,set:x.set}:x[P],M),R.v=1,S){if("object"==typeof k&&k)(d=$(k.get,"accessor.get"))&&(x.get=d),(d=$(k.set,"accessor.set"))&&(x.set=d),(d=$(k.init,"accessor.init"))&&L.unshift(d);else if(void 0!==k)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else $(k,(h?"field":"method")+" decorators","return")&&(h?L.unshift(k):x[P]=k)}return s<2&&a.push(b(L,o,1),b(r,o,0)),h||_||(l?S?a.splice(-1,0,C("get",o),C("set",o)):a.push(E?x[P]:$.call.bind(x[P])):f(t,i,x)),k}function S(t){return f(t,p,{configurable:!0,enumerable:!0,value:u})}return void 0!==r&&(u=r[p]),u=m(null==u?null:u),l=[],h=function(t){t&&l.push(b(t))},(c=function(e,i){for(var r=0;r<n.length;r++){var h=n[r],c=h[1],u=7&c;if((8&c)==e&&!u==i){var d=h[2],p=!!h[3],f=16&c;_(e?t:t.prototype,h,f,p?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),u,u<2?[]:e?o=o||[]:a=a||[],l,!!e,p,i,e&&p?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:s)}}})(8,0),c(0,0),c(8,1),c(0,1),h(a),h(o),d=l,y||S(t),{e:d,get c(){var v=[];return y&&[S(t=_(t,[e],i,t.name,5,v)),b(v,1)]}}}let sY=Symbol();i=iM(sq.store),s=iV({role:"dialog",ariaModal:"true"}),a=n3,o=iv();class sZ extends a{static{({e:[l,h,c,u,d,p],c:[f,r]}=sJ(this,[i,s],[[im,0,"label"],[ix,0,"opened"],[o,0,"init",function(t){return t.#M},function(t,e){t.#M=e}]],0,t=>#M in t,a))}label=l(this);opened=(h(this),c(this));#A=void u(this);#H;#I=[];#V=()=>{this.inert=!0,this.#I.forEach(t=>t.inert=!1),this.#A?this.#A.before(this):this.#H&&this.#H?.appendChild(this),this.dispatchEvent(new CustomEvent("close")),this.opened=!1};#j=()=>{this.hidden=!1,this.inert=!1,this.#A=this.nextSibling,this.#H=this.parentElement||this.getRootNode(),this.#I=[...document.body.children].filter(t=>!t.inert),this.#I.forEach(t=>t.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0};#M=d(this,()=>this.inert=!0);open=(p(this),()=>{if(!this.opened)return this.#j(),sq.push({title:this.label,open:this.#j,close:this.#V,shouldClose:this.shouldClose}),sY});shouldClose(){return!0}close=()=>(sq.back(),sY);forceClose=()=>(this.opened=!1,setTimeout(this.close,100),sY);static{r()}}function sQ(t){return t}let sX=Symbol("open mark"),s0=Symbol();function s1(t){let e,n,i,s,r,a,o,l,h,c,u;return e=iA(),n=iV({role:"alertdialog",ariaModal:"true"}),s=n3,r=iw(),a=iw(),new class extends sQ{constructor(){super(u),i()}static [class extends s{static{({e:[o,l,h,c],c:[u,i]}=sJ(this,[e,n],[[r,0,"connectHistory",function(t){return t.#D},function(t,e){t.#D=e}],[a,0,"connectStore",function(t){return t.#W},function(t,e){t.#W=e}]],0,t=>#D in t,s))}constructor(...t){super(...t),c(this)}static get isOpen(){return this.store[sX]}static open(t){let e=new this;this.instance=e,this.inertStore=[...document.body.children].filter(t=>!t.inert),this.inertStore.forEach(t=>t.inert=!0),document.body.append(e);let n=()=>this.store({[sX]:!0,...t});return setTimeout(()=>{n(),sq.push({title:e.label,open:n,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),s0}static close(){return sq.back(),s0}static closeHandle(){return this.inertStore.forEach(t=>t.inert=!1),this.instance?.remove(),this.store({[sX]:!1,...t}),s0}static shouldClose(){return!0}label="";#D=o(this,()=>nA(sq.store,this.update));#W=(l(this),h(this,()=>nA(u.store,this.update)))}];inertStore=[];instance=null;store=nM({[sX]:!1,...t})},u}let s2=/^[\w\-./~]*/,s3=new Map;function s8(t,e){let n=s3.get(t);return n||s3.set(t,n=function(t){let e=s2.exec(t)[0];if(e===t)return e=>e===t?{}:null;if("*"===t)return t=>({0:t});if(!globalThis.URLPattern){let e,n,i;return e=0,n=t.replace(/:[^/$]+|\*/g,t=>"*"===t?`(?<_${e++}>.*)`:`(?<${t.slice(1)}>[^/]+)`),i=RegExp(`^${n}$`),t=>{let e=t.match(i);if(!e)return null;let n={};for(let t in e.groups)n[t.startsWith("_")?t.slice(1):t]=e.groups[t];return n}}let n=new URLPattern({pathname:t}),i=e.replace(/\/$/,"");return t=>t.startsWith(i)?n.exec({pathname:t})?.pathname.groups:null}(t)),n(e)||n(`${e}/`)||null}function s4(t,e){let n=0,i=t.pattern.replaceAll("*",()=>`:${n++}`),s=e?.params;return s&&Object.keys(s).forEach(t=>{i=i.replace(RegExp(`:${t}`,"g"),s[t])}),i}function s6(t,e){return{path:s4(t,e),...e}}let s5=nH``,s9=new Map,s7=!1;m=iH({penetrable:!0}),y=n3,b=i_(t=>[t.scrollContainer]),$=i_(t=>[t.scrollContainer]),_=iE(t=>!t.inert),new class extends sQ{constructor(){super(ti),g()}static [class extends y{static{({e:[S,v,w,E,C,x,L,P,k,T,N,O,R,M,A,H,I,V,j,D,W,K,U,G,q,B,z,F,J,Y,Z,Q],c:[ti,g]}=sJ(this,[m],[[ig,0,"transition"],[ib,0,"routes"],[ib,0,"locationStore"],[ib,0,"key"],[iT,0,"loading"],[iT,0,"beforeroutechange"],[iT,0,"routechange"],[iT,0,"error"],[ib,0,"scrollContainer"],[ib,0,"scrollWait"],[ib,0,"scrollIgnoreHash"],[ib,0,"trigger"],[b,0,"rememberScrollPosition",function(t){return t.#K},function(t,e){t.#K=e}],[$,0,"connectTriggerStore",function(t){return t.#U},function(t,e){t.#U=e}],[i_(t=>t.#G()),0,"updateContent",function(t){return t.#q},function(t,e){t.#q=e}],[_,0,"content",function(t){return t.#o},function(t,e){t.#o=e}]],0,t=>#K in t,y))}transition=S(this);routes=(v(this),w(this));locationStore=(E(this),C(this));key=(x(this),L(this));loading=(P(this),k(this));beforeroutechange=(T(this),N(this));routechange=(O(this),R(this));error=(M(this),A(this));scrollContainer=(H(this),I(this));scrollWait=(V(this),j(this));scrollIgnoreHash=(D(this),W(this));trigger=(K(this),U(this,sq));currentRoute=void G(this);currentParams={};get #B(){return"function"==typeof this.scrollContainer?this.scrollContainer():this.scrollContainer}#z=t({content:s5});#F=()=>{if(!this.locationStore)return;let{path:t,query:e,hash:n,data:i}=sq.getParams();this.locationStore({path:t,params:this.currentParams,query:e,hash:n,data:i})};#J;#Y=async()=>{let t=this.#B,e=sq.currentKey;if(!t||e===this.#J)return;this.#J=e;let n=s9.get(e);if(!s7&&void 0!==n){await this.scrollWait?.(),e===sq.currentKey&&t.scroll(0,n);return}(s7||t!==document.scrollingElement)&&(this.scrollIgnoreHash||!sq.getParams().hash)&&t.scroll(0,0)};#Z;#Q=(t,e,n)=>{this.beforeroutechange(t),this.#Z=void 0,this.currentRoute=t,this.currentParams=e;let i=async()=>{this.#z({content:n}),this.#F(),await Promise.resolve(),this.#Y(),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>i()):i()};#K=q(this,()=>{if(this.scrollContainer)return nm(sq,"beforechange",()=>{s7=globalThis.history.state?.$key===sq.currentKey;let t=this.#B;t&&s9.set(sq.currentKey,t.scrollTop)})});#U=(B(this),z(this,()=>this.trigger.store&&nA(this.trigger.store,()=>this.#z())));#G=(F(this),()=>{let{path:t,query:e,hash:n}=this.trigger.getParams();return[this.key,t,e,n]});#q=J(this,([t,e],n)=>{n&&t===n[0]&&e===n[1]?this.#F():this.update()});#o=(Y(this),Z(this,()=>{let{content:t}=this.#z;if(void 0!==t){if(!this.shadowRoot){if(t===s5)return;return nH`${t}`}return t===s5?nH`<slot></slot>`:t}}));update=(Q(this),async()=>{let{path:t,hash:e,query:n}=this.trigger.getParams(),{route:i,params:s={}}=ts.findRoute(this.routes,t),{redirect:r,content:a,getContent:o}=i||{};if(r)return void this.trigger.replace({path:s4({pattern:r},{params:s}),query:n,hash:e});this.trigger===sq&&(location.href!==sB.url||i?.title)&&sB({url:location.href,title:i?.title});let l=a||o?.(s,this.shadowRoot||this);this.loading(i),this.#Z=l;let h=()=>this.#Z===l;try{let t=await l;h()&&this.#Q(i,s,t)}catch(t){h()&&this.error(t)}})}];createLocationStore=()=>{let{path:t,query:e,hash:n,data:i}=sq.getParams();return nM({path:t,query:e,hash:n,data:i,params:{}})};findRoute=(t=[],e)=>{let n=null;for(let i of Array.isArray(t)?t:Object.values(t))if("*"===i.pattern)n=i;else{let t=s8(i.pattern,e);if(t)return{route:i,params:t}}return{route:n}}};let rt=nY`
4
4
  :host(:where(:not([hidden]))),
5
5
  :not(:defined) {
6
6
  display: contents;
package/dist/gem.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  let t,e,n,i,s,r,a,o,l,h,c,u,d,p,f,m,g,y,b,_,$,S,v,w,E,C,P,L,x,k,T,O,N,R,M,A,H,I,V,j,D,W,K,U,G,q,B,z,F,J,Y,Z,Q,X,tt,te,tn,ti,ts,tr,ta,to,tl,th,tc,tu,td,tp,tf,tm,tg,ty,tb,t_,t$,tS,tv,tw,tE,tC,tP,tL,tx,tk,tT,tO,tN,tR,tM,tA,tH,tI,tV,tj,tD,tW,tK,tU,tG,tq,tB,tz,tF,tJ,tY,tZ,tQ,tX,t0,t1,t2,t3,t8,t4,t6,t5,t9,t7,et,ee,en,ei,es,er,ea,eo,el,eh,ec,eu,ed,ep,ef,em,eg,ey,eb,e_,e$,eS,ev,ew,eE,eC,eP,eL,ex,ek,eT,eO,eN,eR,eM,eA,eH,eI,eV,ej,eD,eW,eK,eU,eG,eq,eB,ez,eF;var eJ={};eJ.d=(t,e,n)=>{var i=(e,n)=>{for(var i in e)eJ.o(e,i)&&!eJ.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,[n]:e[i]})};i(e,"get"),i(n,"value")},eJ.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),eJ.r=t=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var eY={};eJ.r(eY),eJ.d(eY,{adoptedStyle:()=>iN,aria:()=>iI,async:()=>iH,attribute:()=>ip,boolattribute:()=>im,connectStore:()=>iR,customElement:()=>iV,effect:()=>i_,emitter:()=>ik,fallback:()=>iE,globalemitter:()=>iT,light:()=>iA,memo:()=>ib,mounted:()=>iv,numattribute:()=>ig,part:()=>ix,property:()=>iy,shadow:()=>iM,slot:()=>iL,state:()=>iC,template:()=>iw,unmounted:()=>i$,willMount:()=>iS});var eZ={};eJ.r(eZ),eJ.d(eZ,{GemElement:()=>n2,SheetToken:()=>nK,UpdateToken:()=>nU,_RenderErrorEvent:()=>nq,_createTemplate:()=>e,_renderRoot:()=>nV,createState:()=>t,css:()=>nJ,html:()=>nA,render:()=>nH,setEngine:()=>nI});var eQ={};eJ.r(eQ),eJ.d(eQ,{_StoreListenerMap:()=>nO,connect:()=>nM,createStore:()=>nR});var eX={};eJ.r(eX),eJ.d(eX,{version:()=>sy});let{get:e0,set:e1,has:e2,deleteProperty:e3,defineProperty:e8,getOwnPropertyDescriptor:e4,ownKeys:e6}=Reflect,e5=globalThis.__GEM_SSR__,e9=!!e5,e7={},nt=e5?(t,e)=>{let n=e5();return n?(n.has(t)||n.set(t,e()),n.get(t)):t}:t=>t,ne=e5?t=>{let e=()=>({...t});return new Proxy(t,{get:(n,i)=>e0(nt(t,e),i),set:(n,i,s)=>e1(nt(t,e),i,s),has:(n,i)=>e2(nt(t,e),i),deleteProperty:(n,i)=>e3(nt(t,e),i),defineProperty:(n,i,s)=>e8(nt(t,e),i,s),getOwnPropertyDescriptor:(n,i)=>e4(nt(t,e),i),ownKeys:()=>e6(nt(t,e))})}:t=>t,{assign:nn,fromEntries:ni,entries:ns,keys:nr,defineProperty:na,hasOwn:no}=Object,nl=new Set,nh=()=>new Set;function nc(t){let e=nt(nl,nh);!e.has(t)&&(Promise.resolve().then(()=>{e.delete(t),t()}),e.add(t))}function nu(t,e){for(let n of["name","length"])e&&no(e,n)&&na(t,n,{value:e[n],writable:!0,enumerable:!0,configurable:!0});nn(t,e)}function nd(t,e){return delete e.name,delete e.length,nu(e,t),e}function np(t="",e=""){let{pathname:n,search:i,hash:s}=new URL(e,location.origin+t);return n+i+decodeURIComponent(s)}function nf(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}class nm extends EventTarget{#t=new Map;#e;#n;#i(t){let e=this.#t.get(t);return e&&(e.prev?e.prev.next=e.next:this.#e=e.next,e.next?e.next.prev=e.prev:this.#n=e.prev,this.#t.delete(t)),e}get size(){return this.#t.size}get first(){return this.#e}get last(){return this.#n}isSuperLinkOf(t,e=!1){let n=t.first;if(!n)return!0;let i=e?this.#e:this.find(n.value);for(;i&&n;){if(i.value===n.value)n=n.next;else if(!e)return!1;i=i.next}return!n}find(t){return this.#t.get(t)}add(t){this.#n||this.dispatchEvent(new CustomEvent("start"));let e=this.#i(t)||{value:t};e.prev=this.#n,e.prev&&(e.prev.next=e),e.next=void 0,this.#n=e,this.#e||(this.#e=e),this.#t.set(t,e)}delete(t){let e=this.#i(t);return this.#e||this.dispatchEvent(new CustomEvent("end")),e}clear(){this.#t.clear(),this.#e=this.#n=void 0}get(){let t=this.#e;if(t)return this.delete(t.value),t.value}}class ng extends WeakMap{get(t){let e=super.get(t);return e||(e={},this.set(t,e)),e}}class ny extends URLSearchParams{concat(t){ns("string"==typeof t?ni(new URLSearchParams(t).entries()):t).forEach(([t,e])=>{this.append(t,this.#s(e))})}#s=t=>"string"==typeof t?t:JSON.stringify(t);setAny(t,e){if(Array.isArray(e))this.delete(t),e.forEach(e=>this.append(t,this.#s(e)));else{let n=this.#s(e);n?this.set(t,n):this.delete(t)}}#r=t=>{if(!t)return null;try{return JSON.parse(t)}catch{return null}};getAny(t){return this.getAnyAll(t)[0]}getAnyAll(t){return this.getAll(t).filter(t=>""!==t).map(t=>this.#r(t))}toString(){let t=super.toString();return t?`?${t}`:""}toJSON(){return this.toString()}}function nb(t,...e){return t.reduce((t,n,i)=>t+(e[i-1]??"")+n)}let n_=nb;function n$(t=5){let e=Math.random().toString(36).slice(2,2+t);return e.length<t?e+n$(t-e.length):e}function nS(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function nv(t){return t.replace(/-(.)/g,(t,e)=>e.toUpperCase())}function nw(t){return nr(t).forEach(e=>{delete t[e]}),t}class nE extends Error{constructor(t){super(t),this.message=`gem: ${this.message}`}}function nC(t,e){let n=t.length;if(e.length!==n)return!0;for(let i=0;i<n;i++)if(t[i]!==e[i])return!0;return!1}function nP(t,e,n){let i=e;for(let s in t){let r=n(s,t[s]);i+=r?r+e:""}return i}function nL(t){return nP(t,";",(t,e)=>e||0===e?`${nS(t)}:${e}`:"")}function nx(t){return nP(t," ",(t,e)=>e?t:"")}let nk=nx;function nT(t){return nP(t,",",(t,e)=>!0===e||t===e?t:e?`${t}:${e}`:"")}let nO=new WeakMap,nN=()=>new Set;function nR(t,e){let n=nN(),i=ne(nd(t,t=>{nu(i,t),n.forEach(nc),e9&&(nt(n,nN).forEach(nc),e&&e7.updateStore?.(e,i))}));return e&&nu(i,e7.createStore?.(e)),nO.set(i,n),i}function nM(t,e){let n=nO.get(t),i=n&&nt(n,nN);return i?.add(e),()=>i?.delete(e)}let nA=(t,...e)=>nb(t,...e.map(t=>t instanceof Element?t.outerHTML:t)),nH=(t,e)=>e.innerHTML=t;function nI(t,e){nA=t,nH=e}let nV=(t,e)=>e7.render?.(t,e)||nH(t,e),{assign:nj,defineProperty:nD}=Object;nD(Symbol,"metadata",{value:Symbol.for("Symbol.metadata")});let nW=t=>"function"==typeof t&&t(),nK=Symbol.for("gem@sheetToken"),nU=Symbol.for("gem@update"),nG="gem-style-boundary",nq="gem@render-error",nB=new WeakMap;class nz extends CSSStyleSheet{#a;cssText="";get element(){return this.#a||(this.#a=document.createElement("style"),this.#a.textContent=this.cssText),this.#a}replaceSync(t){this.cssText=t,this.#a&&(this.#a.textContent=t),super.replaceSync(t)}}class nF{#o="";#l="";constructor(t=""){this.#l=t}setContent(t){this.#o=t}#h=new Map;#c({sheet:t,scope:e}){t.replaceSync(e?`${e}{ ${this.#o} }`:this.#o)}getStyle(t,e){let n=t&&!t.internals?.shadowRoot,i=n?t.constructor:this,s=this.#h.get(i);if(!s){let r=n?e?"@scope":`@scope (${t.tagName}) to (:state(${nG}) > *)`:"";s={sheet:new nz({media:this.#l}),scope:r},this.#h.set(i,s),this.#c(s)}return s.sheet}updateStyle(){this.#h.forEach(t=>this.#c(t))}}function nJ(t,...e){let n="",i="",s=e.at(0);Array.isArray(t)?i=nb(t,...e):void 0!==s?(n=t,i=s):i=t;let r=new nF(n),a={[nK]:r},o="";return"string"==typeof i?o=i:Object.keys(i).forEach(t=>{let e="$"===t;a[t]=e||t.includes("-")?t:`${t}-${n$()}`,o+=`${e?":where(&:not([hidden])),:host(:where(:not([hidden])))":`.${a[t]}`} {${i[t]}}`}),r.setContent(o),a}let nY=({counts:t,update:e},n,i)=>{let s=!1;n.forEach(e=>{let n=t.get(e)||0;s||=1===i&&0===n||-1===i&&1===n,t.set(e,n+i)}),s&&nc(e)};function nZ(t,e){nW(t.preCallback),t.preCallback=t.callback(e,t.values),t.values=e,t.initialized=!0}function nQ(t){t.forEach(t=>{let e=t.getDep?.();(!t.getDep||!t.values||nC(t.values,e))&&nZ(t,e)})}function nX(t){return t.filter(t=>(nW(t.preCallback),t.preCallback=void 0,t.initialized=!1,t.values=void 0,t.fixed))}let n0=new nm,n1=(t=performance.now())=>{if(performance.now()>t+50)return requestAnimationFrame(n1);let e=n0.get();if(e){try{e()}catch(t){reportError(t)}n1(t)}};n0.addEventListener("start",()=>nc(n1));class n2 extends HTMLElement{#u;#d;#p=[];#f=[];#m=[];#g;#y;#b;#_;#$;[nU](){this.#S()}static{t=t=>{let e=n,i=nd(t,t=>{let n=e.#p.at(0);if(!e9&&e.#y&&n&&!n.initialized)throw new nE("Don't set state sync before insert the DOM");nu(i,t),e.#_||e.#S()});return e.#d.stateList.push(i),i},e=(t,e)=>t.#m.push(e)}constructor(){let t;super(),n=this;let{aria:e,mode:i,delegatesFocus:s,...r}=this.#v,{focusable:a,...o}=e||{};this.#u=i?this.shadowRoot||this.attachShadow({mode:i,delegatesFocus:s,...r}):this,this.#d=this.attachInternals(),this.#u===this||this.#d.shadowRoot||nD(this.#d,"shadowRoot",{value:this.#u}),this.#d.stateList=[],this.#d.sheets=[],nj(this.#d,o),this.#p.push({fixed:!0,getDep:()=>[this.disabled],callback:([e=!1])=>{if(void 0===t&&(t=this.hasAttribute("tabindex")),this.#d.ariaDisabled=String(e),a&&!t&&(this.tabIndex=-Number(e)),(a||s)&&e)return nf(this,"click",t=>t.isTrusted&&t.stopImmediatePropagation(),{capture:!0})}})}get #v(){return this.constructor[Symbol.metadata]}get #w(){return this.#m.findLast(t=>!t.condition||t.condition())}get internals(){return this.#d}#E=()=>{nQ(this.#p)};#C=t=>{try{this.#_=!0,nQ(this.#f);let e=this.#u===this,n=t?t.render():e?void 0:nA`<slot></slot>`;if(void 0===n)return;let i=n??(e?nA`<style>@scope{&{display:none!important;}}</style>`:nA`<style>:host{&{display:none!important;}}</style>`);nV(i,this.#u)}catch(e){let t=new CustomEvent(nq,{bubbles:!0,composed:!0,cancelable:!0,detail:e});if(this.dispatchEvent(t))throw e}finally{this.#_=!1}};#P=()=>{let t=this.#w;this.#y&&(t||!this.#m.length)&&(this.#C(t),e9||nc(this.#E))};#L=t=>{this.#v.noBlocking&&!e9?n0.add(t):t()};#x=()=>this.#L(this.#P);#S=()=>{this.#y&&nc(this.#x)};#k=()=>{let{adoptedStyleSheets:t=[]}=this.#v,{shadowRoot:e,sheets:n}=this.#d,i=t.map(t=>t[nK].getStyle(this));if(!e)return this.prepend(...n.map(t=>t.element)),((t,e)=>{let n=t.getRootNode(),i=nB.get(n);if(!i){let t=new Map;i={counts:t,update:()=>{let e=(n.adoptedStyleSheets||[]).filter(e=>!t.has(e));t.forEach((t,n)=>t&&e.push(n)),n.adoptedStyleSheets=e.reverse()}},nB.set(n,i)}return nY(i,e,1),()=>nY(i,e,-1)})(this,i);e.adoptedStyleSheets=i.concat(n)};#T=()=>{this.#p.forEach(t=>!t.initialized&&nZ(t,t.getDep?.()))};#O=()=>{this.willMount&&this.memo(this.willMount.bind(this),()=>[]),this.mounted&&this.effect(this.mounted.bind(this),()=>[]),this.updated&&this.effect((t,e)=>e&&this.updated.apply(this)),this.unmounted&&this.effect(()=>this.unmounted.bind(this),()=>[]),!this.#m.length&&this.render&&this.#m.push({render:this.render.bind(this),condition:this.shouldUpdate?.bind(this)})};#N;#R=()=>{if(this.#g){this.#g=!1,this.#$?.(),this.#$=this.#k();return}if(e7.connect?.(this,this.#R))return;this.#b=!0,this.#O();let{observedStores:t,mode:e,penetrable:n}=this.#v;this.#d.states.add("gem-element"),e||!this.#m.length||n||this.#d.states.add(nG),this.#N=t?.map(t=>nM(t,this.#x)),this.#C(this.#w),this.#y=!0,this.#$=this.#k(),e9||nc(this.#T)};connectedCallback(){this.#L(this.#R)}disconnectedCallback(){if(this.isConnected){this.#g=!0;return}n0.delete(this.#R),n0.delete(this.#P),this.#y=!1,this.#N?.forEach(t=>t()),this.#p=nX(this.#p),this.#f=nX(this.#f),this.#$?.()}effect=(t,e)=>{let n={callback:t,getDep:e,fixed:!this.#b};this.#y&&nZ(n,e?.()),this.#p.push(n)};memo=(t,e)=>{this.#f.push({callback:t,getDep:e,fixed:!this.#b})};update=()=>this.#S()}let{deleteProperty:n3,getOwnPropertyDescriptor:n8,defineProperty:n4}=Reflect,{getPrototypeOf:n6,assign:n5,hasOwn:n9}=Object,n7=new ng;function it(t,e,n){let i=t.metadata;n8(i,e)||n4(i,e,{value:i[e]?.filter(t=>t!==n)||[]}),i[e].push(n)}function ie(t,e,n,i){let s=t.name;it(t,e,n),t.addInitializer(function(){let e=iu(this,t);n9(e,s)||i(e,s),function(t,e){let{value:n}=n8(t,e)||{};n3(t,e),t[e]=n}(this,s)})}let{setAttribute:ii,toggleAttribute:is,removeAttribute:ir}=Element.prototype,ia=(t,e)=>t.constructor[Symbol.metadata]?.attrProps?.[e];function io(){}n2.prototype.setAttribute=function(t,e){let n=ia(this,t);if(!n)return ii.call(this,t,e);this[n]=e},n2.prototype.removeAttribute=function(t){let e=ia(this,t);if(!e)return ir.call(this,t);this[e]=null},n2.prototype.toggleAttribute=function(t,e){let n=ia(this,t);return n?this[n]=e??!this.hasAttribute(t):is.call(this,t,e)};let il=Symbol("event handle");function ih(t,e,{attr:n,attrType:i,event:s,eventOptions:r}={}){n4(t,e,{configurable:!0,get(){let t=n7.get(this)[e];return s&&!t?(this[e]=io,this[e]):t},set(t){let a=this,o=n7.get(a);n&&((t=i===Boolean&&""===t||i(t||""))?ii.call(this,n,i===Boolean?"":t):ir.call(this,n)),t!==o[e]&&(s?(o[e]=t?.[il]?t:async(e,n)=>{await Promise.resolve();let i=new CustomEvent(s,{...n,...r,detail:e});a.dispatchEvent(i),await t(e,n)},o[e][il]=!0):(o[e]=t,this[nU]()))}})}let ic=new WeakMap;function iu(t,{metadata:e}){let n=ic.get(e);if(n)return n;let i=t;do i=n6(i);while(i.constructor[Symbol.metadata]!==e);return ic.set(e,i),i}function id(t,e){let n=t.name,i=nS(n),s=t.metadata;return n9(s,"attrProps")||(s.attrProps=Object.create(s.attrProps||null)),s.attrProps[i]=n,ie(t,"observedAttributes",i,t=>ih(t,n,{attr:i,attrType:e})),function(t){return this.getAttribute(i)??t}}function ip(t,e){return id(e,String)}function im(t,e){return id(e,Boolean)}function ig(t,e){return id(e,Number)}function iy(t,e){let n=e.name;return ie(e,"observedProperties",n,ih),function(t){return this[n]??t}}function ib(t){return(e,n)=>{let{addInitializer:i,name:s,access:r,kind:a}=n;i(function(){let e=t&&(()=>t(this));if("getter"===a){if(n.private)throw new nE("not support");let t=n8(iu(this,n),s).get.bind(this);this.memo(()=>{n4(this,s,{configurable:!0,value:t()})},e)}else this.memo(r.get.call(this,this).bind(this),e)})}}function i_(t){return(e,{addInitializer:n,access:i})=>{n(function(){this.effect(i.get.call(this,this).bind(this),t&&(()=>t(this)))})}}function i$(){return(t,{addInitializer:e,access:n})=>{e(function(){this.effect(()=>n.get.call(this,this).bind(this),()=>[])})}}function iS(){return ib(()=>[])}function iv(){return i_(()=>[])}function iw(t){return(n,{addInitializer:i,access:s})=>{i(function(){e(this,{render:s.get.call(this,this).bind(this),condition:t&&(()=>t(this))})})}}function iE(){return(t,{addInitializer:e,access:n})=>{e(function(){this.addEventListener(nq,t=>{t.preventDefault(),nV(n.get.call(this,this).apply(this,[t.detail]),this.internals.shadowRoot||this)})})}}function iC(t,e){let n=nS(e.name);ie(e,"definedCSSStates",n,(t,e)=>{n4(t,e,{configurable:!0,get(){let{states:t}=this.internals;return t?.has(n)},set(t){let{states:e}=this.internals;t?e?.add(n):e?.delete(n)}})})}function iP(t,e,n,i){let s=t.name,r=nS(s);if(t.static)it(t,n,r);else{let i=n6(e);i[s]||(i[s]=r,it(t,n,r))}return i||r}function iL(t,e){return function(t){return iP(e,this,"definedSlots",t)}}function ix(t,e){return function(t){return iP(e,this,"definedParts",t)}}function ik(t,e){iO(e)}function iT(t,e){iO(e,{bubbles:!0,composed:!0})}function iO(t,e){let n=nS(t.name);ie(t,"definedEvents",n,(t,i)=>ih(t,i,{event:n,eventOptions:e}))}function iN(t){return(e,n)=>{it(n,"adoptedStyleSheets",t)}}function iR(t){return(e,n)=>{it(n,"observedStores",t)}}function iM({mode:t="open",serializable:e=!0,...n}={}){return(i,s)=>{n5(s.metadata,{mode:t,serializable:e,...n})}}function iA({penetrable:t}){return(e,n)=>{n.metadata.penetrable=t}}function iH(){return(t,e)=>{e.metadata.noBlocking=!0}}function iI(t){return(e,n)=>{let i=n.metadata;i.aria={...i.aria,...t}}}function iV(t){return(e,{addInitializer:n})=>{n(()=>{customElements.define(t,e)})}}let ij=globalThis.trustedTypes,iD=ij?.createPolicy("lit-html",{createHTML:t=>t}),iW="$lit$",iK=`lit$${Math.random().toFixed(9).slice(2)}$`,iU="?"+iK,iG=`<${iU}>`,iq=document,iB=()=>iq.createComment(""),iz=t=>null===t||"object"!=typeof t&&"function"!=typeof t,iF=t=>null==t,iJ=`[
2
2
  \f\r]`,iY=`[^
3
- \f\r"'\`<>=]`,iZ=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,iQ=/-->/g,iX=/>/g,i0=RegExp(`>|${iJ}(?:([^\\s"'>=/]+)(${iJ}*=${iJ}*(?:${iY}|("|')|))|$)`,"g"),i1=/'/g,i2=/"/g,i3=/^(?:script|style|textarea|title)$/i,i8="v-if",i4="v-else-if",i6="v-else";class i5{type;strings;values;constructor(t,e,n){this.type=t,this.strings=e,this.values=n}}let i9=t=>(e,...n)=>new i5(t,e,n),i7=i9(1),st=i9(2),se=i9(3),sn=Symbol.for("lit-noChange"),si=new WeakMap,ss=iq.createTreeWalker(iq,129);class sr{el;parts=[];constructor({strings:t,type:e},n){let i,s=0,r=0,a=t.length-1,o=this.parts,[l,h]=((t,e)=>{let n,i=t.length-1,s=[],r=2===e?"<svg>":3===e?"<math>":"",a=iZ;for(let e=0;e<i;e++){let i,o,l=t[e],h=-1,c=0;for(;c<l.length&&(a.lastIndex=c,null!==(o=a.exec(l)));)c=a.lastIndex,a===iZ?"!--"===o[1]?a=iQ:void 0!==o[1]?a=iX:void 0!==o[2]?(i3.test(o[2])&&(n=RegExp(`</${o[2]}`,"g")),a=i0):void 0!==o[3]&&(a=i0):a===i0?">"===o[0]?(a=n??iZ,h=-1):void 0===o[1]?h=-2:(h=a.lastIndex-o[2].length,i=o[1],a=void 0===o[3]?i0:'"'===o[3]?i2:i1):a===i2||a===i1?a=i0:a===iQ||a===iX?a=iZ:(a=i0,n=void 0);let u=a===i0&&t[e+1].startsWith("/>")?" ":"";r+=a===iZ?l+iG:h>=0?(s.push(i),l.slice(0,h)+iW+l.slice(h)+iK+u):l+iK+(-2===h?e:u)}let o=r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"");return[function(t,e){if(!Array.isArray(t))throw Error("invalid template");return void 0!==iD?iD.createHTML(e):e}(t,o),s]})(t,e);if(this.el=sr.createElement(l,n),ss.currentNode=this.el.content,2===e||3===e){let t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=ss.nextNode())&&o.length<a;){if(1===i.nodeType){if(i.hasAttributes())for(let t of i.getAttributeNames())if(t.endsWith(iW)){let e=h[r++],n=i.getAttribute(t).split(iK),a=/([.?@])?(.*)/.exec(e);o.push({type:1,index:s,name:a[2],strings:n,ctor:"."===a[1]?su:"?"===a[1]?sd:"@"===a[1]?sp:sc}),i.removeAttribute(t)}else t.startsWith(iK)&&(o.push({type:6,index:s}),i.removeAttribute(t));if(i3.test(i.tagName)){let t=i.textContent.split(iK),e=t.length-1;if(e>0){i.textContent=ij?ij.emptyScript:"";for(let n=0;n<e;n++)i.append(t[n],iB()),ss.nextNode(),o.push({type:2,index:++s});i.append(t[e],iB())}}}else if(8===i.nodeType)if(i.data===iU)o.push({type:2,index:s});else{let t=-1;for(;-1!==(t=i.data.indexOf(iK,t+1));)o.push({type:7,index:s}),t+=iK.length-1}s++}}static createElement(t,e){let n=iq.createElement("template");return n.innerHTML=t,n}}function sa(t,e,n=t,i){if(e===sn)return e;let s=void 0!==i?n.__directives?.[i]:n.__directive,r=iz(e)?void 0:e._$litDirective$;return s?.constructor!==r&&(s?._$notifyDirectiveConnectionChanged?.(!1),void 0===r?s=void 0:(s=new r(t))._$initialize(t,n,i),void 0!==i?(n.__directives??=[])[i]=s:n.__directive=s),void 0!==s&&(e=sa(t,s._$resolve(t,e.values),s,i)),e}class so{_$template;_$parts=[];_$conditions=[];_$parent;_$disconnectableChildren=void 0;constructor(t,e){this._$template=t,this._$parent=e}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(t){let{el:{content:e},parts:n}=this._$template,i=new Map,s=new Map,r=(t?.creationScope??iq).importNode(e,!0);ss.currentNode=r;let a=ss.nextNode(),o=0,l=0,h=n[0];for(;void 0!==h;){if(o===h.index){let e;2===h.type?e=new sh(a,a.nextSibling,this,t):1===h.type?(h.name===i8&&i.set(a,l),h.name===i4&&s.set(a,l),e=new h.ctor(a,h.name,h.strings,this,t)):6===h.type&&(e=new sf(a,this,t)),this._$parts.push(e),h=n[++l]}o!==h?.index&&(a=ss.nextNode(),o++)}let c=new Map;for(let t of(i.forEach((t,e)=>{let n=new sl(e,t);this._$conditions.push(n),c.set(e,n);let i=e;for(;i=i.nextElementSibling;){let t=s.get(i);if(void 0===t)break;n.push(i,t)}}),this._$parts)){if(t?.type!==2)continue;let e=c.get(t._$endNode);e&&(t._$endNode=e.mark)}return ss.currentNode=iq,r}_update(t){let e=0;for(let n of this._$parts)void 0!==n&&(void 0!==n.strings?(n._$setValue(t,n,e),e+=n.strings.length-2):n.name===i8||n.name===i4||n._$setValue(t[e])),e++;this._$conditions.forEach(e=>e.update(t))}}class sl{mark;list;constructor(t,e){let n=iB();n._$chain=this,t.before(n),this.mark=n,this.list=[{ele:t,idx:e}],this.check()}get next(){return this.list.at(-1).ele.nextElementSibling}push(t,e){this.list.push({ele:t,idx:e}),this.check()}check(){let t=this.next;t?.attributes.getNamedItem(i6)&&(this.list.push({ele:t}),t.removeAttribute(i6))}update(t){let{mark:e,list:n}=this,i=n.find(({idx:e})=>void 0===e||!!t[e]);i&&!i.ele.parentNode&&e.after(i.ele),n.forEach(({ele:t})=>(!i||t!==i.ele)&&t.remove())}}class sh{type=2;options;_$committedValue;__directive;_$startNode;_$endNode;_$parent;__isConnected;get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}_$disconnectableChildren=void 0;constructor(t,e,n,i){this._$startNode=t,this._$endNode=e,this._$parent=n,this.options=i,this.__isConnected=i?.isConnected??!0}get parentNode(){let t=this._$startNode.parentNode,e=this._$parent;return void 0!==e&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(t,e=this){this.parentNode&&(iz(t=sa(this,t,e))?iF(t)||""===t?(iF(this._$committedValue)||this._$clear(),this._$committedValue=void 0):t!==this._$committedValue&&t!==sn&&this._commitText(t):t instanceof i5?this._commitTemplateResult(t):void 0!==t.nodeType?this._commitNode(t):Symbol.iterator in t?this._commitIterable(t):this._commitText(t))}_insert(t){return this._$startNode.parentNode.insertBefore(t,this._$endNode)}_commitNode(t){this._$committedValue!==t&&(this._$clear(),this._$committedValue=this._insert(t))}_commitText(t){!iF(this._$committedValue)&&iz(this._$committedValue)?this._$startNode.nextSibling.data=t:this._commitNode(iq.createTextNode(t)),this._$committedValue=t}_commitTemplateResult(t){let{values:e}=t,n=this._$getTemplate(t);if(this._$committedValue?._$template===n)this._$committedValue._update(e);else{let t=new so(n,this),i=t._clone(this.options);t._update(e),this._commitNode(i),this._$committedValue=t}}_$getTemplate(t){let e=si.get(t.strings);return void 0===e&&si.set(t.strings,e=new sr(t)),e}_commitIterable(t){let e;Array.isArray(this._$committedValue)||(this._$committedValue=[],this._$clear());let n=this._$committedValue,i=0;for(let s of t)i===n.length?n.push(e=new sh(this._insert(iB()),this._insert(iB()),this,this.options)):e=n[i],e._$setValue(s),i++;i<n.length&&(this._$clear(e&&e._$endNode.nextSibling,i),n.length=i)}_$clear(t=this._$startNode.nextSibling,e){for(this._$notifyConnectionChanged?.(!1,!0,e);t&&t!==this._$endNode;){let e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$parent&&(this.__isConnected=t,this._$notifyConnectionChanged?.(t))}}class sc{type=1;element;name;options;strings;_$committedValue;__directives;_$parent;_$disconnectableChildren=void 0;get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(t,e,n,i,s){this.element=t,this.name=e,this._$parent=i,this.options=s,n.length>2||""!==n[0]||""!==n[1]?(this._$committedValue=Array(n.length-1).fill(new String),this.strings=n):this._$committedValue=void 0}_$setValue(t,e=this,n,i){let s=this.strings,r=!1;if(void 0===s)(r=!iz(t=sa(this,t,e,0))||t!==this._$committedValue)&&(this._$committedValue=t);else{let i,a,o=t;for(t=s[0],i=0;i<s.length-1;i++)a=sa(this,o[n+i],e,i),r||=!iz(a)||a!==this._$committedValue[i],iF(a)?t=void 0:iF(t)||(t+=a+s[i+1]),this._$committedValue[i]=a}r&&!i&&this._commitValue(t)}_commitValue(t){iF(t)?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t)}}class su extends sc{type=3;_commitValue(t){this.element[this.name]=t}}class sd extends sc{type=4;_commitValue(t){this.element.toggleAttribute(this.name,!!t)}}class sp extends sc{type=5;_$setValue(t,e=this){t=sa(this,t,e,0);let n=this._$committedValue,i=n&&(!t||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive),s=t&&(!n||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,t),this._$committedValue=t}handleEvent(t){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,t):this._$committedValue.handleEvent(t)}}class sf{element;type=6;__directive;_$committedValue;_$parent;_$disconnectableChildren=void 0;_$props;options;constructor(t,e,n){this.element=t,this._$parent=e,this.options=n}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t){if(t)if(t instanceof sg)t.value=this.element;else if(t._$litDirective$)sa(this,t);else{if(this._$props)for(let t in this._$props)Reflect.set(this.element,t,void 0);Object.assign(this.element,t),this._$props=t}}}let sm=()=>new sg;class sg{value}let sy="2.3.1",sb=t=>(...e)=>({_$litDirective$:t,values:e});class s_{__part;__attributeIndex;__directive;_$parent;_$disconnectableChildren;get _$isConnected(){return this._$parent._$isConnected}_$initialize(t,e,n){this.__part=t,this._$parent=e,this.__attributeIndex=n}_$resolve(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}let s$=(t,e,n)=>{let i=t._$startNode.parentNode,s=void 0===e?t._$endNode:e._$startNode;if(void 0===n)n=new sh(i.insertBefore(document.createComment(""),s),i.insertBefore(document.createComment(""),s),t,t.options);else{let e=n._$endNode.nextSibling,r=n._$parent,a=r!==t;if(a){let e;n._$reparentDisconnectables?.(t),n._$parent=t,void 0!==n._$notifyConnectionChanged&&(e=t._$isConnected)!==r._$isConnected&&n._$notifyConnectionChanged(e)}if(e!==s||a){let t=n._$startNode;for(;t!==e;){let e=t.nextSibling;i.insertBefore(t,s),t=e}}}return n},sS=(t,e,n=t)=>(t._$setValue(e,n),t),sv={},sw=t=>{t._$notifyConnectionChanged?.(!1,!0);let e=t._$startNode,n=t._$endNode.nextSibling;for(;e!==n;){let t=e.nextSibling;e.remove(),e=t}},sE=(t,e,n)=>{let i=new Map;for(let s=e;s<=n;s++)i.set(t[s],s);return i},sC=sb(class extends s_{_itemKeys;constructor(t){if(super(),2!==t.type)throw Error("repeat() can only be used in text expressions")}_getValuesAndKeys(t,e,n){let i;void 0===n?n=e:void 0!==e&&(i=e);let s=[],r=[],a=0;for(let e of t)s[a]=i?i(e,a):a,r[a]=n(e,a),a++;return{values:r,keys:s}}render(t,e,n){return this._getValuesAndKeys(t,e,n).values}update(t,[e,n,i]){let s,r,a=t._$committedValue,{values:o,keys:l}=this._getValuesAndKeys(e,n,i);if(!Array.isArray(a))return this._itemKeys=l,o;let h=this._itemKeys??=[],c=[],u=0,d=a.length-1,p=0,f=o.length-1;for(;u<=d&&p<=f;)if(null===a[u])u++;else if(null===a[d])d--;else if(h[u]===l[p])c[p]=sS(a[u],o[p]),u++,p++;else if(h[d]===l[f])c[f]=sS(a[d],o[f]),d--,f--;else if(h[u]===l[f])c[f]=sS(a[u],o[f]),s$(t,c[f+1],a[u]),u++,f--;else if(h[d]===l[p])c[p]=sS(a[d],o[p]),s$(t,a[u],a[d]),d--,p++;else if(void 0===s&&(s=sE(l,p,f),r=sE(h,u,d)),s.has(h[u]))if(s.has(h[d])){let e=r.get(l[p]),n=void 0!==e?a[e]:null;if(null===n){let e=s$(t,a[u]);sS(e,o[p]),c[p]=e}else c[p]=sS(n,o[p]),s$(t,a[u],n),a[e]=null;p++}else sw(a[d]),d--;else sw(a[u]),u++;for(;p<=f;){let e=s$(t,c[f+1]);sS(e,o[p]),c[p++]=e}for(;u<=d;){let t=a[u++];null!==t&&sw(t)}return this._itemKeys=l,((t,e=sv)=>t._$committedValue=e)(t,c),sn}});nI(i7,(t,e,n)=>{let i=n?.renderBefore??e,s=i._$litPart$;if(void 0===s){let t=n?.renderBefore??null;i._$litPart$=s=new sh(e.insertBefore(iB(),t),t,void 0,n??{})}return s._$setValue(t),s}),globalThis.__GEM_DEVTOOLS__HOOK__&&!globalThis.__GEM_DEVTOOLS__HOOK__.GemElement&&Object.assign(globalThis.__GEM_DEVTOOLS__HOOK__,{...eZ,...eY,...eQ,...eX});let sP=globalThis.history,sL=sP.pushState.bind(sP),sx=sP.replaceState.bind(sP),sk=0,sT=()=>`${performance.now()}-${++sk}`,sO=nR({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),sN=new Map,sR=()=>new Map([...sN].map(([t,e])=>[t,{...e}])),sM=["$key","$hasCloseHandle","$hasOpenHandle","$hasShouldCloseHandle"];function sA(t){return t===sK.basePath?"/":t.replace(RegExp(`^${sK.basePath}/`),"/")}function sH(t){sK.dispatchEvent(new CustomEvent("beforechange")),nw(sO),sO(t)}function sI(t){let e=sK.getParams()||{path:sA(location.pathname),query:new ny,title:document.title},n=t.path?np(e.path,t.path):sA(location.pathname),i=new ny(t.query??(t.path?"":location.search)),s=String(i)!==String(e.query),r=s?i:e.query,a=n!==e.path||s,o=t.title||(a?"":e.title),l=t.close||t.data||t.open||t.shouldClose,h=decodeURIComponent(t.hash??(!a&&l?location.hash:""));return{...t,title:o,path:n,query:r,hash:h}}function sV(t,e){var n=t.data;if(sO.$key!==n?.$key){for(let t of sM)if(n?.[t])throw new nE(`\`${t}\` is not allowed`)}let i=sI(t),{title:s,path:r,query:a,hash:o,close:l,open:h,shouldClose:c,data:u}=i,d={$hasCloseHandle:!!l,$hasOpenHandle:!!h,$hasShouldCloseHandle:!!c,$key:sT(),$title:s,...u};nt(sN,sR).set(d.$key,i),sH(d);let p=(sK.basePath?sK.basePath+r:r)+new ny(a)+o,f=decodeURIComponent(location.hash);e(d,s,p),f!==o&&dispatchEvent(new CustomEvent("hashchange"))}function sj(t,e,n,i){let{pathname:s,search:r,hash:a}=new URL(n,location.origin+location.pathname);sV({path:s,query:r,hash:a,title:e,data:t},i)}let sD=nR({basePath:""});class sW extends EventTarget{get store(){return sO}get currentKey(){return sO.$key}get basePath(){return sD.basePath}set basePath(t){sD({basePath:t}),Object.assign(this.getParams(),{path:sA(location.pathname)})}getParams(){return nt(sN,sR).get(sO.$key)}updateParams(t){Object.assign(this.getParams(),t),sO()}push(t){sV(t,sL)}replace(t){sV(t,sx)}pushIgnoreCloseHandle(t){sO.$hasCloseHandle?(this.getParams()?.close?.(),this.replace(t)):this.push(t)}forward(){sP.forward()}back(){sP.back()}}let sK=new sW,sU=nR({defaultTitle:document.title,url:"",title:""});if(!globalThis._GEMHISTORY){if(globalThis._GEMHISTORY={history:sK,titleStore:sU,basePathStore:sD},sP.pushState=(t,e,n)=>{sj(t,e,n,sL)},sP.replaceState=(t,e,n)=>{sj(t,e,n,sx)},addEventListener("hashchange",({isTrusted:t})=>{t&&sK.replace({hash:location.hash})}),sP.state)if(sP.state.$hasCloseHandle){sO(sP.state);let t=sI({title:document.title});nt(sN,sR).set(sO.$key,t),sK.back()}else{let t=sI({title:document.title,hash:location.hash});sO({$key:sT(),...sP.state||{}}),nt(sN,sR).set(sO.$key,t)}else{let{protocol:t,pathname:e,search:n,hash:i}=location;(t.startsWith("http")||t.startsWith("tauri"))&&sK.replace({path:e,query:n,hash:i})}nM(sU,()=>{let t=sK.getParams();t&&(t.title=sU.title)}),nM(sO,()=>{let{title:t}=sK.getParams();t!==sU.title&&sU({title:t})});let t=!1;addEventListener("popstate",e=>{let n=e.state;if(n?.$key){if(t){t=!1;return}if(!nt(sN,sR).has(n.$key)){let{pathname:t,search:e,hash:i}=location;nt(sN,sR).set(n.$key,{path:sA(t),query:new ny(e),hash:decodeURIComponent(i),title:sU.title||n.$title,data:n})}if(parseFloat(n.$key)>parseFloat(sO.$key)&&n.$hasOpenHandle)nt(sN,sR).get(n.$key)?.open?.();else if(sO.$hasCloseHandle){let e=nt(sN,sR).get(sO.$key),i=e?.close,s=e?.shouldClose;if(s&&!s()){t=!0,sK.forward();return}i?i():n.$hasCloseHandle&&(t=!0,sK.back())}sH(n)}})}let{history:sG,titleStore:sq,basePathStore:sB}=globalThis._GEMHISTORY;function sz(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}function sF(t,e,n,i,s,r){var a,o,l,h,c,u,d,p=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,m=Object.create,g=[m(null),m(null)],y=e.length;function b(e,n,i){return function(s,r){n&&(r=s,s=t);for(var a=0;a<e.length;a++)r=e[a].apply(s,i?[r]:[]);return i?r:s}}function _(t,e,n,i){if("function"!=typeof t&&(i||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(i?"":" or undefined"));return t}function $(t,e,n,i,s,r,a,o,l,h,c){function p(t){if(!c(t))throw TypeError("Attempted to access private element on non-instance")}var m=[].concat(e[0]),y=e[3],$=!a,S=1===s,v=3===s,w=4===s,E=2===s;function C(e,n,i){return function(s,r){return n&&(r=s,s=t),i&&i(s),P[e].call(s,r)}}var P={},L=[],x=v?"get":w||S?"set":"value";if(!$&&(l?(h||S?P={get:sz(function(){return y(this)},i,"get"),set:function(t){e[4](this,t)}}:P[x]=y,h||sz(P[x],i,E?"":x)):h||(P=Object.getOwnPropertyDescriptor(t,i)),!h&&!l)){if((d=g[+o][i])&&(d^s)!=7)throw Error("Decorating two elements with the same name ("+P[x].name+") is not supported yet");g[+o][i]=s<3?1:s}for(var k=t,T=m.length-1;T>=0;T-=n?2:1){var O=_(m[T],"A decorator","be",!0),N=n?m[T-1]:void 0,R={},M={kind:["field","accessor","method","getter","setter","class"][s],name:i,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");_(e,"An initializer","be",!0),r.push(e)}).bind(null,R)};if($){d=O.call(N,k,M),R.v=1,_(d,"class decorators","return")&&(k=d);continue}if(M.static=o,M.private=l,d=M.access={has:l?c.bind():function(t){return i in t}},w||(d.get=l?E?function(t){return p(t),P.value}:C("get",0,p):function(t){return t[i]}),E||v||(d.set=l?C("set",0,p):function(t,e){t[i]=e}),k=O.call(N,S?{get:P.get,set:P.set}:P[x],M),R.v=1,S){if("object"==typeof k&&k)(d=_(k.get,"accessor.get"))&&(P.get=d),(d=_(k.set,"accessor.set"))&&(P.set=d),(d=_(k.init,"accessor.init"))&&L.unshift(d);else if(void 0!==k)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else _(k,(h?"field":"method")+" decorators","return")&&(h?L.unshift(k):P[x]=k)}return s<2&&a.push(b(L,o,1),b(r,o,0)),h||$||(l?S?a.splice(-1,0,C("get",o),C("set",o)):a.push(E?P[x]:_.call.bind(P[x])):f(t,i,P)),k}function S(t){return f(t,p,{configurable:!0,enumerable:!0,value:u})}return void 0!==r&&(u=r[p]),u=m(null==u?null:u),l=[],h=function(t){t&&l.push(b(t))},(c=function(e,i){for(var r=0;r<n.length;r++){var h=n[r],c=h[1],u=7&c;if((8&c)==e&&!u==i){var d=h[2],p=!!h[3],f=16&c;$(e?t:t.prototype,h,f,p?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),u,u<2?[]:e?o=o||[]:a=a||[],l,!!e,p,i,e&&p?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:s)}}})(8,0),c(0,0),c(8,1),c(0,1),h(a),h(o),d=l,y||S(t),{e:d,get c(){var v=[];return y&&[S(t=$(t,[e],i,t.name,5,v)),b(v,1)]}}}let sJ=Symbol();i=iR(sG.store),s=iI({role:"dialog",ariaModal:"true"}),a=n2,o=iS();class sY extends a{static{({e:[l,h,c,u,d,p],c:[f,r]}=sF(this,[i,s],[[ip,0,"label"],[iC,0,"opened"],[o,0,"init",function(t){return t.#M},function(t,e){t.#M=e}]],0,t=>#M in t,a))}label=l(this);opened=(h(this),c(this));#A=void u(this);#H;#I=[];#V=()=>{this.inert=!0,this.#I.forEach(t=>t.inert=!1),this.#A?this.#A.before(this):this.#H&&this.#H?.appendChild(this),this.dispatchEvent(new CustomEvent("close")),this.opened=!1};#j=()=>{this.hidden=!1,this.inert=!1,this.#A=this.nextSibling,this.#H=this.parentElement||this.getRootNode(),this.#I=[...document.body.children].filter(t=>!t.inert),this.#I.forEach(t=>t.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0};#M=d(this,()=>this.inert=!0);open=(p(this),()=>{if(!this.opened)return this.#j(),sG.push({title:this.label,open:this.#j,close:this.#V,shouldClose:this.shouldClose}),sJ});shouldClose(){return!0}close=()=>(sG.back(),sJ);forceClose=()=>(this.opened=!1,setTimeout(this.close,100),sJ);static{r()}}function sZ(t){return t}let sQ=Symbol("open mark"),sX=Symbol();function s0(t){let e,n,i,s,r,a,o,l,h,c,u;return e=iM(),n=iI({role:"alertdialog",ariaModal:"true"}),s=n2,r=iv(),a=iv(),new class extends sZ{constructor(){super(u),i()}static [class extends s{static{({e:[o,l,h,c],c:[u,i]}=sF(this,[e,n],[[r,0,"connectHistory",function(t){return t.#D},function(t,e){t.#D=e}],[a,0,"connectStore",function(t){return t.#W},function(t,e){t.#W=e}]],0,t=>#D in t,s))}constructor(...t){super(...t),c(this)}static get isOpen(){return this.store[sQ]}static open(t){let e=new this;this.instance=e,this.inertStore=[...document.body.children].filter(t=>!t.inert),this.inertStore.forEach(t=>t.inert=!0),document.body.append(e);let n=()=>this.store({[sQ]:!0,...t});return setTimeout(()=>{n(),sG.push({title:e.label,open:n,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),sX}static close(){return sG.back(),sX}static closeHandle(){return this.inertStore.forEach(t=>t.inert=!1),this.instance?.remove(),this.store({[sQ]:!1,...t}),sX}static shouldClose(){return!0}label="";#D=o(this,()=>nM(sG.store,this.update));#W=(l(this),h(this,()=>nM(u.store,this.update)))}];inertStore=[];instance=null;store=nR({[sQ]:!1,...t})},u}let s1=/^[\w\-./~]*/,s2=new Map;function s3(t,e){let n=s2.get(t);return n||s2.set(t,n=function(t){let e=s1.exec(t)[0];if(e===t)return e=>e===t?{}:null;if("*"===t)return t=>({0:t});if(!globalThis.URLPattern){let e,n,i;return e=0,n=t.replace(/:[^/$]+|\*/g,t=>"*"===t?`(?<_${e++}>.*)`:`(?<${t.slice(1)}>[^/]+)`),i=RegExp(`^${n}$`),t=>{let e=t.match(i);if(!e)return null;let n={};for(let t in e.groups)n[t.startsWith("_")?t.slice(1):t]=e.groups[t];return n}}let n=new URLPattern({pathname:t}),i=e.replace(/\/$/,"");return t=>t.startsWith(i)?n.exec({pathname:t})?.pathname.groups:null}(t)),n(e)||n(`${e}/`)||null}function s8(t,e){let n=0,i=t.pattern.replaceAll("*",()=>`:${n++}`),s=e?.params;return s&&Object.keys(s).forEach(t=>{i=i.replace(RegExp(`:${t}`,"g"),s[t])}),i}function s4(t,e){return{path:s8(t,e),...e}}let s6=nA``,s5=new Map,s9=!1;m=iA({penetrable:!0}),y=n2,b=i_(t=>[t.scrollContainer]),_=i_(t=>[t.scrollContainer]),$=iw(t=>!t.inert),new class extends sZ{constructor(){super(ti),g()}static [class extends y{static{({e:[S,v,w,E,C,P,L,x,k,T,O,N,R,M,A,H,I,V,j,D,W,K,U,G,q,B,z,F,J,Y,Z,Q],c:[ti,g]}=sF(this,[m],[[im,0,"transition"],[iy,0,"routes"],[iy,0,"locationStore"],[iy,0,"key"],[ik,0,"loading"],[ik,0,"beforeroutechange"],[ik,0,"routechange"],[ik,0,"error"],[iy,0,"scrollContainer"],[iy,0,"scrollWait"],[iy,0,"scrollIgnoreHash"],[iy,0,"trigger"],[b,0,"rememberScrollPosition",function(t){return t.#K},function(t,e){t.#K=e}],[_,0,"connectTriggerStore",function(t){return t.#U},function(t,e){t.#U=e}],[i_(t=>t.#G()),0,"updateContent",function(t){return t.#q},function(t,e){t.#q=e}],[$,0,"content",function(t){return t.#o},function(t,e){t.#o=e}]],0,t=>#K in t,y))}transition=S(this);routes=(v(this),w(this));locationStore=(E(this),C(this));key=(P(this),L(this));loading=(x(this),k(this));beforeroutechange=(T(this),O(this));routechange=(N(this),R(this));error=(M(this),A(this));scrollContainer=(H(this),I(this));scrollWait=(V(this),j(this));scrollIgnoreHash=(D(this),W(this));trigger=(K(this),U(this,sG));currentRoute=void G(this);currentParams={};get #B(){return"function"==typeof this.scrollContainer?this.scrollContainer():this.scrollContainer}#z=t({content:s6});#F=()=>{if(!this.locationStore)return;let{path:t,query:e,hash:n,data:i}=sG.getParams();this.locationStore({path:t,params:this.currentParams,query:e,hash:n,data:i})};#J;#Y=async()=>{let t=this.#B,e=sG.currentKey;if(!t||e===this.#J)return;this.#J=e;let n=s5.get(e);if(!s9&&void 0!==n){await this.scrollWait?.(),e===sG.currentKey&&t.scroll(0,n);return}(s9||t!==document.scrollingElement)&&(this.scrollIgnoreHash||!sG.getParams().hash)&&t.scroll(0,0)};#Z;#Q=(t,e,n)=>{this.beforeroutechange(t),this.#Z=void 0,this.currentRoute=t,this.currentParams=e;let i=async()=>{this.#z({content:n}),this.#F(),await Promise.resolve(),this.#Y(),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>i()):i()};#K=q(this,()=>{if(this.scrollContainer)return nf(sG,"beforechange",()=>{s9=globalThis.history.state?.$key===sG.currentKey;let t=this.#B;t&&s5.set(sG.currentKey,t.scrollTop)})});#U=(B(this),z(this,()=>this.trigger.store&&nM(this.trigger.store,()=>this.#z())));#G=(F(this),()=>{let{path:t,query:e,hash:n}=this.trigger.getParams();return[this.key,t,e,n]});#q=J(this,([t,e],n)=>{n&&t===n[0]&&e===n[1]?this.#F():this.update()});#o=(Y(this),Z(this,()=>{let{content:t}=this.#z;if(void 0!==t){if(!this.shadowRoot){if(t===s6)return;return nA`${t}`}return t===s6?nA`<slot></slot>`:t}}));update=(Q(this),async()=>{let{path:t,hash:e,query:n}=this.trigger.getParams(),{route:i,params:s={}}=ts.findRoute(this.routes,t),{redirect:r,content:a,getContent:o}=i||{};if(r)return void this.trigger.replace({path:s8({pattern:r},{params:s}),query:n,hash:e});this.trigger===sG&&(location.href!==sq.url||i?.title)&&sq({url:location.href,title:i?.title});let l=a||o?.(s,this.shadowRoot||this);this.loading(i),this.#Z=l;let h=()=>this.#Z===l;try{let t=await l;h()&&this.#Q(i,s,t)}catch(t){h()&&this.error(t)}})}];createLocationStore=()=>{let{path:t,query:e,hash:n,data:i}=sG.getParams();return nR({path:t,query:e,hash:n,data:i,params:{}})};findRoute=(t=[],e)=>{let n=null;for(let i of Array.isArray(t)?t:Object.values(t))if("*"===i.pattern)n=i;else{let t=s3(i.pattern,e);if(t)return{route:i,params:t}}return{route:n}}};let s7=nJ`
3
+ \f\r"'\`<>=]`,iZ=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,iQ=/-->/g,iX=/>/g,i0=RegExp(`>|${iJ}(?:([^\\s"'>=/]+)(${iJ}*=${iJ}*(?:${iY}|("|')|))|$)`,"g"),i1=/'/g,i2=/"/g,i3=/^(?:script|style|textarea|title)$/i,i8="v-if",i4="v-else-if",i6="v-else";class i5{type;strings;values;constructor(t,e,n){this.type=t,this.strings=e,this.values=n}}let i9=t=>(e,...n)=>new i5(t,e,n),i7=i9(1),st=i9(2),se=i9(3),sn=Symbol.for("lit-noChange"),si=new WeakMap,ss=iq.createTreeWalker(iq,129);class sr{el;parts=[];constructor({strings:t,type:e},n){let i,s=0,r=0,a=t.length-1,o=this.parts,[l,h]=((t,e)=>{let n,i=t.length-1,s=[],r=2===e?"<svg>":3===e?"<math>":"",a=iZ;for(let e=0;e<i;e++){let i,o,l=t[e],h=-1,c=0;for(;c<l.length&&(a.lastIndex=c,null!==(o=a.exec(l)));)c=a.lastIndex,a===iZ?"!--"===o[1]?a=iQ:void 0!==o[1]?a=iX:void 0!==o[2]?(i3.test(o[2])&&(n=RegExp(`</${o[2]}`,"g")),a=i0):void 0!==o[3]&&(a=i0):a===i0?">"===o[0]?(a=n??iZ,h=-1):void 0===o[1]?h=-2:(h=a.lastIndex-o[2].length,i=o[1],a=void 0===o[3]?i0:'"'===o[3]?i2:i1):a===i2||a===i1?a=i0:a===iQ||a===iX?a=iZ:(a=i0,n=void 0);let u=a===i0&&t[e+1].startsWith("/>")?" ":"";r+=a===iZ?l+iG:h>=0?(s.push(i),l.slice(0,h)+iW+l.slice(h)+iK+u):l+iK+(-2===h?e:u)}let o=r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"");return[function(t,e){if(!Array.isArray(t))throw Error("invalid template");return void 0!==iD?iD.createHTML(e):e}(t,o),s]})(t,e);if(this.el=sr.createElement(l,n),ss.currentNode=this.el.content,2===e||3===e){let t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=ss.nextNode())&&o.length<a;){if(1===i.nodeType){if(i.hasAttributes())for(let t of i.getAttributeNames())if(t.endsWith(iW)){let e=h[r++],n=i.getAttribute(t).split(iK),a=/([.?@])?(.*)/.exec(e);o.push({type:1,index:s,name:a[2],strings:n,ctor:"."===a[1]?su:"?"===a[1]?sd:"@"===a[1]?sp:sc}),i.removeAttribute(t)}else t.startsWith(iK)&&(o.push({type:6,index:s}),i.removeAttribute(t));if(i3.test(i.tagName)){let t=i.textContent.split(iK),e=t.length-1;if(e>0){i.textContent=ij?ij.emptyScript:"";for(let n=0;n<e;n++)i.append(t[n],iB()),ss.nextNode(),o.push({type:2,index:++s});i.append(t[e],iB())}}}else if(8===i.nodeType)if(i.data===iU)o.push({type:2,index:s});else{let t=-1;for(;-1!==(t=i.data.indexOf(iK,t+1));)o.push({type:7,index:s}),t+=iK.length-1}s++}}static createElement(t,e){let n=iq.createElement("template");return n.innerHTML=t,n}}function sa(t,e,n=t,i){if(e===sn)return e;let s=void 0!==i?n.__directives?.[i]:n.__directive,r=iz(e)?void 0:e._$litDirective$;return s?.constructor!==r&&(s?._$notifyDirectiveConnectionChanged?.(!1),void 0===r?s=void 0:(s=new r(t))._$initialize(t,n,i),void 0!==i?(n.__directives??=[])[i]=s:n.__directive=s),void 0!==s&&(e=sa(t,s._$resolve(t,e.values),s,i)),e}class so{_$template;_$parts=[];_$conditions=[];_$parent;_$disconnectableChildren=void 0;constructor(t,e){this._$template=t,this._$parent=e}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(t){let{el:{content:e},parts:n}=this._$template,i=new Map,s=new Map,r=(t?.creationScope??iq).importNode(e,!0);ss.currentNode=r;let a=ss.nextNode(),o=0,l=0,h=n[0];for(;void 0!==h;){if(o===h.index){let e;2===h.type?e=new sh(a,a.nextSibling,this,t):1===h.type?(h.name===i8&&i.set(a,l),h.name===i4&&s.set(a,l),e=new h.ctor(a,h.name,h.strings,this,t)):6===h.type&&(e=new sf(a,this,t)),this._$parts.push(e),h=n[++l]}o!==h?.index&&(a=ss.nextNode(),o++)}let c=new Map;for(let t of(i.forEach((t,e)=>{let n=new sl(e,t);this._$conditions.push(n),c.set(e,n);let i=e;for(;i=i.nextElementSibling;){let t=s.get(i);if(void 0===t)break;n.push(i,t)}}),this._$parts)){if(t?.type!==2)continue;let e=c.get(t._$endNode);e&&(t._$endNode=e.mark)}return ss.currentNode=iq,r}_update(t){let e=0;for(let n of this._$parts)void 0!==n&&(void 0!==n.strings?(n._$setValue(t,n,e),e+=n.strings.length-2):n.name===i8||n.name===i4||n._$setValue(t[e])),e++;this._$conditions.forEach(e=>e.update(t))}}class sl{mark;list;constructor(t,e){let n=iB();n._$chain=this,t.before(n),this.mark=n,this.list=[{ele:t,idx:e}],this.check()}get next(){return this.list.at(-1).ele.nextElementSibling}push(t,e){this.list.push({ele:t,idx:e}),this.check()}check(){let t=this.next;t?.attributes.getNamedItem(i6)&&(this.list.push({ele:t}),t.removeAttribute(i6))}update(t){let{mark:e,list:n}=this,i=n.find(({idx:e})=>void 0===e||!!t[e]);i&&!i.ele.parentNode&&e.after(i.ele),n.forEach(({ele:t})=>(!i||t!==i.ele)&&t.remove())}}class sh{type=2;options;_$committedValue;__directive;_$startNode;_$endNode;_$parent;__isConnected;get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}_$disconnectableChildren=void 0;constructor(t,e,n,i){this._$startNode=t,this._$endNode=e,this._$parent=n,this.options=i,this.__isConnected=i?.isConnected??!0}get parentNode(){let t=this._$startNode.parentNode,e=this._$parent;return void 0!==e&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(t,e=this){this.parentNode&&(iz(t=sa(this,t,e))?iF(t)||""===t?(iF(this._$committedValue)||this._$clear(),this._$committedValue=void 0):t!==this._$committedValue&&t!==sn&&this._commitText(t):t instanceof i5?this._commitTemplateResult(t):void 0!==t.nodeType?this._commitNode(t):Symbol.iterator in t?this._commitIterable(t):this._commitText(t))}_insert(t){return this._$startNode.parentNode.insertBefore(t,this._$endNode)}_commitNode(t){this._$committedValue!==t&&(this._$clear(),this._$committedValue=this._insert(t))}_commitText(t){!iF(this._$committedValue)&&iz(this._$committedValue)?this._$startNode.nextSibling.data=t:this._commitNode(iq.createTextNode(t)),this._$committedValue=t}_commitTemplateResult(t){let{values:e}=t,n=this._$getTemplate(t);if(this._$committedValue?._$template===n)this._$committedValue._update(e);else{let t=new so(n,this),i=t._clone(this.options);t._update(e),this._commitNode(i),this._$committedValue=t}}_$getTemplate(t){let e=si.get(t.strings);return void 0===e&&si.set(t.strings,e=new sr(t)),e}_commitIterable(t){let e;Array.isArray(this._$committedValue)||(this._$committedValue=[],this._$clear());let n=this._$committedValue,i=0;for(let s of t)i===n.length?n.push(e=new sh(this._insert(iB()),this._insert(iB()),this,this.options)):e=n[i],e._$setValue(s),i++;i<n.length&&(this._$clear(e&&e._$endNode.nextSibling,i),n.length=i)}_$clear(t=this._$startNode.nextSibling,e){for(this._$notifyConnectionChanged?.(!1,!0,e);t&&t!==this._$endNode;){let e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$parent&&(this.__isConnected=t,this._$notifyConnectionChanged?.(t))}}class sc{type=1;element;name;options;strings;_$committedValue;__directives;_$parent;_$disconnectableChildren=void 0;get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(t,e,n,i,s){this.element=t,this.name=e,this._$parent=i,this.options=s,n.length>2||""!==n[0]||""!==n[1]?(this._$committedValue=Array(n.length-1).fill(new String),this.strings=n):this._$committedValue=void 0}_$setValue(t,e=this,n,i){let s=this.strings,r=!1;if(void 0===s)(r=!iz(t=sa(this,t,e,0))||t!==this._$committedValue)&&(this._$committedValue=t);else{let i,a,o=t;for(t=s[0],i=0;i<s.length-1;i++)a=sa(this,o[n+i],e,i),r||=!iz(a)||a!==this._$committedValue[i],iF(a)?t=void 0:iF(t)||(t+=a+s[i+1]),this._$committedValue[i]=a}r&&!i&&this._commitValue(t)}_commitValue(t){iF(t)?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t)}}class su extends sc{type=3;_commitValue(t){this.element[this.name]=t}}class sd extends sc{type=4;_commitValue(t){this.element.toggleAttribute(this.name,!!t)}}class sp extends sc{type=5;_$setValue(t,e=this){t=sa(this,t,e,0);let n=this._$committedValue,i=n&&(!t||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive),s=t&&(!n||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,t),this._$committedValue=t}handleEvent(t){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,t):this._$committedValue.handleEvent(t)}}class sf{element;type=6;__directive;_$committedValue;_$parent;_$disconnectableChildren=void 0;_$props;options;constructor(t,e,n){this.element=t,this._$parent=e,this.options=n}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t){if(t)if(t instanceof sg)t.value=this.element;else if(t._$litDirective$)sa(this,t);else{if(this._$props)for(let t in this._$props)Reflect.set(this.element,t,void 0);Object.assign(this.element,t),this._$props=t}}}let sm=()=>new sg;class sg{value}let sy="2.3.2",sb=t=>(...e)=>({_$litDirective$:t,values:e});class s_{__part;__attributeIndex;__directive;_$parent;_$disconnectableChildren;get _$isConnected(){return this._$parent._$isConnected}_$initialize(t,e,n){this.__part=t,this._$parent=e,this.__attributeIndex=n}_$resolve(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}let s$=(t,e,n)=>{let i=t._$startNode.parentNode,s=void 0===e?t._$endNode:e._$startNode;if(void 0===n)n=new sh(i.insertBefore(document.createComment(""),s),i.insertBefore(document.createComment(""),s),t,t.options);else{let e=n._$endNode.nextSibling,r=n._$parent,a=r!==t;if(a){let e;n._$reparentDisconnectables?.(t),n._$parent=t,void 0!==n._$notifyConnectionChanged&&(e=t._$isConnected)!==r._$isConnected&&n._$notifyConnectionChanged(e)}if(e!==s||a){let t=n._$startNode;for(;t!==e;){let e=t.nextSibling;i.insertBefore(t,s),t=e}}}return n},sS=(t,e,n=t)=>(t._$setValue(e,n),t),sv={},sw=t=>{t._$notifyConnectionChanged?.(!1,!0);let e=t._$startNode,n=t._$endNode.nextSibling;for(;e!==n;){let t=e.nextSibling;e.remove(),e=t}},sE=(t,e,n)=>{let i=new Map;for(let s=e;s<=n;s++)i.set(t[s],s);return i},sC=sb(class extends s_{_itemKeys;constructor(t){if(super(),2!==t.type)throw Error("repeat() can only be used in text expressions")}_getValuesAndKeys(t,e,n){let i;void 0===n?n=e:void 0!==e&&(i=e);let s=[],r=[],a=0;for(let e of t)s[a]=i?i(e,a):a,r[a]=n(e,a),a++;return{values:r,keys:s}}render(t,e,n){return this._getValuesAndKeys(t,e,n).values}update(t,[e,n,i]){let s,r,a=t._$committedValue,{values:o,keys:l}=this._getValuesAndKeys(e,n,i);if(!Array.isArray(a))return this._itemKeys=l,o;let h=this._itemKeys??=[],c=[],u=0,d=a.length-1,p=0,f=o.length-1;for(;u<=d&&p<=f;)if(null===a[u])u++;else if(null===a[d])d--;else if(h[u]===l[p])c[p]=sS(a[u],o[p]),u++,p++;else if(h[d]===l[f])c[f]=sS(a[d],o[f]),d--,f--;else if(h[u]===l[f])c[f]=sS(a[u],o[f]),s$(t,c[f+1],a[u]),u++,f--;else if(h[d]===l[p])c[p]=sS(a[d],o[p]),s$(t,a[u],a[d]),d--,p++;else if(void 0===s&&(s=sE(l,p,f),r=sE(h,u,d)),s.has(h[u]))if(s.has(h[d])){let e=r.get(l[p]),n=void 0!==e?a[e]:null;if(null===n){let e=s$(t,a[u]);sS(e,o[p]),c[p]=e}else c[p]=sS(n,o[p]),s$(t,a[u],n),a[e]=null;p++}else sw(a[d]),d--;else sw(a[u]),u++;for(;p<=f;){let e=s$(t,c[f+1]);sS(e,o[p]),c[p++]=e}for(;u<=d;){let t=a[u++];null!==t&&sw(t)}return this._itemKeys=l,((t,e=sv)=>t._$committedValue=e)(t,c),sn}});nI(i7,(t,e,n)=>{let i=n?.renderBefore??e,s=i._$litPart$;if(void 0===s){let t=n?.renderBefore??null;i._$litPart$=s=new sh(e.insertBefore(iB(),t),t,void 0,n??{})}return s._$setValue(t),s}),globalThis.__GEM_DEVTOOLS__HOOK__&&!globalThis.__GEM_DEVTOOLS__HOOK__.GemElement&&Object.assign(globalThis.__GEM_DEVTOOLS__HOOK__,{...eZ,...eY,...eQ,...eX});let sP=globalThis.history,sL=sP.pushState.bind(sP),sx=sP.replaceState.bind(sP),sk=0,sT=()=>`${performance.now()}-${++sk}`,sO=nR({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),sN=new Map,sR=()=>new Map([...sN].map(([t,e])=>[t,{...e}])),sM=["$key","$hasCloseHandle","$hasOpenHandle","$hasShouldCloseHandle"];function sA(t){return t===sK.basePath?"/":t.replace(RegExp(`^${sK.basePath}/`),"/")}function sH(t){sK.dispatchEvent(new CustomEvent("beforechange")),nw(sO),sO(t)}function sI(t){let e=sK.getParams()||{path:sA(location.pathname),query:new ny,title:document.title},n=t.path?np(e.path,t.path):sA(location.pathname),i=new ny(t.query??(t.path?"":location.search)),s=String(i)!==String(e.query),r=s?i:e.query,a=n!==e.path||s,o=t.title||(a?"":e.title),l=t.close||t.data||t.open||t.shouldClose,h=decodeURIComponent(t.hash??(!a&&l?location.hash:""));return{...t,title:o,path:n,query:r,hash:h}}function sV(t,e){var n=t.data;if(sO.$key!==n?.$key){for(let t of sM)if(n?.[t])throw new nE(`\`${t}\` is not allowed`)}let i=sI(t),{title:s,path:r,query:a,hash:o,close:l,open:h,shouldClose:c,data:u}=i,d={$hasCloseHandle:!!l,$hasOpenHandle:!!h,$hasShouldCloseHandle:!!c,$key:sT(),$title:s,...u};nt(sN,sR).set(d.$key,i),sH(d);let p=(sK.basePath?sK.basePath+r:r)+new ny(a)+o,f=decodeURIComponent(location.hash);e(d,s,p),f!==o&&dispatchEvent(new CustomEvent("hashchange"))}function sj(t,e,n,i){let{pathname:s,search:r,hash:a}=new URL(n,location.origin+location.pathname);sV({path:s,query:r,hash:a,title:e,data:t},i)}let sD=nR({basePath:""});class sW extends EventTarget{get store(){return sO}get currentKey(){return sO.$key}get basePath(){return sD.basePath}set basePath(t){sD({basePath:t}),Object.assign(this.getParams(),{path:sA(location.pathname)})}getParams(){return nt(sN,sR).get(sO.$key)}updateParams(t){Object.assign(this.getParams(),t),sO()}push(t){sV(t,sL)}replace(t){sV(t,sx)}pushIgnoreCloseHandle(t){sO.$hasCloseHandle?(this.getParams()?.close?.(),this.replace(t)):this.push(t)}forward(){sP.forward()}back(){sP.back()}}let sK=new sW,sU=nR({defaultTitle:document.title,url:"",title:""});if(!globalThis._GEMHISTORY){if(globalThis._GEMHISTORY={history:sK,titleStore:sU,basePathStore:sD},sP.pushState=(t,e,n)=>{sj(t,e,n,sL)},sP.replaceState=(t,e,n)=>{sj(t,e,n,sx)},addEventListener("hashchange",({isTrusted:t})=>{t&&sK.replace({hash:location.hash})}),sP.state)if(sP.state.$hasCloseHandle){sO(sP.state);let t=sI({title:document.title});nt(sN,sR).set(sO.$key,t),sK.back()}else{let t=sI({title:document.title,hash:location.hash});sO({$key:sT(),...sP.state||{}}),nt(sN,sR).set(sO.$key,t)}else{let{protocol:t,pathname:e,search:n,hash:i}=location;(t.startsWith("http")||t.startsWith("tauri"))&&sK.replace({path:e,query:n,hash:i})}nM(sU,()=>{let t=sK.getParams();t&&(t.title=sU.title)}),nM(sO,()=>{let{title:t}=sK.getParams();t!==sU.title&&sU({title:t})});let t=!1;addEventListener("popstate",e=>{let n=e.state;if(n?.$key){if(t){t=!1;return}if(!nt(sN,sR).has(n.$key)){let{pathname:t,search:e,hash:i}=location;nt(sN,sR).set(n.$key,{path:sA(t),query:new ny(e),hash:decodeURIComponent(i),title:sU.title||n.$title,data:n})}if(parseFloat(n.$key)>parseFloat(sO.$key)&&n.$hasOpenHandle)nt(sN,sR).get(n.$key)?.open?.();else if(sO.$hasCloseHandle){let e=nt(sN,sR).get(sO.$key),i=e?.close,s=e?.shouldClose;if(s&&!s()){t=!0,sK.forward();return}i?i():n.$hasCloseHandle&&(t=!0,sK.back())}sH(n)}})}let{history:sG,titleStore:sq,basePathStore:sB}=globalThis._GEMHISTORY;function sz(t,e,n){"symbol"==typeof e&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}function sF(t,e,n,i,s,r){var a,o,l,h,c,u,d,p=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,m=Object.create,g=[m(null),m(null)],y=e.length;function b(e,n,i){return function(s,r){n&&(r=s,s=t);for(var a=0;a<e.length;a++)r=e[a].apply(s,i?[r]:[]);return i?r:s}}function _(t,e,n,i){if("function"!=typeof t&&(i||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(i?"":" or undefined"));return t}function $(t,e,n,i,s,r,a,o,l,h,c){function p(t){if(!c(t))throw TypeError("Attempted to access private element on non-instance")}var m=[].concat(e[0]),y=e[3],$=!a,S=1===s,v=3===s,w=4===s,E=2===s;function C(e,n,i){return function(s,r){return n&&(r=s,s=t),i&&i(s),P[e].call(s,r)}}var P={},L=[],x=v?"get":w||S?"set":"value";if(!$&&(l?(h||S?P={get:sz(function(){return y(this)},i,"get"),set:function(t){e[4](this,t)}}:P[x]=y,h||sz(P[x],i,E?"":x)):h||(P=Object.getOwnPropertyDescriptor(t,i)),!h&&!l)){if((d=g[+o][i])&&(d^s)!=7)throw Error("Decorating two elements with the same name ("+P[x].name+") is not supported yet");g[+o][i]=s<3?1:s}for(var k=t,T=m.length-1;T>=0;T-=n?2:1){var O=_(m[T],"A decorator","be",!0),N=n?m[T-1]:void 0,R={},M={kind:["field","accessor","method","getter","setter","class"][s],name:i,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");_(e,"An initializer","be",!0),r.push(e)}).bind(null,R)};if($){d=O.call(N,k,M),R.v=1,_(d,"class decorators","return")&&(k=d);continue}if(M.static=o,M.private=l,d=M.access={has:l?c.bind():function(t){return i in t}},w||(d.get=l?E?function(t){return p(t),P.value}:C("get",0,p):function(t){return t[i]}),E||v||(d.set=l?C("set",0,p):function(t,e){t[i]=e}),k=O.call(N,S?{get:P.get,set:P.set}:P[x],M),R.v=1,S){if("object"==typeof k&&k)(d=_(k.get,"accessor.get"))&&(P.get=d),(d=_(k.set,"accessor.set"))&&(P.set=d),(d=_(k.init,"accessor.init"))&&L.unshift(d);else if(void 0!==k)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else _(k,(h?"field":"method")+" decorators","return")&&(h?L.unshift(k):P[x]=k)}return s<2&&a.push(b(L,o,1),b(r,o,0)),h||$||(l?S?a.splice(-1,0,C("get",o),C("set",o)):a.push(E?P[x]:_.call.bind(P[x])):f(t,i,P)),k}function S(t){return f(t,p,{configurable:!0,enumerable:!0,value:u})}return void 0!==r&&(u=r[p]),u=m(null==u?null:u),l=[],h=function(t){t&&l.push(b(t))},(c=function(e,i){for(var r=0;r<n.length;r++){var h=n[r],c=h[1],u=7&c;if((8&c)==e&&!u==i){var d=h[2],p=!!h[3],f=16&c;$(e?t:t.prototype,h,f,p?"#"+d:function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),u,u<2?[]:e?o=o||[]:a=a||[],l,!!e,p,i,e&&p?function(e){return function(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?typeof t:"null"));return t}(e)===t}:s)}}})(8,0),c(0,0),c(8,1),c(0,1),h(a),h(o),d=l,y||S(t),{e:d,get c(){var v=[];return y&&[S(t=$(t,[e],i,t.name,5,v)),b(v,1)]}}}let sJ=Symbol();i=iR(sG.store),s=iI({role:"dialog",ariaModal:"true"}),a=n2,o=iS();class sY extends a{static{({e:[l,h,c,u,d,p],c:[f,r]}=sF(this,[i,s],[[ip,0,"label"],[iC,0,"opened"],[o,0,"init",function(t){return t.#M},function(t,e){t.#M=e}]],0,t=>#M in t,a))}label=l(this);opened=(h(this),c(this));#A=void u(this);#H;#I=[];#V=()=>{this.inert=!0,this.#I.forEach(t=>t.inert=!1),this.#A?this.#A.before(this):this.#H&&this.#H?.appendChild(this),this.dispatchEvent(new CustomEvent("close")),this.opened=!1};#j=()=>{this.hidden=!1,this.inert=!1,this.#A=this.nextSibling,this.#H=this.parentElement||this.getRootNode(),this.#I=[...document.body.children].filter(t=>!t.inert),this.#I.forEach(t=>t.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0};#M=d(this,()=>this.inert=!0);open=(p(this),()=>{if(!this.opened)return this.#j(),sG.push({title:this.label,open:this.#j,close:this.#V,shouldClose:this.shouldClose}),sJ});shouldClose(){return!0}close=()=>(sG.back(),sJ);forceClose=()=>(this.opened=!1,setTimeout(this.close,100),sJ);static{r()}}function sZ(t){return t}let sQ=Symbol("open mark"),sX=Symbol();function s0(t){let e,n,i,s,r,a,o,l,h,c,u;return e=iM(),n=iI({role:"alertdialog",ariaModal:"true"}),s=n2,r=iv(),a=iv(),new class extends sZ{constructor(){super(u),i()}static [class extends s{static{({e:[o,l,h,c],c:[u,i]}=sF(this,[e,n],[[r,0,"connectHistory",function(t){return t.#D},function(t,e){t.#D=e}],[a,0,"connectStore",function(t){return t.#W},function(t,e){t.#W=e}]],0,t=>#D in t,s))}constructor(...t){super(...t),c(this)}static get isOpen(){return this.store[sQ]}static open(t){let e=new this;this.instance=e,this.inertStore=[...document.body.children].filter(t=>!t.inert),this.inertStore.forEach(t=>t.inert=!0),document.body.append(e);let n=()=>this.store({[sQ]:!0,...t});return setTimeout(()=>{n(),sG.push({title:e.label,open:n,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),sX}static close(){return sG.back(),sX}static closeHandle(){return this.inertStore.forEach(t=>t.inert=!1),this.instance?.remove(),this.store({[sQ]:!1,...t}),sX}static shouldClose(){return!0}label="";#D=o(this,()=>nM(sG.store,this.update));#W=(l(this),h(this,()=>nM(u.store,this.update)))}];inertStore=[];instance=null;store=nR({[sQ]:!1,...t})},u}let s1=/^[\w\-./~]*/,s2=new Map;function s3(t,e){let n=s2.get(t);return n||s2.set(t,n=function(t){let e=s1.exec(t)[0];if(e===t)return e=>e===t?{}:null;if("*"===t)return t=>({0:t});if(!globalThis.URLPattern){let e,n,i;return e=0,n=t.replace(/:[^/$]+|\*/g,t=>"*"===t?`(?<_${e++}>.*)`:`(?<${t.slice(1)}>[^/]+)`),i=RegExp(`^${n}$`),t=>{let e=t.match(i);if(!e)return null;let n={};for(let t in e.groups)n[t.startsWith("_")?t.slice(1):t]=e.groups[t];return n}}let n=new URLPattern({pathname:t}),i=e.replace(/\/$/,"");return t=>t.startsWith(i)?n.exec({pathname:t})?.pathname.groups:null}(t)),n(e)||n(`${e}/`)||null}function s8(t,e){let n=0,i=t.pattern.replaceAll("*",()=>`:${n++}`),s=e?.params;return s&&Object.keys(s).forEach(t=>{i=i.replace(RegExp(`:${t}`,"g"),s[t])}),i}function s4(t,e){return{path:s8(t,e),...e}}let s6=nA``,s5=new Map,s9=!1;m=iA({penetrable:!0}),y=n2,b=i_(t=>[t.scrollContainer]),_=i_(t=>[t.scrollContainer]),$=iw(t=>!t.inert),new class extends sZ{constructor(){super(ti),g()}static [class extends y{static{({e:[S,v,w,E,C,P,L,x,k,T,O,N,R,M,A,H,I,V,j,D,W,K,U,G,q,B,z,F,J,Y,Z,Q],c:[ti,g]}=sF(this,[m],[[im,0,"transition"],[iy,0,"routes"],[iy,0,"locationStore"],[iy,0,"key"],[ik,0,"loading"],[ik,0,"beforeroutechange"],[ik,0,"routechange"],[ik,0,"error"],[iy,0,"scrollContainer"],[iy,0,"scrollWait"],[iy,0,"scrollIgnoreHash"],[iy,0,"trigger"],[b,0,"rememberScrollPosition",function(t){return t.#K},function(t,e){t.#K=e}],[_,0,"connectTriggerStore",function(t){return t.#U},function(t,e){t.#U=e}],[i_(t=>t.#G()),0,"updateContent",function(t){return t.#q},function(t,e){t.#q=e}],[$,0,"content",function(t){return t.#o},function(t,e){t.#o=e}]],0,t=>#K in t,y))}transition=S(this);routes=(v(this),w(this));locationStore=(E(this),C(this));key=(P(this),L(this));loading=(x(this),k(this));beforeroutechange=(T(this),O(this));routechange=(N(this),R(this));error=(M(this),A(this));scrollContainer=(H(this),I(this));scrollWait=(V(this),j(this));scrollIgnoreHash=(D(this),W(this));trigger=(K(this),U(this,sG));currentRoute=void G(this);currentParams={};get #B(){return"function"==typeof this.scrollContainer?this.scrollContainer():this.scrollContainer}#z=t({content:s6});#F=()=>{if(!this.locationStore)return;let{path:t,query:e,hash:n,data:i}=sG.getParams();this.locationStore({path:t,params:this.currentParams,query:e,hash:n,data:i})};#J;#Y=async()=>{let t=this.#B,e=sG.currentKey;if(!t||e===this.#J)return;this.#J=e;let n=s5.get(e);if(!s9&&void 0!==n){await this.scrollWait?.(),e===sG.currentKey&&t.scroll(0,n);return}(s9||t!==document.scrollingElement)&&(this.scrollIgnoreHash||!sG.getParams().hash)&&t.scroll(0,0)};#Z;#Q=(t,e,n)=>{this.beforeroutechange(t),this.#Z=void 0,this.currentRoute=t,this.currentParams=e;let i=async()=>{this.#z({content:n}),this.#F(),await Promise.resolve(),this.#Y(),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>i()):i()};#K=q(this,()=>{if(this.scrollContainer)return nf(sG,"beforechange",()=>{s9=globalThis.history.state?.$key===sG.currentKey;let t=this.#B;t&&s5.set(sG.currentKey,t.scrollTop)})});#U=(B(this),z(this,()=>this.trigger.store&&nM(this.trigger.store,()=>this.#z())));#G=(F(this),()=>{let{path:t,query:e,hash:n}=this.trigger.getParams();return[this.key,t,e,n]});#q=J(this,([t,e],n)=>{n&&t===n[0]&&e===n[1]?this.#F():this.update()});#o=(Y(this),Z(this,()=>{let{content:t}=this.#z;if(void 0!==t){if(!this.shadowRoot){if(t===s6)return;return nA`${t}`}return t===s6?nA`<slot></slot>`:t}}));update=(Q(this),async()=>{let{path:t,hash:e,query:n}=this.trigger.getParams(),{route:i,params:s={}}=ts.findRoute(this.routes,t),{redirect:r,content:a,getContent:o}=i||{};if(r)return void this.trigger.replace({path:s8({pattern:r},{params:s}),query:n,hash:e});this.trigger===sG&&(location.href!==sq.url||i?.title)&&sq({url:location.href,title:i?.title});let l=a||o?.(s,this.shadowRoot||this);this.loading(i),this.#Z=l;let h=()=>this.#Z===l;try{let t=await l;h()&&this.#Q(i,s,t)}catch(t){h()&&this.error(t)}})}];createLocationStore=()=>{let{path:t,query:e,hash:n,data:i}=sG.getParams();return nR({path:t,query:e,hash:n,data:i,params:{}})};findRoute=(t=[],e)=>{let n=null;for(let i of Array.isArray(t)?t:Object.values(t))if("*"===i.pattern)n=i;else{let t=s3(i.pattern,e);if(t)return{route:i,params:t}}return{route:n}}};let s7=nJ`
4
4
  :host(:where(:not([hidden]))),
5
5
  :not(:defined) {
6
6
  display: contents;
@@ -1 +1 @@
1
- {"version":3,"file":"gesture.d.ts","sourceRoot":"","sources":["../../src/elements/base/gesture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAO,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MA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AC;IACnC,KAAK,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACjC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC7B,GAAG,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAE3B,WAAW,EAAE,MAAM,CAAC;IAExB,QAAQ,EAAE,OAAO,CAAC;IA2MzB,oBAAoB;IACpB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAa;CACrD"}
@@ -113,7 +113,26 @@ const style = css `
113
113
  &:where(:not([hidden])) {
114
114
  display: block;
115
115
  user-select: none;
116
- touch-action: attr(touch-action, none);
116
+ touch-action: none;
117
+ }
118
+ /* 常用取值,兼容不支持在 touch-action 中使用 attr() 的浏览器 */
119
+ &:where([touch-action='auto']) {
120
+ touch-action: auto;
121
+ }
122
+ &:where([touch-action='manipulation']) {
123
+ touch-action: manipulation;
124
+ }
125
+ &:where([touch-action='pan-x']) {
126
+ touch-action: pan-x;
127
+ }
128
+ &:where([touch-action='pan-y']) {
129
+ touch-action: pan-y;
130
+ }
131
+ /* 支持任意取值;不带类型的 attr() 是字符串,对 touch-action 无效 */
132
+ @supports (touch-action: attr(touch-action type(*), none)) {
133
+ &:where([touch-action]) {
134
+ touch-action: attr(touch-action type(*), none);
135
+ }
117
136
  }
118
137
  }
119
138
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"gesture.js","sourceRoot":"","sources":["../../src/elements/base/gesture.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAoCrD,wCAAwC;AACxC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,eAAe,GAAG,GAAG,CAAC,CAAC,QAAQ;A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AAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe;YACnE,gCAAgC;YAChC,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAEpD,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;YACzD,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QAC5E,CAAC,EAAC;QAEF,oBAAoB;QACpB,QAAQ,8DAAkC,IAAI,GAAG,EAAE,EAAC;;;;SAtNzC,iBAAiB"}
package/lib/element.d.ts CHANGED
@@ -7,7 +7,11 @@ export { directive } from './directive';
7
7
  export { createRef, mathml, svg, TemplateResult } from './lit-html';
8
8
  export * from './reactive';
9
9
  export { repeat } from './repeat';
10
+ type HookExports = typeof reactiveExports & typeof decoratorsExports & typeof storeExports & typeof versionExports;
10
11
  declare global {
11
- var __GEM_DEVTOOLS__HOOK__: (typeof reactiveExports & typeof decoratorsExports & typeof storeExports & typeof versionExports) | Record<string, never> | undefined;
12
+ /** devtools 注入的钩子,其他包可以扩展,例如 gem-ssr */
13
+ interface GemDevToolsHook extends HookExports {
14
+ }
15
+ var __GEM_DEVTOOLS__HOOK__: GemDevToolsHook | Record<string, never> | undefined;
12
16
  }
13
17
  //# sourceMappingURL=element.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../src/lib/element.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,cAAc,CAAC;AAElD,OAAO,KAAK,eAAe,MAAM,YAAY,CAAC;AAE9C,OAAO,KAAK,YAAY,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,cAAc,MAAM,WAAW,CAAC;AAI5C,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACpE,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,sBAAsB,EACtB,CAAC,OAAO,eAAe,GAAG,OAAO,iBAAiB,GAAG,OAAO,YAAY,GAAG,OAAO,cAAc,CAAC,GACjG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GACrB,SAAS,CAAC;CACf"}
1
+ {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../src/lib/element.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,cAAc,CAAC;AAElD,OAAO,KAAK,eAAe,MAAM,YAAY,CAAC;AAE9C,OAAO,KAAK,YAAY,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,cAAc,MAAM,WAAW,CAAC;AAI5C,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACpE,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,KAAK,WAAW,GAAG,OAAO,eAAe,GAAG,OAAO,iBAAiB,GAAG,OAAO,YAAY,GAAG,OAAO,cAAc,CAAC;AAEnH,OAAO,CAAC,MAAM,CAAC;IACb,wCAAwC;IACxC,UAAU,eAAgB,SAAQ,WAAW;KAAG;IAChD,IAAI,sBAAsB,EAAE,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,SAAS,CAAC;CACjF"}
@@ -1 +1 @@
1
- {"version":3,"file":"element.js","sourceRoot":"","sources":["../src/lib/element.ts"],"names":[],"mappings":"AAAA,OAAO,KAA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AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACpE,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAUlC,sBAAsB;AACtB,IAAI,UAAU,CAAC,sBAAsB,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC,UAAU,EAAE,CAAC;IACvF,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,sBAAsB,EAAE;QAC/C,GAAG,eAAe;QAClB,GAAG,iBAAiB;QACpB,GAAG,YAAY;QACf,GAAG,cAAc;KAClB,CAAC,CAAC;AACL,CAAC"}
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const version = "2.3.1";
1
+ export declare const version = "2.3.2";
2
2
  //# sourceMappingURL=version.d.ts.map
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const version = '2.3.1';
1
+ export const version = '2.3.2';
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantou/gem",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "description": "💎 Build reusable custom elements and web apps on Web Components",
5
5
  "keywords": [
6
6
  "frontend",
@@ -22,6 +22,7 @@
22
22
  "./helper/*": "./helper/*.js"
23
23
  },
24
24
  "files": [
25
+ "/AGENTS.md",
25
26
  "/index.*",
26
27
  "/dist/",
27
28
  "/elements/",
@@ -137,7 +137,26 @@ const style = css`
137
137
  &:where(:not([hidden])) {
138
138
  display: block;
139
139
  user-select: none;
140
- touch-action: attr(touch-action, none);
140
+ touch-action: none;
141
+ }
142
+ /* 常用取值,兼容不支持在 touch-action 中使用 attr() 的浏览器 */
143
+ &:where([touch-action='auto']) {
144
+ touch-action: auto;
145
+ }
146
+ &:where([touch-action='manipulation']) {
147
+ touch-action: manipulation;
148
+ }
149
+ &:where([touch-action='pan-x']) {
150
+ touch-action: pan-x;
151
+ }
152
+ &:where([touch-action='pan-y']) {
153
+ touch-action: pan-y;
154
+ }
155
+ /* 支持任意取值;不带类型的 attr() 是字符串,对 touch-action 无效 */
156
+ @supports (touch-action: attr(touch-action type(*), none)) {
157
+ &:where([touch-action]) {
158
+ touch-action: attr(touch-action type(*), none);
159
+ }
141
160
  }
142
161
  }
143
162
  `;
@@ -13,11 +13,12 @@ export { createRef, mathml, svg, TemplateResult } from './lit-html';
13
13
  export * from './reactive';
14
14
  export { repeat } from './repeat';
15
15
 
16
+ type HookExports = typeof reactiveExports & typeof decoratorsExports & typeof storeExports & typeof versionExports;
17
+
16
18
  declare global {
17
- var __GEM_DEVTOOLS__HOOK__:
18
- | (typeof reactiveExports & typeof decoratorsExports & typeof storeExports & typeof versionExports)
19
- | Record<string, never>
20
- | undefined;
19
+ /** devtools 注入的钩子,其他包可以扩展,例如 gem-ssr */
20
+ interface GemDevToolsHook extends HookExports {}
21
+ var __GEM_DEVTOOLS__HOOK__: GemDevToolsHook | Record<string, never> | undefined;
21
22
  }
22
23
 
23
24
  // 只记录第一次定义,往往是最外层 App
@@ -1 +1 @@
1
- export const version = '2.3.1';
1
+ export const version = '2.3.2';