@mantou/gem 2.2.14 → 2.3.0

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.
Files changed (82) hide show
  1. package/dist/gem.js +7 -7
  2. package/dist/gem.mjs +7 -7
  3. package/elements/base/link.d.ts.map +1 -1
  4. package/elements/base/link.js +6 -3
  5. package/elements/base/link.js.map +1 -1
  6. package/elements/base/modal-factory.d.ts +3 -2
  7. package/elements/base/modal-factory.d.ts.map +1 -1
  8. package/elements/base/route.d.ts +8 -3
  9. package/elements/base/route.d.ts.map +1 -1
  10. package/elements/base/route.js +84 -44
  11. package/elements/base/route.js.map +1 -1
  12. package/elements/base/use.d.ts.map +1 -1
  13. package/elements/base/use.js +11 -0
  14. package/elements/base/use.js.map +1 -1
  15. package/helper/hmr.d.ts +3 -2
  16. package/helper/hmr.d.ts.map +1 -1
  17. package/helper/hmr.js +95 -23
  18. package/helper/hmr.js.map +1 -1
  19. package/helper/i18n.d.ts +2 -1
  20. package/helper/i18n.d.ts.map +1 -1
  21. package/helper/i18n.js +9 -1
  22. package/helper/i18n.js.map +1 -1
  23. package/helper/theme.d.ts +8 -4
  24. package/helper/theme.d.ts.map +1 -1
  25. package/helper/theme.js +15 -10
  26. package/helper/theme.js.map +1 -1
  27. package/lib/decorators.d.ts.map +1 -1
  28. package/lib/decorators.js +31 -46
  29. package/lib/decorators.js.map +1 -1
  30. package/lib/history.d.ts +10 -7
  31. package/lib/history.d.ts.map +1 -1
  32. package/lib/history.js +37 -51
  33. package/lib/history.js.map +1 -1
  34. package/lib/lit-html.d.ts +15 -0
  35. package/lib/lit-html.d.ts.map +1 -1
  36. package/lib/lit-html.js +3 -1
  37. package/lib/lit-html.js.map +1 -1
  38. package/lib/reactive.d.ts +6 -2
  39. package/lib/reactive.d.ts.map +1 -1
  40. package/lib/reactive.js +114 -118
  41. package/lib/reactive.js.map +1 -1
  42. package/lib/server.d.ts +26 -0
  43. package/lib/server.d.ts.map +1 -0
  44. package/lib/server.js +45 -0
  45. package/lib/server.js.map +1 -0
  46. package/lib/store.d.ts +4 -1
  47. package/lib/store.d.ts.map +1 -1
  48. package/lib/store.js +24 -9
  49. package/lib/store.js.map +1 -1
  50. package/lib/utils.d.ts +2 -2
  51. package/lib/utils.d.ts.map +1 -1
  52. package/lib/utils.js +20 -7
  53. package/lib/utils.js.map +1 -1
  54. package/lib/version.d.ts +1 -1
  55. package/lib/version.d.ts.map +1 -1
  56. package/lib/version.js +1 -1
  57. package/lib/version.js.map +1 -1
  58. package/package.json +3 -4
  59. package/src/elements/base/link.ts +5 -3
  60. package/src/elements/base/route.ts +84 -49
  61. package/src/elements/base/use.ts +11 -0
  62. package/src/helper/hmr.ts +105 -37
  63. package/src/helper/i18n.ts +12 -1
  64. package/src/helper/theme.ts +19 -10
  65. package/src/lib/decorators.ts +38 -51
  66. package/src/lib/history.ts +37 -46
  67. package/src/lib/lit-html.ts +3 -1
  68. package/src/lib/reactive.ts +115 -124
  69. package/src/lib/server.ts +59 -0
  70. package/src/lib/store.ts +24 -9
  71. package/src/lib/utils.ts +22 -7
  72. package/src/lib/version.ts +1 -1
  73. package/src/test/elements/gesture.test.ts +13 -5
  74. package/src/test/elements/route.test.ts +102 -0
  75. package/src/test/elements/title.test.ts +7 -0
  76. package/src/test/gem-element/advance.test.ts +19 -0
  77. package/src/test/gem-element/basic.test.ts +33 -0
  78. package/src/test/history.test.ts +19 -0
  79. package/src/test/store.test.ts +12 -0
  80. package/src/test/theme.test.ts +8 -1
  81. package/src/test/utils.test.ts +6 -0
  82. package/src/test/utils.ts +56 -0
