@mantou/gem 1.7.0 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gem.es.js +402 -543
- package/dist/gem.umd.js +27 -33
- package/elements/base/dialog.d.ts +9 -7
- package/elements/base/dialog.d.ts.map +1 -1
- package/elements/base/dialog.js +12 -3
- package/elements/base/dialog.js.map +1 -1
- package/elements/base/gesture.d.ts +4 -13
- package/elements/base/gesture.d.ts.map +1 -1
- package/elements/base/gesture.js +152 -135
- package/elements/base/gesture.js.map +1 -1
- package/elements/base/link.d.ts +12 -9
- package/elements/base/link.d.ts.map +1 -1
- package/elements/base/link.js +81 -62
- package/elements/base/link.js.map +1 -1
- package/elements/base/modal-factory.d.ts +104 -80
- package/elements/base/modal-factory.d.ts.map +1 -1
- package/elements/base/modal-factory.js +12 -8
- package/elements/base/modal-factory.js.map +1 -1
- package/elements/base/reflect.js.map +1 -1
- package/elements/base/route.d.ts +12 -5
- package/elements/base/route.d.ts.map +1 -1
- package/elements/base/route.js +17 -5
- package/elements/base/route.js.map +1 -1
- package/elements/base/title.d.ts +3 -1
- package/elements/base/title.d.ts.map +1 -1
- package/elements/base/title.js +14 -16
- package/elements/base/title.js.map +1 -1
- package/elements/base/unsafe.js +1 -1
- package/elements/base/unsafe.js.map +1 -1
- package/elements/base/use.d.ts +1 -1
- package/elements/base/use.d.ts.map +1 -1
- package/elements/base/use.js +28 -20
- package/elements/base/use.js.map +1 -1
- package/helper/i18n.d.ts +4 -4
- package/helper/i18n.d.ts.map +1 -1
- package/helper/i18n.js.map +1 -1
- package/helper/mediaquery.d.ts +16 -18
- package/helper/mediaquery.d.ts.map +1 -1
- package/helper/mediaquery.js +42 -41
- package/helper/mediaquery.js.map +1 -1
- package/helper/request.d.ts +1 -1
- package/helper/request.d.ts.map +1 -1
- package/helper/request.js.map +1 -1
- package/helper/ssr-shim.d.ts +2 -0
- package/helper/ssr-shim.d.ts.map +1 -0
- package/helper/ssr-shim.js +29 -0
- package/helper/ssr-shim.js.map +1 -0
- package/helper/theme.d.ts +2 -2
- package/helper/theme.d.ts.map +1 -1
- package/helper/theme.js +20 -24
- package/helper/theme.js.map +1 -1
- package/index.d.ts +0 -10
- package/index.d.ts.map +1 -1
- package/index.js +0 -7
- package/index.js.map +1 -1
- package/lib/decorators.d.ts +4 -4
- package/lib/decorators.d.ts.map +1 -1
- package/lib/decorators.js +1 -2
- package/lib/decorators.js.map +1 -1
- package/lib/element.d.ts +16 -10
- package/lib/element.d.ts.map +1 -1
- package/lib/element.js +57 -79
- package/lib/element.js.map +1 -1
- package/lib/history.d.ts +1 -1
- package/lib/history.d.ts.map +1 -1
- package/lib/history.js +2 -2
- package/lib/history.js.map +1 -1
- package/lib/store.d.ts +2 -2
- package/lib/store.d.ts.map +1 -1
- package/lib/store.js.map +1 -1
- package/lib/utils.d.ts +8 -32
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +6 -21
- package/lib/utils.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -2
- package/src/elements/base/dialog.ts +10 -3
- package/src/elements/base/gesture.ts +52 -46
- package/src/elements/base/link.ts +69 -61
- package/src/elements/base/modal-factory.ts +5 -0
- package/src/elements/base/route.ts +22 -5
- package/src/elements/base/title.ts +8 -11
- package/src/elements/base/unsafe.ts +1 -1
- package/src/elements/base/use.ts +4 -6
- package/src/helper/i18n.ts +3 -3
- package/src/helper/mediaquery.ts +43 -42
- package/src/helper/ssr-shim.ts +29 -0
- package/src/helper/theme.ts +22 -24
- package/src/index.ts +0 -16
- package/src/lib/decorators.ts +1 -2
- package/src/lib/element.ts +56 -71
- package/src/lib/history.ts +2 -1
- package/src/lib/utils.ts +10 -42
- package/src/lib/version.ts +1 -1
- package/src/test/gem-element/decorators.test.ts +6 -6
- package/src/test/history.test.ts +3 -1
- package/src/test/utils.test.ts +8 -1
package/dist/gem.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var sn=(o,E,L)=>{if(!E.has(o))throw TypeError("Cannot "+L)};var f=(o,E,L)=>(sn(o,E,"read from private field"),L?L.call(o):E.get(o)),w=(o,E,L)=>{if(E.has(o))throw TypeError("Cannot add the same private member more than once");E instanceof WeakSet?E.add(o):E.set(o,L)},T=(o,E,L,Q)=>(sn(o,E,"write to private field"),Q?Q.call(o,L):E.set(o,L),L);var St=(o,E,L)=>(sn(o,E,"access private method"),L);(function(o,E){typeof exports=="object"&&typeof module!="undefined"?E(exports):typeof define=="function"&&define.amd?define(["exports"],E):(o=typeof globalThis!="undefined"?globalThis:o||self,E(o.Gem={}))})(this,function(o){var se,ie,oe,Ee,bt,_e,wt,ae,Be,Et,hs,De,qe,Ue,cs,xe,ve,Se,ce,ls,be,Pt,_t,us,vt,ds,le,Fe,Pe,Tt;"use strict";var E=Object.freeze(Object.defineProperty({__proto__:null,get GemElement(){return N},get defineAttribute(){return ot},get defineProperty(){return pe},get defineRef(){return at},get defineCSSState(){return ct},get nativeDefineElement(){return lt},get html(){return V},get svg(){return wn},get render(){return ze},get directive(){return Q},get TemplateResult(){return ke},get SVGTemplateResult(){return Lt},get repeat(){return Nn},get guard(){return On},get ifDefined(){return Vt}},Symbol.toStringTag,{value:"Module"}));/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
4
4
|
* This code may only be used under the BSD style license found at
|
|
@@ -10,7 +10,7 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnProp
|
|
|
10
10
|
* Code distributed by Google as part of the polymer project is also
|
|
11
11
|
* subject to an additional IP rights grant found at
|
|
12
12
|
* http://polymer.github.io/PATENTS.txt
|
|
13
|
-
*/const
|
|
13
|
+
*/const L=new WeakMap,Q=n=>(...e)=>{const t=n(...e);return L.set(t,!0),t},Te=n=>typeof n=="function"&&L.has(n);/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
16
16
|
* This code may only be used under the BSD style license found at
|
|
@@ -22,7 +22,7 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnProp
|
|
|
22
22
|
* Code distributed by Google as part of the polymer project is also
|
|
23
23
|
* subject to an additional IP rights grant found at
|
|
24
24
|
* http://polymer.github.io/PATENTS.txt
|
|
25
|
-
*/const
|
|
25
|
+
*/const rn=typeof window!="undefined"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0,on=(n,e,t=null,s=null)=>{for(;e!==t;){const i=e.nextSibling;n.insertBefore(e,s),e=i}},Ct=(n,e,t=null)=>{for(;e!==t;){const s=e.nextSibling;n.removeChild(e),e=s}};/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
|
28
28
|
* This code may only be used under the BSD style license found at
|
|
@@ -34,7 +34,7 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnProp
|
|
|
34
34
|
* Code distributed by Google as part of the polymer project is also
|
|
35
35
|
* subject to an additional IP rights grant found at
|
|
36
36
|
* http://polymer.github.io/PATENTS.txt
|
|
37
|
-
*/const
|
|
37
|
+
*/const W={},an={};/**
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
40
40
|
* This code may only be used under the BSD style license found at
|
|
@@ -46,7 +46,7 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnProp
|
|
|
46
46
|
* Code distributed by Google as part of the polymer project is also
|
|
47
47
|
* subject to an additional IP rights grant found at
|
|
48
48
|
* http://polymer.github.io/PATENTS.txt
|
|
49
|
-
*/const
|
|
49
|
+
*/const Y=`{{lit-${String(Math.random()).slice(2)}}}`,cn=`<!--${Y}-->`,ln=new RegExp(`${Y}|${cn}`),Ce="$lit$";class fs{constructor(e,t){this.parts=[],this.element=t;const s=[],i=[],r=document.createTreeWalker(t.content,133,null,!1);let a=0,c=-1,l=0;const{strings:h,values:{length:p}}=e;for(;l<p;){const d=r.nextNode();if(d===null){r.currentNode=i.pop();continue}if(c++,d.nodeType===1){if(d.hasAttributes()){const M=d.attributes,{length:g}=M;let y=0;for(let m=0;m<g;m++)hn(M[m].name,Ce)&&y++;for(;y-- >0;){const m=h[l],v=kt.exec(m)[2],P=v.toLowerCase()+Ce,x=d.getAttribute(P);d.removeAttribute(P);const H=x.split(ln);this.parts.push({type:"attribute",index:c,name:v,strings:H}),l+=H.length-1}}d.tagName==="TEMPLATE"&&(i.push(d),r.currentNode=d.content)}else if(d.nodeType===3){const M=d.data;if(M.indexOf(Y)>=0){const g=d.parentNode,y=M.split(ln),m=y.length-1;for(let v=0;v<m;v++){let P,x=y[v];if(x==="")P=B();else{const H=kt.exec(x);H!==null&&hn(H[2],Ce)&&(x=x.slice(0,H.index)+H[1]+H[2].slice(0,-Ce.length)+H[3]),P=document.createTextNode(x)}g.insertBefore(P,d),this.parts.push({type:"node",index:++c})}y[m]===""?(g.insertBefore(B(),d),s.push(d)):d.data=y[m],l+=m}}else if(d.nodeType===8)if(d.data===Y){const M=d.parentNode;(d.previousSibling===null||c===a)&&(c++,M.insertBefore(B(),d)),a=c,this.parts.push({type:"node",index:c}),d.nextSibling===null?d.data="":(s.push(d),c--),l++}else{let M=-1;for(;(M=d.data.indexOf(Y,M+1))!==-1;)this.parts.push({type:"node",index:-1}),l++}}for(const d of s)d.parentNode.removeChild(d)}}const hn=(n,e)=>{const t=n.length-e.length;return t>=0&&n.slice(t)===e},ms=n=>n.index!==-1,B=()=>document.createComment(""),kt=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;/**
|
|
50
50
|
* @license
|
|
51
51
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
52
52
|
* This code may only be used under the BSD style license found at
|
|
@@ -58,7 +58,7 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnProp
|
|
|
58
58
|
* Code distributed by Google as part of the polymer project is also
|
|
59
59
|
* subject to an additional IP rights grant found at
|
|
60
60
|
* http://polymer.github.io/PATENTS.txt
|
|
61
|
-
*/class
|
|
61
|
+
*/class un{constructor(e,t,s){this.__parts=[],this.template=e,this.processor=t,this.options=s}update(e){let t=0;for(const s of this.__parts)s!==void 0&&s.setValue(e[t]),t++;for(const s of this.__parts)s!==void 0&&s.commit()}_clone(){const e=rn?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],s=this.template.parts,i=document.createTreeWalker(e,133,null,!1);let r=0,a=0,c,l=i.nextNode();for(;r<s.length;){if(c=s[r],!ms(c)){this.__parts.push(void 0),r++;continue}for(;a<c.index;)a++,l.nodeName==="TEMPLATE"&&(t.push(l),i.currentNode=l.content),(l=i.nextNode())===null&&(i.currentNode=t.pop(),l=i.nextNode());if(c.type==="node"){const h=this.processor.handleTextExpression(this.options);h.insertAfterNode(l.previousSibling),this.__parts.push(h)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,c.name,c.strings,this.options));r++}return rn&&(document.adoptNode(e),customElements.upgrade(e)),e}}/**
|
|
62
62
|
* @license
|
|
63
63
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
64
64
|
* This code may only be used under the BSD style license found at
|
|
@@ -70,7 +70,7 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnProp
|
|
|
70
70
|
* Code distributed by Google as part of the polymer project is also
|
|
71
71
|
* subject to an additional IP rights grant found at
|
|
72
72
|
* http://polymer.github.io/PATENTS.txt
|
|
73
|
-
*/const
|
|
73
|
+
*/const dn=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:n=>n}),ps=` ${Y} `;class ke{constructor(e,t,s,i){this.strings=e,this.values=t,this.type=s,this.processor=i}getHTML(){const e=this.strings.length-1;let t="",s=!1;for(let i=0;i<e;i++){const r=this.strings[i],a=r.lastIndexOf("<!--");s=(a>-1||s)&&r.indexOf("-->",a+1)===-1;const c=kt.exec(r);c===null?t+=r+(s?ps:cn):t+=r.substr(0,c.index)+c[1]+c[2]+Ce+c[3]+Y}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");let t=this.getHTML();return dn!==void 0&&(t=dn.createHTML(t)),e.innerHTML=t,e}}class Lt extends ke{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const e=super.getTemplateElement(),t=e.content,s=t.firstChild;return t.removeChild(s),on(t,s.firstChild),e}}/**
|
|
74
74
|
* @license
|
|
75
75
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
76
76
|
* This code may only be used under the BSD style license found at
|
|
@@ -82,7 +82,7 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnProp
|
|
|
82
82
|
* Code distributed by Google as part of the polymer project is also
|
|
83
83
|
* subject to an additional IP rights grant found at
|
|
84
84
|
* http://polymer.github.io/PATENTS.txt
|
|
85
|
-
*/const
|
|
85
|
+
*/const $t=n=>n===null||!(typeof n=="object"||typeof n=="function"),Mt=n=>Array.isArray(n)||!!(n&&n[Symbol.iterator]);class fn{constructor(e,t,s){this.dirty=!0,this.element=e,this.name=t,this.strings=s,this.parts=[];for(let i=0;i<s.length-1;i++)this.parts[i]=this._createPart()}_createPart(){return new Nt(this)}_getValue(){const e=this.strings,t=e.length-1,s=this.parts;if(t===1&&e[0]===""&&e[1]===""){const r=s[0].value;if(typeof r=="symbol")return String(r);if(typeof r=="string"||!Mt(r))return r}let i="";for(let r=0;r<t;r++){i+=e[r];const a=s[r];if(a!==void 0){const c=a.value;if($t(c)||!Mt(c))i+=typeof c=="string"?c:String(c);else for(const l of c)i+=typeof l=="string"?l:String(l)}}return i+=e[t],i}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class Nt{constructor(e){this.value=void 0,this.committer=e}setValue(e){e!==W&&(!$t(e)||e!==this.value)&&(this.value=e,Te(e)||(this.committer.dirty=!0))}commit(){for(;Te(this.value);){const e=this.value;this.value=W,e(this)}this.value!==W&&this.committer.commit()}}class he{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(B()),this.endNode=e.appendChild(B())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=B()),e.__insert(this.endNode=B())}insertAfterPart(e){e.__insert(this.startNode=B()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(this.startNode.parentNode===null)return;for(;Te(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=W,t(this)}const e=this.__pendingValue;e!==W&&($t(e)?e!==this.value&&this.__commitText(e):e instanceof ke?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):Mt(e)?this.__commitIterable(e):e===an?(this.value=an,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling;e=e==null?"":e;const s=typeof e=="string"?e:String(e);t===this.endNode.previousSibling&&t.nodeType===3?t.data=s:this.__commitNode(document.createTextNode(s)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof un&&this.value.template===t)this.value.update(e.values);else{const s=new un(t,e.processor,this.options),i=s._clone();s.update(e.values),this.__commitNode(i),this.value=s}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let s=0,i;for(const r of e)i=t[s],i===void 0&&(i=new he(this.options),t.push(i),s===0?i.appendIntoPart(this):i.insertAfterPart(t[s-1])),i.setValue(r),i.commit(),s++;s<t.length&&(t.length=s,this.clear(i&&i.endNode))}clear(e=this.startNode){Ct(this.startNode.parentNode,e.nextSibling,this.endNode)}}class gs{constructor(e,t,s){if(this.value=void 0,this.__pendingValue=void 0,s.length!==2||s[0]!==""||s[1]!=="")throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=s}setValue(e){this.__pendingValue=e}commit(){for(;Te(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=W,t(this)}if(this.__pendingValue===W)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=W}}class ys extends fn{constructor(e,t,s){super(e,t,s),this.single=s.length===2&&s[0]===""&&s[1]===""}_createPart(){return new ws(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class ws extends Nt{}let mn=!1;(()=>{try{const n={get capture(){return mn=!0,!1}};window.addEventListener("test",n,n),window.removeEventListener("test",n,n)}catch{}})();class Es{constructor(e,t,s){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=s,this.__boundHandleEvent=i=>this.handleEvent(i)}setValue(e){this.__pendingValue=e}commit(){for(;Te(this.__pendingValue);){const r=this.__pendingValue;this.__pendingValue=W,r(this)}if(this.__pendingValue===W)return;const e=this.__pendingValue,t=this.value,s=e==null||t!=null&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),i=e!=null&&(t==null||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=_s(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=W}handleEvent(e){typeof this.value=="function"?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const _s=n=>n&&(mn?{capture:n.capture,passive:n.passive,once:n.once}:n.capture);/**
|
|
86
86
|
* @license
|
|
87
87
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
88
88
|
* This code may only be used under the BSD style license found at
|
|
@@ -94,7 +94,7 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnProp
|
|
|
94
94
|
* Code distributed by Google as part of the polymer project is also
|
|
95
95
|
* subject to an additional IP rights grant found at
|
|
96
96
|
* http://polymer.github.io/PATENTS.txt
|
|
97
|
-
*/class
|
|
97
|
+
*/class vs{handleAttributeExpressions(e,t,s,i){const r=t[0];return r==="."?new ys(e,t.slice(1),s).parts:r==="@"?[new Es(e,t.slice(1),i.eventContext)]:r==="?"?[new gs(e,t.slice(1),s)]:new fn(e,t,s).parts}handleTextExpression(e){return new he(e)}}const pn=new vs;/**
|
|
98
98
|
* @license
|
|
99
99
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
100
100
|
* This code may only be used under the BSD style license found at
|
|
@@ -106,7 +106,7 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnProp
|
|
|
106
106
|
* Code distributed by Google as part of the polymer project is also
|
|
107
107
|
* subject to an additional IP rights grant found at
|
|
108
108
|
* http://polymer.github.io/PATENTS.txt
|
|
109
|
-
*/function
|
|
109
|
+
*/function Ss(n){let e=gn.get(n.type);e===void 0&&(e={stringsArray:new WeakMap,keyString:new Map},gn.set(n.type,e));let t=e.stringsArray.get(n.strings);if(t!==void 0)return t;const s=n.strings.join(Y);return t=e.keyString.get(s),t===void 0&&(t=new fs(n,n.getTemplateElement()),e.keyString.set(s,t)),e.stringsArray.set(n.strings,t),t}const gn=new Map;/**
|
|
110
110
|
* @license
|
|
111
111
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
112
112
|
* This code may only be used under the BSD style license found at
|
|
@@ -118,7 +118,7 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnProp
|
|
|
118
118
|
* Code distributed by Google as part of the polymer project is also
|
|
119
119
|
* subject to an additional IP rights grant found at
|
|
120
120
|
* http://polymer.github.io/PATENTS.txt
|
|
121
|
-
*/const
|
|
121
|
+
*/const yn=new WeakMap,ze=(n,e,t)=>{let s=yn.get(e);s===void 0&&(Ct(e,e.firstChild),yn.set(e,s=new he(Object.assign({templateFactory:Ss},t))),s.appendInto(e)),s.setValue(n),s.commit()};/**
|
|
122
122
|
* @license
|
|
123
123
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
124
124
|
* This code may only be used under the BSD style license found at
|
|
@@ -130,8 +130,8 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnProp
|
|
|
130
130
|
* Code distributed by Google as part of the polymer project is also
|
|
131
131
|
* subject to an additional IP rights grant found at
|
|
132
132
|
* http://polymer.github.io/PATENTS.txt
|
|
133
|
-
*/typeof window!="undefined"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const
|
|
134
|
-
)*)}`,"g");function
|
|
133
|
+
*/typeof window!="undefined"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const V=(n,...e)=>new ke(n,e,"html",pn),wn=(n,...e)=>new Lt(n,e,"svg",pn),Le=new Set;function I(n){typeof n=="function"&&(Le.size||globalThis.queueMicrotask(()=>{Le.forEach(e=>e()),Le.clear()}),Le.delete(n),Le.add(n))}const $e=[];function bs(){for(let n=$e.length-1;n>=0;n--)$e[n]();$e.length=0}function Ps(n){$e.length||I(bs),$e.push(n)}function Ot(n="",e=""){const{pathname:t,search:s,hash:i}=new URL(e,location.origin+n);return t+s+i}class En extends EventTarget{constructor(){super(...arguments);w(this,Ee);w(this,se,void 0);w(this,ie,void 0);w(this,oe,void 0);T(this,se,new Map)}get size(){return f(this,se).size}add(t){f(this,oe)||this.dispatchEvent(new CustomEvent("start"));const s=St(this,Ee,bt).call(this,t)||{value:t};s.prev=f(this,oe),s.prev&&(s.prev.next=s),s.next=void 0,T(this,oe,s),f(this,ie)||T(this,ie,s),f(this,se).set(t,s)}delete(t){const s=St(this,Ee,bt).call(this,t);return f(this,ie)||this.dispatchEvent(new CustomEvent("end")),s}get(){const t=f(this,ie);if(!!t)return St(this,Ee,bt).call(this,t.value),t.value}}se=new WeakMap,ie=new WeakMap,oe=new WeakMap,Ee=new WeakSet,bt=function(t){const s=f(this,se).get(t);return s&&(s.prev?s.prev.next=s.next:T(this,ie,s.next),s.next?s.next.prev=s.prev:T(this,oe,s.prev),f(this,se).delete(t)),s};class _n extends WeakMap{get(e){let t=super.get(e);return t||(t={},this.set(e,t)),t}}class Me extends URLSearchParams{constructor(t){super(t);w(this,_e,t=>typeof t=="string"?t:JSON.stringify(t));w(this,wt,t=>{if(!t)return null;try{return JSON.parse(t)}catch{return null}})}concat(t){let s;typeof t=="string"?s=Object.fromEntries(new URLSearchParams(t).entries()):s=t,Object.entries(s).forEach(([i,r])=>{this.append(i,f(this,_e).call(this,r))})}setAny(t,s){if(Array.isArray(s))this.delete(t),s.forEach(i=>this.append(t,f(this,_e).call(this,i)));else{const i=f(this,_e).call(this,s);i?this.set(t,i):this.delete(t)}}getAny(t){return this.getAnyAll(t)[0]}getAnyAll(t){return this.getAll(t).filter(s=>s!=="").map(s=>f(this,wt).call(this,s))}toString(){const t=super.toString();return t?`?${t}`:""}toJSON(){return this.toString()}}_e=new WeakMap,wt=new WeakMap;function Ne(n,...e){return n.reduce((t,s,i)=>{var r;return t+((r=e[i-1])!=null?r:"")+s})}function Ts(n,...e){return Ne(n,...e)}const Rt=Symbol.for("gem@sheetToken");function Cs(n,e=""){const t=new CSSStyleSheet,s={};t.media.mediaText=e;let i="";return typeof n=="string"?i=n:Object.keys(n).forEach(r=>{s[r]=`${r}-${Ke()}`,i+=n[r].styledContent.replace(/&/g,s[r])}),t.replaceSync(i),s[Rt]=t,s}function Ke(n=5,e="0123456789abcdefghijklmnopqrstuvwxyz"){const t=e.length;let s="";for(let i=0;i<n;i++)s+=e[Math.floor(Math.random()*t)];return s}const ks=new RegExp(`&.*{((.|
|
|
134
|
+
)*)}`,"g");function vn(n,e){const t=[];let s=`& {${n.replace(ks,i=>(t.push(i),""))}}`+t.join("");return s=s.replace(/&/g,e==="class"?".&":"#&"),{styledContent:s,type:e}}const Ls={class:(n,...e)=>{const t=Ne(n,...e);return vn(t,"class")},id:(n,...e)=>{const t=Ne(n,...e);return vn(t,"id")},keyframes:(n,...e)=>({styledContent:`@keyframes & {${Ne(n,...e)}}`,type:"keyframes"})};function j(n){return n.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Z(n){return n.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function Je(n){return Object.keys(n).forEach(e=>{const t=e;delete n[t]}),n}class z extends Error{constructor(e){super(e),this.message=`gem: ${this.message}`}}function Sn(n,e){const t=n.length;if(e.length!==t)return!0;for(let s=0;s<t;s++)if(n[s]!==e[s])return!0;return!1}function bn(n,e){const t=new Set(e);return n.filter(s=>t.has(s)?(t.delete(s),!1):!0)}function Qe(n,e,t){let s=e;for(const i in n){const r=t(i,n[i]);s+=r?r+e:""}return s}function $s(n){return Qe(n,";",(e,t)=>t!==void 0?`${j(e)}:${t}`:"")}function Pn(n){return Qe(n," ",(e,t)=>t?e:"")}const Ms=Pn;function Ns(n){return Qe(n,",",(e,t)=>t===!0||e===t?e:t?`${e}:${t}`:"")}const ue=new WeakMap;function K(n){if(ue.has(n))throw new z("argument error");return ue.set(n,new Set),n}function Os(n){return Object.keys(n).forEach(t=>{K(n[t])}),n}function C(n,e){Object.assign(n,e);const t=ue.get(n);t==null||t.forEach(s=>{I(s)})}function de(n,e){const t=ue.get(n);t==null||t.add(e)}function Tn(n,e){const t=ue.get(n);t==null||t.delete(e)}const Cn="1.7.2";var Rs=Object.freeze(Object.defineProperty({__proto__:null,version:Cn},Symbol.toStringTag,{value:"Module"}));/**
|
|
135
135
|
* @license
|
|
136
136
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
137
137
|
* This code may only be used under the BSD style license found at
|
|
@@ -143,7 +143,7 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnProp
|
|
|
143
143
|
* Code distributed by Google as part of the polymer project is also
|
|
144
144
|
* subject to an additional IP rights grant found at
|
|
145
145
|
* http://polymer.github.io/PATENTS.txt
|
|
146
|
-
*/const
|
|
146
|
+
*/const kn=(n,e)=>{const t=n.startNode.parentNode,s=e===void 0?n.endNode:e.startNode,i=t.insertBefore(B(),s);t.insertBefore(B(),s);const r=new he(n.options);return r.insertAfterNode(i),r},re=(n,e)=>(n.setValue(e),n.commit(),n),At=(n,e,t)=>{const s=n.startNode.parentNode,i=t?t.startNode:n.endNode,r=e.endNode.nextSibling;r!==i&&on(s,e.startNode,r,i)},Gt=n=>{Ct(n.startNode.parentNode,n.startNode,n.endNode.nextSibling)},Ln=(n,e,t)=>{const s=new Map;for(let i=e;i<=t;i++)s.set(n[i],i);return s},$n=new WeakMap,Mn=new WeakMap,Nn=Q((n,e,t)=>{let s;return t===void 0?t=e:e!==void 0&&(s=e),i=>{if(!(i instanceof he))throw new Error("repeat can only be used in text bindings");const r=$n.get(i)||[],a=Mn.get(i)||[],c=[],l=[],h=[];let p=0;for(const P of n)h[p]=s?s(P,p):p,l[p]=t(P,p),p++;let d,M,g=0,y=r.length-1,m=0,v=l.length-1;for(;g<=y&&m<=v;)if(r[g]===null)g++;else if(r[y]===null)y--;else if(a[g]===h[m])c[m]=re(r[g],l[m]),g++,m++;else if(a[y]===h[v])c[v]=re(r[y],l[v]),y--,v--;else if(a[g]===h[v])c[v]=re(r[g],l[v]),At(i,r[g],c[v+1]),g++,v--;else if(a[y]===h[m])c[m]=re(r[y],l[m]),At(i,r[y],r[g]),y--,m++;else if(d===void 0&&(d=Ln(h,m,v),M=Ln(a,g,y)),!d.has(a[g]))Gt(r[g]),g++;else if(!d.has(a[y]))Gt(r[y]),y--;else{const P=M.get(h[m]),x=P!==void 0?r[P]:null;if(x===null){const H=kn(i,r[g]);re(H,l[m]),c[m]=H}else c[m]=re(x,l[m]),At(i,x,r[g]),r[P]=null;m++}for(;m<=v;){const P=kn(i,c[v+1]);re(P,l[m]),c[m++]=P}for(;g<=y;){const P=r[g++];P!==null&&Gt(P)}$n.set(i,c),Mn.set(i,h)}});/**
|
|
147
147
|
* @license
|
|
148
148
|
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
|
149
149
|
* This code may only be used under the BSD style license found at
|
|
@@ -155,7 +155,7 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnProp
|
|
|
155
155
|
* Code distributed by Google as part of the polymer project is also
|
|
156
156
|
* subject to an additional IP rights grant found at
|
|
157
157
|
* http://polymer.github.io/PATENTS.txt
|
|
158
|
-
*/const
|
|
158
|
+
*/const Ht=new WeakMap,On=Q((n,e)=>t=>{const s=Ht.get(t);if(Array.isArray(n)){if(Array.isArray(s)&&s.length===n.length&&n.every((i,r)=>i===s[r]))return}else if(s===n&&(n!==void 0||Ht.has(t)))return;t.setValue(e()),Ht.set(t,Array.isArray(n)?Array.from(n):n)});/**
|
|
159
159
|
* @license
|
|
160
160
|
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
|
161
161
|
* This code may only be used under the BSD style license found at
|
|
@@ -167,19 +167,15 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnProp
|
|
|
167
167
|
* Code distributed by Google as part of the polymer project is also
|
|
168
168
|
* subject to an additional IP rights grant found at
|
|
169
169
|
* http://polymer.github.io/PATENTS.txt
|
|
170
|
-
*/const Rt=new WeakMap,At=Z(n=>e=>{const t=Rt.get(e);if(n===void 0&&e instanceof _t){if(t!==void 0||!Rt.has(e)){const s=e.committer.name;e.committer.element.removeAttribute(s)}}else n!==t&&e.setValue(n);Rt.set(e,n)});var Hn=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},u=(n,e,t)=>(Hn(n,e,"read from private field"),t?t.call(n):e.get(n)),P=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},V=(n,e,t,s)=>(Hn(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),ye,Q,Ae,Y,Ge,J,ee,Ke,ze,Gt,Ht,It,Je,Vt,Qe,te,Wt,Ye;function $s(){}function jt(n){typeof n=="function"&&n()}const Ze=new bt,Dt=(n=performance.now())=>{if(performance.now()>n+16)return requestAnimationFrame(Dt);const e=Ze.get();e&&(e(),Dt(n))};Ze.addEventListener("start",()=>H(Dt));const Xe=Symbol("constructor"),et=Symbol("init"),In=Symbol("update");class A extends HTMLElement{constructor({isAsync:e,isLight:t,delegatesFocus:s}={}){super();P(this,ye,void 0),P(this,Q,void 0),P(this,Ae,void 0),P(this,Y,void 0),P(this,Ge,void 0),P(this,J,void 0),P(this,ee,void 0),P(this,Ke,void 0),this.setState=r=>{if(!this.state)throw new K("`state` not initialized");Object.assign(this.state,r),H(u(this,te))},P(this,ze,r=>{r==null||r.forEach(a=>{const{callback:c,getDep:l,values:h,preCallback:m}=a,d=l==null?void 0:l();(!l||!h||Ct(h,d))&&(jt(m),a.preCallback=c(d,h),a.values=d)})}),P(this,Gt,()=>{u(this,ze).call(this,u(this,J))}),P(this,Ht,()=>{u(this,ze).call(this,u(this,ee))}),this.effect=(r,a)=>{u(this,J)||V(this,J,[]);const c={callback:r,getDep:a,values:void 0,initialized:u(this,Y),inConstructor:this[Xe]};u(this,Y)&&(c.values=a==null?void 0:a(),c.preCallback=r(c.values)),u(this,J).push(c)},this.memo=(r,a)=>{u(this,ee)||V(this,ee,[]),u(this,ee).push({callback:r,getDep:a,values:[Symbol()],inConstructor:this[Xe]})},P(this,It,()=>{var r;(r=u(this,J))==null||r.forEach(a=>{const{callback:c,getDep:l,initialized:h}=a;h||(a.values=l==null?void 0:l(),a.preCallback=c(a.values),a.initialized=!0)})}),P(this,Je,()=>{var a,c;u(this,Ht).call(this);const r=o.useNativeCSSStyleSheet?"":N`${(c=(a=this.shadowRoot)==null?void 0:a.adoptedStyleSheets)==null?void 0:c.map(l=>N`
|
|
171
|
-
<style media=${l.media.mediaText}>
|
|
172
|
-
${l.style}
|
|
173
|
-
</style>
|
|
174
|
-
`)}`;if(this.render){const l=this.render();return l&&N`${l}${r}`}return u(this,ye)===this?void 0:N`<slot></slot>${r}`}),P(this,Vt,()=>this.shouldUpdate?this.shouldUpdate():!0),P(this,Qe,()=>{if(u(this,Y)&&u(this,Vt).call(this)){const r=u(this,Je).call(this);r!==void 0&&Ue(r,u(this,ye)),H(u(this,Wt)),H(u(this,Gt))}}),P(this,te,()=>{u(this,Ge)?Ze.add(u(this,Qe)):u(this,Qe).call(this)}),this.update=()=>{H(u(this,te))},P(this,Wt,()=>{var r;(r=this.updated)==null||r.call(this)}),P(this,Ye,()=>{var l,h,m;if(this[Xe]=!1,u(this,Ae)){V(this,Ae,!1);return}(l=this.willMount)==null||l.call(this);const{observedStores:r,rootElement:a}=this.constructor;r==null||r.forEach(d=>{oe(d,u(this,te))});const c=u(this,Je).call(this);if(c!==void 0&&Ue(c,u(this,ye)),V(this,Y,!0),V(this,Ke,(h=this.mounted)==null?void 0:h.call(this)),u(this,It).call(this),a&&((m=this.getRootNode().host)==null?void 0:m.tagName)!==a.toUpperCase())throw new K("not allow current root type")}),this[Xe]=!0,H(()=>this[et]=!1),this[et]=!0,this[In]=()=>{u(this,Y)&&H(u(this,te))},V(this,Ge,e),V(this,ye,t?this:this.attachShadow({mode:"open",delegatesFocus:s}));const{adoptedStyleSheets:i}=new.target;if(i){const r=i.map(a=>a[Fe]||a);this.shadowRoot?this.shadowRoot.adoptedStyleSheets=r:this.effect(()=>{const a=this.getRootNode();if(o.useNativeCSSStyleSheet)return a.adoptedStyleSheets=[...a.adoptedStyleSheets,...r],()=>{a.adoptedStyleSheets=kt(a.adoptedStyleSheets,r)};{const c=a===document?document.body:a;return c._sheets=c._sheets||{},r.forEach(({style:l,media:h})=>{if(c._sheets[l])c._sheets[l].count++;else{const m=document.createElement("style");m.innerHTML=l,m.media=h.mediaText,c.append(m),c._sheets[l]={ele:m,count:1}}}),()=>{r.forEach(({style:l})=>{c._sheets[l].count--,c._sheets[l].count||delete c._sheets[l]})}}},()=>[])}}get internals(){var e,t;if(!u(this,Q)){V(this,Q,this.attachInternals());try{(e=u(this,Q).states)==null||e.add("foo"),(t=u(this,Q).states)==null||t.delete("foo")}catch{Reflect.defineProperty(u(this,Q),"states",{value:new Proxy(u(this,Q).states,{get(s,i){return r=>s[i](`--${r}`)}})})}}return u(this,Q)}attributeChangedCallback(){u(this,Y)&&H(u(this,te))}closestElement(e){const t=typeof e=="function",s=typeof e=="string"&&e.toUpperCase(),i=r=>{const a=r.parentElement||r.getRootNode().host;if(!a)return null;if(t){if(a.constructor===e)return a}else if(a.tagName===s)return a;return i(a)};return i(this)}connectedCallback(){u(this,Ge)?Ze.add(u(this,Ye)):u(this,Ye).call(this)}disconnectedCallback(){var t,s,i,r;if(this.isConnected){V(this,Ae,!0);return}V(this,Y,!1);const{observedStores:e}=this.constructor;e==null||e.forEach(a=>{$t(a,u(this,te))}),jt(u(this,Ke)),(t=this.unmounted)==null||t.call(this),(s=u(this,J))==null||s.forEach(a=>{jt(a.preCallback)}),V(this,J,(i=u(this,J))==null?void 0:i.filter(({inConstructor:a})=>a)),V(this,ee,(r=u(this,ee))==null?void 0:r.filter(({inConstructor:a})=>a))}}ye=new WeakMap,Q=new WeakMap,Ae=new WeakMap,Y=new WeakMap,Ge=new WeakMap,J=new WeakMap,ee=new WeakMap,Ke=new WeakMap,ze=new WeakMap,Gt=new WeakMap,Ht=new WeakMap,It=new WeakMap,Je=new WeakMap,Vt=new WeakMap,Qe=new WeakMap,te=new WeakMap,Wt=new WeakMap,Ye=new WeakMap;const tt=new Pt;function nt(n,e,t){const{booleanAttributes:s,numberAttributes:i}=n.constructor;Object.defineProperty(n,e,{configurable:!0,get(){if(!(et in this))return;const a=this.getAttribute(t);return(s==null?void 0:s.has(t))?a!==null:(i==null?void 0:i.has(t))?Number(a):a||""},set(r){const a=this,c=tt.get(this),l=c[e],h=a.getAttribute(t);if(this[et]&&h!==null&&!l)return;c[e]=!0;const m=s==null?void 0:s.has(t);r==null?a.removeAttribute(t):m?a.toggleAttribute(t,!!r):h!==String(r)&&a.setAttribute(t,String(r))}})}const Vn=Symbol("event handle");function we(n,e,t,s){Object.defineProperty(n,e,{configurable:!0,get(){const i=tt.get(this)[e];return i||!t?i:(this[e]=$s,this[e])},set(i){const r=this,a=tt.get(r);i!==a[e]&&(t?(a[e]=(i==null?void 0:i[Vn])?i:(c,l)=>{const h=new CustomEvent(t,xe(C(C({},l),s),{detail:c}));r.dispatchEvent(h),i(c,l)},a[e][Vn]=!0):(a[e]=i,this[In]()))}})}function st(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){const s=tt.get(this);let i=s[e];if(!i){const r=this,a=r.shadowRoot||r;i={get ref(){return t},get element(){const c=[...a.querySelectorAll("[data-gem-reflect]")].map(l=>l.target);for(const l of[a,...c]){const h=l.querySelector(`[ref=${t}]`);if(h)return h}}},s[e]=i}return i}})}function it(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){const s=this,{states:i}=s.internals;return i==null?void 0:i.has(t)},set(s){const i=this,{states:r}=i.internals;s?r==null||r.add(t):r==null||r.delete(t)}})}const rt=customElements.define.bind(customElements);customElements.define=(n,e,t)=>{if(e.prototype instanceof A){const{observedAttributes:s,observedProperties:i,defineEvents:r,defineCSSStates:a,defineRefs:c}=e;s==null||s.forEach(l=>nt(e.prototype,ge(l),l)),i==null||i.forEach(l=>we(e.prototype,l)),r==null||r.forEach(l=>we(e.prototype,ge(l),l)),a==null||a.forEach(l=>it(e.prototype,ge(l),l)),c==null||c.forEach(l=>st(e.prototype,ge(l),l))}rt(n,e,t)};function q(n,e,t,s=!1){const i=n.constructor,r=i[e];i.hasOwnProperty(e)||Object.defineProperty(i,e,{value:s?new Set(r):r?Array.from(r):[]}),i[e][s?"add":"push"](t)}function Wn(n,e){const t=`${I(e)}-${Ne()}`;q(n,"defineRefs",t),st(n,e,t)}function qt(n,e,t){q(n,"observedAttributes",t),nt(n,e,t)}function k(n,e){qt(n,e,I(e))}function xt(n,e){const t=I(e);q(n,"booleanAttributes",t,!0),qt(n,e,t)}function jn(n,e){const t=I(e);q(n,"numberAttributes",t,!0),qt(n,e,t)}function x(n,e){q(n,"observedProperties",e),we(n,e)}function He(n,e){const t=I(e);q(n,"defineCSSStates",t),it(n,e,t)}function Dn(n,e){const t=I(n[e]||e);n[e]=t,q(n instanceof A?n:n.prototype,"defineSlots",t)}function Ut(n,e){const t=I(n[e]||e);n[e]=t,q(n instanceof A?n:n.prototype,"defineParts",t)}function Ie(n,e){xn(n,e)}function qn(n,e){xn(n,e,{bubbles:!0,composed:!0})}function xn(n,e,t){const s=I(e);q(n,"defineEvents",s),we(n,e,s,t)}function Un(n){return function(e){q(e.prototype,"adoptedStyleSheets",n)}}function ce(n){return function(e){q(e.prototype,"observedStores",n)}}function Bn(n){return function(e){const t=e;t.rootElement=n}}function Fn(n){return function(e){rt(n,e)}}const W=window.history,Kn=W.pushState.bind(W),zn=W.replaceState.bind(W);let Ms=0;const Bt=()=>`${performance.now()}-${++Ms}`,_=z({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),O=new Map;function Jn(n){const{$key:e,$hasCloseHandle:t,$hasOpenHandle:s,$hasShouldCloseHandle:i}=n||{};if(_.$key!==e){if(e)throw new K("`$key` is not allowed");if(t)throw new K("`$hasCloseHandle` is not allowed");if(s)throw new K("`$hasOpenHandle` is not allowed");if(i)throw new K("`$hasShouldCloseHandle` is not allowed")}}function Qn(n){return U.basePath?U.basePath+n:n}function Yn(n){return n===U.basePath?"/":n.replace(new RegExp(`^${U.basePath}/`),"/")}function ot(n){const e=O.get(_.$key)||{},t=n.path?Be(e.path,n.path):Yn(location.pathname),s=new me(n.query||(n.path?"":location.search)),i=n.path&&n.path!==e.path||n.query&&String(n.query)!==String(e.query),r=n.title||(i?"":document.title),a=n.close||n.data||n.open||n.shouldClose,c=n.hash||(!i&&a?decodeURIComponent(location.hash):"");return xe(C({},n),{title:r,path:t,query:s,hash:c})}function Zn(n,e){Jn(n.data);const t=ot(n),{title:s,path:i,query:r,hash:a,close:c,open:l,shouldClose:h,data:m}=t,d=C({$hasCloseHandle:!!c,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!h,$key:Bt()},m);O.set(d.$key,t),T(Oe(_),d);const $=Qn(i)+new me(r)+a,w=decodeURIComponent(location.hash);e(d,s,$),w!==a&&window.dispatchEvent(new CustomEvent("hashchange"))}function Xn(n,e,t,s){Jn(n);const i=C({$key:Bt()},n||{}),{pathname:r,search:a,hash:c}=new URL(t,location.origin+location.pathname),l=ot({path:r,query:new me(a),hash:c,title:e,data:n});O.set(i.$key,l),T(Oe(_),i);const h=Qn(r)+l.query+c,m=location.hash;s(i,e,h),m!==c&&window.dispatchEvent(new CustomEvent("hashchange"))}const Ft=z({basePath:""});class Ns{get store(){return _}get basePath(){return Ft.basePath}set basePath(e){T(Ft,{basePath:e}),Object.assign(O.get(_.$key),{path:Yn(location.pathname)})}getParams(){return O.get(_.$key)}updateParams(e){Object.assign(O.get(_.$key),e),T(_,{})}push(e){Zn(e,Kn)}replace(e){Zn(e,zn)}pushIgnoreCloseHandle(e){var t,s;_.$hasCloseHandle?((s=(t=O.get(_.$key))==null?void 0:t.close)==null||s.call(t),this.replace(e)):this.push(e)}forward(){W.forward()}back(){W.back()}}const U=new Ns,Ve=z({title:""}),Os={history:U,titleStore:Ve,basePathStore:Ft};if(!window._GEMHISTORY){if(window._GEMHISTORY=Os,W.pushState=function(e,t,s){Xn(e,t,s,Kn)},W.replaceState=function(e,t,s){Xn(e,t,s,zn)},window.addEventListener("hashchange",({isTrusted:e})=>{e&&U.replace({hash:decodeURIComponent(location.hash)})}),W.state)if(W.state.$hasCloseHandle){T(_,W.state);const e=ot({title:document.title});O.set(_.$key,e),U.back()}else{const e=ot({title:document.title,hash:location.hash});T(_,C({$key:Bt()},W.state||{})),O.set(_.$key,e)}else{const{pathname:e,search:t,hash:s}=location;U.replace({path:e,query:t,hash:s})}oe(Ve,()=>{const e=O.get(_.$key);e&&(e.title=Ve.title)}),oe(_,()=>{const{title:e}=U.getParams();e!==Ve.title&&T(Ve,{title:e})});let n=!1;window.addEventListener("popstate",e=>{var r,a;const t=e.state;if(!(t==null?void 0:t.$key))return;if(n){n=!1;return}if(!O.has(t.$key)){const{pathname:c,search:l,hash:h}=location;O.set(t.$key,{path:c,query:new me(l),hash:h,title:document.title,data:t})}const s=_;if(parseFloat(t.$key)>parseFloat(s.$key)&&t.$hasOpenHandle)(a=(r=O.get(t.$key))==null?void 0:r.open)==null||a.call(r);else if(s.$hasCloseHandle){const c=O.get(s.$key),l=c==null?void 0:c.close,h=c==null?void 0:c.shouldClose;if(h&&!h()){n=!0,U.forward();return}else l?l():t.$hasCloseHandle&&(n=!0,U.back())}T(Oe(_),t)})}const{history:E,titleStore:le,basePathStore:Kt}=window._GEMHISTORY;var Rs=Object.defineProperty,As=Object.getOwnPropertyDescriptor,ne=(n,e,t,s)=>{for(var i=s>1?void 0:s?As(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Rs(e,t,i),i},es=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},We=(n,e,t)=>(es(n,e,"read from private field"),t?t.call(n):e.get(n)),zt=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},ts=(n,e,t,s)=>(es(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),je,at,ct;class Gs extends RegExp{constructor(e){const t={};let s=0;super(`^${e.replace(/:([^/$]+)/g,(i,r)=>(t[r]=s++,"([^/]+)")).replace("*",".*")}$`,"i");this.namePosition=t}}function Jt(n,e){const t=new Gs(n),s=e.match(t)||`${e}/`.match(t);if(!s)return null;const i={};return s&&Object.keys(t.namePosition).forEach(r=>{i[r]=s[t.namePosition[r]+1]}),i}function Qt(n,e){let t=n.pattern;const s=e==null?void 0:e.params;return s&&Object.keys(s).forEach(i=>{t=t.replace(new RegExp(`:${i}`,"g"),s[i])}),t}function ns(n,e){const t=Qt(n,e);return C({path:t},e)}o.GemRouteElement=class extends A{constructor({isLight:n,routes:e}={}){super({isLight:n});this.currentParams={},zt(this,je,void 0),this.state={content:void 0},zt(this,at,()=>{if(this.locationStore){const{path:t,query:s,data:i}=E.getParams();T(this.locationStore,{path:t,params:this.currentParams,query:s,data:i})}}),zt(this,ct,(t,s,i)=>{ts(this,je,void 0),this.currentRoute=t,this.currentParams=s;const r=()=>(this.setState({content:i}),this.routechange(this.currentRoute),We(this,at).call(this),Promise.resolve());this.transition&&"startViewTransition"in document?document.startViewTransition(r):r()}),this.routes=e}mounted(){this.effect(([n,e],t)=>{if(t&&n===t[0]&&e===t[1]){We(this,at).call(this);return}const{route:s,params:i={}}=o.GemRouteElement.findRoute(this.routes,e),{redirect:r,content:a,getContent:c}=s||{};if(r){E.replace({path:r});return}const l=s==null?void 0:s.title;l&&T(le,{title:l});const h=a||(c==null?void 0:c(i));if(h instanceof Promise){this.loading(s),ts(this,je,h);const m=()=>We(this,je)===h;h.then(d=>{m()&&We(this,ct).call(this,s,i,d)}).catch(d=>{m()&&this.error(d)});return}We(this,ct).call(this,s,i,h)},()=>{const{path:n}=E.getParams();return[this.key,n,location.search]})}shouldUpdate(){return!this.inert}render(){const{content:n}=this.state;return this.shadowRoot?N`
|
|
170
|
+
*/const Wt=new WeakMap,Vt=Q(n=>e=>{const t=Wt.get(e);if(n===void 0&&e instanceof Nt){if(t!==void 0||!Wt.has(e)){const s=e.committer.name;e.committer.element.removeAttribute(s)}}else n!==t&&e.setValue(n);Wt.set(e,n)});var Rn=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},u=(n,e,t)=>(Rn(n,e,"read from private field"),t?t.call(n):e.get(n)),S=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},A=(n,e,t,s)=>(Rn(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),fe,me,X,Oe,J,Re,F,ee,Ye,Ze,It,jt,Dt,Xe,qt,et,te,Ut,tt;function As(){}function xt(n){typeof n=="function"&&n()}const nt=new En,Bt=(n=performance.now())=>{if(performance.now()>n+16)return requestAnimationFrame(Bt);const e=nt.get();e&&(e(),Bt(n))};nt.addEventListener("start",()=>I(Bt));const st=Symbol("constructor"),it=Symbol("init"),An=Symbol("update"),Ae=class extends HTMLElement{constructor({isAsync:n,isLight:e,delegatesFocus:t,slotAssignment:s}={}){super(),S(this,me,void 0),S(this,X,void 0),S(this,Oe,void 0),S(this,J,void 0),S(this,Re,void 0),S(this,F,void 0),S(this,ee,void 0),S(this,Ye,void 0),this.setState=r=>{if(!this.state)throw new z("`state` not initialized");Object.assign(this.state,r),I(u(this,te))},S(this,Ze,r=>{r==null||r.forEach(a=>{const{callback:c,getDep:l,values:h,preCallback:p}=a,d=l==null?void 0:l();(!l||!h||Sn(h,d))&&(xt(p),a.preCallback=c(d,h),a.values=d)})}),S(this,It,()=>{u(this,Ze).call(this,u(this,F))}),S(this,jt,()=>{u(this,Ze).call(this,u(this,ee))}),this.effect=(r,a)=>{u(this,F)||A(this,F,[]);const c={callback:r,getDep:a,values:void 0,initialized:u(this,J),inConstructor:this[st]};u(this,J)&&(c.values=a==null?void 0:a(),c.preCallback=r(c.values)),u(this,F).push(c)},this.memo=(r,a)=>{u(this,ee)||A(this,ee,[]),u(this,ee).push({callback:r,getDep:a,values:[Symbol()],inConstructor:this[st]})},S(this,Dt,()=>{var r;(r=u(this,F))==null||r.forEach(a=>{const{callback:c,getDep:l,initialized:h}=a;h||(a.values=l==null?void 0:l(),a.preCallback=c(a.values),a.initialized=!0)})}),S(this,Xe,()=>(u(this,jt).call(this),this.render?this.render():u(this,me)===this?void 0:V`<slot></slot>`)),S(this,qt,()=>this.shouldUpdate?this.shouldUpdate():!0),S(this,et,()=>{if(u(this,J)&&u(this,qt).call(this)){const r=u(this,Xe).call(this);r!==void 0&&ze(r,u(this,me)),I(u(this,Ut)),I(u(this,It))}}),S(this,te,()=>{u(this,Re)?nt.add(u(this,et)):u(this,et).call(this)}),this.update=()=>{I(u(this,te))},S(this,Ut,()=>{var r;(r=this.updated)==null||r.call(this)}),S(this,tt,()=>{var l,h,p;if(u(this,Oe)){A(this,Oe,!1);return}Reflect.set(this,st,!1),(l=this.willMount)==null||l.call(this);const{observedStores:r,rootElement:a}=this.constructor;r==null||r.forEach(d=>{de(d,u(this,te))});const c=u(this,Xe).call(this);if(c!==void 0&&ze(c,u(this,me)),A(this,J,!0),A(this,Ye,(h=this.mounted)==null?void 0:h.call(this)),u(this,Dt).call(this),a&&((p=this.getRootNode().host)==null?void 0:p.tagName)!==a.toUpperCase())throw new z("not allow current root type")}),I(()=>Reflect.set(this,it,!1)),Reflect.set(this,st,!0),Reflect.set(this,it,!0),Reflect.set(this,An,()=>{u(this,J)&&I(u(this,te))}),A(this,Re,n),A(this,me,e?this:this.attachShadow({mode:"open",delegatesFocus:t,slotAssignment:s}));const{adoptedStyleSheets:i}=new.target;if(i){const r=i.map(a=>a[Rt]||a);this.shadowRoot?this.shadowRoot.adoptedStyleSheets=r:this.effect(()=>{const a=this.getRootNode();return a.adoptedStyleSheets=[...a.adoptedStyleSheets,...r],()=>{a.adoptedStyleSheets=bn(a.adoptedStyleSheets,r)}},()=>[])}}get internals(){if(!u(this,X)){A(this,X,this.attachInternals());try{u(this,X).states.add("foo"),u(this,X).states.delete("foo")}catch{Reflect.defineProperty(u(this,X),"states",{value:{has:n=>Z(n)in this.dataset,add:n=>this.dataset[Z(n)]="",delete:n=>delete this.dataset[Z(n)]}})}}return u(this,X)}attributeChangedCallback(){return u(this,J)&&I(u(this,te)),u(Ae,fe)}closestElement(n){const e=typeof n=="function",t=typeof n=="string"&&n.toUpperCase(),s=i=>{const r=i.parentElement||i.getRootNode().host;if(!r)return null;if(e){if(r.constructor===n)return r}else if(r.tagName===t)return r;return s(r)};return s(this)}connectedCallback(){return u(this,Re)?nt.add(u(this,tt)):u(this,tt).call(this),u(Ae,fe)}adoptedCallback(){return u(Ae,fe)}disconnectedCallback(){var e,t,s,i;if(this.isConnected){A(this,Oe,!0);return}A(this,J,!1);const{observedStores:n}=this.constructor;return n==null||n.forEach(r=>{Tn(r,u(this,te))}),xt(u(this,Ye)),(e=this.unmounted)==null||e.call(this),(t=u(this,F))==null||t.forEach(r=>{xt(r.preCallback)}),A(this,F,(s=u(this,F))==null?void 0:s.filter(({inConstructor:r})=>r)),A(this,ee,(i=u(this,ee))==null?void 0:i.filter(({inConstructor:r})=>r)),u(Ae,fe)}};let N=Ae;fe=new WeakMap,me=new WeakMap,X=new WeakMap,Oe=new WeakMap,J=new WeakMap,Re=new WeakMap,F=new WeakMap,ee=new WeakMap,Ye=new WeakMap,Ze=new WeakMap,It=new WeakMap,jt=new WeakMap,Dt=new WeakMap,Xe=new WeakMap,qt=new WeakMap,et=new WeakMap,te=new WeakMap,Ut=new WeakMap,tt=new WeakMap,S(N,fe,Symbol());const rt=new _n;function ot(n,e,t){const{booleanAttributes:s,numberAttributes:i}=n.constructor;Object.defineProperty(n,e,{configurable:!0,get(){if(!(it in this))return;const a=this.getAttribute(t);return s!=null&&s.has(t)?a!==null:i!=null&&i.has(t)?Number(a):a||""},set(r){const a=this,c=rt.get(this),l=c[e],h=a.getAttribute(t);if(this[it]&&h!==null&&!l)return;c[e]=!0;const p=s==null?void 0:s.has(t);r==null?a.removeAttribute(t):p?a.toggleAttribute(t,!!r):h!==String(r)&&a.setAttribute(t,String(r))}})}const Gn=Symbol("event handle");function pe(n,e,t,s){Object.defineProperty(n,e,{configurable:!0,get(){const i=rt.get(this)[e];return i||!t?i:(this[e]=As,this[e])},set(i){const r=this,a=rt.get(r);i!==a[e]&&(t?(a[e]=i!=null&&i[Gn]?i:(c,l)=>{const h=new CustomEvent(t,{...l,...s,detail:c});r.dispatchEvent(h),i(c,l)},Reflect.set(a[e],Gn,!0)):(a[e]=i,this[An]()))}})}function at(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){const s=rt.get(this);let i=s[e];if(!i){const r=this,a=r.shadowRoot||r;i={get ref(){return t},get element(){const c=[...a.querySelectorAll("[data-gem-reflect]")].map(l=>l.target);for(const l of[a,...c]){const h=l.querySelector(`[ref=${t}]`);if(h)return h}}},s[e]=i}return i}})}function ct(n,e,t){Object.defineProperty(n,e,{configurable:!0,get(){const s=this,{states:i}=s.internals;return i==null?void 0:i.has(t)},set(s){const i=this,{states:r}=i.internals;s?r==null||r.add(t):r==null||r.delete(t)}})}const lt=customElements.define.bind(customElements);customElements.define=(n,e,t)=>{if(e.prototype instanceof N){const{observedAttributes:s,observedProperties:i,defineEvents:r,defineCSSStates:a,defineRefs:c}=e;s==null||s.forEach(l=>ot(e.prototype,Z(l),l)),i==null||i.forEach(l=>pe(e.prototype,l)),r==null||r.forEach(l=>pe(e.prototype,Z(l),l)),a==null||a.forEach(l=>ct(e.prototype,Z(l),l)),c==null||c.forEach(l=>at(e.prototype,Z(l),l))}lt(n,e,t)},window.__GEM_DEVTOOLS__HOOK__&&Object.assign(window.__GEM_DEVTOOLS__HOOK__,{...E,...Rs});function D(n,e,t,s=!1){const i=n.constructor,r=i[e];i.hasOwnProperty(e)||Object.defineProperty(i,e,{value:s?new Set(r):r?Array.from(r):[]}),i[e][s?"add":"push"](t)}function Gs(n,e){const t=`${j(e)}-${Ke()}`;D(n,"defineRefs",t),at(n,e,t)}function Ft(n,e,t){D(n,"observedAttributes",t),ot(n,e,t)}function $(n,e){Ft(n,e,j(e))}function Hn(n,e){const t=j(e);D(n,"booleanAttributes",t,!0),Ft(n,e,t)}function Hs(n,e){const t=j(e);D(n,"numberAttributes",t,!0),Ft(n,e,t)}function q(n,e){D(n,"observedProperties",e),pe(n,e)}function ht(n,e){const t=j(e);D(n,"defineCSSStates",t),ct(n,e,t)}function Ws(n,e){const t=j(n[e]||e);n[e]=t,D(n instanceof N?n:n.prototype,"defineSlots",t)}function Wn(n,e){const t=j(n[e]||e);n[e]=t,D(n instanceof N?n:n.prototype,"defineParts",t)}function ut(n,e){Vn(n,e)}function Vs(n,e){Vn(n,e,{bubbles:!0,composed:!0})}function Vn(n,e,t){const s=j(e);D(n,"defineEvents",s),pe(n,e,s,t)}function Is(n){return function(e){D(e.prototype,"adoptedStyleSheets",n)}}function ge(n){return function(e){D(e.prototype,"observedStores",n)}}function js(n){return function(e){const t=e;t.rootElement=n}}function Ds(n){return function(e){lt(n,e)}}const G=window.history,In=G.pushState.bind(G),jn=G.replaceState.bind(G);let qs=0;const zt=()=>`${performance.now()}-${++qs}`,b=K({$hasCloseHandle:!1,$hasOpenHandle:!1,$hasShouldCloseHandle:!1,$key:""}),O=new Map;function Dn(n){const{$key:e,$hasCloseHandle:t,$hasOpenHandle:s,$hasShouldCloseHandle:i}=n||{};if(b.$key!==e){if(e)throw new z("`$key` is not allowed");if(t)throw new z("`$hasCloseHandle` is not allowed");if(s)throw new z("`$hasOpenHandle` is not allowed");if(i)throw new z("`$hasShouldCloseHandle` is not allowed")}}function qn(n){return U.basePath?U.basePath+n:n}function Un(n){return n===U.basePath?"/":n.replace(new RegExp(`^${U.basePath}/`),"/")}function dt(n){const e=O.get(b.$key)||{},t=n.path?Ot(e.path,n.path):Un(location.pathname),s=new Me(n.query||(n.path?"":location.search)),i=n.path&&n.path!==e.path||n.query&&String(n.query)!==String(e.query),r=n.title||(i?"":document.title),a=n.close||n.data||n.open||n.shouldClose,c=n.hash||(!i&&a?decodeURIComponent(location.hash):"");return{...n,title:r,path:t,query:s,hash:c}}function xn(n,e){Dn(n.data);const t=dt(n),{title:s,path:i,query:r,hash:a,close:c,open:l,shouldClose:h,data:p}=t,d={$hasCloseHandle:!!c,$hasOpenHandle:!!l,$hasShouldCloseHandle:!!h,$key:zt(),...p};O.set(d.$key,t),C(Je(b),d);const M=qn(i)+new Me(r)+a,g=decodeURIComponent(location.hash);e(d,s,M),g!==a&&window.dispatchEvent(new CustomEvent("hashchange"))}function Bn(n,e,t,s){Dn(n);const i={$key:zt(),...n||{}},{pathname:r,search:a,hash:c}=new URL(t,location.origin+location.pathname),l=dt({path:r,query:new Me(a),hash:c,title:e,data:n});O.set(i.$key,l),C(Je(b),i);const h=qn(r)+l.query+c,p=location.hash;s(i,e,h),p!==c&&window.dispatchEvent(new CustomEvent("hashchange"))}const Kt=K({basePath:""});class Us{get store(){return b}get basePath(){return Kt.basePath}set basePath(e){C(Kt,{basePath:e}),Object.assign(O.get(b.$key),{path:Un(location.pathname)})}getParams(){return O.get(b.$key)}updateParams(e){Object.assign(O.get(b.$key),e),C(b,{})}push(e){xn(e,In)}replace(e){xn(e,jn)}pushIgnoreCloseHandle(e){var t,s;b.$hasCloseHandle?((s=(t=O.get(b.$key))==null?void 0:t.close)==null||s.call(t),this.replace(e)):this.push(e)}forward(){G.forward()}back(){G.back()}}const U=new Us,Ge=K({title:""}),xs={history:U,titleStore:Ge,basePathStore:Kt};if(!window._GEMHISTORY){if(window._GEMHISTORY=xs,G.pushState=function(e,t,s){Bn(e,t,s,In)},G.replaceState=function(e,t,s){Bn(e,t,s,jn)},window.addEventListener("hashchange",({isTrusted:e})=>{e&&U.replace({hash:decodeURIComponent(location.hash)})}),G.state)if(G.state.$hasCloseHandle){C(b,G.state);const e=dt({title:document.title});O.set(b.$key,e),U.back()}else{const e=dt({title:document.title,hash:location.hash});C(b,{$key:zt(),...G.state||{}}),O.set(b.$key,e)}else{const{pathname:e,search:t,hash:s}=location;U.replace({path:e,query:t,hash:s})}de(Ge,()=>{const e=O.get(b.$key);e&&(e.title=Ge.title)}),de(b,()=>{const{title:e}=U.getParams();e!==Ge.title&&C(Ge,{title:e})});let n=!1;window.addEventListener("popstate",e=>{var r,a;const t=e.state;if(!(t!=null&&t.$key))return;if(n){n=!1;return}if(!O.has(t.$key)){const{pathname:c,search:l,hash:h}=location;O.set(t.$key,{path:c,query:new Me(l),hash:h,title:document.title,data:t})}const s=b;if(parseFloat(t.$key)>parseFloat(s.$key)&&t.$hasOpenHandle)(a=(r=O.get(t.$key))==null?void 0:r.open)==null||a.call(r);else if(s.$hasCloseHandle){const c=O.get(s.$key),l=c==null?void 0:c.close,h=c==null?void 0:c.shouldClose;if(h&&!h()){n=!0,U.forward();return}else l?l():t.$hasCloseHandle&&(n=!0,U.back())}C(Je(b),t)})}const{history:_,titleStore:ye,basePathStore:Fn}=window._GEMHISTORY;var Bs=Object.defineProperty,Fs=Object.getOwnPropertyDescriptor,ne=(n,e,t,s)=>{for(var i=s>1?void 0:s?Fs(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Bs(e,t,i),i},zn=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},He=(n,e,t)=>(zn(n,e,"read from private field"),t?t.call(n):e.get(n)),Jt=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},Kn=(n,e,t,s)=>(zn(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),We,ft,mt;class zs extends RegExp{constructor(e){const t={};let s=0;super(`^${e.replace(/:([^/$]+)/g,(i,r)=>(t[r]=s++,"([^/]+)")).replace("*",".*")}$`,"i"),this.namePosition=t}}function Qt(n,e){if(window.URLPattern){const r=new window.URLPattern({pathname:n}),a=r.exec({pathname:e})||r.exec({pathname:`${e}/`});return a?a.pathname.groups:null}const t=new zs(n),s=e.match(t)||`${e}/`.match(t);if(!s)return null;const i={};return s&&Object.keys(t.namePosition).forEach(r=>{i[r]=s[t.namePosition[r]+1]}),i}function Yt(n,e){let t=n.pattern;const s=e==null?void 0:e.params;return s&&Object.keys(s).forEach(i=>{t=t.replace(new RegExp(`:${i}`,"g"),s[i])}),t}function Jn(n,e){return{path:Yt(n,e),...e}}o.GemRouteElement=class extends N{constructor({isLight:n,routes:e}={}){super({isLight:n}),this.currentParams={},Jt(this,We,void 0),this.state={content:void 0},Jt(this,ft,()=>{if(this.locationStore){const{path:t,query:s,data:i}=_.getParams();C(this.locationStore,{path:t,params:this.currentParams,query:s,data:i})}}),Jt(this,mt,(t,s,i)=>{Kn(this,We,void 0),this.currentRoute=t,this.currentParams=s;const r=()=>(this.setState({content:i}),this.routechange(this.currentRoute),He(this,ft).call(this),Promise.resolve());this.transition&&"startViewTransition"in document?document.startViewTransition(r):r()}),this.routes=e}mounted(){this.effect(([n,e],t)=>{if(t&&n===t[0]&&e===t[1]){He(this,ft).call(this);return}const{route:s,params:i={}}=o.GemRouteElement.findRoute(this.routes,e),{redirect:r,content:a,getContent:c}=s||{};if(r){_.replace({path:r});return}const l=s==null?void 0:s.title;l&&C(ye,{title:l});const h=a||(c==null?void 0:c(i));if(h instanceof Promise){this.loading(s),Kn(this,We,h);const p=()=>He(this,We)===h;h.then(d=>{p()&&He(this,mt).call(this,s,i,d)}).catch(d=>{p()&&this.error(d)});return}He(this,mt).call(this,s,i,h)},()=>{const{path:n}=_.getParams();return[this.key,n,location.search]})}shouldUpdate(){return!this.inert}render(){const{content:n}=this.state;return this.shadowRoot?V`
|
|
175
171
|
<style>
|
|
176
|
-
:host,
|
|
172
|
+
:host(:where(:not([hidden]))),
|
|
177
173
|
:not(:defined) {
|
|
178
174
|
display: contents;
|
|
179
175
|
}
|
|
180
176
|
</style>
|
|
181
|
-
${n!=null?n:
|
|
182
|
-
`:
|
|
177
|
+
${n!=null?n:V`<slot></slot>`}
|
|
178
|
+
`:V`${n}`}},We=new WeakMap,ft=new WeakMap,mt=new WeakMap,o.GemRouteElement.createLocationStore=()=>{const{path:n,query:e,data:t}=_.getParams();return K({path:n,query:e,data:t,params:{}})},o.GemRouteElement.findRoute=(n=[],e)=>{let t=null,s;n instanceof Array?s=n:s=Object.values(n);for(const i of s)if(i.pattern==="*")t=i;else{const r=Qt(i.pattern,e);if(r)return{route:i,params:r}}return{route:t}},ne([Hn],o.GemRouteElement.prototype,"transition",2),ne([q],o.GemRouteElement.prototype,"routes",2),ne([q],o.GemRouteElement.prototype,"locationStore",2),ne([q],o.GemRouteElement.prototype,"key",2),ne([ut],o.GemRouteElement.prototype,"routechange",2),ne([ut],o.GemRouteElement.prototype,"loading",2),ne([ut],o.GemRouteElement.prototype,"error",2),o.GemRouteElement=ne([ge(_.store)],o.GemRouteElement);class Qn extends o.GemRouteElement{constructor(e={}){super({...e,isLight:!0})}}var Ks=Object.defineProperty,Js=Object.getOwnPropertyDescriptor,k=(n,e,t,s)=>{for(var i=s>1?void 0:s?Js(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Ks(e,t,i),i};function Yn(n){return!n.startsWith("/")}o.GemLinkElement=(cs=class extends N{constructor(){super();w(this,ae);w(this,Et);w(this,De,void 0);w(this,qe,void 0);w(this,Ue,void 0);T(this,De,async()=>{var r;const e=this.getLocationString();if(!e)return;if(Yn(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}const{path:t,query:s,hash:i}=_.getParams();if(t+s+i!==e)if(await((r=this.prepare)==null?void 0:r.call(this)),this.route)_.pushIgnoreCloseHandle({...Jn(this.route,f(this,ae,Be)),title:this.route.title||this.docTitle});else if(this.href){const{pathname:a,search:c,hash:l}=new URL(e,location.origin);_.pushIgnoreCloseHandle({path:a,query:c,hash:l,title:this.docTitle})}else _.pushIgnoreCloseHandle({path:this.path,query:this.query,hash:this.hash,title:this.docTitle})}),T(this,qe,e=>{e.preventDefault()}),T(this,Ue,()=>{const e=this.getLocationString();return Yn(e)?e:new URL(_.basePath+e,location.origin).toString()}),this.tabIndex=0,this.addEventListener("click",f(this,De))}render(){return V`
|
|
183
179
|
<style>
|
|
184
180
|
:host {
|
|
185
181
|
/* link default style */
|
|
@@ -197,17 +193,15 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnProp
|
|
|
197
193
|
</style>
|
|
198
194
|
<a
|
|
199
195
|
part=${this.link}
|
|
200
|
-
@click=${this
|
|
201
|
-
href=${
|
|
196
|
+
@click=${f(this,qe)}
|
|
197
|
+
href=${Vt(f(this,Et,hs)==="off"?void 0:f(this,Ue).call(this))}
|
|
202
198
|
>
|
|
203
199
|
<slot></slot>
|
|
204
200
|
</a>
|
|
205
|
-
`}},
|
|
201
|
+
`}getLocationString(){var e,t;if(this.route){const s=((e=f(this,ae,Be))==null?void 0:e.query)||"",i=((t=f(this,ae,Be))==null?void 0:t.hash)||"";return Yt(this.route,f(this,ae,Be))+s+i}else{const s=this.href||this.path+this.query+this.hash,{path:i,query:r}=_.getParams();return s.startsWith("#")?`${i}${r}${s}`:s.startsWith("?")?`${i}${s}`:s.startsWith(".")?Ot(i,s):s}}},ae=new WeakSet,Be=function(){return this.routeOptions||this.options},Et=new WeakSet,hs=function(){return this.hint||"on"},De=new WeakMap,qe=new WeakMap,Ue=new WeakMap,cs),k([$],o.GemLinkElement.prototype,"href",2),k([$],o.GemLinkElement.prototype,"target",2),k([$],o.GemLinkElement.prototype,"path",2),k([$],o.GemLinkElement.prototype,"query",2),k([$],o.GemLinkElement.prototype,"hash",2),k([$],o.GemLinkElement.prototype,"docTitle",2),k([$],o.GemLinkElement.prototype,"hint",2),k([q],o.GemLinkElement.prototype,"route",2),k([q],o.GemLinkElement.prototype,"options",2),k([q],o.GemLinkElement.prototype,"routeOptions",2),k([q],o.GemLinkElement.prototype,"prepare",2),k([Wn],o.GemLinkElement.prototype,"link",2),o.GemLinkElement=k([ge(Fn)],o.GemLinkElement),o.GemActiveLinkElement=class extends o.GemLinkElement{constructor(){super(),this.effect(()=>{const{path:n,query:e,hash:t}=_.getParams(),s=this.pattern&&Qt(this.pattern,n);this.active=!!s||n+e+t===this.getLocationString()})}},k([$],o.GemActiveLinkElement.prototype,"pattern",2),k([ht],o.GemActiveLinkElement.prototype,"active",2),o.GemActiveLinkElement=k([ge(_.store)],o.GemActiveLinkElement),customElements.define("gem-link",o.GemLinkElement),customElements.define("gem-active-link",o.GemActiveLinkElement),customElements.define("gem-route",o.GemRouteElement),customElements.define("gem-light-route",Qn);var Qs=Object.defineProperty,Ys=Object.getOwnPropertyDescriptor,Zt=(n,e,t,s)=>{for(var i=s>1?void 0:s?Ys(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Qs(e,t,i),i};o.GemTitleElement=class extends N{constructor(){super(),new MutationObserver(()=>this.update()).observe(this,{childList:!0,characterData:!0,subtree:!0})}static setTitle(n){C(ye,{title:n})}static updateTitle(n=ye.title,e="",t=""){n===o.GemTitleElement.defaultTitle?document.title=o.GemTitleElement.title=n:(o.GemTitleElement.title=n,document.title=e+o.GemTitleElement.title+t)}render(){return o.GemTitleElement.updateTitle(this.textContent||void 0,this.prefix,this.suffix),this.hidden?V``:V`${o.GemTitleElement.title}`}},o.GemTitleElement.title=document.title,o.GemTitleElement.defaultTitle=document.title,o.GemTitleElement.defaultPrefix=`${document.title} | `,o.GemTitleElement.defaultSuffix=` - ${document.title}`,Zt([$],o.GemTitleElement.prototype,"prefix",2),Zt([$],o.GemTitleElement.prototype,"suffix",2),o.GemTitleElement=Zt([ge(ye)],o.GemTitleElement),de(ye,o.GemTitleElement.updateTitle),customElements.define("gem-title",o.GemTitleElement);var Zs=Object.defineProperty,Xs=Object.getOwnPropertyDescriptor,pt=(n,e,t,s)=>{for(var i=s>1?void 0:s?Xs(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Zs(e,t,i),i};const Zn=new Map;class we extends N{constructor(){super(...arguments);w(this,xe,void 0);T(this,xe,()=>{const t=this.element||(this.selector?(this.root||document).querySelector(this.selector):null);if(typeof t=="string"){let s=Zn.get(t);return s||(s=document.createElement("template"),s.innerHTML=t,Zn.set(t,s)),s.content.cloneNode(!0)}else return t instanceof HTMLTemplateElement?t.content.cloneNode(!0):t==null?void 0:t.cloneNode(!0)})}render(){return V`
|
|
206
202
|
<style>
|
|
207
|
-
:host {
|
|
203
|
+
:host(:where(:not([hidden]))) {
|
|
208
204
|
position: relative;
|
|
209
|
-
}
|
|
210
|
-
:host(:not([hidden])) {
|
|
211
205
|
display: inline-flex;
|
|
212
206
|
align-items: center;
|
|
213
207
|
}
|
|
@@ -216,14 +210,14 @@ var li=Object.defineProperty,hi=Object.defineProperties;var ui=Object.getOwnProp
|
|
|
216
210
|
height: 100%;
|
|
217
211
|
}
|
|
218
212
|
</style>
|
|
219
|
-
${this.
|
|
213
|
+
${f(this,xe).call(this)}
|
|
220
214
|
<slot></slot>
|
|
221
|
-
`}}
|
|
215
|
+
`}}xe=new WeakMap,pt([$],we.prototype,"selector",2),pt([q],we.prototype,"root",2),pt([q],we.prototype,"element",2),pt([ht],we.prototype,"active",2),customElements.define("gem-use",we);var ei=Object.defineProperty,ti=Object.getOwnPropertyDescriptor,Xn=(n,e,t,s)=>{for(var i=s>1?void 0:s?ti(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&ei(e,t,i),i};class gt extends N{constructor(){super(),this.effect(()=>{this.shadowRoot&&(this.shadowRoot.innerHTML=`
|
|
222
216
|
<style>
|
|
223
|
-
:host {
|
|
217
|
+
:host(:where(:not([hidden]))) {
|
|
224
218
|
display: contents;
|
|
225
219
|
}
|
|
226
220
|
${this.contentcss}
|
|
227
221
|
</style>
|
|
228
222
|
${this.content}
|
|
229
|
-
`)},()=>[this.content,this.contentcss])}render(){}}os([k],ht.prototype,"content",2),os([k],ht.prototype,"contentcss",2),customElements.define("gem-unsafe",ht);var Us=Object.defineProperty,Bs=Object.getOwnPropertyDescriptor,Fs=(n,e,t,s)=>{for(var i=s>1?void 0:s?Bs(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&Us(e,t,i),i};class Yt extends A{constructor(){super({isLight:!0});this.target=document.head,this.hidden=!0,this.dataset.gemReflect="",this.effect(()=>{const e=[...this.childNodes];return e.forEach(t=>{t instanceof HTMLElement&&(t.dataset.reflect=""),this.target.append(t)}),()=>{e.forEach(t=>t.remove())}},()=>[this.target])}}Fs([x],Yt.prototype,"target",2),customElements.define("gem-reflect",Yt);const ut=Symbol("open mark");function Ks(n){var e;return e=class extends A{constructor(){super();this.label="",this.internals.role="alertdialog",this.internals.ariaModal="true"}static get isOpen(){return this.store[ut]}static get observedStores(){return[E.store,this.store]}static open(t){const s=new this;this.instance=s,this.inertStore=[...document.body.children].filter(r=>!r.inert),this.inertStore.forEach(r=>r.inert=!0),document.body.append(s);const i=()=>T(this.store,C({[ut]:!0},t));setTimeout(()=>{i(),E.push({title:s.label,open:i,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100)}static close(){E.back()}static closeHandle(){var t;this.inertStore.forEach(s=>s.inert=!1),(t=this.instance)==null||t.remove(),T(this.store,C({[ut]:!1},n))}static shouldClose(){return!0}},e.inertStore=[],e.instance=null,e.store=z(C({[ut]:!1},n)),e}var zs=Object.defineProperty,Js=Object.getOwnPropertyDescriptor,Zt=(n,e,t,s)=>{for(var i=s>1?void 0:s?Js(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&zs(e,t,i),i};o.GemDialogBaseElement=(ms=class extends A{constructor(){super();M(this,_e,void 0);M(this,be,void 0);M(this,ue,void 0);this.inert=!0,G(this,ue,[]),this.closeHandle=()=>{var n;this.inert=!0,g(this,ue).forEach(e=>e.inert=!1),g(this,_e)?g(this,_e).before(this):g(this,be)&&((n=g(this,be))==null||n.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1},this.openHandle=()=>{this.hidden=!1,this.inert=!1,G(this,_e,this.nextSibling),G(this,be,this.parentElement||this.getRootNode()),G(this,ue,[...document.body.children].filter(n=>!n.inert)),g(this,ue).forEach(n=>n.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0},this.open=()=>{this.opened||(this.openHandle(),E.push({title:this.label,open:this.openHandle,close:this.closeHandle,shouldClose:this.shouldClose}))},this.close=()=>{E.back()},this.forceClose=()=>{this.opened=!1,setTimeout(this.close,100)},this.internals.role="dialog",this.internals.ariaModal="true"}shouldClose(){return!0}},_e=new WeakMap,be=new WeakMap,ue=new WeakMap,ms),Zt([k],o.GemDialogBaseElement.prototype,"label",2),Zt([He],o.GemDialogBaseElement.prototype,"opened",2),o.GemDialogBaseElement=Zt([ce(E.store)],o.GemDialogBaseElement);const Xt=new WeakMap;function as(n){return Xt.get(n)}const en=new WeakMap;function Qs(n){return en.get(n)}function Ys(n,e){const t=Xt.get(e),s=en.get(e),i=Object.keys(t).reduce((r,a)=>!t[a]||!s[a]?r:r+`${s[a]}:${t[a]};`,"");n.textContent=`:root, :host {${i}}`}function Zs(n){const e=Ne(),t=document.createElement("style"),s=z(n),i={},r={};en.set(i,r),Xt.set(i,s),Object.keys(s).forEach(c=>{r[c]=`--${I(c)}-${e}`,i[c]=`var(${r[c]})`});const a=()=>Ys(t,i);return oe(s,a),a(),(document.head||document.documentElement).append(t),i}function Xs(n,e){const t=as(n);T(t,e)}const ei=/\$\d(?:<[^>]*>)?/,ti=/\$(\d)(<([^>]*)>)?/g,ni=3;function cs(n,...e){const t=n.split(ei),s=[];let i;for(;i=ti.exec(n);){const r=i[ni],a=Number(i[1])-1,c=e[a];s.push(typeof c=="function"?c(r):c)}return N(t,...s)}const De=new Set,tn=class{constructor(e){M(this,Pe);M(this,ft);M(this,mt);M(this,de);M(this,Te);if(this.cachePrefix="gem-i18n",!e.resources[e.fallbackLanguage])throw new K("i18n: fallbackLanguage invalid");this.store=z(this),Object.assign(this,e);let t=g(this,ft,mi)||this.currentLanguage||g(this,mt,pi);const s=document.querySelector(`[type*=${this.cachePrefix}]`);if(s)try{const i=JSON.parse(s.textContent||"");t=i.currentLanguage,this.resources[i.currentLanguage]=i.currentLanguagePack}catch{}t?(G(this,Te,t,on),this.setLanguage(t)):this.resetLanguage()}get(e,...t){const s=this.resources[this.currentLanguage],i=this.resources[this.fallbackLanguage],r=s[e]||i[e],a=(r==null?void 0:r.message)||r||`[${e}]`;return t.length?cs(a,...t):a}detectLanguage(){const e=Object.keys(this.resources),t=navigator.languages.map(s=>s.replace(/-(.*)/,i=>i.toUpperCase()));for(const s of t){const i=e.find(r=>r===s||s.startsWith(`${r}-`));if(i)return i}return this.fallbackLanguage}async setLanguage(e){g(this,de,gt)&&De.forEach(async i=>await i.setLanguage(e));let t;const s=this.resources[e];if(!s)return console.warn(`${this.cachePrefix}: not found \`${e}\``),this.resetLanguage();if(typeof s=="string"){const i=`${this.cachePrefix}:`,r=`${i}${s}`,a=localStorage.getItem(r),c=async()=>{const l=await(await fetch(s)).json();if(this.cache){for(let h=0;h<localStorage.length;h++){const m=localStorage.key(h);m.startsWith(i)&&localStorage.removeItem(m)}localStorage.setItem(r,JSON.stringify(l))}return l};if(a)try{t=JSON.parse(a)}catch{t=await c()}else t=await c()}else t=s;return this.resources[e]=t,T(this.store,{}),e!==this.currentLanguage&&G(this,Te,e,on),this.cache===!0&&this.setCache(),e}resetLanguage(){return g(this,de,gt)&&De.forEach(e=>e.resetLanguage()),G(this,Te,this.fallbackLanguage,on),this.cache&&localStorage.removeItem(g(this,Pe,rn)),this.setLanguage(this.detectLanguage())}setCache(){g(this,de,gt)&&De.forEach(e=>e.setCache()),localStorage.setItem(g(this,Pe,rn),this.currentLanguage)}createSubModule(e,t){const s=new tn({resources:t,cachePrefix:`${this.cachePrefix}-${e}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return De.add(s),s}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};let ls=tn;Pe=new WeakSet,rn=function(){return`${this.cachePrefix}:current`},ft=new WeakSet,mi=function(){const{hostname:e,pathname:t,search:s}=location,i=e.split(".");switch(this.urlParamsType){case"ccTLD":return i.pop();case"gTLD":return i.shift();case"path":return t.split("/")[1];default:const r=this.urlParamsName&&new URLSearchParams(s).get(this.urlParamsName)||"";return r in this.resources?r:""}},mt=new WeakSet,pi=function(){return this.cache&&localStorage.getItem(g(this,Pe,rn))||""},de=new WeakSet,gt=function(){return!De.has(this)},Te=new WeakSet,on=function(e){var t;g(this,de,gt)&&(document.documentElement.lang=e),this.currentLanguage=e,(t=this.onChange)==null||t.call(this,e)};const hs={headers:{"Content-Type":"application/json"}};async function qe(n,e={}){const t=await fetch(n,C(C({},hs),e));if(t.status===0)throw new Error("Request fail");if(t.status>=500)throw new Error(t.statusText);try{const s=await t.json();if(t.status>=400)throw new Error((s==null?void 0:s.message)||t.statusText,{cause:s});return s}catch{throw new Error("Server error")}}const si=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function us(n){return n instanceof FormData||n instanceof Blob||n instanceof si||n instanceof URLSearchParams||n instanceof ReadableStream||n instanceof ArrayBuffer?n:typeof n=="object"?JSON.stringify(n):n}function ds(n,e){const{origin:t,pathname:s,search:i}=new URL(n,location.origin),r=new URLSearchParams(e).toString();return`${t}${s}${i?`${i}&`:r?"?":""}${r}`}function ii(n,e){return qe(ds(n,e),{method:"GET"})}function ri(n,e){return qe(ds(n,e),{method:"DELETE"})}function oi(n,e){return qe(n,{method:"PUT",body:us(e)})}function ai(n,e){return qe(n,{method:"POST",body:us(e)})}const R=n=>window.matchMedia(n).matches,ci={PRINT:"print",get isPrint(){return R(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return R(this.HOVER)},PHONE:"(min-width: 319px) and (max-width: 480px)",get isPhone(){return R(this.PHONE)},LAPTOP:"(min-width: 1023px) and (max-width: 1280px) and (orientation: landscape)",get isLaptop(){return R(this.LAPTOP)},DESKTOP:"(min-width: 1279px) and (orientation: landscape)",get isDesktop(){return R(this.DESKTOP)},WIDTHSCREEN:"(min-width: 1919px) and (orientation: landscape)",get isWidthScreen(){return R(this.WIDTHSCREEN)},PHONE_LANDSCAPE:"(min-width: 479px) and (max-width: 959px) and (orientation: landscape)",get isPhoneLandscape(){return R(this.PHONE_LANDSCAPE)},TABLET:"(min-width: 768px) and (max-width: 1024px)",get isTablet(){return R(this.TABLET)},SMALL_PHONE:"(min-width: 319px) and (max-width: 480px) and (max-height: 640px)",get isSmallPhone(){return R(this.SMALL_PHONE)},WATCH:"(max-width: 319px)",get isWatch(){return R(this.WATCH)},SHORT:"(min-width: 479px) and (max-height: 320px)",get isShort(){return R(this.SHORT)},PWA:"(display-mode: standalone)",get isPWA(){return R(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return R(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return R(this.DATA_REDUCE)}},fs="1.7.0";window.__GEM_DEVTOOLS__HOOK__&&Object.assign(window.__GEM_DEVTOOLS__HOOK__,C({},f)),o.GemElement=A,o.GemError=K,o.GemLightRouteElement=ss,o.GemReflectElement=Yt,o.GemUnsafeElement=ht,o.GemUseElement=Se,o.I18n=ls,o.LinkedList=bt,o.PropProxyMap=Pt,o.QueryString=me,o.SVGTemplateResult=St,o.SheetToken=Fe,o.StoreListenerMap=re,o.TemplateResult=Le,o.absoluteLocation=Be,o.addMicrotask=H,o.addMicrotaskToStack=vn,o.adoptedStyle=Un,o.attribute=k,o.basePathStore=Kt,o.boolattribute=xt,o.camelToKebabCase=I,o.classMap=Lt,o.cleanObject=Oe,o.connect=oe,o.connectStore=ce,o.createCSSSheet=bn,o.createHistoryParams=ns,o.createModalClass=Ks,o.createPath=Qt,o.createStore=z,o.createStoreSet=$n,o.createTheme=Zs,o.css=_n,o.customElement=Fn,o.defaultReqInit=hs,o.defineAttribute=nt,o.defineCSSState=it,o.defineProperty=we,o.defineRef=st,o.del=ri,o.directive=Z,o.disconnect=$t,o.emitter=Ie,o.exportPartsMap=Ln,o.get=ii,o.getThemeProp=Qs,o.getThemeStore=as,o.globalemitter=qn,o.guard=Gn,o.history=E,o.html=N,o.ifDefined=At,o.isArrayChange=Ct,o.kebabToCamelCase=ge,o.matchPath=Jt,o.mediaQuery=ci,o.nativeDefineElement=rt,o.numattribute=jn,o.objectMapToString=Re,o.part=Ut,o.partMap=kn,o.post=ai,o.property=x,o.put=oi,o.randomStr=Ne,o.raw=pe,o.refobject=Wn,o.removeItems=kt,o.render=Ue,o.repeat=An,o.request=qe,o.rootElement=Bn,o.slot=Dn,o.splice=cs,o.state=He,o.styleMap=Cn,o.styled=Tn,o.svg=En,o.titleStore=le,o.updateStore=T,o.updateTheme=Xs,o.version=fs,Object.defineProperty(o,"__esModule",{value:!0}),o[Symbol.toStringTag]="Module"});
|
|
223
|
+
`)},()=>[this.content,this.contentcss])}render(){}}Xn([$],gt.prototype,"content",2),Xn([$],gt.prototype,"contentcss",2),customElements.define("gem-unsafe",gt);var ni=Object.defineProperty,si=Object.getOwnPropertyDescriptor,ii=(n,e,t,s)=>{for(var i=s>1?void 0:s?si(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&ni(e,t,i),i};class Xt extends N{constructor(){super({isLight:!0}),this.target=document.head,this.hidden=!0,this.dataset.gemReflect="",this.effect(()=>{const e=[...this.childNodes];return e.forEach(t=>{t instanceof HTMLElement&&(t.dataset.reflect=""),this.target.append(t)}),()=>{e.forEach(t=>t.remove())}},()=>[this.target])}}ii([q],Xt.prototype,"target",2),customElements.define("gem-reflect",Xt);const yt=Symbol("open mark");function ri(n){var e;const t=Symbol();return e=class extends N{constructor(){super(),this.label="",this.internals.role="alertdialog",this.internals.ariaModal="true"}static get isOpen(){return this.store[yt]}static get observedStores(){return[_.store,this.store]}static open(s){const i=new this;this.instance=i,this.inertStore=[...document.body.children].filter(a=>!a.inert),this.inertStore.forEach(a=>a.inert=!0),document.body.append(i);const r=()=>C(this.store,{[yt]:!0,...s});return setTimeout(()=>{r(),_.push({title:i.label,open:r,close:this.closeHandle.bind(this),shouldClose:this.shouldClose.bind(this)})},100),t}static close(){return _.back(),t}static closeHandle(){var s;return this.inertStore.forEach(i=>i.inert=!1),(s=this.instance)==null||s.remove(),C(this.store,{[yt]:!1,...n}),t}static shouldClose(){return!0}},e.inertStore=[],e.instance=null,e.store=K({[yt]:!1,...n}),e}var oi=Object.defineProperty,ai=Object.getOwnPropertyDescriptor,en=(n,e,t,s)=>{for(var i=s>1?void 0:s?ai(e,t):e,r=n.length-1,a;r>=0;r--)(a=n[r])&&(i=(s?a(e,t,i):a(i))||i);return s&&i&&oi(e,t,i),i};const Ve=Symbol();o.GemDialogBaseElement=(ls=class extends N{constructor(){super();w(this,ve,void 0);w(this,Se,void 0);w(this,ce,void 0);T(this,ce,[]),this.closeHandle=()=>{var e;return this.inert=!0,f(this,ce).forEach(t=>t.inert=!1),f(this,ve)?f(this,ve).before(this):f(this,Se)&&((e=f(this,Se))==null||e.appendChild(this)),this.dispatchEvent(new CustomEvent("close")),this.opened=!1,Ve},this.openHandle=()=>(this.hidden=!1,this.inert=!1,T(this,ve,this.nextSibling),T(this,Se,this.parentElement||this.getRootNode()),T(this,ce,[...document.body.children].filter(e=>!e.inert)),f(this,ce).forEach(e=>e.inert=!0),document.body.append(this),this.dispatchEvent(new CustomEvent("open")),this.opened=!0,Ve),this.open=()=>{if(!this.opened)return this.openHandle(),_.push({title:this.label,open:this.openHandle,close:this.closeHandle,shouldClose:this.shouldClose}),Ve},this.close=()=>(_.back(),Ve),this.forceClose=()=>(this.opened=!1,setTimeout(this.close,100),Ve),this.inert=!0,this.internals.role="dialog",this.internals.ariaModal="true"}shouldClose(){return!0}},ve=new WeakMap,Se=new WeakMap,ce=new WeakMap,ls),en([$],o.GemDialogBaseElement.prototype,"label",2),en([ht],o.GemDialogBaseElement.prototype,"opened",2),o.GemDialogBaseElement=en([ge(_.store)],o.GemDialogBaseElement);const es=new WeakMap;function ts(n){return es.get(n)}const ns=new WeakMap;function ci(n){return ns.get(n)}const ss=new WeakMap;function li(n){const e=Ke(),t=document.createElement("style"),s=K(n),i={},r={};ns.set(i,r),es.set(i,s);const a=()=>Object.keys(s).forEach(h=>{r[h]||(r[h]=`--${j(h)}-${e}`,i[h]=`var(${r[h]})`)});ss.set(i,a),a();const c=()=>`:root, :host {${Object.keys(s).reduce((h,p)=>h+`${r[p]}:${s[p]};`,"")}}`,l=()=>t.textContent=c();return de(s,l),l(),(document.head||document.documentElement).append(t),i}function hi(n,e){C(ts(n),e),ss.get(n)()}const ui=/\$\d(?:<[^>]*>)?/,di=/\$(\d)(<([^>]*)>)?/g,fi=3;function is(n,...e){const t=n.split(ui),s=[];let i;for(;i=di.exec(n);){const r=i[fi],a=Number(i[1])-1,c=e[a];s.push(typeof c=="function"?c(r):c)}return V(t,...s)}const Ie=new Set,nn=class{constructor(e){w(this,be);w(this,_t);w(this,vt);w(this,le);w(this,Pe);if(this.cachePrefix="gem-i18n",!e.resources[e.fallbackLanguage])throw new z("i18n: fallbackLanguage invalid");this.store=K(this),Object.assign(this,e);let t=f(this,_t,us)||this.currentLanguage||f(this,vt,ds);const s=document.querySelector(`[type*=${this.cachePrefix}]`);if(s)try{const i=JSON.parse(s.textContent||"");t=i.currentLanguage,this.resources[i.currentLanguage]=i.currentLanguagePack}catch{}t?(T(this,Pe,t,Tt),this.setLanguage(t)):this.resetLanguage()}get(e,...t){const s=this.resources[this.currentLanguage],i=this.resources[this.fallbackLanguage],r=s[e]||i[e],a=(r==null?void 0:r.message)||r||`[${e}]`;return t.length?is(a,...t):a}detectLanguage(){const e=Object.keys(this.resources),t=navigator.languages.map(s=>s.replace(/-(.*)/,i=>i.toUpperCase()));for(const s of t){const i=e.find(r=>r===s||s.startsWith(`${r}-`));if(i)return i}return this.fallbackLanguage}async setLanguage(e){f(this,le,Fe)&&Ie.forEach(async i=>await i.setLanguage(e));let t;const s=this.resources[e];if(!s)return console.warn(`${this.cachePrefix}: not found \`${e}\``),this.resetLanguage();if(typeof s=="string"){const i=`${this.cachePrefix}:`,r=`${i}${s}`,a=localStorage.getItem(r),c=async()=>{const l=await(await fetch(s)).json();if(this.cache){for(let h=0;h<localStorage.length;h++){const p=localStorage.key(h);p.startsWith(i)&&localStorage.removeItem(p)}localStorage.setItem(r,JSON.stringify(l))}return l};if(a)try{t=JSON.parse(a)}catch{t=await c()}else t=await c()}else t=s;return this.resources[e]=t,C(this.store,{}),e!==this.currentLanguage&&T(this,Pe,e,Tt),this.cache===!0&&this.setCache(),e}resetLanguage(){return f(this,le,Fe)&&Ie.forEach(e=>e.resetLanguage()),T(this,Pe,this.fallbackLanguage,Tt),this.cache&&localStorage.removeItem(f(this,be,Pt)),this.setLanguage(this.detectLanguage())}setCache(){f(this,le,Fe)&&Ie.forEach(e=>e.setCache()),localStorage.setItem(f(this,be,Pt),this.currentLanguage)}createSubModule(e,t){const s=new nn({resources:t,cachePrefix:`${this.cachePrefix}-${e}`,currentLanguage:this.currentLanguage,fallbackLanguage:this.fallbackLanguage,cache:this.cache});return Ie.add(s),s}toJSON(){return{currentLanguage:this.currentLanguage,currentLanguagePack:this.resources[this.currentLanguage]}}};let tn=nn;be=new WeakSet,Pt=function(){return`${this.cachePrefix}:current`},_t=new WeakSet,us=function(){const{hostname:e,pathname:t,search:s}=location,i=e.split(".");switch(this.urlParamsType){case"ccTLD":return i.pop();case"gTLD":return i.shift();case"path":return t.split("/")[1];default:const r=this.urlParamsName&&new URLSearchParams(s).get(this.urlParamsName)||"";return r in this.resources?r:""}},vt=new WeakSet,ds=function(){return this.cache&&localStorage.getItem(f(this,be,Pt))||""},le=new WeakSet,Fe=function(){return!Ie.has(this)},Pe=new WeakSet,Tt=function(e){var t;f(this,le,Fe)&&(document.documentElement.lang=e),this.currentLanguage=e,(t=this.onChange)==null||t.call(this,e)};const rs={headers:{"Content-Type":"application/json"}};async function je(n,e={}){const t=await fetch(n,{...rs,...e});if(t.status===0)throw new Error("Request fail");if(t.status>=500)throw new Error(t.statusText);try{const s=await t.json();if(t.status>=400)throw new Error((s==null?void 0:s.message)||t.statusText,{cause:s});return s}catch{throw new Error("Server error")}}const mi=Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)).constructor;function os(n){return n instanceof FormData||n instanceof Blob||n instanceof mi||n instanceof URLSearchParams||n instanceof ReadableStream||n instanceof ArrayBuffer?n:typeof n=="object"?JSON.stringify(n):n}function as(n,e){const{origin:t,pathname:s,search:i}=new URL(n,location.origin),r=new URLSearchParams(e).toString();return`${t}${s}${i?`${i}&`:r?"?":""}${r}`}function pi(n,e){return je(as(n,e),{method:"GET"})}function gi(n,e){return je(as(n,e),{method:"DELETE"})}function yi(n,e){return je(n,{method:"PUT",body:os(e)})}function wi(n,e){return je(n,{method:"POST",body:os(e)})}const R=n=>window.matchMedia(n).matches,Ei={PRINT:"print",get isPrint(){return R(this.PRINT)},HOVER:"(hover: hover)",get isHover(){return R(this.HOVER)},PWA:"(display-mode: standalone)",get isPWA(){return R(this.PWA)},MOTION_REDUCE:"(prefers-reduced-motion: reduce)",get isMotionReduce(){return R(this.MOTION_REDUCE)},DATA_REDUCE:"(prefers-reduced-data: reduce)",get isDataReduce(){return R(this.DATA_REDUCE)},WATCH:"(width < 320px)",get isWatch(){return R(this.WATCH)},SMALL_PHONE:"(320px <= width <= 480px) and (height <= 640px)",get isSmallPhone(){return R(this.SMALL_PHONE)},PHONE:"(320px <= width <= 480px)",get isPhone(){return R(this.PHONE)},PHONE_LANDSCAPE:"(480px < width < 960px) and (orientation: landscape)",get isPhoneLandscape(){return R(this.PHONE_LANDSCAPE)},SHORT:"(width >= 480px) and (height <= 320px)",get isShort(){return R(this.SHORT)},TABLET:"(480px < width <= 1280px)",get isTablet(){return R(this.TABLET)},DESKTOP:"(width > 1280px) and (orientation: landscape)",get isDesktop(){return R(this.DESKTOP)},WIDTHSCREEN:"(width >= 1920px) and (orientation: landscape)",get isWidthScreen(){return R(this.WIDTHSCREEN)}};o.GemElement=N,o.GemError=z,o.GemLightRouteElement=Qn,o.GemReflectElement=Xt,o.GemUnsafeElement=gt,o.GemUseElement=we,o.I18n=tn,o.LinkedList=En,o.PropProxyMap=_n,o.QueryString=Me,o.SVGTemplateResult=Lt,o.SheetToken=Rt,o.StoreListenerMap=ue,o.TemplateResult=ke,o.absoluteLocation=Ot,o.addMicrotask=I,o.addMicrotaskToStack=Ps,o.adoptedStyle=Is,o.attribute=$,o.basePathStore=Fn,o.boolattribute=Hn,o.camelToKebabCase=j,o.classMap=Pn,o.cleanObject=Je,o.connect=de,o.connectStore=ge,o.createCSSSheet=Cs,o.createHistoryParams=Jn,o.createModalClass=ri,o.createPath=Yt,o.createStore=K,o.createStoreSet=Os,o.createTheme=li,o.css=Ts,o.customElement=Ds,o.defaultReqInit=rs,o.defineAttribute=ot,o.defineCSSState=ct,o.defineProperty=pe,o.defineRef=at,o.del=gi,o.directive=Q,o.disconnect=Tn,o.emitter=ut,o.exportPartsMap=Ns,o.get=pi,o.getThemeProps=ci,o.getThemeStore=ts,o.globalemitter=Vs,o.guard=On,o.history=_,o.html=V,o.ifDefined=Vt,o.isArrayChange=Sn,o.kebabToCamelCase=Z,o.matchPath=Qt,o.mediaQuery=Ei,o.nativeDefineElement=lt,o.numattribute=Hs,o.objectMapToString=Qe,o.part=Wn,o.partMap=Ms,o.post=wi,o.property=q,o.put=yi,o.randomStr=Ke,o.raw=Ne,o.refobject=Gs,o.removeItems=bn,o.render=ze,o.repeat=Nn,o.request=je,o.rootElement=js,o.slot=Ws,o.splice=is,o.state=ht,o.styleMap=$s,o.styled=Ls,o.svg=wn,o.titleStore=ye,o.updateStore=C,o.updateTheme=hi,o.version=Cn,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1,38 +1,40 @@
|
|
|
1
1
|
import { GemElement } from '../../lib/element';
|
|
2
|
+
declare const final: unique symbol;
|
|
2
3
|
/**
|
|
3
4
|
* 在模版中声明的 dialog,使用 `open` 方法 打开;
|
|
4
|
-
* 如果要应用关闭动画,可以在动画执行完后设置 `hidden` 属性;
|
|
5
5
|
* 模拟 top layer:https://github.com/whatwg/html/issues/4633.
|
|
6
6
|
*
|
|
7
7
|
* @attr label
|
|
8
|
+
* @fires open
|
|
9
|
+
* @fires close
|
|
8
10
|
*/
|
|
9
11
|
export declare abstract class GemDialogBaseElement extends GemElement {
|
|
10
12
|
#private;
|
|
11
13
|
label: string;
|
|
12
14
|
opened: boolean;
|
|
13
|
-
inert: boolean;
|
|
14
15
|
constructor();
|
|
15
16
|
/**
|
|
16
17
|
* @final
|
|
17
18
|
* 进入关闭状态
|
|
18
19
|
*/
|
|
19
|
-
closeHandle: () =>
|
|
20
|
+
closeHandle: () => symbol;
|
|
20
21
|
/**
|
|
21
22
|
* @final
|
|
22
23
|
* 进入打开状态
|
|
23
24
|
*/
|
|
24
|
-
openHandle: () =>
|
|
25
|
+
openHandle: () => symbol;
|
|
25
26
|
/**@final */
|
|
26
|
-
open: () =>
|
|
27
|
+
open: () => typeof final | undefined;
|
|
27
28
|
shouldClose(): boolean;
|
|
28
29
|
/**@final */
|
|
29
|
-
close: () =>
|
|
30
|
+
close: () => symbol;
|
|
30
31
|
/**
|
|
31
32
|
* @final
|
|
32
33
|
* 跳过 `shouldClose` 强制关闭
|
|
33
34
|
* 避免 `shouldClose` 中造成无限循环
|
|
34
35
|
* 延时关闭避免同步操作 history
|
|
35
36
|
*/
|
|
36
|
-
forceClose: () =>
|
|
37
|
+
forceClose: () => symbol;
|
|
37
38
|
}
|
|
39
|
+
export {};
|
|
38
40
|
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI/C
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI/C,QAAA,MAAM,KAAK,eAAW,CAAC;AAEvB;;;;;;;GAOG;AACH,8BACsB,oBAAqB,SAAQ,UAAU;;IAChD,KAAK,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;;IAavB;;;OAGG;IACH,WAAW,eAWT;IAEF;;;OAGG;IACH,UAAU,eAWR;IAEF,YAAY;IACZ,IAAI,iCAUF;IAEF,WAAW;IAIX,YAAY;IACZ,KAAK,eAGH;IAEF;;;;;OAKG;IACH,UAAU,eAIR;CACH"}
|
package/elements/base/dialog.js
CHANGED
|
@@ -19,17 +19,18 @@ var _GemDialogBaseElement_nextSibling, _GemDialogBaseElement_parentElement, _Gem
|
|
|
19
19
|
import { GemElement } from '../../lib/element';
|
|
20
20
|
import { attribute, state, connectStore } from '../../lib/decorators';
|
|
21
21
|
import { history } from '../../lib/history';
|
|
22
|
+
const final = Symbol();
|
|
22
23
|
/**
|
|
23
24
|
* 在模版中声明的 dialog,使用 `open` 方法 打开;
|
|
24
|
-
* 如果要应用关闭动画,可以在动画执行完后设置 `hidden` 属性;
|
|
25
25
|
* 模拟 top layer:https://github.com/whatwg/html/issues/4633.
|
|
26
26
|
*
|
|
27
27
|
* @attr label
|
|
28
|
+
* @fires open
|
|
29
|
+
* @fires close
|
|
28
30
|
*/
|
|
29
31
|
let GemDialogBaseElement = class GemDialogBaseElement extends GemElement {
|
|
30
32
|
constructor() {
|
|
31
33
|
super();
|
|
32
|
-
this.inert = true;
|
|
33
34
|
_GemDialogBaseElement_nextSibling.set(this, void 0);
|
|
34
35
|
_GemDialogBaseElement_parentElement.set(this, void 0);
|
|
35
36
|
_GemDialogBaseElement_inertStore.set(this, []);
|
|
@@ -49,6 +50,7 @@ let GemDialogBaseElement = class GemDialogBaseElement extends GemElement {
|
|
|
49
50
|
}
|
|
50
51
|
this.dispatchEvent(new CustomEvent('close'));
|
|
51
52
|
this.opened = false;
|
|
53
|
+
return final;
|
|
52
54
|
};
|
|
53
55
|
/**
|
|
54
56
|
* @final
|
|
@@ -64,6 +66,7 @@ let GemDialogBaseElement = class GemDialogBaseElement extends GemElement {
|
|
|
64
66
|
document.body.append(this);
|
|
65
67
|
this.dispatchEvent(new CustomEvent('open'));
|
|
66
68
|
this.opened = true;
|
|
69
|
+
return final;
|
|
67
70
|
};
|
|
68
71
|
/**@final */
|
|
69
72
|
this.open = () => {
|
|
@@ -76,10 +79,12 @@ let GemDialogBaseElement = class GemDialogBaseElement extends GemElement {
|
|
|
76
79
|
close: this.closeHandle,
|
|
77
80
|
shouldClose: this.shouldClose,
|
|
78
81
|
});
|
|
82
|
+
return final;
|
|
79
83
|
};
|
|
80
84
|
/**@final */
|
|
81
85
|
this.close = () => {
|
|
82
86
|
history.back();
|
|
87
|
+
return final;
|
|
83
88
|
};
|
|
84
89
|
/**
|
|
85
90
|
* @final
|
|
@@ -90,7 +95,9 @@ let GemDialogBaseElement = class GemDialogBaseElement extends GemElement {
|
|
|
90
95
|
this.forceClose = () => {
|
|
91
96
|
this.opened = false;
|
|
92
97
|
setTimeout(this.close, 100);
|
|
98
|
+
return final;
|
|
93
99
|
};
|
|
100
|
+
this.inert = true;
|
|
94
101
|
this.internals.role = 'dialog';
|
|
95
102
|
this.internals.ariaModal = 'true';
|
|
96
103
|
}
|
|
@@ -98,7 +105,9 @@ let GemDialogBaseElement = class GemDialogBaseElement extends GemElement {
|
|
|
98
105
|
return true;
|
|
99
106
|
}
|
|
100
107
|
};
|
|
101
|
-
_GemDialogBaseElement_nextSibling = new WeakMap()
|
|
108
|
+
_GemDialogBaseElement_nextSibling = new WeakMap();
|
|
109
|
+
_GemDialogBaseElement_parentElement = new WeakMap();
|
|
110
|
+
_GemDialogBaseElement_inertStore = new WeakMap();
|
|
102
111
|
__decorate([
|
|
103
112
|
attribute
|
|
104
113
|
], GemDialogBaseElement.prototype, "label", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C
|
|
1
|
+
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/elements/base/dialog.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC;AAEvB;;;;;;;GAOG;AAEI,IAAe,oBAAoB,GAAnC,MAAe,oBAAqB,SAAQ,UAAU;IAQ3D;QACE,KAAK,EAAE,CAAC;QALV,oDAA+B;QAC/B,sDAA4B;QAC5B,2CAA6B,EAAE,EAAC;QAShC;;;WAGG;QACH,gBAAW,GAAG,GAAG,EAAE;;YACjB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,uBAAA,IAAI,wCAAY,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;YACnD,IAAI,uBAAA,IAAI,yCAAa,EAAE,CAAC;gBACtB,uBAAA,IAAI,yCAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACjC,CAAC;iBAAM,IAAI,uBAAA,IAAI,2CAAe,EAAE,CAAC;gBAC/B,MAAA,uBAAA,IAAI,2CAAe,0CAAE,WAAW,CAAC,IAAI,CAAC,CAAC;YACzC,CAAC;YACD,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;YAC7C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,OAAO,KAAK,CAAC;QACf,CAAC,CAAC;QAEF;;;WAGG;QACH,eAAU,GAAG,GAAG,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,uBAAA,IAAI,qCAAgB,IAAI,CAAC,WAAW,MAAA,CAAC;YACrC,uBAAA,IAAI,uCAAkB,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,WAAW,EAAE,MAAA,CAAC;YAC/D,uBAAA,IAAI,oCAAgB,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAA,CAAC;YAC1F,uBAAA,IAAI,wCAAY,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;YAClD,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC3B,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YAC5C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YACnB,OAAO,KAAK,CAAC;QACf,CAAC,CAAC;QAEF,YAAY;QACZ,SAAI,GAAG,GAAG,EAAE;YACV,IAAI,IAAI,CAAC,MAAM;gBAAE,OAAO;YACxB,IAAI,CAAC,UAAU,EAAE,CAAC;YAClB,OAAO,CAAC,IAAI,CAAC;gBACX,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,IAAI,EAAE,IAAI,CAAC,UAAU;gBACrB,KAAK,EAAE,IAAI,CAAC,WAAW;gBACvB,WAAW,EAAE,IAAI,CAAC,WAAW;aAC9B,CAAC,CAAC;YACH,OAAO,KAAK,CAAC;QACf,CAAC,CAAC;QAMF,YAAY;QACZ,UAAK,GAAG,GAAG,EAAE;YACX,OAAO,CAAC,IAAI,EAAE,CAAC;YACf,OAAO,KAAK,CAAC;QACf,CAAC,CAAC;QAEF;;;;;WAKG;QACH,eAAU,GAAG,GAAG,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YAC5B,OAAO,KAAK,CAAC;QACf,CAAC,CAAC;QAxEA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,QAAQ,CAAC;QAC/B,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,MAAM,CAAC;IACpC,CAAC;IAiDD,WAAW;QACT,OAAO,IAAI,CAAC;IACd,CAAC;CAmBF,CAAA;;;;AAlFY;IAAV,SAAS;mDAAe;AAClB;IAAN,KAAK;oDAAiB;AAFH,oBAAoB;IADzC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC;GACN,oBAAoB,CAmFzC"}
|