package/dist/gem.mjs CHANGED
@@ -1,11 +1,11 @@
1
- let t,e,n,r,i,s,o,a,l,c,u,h,d,f,p,m,g,y,b,v,w,S,_,$,E,C,T,x,P,O,L,k,j,N,A,M,R,I,H,D,V,z,W,U,G,q,B,K,J,F,Q,Y,Z,X,tt,te,tn,tr,ti,ts,to,ta,tl,tc,tu,th,td,tf,tp,tm,tg,ty,tb,tv,tw,tS,t_,t$,tE,tC,tT,tx,tP,tO,tL,tk,tj,tN,tA,tM,tR,tI,tH,tD,tV,tz,tW,tU,tG,tq,tB,tK,tJ,tF,tQ,tY,tZ,tX,t0,t1,t2,t3,t8,t4,t7,t6,t5,t9,et,ee,en,er,ei,es,eo,ea,el,ec,eu,eh,ed,ef,ep,em,eg,ey,eb,ev,ew,eS,e_,e$,eE,eC,eT,ex,eP,eO,eL,ek,ej,eN,eA,eM,eR,eI,eH,eD,eV,ez,eW,eU,eG,eq,eB;var eK={};eK.d=(t,e,n)=>{var r=(e,n)=>{for(var r in e)eK.o(e,r)&&!eK.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,[n]:e[r]})};r(e,"get"),r(n,"value")},eK.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),eK.r=t=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var eJ={};eK.r(eJ),eK.d(eJ,{adoptedStyle:()=>rm,aria:()=>rw,async:()=>rv,attribute:()=>n6,boolattribute:()=>n5,connectStore:()=>rg,customElement:()=>rS,effect:()=>rn,emitter:()=>rd,fallback:()=>ra,globalemitter:()=>rf,light:()=>rb,memo:()=>re,mounted:()=>rs,numattribute:()=>n9,part:()=>rh,property:()=>rt,shadow:()=>ry,slot:()=>ru,state:()=>rl,template:()=>ro,unmounted:()=>rr,willMount:()=>ri});var eF={};eK.r(eF),eK.d(eF,{GemElement:()=>nV,SheetToken:()=>nT,UpdateToken:()=>nx,_RenderErrorEvent:()=>nO,_createTemplate:()=>e,createState:()=>t,css:()=>nA,html:()=>ny,render:()=>nb,setEngine:()=>nv,setHydrationEngine:()=>nS});var eQ={};eK.r(eQ),eK.d(eQ,{_StoreListenerMap:()=>np,connect:()=>ng,createStore:()=>nm});var eY={};eK.r(eY),eK.d(eY,{version:()=>it});let{assign:eZ,fromEntries:eX,entries:e0,keys:e1}=Object;function e2(t){Promise.resolve().then(t)}let e3=new Set;function e8(t,e=e2){e3.has(t)||(e(()=>{e3.delete(t),t()}),e3.add(t))}function e4(t,e){return delete e.name,delete e.length,eZ(e,t),e}function e7(t="",e=""){let{pathname:n,search:r,hash:i}=new URL(e,location.origin+t);return n+r+decodeURIComponent(i)}function e6(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}class e5 extends EventTarget{#t=new Map;#e;#n;#r(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 r=e?this.#e:this.find(n.value);for(;r&&n;){if(r.value===n.value)n=n.next;else if(!e)return!1;r=r.next}return!n}find(t){return this.#t.get(t)}add(t){this.#n||this.dispatchEvent(new CustomEvent("start"));let e=this.#r(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.#r(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 e9 extends WeakMap{get(t){let e=super.get(t);return e||(e={},this.set(t,e)),e}}class nt extends URLSearchParams{concat(t){e0("string"==typeof t?eX(new URLSearchParams(t).entries()):t).forEach(([t,e])=>{this.append(t,this.#i(e))})}#i=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.#i(e)));else{let n=this.#i(e);n?this.set(t,n):this.delete(t)}}#s=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.#s(t))}toString(){let t=super.toString();return t?`?${t}`:""}toJSON(){return this.toString()}}function ne(t,...e){return t.reduce((t,n,r)=>t+(e[r-1]??"")+n)}let nn=ne;function nr(t=5){let e=Math.random().toString(36).slice(2,2+t);return e.length<t?e+nr(t-e.length):e}function ni(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function ns(t){return t.replace(/-(.)/g,(t,e)=>e.toUpperCase())}function no(t){return e1(t).forEach(e=>{delete t[e]}),t}class na extends Error{constructor(t){super(t),this.message=`gem: ${this.message}`}}function nl(t,e){let n=t.length;if(e.length!==n)return!0;for(let r=0;r<n;r++)if(t[r]!==e[r])return!0;return!1}function nc(t,e,n){let r=e;for(let i in t){let s=n(i,t[i]);r+=s?s+e:""}return r}function nu(t){return nc(t,";",(t,e)=>e||0===e?`${ni(t)}:${e}`:"")}function nh(t){return nc(t," ",(t,e)=>e?t:"")}let nd=nh;function nf(t){return nc(t,",",(t,e)=>!0===e||t===e?t:e?`${t}:${e}`:"")}let np=new WeakMap;function nm(t){let e=e4(t,t=>{Object.assign(e,t),np.get(e)?.forEach(t=>e8(t))});return np.set(e,new Set),e}function ng(t,e){let n=np.get(t);return n?.add(e),()=>n?.delete(e)}let ny=(t,...e)=>ne(t,...e.map(t=>t instanceof Element?t.outerHTML:t)),nb=(t,e)=>e.innerHTML=t;function nv(t,e){ny=t,nb=e}let nw=(t,e)=>{};function nS(t){nw=t}let{assign:n_,defineProperty:n$}=Object;n$(Symbol,"metadata",{value:Symbol.for("Symbol.metadata")});let nE=t=>"function"==typeof t&&t(),nC=globalThis.nQM,nT=Symbol.for("gem@sheetToken"),nx=Symbol.for("gem@update"),nP="gem-style-boundary",nO="gem@render-error",nL=new WeakMap,nk=new WeakMap;class nj extends CSSStyleSheet{#o;cssText="";get element(){return this.#o||(this.#o=document.createElement("style"),this.#o.textContent=this.cssText),this.#o}replaceSync(t){this.cssText=t,this.#o&&(this.#o.textContent=t),super.replaceSync(t)}}class nN{#a="";#l="";constructor(t=""){this.#l=t}setContent(t){this.#a=t}#c=new Map;#u=new Map;getStyle(t,e){let n=t&&!t.internals?.shadowRoot,r=n?t.constructor:this;if(!this.#c.has(r)){let t=new nj({media:this.#l});this.#c.set(r,t)}let i=this.#c.get(r);if(!this.#u.has(i)){let r=this.#a,s="";n&&(s=e?"@scope":`@scope (${t.tagName}) to (:state(${nP}) > *)`,r=`${s}{ ${r} }`),i.replaceSync(r),this.#u.set(i,s)}return i}updateStyle(){this.#u.forEach((t,e)=>{e.replaceSync(t?`${t}{${this.#a}}`:this.#a)})}}function nA(t,...e){let n="",r="",i=e.at(0);Array.isArray(t)?r=ne(t,...e):void 0!==i?(n=t,r=i):r=t;let s=new nN(n),o={[nT]:s},a="";return"string"==typeof r?a=r:Object.keys(r).forEach(t=>{let e="$"===t;o[t]=e||t.includes("-")?t:`${t}-${nr()}`,a+=`${e?":where(&:not([hidden])),:host(:where(:not([hidden])))":`.${o[t]}`} {${r[t]}}`}),s.setContent(a),o}let nM=(t,e,n)=>{let r=!1;e.forEach(e=>{let i=t.get(e)||0;r||=1===n&&0===i||-1===n&&1===i,t.set(e,i+n)}),r&&e8(nk.get(t),nC)};function nR(t){t?.forEach(t=>{let{callback:e,getDep:n,values:r,preCallback:i}=t,s=n?.();(!n||!r||nl(r,s))&&(nE(i),t.preCallback=e(s,r),t.values=s,t.initialized=!0)})}function nI(t){return t.filter(t=>(nE(t.preCallback),t.initialized=!1,t.values=void 0,t.fixed))}let nH=new e5,nD=(t=performance.now())=>{if(performance.now()>t+50)return requestAnimationFrame(nD);let e=nH.get();e&&(e(),nD(t))};nH.addEventListener("start",()=>e8(nD));class nV extends HTMLElement{#h;#d;#f=[];#p=[];#m=[];#g;#y;#b;#v;#w;[nx](){this.#y&&e8(this.#S)}static{t=t=>{let e=n,r=e4(t,t=>{let n=e.#f.at(0);if(!nC&&e.#y&&n&&!n.initialized)throw new na("Don't set state sync before insert the DOM");n_(r,t),!e.#v&&e.#y&&e8(e.#S,nC)});return e.#d.stateList.push(r),r},e=(t,e)=>t.#m.push(e)}constructor(){let t;super(),n=this;let{aria:e,mode:r,delegatesFocus:i,...s}=this.#_,{focusable:o,...a}=e||{};this.#h=r?this.shadowRoot||this.attachShadow({mode:r,delegatesFocus:i,...s}):this,this.#d=this.attachInternals(),this.#d.stateList=[],this.#d.sheets=[],n_(this.#d,a),this.#f.push({fixed:!0,getDep:()=>[this.disabled],callback:([e=!1])=>{if(void 0===t&&(t=this.hasAttribute("tabindex")),this.#d.ariaDisabled=String(e),o&&!t&&(this.tabIndex=-Number(e)),(o||i)&&e)return e6(this,"click",t=>t.isTrusted&&t.stopImmediatePropagation(),{capture:!0})}})}get #_(){return this.constructor[Symbol.metadata]}get #$(){return this.#m.findLast(t=>!t.condition||t.condition())}get internals(){return this.#d}#E=()=>{nR(this.#f)};#C=()=>{nR(this.#p)};#T=t=>{try{this.#v=!0,this.#C();let e=this.#h===this,n=t?t.render():e?void 0:ny`<slot></slot>`;if(void 0===n)return;let r=null!==n?n:ny`<style>${e?"@scope":":host"}{&{display:none!important;}}</style>`;nw(r,this.#h)||nb(r,this.#h)}catch(t){throw this.dispatchEvent(new CustomEvent(nO,{bubbles:!0,composed:!0,detail:t})),t}finally{this.#v=!1}};#x=()=>{let t=this.#$;this.#y&&(t||!this.#m.length)&&(this.#T(t),e8(this.#E))};#S=()=>{this.#_.noBlocking?nH.add(this.#x):this.#x()};#P=()=>{let{adoptedStyleSheets:t=[]}=this.#_,{shadowRoot:e,sheets:n}=this.#d,r=t.map(t=>t[nT].getStyle(this));if(!e)return this.prepend(...n.map(t=>t.element)),((t,e)=>{let n=t.getRootNode();if(!nL.has(n)){let t=new Map;nL.set(n,t),nk.set(t,()=>{let e=(n.adoptedStyleSheets||[]).filter(e=>!t.has(e));t.forEach((t,n)=>t&&e.push(n)),n.adoptedStyleSheets=e.reverse()})}let r=nL.get(n);return nM(r,e,1),()=>nM(r,e,-1)})(this,r);e.adoptedStyleSheets=r.concat(n)};#O=()=>{this.#f?.forEach(t=>{let{callback:e,getDep:n,initialized:r}=t;r||(t.values=n?.(),t.preCallback=e(t.values),t.initialized=!0)})};#L=()=>{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)})};#k;#j=async()=>{if(this.#g){this.#g=!1,this.#w?.(),this.#w=this.#P();return}this.#b=!0,this.#L();let{observedStores:t,mode:e,penetrable:n}=this.#_;this.#d.states.add("gem-element"),e||!this.#m.length||n||this.#d.states.add(nP),this.#k=t?.map(t=>ng(t,this.#S)),this.#T(this.#$),this.#y=!0,this.#w=this.#P(),e8(this.#O)};connectedCallback(){this.#_.noBlocking?nH.add(this.#j):this.#j()}disconnectedCallback(){if(this.isConnected){this.#g=!0;return}nH.delete(this.#j),nH.delete(this.#x),this.#y=!1,this.#k?.forEach(t=>t()),this.#f=nI(this.#f),this.#p=nI(this.#p),this.#w?.()}effect=(t,e)=>{let n={callback:t,getDep:e,initialized:this.#y,fixed:!this.#b};this.#y&&(n.values=e?.(),n.preCallback=t(n.values)),this.#f.push(n)};memo=(t,e)=>{this.#p.push({callback:t,getDep:e,fixed:!this.#b})};update=()=>e8(this.#S)}let{deleteProperty:nz,getOwnPropertyDescriptor:nW,defineProperty:nU}=Reflect,{getPrototypeOf:nG,assign:nq,hasOwn:nB}=Object,nK=new e9;function nJ(t,e,n){let r=t.metadata;nW(r,e)||nU(r,e,{value:r[e]?.filter(t=>t!==n)||[]}),r[e].push(n)}function nF(t,e){let{value:n}=nW(t,e)||{};nz(t,e),t[e]=n}let nQ=new WeakMap,{setAttribute:nY,toggleAttribute:nZ,removeAttribute:nX}=Element.prototype,n0=(t,e)=>nQ.get(nG(t))?.get(e);function n1(){}nV.prototype.setAttribute=function(t,e){let n=n0(this,t);if(!n)return nY.call(this,t,e);this[n]=e},nV.prototype.removeAttribute=function(t){let e=n0(this,t);if(!e)return nX.call(this,t);this[e]=null},nV.prototype.toggleAttribute=function(t,e){let n=n0(this,t);return n?this[n]=e??!this.hasAttribute(t):nZ.call(this,t,e)};let n2=Symbol("event handle");function n3(t,e,{attr:n,attrType:r,event:i,eventOptions:s}={}){nU(t,e,{configurable:!0,get(){let t=nK.get(this)[e];return i&&!t?(this[e]=n1,this[e]):t},set(t){let o=this,a=nK.get(o);n&&((t=r===Boolean&&""===t||r(t||""))?nY.call(this,n,r===Boolean?"":t):nX.call(this,n)),t!==a[e]&&(i?(a[e]=t?.[n2]?t:async(e,n)=>{await Promise.resolve();let r=new CustomEvent(i,{...n,...s,detail:e});o.dispatchEvent(r),await t(e,n)},a[e][n2]=!0):(a[e]=t,this[nx]()))}})}let n8=new WeakMap;function n4(t,{metadata:e}){let n=n8.get(e);if(n)return n;let r=t;do r=nG(r);while(r.constructor[Symbol.metadata]!==e);return n8.set(e,r),r}function n7(t,e){let n=t.name,r=ni(n);return t.addInitializer(function(){let i=n4(this,t);nB(i,n)||(nJ(t,"observedAttributes",r),n3(i,n,{attr:r,attrType:e})),nF(this,n);let s=nG(this),o=nQ.get(s)||new Map;o.set(r,n),nQ.set(s,o)}),function(t){return this.getAttribute(r)??t}}function n6(t,e){return n7(e,String)}function n5(t,e){return n7(e,Boolean)}function n9(t,e){return n7(e,Number)}function rt(t,e){let n=e.name;return e.addInitializer(function(){let t=n4(this,e);nB(t,n)||(nJ(e,"observedProperties",n),n3(t,n)),nF(this,n)}),function(t){return this[n]??t}}function re(t){return(e,n)=>{let{addInitializer:r,name:i,access:s,kind:o}=n;r(function(){let e=t&&(()=>t(this));if("getter"===o){if(n.private)throw new na("not support");let t=nW(n4(this,n),i).get.bind(this);this.memo(()=>{nU(this,i,{configurable:!0,value:t()})},e)}else this.memo(s.get.call(this,this).bind(this),e)})}}function rn(t){return(e,{addInitializer:n,access:r})=>{n(function(){this.effect(r.get.call(this,this).bind(this),t&&(()=>t(this)))})}}function rr(){return(t,{addInitializer:e,access:n})=>{e(function(){this.effect(()=>n.get.call(this,this).bind(this),()=>[])})}}function ri(){return re(()=>[])}function rs(){return rn(()=>[])}function ro(t){return(n,{addInitializer:r,access:i})=>{r(function(){e(this,{render:i.get.call(this,this).bind(this),condition:t&&(()=>t(this))})})}}function ra(){return(t,{addInitializer:e,access:n})=>{e(function(){this.addEventListener(nO,({detail:t})=>{nb(n.get.call(this,this).apply(this,[t]),this.internals.shadowRoot||this)})})}}function rl(t,e){let n=e.name,r=ni(n);e.addInitializer(function(){let t=n4(this,e);!nB(t,n)&&(nJ(e,"definedCSSStates",r),nU(t,n,{configurable:!0,get(){let{states:t}=this.internals;return t?.has(r)},set(t){let{states:e}=this.internals;t?e?.add(r):e?.delete(r)}}));nF(this,n)})}function rc(t,e,n,r){let i=t.name,s=ni(i);if(t.static)nJ(t,n,s);else{let r=nG(e);r[i]||(r[i]=s,nJ(t,n,s))}return r||s}function ru(t,e){return function(t){return rc(e,this,"definedSlots",t)}}function rh(t,e){return function(t){return rc(e,this,"definedParts",t)}}function rd(t,e){rp(e)}function rf(t,e){rp(e,{bubbles:!0,composed:!0})}function rp(t,e){let n=t.name,r=ni(n);t.addInitializer(function(){let i=n4(this,t);nB(i,n)||(nJ(t,"definedEvents",r),n3(i,n,{event:r,eventOptions:e})),nF(this,n)})}function rm(t){return(e,n)=>{nJ(n,"adoptedStyleSheets",t)}}function rg(t){return(e,n)=>{nJ(n,"observedStores",t)}}function ry({mode:t="open",serializable:e=!0,...n}={}){return(r,i)=>{nq(i.metadata,{mode:t,serializable:e,...n})}}function rb({penetrable:t}){return(e,n)=>{n.metadata.penetrable=t}}function rv(){return(t,e)=>{e.metadata.noBlocking=!0}}function rw(t){return(e,n)=>{let r=n.metadata;r.aria={...r.aria,...t}}}function rS(t){return(e,{addInitializer:n})=>{n(()=>{customElements.define(t,e)})}}let r_=globalThis.trustedTypes,r$=r_?.createPolicy("lit-html",{createHTML:t=>t}),rE="$lit$",rC=`lit$${Math.random().toFixed(9).slice(2)}$`,rT="?"+rC,rx=`<${rT}>`,rP=document,rO=()=>rP.createComment(""),rL=t=>null===t||"object"!=typeof t&&"function"!=typeof t,rk=t=>null==t,rj=`[
2
- \f\r]`,rN=`[^
3
- \f\r"'\`<>=]`,rA=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,rM=/-->/g,rR=/>/g,rI=RegExp(`>|${rj}(?:([^\\s"'>=/]+)(${rj}*=${rj}*(?:${rN}|("|')|))|$)`,"g"),rH=/'/g,rD=/"/g,rV=/^(?:script|style|textarea|title)$/i,rz="v-if",rW="v-else-if",rU="v-else";class rG{type;strings;values;constructor(t,e,n){this.type=t,this.strings=e,this.values=n}}let rq=t=>(e,...n)=>new rG(t,e,n),rB=rq(1),rK=rq(2),rJ=rq(3),rF=Symbol.for("lit-noChange"),rQ=new WeakMap,rY=rP.createTreeWalker(rP,129);class rZ{el;parts=[];constructor({strings:t,type:e},n){let r,i=0,s=0,o=t.length-1,a=this.parts,[l,c]=((t,e)=>{let n,r=t.length-1,i=[],s=2===e?"<svg>":3===e?"<math>":"",o=rA;for(let e=0;e<r;e++){let r,a,l=t[e],c=-1,u=0;for(;u<l.length&&(o.lastIndex=u,null!==(a=o.exec(l)));)u=o.lastIndex,o===rA?"!--"===a[1]?o=rM:void 0!==a[1]?o=rR:void 0!==a[2]?(rV.test(a[2])&&(n=RegExp(`</${a[2]}`,"g")),o=rI):void 0!==a[3]&&(o=rI):o===rI?">"===a[0]?(o=n??rA,c=-1):void 0===a[1]?c=-2:(c=o.lastIndex-a[2].length,r=a[1],o=void 0===a[3]?rI:'"'===a[3]?rD:rH):o===rD||o===rH?o=rI:o===rM||o===rR?o=rA:(o=rI,n=void 0);let h=o===rI&&t[e+1].startsWith("/>")?" ":"";s+=o===rA?l+rx:c>=0?(i.push(r),l.slice(0,c)+rE+l.slice(c)+rC+h):l+rC+(-2===c?e:h)}let a=s+(t[r]||"<?>")+(2===e?"</svg>":3===e?"</math>":"");return[function(t,e){if(!Array.isArray(t))throw Error("invalid template");return void 0!==r$?r$.createHTML(e):e}(t,a),i]})(t,e);if(this.el=rZ.createElement(l,n),rY.currentNode=this.el.content,2===e||3===e){let t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=rY.nextNode())&&a.length<o;){if(1===r.nodeType){if(r.hasAttributes())for(let t of r.getAttributeNames())if(t.endsWith(rE)){let e=c[s++],n=r.getAttribute(t).split(rC),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:i,name:o[2],strings:n,ctor:"."===o[1]?r8:"?"===o[1]?r4:"@"===o[1]?r7:r3}),r.removeAttribute(t)}else t.startsWith(rC)&&(a.push({type:6,index:i}),r.removeAttribute(t));if(rV.test(r.tagName)){let t=r.textContent.split(rC),e=t.length-1;if(e>0){r.textContent=r_?r_.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],rO()),rY.nextNode(),a.push({type:2,index:++i});r.append(t[e],rO())}}}else if(8===r.nodeType)if(r.data===rT)a.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(rC,t+1));)a.push({type:7,index:i}),t+=rC.length-1}i++}}static createElement(t,e){let n=rP.createElement("template");return n.innerHTML=t,n}}function rX(t,e,n=t,r){if(e===rF)return e;let i=void 0!==r?n.__directives?.[r]:n.__directive,s=rL(e)?void 0:e._$litDirective$;return i?.constructor!==s&&(i?._$notifyDirectiveConnectionChanged?.(!1),void 0===s?i=void 0:(i=new s(t))._$initialize(t,n,r),void 0!==r?(n.__directives??=[])[r]=i:n.__directive=i),void 0!==i&&(e=rX(t,i._$resolve(t,e.values),i,r)),e}class r0{_$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,r=new Map,i=new Map,s=(t?.creationScope??rP).importNode(e,!0);rY.currentNode=s;let o=rY.nextNode(),a=0,l=0,c=n[0];for(;void 0!==c;){if(a===c.index){let e;2===c.type?e=new r2(o,o.nextSibling,this,t):1===c.type?(c.name===rz&&r.set(o,l),c.name===rW&&i.set(o,l),e=new c.ctor(o,c.name,c.strings,this,t)):6===c.type&&(e=new r6(o,this,t)),this._$parts.push(e),c=n[++l]}a!==c?.index&&(o=rY.nextNode(),a++)}let u=new Map;for(let t of(r.forEach((t,e)=>{let n=new r1(e,t);this._$conditions.push(n),u.set(e,n);let r=e;for(;r=r.nextElementSibling;){let t=i.get(r);if(void 0===t)break;n.push(r,t)}}),this._$parts)){if(t?.type!==2)continue;let e=u.get(t._$endNode);e&&(t._$endNode=e.mark)}return rY.currentNode=rP,s}_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===rz||n.name===rW||n._$setValue(t[e])),e++;this._$conditions.forEach(e=>e.update(t))}}class r1{mark;list;constructor(t,e){let n=rO();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(rU)&&(this.list.push({ele:t}),t.removeAttribute(rU))}update(t){let{mark:e,list:n}=this,r=n.find(({idx:e})=>void 0===e||!!t[e]);r&&!r.ele.parentNode&&e.after(r.ele),n.forEach(({ele:t})=>(!r||t!==r.ele)&&t.remove())}}class r2{type=2;options;_$committedValue;__directive;_$startNode;_$endNode;_$parent;__isConnected;get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}_$disconnectableChildren=void 0;constructor(t,e,n,r){this._$startNode=t,this._$endNode=e,this._$parent=n,this.options=r,this.__isConnected=r?.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&&(rL(t=rX(this,t,e))?rk(t)||""===t?(rk(this._$committedValue)||this._$clear(),this._$committedValue=void 0):t!==this._$committedValue&&t!==rF&&this._commitText(t):t instanceof rG?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){!rk(this._$committedValue)&&rL(this._$committedValue)?this._$startNode.nextSibling.data=t:this._commitNode(rP.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 r0(n,this),r=t._clone(this.options);t._update(e),this._commitNode(r),this._$committedValue=t}}_$getTemplate(t){let e=rQ.get(t.strings);return void 0===e&&rQ.set(t.strings,e=new rZ(t)),e}_commitIterable(t){let e;Array.isArray(this._$committedValue)||(this._$committedValue=[],this._$clear());let n=this._$committedValue,r=0;for(let i of t)r===n.length?n.push(e=new r2(this._insert(rO()),this._insert(rO()),this,this.options)):e=n[r],e._$setValue(i),r++;r<n.length&&(this._$clear(e&&e._$endNode.nextSibling,r),n.length=r)}_$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 r3{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,r,i){this.element=t,this.name=e,this._$parent=r,this.options=i,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,r){let i=this.strings,s=!1;if(void 0===i)(s=!rL(t=rX(this,t,e,0))||t!==this._$committedValue)&&(this._$committedValue=t);else{let r,o,a=t;for(t=i[0],r=0;r<i.length-1;r++)o=rX(this,a[n+r],e,r),s||=!rL(o)||o!==this._$committedValue[r],rk(o)?t=void 0:rk(t)||(t+=o+i[r+1]),this._$committedValue[r]=o}s&&!r&&this._commitValue(t)}_commitValue(t){rk(t)?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t)}}class r8 extends r3{type=3;_commitValue(t){this.element[this.name]=t}}class r4 extends r3{type=4;_commitValue(t){this.element.toggleAttribute(this.name,!!t)}}class r7 extends r3{type=5;_$setValue(t,e=this){t=rX(this,t,e,0);let n=this._$committedValue,r=n&&(!t||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive),i=t&&(!n||r);r&&this.element.removeEventListener(this.name,this,n),i&&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 r6{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 r9)t.value=this.element;else if(t._$litDirective$)rX(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 r5=()=>new r9;class r9{value}let it="2.2.14",ie=t=>(...e)=>({_$litDirective$:t,values:e});class ir{__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 ii=(t,e,n)=>{let r=t._$startNode.parentNode,i=void 0===e?t._$endNode:e._$startNode;if(void 0===n)n=new r2(r.insertBefore(document.createComment(""),i),r.insertBefore(document.createComment(""),i),t,t.options);else{let e=n._$endNode.nextSibling,s=n._$parent,o=s!==t;if(o){let e;n._$reparentDisconnectables?.(t),n._$parent=t,void 0!==n._$notifyConnectionChanged&&(e=t._$isConnected)!==s._$isConnected&&n._$notifyConnectionChanged(e)}if(e!==i||o){let t=n._$startNode;for(;t!==e;){let e=t.nextSibling;r.insertBefore(t,i),t=e}}}return n},is=(t,e,n=t)=>(t._$setValue(e,n),t),io={},ia=t=>{t._$notifyConnectionChanged?.(!1,!0);let e=t._$startNode,n=t._$endNode.nextSibling;for(;e!==n;){let t=e.nextSibling;e.remove(),e=t}},il=(t,e,n)=>{let r=new Map;for(let i=e;i<=n;i++)r.set(t[i],i);return r},ic=ie(class extends ir{_itemKeys;constructor(t){if(super(),2!==t.type)throw Error("repeat() can only be used in text expressions")}_getValuesAndKeys(t,e,n){let r;void 0===n?n=e:void 0!==e&&(r=e);let i=[],s=[],o=0;for(let e of t)i[o]=r?r(e,o):o,s[o]=n(e,o),o++;return{values:s,keys:i}}render(t,e,n){return this._getValuesAndKeys(t,e,n).values}update(t,[e,n,r]){let i,s,o=t._$committedValue,{values:a,keys:l}=this._getValuesAndKeys(e,n,r);if(!Array.isArray(o))return this._itemKeys=l,a;let c=this._itemKeys??=[],u=[],h=0,d=o.length-1,f=0,p=a.length-1;for(;h<=d&&f<=p;)if(null===o[h])h++;else if(null===o[d])d--;else if(c[h]===l[f])u[f]=is(o[h],a[f]),h++,f++;else if(c[d]===l[p])u[p]=is(o[d],a[p]),d--,p--;else if(c[h]===l[p])u[p]=is(o[h],a[p]),ii(t,u[p+1],o[h]),h++,p--;else if(c[d]===l[f])u[f]=is(o[d],a[f]),ii(t,o[h],o[d]),d--,f++;else if(void 0===i&&(i=il(l,f,p),s=il(c,h,d)),i.has(c[h]))if(i.has(c[d])){let e=s.get(l[f]),n=void 0!==e?o[e]:null;if(null===n){let e=ii(t,o[h]);is(e,a[f]),u[f]=e}else u[f]=is(n,a[f]),ii(t,o[h],n),o[e]=null;f++}else ia(o[d]),d--;else ia(o[h]),h++;for(;f<=p;){let e=ii(t,u[p+1]);is(e,a[f]),u[f++]=e}for(;h<=d;){let t=o[h++];null!==t&&ia(t)}return this._itemKeys=l,((t,e=io)=>t._$committedValue=e)(t,u),rF}});nv(rB,(t,e,n)=>{let r=n?.renderBefore??e,i=r._$litPart$;if(void 0===i){let t=n?.renderBefore??null;r._$litPart$=i=new r2(e.insertBefore(rO(),t),t,void 0,n??{})}return i._$setValue(t),i}),globalThis.__GEM_DEVTOOLS__HOOK__&&!globalThis.__GEM_DEVTOOLS__HOOK__.GemElement&&Object.assign(globalThis.__GEM_DEVTOOLS__HOOK__,{...eF,...eJ,...eQ,...eY});let iu=globalThis.history,ih=iu.pushState.bind(iu),id=iu.replaceState.bind(iu),ip=0,im=()=>`${performance.now()}-${++ip}`,ig=nm({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),iy=new Map;function ib(t){let{$key:e,$hasCloseHandle:n,$hasOpenHandle:r,$hasShouldCloseHandle:i}=t||{};if(ig.$key!==e){if(e)throw new na("`$key` is not allowed");if(n)throw new na("`$hasCloseHandle` is not allowed");if(r)throw new na("`$hasOpenHandle` is not allowed");if(i)throw new na("`$hasShouldCloseHandle` is not allowed")}}function iv(t){return ix.basePath?ix.basePath+t:t}function iw(t){return t===ix.basePath?"/":t.replace(RegExp(`^${ix.basePath}/`),"/")}function iS(){ix.dispatchEvent(new CustomEvent("beforechange"))}function i_(t){let e=iy.get(ig.$key)||{path:iw(location.pathname),query:new nt},n=t.path?e7(e.path,t.path):iw(location.pathname),r=new nt(t.query??(t.path?"":location.search)),i=String(r)!==String(e.query),s=i?r:e.query,o=n!==e.path||i,a=t.title||(o?"":document.title),l=t.close||t.data||t.open||t.shouldClose,c=decodeURIComponent(t.hash??(!o&&l?location.hash:""));return{...t,title:a,path:n,query:s,hash:c}}function i$(t,e){ib(t.data);let n=i_(t),{title:r,path:i,query:s,hash:o,close:a,open:l,shouldClose:c,data:u}=n,h={$hasCloseHandle:!!a,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!c,$key:im(),$title:r,...u};iy.set(h.$key,n),iS(),no(ig),ig(h);let d=iv(i)+new nt(s)+o,f=decodeURIComponent(location.hash);e(h,r,d),f!==o&&dispatchEvent(new CustomEvent("hashchange"))}function iE(t,e,n,r){ib(t);let i={$key:im(),$title:e,...t||{}},{pathname:s,search:o,hash:a}=new URL(n,location.origin+location.pathname),l=i_({path:s,query:new nt(o),hash:a,title:e,data:t});iy.set(i.$key,l),iS(),no(ig),ig(i);let c=iv(s)+l.query+a,u=location.hash;r(i,e,c),u!==a&&dispatchEvent(new CustomEvent("hashchange"))}let iC=nm({basePath:""});class iT extends EventTarget{get store(){return ig}get currentKey(){return ig.$key}get basePath(){return iC.basePath}set basePath(t){iC({basePath:t}),Object.assign(iy.get(ig.$key),{path:iw(location.pathname)})}getParams(){return iy.get(ig.$key)}updateParams(t){Object.assign(iy.get(ig.$key),t),ig()}push(t){i$(t,ih)}replace(t){i$(t,id)}pushIgnoreCloseHandle(t){ig.$hasCloseHandle?(iy.get(ig.$key)?.close?.(),this.replace(t)):this.push(t)}forward(){iu.forward()}back(){iu.back()}}let ix=new iT,iP=nm({defaultTitle:document.title,url:"",title:""});if(!globalThis._GEMHISTORY){if(globalThis._GEMHISTORY={history:ix,titleStore:iP,basePathStore:iC},iu.pushState=(t,e,n)=>{iE(t,e,n,ih)},iu.replaceState=(t,e,n)=>{iE(t,e,n,id)},addEventListener("hashchange",({isTrusted:t})=>{t&&ix.replace({hash:location.hash})}),iu.state)if(iu.state.$hasCloseHandle){ig(iu.state);let t=i_({title:document.title});iy.set(ig.$key,t),ix.back()}else{let t=i_({title:document.title,hash:location.hash});ig({$key:im(),...iu.state||{}}),iy.set(ig.$key,t)}else{let{protocol:t,pathname:e,search:n,hash:r}=location;(t.startsWith("http")||t.startsWith("tauri"))&&ix.replace({path:e,query:n,hash:r})}ng(iP,()=>{let t=iy.get(ig.$key);t&&(t.title=iP.title)}),ng(ig,()=>{let{title:t}=ix.getParams();t!==iP.title&&iP({title:t})});let t=!1;addEventListener("popstate",e=>{let n=e.state;if(n?.$key){if(t){t=!1;return}if(!iy.has(n.$key)){let{pathname:t,search:e,hash:r}=location;iy.set(n.$key,{path:iw(t),query:new nt(e),hash:decodeURIComponent(r),title:iP.title||n.$title,data:n})}if(parseFloat(n.$key)>parseFloat(ig.$key)&&n.$hasOpenHandle)iy.get(n.$key)?.open?.();else if(ig.$hasCloseHandle){let e=iy.get(ig.$key),r=e?.close,i=e?.shouldClose;if(i&&!i()){t=!0,ix.forward();return}r?r():n.$hasCloseHandle&&(t=!0,ix.back())}iS(),no(ig),ig(n)}})}let{history:iO,titleStore:iL,basePathStore:ik}=globalThis._GEMHISTORY;function ij(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}let iN=Symbol();r=rg(iO.store),i=rw({role:"dialog",ariaModal:"true"}),o=nV,a=ri();class iA extends o{static{({e:[l,c,u,h,d,f],c:[p,s]}=function(t,e,n,r,i){var s,o,a,l,c,u,h,d=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,p=Object.create,m=[p(null),p(null)],g=e.length;function y(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function b(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function v(t,e,n,r,i,s,o,a,l,c,d){function p(t){if(!d(t))throw TypeError("Attempted to access private element on non-instance")}var g=[].concat(e[0]),v=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:ij(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||ij(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((h=m[+a][r])&&(h^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");m[+a][r]=i<3?1:i}for(var O=t,L=g.length-1;L>=0;L-=n?2:1){var k=b(g[L],"A decorator","be",!0),j=n?g[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");b(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){h=k.call(j,O,A),N.v=1,b(h,"class decorators","return")&&(O=h);continue}if(A.static=a,A.private=l,h=A.access={has:l?d.bind():function(t){return r in t}},$||(h.get=l?E?function(t){return p(t),T.value}:C("get",0,p):function(t){return t[r]}),E||_||(h.set=l?C("set",0,p):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(h=b(O.get,"accessor.get"))&&(T.get=h),(h=b(O.set,"accessor.set"))&&(T.set=h),(h=b(O.init,"accessor.init"))&&x.unshift(h);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(O,(c?"field":"method")+" decorators","return")&&(c?x.unshift(O):T[P]=O)}return i<2&&o.push(y(x,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:b.call.bind(T[P])):f(t,r,T)),O}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+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 r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?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}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[r,i],[[n6,0,"label"],[rl,0,"opened"],[a,0,"init",function(t){return t.#N},function(t,e){t.#N=e}]],t=>#N in t,o))}label=l(this);opened=(c(this),u(this));#A=void h(this);#M;#R=[];#I=()=>{this.inert=!0,this.#R.forEach(t=>t.inert=!1),this.#A?this.#A.before(this):this.#M&&this.#M?.appendChild(this),this.dispatchEvent(new CustomEvent("close")),this.opened=!1};#H=()=>{this.hidden=!1,this.inert=!1,this.#A=this.nextSibling,this.#M=this.parentElement||this.getRootNode(),this.#R=[...document.body.children].filter(t=>!t.inert),this.#R.forEach(t=>t.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0};#N=d(this,()=>this.inert=!0);open=(f(this),()=>{if(!this.opened)return this.#H(),iO.push({title:this.label,open:this.#H,close:this.#I,shouldClose:this.shouldClose}),iN});shouldClose(){return!0}close=()=>(iO.back(),iN);forceClose=()=>(this.opened=!1,setTimeout(this.close,100),iN);static{s()}}function iM(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 iR(t){return t}let iI=Symbol("open mark");function iH(t){let e,n,r,i,s,o,a,l,c,u,h,d=Symbol();return e=ry(),n=rw({role:"alertdialog",ariaModal:"true"}),i=nV,s=rs(),o=rs(),new class extends iR{constructor(){super(h),r()}static [class extends i{static{({e:[a,l,c,u],c:[h,r]}=function(t,e,n,r,i){var s,o,a,l,c,u,h,d=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,p=Object.create,m=[p(null),p(null)],g=e.length;function y(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function b(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function v(t,e,n,r,i,s,o,a,l,c,d){function p(t){if(!d(t))throw TypeError("Attempted to access private element on non-instance")}var g=[].concat(e[0]),v=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:iM(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||iM(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((h=m[+a][r])&&(h^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");m[+a][r]=i<3?1:i}for(var O=t,L=g.length-1;L>=0;L-=n?2:1){var k=b(g[L],"A decorator","be",!0),j=n?g[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");b(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){h=k.call(j,O,A),N.v=1,b(h,"class decorators","return")&&(O=h);continue}if(A.static=a,A.private=l,h=A.access={has:l?d.bind():function(t){return r in t}},$||(h.get=l?E?function(t){return p(t),T.value}:C("get",0,p):function(t){return t[r]}),E||_||(h.set=l?C("set",0,p):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(h=b(O.get,"accessor.get"))&&(T.get=h),(h=b(O.set,"accessor.set"))&&(T.set=h),(h=b(O.init,"accessor.init"))&&x.unshift(h);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(O,(c?"field":"method")+" decorators","return")&&(c?x.unshift(O):T[P]=O)}return i<2&&o.push(y(x,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:b.call.bind(T[P])):f(t,r,T)),O}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+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 r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?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}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[e,n],[[s,0,"connectHistory",function(t){return t.#D},function(t,e){t.#D=e}],[o,0,"connectStore",function(t){return t.#V},function(t,e){t.#V=e}]],t=>#D in t,i))}constructor(...t){super(...t),u(this)}static get isOpen(){return this.store[iI]}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({[iI]:!0,...t});return setTimeout(()=>{n(),iO.push({title:e.label,open:n,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),d}static close(){return iO.back(),d}static closeHandle(){return this.inertStore.forEach(t=>t.inert=!1),this.instance?.remove(),this.store({[iI]:!1,...t}),d}static shouldClose(){return!0}label="";#D=a(this,()=>ng(iO.store,this.update));#V=(l(this),c(this,()=>ng(h.store,this.update)))}];inertStore=[];instance=null;store=nm({[iI]:!1,...t})},h}function iD(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 iV(t,e,n,r,i,s){var o,a,l,c,u,h,d,f=Symbol.metadata||Symbol.for("Symbol.metadata"),p=Object.defineProperty,m=Object.create,g=[m(null),m(null)],y=e.length;function b(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function v(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function w(t,e,n,r,i,s,o,a,l,c,u){function f(t){if(!u(t))throw TypeError("Attempted to access private element on non-instance")}var m=[].concat(e[0]),y=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:iD(function(){return y(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=y,c||iD(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((d=g[+a][r])&&(d^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");g[+a][r]=i<3?1:i}for(var O=t,L=m.length-1;L>=0;L-=n?2:1){var k=v(m[L],"A decorator","be",!0),j=n?m[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:h,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");v(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){d=k.call(j,O,A),N.v=1,v(d,"class decorators","return")&&(O=d);continue}if(A.static=a,A.private=l,d=A.access={has:l?u.bind():function(t){return r in t}},$||(d.get=l?E?function(t){return f(t),T.value}:C("get",0,f):function(t){return t[r]}),E||_||(d.set=l?C("set",0,f):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(d=v(O.get,"accessor.get"))&&(T.get=d),(d=v(O.set,"accessor.set"))&&(T.set=d),(d=v(O.init,"accessor.init"))&&x.unshift(d);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else v(O,(c?"field":"method")+" decorators","return")&&(c?x.unshift(O):T[P]=O)}return i<2&&o.push(b(x,a,1),b(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:v.call.bind(T[P])):p(t,r,T)),O}function S(t){return p(t,f,{configurable:!0,enumerable:!0,value:h})}return void 0!==s&&(h=s[f]),h=m(null==h?null:h),l=[],c=function(t){t&&l.push(b(t))},(u=function(e,r){for(var s=0;s<n.length;s++){var c=n[s],u=c[1],h=7&u;if((8&u)==e&&!h==r){var d=c[2],f=!!c[3],p=16&u;w(e?t:t.prototype,c,p,f?"#"+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 r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?a=a||[]:o=o||[],l,!!e,f,r,e&&f?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}:i)}}})(8,0),u(0,0),u(8,1),u(0,1),c(o),c(a),d=l,y||S(t),{e:d,get c(){var _=[];return y&&[S(t=w(t,[e],r,t.name,5,_)),b(_,1)]}}}function iz(t){return t}class iW extends RegExp{constructor(t){let e=0;super(`^${t.replace(/((:[^/$]+)|(\*))/g,(t,n)=>"*"===n?`(?<_${e++}>.*)`:`(?<${n.slice(1)}>[^/]+)`)}$`)}}function iU(t,e){if(globalThis.URLPattern){let n=new URLPattern({pathname:t}),r=n.exec({pathname:e})||n.exec({pathname:`${e}/`});return r?r.pathname.groups:null}let n=new iW(t),r=e.match(n)||`${e}/`.match(n);if(!r)return null;let i={};return r.groups&&Object.entries(r.groups).forEach(([t,e])=>{i[t.startsWith("_")?t.slice(1):t]=e}),i}function iG(t,e){let n=0,r=t.pattern.replaceAll("*",()=>`:${n++}`),i=e?.params;return i&&Object.keys(i).forEach(t=>{r=r.replace(RegExp(`:${t}`,"g"),i[t])}),r}function iq(t,e){return{path:iG(t,e),...e}}let iB=ny``,iK=new Map;m=rb({penetrable:!0}),y=nV,b=rn(t=>[t.scrollContainer]),v=rn(t=>[t.scrollContainer]),w=ro(t=>!t.inert),new class extends iz{constructor(){super(te),g()}static [class extends y{static{({e:[S,_,$,E,C,T,x,P,O,L,k,j,N,A,M,R,I,H,D,V,z,W,U,G,q,B,K,J,F,Q],c:[te,g]}=iV(this,[m],[[n5,0,"transition"],[rt,0,"routes"],[rt,0,"locationStore"],[rt,0,"key"],[rd,0,"loading"],[rd,0,"beforeroutechange"],[rd,0,"routechange"],[rd,0,"error"],[rt,0,"scrollContainer"],[rt,0,"scrollIgnoreHash"],[rt,0,"trigger"],[b,0,"rememberScrollPosition",function(t){return t.#z},function(t,e){t.#z=e}],[v,0,"connectTriggerStore",function(t){return t.#W},function(t,e){t.#W=e}],[rn(t=>t.#U()),0,"updateContent",function(t){return t.#G},function(t,e){t.#G=e}],[w,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],0,t=>#z in t,y))}transition=S(this);routes=(_(this),$(this));locationStore=(E(this),C(this));key=(T(this),x(this));loading=(P(this),O(this));beforeroutechange=(L(this),k(this));routechange=(j(this),N(this));error=(A(this),M(this));scrollContainer=(R(this),I(this));scrollIgnoreHash=(H(this),D(this));trigger=(V(this),z(this,iO));currentRoute=void W(this);currentParams={};get #q(){return"function"==typeof this.scrollContainer?this.scrollContainer():this.scrollContainer}#B=t({content:iB});#K=()=>{if(!this.locationStore)return;let{path:t,query:e,hash:n,data:r}=iO.getParams();this.locationStore({path:t,params:this.currentParams,query:e,hash:n,data:r})};#J=()=>{if(!this.#q)return;let t=iK.get(iO.currentKey);t?this.#q.scroll(0,t):(this.scrollIgnoreHash||!iO.getParams().hash)&&this.#q.scroll(0,0)};#F;#Q=(t,e,n)=>{this.beforeroutechange(t),this.#F=void 0,this.currentRoute=t,this.currentParams=e;let r=async()=>{this.#B({content:n}),this.#K(),await Promise.resolve(),this.#J(),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>r()):r()};#z=U(this,()=>{if(this.#q)return e6(iO,"beforechange",()=>iK.set(iO.currentKey,this.#q.scrollTop))});#W=(G(this),q(this,()=>this.trigger.store&&ng(this.trigger.store,()=>this.#B())));#U=(B(this),()=>{let{path:t,query:e,hash:n}=this.trigger.getParams();return[this.key,t,e,n]});#G=K(this,([t,e],n)=>{n&&t===n[0]&&e===n[1]?this.#K():this.update()});#a=(J(this),F(this,()=>{let{content:t}=this.#B;if(void 0!==t){if(!this.shadowRoot){if(t===iB)return;return ny`${t}`}return t===iB?ny`<slot></slot>`:t}}));update=(Q(this),async()=>{let{path:t,hash:e,query:n}=this.trigger.getParams(),{route:r,params:i={}}=tn.findRoute(this.routes,t),{redirect:s,content:o,getContent:a}=r||{};if(s)return void this.trigger.replace({path:iG({pattern:s},{params:i}),query:n,hash:e});this.trigger===iO&&(location.href!==iL.url||r?.title)&&iL({url:location.href,title:r?.title});let l=o||a?.(i,this.shadowRoot||this);this.loading(r),this.#F=l;let c=()=>this.#F===l;try{let t=await l;c()&&this.#Q(r,i,t)}catch(t){c()&&this.error(t)}})}];createLocationStore=()=>{let{path:t,query:e,hash:n,data:r}=iO.getParams();return nm({path:t,query:e,hash:n,data:r,params:{}})};findRoute=(t=[],e)=>{let n=null;for(let r of Array.isArray(t)?t:Object.values(t))if("*"===r.pattern)n=r;else{let t=iU(r.pattern,e);if(t)return{route:r,params:t}}return{route:n}}};let iJ=nA`
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,x,L,P,T,k,O,N,R,M,A,H,I,V,D,j,U,W,G,K,q,B,z,J,F,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,tT,tk,tO,tN,tR,tM,tA,tH,tI,tV,tD,tj,tU,tW,tG,tK,tq,tB,tz,tJ,tF,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,eT,ek,eO,eN,eR,eM,eA,eH,eI,eV,eD,ej,eU,eW,eG,eK,eq,eB,ez,eJ;var eF={};eF.d=(t,e,n)=>{var i=(e,n)=>{for(var i in e)eF.o(e,i)&&!eF.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,[n]:e[i]})};i(e,"get"),i(n,"value")},eF.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),eF.r=t=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var eY={};eF.r(eY),eF.d(eY,{adoptedStyle:()=>iN,aria:()=>iI,async:()=>iH,attribute:()=>ip,boolattribute:()=>im,connectStore:()=>iR,customElement:()=>iV,effect:()=>i_,emitter:()=>iT,fallback:()=>iE,globalemitter:()=>ik,light:()=>iA,memo:()=>ib,mounted:()=>iv,numattribute:()=>ig,part:()=>iP,property:()=>iy,shadow:()=>iM,slot:()=>iL,state:()=>iC,template:()=>iw,unmounted:()=>i$,willMount:()=>iS});var eZ={};eF.r(eZ),eF.d(eZ,{GemElement:()=>n2,SheetToken:()=>nW,UpdateToken:()=>nG,_RenderErrorEvent:()=>nq,_createTemplate:()=>e,_renderRoot:()=>nV,createState:()=>t,css:()=>nF,html:()=>nA,render:()=>nH,setEngine:()=>nI});var eQ={};eF.r(eQ),eF.d(eQ,{_StoreListenerMap:()=>nO,connect:()=>nM,createStore:()=>nR});var eX={};eF.r(eX),eF.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 nx(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 nx(t,";",(t,e)=>e||0===e?`${nS(t)}:${e}`:"")}function nP(t){return nx(t," ",(t,e)=>e?t:"")}let nT=nP;function nk(t){return nx(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:nD,defineProperty:nj}=Object;nj(Symbol,"metadata",{value:Symbol.for("Symbol.metadata")});let nU=t=>"function"==typeof t&&t(),nW=Symbol.for("gem@sheetToken"),nG=Symbol.for("gem@update"),nK="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 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(${nK}) > *)`:"";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 nF(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 nJ(n),a={[nW]: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){nU(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=>(nU(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;#_;#$;[nG](){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||nj(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 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}};#x=()=>{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()};#P=()=>this.#L(this.#x);#S=()=>{this.#y&&nc(this.#P)};#T=()=>{let{adoptedStyleSheets:t=[]}=this.#v,{shadowRoot:e,sheets:n}=this.#d,i=t.map(t=>t[nW].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)};#k=()=>{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.#T();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(nK),this.#N=t?.map(t=>nM(t,this.#P)),this.#C(this.#w),this.#y=!0,this.#$=this.#T(),e9||nc(this.#k)};connectedCallback(){this.#L(this.#R)}disconnectedCallback(){if(this.isConnected){this.#g=!0;return}n0.delete(this.#R),n0.delete(this.#x),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[nG]()))}})}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 ix(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 ix(e,this,"definedSlots",t)}}function iP(t,e){return function(t){return ix(e,this,"definedParts",t)}}function iT(t,e){iO(e)}function ik(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 iD=globalThis.trustedTypes,ij=iD?.createPolicy("lit-html",{createHTML:t=>t}),iU="$lit$",iW=`lit$${Math.random().toFixed(9).slice(2)}$`,iG="?"+iW,iK=`<${iG}>`,iq=document,iB=()=>iq.createComment(""),iz=t=>null===t||"object"!=typeof t&&"function"!=typeof t,iJ=t=>null==t,iF=`[
2
+ \f\r]`,iY=`[^
3
+ \f\r"'\`<>=]`,iZ=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,iQ=/-->/g,iX=/>/g,i0=RegExp(`>|${iF}(?:([^\\s"'>=/]+)(${iF}*=${iF}*(?:${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+iK:h>=0?(s.push(i),l.slice(0,h)+iU+l.slice(h)+iW+u):l+iW+(-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!==ij?ij.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(iU)){let e=h[r++],n=i.getAttribute(t).split(iW),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(iW)&&(o.push({type:6,index:s}),i.removeAttribute(t));if(i3.test(i.tagName)){let t=i.textContent.split(iW),e=t.length-1;if(e>0){i.textContent=iD?iD.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===iG)o.push({type:2,index:s});else{let t=-1;for(;-1!==(t=i.data.indexOf(iW,t+1));)o.push({type:7,index:s}),t+=iW.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))?iJ(t)||""===t?(iJ(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){!iJ(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],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 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.0",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 sx=globalThis.history,sL=sx.pushState.bind(sx),sP=sx.replaceState.bind(sx),sT=0,sk=()=>`${performance.now()}-${++sT}`,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===sW.basePath?"/":t.replace(RegExp(`^${sW.basePath}/`),"/")}function sH(t){sW.dispatchEvent(new CustomEvent("beforechange")),nw(sO),sO(t)}function sI(t){let e=sW.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:sk(),$title:s,...u};nt(sN,sR).set(d.$key,i),sH(d);let p=(sW.basePath?sW.basePath+r:r)+new ny(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);sV({path:s,query:r,hash:a,title:e,data:t},i)}let sj=nR({basePath:""});class sU extends EventTarget{get store(){return sO}get currentKey(){return sO.$key}get basePath(){return sj.basePath}set basePath(t){sj({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,sP)}pushIgnoreCloseHandle(t){sO.$hasCloseHandle?(this.getParams()?.close?.(),this.replace(t)):this.push(t)}forward(){sx.forward()}back(){sx.back()}}let sW=new sU,sG=nR({defaultTitle:document.title,url:"",title:""});if(!globalThis._GEMHISTORY){if(globalThis._GEMHISTORY={history:sW,titleStore:sG,basePathStore:sj},sx.pushState=(t,e,n)=>{sD(t,e,n,sL)},sx.replaceState=(t,e,n)=>{sD(t,e,n,sP)},addEventListener("hashchange",({isTrusted:t})=>{t&&sW.replace({hash:location.hash})}),sx.state)if(sx.state.$hasCloseHandle){sO(sx.state);let t=sI({title:document.title});nt(sN,sR).set(sO.$key,t),sW.back()}else{let t=sI({title:document.title,hash:location.hash});sO({$key:sk(),...sx.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"))&&sW.replace({path:e,query:n,hash:i})}nM(sG,()=>{let t=sW.getParams();t&&(t.title=sG.title)}),nM(sO,()=>{let{title:t}=sW.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(!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:sG.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,sW.forward();return}i?i():n.$hasCloseHandle&&(t=!0,sW.back())}sH(n)}})}let{history:sK,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 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:sz(function(){return y(this)},i,"get"),set:function(t){e[4](this,t)}}:x[P]=y,h||sz(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 T=t,k=m.length-1;k>=0;k-=n?2:1){var O=_(m[k],"A decorator","be",!0),N=n?m[k-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,T,M),R.v=1,_(d,"class decorators","return")&&(T=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}),T=O.call(N,S?{get:x.get,set:x.set}:x[P],M),R.v=1,S){if("object"==typeof T&&T)(d=_(T.get,"accessor.get"))&&(x.get=d),(d=_(T.set,"accessor.set"))&&(x.set=d),(d=_(T.init,"accessor.init"))&&L.unshift(d);else if(void 0!==T)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else _(T,(h?"field":"method")+" decorators","return")&&(h?L.unshift(T):x[P]=T)}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)),T}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 sF=Symbol();i=iR(sK.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]}=sJ(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};#D=()=>{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.#D(),sK.push({title:this.label,open:this.#D,close:this.#V,shouldClose:this.shouldClose}),sF});shouldClose(){return!0}close=()=>(sK.back(),sF);forceClose=()=>(this.opened=!1,setTimeout(this.close,100),sF);static{r()}}function sZ(t){return t}let sQ=Symbol("open mark");function sX(t){let e,n,i,s,r,a,o,l,h,c,u,d=Symbol();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]}=sJ(this,[e,n],[[r,0,"connectHistory",function(t){return t.#j},function(t,e){t.#j=e}],[a,0,"connectStore",function(t){return t.#U},function(t,e){t.#U=e}]],0,t=>#j 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(),sK.push({title:e.label,open:n,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),d}static close(){return sK.back(),d}static closeHandle(){return this.inertStore.forEach(t=>t.inert=!1),this.instance?.remove(),this.store({[sQ]:!1,...t}),d}static shouldClose(){return!0}label="";#j=o(this,()=>nM(sK.store,this.update));#U=(l(this),h(this,()=>nM(u.store,this.update)))}];inertStore=[];instance=null;store=nR({[sQ]:!1,...t})},u}let s0=/^[\w\-./~]*/,s1=new Map;function s2(t,e){let n=s1.get(t);return n||s1.set(t,n=function(t){let e=s0.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 s3(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 s8(t,e){return{path:s3(t,e),...e}}let s4=nA``,s6=new Map,s5=!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,x,L,P,T,k,O,N,R,M,A,H,I,V,D,j,U,W,G,K,q,B,z,J,F,Y,Z,Q],c:[ti,g]}=sJ(this,[m],[[im,0,"transition"],[iy,0,"routes"],[iy,0,"locationStore"],[iy,0,"key"],[iT,0,"loading"],[iT,0,"beforeroutechange"],[iT,0,"routechange"],[iT,0,"error"],[iy,0,"scrollContainer"],[iy,0,"scrollWait"],[iy,0,"scrollIgnoreHash"],[iy,0,"trigger"],[b,0,"rememberScrollPosition",function(t){return t.#W},function(t,e){t.#W=e}],[_,0,"connectTriggerStore",function(t){return t.#G},function(t,e){t.#G=e}],[i_(t=>t.#K()),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=>#W in t,y))}transition=S(this);routes=(v(this),w(this));locationStore=(E(this),C(this));key=(x(this),L(this));loading=(P(this),T(this));beforeroutechange=(k(this),O(this));routechange=(N(this),R(this));error=(M(this),A(this));scrollContainer=(H(this),I(this));scrollWait=(V(this),D(this));scrollIgnoreHash=(j(this),U(this));trigger=(W(this),G(this,sK));currentRoute=void K(this);currentParams={};get #B(){return"function"==typeof this.scrollContainer?this.scrollContainer():this.scrollContainer}#z=t({content:s4});#J=()=>{if(!this.locationStore)return;let{path:t,query:e,hash:n,data:i}=sK.getParams();this.locationStore({path:t,params:this.currentParams,query:e,hash:n,data:i})};#F;#Y=async()=>{let t=this.#B,e=sK.currentKey;if(!t||e===this.#F)return;this.#F=e;let n=s6.get(e);if(!s5&&void 0!==n){await this.scrollWait?.(),e===sK.currentKey&&t.scroll(0,n);return}(s5||t!==document.scrollingElement)&&(this.scrollIgnoreHash||!sK.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.#J(),await Promise.resolve(),this.#Y(),this.routechange(this.currentRoute)};this.transition&&"startViewTransition"in document?document.startViewTransition(()=>i()):i()};#W=q(this,()=>{if(this.scrollContainer)return nf(sK,"beforechange",()=>{s5=globalThis.history.state?.$key===sK.currentKey;let t=this.#B;t&&s6.set(sK.currentKey,t.scrollTop)})});#G=(B(this),z(this,()=>this.trigger.store&&nM(this.trigger.store,()=>this.#z())));#K=(J(this),()=>{let{path:t,query:e,hash:n}=this.trigger.getParams();return[this.key,t,e,n]});#q=F(this,([t,e],n)=>{n&&t===n[0]&&e===n[1]?this.#J():this.update()});#o=(Y(this),Z(this,()=>{let{content:t}=this.#z;if(void 0!==t){if(!this.shadowRoot){if(t===s4)return;return nA`${t}`}return t===s4?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:s3({pattern:r},{params:s}),query:n,hash:e});this.trigger===sK&&(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}=sK.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=s2(i.pattern,e);if(t)return{route:i,params:t}}return{route:n}}};let s9=nF`
4
4
  :host(:where(:not([hidden]))),
5
5
  :not(:defined) {
6
6
  display: contents;
7
7
  }
8
- `;Y=ry(),Z=rm(iJ),tt=te;class iF extends tt{static{({c:[tn,X]}=iV(this,[Y,Z],[],0,void 0,tt))}static{X()}}function iQ(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 iY(t,e,n,r,i,s){var o,a,l,c,u,h,d,f=Symbol.metadata||Symbol.for("Symbol.metadata"),p=Object.defineProperty,m=Object.create,g=[m(null),m(null)],y=e.length;function b(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function v(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function w(t,e,n,r,i,s,o,a,l,c,u){function f(t){if(!u(t))throw TypeError("Attempted to access private element on non-instance")}var m=[].concat(e[0]),y=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:iQ(function(){return y(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=y,c||iQ(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((d=g[+a][r])&&(d^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");g[+a][r]=i<3?1:i}for(var O=t,L=m.length-1;L>=0;L-=n?2:1){var k=v(m[L],"A decorator","be",!0),j=n?m[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:h,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");v(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){d=k.call(j,O,A),N.v=1,v(d,"class decorators","return")&&(O=d);continue}if(A.static=a,A.private=l,d=A.access={has:l?u.bind():function(t){return r in t}},$||(d.get=l?E?function(t){return f(t),T.value}:C("get",0,f):function(t){return t[r]}),E||_||(d.set=l?C("set",0,f):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(d=v(O.get,"accessor.get"))&&(T.get=d),(d=v(O.set,"accessor.set"))&&(T.set=d),(d=v(O.init,"accessor.init"))&&x.unshift(d);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else v(O,(c?"field":"method")+" decorators","return")&&(c?x.unshift(O):T[P]=O)}return i<2&&o.push(b(x,a,1),b(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:v.call.bind(T[P])):p(t,r,T)),O}function S(t){return p(t,f,{configurable:!0,enumerable:!0,value:h})}return void 0!==s&&(h=s[f]),h=m(null==h?null:h),l=[],c=function(t){t&&l.push(b(t))},(u=function(e,r){for(var s=0;s<n.length;s++){var c=n[s],u=c[1],h=7&u;if((8&u)==e&&!h==r){var d=c[2],f=!!c[3],p=16&u;w(e?t:t.prototype,c,p,f?"#"+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 r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?a=a||[]:o=o||[],l,!!e,f,r,e&&f?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}:i)}}})(8,0),u(0,0),u(8,1),u(0,1),c(o),c(a),d=l,y||S(t),{e:d,get c(){var _=[];return y&&[S(t=w(t,[e],r,t.name,5,_)),b(_,1)]}}}function iZ(t){return t}function iX(t){return!t.startsWith("/")}let i0=nA`
8
+ `;X=iM(),tt=iN(s9),tn=ti;class s7 extends tn{static{({c:[ts,te]}=sJ(this,[X,tt],[],0,void 0,tn))}static{te()}}function rt(t){return!t.startsWith("/")}let re=nF`
9
9
  :host {
10
10
  /* link default style */
11
11
  cursor: pointer;
@@ -19,11 +19,11 @@ let t,e,n,r,i,s,o,a,l,c,u,h,d,f,p,m,g,y,b,v,w,S,_,$,E,C,T,x,P,O,L,k,j,N,A,M,R,I,
19
19
  a:visited {
20
20
  color: unset;
21
21
  }
22
- `;tr=rg(ik),ti=rm(i0),ts=ry(),to=rw({focusable:!0}),tl=nV,tc=rs(),tu=ro(),new class extends iZ{constructor(){super(tF),ta()}static [class extends tl{static{({e:[tM,th,td,tf,tp,tm,tg,ty,tb,tv,tw,tS,t_,t$,tE,tC,tT,tx,tP,tO,tL,tk,tj,tN,tA,tR,tI,tH],c:[tF,ta]}=iY(this,[tr,ti,ts,to],[[rh,8,"link"],[n6,0,"href"],[n6,0,"target"],[n6,0,"path"],[n6,0,"query"],[n6,0,"hash"],[n6,0,"hint"],[n5,0,"preload"],[rt,0,"route"],[rt,0,"options"],[rt,0,"routeOptions"],[rt,0,"prepare"],[tc,2,"init",function(){this.addEventListener("click",this.#Y),this.addEventListener("pointerenter",this.#Z)}],[tu,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],0,t=>#N in t,tl))}constructor(...t){super(...t),tI(this)}href=(tH(this),tf(this));target=(tp(this),tm(this));path=(tg(this),ty(this));query=(tb(this),tv(this));hash=(tw(this),tS(this));hint=(t_(this),t$(this));preload=(tE(this),tC(this));route=(tT(this),tx(this));options=(tP(this),tO(this));routeOptions=(tL(this),tk(this));prepare=(tj(this),tN(this));get #X(){return this.routeOptions||this.options}get #tt(){return this.hint||"on"}#Y=(tA(this),async t=>{t.preventDefault();let e=this._getLocationString();if(!e)return;if(iX(e))switch(this.target){case"_self":window.location.href=e;return;case"_parent":window.parent.location.href=e;return;case"_top":window.top.location.href=e;return;default:window.open(e);return}let{path:n,query:r,hash:i}=iO.getParams();if(n+r+i!==e)if(await this.prepare?.(),this.route)iO.pushIgnoreCloseHandle(iq(this.route,this.#X));else if(this.href){let t=new URL(e,location.origin);iO.pushIgnoreCloseHandle({path:t.pathname,query:t.search,hash:t.hash})}else iO.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash})});#te=()=>{let t=this._getLocationString();return iX(t)?t:new URL(iO.basePath+t,location.origin).toString()};#Z=()=>{this.route?.content,this.route?.getContent?.({},this.shadowRoot)};get #N(){return tM}#a=tR(this,()=>{let t="off"===this.#tt?null:this.#te();return ny`<a part=${tF.link} href=${t} tabindex="-1"><slot></slot></a>`});_getLocationString(){if(this.route){let t=this.#X?.query||"",e=this.#X?.hash||"";return iG(this.route,this.#X)+t+e}{let t=this.href||this.path+this.query+this.hash,{path:e,query:n}=iO.getParams();return t.startsWith("#")?`${e}${n}${t}`:t.startsWith("?")?`${e}${t}`:t.startsWith(".")?e7(e,t):t}}}];link=(()=>{let t=th();return td(),t})()},tD=rg(iO.store),tz=tF,tW=rn();class i1 extends tz{static{({e:[tU,tG,tq,tB,tK,tJ],c:[tQ,tV]}=iY(this,[tD],[[n6,0,"pattern"],[rl,0,"active"],[tW,0,"updateState",function(t){return t.#tn},function(t,e){t.#tn=e}]],0,t=>#tn in t,tz))}constructor(...t){super(...t),tJ(this)}pattern=tU(this);active=(tG(this),tq(this));#tn=(tB(this),tK(this,()=>{let{path:t,query:e,hash:n}=iO.getParams(),r=this.pattern&&iU(this.pattern,t);this.active=!!r||t+e+n===this._getLocationString()}));static{tV()}}function i2(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}customElements.define("gem-link",tF),customElements.define("gem-active-link",tQ);let i3="gem-reflect-end",i8=t=>new Comment(t);tY=ri(),tZ=rn(t=>[t.target]);class i4 extends nV{static{({e:[tX,t0,t1,t2,t3,t8,t4,t7]}=function(t,e,n,r){var i,s,o,a,l,c,u,h=Symbol.metadata||Symbol.for("Symbol.metadata"),d=Object.defineProperty,f=Object.create,p=[f(null),f(null)],m=e.length;function g(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function y(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function b(t,e,n,r,i,s,o,a,l,h,f){function m(t){if(!f(t))throw TypeError("Attempted to access private element on non-instance")}var b=[].concat(e[0]),v=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=_?"get":$||S?"set":"value";if(!w&&(l?(h||S?T={get:i2(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,h||i2(T[P],r,E?"":P)):h||(T=Object.getOwnPropertyDescriptor(t,r)),!h&&!l)){if((u=p[+a][r])&&(u^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");p[+a][r]=i<3?1:i}for(var O=t,L=b.length-1;L>=0;L-=n?2:1){var k=y(b[L],"A decorator","be",!0),j=n?b[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:c,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");y(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){u=k.call(j,O,A),N.v=1,y(u,"class decorators","return")&&(O=u);continue}if(A.static=a,A.private=l,u=A.access={has:l?f.bind():function(t){return r in t}},$||(u.get=l?E?function(t){return m(t),T.value}:C("get",0,m):function(t){return t[r]}),E||_||(u.set=l?C("set",0,m):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(u=y(O.get,"accessor.get"))&&(T.get=u),(u=y(O.set,"accessor.set"))&&(T.set=u),(u=y(O.init,"accessor.init"))&&x.unshift(u);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else y(O,(h?"field":"method")+" decorators","return")&&(h?x.unshift(O):T[P]=O)}return i<2&&o.push(g(x,a,1),g(s,a,0)),h||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:y.call.bind(T[P])):d(t,r,T)),O}function v(t){return d(t,h,{configurable:!0,enumerable:!0,value:c})}return c=f(null==c?null:c),o=[],a=function(t){t&&o.push(g(t))},(l=function(e,a){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==a){var d=c[2],f=!!c[3],p=16&u;b(e?t:t.prototype,c,p,f?"#"+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 r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?s=s||[]:i=i||[],o,!!e,f,a,e&&f?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}:r)}}})(8,0),l(0,0),l(8,1),l(0,1),a(i),a(s),u=o,m||v(t),{e:u,get c(){var w=[];return m&&[v(t=b(t,[e],0,t.name,5,w)),g(w,1)]}}}(this,[],[[n6,0,"method"],[rt,0,"target"],[tY,0,"init",function(t){return t.#N},function(t,e){t.#N=e}],[tZ,0,"changeTarget",function(t){return t.#tr},function(t,e){t.#tr=e}]],t=>#N in t))}constructor(...t){super(...t),t7(this)}method=tX(this);target=(t0(this),t1(this,document.head));get #ti(){return this.method||"append"}#N=(t2(this),t3(this,()=>{this.hidden=!0}));#ts=(t8(this),i8("gem-reflect-start"));#to=i8(i3);#ta;#tr=t4(this,()=>((this.#ta||[this.#ts,...this.childNodes,this.#to]).forEach((t,e,n)=>{let r=n[e-1];r?r.after(t):this.target[this.#ti](t)}),()=>{this.#ta=(t=>{let e=[],n=t;for(;n&&(e.push(n),n.nodeValue!==i3);)n=n.nextSibling;return e})(this.#ts),this.#ta.forEach(t=>t.remove())}))}function i7(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 i6(t){return t}customElements.define("gem-reflect",i4),customElements.define("gem-route",tn),customElements.define("gem-light-route",te);let i5=0,i9=t=>{clearTimeout(i5),i5=setTimeout(()=>document.title=t)};function st(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}t6=ry(),t9=nV,et=rn(t=>[t.inert]),ee=rs(),en=ro(),new class extends i6{constructor(){super(em),t5()}static [class extends t9{static{({e:[er,ei,es,eo,ea,el,ec,eu,eh,ed,ef,ep],c:[em,t5]}=function(t,e,n,r,i){var s,o,a,l,c,u,h,d=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,p=Object.create,m=[p(null),p(null)],g=e.length;function y(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function b(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function v(t,e,n,r,i,s,o,a,l,c,d){function p(t){if(!d(t))throw TypeError("Attempted to access private element on non-instance")}var g=[].concat(e[0]),v=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:i7(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||i7(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((h=m[+a][r])&&(h^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");m[+a][r]=i<3?1:i}for(var O=t,L=g.length-1;L>=0;L-=n?2:1){var k=b(g[L],"A decorator","be",!0),j=n?g[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");b(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){h=k.call(j,O,A),N.v=1,b(h,"class decorators","return")&&(O=h);continue}if(A.static=a,A.private=l,h=A.access={has:l?d.bind():function(t){return r in t}},$||(h.get=l?E?function(t){return p(t),T.value}:C("get",0,p):function(t){return t[r]}),E||_||(h.set=l?C("set",0,p):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(h=b(O.get,"accessor.get"))&&(T.get=h),(h=b(O.set,"accessor.set"))&&(T.set=h),(h=b(O.init,"accessor.init"))&&x.unshift(h);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(O,(c?"field":"method")+" decorators","return")&&(c?x.unshift(O):T[P]=O)}return i<2&&o.push(y(x,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:b.call.bind(T[P])):f(t,r,T)),O}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+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 r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?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}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[t6],[[n6,0,"prefix"],[n6,0,"suffix"],[n5,0,"inert"],[et,0,"connectStore",function(t){return t.#V},function(t,e){t.#V=e}],[ee,0,"obTextContent",function(t){return t.#tl},function(t,e){t.#tl=e}],[en,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],t=>#V in t,t9))}constructor(...t){super(...t),ep(this)}prefix=er(this);suffix=(ei(this),es(this));inert=(eo(this),ea(this));static setTitle(t){iL({title:t})}#V=(el(this),ec(this,()=>!this.inert&&ng(iL,this.update)));#tc=(eu(this),new MutationObserver(()=>this.update()));#tl=eh(this,()=>{this.#tc.observe(this,{characterData:!0,childList:!0,subtree:!0})});#a=(ed(this),ef(this,()=>(!function(t,e="",n=""){let r=iL.title||t;r&&r!==iL.defaultTitle?i9(e+(em.title=r)+n):i9(em.title=iL.defaultTitle)}(this.textContent?.trim(),this.prefix,this.suffix),ny`${em.title}`)))}];title=document.title},customElements.define("gem-title",em);let se=nA`
22
+ `;tr=iR(sB),ta=iN(re),to=iM(),tl=iI({focusable:!0}),tc=n2,tu=iv(),td=iw(),new class extends sZ{constructor(){super(tZ),th()}static [class extends tc{static{({e:[tI,tp,tf,tm,tg,ty,tb,t_,t$,tS,tv,tw,tE,tC,tx,tL,tP,tT,tk,tO,tN,tR,tM,tA,tH,tV,tD,tj],c:[tZ,th]}=sJ(this,[tr,ta,to,tl],[[iP,8,"link"],[ip,0,"href"],[ip,0,"target"],[ip,0,"path"],[ip,0,"query"],[ip,0,"hash"],[ip,0,"hint"],[im,0,"preload"],[iy,0,"route"],[iy,0,"options"],[iy,0,"routeOptions"],[iy,0,"prepare"],[tu,2,"init",function(){this.addEventListener("click",this.#X),this.addEventListener("pointerenter",this.#tt)}],[td,0,"content",function(t){return t.#o},function(t,e){t.#o=e}]],0,t=>#M in t,tc))}constructor(...t){super(...t),tD(this)}href=(tj(this),tm(this));target=(tg(this),ty(this));path=(tb(this),t_(this));query=(t$(this),tS(this));hash=(tv(this),tw(this));hint=(tE(this),tC(this));preload=(tx(this),tL(this));route=(tP(this),tT(this));options=(tk(this),tO(this));routeOptions=(tN(this),tR(this));prepare=(tM(this),tA(this));get #te(){return this.routeOptions||this.options}get #tn(){return this.hint||"on"}#X=(tH(this),async t=>{t.preventDefault();let e=this._getLocationString();if(!e)return;if(rt(e))switch(this.target){case"_self":window.location.href=e;return;case"_parent":window.parent.location.href=e;return;case"_top":window.top.location.href=e;return;default:window.open(e);return}let{path:n,query:i,hash:s}=sK.getParams();if(n+i+s!==e)if(await this.prepare?.(),this.route)sK.pushIgnoreCloseHandle(s8(this.route,this.#te));else if(this.href){let t=new URL(e,location.origin);sK.pushIgnoreCloseHandle({path:t.pathname,query:t.search,hash:t.hash})}else sK.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash})});#ti=()=>{let t=this._getLocationString();if(rt(t))return t;let e=new URL(sK.basePath+t,location.origin);return e9?e.pathname+e.search+e.hash:e.toString()};#tt=()=>{this.route?.content,this.route?.getContent?.({},this.shadowRoot)};get #M(){return tI}#o=tV(this,()=>{let t="off"===this.#tn?null:this.#ti();return nA`<a part=${tZ.link} href=${t} tabindex="-1"><slot></slot></a>`});_getLocationString(){if(this.route){let t=this.#te?.query||"",e=this.#te?.hash||"";return s3(this.route,this.#te)+t+e}{let t=this.href||this.path+this.query+this.hash,{path:e,query:n}=sK.getParams();return t.startsWith("#")?`${e}${n}${t}`:t.startsWith("?")?`${e}${t}`:t.startsWith(".")?np(e,t):t}}}];link=(()=>{let t=tp();return tf(),t})()},tU=iR(sK.store),tG=tZ,tK=i_();class rn extends tG{static{({e:[tq,tB,tz,tJ,tF,tY],c:[tQ,tW]}=sJ(this,[tU],[[ip,0,"pattern"],[iC,0,"active"],[tK,0,"updateState",function(t){return t.#ts},function(t,e){t.#ts=e}]],0,t=>#ts in t,tG))}constructor(...t){super(...t),tY(this)}pattern=tq(this);active=(tB(this),tz(this));#ts=(tJ(this),tF(this,()=>{let{path:t,query:e,hash:n}=sK.getParams(),i=this.pattern&&s2(this.pattern,t);this.active=!!i||t+e+n===this._getLocationString()}));static{tW()}}customElements.define("gem-link",tZ),customElements.define("gem-active-link",tQ);let ri="gem-reflect-end",rs=t=>new Comment(t);tX=iS(),t0=i_(t=>[t.target]);class rr extends n2{static{({e:[t1,t2,t3,t8,t4,t6,t5,t9]}=sJ(this,[],[[ip,0,"method"],[iy,0,"target"],[tX,0,"init",function(t){return t.#M},function(t,e){t.#M=e}],[t0,0,"changeTarget",function(t){return t.#tr},function(t,e){t.#tr=e}]],0,t=>#M in t))}constructor(...t){super(...t),t9(this)}method=t1(this);target=(t2(this),t3(this,document.head));get #ta(){return this.method||"append"}#M=(t8(this),t4(this,()=>{this.hidden=!0}));#to=(t6(this),rs("gem-reflect-start"));#tl=rs(ri);#th;#tr=t5(this,()=>((this.#th||[this.#to,...this.childNodes,this.#tl]).forEach((t,e,n)=>{let i=n[e-1];i?i.after(t):this.target[this.#ta](t)}),()=>{this.#th=(t=>{let e=[],n=t;for(;n&&(e.push(n),n.nodeValue!==ri);)n=n.nextSibling;return e})(this.#to),this.#th.forEach(t=>t.remove())}))}customElements.define("gem-reflect",rr),customElements.define("gem-route",ts),customElements.define("gem-light-route",ti);let ra=0,ro=t=>{clearTimeout(ra),ra=setTimeout(()=>document.title=t)};t7=iM(),ee=n2,en=i_(t=>[t.inert]),ei=iv(),es=iw(),new class extends sZ{constructor(){super(ey),et()}static [class extends ee{static{({e:[er,ea,eo,el,eh,ec,eu,ed,ep,ef,em,eg],c:[ey,et]}=sJ(this,[t7],[[ip,0,"prefix"],[ip,0,"suffix"],[im,0,"inert"],[en,0,"connectStore",function(t){return t.#U},function(t,e){t.#U=e}],[ei,0,"obTextContent",function(t){return t.#tc},function(t,e){t.#tc=e}],[es,0,"content",function(t){return t.#o},function(t,e){t.#o=e}]],0,t=>#U in t,ee))}constructor(...t){super(...t),eg(this)}prefix=er(this);suffix=(ea(this),eo(this));inert=(el(this),eh(this));static setTitle(t){sq({title:t})}#U=(ec(this),eu(this,()=>!this.inert&&nM(sq,this.update)));#tu=(ed(this),new MutationObserver(()=>this.update()));#tc=ep(this,()=>{this.#tu.observe(this,{characterData:!0,childList:!0,subtree:!0})});#o=(ef(this),em(this,()=>(!function(t,e="",n=""){let i=sq.title||t;i&&i!==sq.defaultTitle?ro(e+(ey.title=i)+n):ro(ey.title=sq.defaultTitle)}(this.textContent?.trim(),this.prefix,this.suffix),nA`${ey.title}`)))}];title=document.title},customElements.define("gem-title",ey);let rl=nF`
23
23
  :host(:where(:not([hidden]))) {
24
24
  display: contents;
25
25
  }
26
- `;eg=ry(),ey=rm(se),ev=nV,ew=rn(),eS=ro();class sn extends ev{static{({e:[e_,e$,eE,eC,eT,ex,eP,eO],c:[eL,eb]}=function(t,e,n,r,i){var s,o,a,l,c,u,h,d=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,p=Object.create,m=[p(null),p(null)],g=e.length;function y(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function b(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function v(t,e,n,r,i,s,o,a,l,c,d){function p(t){if(!d(t))throw TypeError("Attempted to access private element on non-instance")}var g=[].concat(e[0]),v=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:st(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||st(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((h=m[+a][r])&&(h^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");m[+a][r]=i<3?1:i}for(var O=t,L=g.length-1;L>=0;L-=n?2:1){var k=b(g[L],"A decorator","be",!0),j=n?g[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");b(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){h=k.call(j,O,A),N.v=1,b(h,"class decorators","return")&&(O=h);continue}if(A.static=a,A.private=l,h=A.access={has:l?d.bind():function(t){return r in t}},$||(h.get=l?E?function(t){return p(t),T.value}:C("get",0,p):function(t){return t[r]}),E||_||(h.set=l?C("set",0,p):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(h=b(O.get,"accessor.get"))&&(T.get=h),(h=b(O.set,"accessor.set"))&&(T.set=h),(h=b(O.init,"accessor.init"))&&x.unshift(h);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(O,(c?"field":"method")+" decorators","return")&&(c?x.unshift(O):T[P]=O)}return i<2&&o.push(y(x,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:b.call.bind(T[P])):f(t,r,T)),O}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+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 r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?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}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[eg,ey],[[n6,0,"html"],[rt,0,"styles"],[ew,0,"adoptStyles",function(t){return t.#tu},function(t,e){t.#tu=e}],[eS,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],t=>#tu in t,ev))}constructor(...t){super(...t),eO(this)}html=e_(this);styles=(e$(this),eE(this));get #th(){if(!this.styles)return[];if("string"!=typeof this.styles)return[this.styles].flat().map(t=>t[nT].getStyle());{let t=new CSSStyleSheet;return t.replaceSync(this.styles),[t]}}#tu=(eC(this),eT(this,()=>{let t=this.shadowRoot.adoptedStyleSheets;return this.shadowRoot.adoptedStyleSheets=t.concat(this.#th),()=>{this.shadowRoot.adoptedStyleSheets=t}}));#a=(ex(this),eP(this,()=>{this.shadowRoot.innerHTML=this.html}));static{eb()}}function sr(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}customElements.define("gem-unsafe",eL);let si=nA`
26
+ `;eb=iM(),e_=iN(rl),eS=n2,ev=i_(),ew=iw();class rh extends eS{static{({e:[eE,eC,ex,eL,eP,eT,ek,eO],c:[eN,e$]}=sJ(this,[eb,e_],[[ip,0,"html"],[iy,0,"styles"],[ev,0,"adoptStyles",function(t){return t.#td},function(t,e){t.#td=e}],[ew,0,"content",function(t){return t.#o},function(t,e){t.#o=e}]],0,t=>#td in t,eS))}constructor(...t){super(...t),eO(this)}html=eE(this);styles=(eC(this),ex(this));get #h(){if(!this.styles)return[];if("string"!=typeof this.styles)return[this.styles].flat().map(t=>t[nW].getStyle());{let t=new CSSStyleSheet;return t.replaceSync(this.styles),[t]}}#td=(eL(this),eP(this,()=>{let t=this.shadowRoot.adoptedStyleSheets;return this.shadowRoot.adoptedStyleSheets=t.concat(this.#h),()=>{this.shadowRoot.adoptedStyleSheets=t}}));#o=(eT(this),ek(this,()=>{this.shadowRoot.innerHTML=this.html}));static{e$()}}customElements.define("gem-unsafe",eN);let rc=nF`
27
27
  :host(:where(:not([hidden]))) {
28
28
  position: relative;
29
29
  display: inline-flex;
@@ -33,4 +33,4 @@ let t,e,n,r,i,s,o,a,l,c,u,h,d,f,p,m,g,y,b,v,w,S,_,$,E,C,T,x,P,O,L,k,j,N,A,M,R,I,
33
33
  width: 100%;
34
34
  height: 100%;
35
35
  }
36
- `,ss=new Map;ek=ry(),ej=rm(si),eA=nV,eM=ro();class so extends eA{static{({e:[eR,eI,eH,eD,eV,ez,eW,eU,eG,eq],c:[eB,eN]}=function(t,e,n,r,i){var s,o,a,l,c,u,h,d=Symbol.metadata||Symbol.for("Symbol.metadata"),f=Object.defineProperty,p=Object.create,m=[p(null),p(null)],g=e.length;function y(e,n,r){return function(i,s){n&&(s=i,i=t);for(var o=0;o<e.length;o++)s=e[o].apply(i,r?[s]:[]);return r?s:i}}function b(t,e,n,r){if("function"!=typeof t&&(r||void 0!==t))throw TypeError(e+" must "+(n||"be")+" a function"+(r?"":" or undefined"));return t}function v(t,e,n,r,i,s,o,a,l,c,d){function p(t){if(!d(t))throw TypeError("Attempted to access private element on non-instance")}var g=[].concat(e[0]),v=e[3],w=!o,S=1===i,_=3===i,$=4===i,E=2===i;function C(e,n,r){return function(i,s){return n&&(s=i,i=t),r&&r(i),desc[e].call(i,s)}}var T={},x=[],P=_?"get":$||S?"set":"value";if(!w&&(l?(c||S?T={get:sr(function(){return v(this)},r,"get"),set:function(t){e[4](this,t)}}:T[P]=v,c||sr(T[P],r,E?"":P)):c||(T=Object.getOwnPropertyDescriptor(t,r)),!c&&!l)){if((h=m[+a][r])&&(h^i)!=7)throw Error("Decorating two elements with the same name ("+T[P].name+") is not supported yet");m[+a][r]=i<3?1:i}for(var O=t,L=g.length-1;L>=0;L-=n?2:1){var k=b(g[L],"A decorator","be",!0),j=n?g[L-1]:void 0,N={},A={kind:["field","accessor","method","getter","setter","class"][i],name:r,metadata:u,addInitializer:(function(t,e){if(t.v)throw TypeError("attempted to call addInitializer after decoration was finished");b(e,"An initializer","be",!0),s.push(e)}).bind(null,N)};if(w){h=k.call(j,O,A),N.v=1,b(h,"class decorators","return")&&(O=h);continue}if(A.static=a,A.private=l,h=A.access={has:l?d.bind():function(t){return r in t}},$||(h.get=l?E?function(t){return p(t),T.value}:C("get",0,p):function(t){return t[r]}),E||_||(h.set=l?C("set",0,p):function(t,e){t[r]=e}),O=k.call(j,S?{get:T.get,set:T.set}:T[P],A),N.v=1,S){if("object"==typeof O&&O)(h=b(O.get,"accessor.get"))&&(T.get=h),(h=b(O.set,"accessor.set"))&&(T.set=h),(h=b(O.init,"accessor.init"))&&x.unshift(h);else if(void 0!==O)throw TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(O,(c?"field":"method")+" decorators","return")&&(c?x.unshift(O):T[P]=O)}return i<2&&o.push(y(x,a,1),y(s,a,0)),c||w||(l?S?o.splice(-1,0,C("get",a),C("set",a)):o.push(E?T[P]:b.call.bind(T[P])):f(t,r,T)),O}function w(t){return f(t,d,{configurable:!0,enumerable:!0,value:u})}return void 0!==i&&(u=i[d]),u=p(null==u?null:u),a=[],l=function(t){t&&a.push(y(t))},(c=function(e,i){for(var l=0;l<n.length;l++){var c=n[l],u=c[1],h=7&u;if((8&u)==e&&!h==i){var d=c[2],f=!!c[3],p=16&u;v(e?t:t.prototype,c,p,f?"#"+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 r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(d),h,h<2?[]:e?o=o||[]:s=s||[],a,!!e,f,i,e&&f?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}:r)}}})(8,0),c(0,0),c(8,1),c(0,1),l(s),l(o),h=a,g||w(t),{e:h,get c(){var S=[];return g&&[w(t=v(t,[e],0,t.name,5,S)),y(S,1)]}}}(this,[ek,ej],[[n6,0,"selector"],[rt,0,"root"],[rt,0,"element"],[rl,0,"active"],[eM,0,"content",function(t){return t.#a},function(t,e){t.#a=e}]],t=>#a in t,eA))}constructor(...t){super(...t),eq(this)}selector=eR(this);root=(eI(this),eH(this));element=(eD(this),eV(this));active=(ez(this),eW(this));#td=(eU(this),()=>{let t=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if("string"==typeof t){let e=ss.get(t);return e||((e=document.createElement("template")).innerHTML=t,ss.set(t,e)),e.content.cloneNode(!0)}return t instanceof HTMLTemplateElement?t.content.cloneNode(!0):t?.cloneNode(!0)});#a=eG(this,()=>ny`${this.#td()}<slot></slot>`);static{eN()}}customElements.define("gem-use",eB);class sa{#tf;get #tp(){return`[${this.#tf}]`}constructor(t){this.#tf=t}info=(...t)=>{console.log(this.#tp,...t)};warn=(...t)=>{console.warn(this.#tp,...t)};error=(...t)=>{console.error(this.#tp,...t)}}let sl=new sa("GEM"),sc=/\$\d(?:<[^>]*>)?/,su=/\$(\d)(<([^>]*)>)?/g;function sh(t,...e){let n,r=t.split(sc),i=[];for(;n=su.exec(t);){let t=n[3],r=e[Number(n[1])-1];i.push("function"==typeof r?r(t):r)}return ny(r,...i)}let sd=new Set;class sf{resources;fallbackLanguage;currentLanguage;cache;cachePrefix="gem-i18n";urlParamsType;urlParamsName;onChange;replace=({path:t})=>this.setLanguage(t);getParams=()=>({path:this.currentLanguage});get #tm(){return`${this.cachePrefix}:current`}get #tg(){let{hostname:t,pathname:e,search:n}=location,r=t.split(".");switch(this.urlParamsType){case"ccTLD":return r.pop();case"gTLD":return r.shift();case"path":return e.split("/")[1];default:{let t=this.urlParamsName&&new URLSearchParams(n).get(this.urlParamsName)||"";return t in this.resources?t:""}}}get #ty(){return this.cache&&localStorage.getItem(this.#tm)||""}get #tb(){return!sd.has(this)}set #tv(t){this.#tb&&(document.documentElement.lang=t),this.currentLanguage=t,this.onChange?.(t)}#tw=!0;constructor(t){if(!t.resources[t.fallbackLanguage])throw new na("i18n: fallbackLanguage invalid");Object.assign(this,t);let e=this.#tg||this.currentLanguage||this.#ty,n=document.querySelector(`[type*=${this.cachePrefix}]`);if(n)try{let t=JSON.parse(n.textContent||"");e=t.currentLanguage,this.resources[t.currentLanguage]=t.currentLanguagePack}catch{}e?(this.#tv=e,this.setLanguage(e)):this.resetLanguage(),this.#tw=!1}get(t,...e){let n=this.resources[this.currentLanguage],r=this.resources[this.fallbackLanguage],i=n[t]||r[t],s=i?.message||i||`[${t}]`;return e.length?sh(s,...e):s}detectLanguage(){let t=Object.keys(this.resources);for(let e of navigator.languages.map(t=>t.replace(/-(.*)/,t=>t.toUpperCase()))){let n=t.find(t=>t===e||e.startsWith(`${t}-`));if(n)return n}return this.fallbackLanguage}async setLanguage(t){let e;this.#tb&&sd.forEach(async e=>await e.setLanguage(t));let n=this.resources[t];if(!n)return sl.warn(`${this.cachePrefix}: not found \`${t}\``),this.resetLanguage();if("string"==typeof n){let t=`${this.cachePrefix}:`,r=`${t}${n}`,i=localStorage.getItem(r),s=async()=>{let e=await (await fetch(n)).json();if(this.cache){for(let e=0;e<localStorage.length;e++){let n=localStorage.key(e);n.startsWith(t)&&localStorage.removeItem(n)}localStorage.setItem(r,JSON.stringify(e))}return e};if(i)try{e=JSON.parse(i)}catch{e=await s()}else e=await s()}else e=n;if(this.resources[t]=e,!this.#tw){let t=[document.documentElement];for(;t.length;){let e=t.pop();e[nx]?.(),t.push(...[...e.children,...e.shadowRoot?.children||[]].reverse())}}return t!==this.currentLanguage&&(this.#tv=t),!0===this.cache&&this.setCache(),t}resetLanguage(){return this.#tb&&sd.forEach(t=>t.resetLanguage()),this.#tv=this.fallbackLanguage,this.cache&&localStorage.removeItem(this.#tm),this.setLanguage(this.detectLanguage())}setCache(){this.#tb&&sd.forEach(t=>t.setCache()),localStorage.setItem(this.#tm,this.currentLanguage)}createSubModule(t,e){let n=new sf({resources:e,cachePrefix:`${this.cachePrefix}-${t}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return sd.add(n),n}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}}let sp={PRINT:"print",get isPrint(){return matchMedia(this.PRINT).matches},HOVER:"(hover: hover)",get isHover(){return matchMedia(this.HOVER).matches},PWA:"(display-mode: standalone)",get isPWA(){return matchMedia(this.PWA).matches},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return matchMedia(this.MOTION_REDUCE).matches},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return matchMedia(this.DATA_REDUCE).matches},WATCH:"(width < 320px)",get isWatch(){return matchMedia(this.WATCH).matches},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return matchMedia(this.SMALL_PHONE).matches},PHONE:"(320px <= width <= 480px)",get isPhone(){return matchMedia(this.PHONE).matches},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return matchMedia(this.PHONE_LANDSCAPE).matches},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return matchMedia(this.SHORT).matches},TABLET:"(480px < width <= 1280px)",get isTablet(){return matchMedia(this.TABLET).matches},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return matchMedia(this.DESKTOP).matches},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return matchMedia(this.WIDTHSCREEN).matches}},sm=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function sg(t={}){let{origin:e=location.origin,base:n="",appendHeaders:r=()=>({}),transformInput:i=t=>t,transformOutput:s=t=>t,...o}=t,a=t=>t instanceof FormData||t instanceof Blob||t instanceof sm||t instanceof URLSearchParams||t instanceof ReadableStream||t instanceof ArrayBuffer?t:"object"==typeof t?JSON.stringify(t):t,l=(t,r)=>{if(new URL(t,location.origin).pathname!==t)throw new na("`path` format is incorrect");let i=new URLSearchParams(r).toString();return`${e}${n}${t}${i?"?":""}${i}`},c=t=>t?t instanceof Headers?Object.fromEntries(t):Object.fromEntries((Array.isArray(t)?t:Object.entries(t)).map(([t,e])=>[t.toLowerCase(),e])):{},u=async(t,e={})=>{let n=new Request(t,{...o,...e,headers:new Headers({"content-type":"application/json",...c(o.headers),...c(e.headers)})}),r=await fetch(n);if(204===r.status)return;if(0===r.status)throw Error("Request fail");if(r.status>=500)throw Error(r.statusText);let i=n.headers.get("content-type"),a=r.status>=400;try{let t;if(t=i.includes("json")?await r.json():i.includes("octet-stream")?await r.arrayBuffer():await r.text(),a)throw Error(r.statusText,{cause:t});return await s(t,n)}catch{throw Error("Parse error")}};return{request:u,async get(t,e){let n=await i(e);return u(l(t,n),{method:"GET",headers:await r(n)})},async del(t,e){let n=await i(e);return u(l(t,n),{method:"DELETE",headers:await r(n)})},async put(t,e){let n=await i(e);return u(l(t),{method:"PUT",headers:await r(n),body:a(n)})},async post(t,e){let n=await i(e);return u(l(t),{method:"POST",headers:await r(n),body:a(n)})}}}let{request:sy,del:sb,get:sv,post:sw,put:sS}=sg(),s_=new WeakMap,s$=new WeakMap;function sE(t){return s_.get(t)}function sC(t){return s$.get(t)}function sT(t,e={}){let n=nr(),r=nA({})[nT],i=nm(t),s=()=>{Object.keys(i).forEach(t=>{e[t]||(e[t]=`--${ni(t)}-${n}`,o[t]=`var(${e[t]})`)})},o=new Proxy(e4({[nT]:r},t=>{i(t),s()}),{get(t,e){if(!t[e]){let[n,r,i]=e.match(/^(\w*Color)(\d+)$/)||[];r&&(t[e]=`oklch(from ${t[r]} calc(l - ${(Number(i)-400)/1e3}) c h)`)}return t[e]}});s$.set(o,e),s_.set(o,i);let a=()=>{s();let t="";Object.keys(i).forEach(n=>{t+=`${e[n]}:${i[n]};`}),r.setContent(`&,:host{${t}}`)};return a(),ng(i,()=>{a(),r.updateStyle()}),o}function sx(t){return sT(t)}function sP(t){let e=sx(t);return document.adoptedStyleSheets.push(e[nT].getStyle()),e}function sO(t,e){return sT(e,sC(t))}function sL(t){let e=sT(t),n=sC(e);return e4(e,e=>(r,{addInitializer:i,access:s})=>{i(function(){let r=sT({...t},n),i=r[nT].getStyle(this,!0);this.internals.sheets.push(i),this.memo(()=>{if(CSS.supports("font:-apple-system-body"))return r(s.get(this).apply(this));let t=s.get(this).apply(this),e=i.cssRules[0],o=this.shadowRoot?e:i.element?.sheet?.cssRules[0]?.cssRules?.[0];for(let e in n)o?.style.setProperty(n[e],t[e])},e&&(()=>e(this)))})})}export{nV as GemElement,na as GemError,i4 as GemReflectElement,sf as I18n,e5 as LinkedList,sa as Logger,e9 as PropProxyMap,nt as QueryString,nT as SheetToken,rG as TemplateResult,nx as UpdateToken,tQ as GemActiveLinkElement,p as GemDialogBaseElement,te as GemLightRouteElement,tF as GemLinkElement,tn as GemRouteElement,em as GemTitleElement,eL as GemUnsafeElement,eB as GemUseElement,nO as _RenderErrorEvent,np as _StoreListenerMap,e as _createTemplate,e7 as absoluteLocation,e6 as addListener,e8 as addMicrotask,rm as adoptedStyle,n6 as attribute,ik as basePathStore,n5 as boolattribute,ni as camelToKebabCase,nh as classMap,no as cleanObject,ng as connect,rg as connectStore,sL as createDecoratorTheme,iq as createHistoryParams,iH as createModalClass,sO as createOverrideTheme,iG as createPath,r5 as createRef,sx as createScopedTheme,t as createState,nm as createStore,sP as createTheme,e4 as createUpdater,nA as css,rS as customElement,rw as aria,rv as async,rn as effect,rh as part,rl as state,ro as template,sb as del,ie as directive,rd as emitter,nf as exportPartsMap,ra as fallback,sv as get,sC as getThemeProps,sE as getThemeStore,rf as globalemitter,iO as history,ny as html,sg as initRequest,nl as isArrayChange,ns as kebabToCamelCase,rb as light,sl as logger,iU as matchPath,rJ as mathml,sp as mediaQuery,re as memo,rs as mounted,n9 as numattribute,nc as objectMapToString,nd as partMap,sw as post,rt as property,sS as put,nr as randomStr,ne as raw,nb as render,ic as repeat,sy as request,nv as setEngine,nS as setHydrationEngine,ry as shadow,ru as slot,sh as splice,nu as styleMap,nn as styled,rK as svg,iL as titleStore,rr as unmounted,it as version,ri as willMount};
36
+ `,ru=new Map,rd=new Map;eR=iM(),eM=iN(rc),eH=n2,eI=iw();class rp extends eH{static{({e:[eV,eD,ej,eU,eW,eG,eK,eq,eB,ez],c:[eJ,eA]}=sJ(this,[eR,eM],[[ip,0,"selector"],[iy,0,"root"],[iy,0,"element"],[iC,0,"active"],[eI,0,"content",function(t){return t.#o},function(t,e){t.#o=e}]],0,t=>#o in t,eH))}constructor(...t){super(...t),ez(this)}selector=eV(this);root=(eD(this),ej(this));element=(eU(this),eW(this));active=(eG(this),eK(this));#tp=(eq(this),()=>{let t=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if("string"==typeof t&&e9){let e=rd.get(t);return e||(e=Object.assign([t],{raw:[t]}),rd.set(t,e)),nA(e)}if("string"==typeof t){let e=ru.get(t);return e||((e=document.createElement("template")).innerHTML=t,ru.set(t,e)),e.content.cloneNode(!0)}return t instanceof HTMLTemplateElement?t.content.cloneNode(!0):t?.cloneNode(!0)});#o=eB(this,()=>nA`${this.#tp()}<slot></slot>`);static{eA()}}customElements.define("gem-use",eJ);class rf{#tf;get #tm(){return`[${this.#tf}]`}constructor(t){this.#tf=t}info=(...t)=>{console.log(this.#tm,...t)};warn=(...t)=>{console.warn(this.#tm,...t)};error=(...t)=>{console.error(this.#tm,...t)}}let rm=new rf("GEM"),rg=/\$\d(?:<[^>]*>)?/,ry=/\$(\d)(<([^>]*)>)?/g;function rb(t,...e){let n,i=t.split(rg),s=[];for(;n=ry.exec(t);){let t=n[3],i=e[Number(n[1])-1];s.push("function"==typeof i?i(t):i)}return nA(i,...s)}let r_=new Set;class r${resources;fallbackLanguage;cache;cachePrefix="gem-i18n";urlParamsType;urlParamsName;onChange;#z=ne({currentLanguage:""});get currentLanguage(){return this.#z.currentLanguage}set currentLanguage(t){this.#z.currentLanguage=t}replace=({path:t})=>this.setLanguage(t);getParams=()=>({path:this.currentLanguage});get #tg(){return`${this.cachePrefix}:current`}get #ty(){let{hostname:t,pathname:e,search:n}=location,i=t.split(".");switch(this.urlParamsType){case"ccTLD":return i.pop();case"gTLD":return i.shift();case"path":return e.split("/")[1];default:{let t=this.urlParamsName&&new URLSearchParams(n).get(this.urlParamsName)||"";return t in this.resources?t:""}}}get #tb(){return this.cache&&localStorage.getItem(this.#tg)||""}get #t_(){return!r_.has(this)}set #t$(t){this.#t_&&(document.documentElement.lang=t),this.currentLanguage=t,this.onChange?.(t)}#tS=!0;constructor(t){if(!t.resources[t.fallbackLanguage])throw new nE("i18n: fallbackLanguage invalid");Object.assign(this,t);let e=this.#ty||this.currentLanguage||this.#tb,n=document.querySelector(`[type*=${this.cachePrefix}]`);if(n)try{let t=JSON.parse(n.textContent||"");e=t.currentLanguage,this.resources[t.currentLanguage]=t.currentLanguagePack}catch{}e?(this.#t$=e,this.setLanguage(e)):this.resetLanguage(),this.#tS=!1}get(t,...e){let n=this.resources[this.currentLanguage],i=this.resources[this.fallbackLanguage],s=n[t]||i[t],r=s?.message||s||`[${t}]`;return e.length?rb(r,...e):r}detectLanguage(){let t=Object.keys(this.resources);for(let e of navigator.languages.map(t=>t.replace(/-(.*)/,t=>t.toUpperCase()))){let n=t.find(t=>t===e||e.startsWith(`${t}-`));if(n)return n}return this.fallbackLanguage}async setLanguage(t){let e;this.#t_&&r_.forEach(async e=>await e.setLanguage(t));let n=this.resources[t];if(!n)return rm.warn(`${this.cachePrefix}: not found \`${t}\``),this.resetLanguage();if("string"==typeof n){let t=`${this.cachePrefix}:`,i=`${t}${n}`,s=localStorage.getItem(i),r=async()=>{let e=await (await fetch(n)).json();if(this.cache){for(let e=0;e<localStorage.length;e++){let n=localStorage.key(e);n.startsWith(t)&&localStorage.removeItem(n)}localStorage.setItem(i,JSON.stringify(e))}return e};if(s)try{e=JSON.parse(s)}catch{e=await r()}else e=await r()}else e=n;if(this.resources[t]=e,!this.#tS){let t=[document.documentElement];for(;t.length;){let e=t.pop();e[nG]?.(),t.push(...[...e.children,...e.shadowRoot?.children||[]].reverse())}}return t!==this.currentLanguage&&(this.#t$=t),!0===this.cache&&this.setCache(),t}resetLanguage(){return this.#t_&&r_.forEach(t=>t.resetLanguage()),this.#t$=this.fallbackLanguage,this.cache&&localStorage.removeItem(this.#tg),this.setLanguage(this.detectLanguage())}setCache(){this.#t_&&r_.forEach(t=>t.setCache()),localStorage.setItem(this.#tg,this.currentLanguage)}createSubModule(t,e){let n=new r$({resources:e,cachePrefix:`${this.cachePrefix}-${t}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return r_.add(n),n}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}}let rS={PRINT:"print",get isPrint(){return matchMedia(this.PRINT).matches},HOVER:"(hover: hover)",get isHover(){return matchMedia(this.HOVER).matches},PWA:"(display-mode: standalone)",get isPWA(){return matchMedia(this.PWA).matches},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return matchMedia(this.MOTION_REDUCE).matches},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return matchMedia(this.DATA_REDUCE).matches},WATCH:"(width < 320px)",get isWatch(){return matchMedia(this.WATCH).matches},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return matchMedia(this.SMALL_PHONE).matches},PHONE:"(320px <= width <= 480px)",get isPhone(){return matchMedia(this.PHONE).matches},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return matchMedia(this.PHONE_LANDSCAPE).matches},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return matchMedia(this.SHORT).matches},TABLET:"(480px < width <= 1280px)",get isTablet(){return matchMedia(this.TABLET).matches},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return matchMedia(this.DESKTOP).matches},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return matchMedia(this.WIDTHSCREEN).matches}},rv=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function rw(t={}){let{origin:e=location.origin,base:n="",appendHeaders:i=()=>({}),transformInput:s=t=>t,transformOutput:r=t=>t,...a}=t,o=t=>t instanceof FormData||t instanceof Blob||t instanceof rv||t instanceof URLSearchParams||t instanceof ReadableStream||t instanceof ArrayBuffer?t:"object"==typeof t?JSON.stringify(t):t,l=(t,i)=>{if(new URL(t,location.origin).pathname!==t)throw new nE("`path` format is incorrect");let s=new URLSearchParams(i).toString();return`${e}${n}${t}${s?"?":""}${s}`},h=t=>t?t instanceof Headers?Object.fromEntries(t):Object.fromEntries((Array.isArray(t)?t:Object.entries(t)).map(([t,e])=>[t.toLowerCase(),e])):{},c=async(t,e={})=>{let n=new Request(t,{...a,...e,headers:new Headers({"content-type":"application/json",...h(a.headers),...h(e.headers)})}),i=await fetch(n);if(204===i.status)return;if(0===i.status)throw Error("Request fail");if(i.status>=500)throw Error(i.statusText);let s=n.headers.get("content-type"),o=i.status>=400;try{let t;if(t=s.includes("json")?await i.json():s.includes("octet-stream")?await i.arrayBuffer():await i.text(),o)throw Error(i.statusText,{cause:t});return await r(t,n)}catch{throw Error("Parse error")}};return{request:c,async get(t,e){let n=await s(e);return c(l(t,n),{method:"GET",headers:await i(n)})},async del(t,e){let n=await s(e);return c(l(t,n),{method:"DELETE",headers:await i(n)})},async put(t,e){let n=await s(e);return c(l(t),{method:"PUT",headers:await i(n),body:o(n)})},async post(t,e){let n=await s(e);return c(l(t),{method:"POST",headers:await i(n),body:o(n)})}}}let{request:rE,del:rC,get:rx,post:rL,put:rP}=rw(),rT=new WeakMap,rk=new WeakMap;function rO(t){return rT.get(t)}function rN(t){return rk.get(t)}function rR(t,e={},n=n$()){let i=nF({})[nW],s=nR(t),r=()=>{Object.keys(s).forEach(t=>{e[t]||(e[t]=`--${nS(t)}-${n}`,a[t]=`var(${e[t]})`)})},a=new Proxy(nd({[nW]:i},t=>{s(t),r()}),{get(t,e){if(!t[e]){let[n,i,s]=e.match(/^(\w*Color)(\d+)$/)||[];i&&(t[e]=`oklch(from ${t[i]} calc(l - ${(Number(s)-400)/1e3}) c h)`)}return t[e]}});rk.set(a,e),rT.set(a,s);let o=()=>{r();let t="";Object.keys(s).forEach(n=>{t+=`${e[n]}:${s[n]};`}),i.setContent(`&,:host{${t}}`)};return o(),nM(s,()=>{o(),i.updateStyle()}),a}function rM(t,e){return rR(t,{},e)}function rA(t,e){let n=rM(t,e);return document.adoptedStyleSheets.push(n[nW].getStyle()),n}function rH(t,e){return rR(e,rN(t))}function rI(t,e){let n=rR(t,{},e),i=rN(n);return nd(n,e=>(n,{addInitializer:s,access:r})=>{s(function(){let n=rR({...t},i),s=n[nW].getStyle(this,!0);this.internals.sheets.push(s),this.memo(()=>{if(e9||CSS.supports("font:-apple-system-body"))return n(r.get(this).apply(this));let t=r.get(this).apply(this),e=s.cssRules[0],a=this.shadowRoot?e:s.element?.sheet?.cssRules[0]?.cssRules?.[0];for(let e in i)a?.style.setProperty(i[e],t[e])},e&&(()=>e(this)))})})}export{n2 as GemElement,nE as GemError,rr as GemReflectElement,r$ as I18n,nm as LinkedList,rf as Logger,ng as PropProxyMap,ny as QueryString,nW as SheetToken,i5 as TemplateResult,nG as UpdateToken,tQ as GemActiveLinkElement,f as GemDialogBaseElement,ti as GemLightRouteElement,tZ as GemLinkElement,ts as GemRouteElement,ey as GemTitleElement,eN as GemUnsafeElement,eJ as GemUseElement,nq as _RenderErrorEvent,nO as _StoreListenerMap,e as _createTemplate,nV as _renderRoot,np as absoluteLocation,nf as addListener,nc as addMicrotask,iN as adoptedStyle,nu as assignState,ip as attribute,sB as basePathStore,im as boolattribute,nS as camelToKebabCase,nP as classMap,nw as cleanObject,nM as connect,iR as connectStore,rI as createDecoratorTheme,s8 as createHistoryParams,sX as createModalClass,rH as createOverrideTheme,s3 as createPath,sm as createRef,rM as createScopedTheme,t as createState,nR as createStore,rA as createTheme,nd as createUpdater,nF as css,iV as customElement,iI as aria,iH as async,i_ as effect,iP as part,iC as state,iw as template,rC as del,sb as directive,iT as emitter,nk as exportPartsMap,iE as fallback,rN as getThemeProps,rO as getThemeStore,ik as globalemitter,sK as history,nA as html,rw as initRequest,nC as isArrayChange,nv as kebabToCamelCase,iA as light,rm as logger,s2 as matchPath,se as mathml,rS as mediaQuery,ib as memo,iv as mounted,ig as numattribute,nx as objectMapToString,nT as partMap,rL as post,iy as property,rP as put,n$ as randomStr,nb as raw,nH as render,sC as repeat,rx as get,rE as request,nI as setEngine,iM as shadow,iL as slot,rb as splice,nL as styleMap,n_ as styled,st as svg,sq as titleStore,i$ as unmounted,sy as version,iS as willMount};
@@ -1 +1 @@
1
- {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/elements/base/link.ts"],"names":[],"mappings":"AAcA,OAAO,EAAO,UAAU,EAAQ,MAAM,mBAAmB,CAAC;AAG1D,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAuBvD;;GAEG;AACH,qBAIa,cAAe,SAAQ,UAAU;;IACtC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC;IAEf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,GAAG,KAAK,CAAC;IAC9B,4CAA4C;IAC7B,OAAO,EAAE,OAAO,CAAC;IAGtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAC5B,iBAAiB;IACP,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAuF/C;;OAEG;IACH,kBAAkB;CAmBnB;AAED,qBACa,oBAAqB,SAAQ,cAAc;;IAC3C,OAAO,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;CAQxB"}
1
+ {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/elements/base/link.ts"],"names":[],"mappings":"AAcA,OAAO,EAAO,UAAU,EAAQ,MAAM,mBAAmB,CAAC;AAI1D,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAuBvD;;GAEG;AACH,qBAIa,cAAe,SAAQ,UAAU;;IACtC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC;IAEf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,GAAG,KAAK,CAAC;IAC9B,4CAA4C;IAC7B,OAAO,EAAE,OAAO,CAAC;IAGtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAC5B,iBAAiB;IACP,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAwF/C;;OAEG;IACH,kBAAkB;CAmBnB;AAED,qBACa,oBAAqB,SAAQ,cAAc;;IAC3C,OAAO,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;CAQxB"}
@@ -39,6 +39,7 @@ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, p
39
39
  import { adoptedStyle, aria, attribute, boolattribute, connectStore, effect, mounted, part, property, shadow, state, template, } from '../../lib/decorators';
40
40
  import { css, GemElement, html } from '../../lib/element';
41
41
  import { basePathStore, history } from '../../lib/history';
42
+ import { isServer } from '../../lib/server';
42
43
  import { absoluteLocation } from '../../lib/utils';
43
44
  import { createHistoryParams, createPath, matchPath } from './route';
44
45
  function isExternal(path) {
@@ -220,9 +221,11 @@ let GemLinkElement = (() => {
220
221
  });
221
222
  #getHint = () => {
222
223
  const locationString = this._getLocationString();
223
- return isExternal(locationString)
224
- ? locationString
225
- : new URL(history.basePath + locationString, location.origin).toString();
224
+ if (isExternal(locationString))
225
+ return locationString;
226
+ const url = new URL(history.basePath + locationString, location.origin);
227
+ // 客户端输出完整 URL 便于打印,服务端(尤其是预渲染)的 origin 不可靠,使用根相对路径
228
+ return isServer ? url.pathname + url.search + url.hash : url.toString();
226
229
  };
227
230
  #preload = () => {
228
231
  // 也许是 `getter`
@@ -1 +1 @@
1
- {"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/elements/base/link.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,SAAS,EACT,aAAa,EACb,YAAY,EACZ,MAAM,EACN,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,KAAK,EACL,QAAQ,GACT,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAErE,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;CAcjB,CAAC;AAEF;;GAEG;IAKU,cAAc;;4BAJ1B,YAAY,CAAC,aAAa,CAAC,EAC3B,YAAY,CAAC,MAAM,CAAC,EACpB,MAAM,EAAE,EACR,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;;;sBACU,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAAlB,SAAQ,WAAU;;;;uCAC3C,IAAI;gCAEJ,SAAS;kCACT,SAAS;gCACT,SAAS;iCACT,SAAS;gCACT,SAAS;gCACT,SAAS;mCAET,aAAa;iCAGb,QAAQ;mCAER,QAAQ;wCACR,QAAQ;mCACR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oBAAoB"}
@@ -99,13 +99,14 @@ export declare function createModalClass<T extends Record<string, unknown>>(opti
99
99
  stateList: import("../..").Updater<any>[];
100
100
  };
101
101
  "__#private@#execEffect": () => void;
102
- "__#private@#execMemo": () => void;
103
102
  "__#private@#render": (item?: {
104
103
  render: () => import("../..").TemplateResult | null | undefined;
105
104
  condition?: () => boolean;
106
105
  }) => void;
107
106
  "__#private@#updateCallback": () => void;
107
+ "__#private@#schedule": (task: () => void) => void;
108
108
  "__#private@#update": () => void;
109
+ "__#private@#scheduleUpdate": () => void;
109
110
  "__#private@#prepareStyle": () => (() => void) | undefined;
110
111
  "__#private@#initEffect": () => void;
111
112
  willMount?(): void | Promise<void>;
@@ -116,7 +117,7 @@ export declare function createModalClass<T extends Record<string, unknown>>(opti
116
117
  render?(): import("../..").TemplateResult | null | undefined;
117
118
  "__#private@#compat": () => void;
118
119
  "__#private@#disconnectStore"?: (() => void)[];
119
- "__#private@#connectedCallback": () => Promise<void>;
120
+ "__#private@#connectedCallback": () => void;
120
121
  connectedCallback(): typeof import("../../lib/reactive").UpdateToken;
121
122
  disconnectedCallback(): typeof import("../../lib/reactive").UpdateToken;
122
123
  effect: <K = any[] | undefined>(callback: (depValues: K, oldDepValues?: K | undefined) => any, getDep?: K extends any[] ? () => K : undefined) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"modal-factory.d.ts","sourceRoot":"","sources":["../../src/elements/base/modal-factory.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,QAAA,MAAM,IAAI,eAAsB,CAAC;AAEjC;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAoFkpU;;;S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AAqB,EAAE,6DAA2B,EAAC,8CAA+C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA9E3tgB,WAAW,EAAE;cACf,UAAU,GAAG,IAAI;IAClC;;;OAGG;;;;;;;;;;;;;;;;;;IAMH,YAAY;;IAKZ;;;;OAIG;eACe,CAAC;IAmBnB;;;OAGG;;IAMH;;;OAGG;;IAQH;;OAEG;;EAeN"}
@@ -26,7 +26,7 @@ export interface RouteItem<T = unknown> {
26
26
  pattern: string;
27
27
  redirect?: string;
28
28
  content?: TemplateResult;
29
- getContent?: (params: Params, renderRoot: DocumentFragment | GemLightRouteElement) => TemplateResult | Promise<TemplateResult> | undefined | Promise<undefined>;
29
+ getContent?: (params: Params, renderRoot: DocumentFragment | GemLightRouteElement) => TemplateResult | undefined | Promise<TemplateResult | undefined>;
30
30
  title?: string;
31
31
  data?: T;
32
32
  }
@@ -62,8 +62,13 @@ export declare class GemLightRouteElement extends GemElement {
62
62
  beforeroutechange: Emitter<RouteItem | null>;
63
63
  routechange: Emitter<RouteItem | null>;
64
64
  error: Emitter<any>;
65
- /**自动让滚动容器恢复滚动位置 */
66
- scrollContainer?: HTMLElement | (() => HTMLElement);
65
+ /**
66
+ * 自动让滚动容器恢复滚动位置,导航到新的历史记录时滚动到顶部,
67
+ * 函数返回空值时不处理当前路由,例如只有子路由渲染后才需要滚动
68
+ */
69
+ scrollContainer?: Element | (() => Element | null | undefined);
70
+ /**恢复滚动位置前等待,例如等待异步加载的内容撑开滚动容器 */
71
+ scrollWait?: () => Promise<unknown>;
67
72
  /**默认当有 `hash` 时不进行滚动 */
68
73
  scrollIgnoreHash?: boolean;
69
74
  trigger: RouteTrigger;
@@ -1 +1 @@
1
- {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../src/elements/base/route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAoB,UAAU,EAAQ,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAsBnD,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACrC,OAAO,CAAC,MAAM,CAAC;IAGb,IAAI,UAAU,EAAE,GAAG,CAAC;CACrB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,iBAiBtD;AAED,MAAM,WAAW,SAAS,CAAC,CAAC,GAAG,OAAO;IAKpC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,cAAc,CAAC;IAEzB,UAAU,CAAC,EAAE,CACX,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,gBAAgB,GAAG,oBAAoB,KAChD,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,GAAG,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,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