glass-easel-devtools-agent 0.13.0 → 0.17.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/backend.d.ts +3 -3
- package/dist/index.js +1 -1
- package/package.json +4 -4
- package/src/backend.ts +15 -11
- package/src/index.ts +7 -6
- package/src/mount_point.ts +48 -48
- package/src/overlay.ts +3 -5
- package/src/protocol/dom.ts +0 -1
- package/src/protocol/var.ts +0 -1
- package/.eslintignore +0 -2
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e={794:e=>{var t,n,r,o,i,s=(r=function(e){return null==e?Object.create(null):e},o=function(e){return null==e?"":String(e)},i=function(e,t){return!0===e||(e?e[t]:void 0)},(n={})[""]=((t={})[""]=(e,t,n,s)=>{e.c,e.m,e.r;var a,l,c,u=!0===s,d=e=>{},h=(t,a,c)=>{1===l&&c("div",{},((t,a)=>{(a||u||i(s.highlightRect,"left")||i(s.highlightRect,"top")||i(s.highlightRect,"width")||i(s.highlightRect,"height"))&&e.y(t,"\n position: absolute;\n left: "+o(r(n.highlightRect).left)+"px;\n top: "+o(r(n.highlightRect).top)+"px;\n width: "+o(r(n.highlightRect).width)+"px;\n height: "+o(r(n.highlightRect).height)+"px;\n background: rgba(0, 128, 192, 0.25);\n ")}),d)},p=(e,t,r,o)=>{o(l=n.highlightRect?1:0,h)},f=(t,r,i)=>{1===a&&i("div",{},((t,r)=>{var i=n.selectMoveDetecting;(r||u||s.selectMoveDetecting)&&e.y(t,"\n position: absolute;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n overflow: hidden;\n "+o(i?"transform: translateY(-200vh)":"")+"\n "),r&&e.v(t,"mousemove","nodeSelectMove",!1,!1,!1,!1),r&&e.v(t,"tap","nodeSelectDone",!1,!1,!1,!1)}),p)},v=e=>{},g=(t,a,l)=>{1===c&&l("div",{},((t,a)=>{(a||u||i(s.highlightRect,"left")||i(s.highlightRect,"top")||i(s.highlightRect,"width")||i(s.highlightRect,"height"))&&e.y(t,"\n position: absolute;\n left: "+o(r(n.highlightRect).left)+"px;\n top: "+o(r(n.highlightRect).top)+"px;\n width: "+o(r(n.highlightRect).width)+"px;\n height: "+o(r(n.highlightRect).height)+"px;\n background: rgba(0, 128, 192, 0.25);\n ")}),v)};return{C:(e,t,r,o)=>{o(a=1===n.state?1:0,f),o(c=2===n.state&&n.highlightRect?1:0,g)},B:{}}},Object.assign((function(e){return t[e]}),{_:t})),n);e.exports={groupList:s,content:s[""]}},774:e=>{"use strict";var t={}.hasOwnProperty,n=/[ -,\.\/:-@\[-\^`\{-~]/,r=/[ -,\.\/:-@\[\]\^`\{-~]/,o=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,i=function e(i,s){"single"!=(s=function(e,n){if(!e)return n;var r={};for(var o in n)r[o]=t.call(e,o)?e[o]:n[o];return r}(s,e.options)).quotes&&"double"!=s.quotes&&(s.quotes="single");for(var a="double"==s.quotes?'"':"'",l=s.isIdentifier,c=i.charAt(0),u="",d=0,h=i.length;d<h;){var p=i.charAt(d++),f=p.charCodeAt(),v=void 0;if(f<32||f>126){if(f>=55296&&f<=56319&&d<h){var g=i.charCodeAt(d++);56320==(64512&g)?f=((1023&f)<<10)+(1023&g)+65536:d--}v="\\"+f.toString(16).toUpperCase()+" "}else v=s.escapeEverything?n.test(p)?"\\"+p:"\\"+f.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(p)?"\\"+f.toString(16).toUpperCase()+" ":"\\"==p||!l&&('"'==p&&a==p||"'"==p&&a==p)||l&&r.test(p)?"\\"+p:p;u+=v}return l&&(/^-[-\d]/.test(u)?u="\\-"+u.slice(1):/\d/.test(c)&&(u="\\3"+c+" "+u.slice(1))),u=u.replace(o,(function(e,t,n){return t&&t.length%2?e:(t||"")+n})),!l&&s.wrap?a+u+a:u};i.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1},i.version="3.0.0",e.exports=i},443:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(395))&&r.__esModule?r:{default:r},i=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(438));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}var a=function(e){return new o.default(e)};Object.assign(a,i),delete a.__esModule;var l=a;t.default=l,e.exports=t.default},300:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o,i=w(n(168)),s=w(n(881)),a=w(n(493)),l=w(n(303)),c=w(n(325)),u=w(n(942)),d=w(n(101)),h=w(n(458)),p=C(n(734)),f=w(n(487)),v=w(n(870)),g=w(n(752)),m=w(n(617)),_=C(n(470)),b=C(n(397)),$=C(n(987)),y=n(236);function S(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(S=function(e){return e?n:t})(e)}function C(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=S(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function w(e){return e&&e.__esModule?e:{default:e}}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var N=((r={})[b.space]=!0,r[b.cr]=!0,r[b.feed]=!0,r[b.newline]=!0,r[b.tab]=!0,r),k=Object.assign({},N,((o={})[b.comment]=!0,o));function O(e){return{line:e[_.FIELDS.START_LINE],column:e[_.FIELDS.START_COL]}}function x(e){return{line:e[_.FIELDS.END_LINE],column:e[_.FIELDS.END_COL]}}function P(e,t,n,r){return{start:{line:e,column:t},end:{line:n,column:r}}}function T(e){return P(e[_.FIELDS.START_LINE],e[_.FIELDS.START_COL],e[_.FIELDS.END_LINE],e[_.FIELDS.END_COL])}function I(e,t){if(e)return P(e[_.FIELDS.START_LINE],e[_.FIELDS.START_COL],t[_.FIELDS.END_LINE],t[_.FIELDS.END_COL])}function M(e,t){var n=e[t];if("string"==typeof n)return-1!==n.indexOf("\\")&&((0,y.ensureObject)(e,"raws"),e[t]=(0,y.unesc)(n),void 0===e.raws[t]&&(e.raws[t]=n)),e}function R(e,t){for(var n=-1,r=[];-1!==(n=e.indexOf(t,n+1));)r.push(n);return r}var A=function(){function e(e,t){void 0===t&&(t={}),this.rule=e,this.options=Object.assign({lossy:!1,safe:!1},t),this.position=0,this.css="string"==typeof this.rule?this.rule:this.rule.selector,this.tokens=(0,_.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var n=I(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new i.default({source:n}),this.root.errorGenerator=this._errorGenerator();var r=new s.default({source:{start:{line:1,column:1}},sourceIndex:0});this.root.append(r),this.current=r,this.loop()}var t,n,r=e.prototype;return r._errorGenerator=function(){var e=this;return function(t,n){return"string"==typeof e.rule?new Error(t):e.rule.error(t,n)}},r.attribute=function(){var e=[],t=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[_.FIELDS.TYPE]!==b.closeSquare;)e.push(this.currToken),this.position++;if(this.currToken[_.FIELDS.TYPE]!==b.closeSquare)return this.expected("closing square bracket",this.currToken[_.FIELDS.START_POS]);var n=e.length,r={source:P(t[1],t[2],this.currToken[3],this.currToken[4]),sourceIndex:t[_.FIELDS.START_POS]};if(1===n&&!~[b.word].indexOf(e[0][_.FIELDS.TYPE]))return this.expected("attribute",e[0][_.FIELDS.START_POS]);for(var o=0,i="",s="",a=null,l=!1;o<n;){var c=e[o],u=this.content(c),d=e[o+1];switch(c[_.FIELDS.TYPE]){case b.space:if(l=!0,this.options.lossy)break;if(a){(0,y.ensureObject)(r,"spaces",a);var h=r.spaces[a].after||"";r.spaces[a].after=h+u;var f=(0,y.getProp)(r,"raws","spaces",a,"after")||null;f&&(r.raws.spaces[a].after=f+u)}else i+=u,s+=u;break;case b.asterisk:d[_.FIELDS.TYPE]===b.equals?(r.operator=u,a="operator"):r.namespace&&("namespace"!==a||l)||!d||(i&&((0,y.ensureObject)(r,"spaces","attribute"),r.spaces.attribute.before=i,i=""),s&&((0,y.ensureObject)(r,"raws","spaces","attribute"),r.raws.spaces.attribute.before=i,s=""),r.namespace=(r.namespace||"")+u,(0,y.getProp)(r,"raws","namespace")&&(r.raws.namespace+=u),a="namespace"),l=!1;break;case b.dollar:if("value"===a){var v=(0,y.getProp)(r,"raws","value");r.value+="$",v&&(r.raws.value=v+"$");break}case b.caret:d[_.FIELDS.TYPE]===b.equals&&(r.operator=u,a="operator"),l=!1;break;case b.combinator:if("~"===u&&d[_.FIELDS.TYPE]===b.equals&&(r.operator=u,a="operator"),"|"!==u){l=!1;break}d[_.FIELDS.TYPE]===b.equals?(r.operator=u,a="operator"):r.namespace||r.attribute||(r.namespace=!0),l=!1;break;case b.word:if(d&&"|"===this.content(d)&&e[o+2]&&e[o+2][_.FIELDS.TYPE]!==b.equals&&!r.operator&&!r.namespace)r.namespace=u,a="namespace";else if(!r.attribute||"attribute"===a&&!l)i&&((0,y.ensureObject)(r,"spaces","attribute"),r.spaces.attribute.before=i,i=""),s&&((0,y.ensureObject)(r,"raws","spaces","attribute"),r.raws.spaces.attribute.before=s,s=""),r.attribute=(r.attribute||"")+u,(0,y.getProp)(r,"raws","attribute")&&(r.raws.attribute+=u),a="attribute";else if(!r.value&&""!==r.value||"value"===a&&!l&&!r.quoteMark){var g=(0,y.unesc)(u),m=(0,y.getProp)(r,"raws","value")||"",$=r.value||"";r.value=$+g,r.quoteMark=null,(g!==u||m)&&((0,y.ensureObject)(r,"raws"),r.raws.value=(m||$)+u),a="value"}else{var S="i"===u||"I"===u;!r.value&&""!==r.value||!r.quoteMark&&!l?(r.value||""===r.value)&&(a="value",r.value+=u,r.raws.value&&(r.raws.value+=u)):(r.insensitive=S,S&&"I"!==u||((0,y.ensureObject)(r,"raws"),r.raws.insensitiveFlag=u),a="insensitive",i&&((0,y.ensureObject)(r,"spaces","insensitive"),r.spaces.insensitive.before=i,i=""),s&&((0,y.ensureObject)(r,"raws","spaces","insensitive"),r.raws.spaces.insensitive.before=s,s=""))}l=!1;break;case b.str:if(!r.attribute||!r.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:c[_.FIELDS.START_POS]});var C=(0,p.unescapeValue)(u),w=C.unescaped,E=C.quoteMark;r.value=w,r.quoteMark=E,a="value",(0,y.ensureObject)(r,"raws"),r.raws.value=u,l=!1;break;case b.equals:if(!r.attribute)return this.expected("attribute",c[_.FIELDS.START_POS],u);if(r.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:c[_.FIELDS.START_POS]});r.operator=r.operator?r.operator+u:u,a="operator",l=!1;break;case b.comment:if(a)if(l||d&&d[_.FIELDS.TYPE]===b.space||"insensitive"===a){var N=(0,y.getProp)(r,"spaces",a,"after")||"",k=(0,y.getProp)(r,"raws","spaces",a,"after")||N;(0,y.ensureObject)(r,"raws","spaces",a),r.raws.spaces[a].after=k+u}else{var O=r[a]||"",x=(0,y.getProp)(r,"raws",a)||O;(0,y.ensureObject)(r,"raws"),r.raws[a]=x+u}else s+=u;break;default:return this.error('Unexpected "'+u+'" found.',{index:c[_.FIELDS.START_POS]})}o++}M(r,"attribute"),M(r,"namespace"),this.newNode(new p.default(r)),this.position++},r.parseWhitespaceEquivalentTokens=function(e){e<0&&(e=this.tokens.length);var t=this.position,n=[],r="",o=void 0;do{if(N[this.currToken[_.FIELDS.TYPE]])this.options.lossy||(r+=this.content());else if(this.currToken[_.FIELDS.TYPE]===b.comment){var i={};r&&(i.before=r,r=""),o=new l.default({value:this.content(),source:T(this.currToken),sourceIndex:this.currToken[_.FIELDS.START_POS],spaces:i}),n.push(o)}}while(++this.position<e);if(r)if(o)o.spaces.after=r;else if(!this.options.lossy){var s=this.tokens[t],a=this.tokens[this.position-1];n.push(new d.default({value:"",source:P(s[_.FIELDS.START_LINE],s[_.FIELDS.START_COL],a[_.FIELDS.END_LINE],a[_.FIELDS.END_COL]),sourceIndex:s[_.FIELDS.START_POS],spaces:{before:r,after:""}}))}return n},r.convertWhitespaceNodesToSpace=function(e,t){var n=this;void 0===t&&(t=!1);var r="",o="";return e.forEach((function(e){var i=n.lossySpace(e.spaces.before,t),s=n.lossySpace(e.rawSpaceBefore,t);r+=i+n.lossySpace(e.spaces.after,t&&0===i.length),o+=i+e.value+n.lossySpace(e.rawSpaceAfter,t&&0===s.length)})),o===r&&(o=void 0),{space:r,rawSpace:o}},r.isNamedCombinator=function(e){return void 0===e&&(e=this.position),this.tokens[e+0]&&this.tokens[e+0][_.FIELDS.TYPE]===b.slash&&this.tokens[e+1]&&this.tokens[e+1][_.FIELDS.TYPE]===b.word&&this.tokens[e+2]&&this.tokens[e+2][_.FIELDS.TYPE]===b.slash},r.namedCombinator=function(){if(this.isNamedCombinator()){var e=this.content(this.tokens[this.position+1]),t=(0,y.unesc)(e).toLowerCase(),n={};t!==e&&(n.value="/"+e+"/");var r=new v.default({value:"/"+t+"/",source:P(this.currToken[_.FIELDS.START_LINE],this.currToken[_.FIELDS.START_COL],this.tokens[this.position+2][_.FIELDS.END_LINE],this.tokens[this.position+2][_.FIELDS.END_COL]),sourceIndex:this.currToken[_.FIELDS.START_POS],raws:n});return this.position=this.position+3,r}this.unexpected()},r.combinator=function(){var e=this;if("|"===this.content())return this.namespace();var t=this.locateNextMeaningfulToken(this.position);if(!(t<0||this.tokens[t][_.FIELDS.TYPE]===b.comma||this.tokens[t][_.FIELDS.TYPE]===b.closeParenthesis)){var n,r=this.currToken,o=void 0;if(t>this.position&&(o=this.parseWhitespaceEquivalentTokens(t)),this.isNamedCombinator()?n=this.namedCombinator():this.currToken[_.FIELDS.TYPE]===b.combinator?(n=new v.default({value:this.content(),source:T(this.currToken),sourceIndex:this.currToken[_.FIELDS.START_POS]}),this.position++):N[this.currToken[_.FIELDS.TYPE]]||o||this.unexpected(),n){if(o){var i=this.convertWhitespaceNodesToSpace(o),s=i.space,a=i.rawSpace;n.spaces.before=s,n.rawSpaceBefore=a}}else{var l=this.convertWhitespaceNodesToSpace(o,!0),c=l.space,u=l.rawSpace;u||(u=c);var d={},h={spaces:{}};c.endsWith(" ")&&u.endsWith(" ")?(d.before=c.slice(0,c.length-1),h.spaces.before=u.slice(0,u.length-1)):c.startsWith(" ")&&u.startsWith(" ")?(d.after=c.slice(1),h.spaces.after=u.slice(1)):h.value=u,n=new v.default({value:" ",source:I(r,this.tokens[this.position-1]),sourceIndex:r[_.FIELDS.START_POS],spaces:d,raws:h})}return this.currToken&&this.currToken[_.FIELDS.TYPE]===b.space&&(n.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(n)}var p=this.parseWhitespaceEquivalentTokens(t);if(p.length>0){var f=this.current.last;if(f){var g=this.convertWhitespaceNodesToSpace(p),m=g.space,$=g.rawSpace;void 0!==$&&(f.rawSpaceAfter+=$),f.spaces.after+=m}else p.forEach((function(t){return e.newNode(t)}))}},r.comma=function(){if(this.position===this.tokens.length-1)return this.root.trailingComma=!0,void this.position++;this.current._inferEndPosition();var e=new s.default({source:{start:O(this.tokens[this.position+1])},sourceIndex:this.tokens[this.position+1][_.FIELDS.START_POS]});this.current.parent.append(e),this.current=e,this.position++},r.comment=function(){var e=this.currToken;this.newNode(new l.default({value:this.content(),source:T(e),sourceIndex:e[_.FIELDS.START_POS]})),this.position++},r.error=function(e,t){throw this.root.error(e,t)},r.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[_.FIELDS.START_POS]})},r.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[_.FIELDS.START_POS])},r.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[_.FIELDS.START_POS])},r.unexpected=function(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[_.FIELDS.START_POS])},r.unexpectedPipe=function(){return this.error("Unexpected '|'.",this.currToken[_.FIELDS.START_POS])},r.namespace=function(){var e=this.prevToken&&this.content(this.prevToken)||!0;return this.nextToken[_.FIELDS.TYPE]===b.word?(this.position++,this.word(e)):this.nextToken[_.FIELDS.TYPE]===b.asterisk?(this.position++,this.universal(e)):void this.unexpectedPipe()},r.nesting=function(){if(this.nextToken&&"|"===this.content(this.nextToken))this.position++;else{var e=this.currToken;this.newNode(new g.default({value:this.content(),source:T(e),sourceIndex:e[_.FIELDS.START_POS]})),this.position++}},r.parentheses=function(){var e=this.current.last,t=1;if(this.position++,e&&e.type===$.PSEUDO){var n=new s.default({source:{start:O(this.tokens[this.position])},sourceIndex:this.tokens[this.position][_.FIELDS.START_POS]}),r=this.current;for(e.append(n),this.current=n;this.position<this.tokens.length&&t;)this.currToken[_.FIELDS.TYPE]===b.openParenthesis&&t++,this.currToken[_.FIELDS.TYPE]===b.closeParenthesis&&t--,t?this.parse():(this.current.source.end=x(this.currToken),this.current.parent.source.end=x(this.currToken),this.position++);this.current=r}else{for(var o,i=this.currToken,a="(";this.position<this.tokens.length&&t;)this.currToken[_.FIELDS.TYPE]===b.openParenthesis&&t++,this.currToken[_.FIELDS.TYPE]===b.closeParenthesis&&t--,o=this.currToken,a+=this.parseParenthesisToken(this.currToken),this.position++;e?e.appendToPropertyAndEscape("value",a,a):this.newNode(new d.default({value:a,source:P(i[_.FIELDS.START_LINE],i[_.FIELDS.START_COL],o[_.FIELDS.END_LINE],o[_.FIELDS.END_COL]),sourceIndex:i[_.FIELDS.START_POS]}))}if(t)return this.expected("closing parenthesis",this.currToken[_.FIELDS.START_POS])},r.pseudo=function(){for(var e=this,t="",n=this.currToken;this.currToken&&this.currToken[_.FIELDS.TYPE]===b.colon;)t+=this.content(),this.position++;return this.currToken?this.currToken[_.FIELDS.TYPE]!==b.word?this.expected(["pseudo-class","pseudo-element"],this.currToken[_.FIELDS.START_POS]):void this.splitWord(!1,(function(r,o){t+=r,e.newNode(new h.default({value:t,source:I(n,e.currToken),sourceIndex:n[_.FIELDS.START_POS]})),o>1&&e.nextToken&&e.nextToken[_.FIELDS.TYPE]===b.openParenthesis&&e.error("Misplaced parenthesis.",{index:e.nextToken[_.FIELDS.START_POS]})})):this.expected(["pseudo-class","pseudo-element"],this.position-1)},r.space=function(){var e=this.content();0===this.position||this.prevToken[_.FIELDS.TYPE]===b.comma||this.prevToken[_.FIELDS.TYPE]===b.openParenthesis||this.current.nodes.every((function(e){return"comment"===e.type}))?(this.spaces=this.optionalSpace(e),this.position++):this.position===this.tokens.length-1||this.nextToken[_.FIELDS.TYPE]===b.comma||this.nextToken[_.FIELDS.TYPE]===b.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(e),this.position++):this.combinator()},r.string=function(){var e=this.currToken;this.newNode(new d.default({value:this.content(),source:T(e),sourceIndex:e[_.FIELDS.START_POS]})),this.position++},r.universal=function(e){var t=this.nextToken;if(t&&"|"===this.content(t))return this.position++,this.namespace();var n=this.currToken;this.newNode(new f.default({value:this.content(),source:T(n),sourceIndex:n[_.FIELDS.START_POS]}),e),this.position++},r.splitWord=function(e,t){for(var n=this,r=this.nextToken,o=this.content();r&&~[b.dollar,b.caret,b.equals,b.word].indexOf(r[_.FIELDS.TYPE]);){this.position++;var i=this.content();if(o+=i,i.lastIndexOf("\\")===i.length-1){var s=this.nextToken;s&&s[_.FIELDS.TYPE]===b.space&&(o+=this.requiredSpace(this.content(s)),this.position++)}r=this.nextToken}var l=R(o,".").filter((function(e){var t="\\"===o[e-1],n=/^\d+\.\d+%$/.test(o);return!t&&!n})),d=R(o,"#").filter((function(e){return"\\"!==o[e-1]})),h=R(o,"#{");h.length&&(d=d.filter((function(e){return!~h.indexOf(e)})));var p=(0,m.default)(function(){var e=Array.prototype.concat.apply([],arguments);return e.filter((function(t,n){return n===e.indexOf(t)}))}([0].concat(l,d)));p.forEach((function(r,i){var s,h=p[i+1]||o.length,f=o.slice(r,h);if(0===i&&t)return t.call(n,f,p.length);var v=n.currToken,g=v[_.FIELDS.START_POS]+p[i],m=P(v[1],v[2]+r,v[3],v[2]+(h-1));if(~l.indexOf(r)){var b={value:f.slice(1),source:m,sourceIndex:g};s=new a.default(M(b,"value"))}else if(~d.indexOf(r)){var $={value:f.slice(1),source:m,sourceIndex:g};s=new c.default(M($,"value"))}else{var y={value:f,source:m,sourceIndex:g};M(y,"value"),s=new u.default(y)}n.newNode(s,e),e=null})),this.position++},r.word=function(e){var t=this.nextToken;return t&&"|"===this.content(t)?(this.position++,this.namespace()):this.splitWord(e)},r.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},r.parse=function(e){switch(this.currToken[_.FIELDS.TYPE]){case b.space:this.space();break;case b.comment:this.comment();break;case b.openParenthesis:this.parentheses();break;case b.closeParenthesis:e&&this.missingParenthesis();break;case b.openSquare:this.attribute();break;case b.dollar:case b.caret:case b.equals:case b.word:this.word();break;case b.colon:this.pseudo();break;case b.comma:this.comma();break;case b.asterisk:this.universal();break;case b.ampersand:this.nesting();break;case b.slash:case b.combinator:this.combinator();break;case b.str:this.string();break;case b.closeSquare:this.missingSquareBracket();case b.semicolon:this.missingBackslash();default:this.unexpected()}},r.expected=function(e,t,n){if(Array.isArray(e)){var r=e.pop();e=e.join(", ")+" or "+r}var o=/^[aeiou]/.test(e[0])?"an":"a";return n?this.error("Expected "+o+" "+e+', found "'+n+'" instead.',{index:t}):this.error("Expected "+o+" "+e+".",{index:t})},r.requiredSpace=function(e){return this.options.lossy?" ":e},r.optionalSpace=function(e){return this.options.lossy?"":e},r.lossySpace=function(e,t){return this.options.lossy?t?" ":"":e},r.parseParenthesisToken=function(e){var t=this.content(e);return e[_.FIELDS.TYPE]===b.space?this.requiredSpace(t):t},r.newNode=function(e,t){return t&&(/^ +$/.test(t)&&(this.options.lossy||(this.spaces=(this.spaces||"")+t),t=!0),e.namespace=t,M(e,"namespace")),this.spaces&&(e.spaces.before=this.spaces,this.spaces=""),this.current.append(e)},r.content=function(e){return void 0===e&&(e=this.currToken),this.css.slice(e[_.FIELDS.START_POS],e[_.FIELDS.END_POS])},r.locateNextMeaningfulToken=function(e){void 0===e&&(e=this.position+1);for(var t=e;t<this.tokens.length;){if(!k[this.tokens[t][_.FIELDS.TYPE]])return t;t++}return-1},t=e,(n=[{key:"currToken",get:function(){return this.tokens[this.position]}},{key:"nextToken",get:function(){return this.tokens[this.position+1]}},{key:"prevToken",get:function(){return this.tokens[this.position-1]}}])&&E(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=A,e.exports=t.default},395:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(300))&&r.__esModule?r:{default:r},i=function(){function e(e,t){this.func=e||function(){},this.funcRes=null,this.options=t}var t=e.prototype;return t._shouldUpdateSelector=function(e,t){return void 0===t&&(t={}),!1!==Object.assign({},this.options,t).updateSelector&&"string"!=typeof e},t._isLossy=function(e){return void 0===e&&(e={}),!1===Object.assign({},this.options,e).lossless},t._root=function(e,t){return void 0===t&&(t={}),new o.default(e,this._parseOptions(t)).root},t._parseOptions=function(e){return{lossy:this._isLossy(e)}},t._run=function(e,t){var n=this;return void 0===t&&(t={}),new Promise((function(r,o){try{var i=n._root(e,t);Promise.resolve(n.func(i)).then((function(r){var o=void 0;return n._shouldUpdateSelector(e,t)&&(o=i.toString(),e.selector=o),{transform:r,root:i,string:o}})).then(r,o)}catch(e){return void o(e)}}))},t._runSync=function(e,t){void 0===t&&(t={});var n=this._root(e,t),r=this.func(n);if(r&&"function"==typeof r.then)throw new Error("Selector processor returned a promise to a synchronous call.");var o=void 0;return t.updateSelector&&"string"!=typeof e&&(o=n.toString(),e.selector=o),{transform:r,root:n,string:o}},t.ast=function(e,t){return this._run(e,t).then((function(e){return e.root}))},t.astSync=function(e,t){return this._runSync(e,t).root},t.transform=function(e,t){return this._run(e,t).then((function(e){return e.transform}))},t.transformSync=function(e,t){return this._runSync(e,t).transform},t.process=function(e,t){return this._run(e,t).then((function(e){return e.string||e.root.toString()}))},t.processSync=function(e,t){var n=this._runSync(e,t);return n.string||n.root.toString()},e}();t.default=i,e.exports=t.default},734:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0,t.unescapeValue=g;var r,o=l(n(774)),i=l(n(700)),s=l(n(330)),a=n(987);function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}var d=n(568),h=/^('|")([^]*)\1$/,p=d((function(){}),"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),f=d((function(){}),"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),v=d((function(){}),"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function g(e){var t=!1,n=null,r=e,o=r.match(h);return o&&(n=o[1],r=o[2]),(r=(0,i.default)(r))!==e&&(t=!0),{deprecatedUsage:t,unescaped:r,quoteMark:n}}var m=function(e){var t,n;function r(t){var n;return void 0===t&&(t={}),n=e.call(this,function(e){if(void 0!==e.quoteMark)return e;if(void 0===e.value)return e;v();var t=g(e.value),n=t.quoteMark,r=t.unescaped;return e.raws||(e.raws={}),void 0===e.raws.value&&(e.raws.value=e.value),e.value=r,e.quoteMark=n,e}(t))||this,n.type=a.ATTRIBUTE,n.raws=n.raws||{},Object.defineProperty(n.raws,"unquoted",{get:d((function(){return n.value}),"attr.raws.unquoted is deprecated. Call attr.value instead."),set:d((function(){return n.value}),"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")}),n._constructed=!0,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var i,s,l=r.prototype;return l.getQuotedValue=function(e){void 0===e&&(e={});var t=this._determineQuoteMark(e),n=_[t];return(0,o.default)(this._value,n)},l._determineQuoteMark=function(e){return e.smart?this.smartQuoteMark(e):this.preferredQuoteMark(e)},l.setValue=function(e,t){void 0===t&&(t={}),this._value=e,this._quoteMark=this._determineQuoteMark(t),this._syncRawValue()},l.smartQuoteMark=function(e){var t=this.value,n=t.replace(/[^']/g,"").length,i=t.replace(/[^"]/g,"").length;if(n+i===0){var s=(0,o.default)(t,{isIdentifier:!0});if(s===t)return r.NO_QUOTE;var a=this.preferredQuoteMark(e);if(a===r.NO_QUOTE){var l=this.quoteMark||e.quoteMark||r.DOUBLE_QUOTE,c=_[l];if((0,o.default)(t,c).length<s.length)return l}return a}return i===n?this.preferredQuoteMark(e):i<n?r.DOUBLE_QUOTE:r.SINGLE_QUOTE},l.preferredQuoteMark=function(e){var t=e.preferCurrentQuoteMark?this.quoteMark:e.quoteMark;return void 0===t&&(t=e.preferCurrentQuoteMark?e.quoteMark:this.quoteMark),void 0===t&&(t=r.DOUBLE_QUOTE),t},l._syncRawValue=function(){var e=(0,o.default)(this._value,_[this.quoteMark]);e===this._value?this.raws&&delete this.raws.value:this.raws.value=e},l._handleEscapes=function(e,t){if(this._constructed){var n=(0,o.default)(t,{isIdentifier:!0});n!==t?this.raws[e]=n:delete this.raws[e]}},l._spacesFor=function(e){var t=this.spaces[e]||{},n=this.raws.spaces&&this.raws.spaces[e]||{};return Object.assign({before:"",after:""},t,n)},l._stringFor=function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=b);var r=this._spacesFor(t);return n(this.stringifyProperty(e),r)},l.offsetOf=function(e){var t=1,n=this._spacesFor("attribute");if(t+=n.before.length,"namespace"===e||"ns"===e)return this.namespace?t:-1;if("attributeNS"===e)return t;if(t+=this.namespaceString.length,this.namespace&&(t+=1),"attribute"===e)return t;t+=this.stringifyProperty("attribute").length,t+=n.after.length;var r=this._spacesFor("operator");t+=r.before.length;var o=this.stringifyProperty("operator");if("operator"===e)return o?t:-1;t+=o.length,t+=r.after.length;var i=this._spacesFor("value");t+=i.before.length;var s=this.stringifyProperty("value");return"value"===e?s?t:-1:(t+=s.length,t+=i.after.length,t+=this._spacesFor("insensitive").before.length,"insensitive"===e&&this.insensitive?t:-1)},l.toString=function(){var e=this,t=[this.rawSpaceBefore,"["];return t.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||""===this.value)&&(t.push(this._stringFor("operator")),t.push(this._stringFor("value")),t.push(this._stringFor("insensitiveFlag","insensitive",(function(t,n){return!(t.length>0)||e.quoted||0!==n.before.length||e.spaces.value&&e.spaces.value.after||(n.before=" "),b(t,n)})))),t.push("]"),t.push(this.rawSpaceAfter),t.join("")},i=r,(s=[{key:"quoted",get:function(){var e=this.quoteMark;return"'"===e||'"'===e},set:function(e){f()}},{key:"quoteMark",get:function(){return this._quoteMark},set:function(e){this._constructed?this._quoteMark!==e&&(this._quoteMark=e,this._syncRawValue()):this._quoteMark=e}},{key:"qualifiedAttribute",get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function(){return this.insensitive?"i":""}},{key:"value",get:function(){return this._value},set:function(e){if(this._constructed){var t=g(e),n=t.deprecatedUsage,r=t.unescaped,o=t.quoteMark;if(n&&p(),r===this._value&&o===this._quoteMark)return;this._value=r,this._quoteMark=o,this._syncRawValue()}else this._value=e}},{key:"insensitive",get:function(){return this._insensitive},set:function(e){e||(this._insensitive=!1,!this.raws||"I"!==this.raws.insensitiveFlag&&"i"!==this.raws.insensitiveFlag||(this.raws.insensitiveFlag=void 0)),this._insensitive=e}},{key:"attribute",get:function(){return this._attribute},set:function(e){this._handleEscapes("attribute",e),this._attribute=e}}])&&c(i.prototype,s),Object.defineProperty(i,"prototype",{writable:!1}),r}(s.default);t.default=m,m.NO_QUOTE=null,m.SINGLE_QUOTE="'",m.DOUBLE_QUOTE='"';var _=((r={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}}).null={isIdentifier:!0},r);function b(e,t){return""+t.before+e+t.after}},493:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r=a(n(774)),o=n(236),i=a(n(988)),s=n(987);function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}var u=function(e){var t,n,i,a;function u(t){var n;return(n=e.call(this,t)||this).type=s.CLASS,n._constructed=!0,n}return n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),u.prototype.valueToString=function(){return"."+e.prototype.valueToString.call(this)},i=u,(a=[{key:"value",get:function(){return this._value},set:function(e){if(this._constructed){var t=(0,r.default)(e,{isIdentifier:!0});t!==e?((0,o.ensureObject)(this,"raws"),this.raws.value=t):this.raws&&delete this.raws.value}this._value=e}}])&&l(i.prototype,a),Object.defineProperty(i,"prototype",{writable:!1}),u}(i.default);t.default=u,e.exports=t.default},870:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(988))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var a=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.COMBINATOR,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),r}(o.default);t.default=a,e.exports=t.default},303:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(988))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var a=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.COMMENT,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),r}(o.default);t.default=a,e.exports=t.default},205:(e,t,n)=>{"use strict";t.__esModule=!0,t.universal=t.tag=t.string=t.selector=t.root=t.pseudo=t.nesting=t.id=t.comment=t.combinator=t.className=t.attribute=void 0;var r=v(n(734)),o=v(n(493)),i=v(n(870)),s=v(n(303)),a=v(n(325)),l=v(n(752)),c=v(n(458)),u=v(n(168)),d=v(n(881)),h=v(n(101)),p=v(n(942)),f=v(n(487));function v(e){return e&&e.__esModule?e:{default:e}}t.attribute=function(e){return new r.default(e)},t.className=function(e){return new o.default(e)},t.combinator=function(e){return new i.default(e)},t.comment=function(e){return new s.default(e)},t.id=function(e){return new a.default(e)},t.nesting=function(e){return new l.default(e)},t.pseudo=function(e){return new c.default(e)},t.root=function(e){return new u.default(e)},t.selector=function(e){return new d.default(e)},t.string=function(e){return new h.default(e)},t.tag=function(e){return new p.default(e)},t.universal=function(e){return new f.default(e)}},949:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(988))&&r.__esModule?r:{default:r},i=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(987));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}var u=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).nodes||(n.nodes=[]),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var o,s,u=r.prototype;return u.append=function(e){return e.parent=this,this.nodes.push(e),this},u.prepend=function(e){return e.parent=this,this.nodes.unshift(e),this},u.at=function(e){return this.nodes[e]},u.index=function(e){return"number"==typeof e?e:this.nodes.indexOf(e)},u.removeChild=function(e){var t;for(var n in e=this.index(e),this.at(e).parent=void 0,this.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this},u.removeAll=function(){for(var e,t=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.nodes);!(e=t()).done;)e.value.parent=void 0;return this.nodes=[],this},u.empty=function(){return this.removeAll()},u.insertAfter=function(e,t){t.parent=this;var n,r=this.index(e);for(var o in this.nodes.splice(r+1,0,t),t.parent=this,this.indexes)r<=(n=this.indexes[o])&&(this.indexes[o]=n+1);return this},u.insertBefore=function(e,t){t.parent=this;var n,r=this.index(e);for(var o in this.nodes.splice(r,0,t),t.parent=this,this.indexes)(n=this.indexes[o])<=r&&(this.indexes[o]=n+1);return this},u._findChildAtPosition=function(e,t){var n=void 0;return this.each((function(r){if(r.atPosition){var o=r.atPosition(e,t);if(o)return n=o,!1}else if(r.isAtPosition(e,t))return n=r,!1})),n},u.atPosition=function(e,t){return this.isAtPosition(e,t)?this._findChildAtPosition(e,t)||this:void 0},u._inferEndPosition=function(){this.last&&this.last.source&&this.last.source.end&&(this.source=this.source||{},this.source.end=this.source.end||{},Object.assign(this.source.end,this.last.source.end))},u.each=function(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var t=this.lastEach;if(this.indexes[t]=0,this.length){for(var n,r;this.indexes[t]<this.length&&(n=this.indexes[t],!1!==(r=e(this.at(n),n)));)this.indexes[t]+=1;return delete this.indexes[t],!1!==r&&void 0}},u.walk=function(e){return this.each((function(t,n){var r=e(t,n);if(!1!==r&&t.length&&(r=t.walk(e)),!1===r)return!1}))},u.walkAttributes=function(e){var t=this;return this.walk((function(n){if(n.type===i.ATTRIBUTE)return e.call(t,n)}))},u.walkClasses=function(e){var t=this;return this.walk((function(n){if(n.type===i.CLASS)return e.call(t,n)}))},u.walkCombinators=function(e){var t=this;return this.walk((function(n){if(n.type===i.COMBINATOR)return e.call(t,n)}))},u.walkComments=function(e){var t=this;return this.walk((function(n){if(n.type===i.COMMENT)return e.call(t,n)}))},u.walkIds=function(e){var t=this;return this.walk((function(n){if(n.type===i.ID)return e.call(t,n)}))},u.walkNesting=function(e){var t=this;return this.walk((function(n){if(n.type===i.NESTING)return e.call(t,n)}))},u.walkPseudos=function(e){var t=this;return this.walk((function(n){if(n.type===i.PSEUDO)return e.call(t,n)}))},u.walkTags=function(e){var t=this;return this.walk((function(n){if(n.type===i.TAG)return e.call(t,n)}))},u.walkUniversals=function(e){var t=this;return this.walk((function(n){if(n.type===i.UNIVERSAL)return e.call(t,n)}))},u.split=function(e){var t=this,n=[];return this.reduce((function(r,o,i){var s=e.call(t,o);return n.push(o),s?(r.push(n),n=[]):i===t.length-1&&r.push(n),r}),[])},u.map=function(e){return this.nodes.map(e)},u.reduce=function(e,t){return this.nodes.reduce(e,t)},u.every=function(e){return this.nodes.every(e)},u.some=function(e){return this.nodes.some(e)},u.filter=function(e){return this.nodes.filter(e)},u.sort=function(e){return this.nodes.sort(e)},u.toString=function(){return this.map(String).join("")},o=r,(s=[{key:"first",get:function(){return this.at(0)}},{key:"last",get:function(){return this.at(this.length-1)}},{key:"length",get:function(){return this.nodes.length}}])&&l(o.prototype,s),Object.defineProperty(o,"prototype",{writable:!1}),r}(o.default);t.default=u,e.exports=t.default},350:(e,t,n)=>{"use strict";t.__esModule=!0,t.isComment=t.isCombinator=t.isClassName=t.isAttribute=void 0,t.isContainer=function(e){return!(!s(e)||!e.walk)},t.isIdentifier=void 0,t.isNamespace=function(e){return l(e)||_(e)},t.isNesting=void 0,t.isNode=s,t.isPseudo=void 0,t.isPseudoClass=function(e){return f(e)&&!$(e)},t.isPseudoElement=$,t.isUniversal=t.isTag=t.isString=t.isSelector=t.isRoot=void 0;var r,o=n(987),i=((r={})[o.ATTRIBUTE]=!0,r[o.CLASS]=!0,r[o.COMBINATOR]=!0,r[o.COMMENT]=!0,r[o.ID]=!0,r[o.NESTING]=!0,r[o.PSEUDO]=!0,r[o.ROOT]=!0,r[o.SELECTOR]=!0,r[o.STRING]=!0,r[o.TAG]=!0,r[o.UNIVERSAL]=!0,r);function s(e){return"object"==typeof e&&i[e.type]}function a(e,t){return s(t)&&t.type===e}var l=a.bind(null,o.ATTRIBUTE);t.isAttribute=l;var c=a.bind(null,o.CLASS);t.isClassName=c;var u=a.bind(null,o.COMBINATOR);t.isCombinator=u;var d=a.bind(null,o.COMMENT);t.isComment=d;var h=a.bind(null,o.ID);t.isIdentifier=h;var p=a.bind(null,o.NESTING);t.isNesting=p;var f=a.bind(null,o.PSEUDO);t.isPseudo=f;var v=a.bind(null,o.ROOT);t.isRoot=v;var g=a.bind(null,o.SELECTOR);t.isSelector=g;var m=a.bind(null,o.STRING);t.isString=m;var _=a.bind(null,o.TAG);t.isTag=_;var b=a.bind(null,o.UNIVERSAL);function $(e){return f(e)&&e.value&&(e.value.startsWith("::")||":before"===e.value.toLowerCase()||":after"===e.value.toLowerCase()||":first-letter"===e.value.toLowerCase()||":first-line"===e.value.toLowerCase())}t.isUniversal=b},325:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(988))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var a=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.ID,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),r.prototype.valueToString=function(){return"#"+e.prototype.valueToString.call(this)},r}(o.default);t.default=a,e.exports=t.default},438:(e,t,n)=>{"use strict";t.__esModule=!0;var r=n(987);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||(t[e]=r[e]))}));var o=n(205);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||(t[e]=o[e]))}));var i=n(350);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||(t[e]=i[e]))}))},330:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r=i(n(774)),o=n(236);function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var l=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n);var l,c,u=i.prototype;return u.qualifiedName=function(e){return this.namespace?this.namespaceString+"|"+e:e},u.valueToString=function(){return this.qualifiedName(e.prototype.valueToString.call(this))},l=i,(c=[{key:"namespace",get:function(){return this._namespace},set:function(e){if(!0===e||"*"===e||"&"===e)return this._namespace=e,void(this.raws&&delete this.raws.namespace);var t=(0,r.default)(e,{isIdentifier:!0});this._namespace=e,t!==e?((0,o.ensureObject)(this,"raws"),this.raws.namespace=t):this.raws&&delete this.raws.namespace}},{key:"ns",get:function(){return this._namespace},set:function(e){this.namespace=e}},{key:"namespaceString",get:function(){if(this.namespace){var e=this.stringifyProperty("namespace");return!0===e?"":e}return""}}])&&s(l.prototype,c),Object.defineProperty(l,"prototype",{writable:!1}),i}(i(n(988)).default);t.default=l,e.exports=t.default},752:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(988))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var a=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.NESTING,n.value="&",n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),r}(o.default);t.default=a,e.exports=t.default},988:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r=n(236);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=function e(t,n){if("object"!=typeof t||null===t)return t;var r=new t.constructor;for(var o in t)if(t.hasOwnProperty(o)){var i=t[o];"parent"===o&&"object"==typeof i?n&&(r[o]=n):r[o]=i instanceof Array?i.map((function(t){return e(t,r)})):e(i,r)}return r},s=function(){function e(e){void 0===e&&(e={}),Object.assign(this,e),this.spaces=this.spaces||{},this.spaces.before=this.spaces.before||"",this.spaces.after=this.spaces.after||""}var t,n,s=e.prototype;return s.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},s.replaceWith=function(){if(this.parent){for(var e in arguments)this.parent.insertBefore(this,arguments[e]);this.remove()}return this},s.next=function(){return this.parent.at(this.parent.index(this)+1)},s.prev=function(){return this.parent.at(this.parent.index(this)-1)},s.clone=function(e){void 0===e&&(e={});var t=i(this);for(var n in e)t[n]=e[n];return t},s.appendToPropertyAndEscape=function(e,t,n){this.raws||(this.raws={});var r=this[e],o=this.raws[e];this[e]=r+t,o||n!==t?this.raws[e]=(o||r)+n:delete this.raws[e]},s.setPropertyAndEscape=function(e,t,n){this.raws||(this.raws={}),this[e]=t,this.raws[e]=n},s.setPropertyWithoutEscape=function(e,t){this[e]=t,this.raws&&delete this.raws[e]},s.isAtPosition=function(e,t){if(this.source&&this.source.start&&this.source.end)return!(this.source.start.line>e||this.source.end.line<e||this.source.start.line===e&&this.source.start.column>t||this.source.end.line===e&&this.source.end.column<t)},s.stringifyProperty=function(e){return this.raws&&this.raws[e]||this[e]},s.valueToString=function(){return String(this.stringifyProperty("value"))},s.toString=function(){return[this.rawSpaceBefore,this.valueToString(),this.rawSpaceAfter].join("")},t=e,(n=[{key:"rawSpaceBefore",get:function(){var e=this.raws&&this.raws.spaces&&this.raws.spaces.before;return void 0===e&&(e=this.spaces&&this.spaces.before),e||""},set:function(e){(0,r.ensureObject)(this,"raws","spaces"),this.raws.spaces.before=e}},{key:"rawSpaceAfter",get:function(){var e=this.raws&&this.raws.spaces&&this.raws.spaces.after;return void 0===e&&(e=this.spaces.after),e||""},set:function(e){(0,r.ensureObject)(this,"raws","spaces"),this.raws.spaces.after=e}}])&&o(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=s,e.exports=t.default},458:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(949))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var a=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.PSEUDO,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),r.prototype.toString=function(){var e=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),e,this.rawSpaceAfter].join("")},r}(o.default);t.default=a,e.exports=t.default},168:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(949))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var l=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.ROOT,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n);var o,l,c=r.prototype;return c.toString=function(){var e=this.reduce((function(e,t){return e.push(String(t)),e}),[]).join(",");return this.trailingComma?e+",":e},c.error=function(e,t){return this._error?this._error(e,t):new Error(e)},o=r,(l=[{key:"errorGenerator",set:function(e){this._error=e}}])&&s(o.prototype,l),Object.defineProperty(o,"prototype",{writable:!1}),r}(o.default);t.default=l,e.exports=t.default},881:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(949))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var a=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.SELECTOR,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),r}(o.default);t.default=a,e.exports=t.default},101:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(988))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var a=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.STRING,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),r}(o.default);t.default=a,e.exports=t.default},942:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(330))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var a=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.TAG,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),r}(o.default);t.default=a,e.exports=t.default},987:(e,t)=>{"use strict";t.__esModule=!0,t.UNIVERSAL=t.TAG=t.STRING=t.SELECTOR=t.ROOT=t.PSEUDO=t.NESTING=t.ID=t.COMMENT=t.COMBINATOR=t.CLASS=t.ATTRIBUTE=void 0,t.TAG="tag",t.STRING="string",t.SELECTOR="selector",t.ROOT="root",t.PSEUDO="pseudo",t.NESTING="nesting",t.ID="id",t.COMMENT="comment",t.COMBINATOR="combinator",t.CLASS="class",t.ATTRIBUTE="attribute",t.UNIVERSAL="universal"},487:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(330))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var a=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.UNIVERSAL,n.value="*",n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),r}(o.default);t.default=a,e.exports=t.default},617:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e){return e.sort((function(e,t){return e-t}))},e.exports=t.default},397:(e,t)=>{"use strict";t.__esModule=!0,t.word=t.tilde=t.tab=t.str=t.space=t.slash=t.singleQuote=t.semicolon=t.plus=t.pipe=t.openSquare=t.openParenthesis=t.newline=t.greaterThan=t.feed=t.equals=t.doubleQuote=t.dollar=t.cr=t.comment=t.comma=t.combinator=t.colon=t.closeSquare=t.closeParenthesis=t.caret=t.bang=t.backslash=t.at=t.asterisk=t.ampersand=void 0,t.ampersand=38,t.asterisk=42,t.at=64,t.comma=44,t.colon=58,t.semicolon=59,t.openParenthesis=40,t.closeParenthesis=41,t.openSquare=91,t.closeSquare=93,t.dollar=36,t.tilde=126,t.caret=94,t.plus=43,t.equals=61,t.pipe=124,t.greaterThan=62,t.space=32,t.singleQuote=39,t.doubleQuote=34,t.slash=47,t.bang=33,t.backslash=92,t.cr=13,t.feed=12,t.newline=10,t.tab=9,t.str=39,t.comment=-1,t.word=-2,t.combinator=-3},470:(e,t,n)=>{"use strict";t.__esModule=!0,t.FIELDS=void 0,t.default=function(e){var t,n,r,o,s,a,l,c,u,h,p,f,v=[],g=e.css.valueOf(),m=g.length,_=-1,b=1,$=0,y=0;function S(t,n){if(!e.safe)throw e.error("Unclosed "+t,b,$-_,$);c=(g+=n).length-1}for(;$<m;){switch((t=g.charCodeAt($))===i.newline&&(_=$,b+=1),t){case i.space:case i.tab:case i.newline:case i.cr:case i.feed:c=$;do{c+=1,(t=g.charCodeAt(c))===i.newline&&(_=c,b+=1)}while(t===i.space||t===i.newline||t===i.tab||t===i.cr||t===i.feed);f=i.space,r=b,n=c-_-1,y=c;break;case i.plus:case i.greaterThan:case i.tilde:case i.pipe:c=$;do{c+=1,t=g.charCodeAt(c)}while(t===i.plus||t===i.greaterThan||t===i.tilde||t===i.pipe);f=i.combinator,r=b,n=$-_,y=c;break;case i.asterisk:case i.ampersand:case i.bang:case i.comma:case i.equals:case i.dollar:case i.caret:case i.openSquare:case i.closeSquare:case i.colon:case i.semicolon:case i.openParenthesis:case i.closeParenthesis:f=t,r=b,n=$-_,y=(c=$)+1;break;case i.singleQuote:case i.doubleQuote:p=t===i.singleQuote?"'":'"',c=$;do{for(o=!1,-1===(c=g.indexOf(p,c+1))&&S("quote",p),s=c;g.charCodeAt(s-1)===i.backslash;)s-=1,o=!o}while(o);f=i.str,r=b,n=$-_,y=c+1;break;default:t===i.slash&&g.charCodeAt($+1)===i.asterisk?(0===(c=g.indexOf("*/",$+2)+1)&&S("comment","*/"),(a=(l=g.slice($,c+1).split("\n")).length-1)>0?(u=b+a,h=c-l[a].length):(u=b,h=_),f=i.comment,b=u,r=u,n=c-h):t===i.slash?(f=t,r=b,n=$-_,y=(c=$)+1):(c=d(g,$),f=i.word,r=b,n=c-_),y=c+1}v.push([f,b,$-_,r,n,$,y]),h&&(_=h,h=null),$=y}return v};var r,o,i=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(397));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}for(var a=((r={})[i.tab]=!0,r[i.newline]=!0,r[i.cr]=!0,r[i.feed]=!0,r),l=((o={})[i.space]=!0,o[i.tab]=!0,o[i.newline]=!0,o[i.cr]=!0,o[i.feed]=!0,o[i.ampersand]=!0,o[i.asterisk]=!0,o[i.bang]=!0,o[i.comma]=!0,o[i.colon]=!0,o[i.semicolon]=!0,o[i.openParenthesis]=!0,o[i.closeParenthesis]=!0,o[i.openSquare]=!0,o[i.closeSquare]=!0,o[i.singleQuote]=!0,o[i.doubleQuote]=!0,o[i.plus]=!0,o[i.pipe]=!0,o[i.tilde]=!0,o[i.greaterThan]=!0,o[i.equals]=!0,o[i.dollar]=!0,o[i.caret]=!0,o[i.slash]=!0,o),c={},u=0;u<22;u++)c["0123456789abcdefABCDEF".charCodeAt(u)]=!0;function d(e,t){var n,r=t;do{if(n=e.charCodeAt(r),l[n])return r-1;n===i.backslash?r=h(e,r)+1:r++}while(r<e.length);return r-1}function h(e,t){var n=t,r=e.charCodeAt(n+1);if(a[r]);else if(c[r]){var o=0;do{n++,o++,r=e.charCodeAt(n+1)}while(c[r]&&o<6);o<6&&r===i.space&&n++}else n++;return n}t.FIELDS={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6}},839:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(;n.length>0;){var o=n.shift();e[o]||(e[o]={}),e=e[o]}},e.exports=t.default},529:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(;n.length>0;){var o=n.shift();if(!e[o])return;e=e[o]}return e},e.exports=t.default},236:(e,t,n)=>{"use strict";t.__esModule=!0,t.unesc=t.stripComments=t.getProp=t.ensureObject=void 0;var r=a(n(700));t.unesc=r.default;var o=a(n(529));t.getProp=o.default;var i=a(n(839));t.ensureObject=i.default;var s=a(n(652));function a(e){return e&&e.__esModule?e:{default:e}}t.stripComments=s.default},652:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e){for(var t="",n=e.indexOf("/*"),r=0;n>=0;){t+=e.slice(r,n);var o=e.indexOf("*/",n+2);if(o<0)return t;r=o+2,n=e.indexOf("/*",r)}return t+e.slice(r)},e.exports=t.default},700:(e,t)=>{"use strict";function n(e){for(var t=e.toLowerCase(),n="",r=!1,o=0;o<6&&void 0!==t[o];o++){var i=t.charCodeAt(o);if(r=32===i,!(i>=97&&i<=102||i>=48&&i<=57))break;n+=t[o]}if(0!==n.length){var s=parseInt(n,16);return s>=55296&&s<=57343||0===s||s>1114111?["�",n.length+(r?1:0)]:[String.fromCodePoint(s),n.length+(r?1:0)]}}t.__esModule=!0,t.default=function(e){if(!r.test(e))return e;for(var t="",o=0;o<e.length;o++)if("\\"!==e[o])t+=e[o];else{var i=n(e.slice(o+1,o+7));if(void 0!==i){t+=i[0],o+=i[1];continue}if("\\"===e[o+1]){t+="\\",o++;continue}e.length===o+1&&(t+=e[o])}return t};var r=/\\/;e.exports=t.default},568:(e,t,n)=>{function r(e){try{if(!n.g.localStorage)return!1}catch(e){return!1}var t=n.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{Connection:()=>lr,getDevTools:()=>ur,protocol:()=>a});var e={};n.r(e),n.d(e,{glassEaselNodeTypeToCDP:()=>kt});var t={};n.r(t);var o={};n.r(o);var i,s,a={};n.r(a),n.d(a,{css:()=>t,dom:()=>e,glassEaselVarToString:()=>Nt,overlay:()=>o,toGlassEaselVar:()=>Et}),function(e){e[e.Shadow=1]="Shadow",e[e.Composed=2]="Composed",e[e.Domlike=3]="Domlike"}(i||(i={})),Object.freeze({__proto__:null,BM:{DYNAMIC:!0,SHADOW:!1,COMPOSED:!1,DOMLIKE:!1},get BackendMode(){return i}}),Object.freeze({__proto__:null}),Object.freeze({__proto__:null}),function(e){e.None="none",e.Simple="simple",e.SimpleWithRecursion="simple-recursion"}(s||(s={}));const l={defaultComponentSpace:null,externalComponent:!1,templateEngine:null,styleScope:null,extraStyleScope:null,hostNodeTagName:"wx-x",multipleSlots:!1,dynamicSlots:!1,directSlots:!1,reflectToAttributes:!1,writeFieldsToNode:!0,writeIdToDOM:!1,useMethodCallerListeners:!1,idPrefixGenerator:null,pureDataPattern:null,dataDeepCopy:s.Simple,propertyPassingDeepCopy:s.Simple,listenerChangeLifetimes:!1,virtualHost:!1,propertyEarlyInit:!1,throwGlobalError:!1,writeExtraInfoToAttr:!1,backendContext:null,devTools:null},c=(e,t)=>{const n=void 0===t?l:t;if(void 0===e&&n!==l)return n;const r=null!=e?e:{};return{externalComponent:void 0!==r.externalComponent?r.externalComponent:n.externalComponent,templateEngine:void 0!==r.templateEngine?r.templateEngine:n.templateEngine,styleScope:void 0!==r.styleScope?r.styleScope:n.styleScope,hostNodeTagName:void 0!==r.hostNodeTagName?r.hostNodeTagName:n.hostNodeTagName,extraStyleScope:void 0!==r.extraStyleScope?r.extraStyleScope:n.extraStyleScope,multipleSlots:void 0!==r.multipleSlots?r.multipleSlots:n.multipleSlots,dynamicSlots:void 0!==r.dynamicSlots?r.dynamicSlots:n.dynamicSlots,directSlots:void 0!==r.directSlots?r.directSlots:n.directSlots,reflectToAttributes:void 0!==r.reflectToAttributes?r.reflectToAttributes:n.reflectToAttributes,writeFieldsToNode:void 0!==r.writeFieldsToNode?r.writeFieldsToNode:n.writeFieldsToNode,writeIdToDOM:void 0!==r.writeIdToDOM?r.writeIdToDOM:n.writeIdToDOM,useMethodCallerListeners:void 0!==r.useMethodCallerListeners?r.useMethodCallerListeners:n.useMethodCallerListeners,idPrefixGenerator:void 0!==r.idPrefixGenerator?r.idPrefixGenerator:n.idPrefixGenerator,pureDataPattern:void 0!==r.pureDataPattern?r.pureDataPattern:n.pureDataPattern,dataDeepCopy:void 0!==r.dataDeepCopy?r.dataDeepCopy:n.dataDeepCopy,propertyPassingDeepCopy:void 0!==r.propertyPassingDeepCopy?r.propertyPassingDeepCopy:n.propertyPassingDeepCopy,listenerChangeLifetimes:void 0!==r.listenerChangeLifetimes?r.listenerChangeLifetimes:n.listenerChangeLifetimes,virtualHost:void 0!==r.virtualHost?r.virtualHost:n.virtualHost,propertyEarlyInit:void 0!==r.propertyEarlyInit?r.propertyEarlyInit:n.propertyEarlyInit}};class u{constructor(e){this.empty=!0,this._$arr=null,this._$type=e}add(e){this._$arr?this._$arr=this._$arr.concat(e):this._$arr=[e],this.empty=!1}remove(e){let t=null;if(this._$arr){const n=[],r=this._$arr;for(let o=0;o<r.length;o+=1){if(r[o]===e){n.push(...r.slice(o+1)),t=e;break}n.push(r[o])}this._$arr=n,this.empty=0===this._$arr.length}return t}call(e,t,n){const r=this._$arr;let o=!0;if(r)for(let i=0;i<r.length;i+=1)!1===p(this._$type,r[i],e,t,n)&&(o=!1);return o}}class d{constructor(e){this.empty=!0,this._$arr=null,this._$type=e}add(e,t){const n={f:e,data:t};this._$arr?this._$arr=this._$arr.concat(n):this._$arr=[n],this.empty=!1}remove(e){let t=null;if(this._$arr){const n=[],r=this._$arr;for(let o=0;o<r.length;o+=1){const i=r[o];if(i.f===e){n.push(...r.slice(o+1)),t=i.data;break}n.push(i)}this._$arr=n,this.empty=0===this._$arr.length}return t}call(e,t,n,r,o){const i=this._$arr;let s=!0;if(i)for(let a=0;a<i.length;a+=1){const{f:l,data:c}=i[a];if(!n(c))continue;const u=p(this._$type,l,e,t,r);!1===(o?o(u):u)&&(s=!1)}return s}}let h=()=>{};function p(e,t,n,r,o){try{return t.apply(n,r)}catch(n){return void h(n,`${e||"Listener"} ${t.name||"(anonymous)"}`,o)}}const f=Symbol("TextNode"),v=Symbol("Element"),g=Symbol("NativeNode"),m=Symbol("VirtualNode"),_=Symbol("ShadowRootSymbol"),b=Symbol("Component"),$=e=>!!e&&e[f],y=e=>!!e&&e[v],S=e=>!!e&&e[g],C=e=>!!e&&e[m],w=e=>!!e&&e[_],E=e=>!!e&&e[b],N=e=>{if(y(e)){let t;return t=C(e)?`(virtual):${e.is}`:E(e)?`${e.tagName}:${e.is}`:S(e)?e.is:"(unknown)",`<${t}${(e=>{let t="";if(y(e)){null!==e._$slotName&&(t+=` (slot) name="${e._$slotName}"`),e.id&&(t+=` id="${e.id}"`),e.slot&&(t+=` slot="${e.slot}"`);const n=e.class;n&&(t+=` class="${n}"`),e.style&&(t+=` style="${e.style}"`)}return C(e)||(E(e)?Object.keys(e._$behavior._$propertyMap).forEach((n=>{t+=` ${n}="${String(e.data[n])}"`})):e.attributes.forEach((e=>{t+=` ${e.name}="${String(e.value)}"`}))),t})(e)}>`}return $(e)?e.textContent.trim():null===e?"<(null)>":void 0===e?"<(undefined)>":"<(unknown)>"};let k=!1;const O=new u("error"),x=new u("warning");function P(e,t,n,r){if(!k){k=!0,E(n)&&n.triggerLifetime("error",[e]);const o=!1===O.call(e,[e,t,n,r]);if(k=!1,o)return}if(l.throwGlobalError)throw e;console.error([e instanceof Error?`${e.message}`:String(e),r?`\t@${N(r)}`:void 0,n?`\t${t||""}@${"string"==typeof n?`<${n}>`:N(n||!1)}`:void 0].filter(Boolean).join("\n"))}function T(e,t,n){x.call(null,[e,t||"",n])&&console.warn(e)}h=P;class I extends Error{constructor(e,t,n,r){super(e),this.additionalStack=t,this.relatedComponent=n,this.element=r,P(this,t,n,r)}}var M;!function(e){e[e.Fragment=0]="Fragment",e[e.Element=1]="Element",e[e.TextNode=2]="TextNode",e[e.Component=3]="Component",e[e.VirtualNode=4]="VirtualNode"}(M||(M={}));class R{constructor(){this.mode=1,this._$styleSheetIdInc=1,this._$renderCallbacks=null,this._$shadowRoot=new D}destroy(){}getWindowWidth(){return 1}getWindowHeight(){return 1}getDevicePixelRatio(){return 1}getTheme(){return"light"}registerStyleSheetContent(e,t){}appendStyleSheetPath(e,t){const n=this._$styleSheetIdInc;return this._$styleSheetIdInc+=1,n}disableStyleSheet(e){}render(e){if(this._$renderCallbacks)this._$renderCallbacks.push(e);else{const t=this._$renderCallbacks=[e];setTimeout((()=>{this._$renderCallbacks=null,t.forEach((e=>{p("Render Callback",e,this,[null])}))}),16)}}getRootNode(){return this._$shadowRoot}createFragment(){return new A(0)}onEvent(e,t){}}class A{constructor(e){this._$shadowRoot=3===e?new D:null}release(){}associateValue(e){}getShadowRoot(){return this._$shadowRoot||void 0}appendChild(e){}removeChild(e,t){}insertBefore(e,t,n){}replaceChild(e,t,n){}spliceBefore(e,t,n){}spliceAppend(e){}spliceRemove(e,t){}setId(e){}setSlotName(e){}setContainingSlot(e){}reassignContainingSlot(e,t){}spliceBeforeSlotNodes(e,t,n){}spliceRemoveSlotNodes(e,t){}spliceAppendSlotNodes(e){}setInheritSlots(){}setStyle(e){}addClass(e){}removeClass(e){}clearClasses(){}setClassAlias(e,t){}setAttribute(e,t){}removeAttribute(e){}setDataset(e,t){}setText(e){}setListenerStats(e,t,n){}setModelBindingStat(e,t){}}class D extends A{constructor(){super(4)}createElement(e,t){return new A(1)}createTextNode(e){return new A(2)}createComponent(e,t,n,r,o,i){return new A(3)}createVirtualNode(e){return new A(4)}}const L=/[^\s.,]+/g,j=e=>{const t=[];let n;for(L.lastIndex=0;null!==(n=L.exec(e));)t.push(String(n[0]));return t};class B{constructor(){this._$names=[""]}static globalScope(){return 0}register(e){const t=this._$names.length;return this._$names.push(e),t}queryName(e){return this._$names[e]}}class F{constructor(e,t,n,r,o,i){this._$externalNames=void 0,this._$externalRawAlias=null,this._$dirtyExternalNames=null,this._$rawNames=[],this._$backendNames=[],this._$backendNameScopes=[],this._$backendNamesCount=[],this._$hasAliasNames=!1,this._$element=e,this._$owner=n,this._$defaultScope=r,this._$extraScope=o,this._$rootScope=(null==n?void 0:n._$owner)?n._$rootScope:r,this._$prefixManager=i,t&&(this._$externalNames=t,this._$externalRawAlias=[])}_$resolvePrefixes(e,t){const n=this._$owner,r=null==n?void 0:n._$externalNames,o=r?r.indexOf(e):-1;if(n&&-1!==o){this._$hasAliasNames=!0;const e=n._$externalRawAlias[o];if(e)for(let r=0;r<e.length;r+=1)n._$resolvePrefixes(e[r],t)}else if("~"===e[0])t(this._$rootScope,e.slice(1));else if("^"===e[0]){let n=e.slice(1),r=this._$owner;for(;"^"===n[0];)n=n.slice(1),r=null==r?void 0:r._$owner;t((null==r?void 0:r._$owner)?r._$defaultScope:this._$rootScope,n)}else void 0!==this._$extraScope&&t(this._$extraScope,e),t(this._$defaultScope,e)}_$hasAlias(e){return!!this._$externalNames&&this._$externalNames.includes(e)}_$setAlias(e,t){if(!this._$externalNames)return;let n;if(null==t)n=[];else if(Array.isArray(t)){n=Array(t.length);for(let e=0,r=t.length;e<r;e+=1)n[e]=String(t[e])}else n=j(String(t));const r=this._$externalNames.indexOf(e);-1!==r&&(this._$dirtyExternalNames=this._$dirtyExternalNames||[],this._$dirtyExternalNames.push(e),this._$externalRawAlias[r]=n)}_$getAlias(){var e;const t=Object.create(null);return null===(e=this._$externalNames)||void 0===e||e.forEach(((e,n)=>{t[e]=this._$externalRawAlias[n]})),t}_$spreadExternalClassUpdate(){const e=this._$owner;if(!(null==e?void 0:e._$dirtyExternalNames)||!this._$hasAliasNames)return!1;const t=e._$dirtyExternalNames,n=this._$externalNames;if(n)for(let e=0;e<n.length;e+=1){const r=this._$externalRawAlias[e]||[];for(let o=0;o<t.length;o+=1)r.includes(t[o])&&(this._$dirtyExternalNames=this._$dirtyExternalNames||[],this._$dirtyExternalNames.push(n[e]))}const r=this._$rawNames.some((e=>e.some((e=>t.includes(e)))));return r&&this._$updateResolvedNames(),!!this._$dirtyExternalNames||r}_$shouldUpdateExternalClass(){if(!this._$dirtyExternalNames)return!1;if(1===this._$element.getBackendMode()){const e=this._$dirtyExternalNames;for(let t=0;t<e.length;t+=1){const n=e[t],r=this._$externalNames.indexOf(n),o=this._$externalRawAlias[r]||[];this._$element._$backendElement.setClassAlias(n,o)}return this._$dirtyExternalNames=null,!1}return!0}_$markExternalClassUpdated(){this._$dirtyExternalNames=null}_$fasterAddUpdateResolvedNames(){const e=this._$element._$backendElement;if(!e)return!1;const t=this._$rawNames;this._$hasAliasNames=!1;for(let n=0,r=t.length;n<r;n+=1){const r=t[n];if(r)for(let t=0,n=r.length;t<n;t+=1){const n=r[t];1===this._$element.getBackendMode()?this._$addClass(n,void 0,e):this._$resolvePrefixes(n,((t,n)=>{this._$addClass(n,t,e)}))}}return!0}_$updateResolvedNames(){const e=this._$element._$backendElement;if(!e)return!1;const t=this._$rawNames,n=this._$backendNames,r=this._$backendNameScopes,o=this._$backendNamesCount,i=[],s=[],a=[];if(this._$hasAliasNames=!1,1===this._$element.getBackendMode())for(let e=0,n=t.length;e<n;e+=1){const n=t[e];if(n)for(let e=0,t=n.length;e<t;e+=1){const t=n[e];let r=!1;for(let e=0;e<i.length;e+=1)if(t===i[e]){a[e]+=1,r=!0;break}r||(i.push(t),s.push(void 0),a.push(1))}}else for(let e=0,n=t.length;e<n;e+=1){const n=t[e];if(n)for(let e=0,t=n.length;e<t;e+=1){const t=n[e];this._$resolvePrefixes(t,((e,t)=>{for(let n=0;n<i.length;n+=1)if(t===i[n]&&e===s[n])return void(a[n]+=1);i.push(t),s.push(e),a.push(1)}))}}let l=!1;for(let t=0;t<i.length;t+=1){let a=!1;for(let e=0;e<n.length;e+=1)if(i[t]===n[e]&&s[t]===r[e]){a=!0,o[e]=0;break}a||(l=!0,this._$addClassToBackend(i[t],s[t],e))}for(let t=0;t<n.length;t+=1)0!==o[t]&&(l=!0,this._$removeClassFromBackend(n[t],r[t],e));return this._$backendNames=i,this._$backendNameScopes=s,this._$backendNamesCount=a,l}_$addClassToBackend(e,t,n){var r;if(3===this._$element.getBackendMode()){const o=void 0===t?"":null===(r=this._$prefixManager)||void 0===r?void 0:r.queryName(t),i=o?`${o}--${e}`:e;n.classList.add(i)}else 2===this._$element.getBackendMode()?n.addClass(e,t):n.addClass(e)}_$removeClassFromBackend(e,t,n){var r;if(3===this._$element.getBackendMode()){const o=t&&(null===(r=this._$prefixManager)||void 0===r?void 0:r.queryName(t)),i=o?`${o}--${e}`:e;n.classList.remove(i)}else 2===this._$element.getBackendMode()?n.removeClass(e,t):n.removeClass(e)}_$addClass(e,t,n){const r=this._$backendNames,o=this._$backendNameScopes,i=this._$backendNamesCount;let s=!1;for(let n=0;n<r.length;n+=1)if(e===r[n]&&t===o[n]){s=!0,i[n]+=1;break}s||(r.push(e),o.push(t),i.push(1),this._$addClassToBackend(e,t,n))}_$removeClass(e,t,n){const r=this._$backendNames,o=this._$backendNameScopes,i=this._$backendNamesCount;for(let s=0;s<r.length;s+=1)if(e===r[s]&&t===o[s]){i[s]<=1?(r.splice(s,1),o.splice(s,1),i.splice(s,1),this._$removeClassFromBackend(e,t,n)):i[s]-=1;break}}toggle(e,t,n=0){const r=this._$element._$backendElement,o=this._$rawNames[n]?this._$rawNames[n].indexOf(e):-1;let i=!1;if(void 0===t?-1===o:t){if(-1===o){const t=this._$rawNames;t[n]||(t[n]=[]),t[n].push(e),r&&(1===this._$element.getBackendMode()?this._$addClass(e,void 0,r):this._$resolvePrefixes(e,((e,t)=>{this._$addClass(t,e,r)}))),i=!0}}else if(-1!==o){const t=this._$rawNames[n];t&&t.splice(o,1),r&&(1===this._$element.getBackendMode()?this._$removeClass(e,void 0,r):this._$resolvePrefixes(e,((e,t)=>{this._$removeClass(t,e,r)}))),i=!0}return i}contains(e,t=0){const n=this._$rawNames[t]||[];for(let t=0;t<n.length;t+=1){const r=n[t];if("~"===r[0]){if(r.slice(1)===e)return!0}else if("^"===r[0]){let t=r.slice(1);for(;"^"===t[0];)t=t.slice(1);if(t===e)return!0}else if(r===e)return!0}return!1}setClassNames(e,t=0){let n;n=null==e?[]:Array.isArray(e)?j(e.join(" ")):j(String(e));const r=0===this._$rawNames.length;return this._$rawNames[t]=n,r?this._$fasterAddUpdateResolvedNames():this._$updateResolvedNames()}getClassNames(e=0){const t=this._$rawNames[e]||[];return t?t.join(" "):""}}const U=Symbol("method");Object.freeze({__proto__:null,METHOD_TAG:U});class q{constructor(e,t){this.ownerSpace=e,this._$trans=t}_$implement(e){var t;return(null===(t=this._$trans)||void 0===t?void 0:t.call(this,e))||e}}class G{constructor(){this._$traits=new WeakMap}implement(e,t){const n=e._$implement(t);this._$traits.set(e,n)}get(e){return this._$traits.get(e)}}const W=(e,t)=>{let n;n="/"!==e[0]?t.split("/").slice(0,-1).concat(e.split("/")):e.split("/");const r=[];for(let e=0;e<n.length;e+=1){const t=n[e];""!==t&&"."!==t&&(".."!==t?r.push(t):r.pop())}return r.join("/")},V=(e,t)=>{const n=e.indexOf("://");if(n>0){const t=e.indexOf("/",n+3);return t>0?{domain:e.slice(0,t),absPath:W(e.slice(t+1),"")}:{domain:e.slice(0,n+3),absPath:W(e.slice(n+3),"")}}return{domain:null,absPath:W(e,t)}};class H{constructor(e,t,n){this._$callbacks=[],this._$ownerSpace=e,this._$isPub=t,this._$alias=n}add(e){this._$callbacks.push(e)}hintUsed(e){var t,n;null===(n=(t=this._$ownerSpace)._$componentWaitingListener)||void 0===n||n.call(t,this._$isPub,this._$alias,e)}remove(e){const t=this._$callbacks.indexOf(e);-1!==t&&this._$callbacks.splice(t,1)}call(e){for(;this._$callbacks.length>0;)this._$callbacks.shift()(e)}}class Y{constructor(e,t,n,r=!0){this._$behaviorList=Object.create(null),this._$pubBehaviorList=Object.create(null),this._$list=Object.create(null),this._$pubList=Object.create(null),this._$using=Object.create(null),this._$importedSpaces=Object.create(null),this._$listWaiting=Object.create(null),this._$pubListWaiting=Object.create(null),this._$groupingListWaiting=null,this._$componentWaitingListener=null,this._$allowUnusedNativeNode=!0,this._$sharedStyleScope=0,this.hooks={createTextNode:(e,t)=>e(t),createNativeNode:(e,t,n)=>e(t,n),createComponent:(e,t,n)=>e(t,n)},t&&(Object.assign(this._$list,t._$pubList),Object.assign(this._$behaviorList,t._$pubBehaviorList)),this._$defaultComponent=null!=e?e:"",this._$componentOptions=c({},null==t?void 0:t._$componentOptions),this.styleScopeManager=n||new B,this._$allowUnusedNativeNode=r}updateComponentOptions(e){this._$componentOptions=c(e,this._$componentOptions)}getComponentOptions(){return this._$componentOptions}setSharedStyleScope(e){this._$sharedStyleScope=e}setGlobalUsingComponent(e,t){this._$using[e]=t}importSpace(e,t,n){this._$importedSpaces[e]={space:t,privateUse:n}}getComponentByUrl(e,t){const{domain:n,absPath:r}=V(e,t),o=this.getComponent(r,!0,n);if(!o)throw new Error(`There is no component "${r}" in the space and no default component can be used`);return o}getComponentByUrlWithoutDefault(e,t){const{domain:n,absPath:r}=V(e,t);return this.getComponent(r,!1,n)||null}getComponent(e,t=!0,n=null){let r;if(n){const e=this._$importedSpaces[n];if(e){const{space:t,privateUse:n}=e;r=n?t._$list:t._$pubList}}else r=this._$list;if(r){const t=r[e];if(t)return t}if(t)return this._$list[this._$defaultComponent]}getDefaultComponent(){return this._$list[this._$defaultComponent]||null}isDefaultComponent(e){return this._$list[this._$defaultComponent]===e}getGlobalUsingComponent(e){return this._$using[e]||null}getBehaviorByUrl(e,t){const{domain:n,absPath:r}=V(e,t);return this._$getBehavior(r,n)||null}_$getBehavior(e,t=null){let n;if(t){const e=this._$importedSpaces[t];if(e){const{space:t,privateUse:r}=e;n=r?t._$behaviorList:t._$pubBehaviorList}}else n=this._$behaviorList;if(n){const t=n[e];if(t)return t}}defineComponent(e){const t=e.is;return new St(t,this).definition(e).registerComponent()}defineBehavior(e){const t=e.is;return new St(t,this).definition(e).registerBehavior()}define(e){return new St(e,this)}defineWithMethodCaller(e){return new St(e,this)}_$registerComponent(e,t){this._$list[e]=t,this._$behaviorList[e]=t.behavior;const n=this._$listWaiting[e];n&&(delete this._$listWaiting[e],this._$groupingListWaiting?this._$groupingListWaiting.push({waiting:n,comp:t}):n.call(t))}_$registerBehavior(e,t){this._$behaviorList[e]=t}startGroupRegister(){this._$groupingListWaiting=[]}endGroupRegister(){const e=this._$groupingListWaiting;if(e){this._$groupingListWaiting=null;for(let t=0;t<e.length;t+=1){const{waiting:n,comp:r}=e[t];n.call(r)}}}groupRegister(e){this.startGroupRegister();const t=p("group register",e,this,[]);return this.endGroupRegister(),t}exportComponent(e,t){const n=this._$list[t];if(!n)throw new Error(`There is no component "${t}" for aliasing`);this._$pubList[e]=n;const r=this._$pubListWaiting[e];r&&(delete this._$pubListWaiting[e],r.call(n))}getExportedComponent(e){return this._$pubList[e]}getExportedBehavior(e){return this._$pubBehaviorList[e]}exportBehavior(e,t){const n=this._$behaviorList[t];if(!n)throw new Error(`There is no behavior "${t}" for aliasing`);this._$pubBehaviorList[e]=n}_$componentWaitingList(e,t){const{domain:n,absPath:r}=V(e,t);let o,i,s;if(n){const e=this._$importedSpaces[n];if(!e)return null;if(i=e.space,s=!e.privateUse,s){if(i._$pubList[r])return null;o=i._$pubListWaiting}else{if(i._$list[r])return null;o=i._$listWaiting}}else{if(i=this,s=!1,this._$list[r])return null;o=this._$listWaiting}let a=o[r];return a||(a=o[r]=new H(i,s,r),a)}setComponentWaitingListener(e){this._$componentWaitingListener=e}createComponentByUrl(e,t,n,r){let o=t,i=null;const s=o.indexOf("#");s>=0&&(o=o.slice(0,s));const a=o.indexOf("?");a>=0&&(i=o.slice(a+1),o=o.slice(0,a));const l=this.getComponentByUrl(o,"");let c=null;return n&&(c=Object.create(null),Object.keys(n).forEach((e=>{const t=n[e],r=this.getComponentByUrl(t,"");c[e]=r}))),yt.createWithGenericsAndContext(e,l,c,r,(e=>{if(i){let t=!1;i.split("&").forEach((n=>{const r=n.indexOf("=");if(r>=0){const o=decodeURIComponent(n.slice(0,r)),i=decodeURIComponent(n.slice(r+1));e._$dataGroup.replaceProperty(o,i)&&(t=!0)}})),t&&e.applyDataUpdates()}}))}defineTraitBehavior(e){return new q(this,e)}}let z=null;const Q=()=>{if(z)return z;const e=new Y;return z=e,e},K=e=>{const t=e.str;for(;e.cur<t.length;){const n=t[e.cur];if(" "!==n&&"\n"!==n&&"\r"!==n&&"\t"!==n&&"\f"!==n)break;e.cur+=1}return e.cur<t.length},X=e=>{const t=e.str;let n="";for(;e.cur<t.length;){const r=t[e.cur];if(!(r>="0"&&r<="9"))break;n+=r,e.cur+=1}if(!n)throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (illegal index)`);return parseInt(n,10)},Z=e=>{const t=e.str;let n="";for(;e.cur<t.length;){const r=t[e.cur];if("\\"===r)e.cur+1===t.length||(n+=t[e.cur+1],e.cur+=1);else if(/^[_a-zA-Z]$/.test(r))n+=r;else{if(!(r>="0"&&r<="9"))break;if(""===n)throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (field name cannot start with digits)`);n+=r}e.cur+=1}return n},J=e=>{const t=e.str;let n="";for(;e.cur<t.length;){const r=t[e.cur];if("\\"===r)if(e.cur+1===t.length)n+="\\",e.cur+=1;else{const r=t[e.cur+1];"."===r||"["===r||"]"===r||"\\"===r?(n+=r,e.cur+=2):(n+="\\",e.cur+=1)}else{if("."===r||"["===r)break;n+=r,e.cur+=1}}return n},ee=e=>{const t=e.str;if(K(e),"*"===t[e.cur]&&"*"===t[e.cur+1])return e.cur+=2,["**"];const n=Z(e);if(!n)throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (first field name illegal)`);const r=[n];for(;e.cur<t.length&&K(e);){const n=t[e.cur];if("."===n){if(e.cur+=1,K(e),"*"===t[e.cur]&&"*"===t[e.cur+1]){r.push("**"),e.cur+=2;break}const n=Z(e);if(!n)throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (field name illegal)`);r.push(n)}else{if("["!==n)break;{e.cur+=1,K(e);const n=X(e);if(K(e),"]"!==t[e.cur])throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (illegal index)`);e.cur+=1,r.push(n)}}}return r},te=e=>{const t=(e=>{const t=e.str,n=[];for(;e.cur<t.length;){const r=t[e.cur];if("."===r){e.cur+=1;const t=J(e);""!==t&&n.push(t)}else if("["===r){e.cur+=1;const r=X(e);if("]"!==t[e.cur]&&e.cur<t.length)throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (illegal index)`);e.cur+=1,n.push(r)}else{const t=J(e);n.push(t)}}return 0===n.length&&n.push(""),n})({str:e,cur:0});return t},ne=e=>{if("string"!=typeof e)return e.map((e=>ee({str:e,cur:0})));const t={str:e,cur:0},n=(e=>{const t=[];for(t.push(ee(e)),K(e);","===e.str[e.cur];)e.cur+=1,t.push(ee(e)),K(e);return t})(t);if(t.cur!==e.length)throw new Error(`data path descriptor "${e}" is illegal at char ${t.cur}`);return n};Object.freeze({__proto__:null,parseMultiPaths:ne,parseSinglePath:te});const re=(e,t)=>{if("object"==typeof e&&null!==e){const n=t.get(e);if(void 0!==n)return n;if(Array.isArray(e)){const n=[];t.set(e,n);for(let r=0;r<e.length;r+=1)n[r]=re(e[r],t);return n}const r={};t.set(e,r);const o=Object.keys(e);for(let n=0;n<o.length;n+=1){const i=o[n];r[i]=re(e[i],t)}return r}return"symbol"==typeof e?Symbol(e.description):e},oe=e=>{if("object"==typeof e&&null!==e){if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n+=1)t[n]=oe(e[n]);return t}const t={},n=Object.keys(e);for(let r=0;r<n.length;r+=1){const o=n[r];t[o]=oe(e[o])}return t}return"symbol"==typeof e?Symbol(e.description):e},ie=(e,t)=>t?re(e,new WeakMap):oe(e);var se;!function(e){e[e.Disabled=0]="Disabled",e[e.Enabled=1]="Enabled",e[e.Destroyed=2]="Destroyed"}(se||(se={})),Object.freeze({__proto__:null,get AutoDestroyState(){return se},deepCopy:ie,simpleDeepCopy:oe});class ae{constructor(e){this._$subtreeObserversCount=0,this.attrObservers=null,this.allAttrObservers=null,this.textObservers=null,this.childObservers=null,this.attachObservers=null,this._$bound=e}attachChild(e){e._$mutationObserverTarget||(e._$mutationObserverTarget=new ae(e)),this._$subtreeObserversCount>0&&e._$mutationObserverTarget.updateSubtreeCount(this._$subtreeObserversCount)}detachChild(e){e._$mutationObserverTarget&&e._$mutationObserverTarget.updateSubtreeCount(-this._$subtreeObserversCount)}updateSubtreeCount(e){this._$subtreeObserversCount+=e;const t=this._$bound;y(t)&&t.childNodes.forEach((t=>{t._$mutationObserverTarget||(t._$mutationObserverTarget=new ae(t)),t._$mutationObserverTarget.updateSubtreeCount(e)}))}hasSubtreeListeners(){return this._$subtreeObserversCount>0}static callAttrObservers(e,t){var n;let r=e;do{const e=r._$mutationObserverTarget;null===(n=null==e?void 0:e.allAttrObservers)||void 0===n||n.call(r,[t]),!(null==e?void 0:e.attrObservers)||"basic"!==t.nameType&&"attribute"!==t.nameType&&"component-property"!==t.nameType||e.attrObservers.call(r,[t]);const o=r.parentNode;if(!o)break;if(r=o,!r._$mutationObserverTarget)break}while(r._$mutationObserverTarget._$subtreeObserversCount>0)}static callTextObservers(e,t){var n;let r=e;do{const e=r._$mutationObserverTarget;null===(n=null==e?void 0:e.textObservers)||void 0===n||n.call(r,[t]);const o=r.parentNode;if(!o)break;if(r=o,!r._$mutationObserverTarget)break}while(r._$mutationObserverTarget._$subtreeObserversCount>0)}static callChildObservers(e,t){var n;let r=e;do{const e=r._$mutationObserverTarget;null===(n=null==e?void 0:e.childObservers)||void 0===n||n.call(r,[t]);const o=r.parentNode;if(!o)break;if(r=o,!r._$mutationObserverTarget)break}while(r._$mutationObserverTarget._$subtreeObserversCount>0)}static callAttachObservers(e,t){var n;const r=e._$mutationObserverTarget;null===(n=null==r?void 0:r.attachObservers)||void 0===n||n.call(e,[t])}}class le{constructor(e){this._$subtreeListenersCount=0,this._$boundFuncArrs=[],this._$boundTarget=null,this._$listener=e,this._$normalizedListener=null}static create(e){return new le(e)}observe(e,t={properties:!1,childList:!1,characterData:!1,subtree:!1,attachStatus:!1}){const n=this._$listener;if(!n)throw new Error("A MutationObserver can only observe once");let r;e._$mutationObserverTarget?r=e._$mutationObserverTarget:(r=new ae(e),e._$mutationObserverTarget=r),this._$listener=null;const o=t.subtree?n:function(e){e.target===this&&n.call(this,e)};this._$normalizedListener=o,this._$boundTarget=r,"all"===t.properties?(r.allAttrObservers||(r.allAttrObservers=new u("attributeObserver")),r.allAttrObservers.add(o),this._$boundFuncArrs.push(r.allAttrObservers),this._$subtreeListenersCount+=1):t.properties&&(r.attrObservers||(r.attrObservers=new u("attributeObserver")),r.attrObservers.add(o),this._$boundFuncArrs.push(r.attrObservers),this._$subtreeListenersCount+=1),t.childList&&(r.childObservers||(r.childObservers=new u("childObserver")),r.childObservers.add(o),this._$boundFuncArrs.push(r.childObservers),this._$subtreeListenersCount+=1),t.characterData&&(r.textObservers||(r.textObservers=new u("textObserver")),r.textObservers.add(o),this._$boundFuncArrs.push(r.textObservers),this._$subtreeListenersCount+=1),t.subtree&&r.updateSubtreeCount(this._$subtreeListenersCount),t.attachStatus&&(r.attachObservers||(r.attachObservers=new u("attachObserver")),r.attachObservers.add(o),this._$boundFuncArrs.push(r.attachObservers))}disconnect(){var e;null===(e=this._$boundTarget)||void 0===e||e.updateSubtreeCount(-this._$subtreeListenersCount);const t=this._$boundFuncArrs;this._$boundFuncArrs=[];const n=this._$normalizedListener;n&&t.forEach((e=>{e.remove(n)}))}}Object.freeze({__proto__:null,MutationObserver:le,MutationObserverTarget:ae});const ce=Object.prototype.hasOwnProperty;var ue;!function(e){e.Invalid="invalid",e.Any="any",e.String="string",e.Number="number",e.Boolean="boolean",e.Object="object",e.Array="array",e.Function="function"}(ue||(ue={}));const de=(e,t)=>{const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];if(Object.prototype.hasOwnProperty.call(e,o))if("_"===o[0]&&T(`data field "${o}" from different behaviors is overriding or merging.`),"object"!=typeof e[o]||"object"!=typeof t[o]||null===t[o]||Array.isArray(t[o]))e[o]=t[o];else{if(Array.isArray(e[o]))e[o]=e[o].slice();else{const t=e[o],n={},r=Object.keys(t);for(let e=0;e<r.length;e+=1){const o=r[e];n[o]=t[o]}e[o]=n}de(e[o],t[o])}else e[o]=t[o]}},he=e=>{switch(e){case"string":return"";case"number":return 0;case"boolean":return!1;case"array":return[];case"function":return function(){};default:return null}},pe=e=>"string"===e||e===String?"string":"number"===e||e===Number?"number":"boolean"===e||e===Boolean?"boolean":"object"===e||e===Object?"object":"array"===e||e===Array?"array":"function"===e||e===Function?"function":"any"===e||null==e?"any":"invalid",fe=(e,t,n)=>{const r=n.type,o=n.optionalTypes;if(o)for(let t=0;t<o.length;t+=1)if(ve(o[t],e))return e;return"string"===r?null==e?(T(`property "${t}" received type-incompatible value: expected <String> but get null value. Used default value instead.`),n.defaultFn()):("object"==typeof e&&T(`property "${t}" received type-incompatible value: expected <String> but got object-typed value. Force converted.`),String(e)):"number"===r?isFinite(e)?Number(e):(T("number"==typeof e?`property "${t}" received type-incompatible value: expected <Number> but got NaN or Infinity. Used default value instead.`:`property "${t}" received type-incompatible value: expected <Number> but got non-number value. Used default value instead.`),n.defaultFn()):"boolean"===r?!!e:"array"===r?Array.isArray(e)?e:(T(`property "${t}" received type-incompatible value: expected <Array> but got non-array value. Used default value instead.`),n.defaultFn()):"object"===r?"object"==typeof e?e:(T(`property "${t}" received type-incompatible value: expected <Object> but got non-object value. Used default value instead.`),n.defaultFn()):"function"===r?"function"==typeof e?e:(T(`property "${t}" received type-incompatible value: expected <Function> but got non-function value. Used default value instead.`),n.defaultFn()):void 0===e?n.defaultFn():e},ve=(e,t)=>{if("string"===e){if("string"!=typeof t)return!1}else if("number"===e){if(!Number.isFinite(t))return!1}else if("boolean"===e){if("boolean"!=typeof t)return!1}else if("object"===e){if("object"!=typeof t||Array.isArray(t))return!1}else if("array"===e){if("object"!=typeof t||!Array.isArray(t))return!1}else if("function"===e){if("function"!=typeof t)return!1}else if(void 0===t)return!1;return!0};var ge;!function(e){e[e.None=0]="None",e[e.Simple=1]="Simple",e[e.SimpleWithRecursion=2]="SimpleWithRecursion"}(ge||(ge={}));class me{constructor(e){this.observerRoot={sub:{}},this.observers=[],this.propFields=e}cloneSub(){const e=new me(this.propFields);return this.observers.length>0&&(e.observerRoot=oe(this.observerRoot),e.observers=this.observers.slice()),e}addObserver(e,t){const n=this.observers.length;this.observers.push({path:t,f:e});for(let e=0;e<t.length;e+=1){const r=t[e];let o=this.observerRoot,i=!1;for(let e=0;e<r.length;e+=1){const t=r[e];if("**"===t){i=!0;break}o.sub[t]||(o.sub[t]={sub:{}}),o=o.sub[t]}i?o.wildcard?o.wildcard.push(n):o.wildcard=[n]:o.listener?o.listener.push(n):o.listener=[n]}}}const _e=(e,t,n,r)=>{const o=new Array(n.length);for(let e=0;e<n.length;e+=1){const r=n[e];let i=t;for(let e=0;e<r.length;e+=1){const t=r[e];if("**"===t)break;if("object"!=typeof i||null===i){i=void 0;break}i=i[t]}o[e]=i}p("Data Observer",r,e.getMethodCaller(),o,e||void 0)},be=(e,t)=>{if(e.listener)for(let n=0;n<e.listener.length;n+=1)t[e.listener[n]]=!0;if(e.wildcard)for(let n=0;n<e.wildcard.length;n+=1)t[e.wildcard[n]]=!0;const n=Object.keys(e.sub);for(let r=0;r<n.length;r+=1){const o=n[r];be(e.sub[o],t)}},$e=(e,t,n)=>{let r=e,o=!0;for(let e=0;e<n.length;e+=1){const i=n[e];if(r.wildcard){const e=r.wildcard;for(let n=0;n<e.length;n+=1)t[e[n]]=!0}if(!ce.call(r.sub,i)){o=!1;break}r=r.sub[i]}o&&be(r,t)},ye=(e,t,n,r)=>{for(let o=0;o<e.length;o+=1){const{path:i,f:s}=e[o];t[o]&&(t[o]=!1,n&&_e(n,r,i,s))}},Se=e=>e===s.Simple?1:e===s.SimpleWithRecursion?2:0;class Ce{_$generateInnerData(e){const t=this._$pureDataPattern,n=this._$dataDeepCopy;if(t||0!==n){const r={},o=Object.keys(e);for(let i=0;i<o.length;i+=1){const s=o[i],a=e[s];t&&t.test(s)||(r[s]=0===n?a:2===n?ie(a,!0):oe(a))}return r}return null}constructor(e,t,n,r,o,i,s){this._$modelBindingListener=null,this._$pendingChanges=[],this._$doingUpdates=null,this._$recUpdateLevel=0,this._$comp=e,this.data=t,this._$pureDataPattern=n,this._$dataDeepCopy=r,this._$propertyPassingDeepCopy=o,this._$reflectToAttributes=i&&!!e,this._$propFields=s.propFields,this._$observerTree=s,this._$observerStatus=new Array(s.observers.length),this.innerData=this._$generateInnerData(t)}static create(e){return new Ce(null,e,null,0,0,!1,new me({}))}setUpdateListener(e){this._$updateListener=e}replaceWholeData(e){this.data=e,this.innerData=this._$generateInnerData(e)}replaceDataOnPath(e,t){this._$pendingChanges.push([e,t,void 0,void 0])}spliceArrayDataOnPath(e,t,n,r){Array.isArray(r)?this._$pendingChanges.push([e,r,null!=t?t:-1,n||0]):T(`The splice insertion must be a string (on path "${e.join(".")}"). The change is ignored.`)}replaceProperty(e,t){let n=t;return!!this._$propFields[e]&&(0!==this._$propertyPassingDeepCopy&&(n=2===this._$propertyPassingDeepCopy?ie(t,!0):oe(t)),this._$pendingChanges.push([[e],n,!0,void 0]),!0)}setChanges(e){this._$pendingChanges=e}getChanges(){return this._$pendingChanges}setModelBindingListener(e,t){this._$modelBindingListener?this._$modelBindingListener[e]=t:(this._$modelBindingListener=Object.create(null))[e]=t}applyDataUpdates(e=!1){var t;const n=this._$propFields,r=this._$comp,o=this._$pureDataPattern,i=this._$dataDeepCopy,s=!!this._$doingUpdates;let a,l;this._$observerTree.observers.length>0?this._$doingUpdates?(a=this._$doingUpdates.combined,l=this._$doingUpdates.prop):(this._$doingUpdates={prop:[],combined:[],count:0},a=this._$doingUpdates.combined,l=this._$doingUpdates.prop):(a=[],l=[]);const c=this._$pendingChanges;this._$pendingChanges=[];for(let t=0;t<c.length;t+=1){const s=c[t],[u,d,h,f]=s,v=void 0!==f,g=String(u[0]),m=!!o&&o.test(g),_=!m&&this.innerData,b=n[g];let $=!0;if(b&&1===u.length){const t=this.data[g];let n,o,a;if(v){if(Array.isArray(t)){const e=s,r=h;n=r>=0&&r<t.length?r:t.length,e[2]=n,t.splice(n,f,...d)}else T(`An array splice change cannot be applied to a non-array value (on path "${u.join(".")}"). The change is ignored.`);o=t}else o=fe(d,g,b);if(_){let e;if(0===i)s[1]=e=o;else if(void 0!==n){let t;e=this.innerData[g],s[1]=t=2===i?ie(d,!0):oe(d),e.splice(n,f,...t)}else s[1]=e=2===i?ie(o,!0):oe(o);this.innerData[g]=e}if(this.data[g]=o,this._$reflectToAttributes){const e=r.getBackendElement();if(e){let t=o;if(b.reflectIdPrefix){const e=r.ownerShadowRoot;if(e){const n=e.getHostNode()._$idPrefix;n&&(t=`${n}--${o}`)}}const n=g.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`)),i=typeof t;"boolean"===i?o?e.setAttribute(n,""):e.removeAttribute(n):"object"===i?e.setAttribute(n,JSON.stringify(t)):e.setAttribute(n,t)}}v||!0!==h?a=t!==o:(b.comparer?(s[2]=void 0,a=!!p("Property Comparer",b.comparer,r,[d,t],null==r?void 0:r.general())):a=t!==o,$=a),!m&&a&&l.push({propName:g,prop:b,oldValue:t,newValue:o,skipModelListener:e})}else{let t,n=this.data,r=g;for(let e=1;e<u.length;e+=1){const t=u[e];Number.isFinite(t)?(ce.call(n,r)&&Array.isArray(n[r])||(n[r]=[]),_||m||t>=n[r].length&&a.push([u.slice(0,e).concat("length"),!0,void 0,void 0])):ce.call(n,r)&&null!==n[r]&&"object"==typeof n[r]&&!Array.isArray(n[r])||(n[r]={}),n=n[r],r=t}if(v){const e=n.length,o=n[r];if(Array.isArray(o)){const r=s,i=h;t=i>=0&&i<o.length?i:o.length,r[2]=t,o.splice(t,f,...d),_||m||n.length===e||a.push([u.concat("length"),!0,void 0,void 0])}else T(`An array splice change cannot be applied to a non-array value (on path "${u.join(".")}"). The change is ignored.`)}else n[r]=d;if(_){n=this.innerData,r=g;for(let e=1;e<u.length;e+=1){const t=u[e];Number.isFinite(t)?(ce.call(n,r)&&Array.isArray(n[r])||(n[r]=[]),t>=n[r].length&&a.push([u.slice(0,e).concat("length"),!0,void 0,void 0])):ce.call(n,r)&&null!==n[r]&&"object"==typeof n[r]&&!Array.isArray(n[r])||(n[r]={}),n=n[r],r=t}let e;if(0===i)s[1]=e=d;else if(void 0!==t){const o=n.length;let l;e=n[r],s[1]=l=2===i?ie(d,!0):oe(d),e.splice(t,f,...l),n.length!==o&&a.push([u.concat("length"),!0,void 0,void 0])}else s[1]=e=2===i?ie(d,!0):oe(d);n[r]=e}!m&&b&&l.push({propName:g,prop:b,oldValue:void 0,newValue:d,skipModelListener:e||!1})}$e(this._$observerTree.observerRoot,this._$observerStatus,u),!m&&$&&a.push(s),this._$doingUpdates&&(this._$doingUpdates.count+=1)}if(!s){if(this._$doingUpdates){let e;do{e=this._$doingUpdates.count,ye(this._$observerTree.observers,this._$observerStatus,r,this.data)}while(e!==this._$doingUpdates.count);this._$doingUpdates=null}if(this._$recUpdateLevel>0&&r&&T(`recursive update detected: a data update is applying during another data update for component "${r.is}" - this may disorder node trees`,r),this._$recUpdateLevel+=1,null===(t=this._$updateListener)||void 0===t||t.call(this,this.innerData||this.data,a),this._$recUpdateLevel-=1,r)for(let e=0;e<l.length;e+=1){const{propName:t,prop:n,oldValue:o,newValue:i,skipModelListener:s}=l[e];if(!s&&this._$modelBindingListener){const e=this._$modelBindingListener[t];e&&e(i)}n.observer&&p("Property Observer",n.observer,r.getMethodCaller(),[i,o],r),r._$mutationObserverTarget&&ae.callAttrObservers(r,{type:"properties",target:r,nameType:"component-property",propertyName:t})}}}}var we;!function(e){e[e.Normal=0]="Normal",e[e.NoDefault=1]="NoDefault"}(we||(we={}));let Ee=Date.now(),Ne=Ee;var ke,Oe;!function(e){e[e.None=0]="None",e[e.Mut=1]="Mut",e[e.Final=2]="Final"}(ke||(ke={})),function(e){e[e.NotChanged=0]="NotChanged",e[e.Failed=1]="Failed",e[e.None=2]="None",e[e.Final=3]="Final",e[e.Mut=4]="Mut"}(Oe||(Oe={}));class xe{constructor(){this.listeners=Object.create(null),this.captureListeners=null}addListener(e,t,n={}){const r=n.final?2:n.mutated?1:0;let o,i,s;return n.capture||n.useCapture?this.captureListeners?o=this.captureListeners:(o=Object.create(null),this.captureListeners=o):o=this.listeners,o[e]?(s=!0,i=o[e]):(s=!1,i=o[e]={mutCount:0,finalCount:0,funcArr:new d("listener")}),i.funcArr.add(t,r),2===r?(i.finalCount+=1,s&&1!==i.finalCount?0:3):1===r?(i.mutCount+=1,!s||1===i.mutCount&&0===i.finalCount?4:0):s?0:2}removeListener(e,t,n={}){const r=n.capture||n.useCapture?this.captureListeners:this.listeners;if(!r)return 1;const o=r[e];if(!o)return 1;const i=o.funcArr.remove(t);return null===i?1:2===i?(o.finalCount-=1,0!==o.finalCount?0:o.mutCount>0?4:2):1===i?(o.mutCount-=1,0!==o.mutCount||0!==o.finalCount?0:2):0}}let Pe=class e{constructor(e,t,n={}){const r=(()=>{const e=Date.now();return e<Ne&&(Ee+=e-Ne),Ne=e,e-Ee})();this._$eventName=this.type=e,this.timeStamp=r,this.detail=t,this.bubbles=n.bubbles||!1,this.composed=n.composed||!1,this._$capturePhase=n.capturePhase||!1,this._$eventBubblingControl={stopped:!1,mutated:!1,noDefault:!1},this._$originalEvent=n.originalEvent,this._$dispatched=!1,this._$handleListenerReturn=n.handleListenerReturn,n.extraFields&&(Object.assign(this,n.extraFields),this.extraFields=n.extraFields)}getEventBubbleStatus(){return this._$eventBubblingControl.noDefault?1:0}wrapShadowedEvent(e,t,n){const r=Object.create(this);return r.target=e,r.mark=t,r.currentTarget=n,r}getEventName(){return this._$eventName}getOriginalEvent(){return this._$originalEvent}preventDefault(){this._$eventBubblingControl.noDefault=!0}defaultPrevented(){return this._$eventBubblingControl.noDefault}stopPropagation(){this._$eventBubblingControl.stopped=!0}propagationStopped(){return this._$eventBubblingControl.stopped}markMutated(){this._$eventBubblingControl.mutated=!0}mutatedMarked(){return this._$eventBubblingControl.mutated}listenerReturnHandler(){return this._$handleListenerReturn}callListener(e,t,n,r){const o=this._$eventName,i=e._$eventTarget;if(!i)return;const s=r?i.captureListeners:i.listeners;if(!s)return;const a=s[o];if(!a)return;const l=this.mutatedMarked(),c=E(n)&&n.getMethodCaller()||n,u=E(e)&&e.getMethodCaller()||e,d=this.wrapShadowedEvent(c,t,u);!1===a.funcArr.call(u,[d],(e=>!l||1!==e),E(n)?n:void 0,this._$handleListenerReturn)||a.finalCount>0?(d.stopPropagation(),d.preventDefault()):a.mutCount>0&&d.markMutated()}dispatch(e,t){if(this._$dispatched)throw new Error("Event cannot be dispatched twice");this._$dispatched=!0;const n=this.composed,r=this.bubbles,o=t&&!n,i=this._$eventBubblingControl,s=(e,t)=>{const r=e=>{let o=e;const i=e.collectMarks();for(;;){if(!1===t(o,e,i))return null;let s;if(n){if(w(o))return o.getHostNode();if(null===o.containingSlot)return null;if(o.containingSlot)s=r(o.containingSlot);else for(s=o.parentNode;null==s?void 0:s._$inheritSlots;)s=s.parentNode}else s=o.parentNode;if(!s)return null;o=s}};let o=e;for(;;){const e=r(o);if(!e)break;o=e}};if(this._$capturePhase&&!i.stopped&&!o){const t=[];s(e,((e,n,r)=>{t.push([e,n,r])}));for(let e=t.length-1;e>=0;e-=1){const[n,r,o]=t[e];if(n._$eventTarget&&(this.callListener(n,o,r,!0),i.stopped))break}}if(!i.stopped&&t&&E(e)&&e._$external&&e.shadowRoot.handleEvent(t,this),!i.stopped&&!o){let t=!0;s(e,((e,n,o)=>{if(!t&&E(e)&&e._$external){const t=e.shadowRoot;t.handleEvent(t.slot,this)}return t=!1,e._$eventTarget&&this.callListener(e,o,n,!1),r&&!i.stopped}))}}static dispatchEvent(e,t){return t.dispatch(e)}static dispatchExternalEvent(e,t,n){return n.dispatch(e,t)}static triggerEvent(t,n,r,o){const i=new e(n,r,o);e.dispatchEvent(t,i)}static triggerExternalEvent(t,n,r,o,i){const s=new e(r,o,i);e.dispatchExternalEvent(t,n,s)}};var Te;!function(e){e[e.Child=0]="Child",e[e.Descendant=1]="Descendant",e[e.CrossShadowDescendant=2]="CrossShadowDescendant"}(Te||(Te={}));const Ie=e=>{var t;return null===(t=e.ownerShadowRoot)||void 0===t?void 0:t.getHostNode().getRootBehavior().ownerSpace};class Me{static _$parseSegment(e,t){const n=/^(#[_a-zA-Z][-_a-zA-Z0-9:]*|)((?:\.-?[_a-zA-Z][-_a-zA-Z0-9]*)+|)$/.exec(e);if(!n)return null;const r=n[1].slice(1),o=n[2].split(".");return o.shift(),r||o.length?{id:r,classes:o,relation:t}:null}constructor(e){this.unions=[];const t=String(e||"").split(",");for(let e=0;e<t.length;e+=1){const n=t[e].split(/( |\t|>+)/g),r=[];let o=1,i=0;for(;i<n.length;i+=1){const e=n[i];if(!e||" "===e||"\t"===e||">>"===e)continue;if(">"===e[0]){if(1!==o)break;o=3===e.length?2:0;continue}const t=Me._$parseSegment(e,o);if(o=1,!t)break;r.push(t)}i===n.length&&r.length&&this.unions.push(r)}}isEmpty(){return 0===this.unions.length}static _$testSelectorSegment(e,t,n,r,o,i){var s;if(n===e)return!1;const a=r[o];let l=!0;(Ie(n)!==t||a.id&&a.id!==n.id)&&(l=!1);const c=a.classes;for(let e=0;l&&e<c.length;e+=1)(null===(s=n.classList)||void 0===s?void 0:s.contains(c[e]))||(l=!1);if(!l&&0===i)return!1;let u=n;if(l&&0===o){if(null===e)return!0;for(u=u.parentNode;u;u=u.parentNode)if(u===e)return!0;if(2!==i)return!1;u=n,l=!1}const d=l?a.relation:i;do{u.parentNode?u=u.parentNode:2===d?u=w(u)?u.getHostNode():null:2===i?(l=!1,u=w(u)?u.getHostNode():null):u=null,u===e&&(u=null)}while(C(u));if(!u)return!1;if(l){if(Me._$testSelectorSegment(e,t,u,r,o-1,d))return!0;if(2!==i)return!1}return Me._$testSelectorSegment(e,t,u,r,o,i)}testSelector(e,t){if(C(t))return!1;const n=this.unions;let r;if(r=null!==e&&Ie(e)||Ie(t),void 0===r)return!1;for(let o=0;o<n.length;o+=1){const i=n[o];if(Me._$testSelectorSegment(e,r,t,i,i.length-1,0))return!0}return!1}query(e,t){const n=[],r=(e,t,o)=>{if(this.testSelector(e,t)){if(o)return t;n.push(t)}if(E(t)){const n=t.getShadowRoot();if(n){const t=r(e,n,o);if(t&&o)return t}}const i=t.childNodes;for(let t=0;t<i.length;t+=1){const n=i[t];if(y(n)){const t=r(e,n,o);if(t&&o)return t}}return null},o=r(e,e,t);return t?o:n}}var Re;!function(e){e[e.MAIN=0]="MAIN",e[e.TEMPLATE_EXTRA=1]="TEMPLATE_EXTRA",e[e.ANIMATION_EXTRA=2]="ANIMATION_EXTRA",e[e.TEMP_EXTRA=3]="TEMP_EXTRA"}(Re||(Re={}));const Ae={mode:1,destroyed:!0},De={mode:2,destroyed:!0},Le={mode:3,destroyed:!0};class je{constructor(){throw new Error("Element cannot be constructed directly")}_$initialize(e,t,n,r){this._$backendElement=t,this._$destroyOnRemoval=0,this._$nodeTreeContext=r,this._$nodeId="",this._$nodeAttributes=null,this._$nodeSlot="",this._$slotName=null,this._$slotElement=null,this._$slotValues=null,this._$subtreeSlotStart=null,this._$subtreeSlotEnd=null,this._$inheritSlots=!1,this._$placeholderHandlerRemover=void 0,this._$virtual=e,this.dataset={},this._$marks=null,this._$attached=!1,this.classList=null,this._$styleSegments=[],this.parentNode=null,this.parentIndex=-1,this.childNodes=[],this.slotNodes=void 0,this.ownerShadowRoot=n,this._$mutationObserverTarget=null,this._$eventTarget=new xe}get $$(){return this._$backendElement}get id(){return this._$nodeId}set id(e){var t;const n=String(e);if(this._$nodeId!==n){if(this._$nodeId=n,this.ownerShadowRoot){const e=this.ownerShadowRoot.getHostNode();if(this.ownerShadowRoot._$markIdCacheDirty(),e.getComponentOptions().writeIdToDOM){const t=e._$idPrefix,r=t?`${t}--${n}`:n,o=this._$backendElement;o&&(3===this.getBackendMode()?o.id=r:o.setId(r))}}l.writeExtraInfoToAttr&&(null===(t=this._$backendElement)||void 0===t||t.setAttribute("exparser:info-attr-id",n)),this._$mutationObserverTarget&&ae.callAttrObservers(this,{type:"properties",target:this,nameType:"basic",attributeName:"id"})}}get slot(){return this._$nodeSlot}set slot(e){const t=String(e);if(this._$nodeSlot===t)return;if(this._$inheritSlots)throw new Error('slots-inherited nodes do not support "slot" attribute.');this._$nodeSlot=t;const n=je._$getParentHostShadowRoot(this.parentNode);if(n){const e=n.getSlotMode();if(3===e)throw new Error("nodes inside dynamic slots should change binding slots through Element#setSlotElement.");if(0===e)throw new Error("nodes inside direct slots should not change slot name.");const t=je._$updateSubtreeSlotNodes(this.parentNode,[this],n,n,this.parentIndex);null==t||t.removeSlotNodes();const r=this.containingSlot;null==t||t.updateContainingSlot();const o=this.containingSlot;je.insertChildReassign(this.parentNode,this,r,o,this.parentIndex+1),null==t||t.insertSlotNodes()}this._$mutationObserverTarget&&ae.callAttrObservers(this,{type:"properties",target:this,nameType:"basic",attributeName:"slot"})}get attributes(){const e=[];return this._$nodeAttributes&&Object.entries(this._$nodeAttributes).forEach((([t,n])=>{e.push({name:t,value:n})})),e}get class(){return this.classList?this.classList.getClassNames(0):""}set class(e){this.setNodeClass(e,0)}get style(){return this._$styleSegments[0]||""}set style(e){this.setNodeStyle(e,0)}asTextNode(){return null}asElement(){return this}asNativeNode(){return S(this)?this:null}asVirtualNode(){return C(this)?this:null}asShadowRoot(){return w(this)?this:null}asGeneralComponent(){return E(this)?this:null}asInstanceOf(e){return E(this)?this.asInstanceOf(e):null}getBackendContext(){const e=this._$nodeTreeContext;return e===Ae||e===De||e===Le?null:e}getBackendMode(){return this._$nodeTreeContext.mode}getBackendElement(){return this._$backendElement}destroyBackendElement(){this._$backendElement&&(3!==this.getBackendMode()&&this._$backendElement.release(),this._$backendElement=null),2===this.getBackendMode()?this._$nodeTreeContext=De:3===this.getBackendMode()?this._$nodeTreeContext=Le:this._$nodeTreeContext=Ae}destroyBackendElementOnSubtree(){const e=function(t){for(let n=0;n<t.childNodes.length;n+=1){const r=t.childNodes[n];y(r)?e(r):r.destroyBackendElement()}if(E(t)){const n=t.getShadowRoot();n&&e(n)}t.destroyBackendElement()};e(this)}destroyBackendElementOnRemoval(){this._$destroyOnRemoval=1}cancelDestroyBackendElementOnRemoval(){this._$destroyOnRemoval=0}destroyBackendElementOnDetach(){this._$destroyOnRemoval=1}cancelDestroyBackendElementOnDetach(){this._$destroyOnRemoval=0}isVirtual(){return this._$virtual}setNodeClass(e,t=0){var n;(null===(n=this.classList)||void 0===n?void 0:n.setClassNames(e,t))&&this._$mutationObserverTarget&&ae.callAttrObservers(this,{type:"properties",target:this,nameType:"basic",attributeName:"class"})}toggleNodeClass(e,t,n=0){var r;(null===(r=this.classList)||void 0===r?void 0:r.toggle(e,t,n))&&this._$mutationObserverTarget&&ae.callAttrObservers(this,{type:"properties",target:this,nameType:"basic",attributeName:"class"})}setNodeStyle(e,t=0){if(this._$styleSegments[t]===e)return;this._$styleSegments[t]=e;const n=this._$styleSegments.join(";");this._$backendElement&&(3===this.getBackendMode()?this._$backendElement.setAttribute("style",n):this._$backendElement.setStyle(n)),this._$mutationObserverTarget&&ae.callAttrObservers(this,{type:"properties",target:this,nameType:"basic",attributeName:"style"})}static checkAndCallAttached(e){!function e(t){if(y(t)&&!t._$attached){if(t._$attached=!0,E(t)){t.triggerLifetime("attached",[]),t._$relation&&(t._$relation.triggerLinkEvent(2,!1),t._$relation.triggerLinkEvent(4,!1),t._$relation.triggerLinkEvent(0,!1)),t._$mutationObserverTarget&&ae.callAttachObservers(t,{type:"attachStatus",target:t,status:"attached"});const n=t.getShadowRoot();n&&e(n)}const n=t.childNodes;for(let t=0;t<n.length;t+=1)e(n[t])}}(e)}static checkAndCallDetached(e){if(function e(t){if(y(t)&&t._$attached)if(E(t)&&t.triggerLifetime("beforeDetach",[]),t.childNodes.forEach(e),E(t)){const n=t.getShadowRoot();n&&e(n),t._$attached=!1,t.triggerLifetime("detached",[]),t._$relation&&(t._$relation.triggerLinkEvent(2,!0),t._$relation.triggerLinkEvent(4,!0),t._$relation.triggerLinkEvent(0,!0)),t._$mutationObserverTarget&&ae.callAttachObservers(t,{type:"attachStatus",target:t,status:"detached"})}else t._$attached=!1}(e),y(e)){const t=function(n){if(2===e._$destroyOnRemoval)return;for(let e=0;e<n.childNodes.length;e+=1){const r=n.childNodes[e];y(r)?t(r):1===r._$destroyOnRemoval&&(r._$destroyOnRemoval=2,r.destroyBackendElement())}if(E(n)){const e=n.getShadowRoot();e&&t(e)}1===n._$destroyOnRemoval&&(n._$destroyOnRemoval=2,n.destroyBackendElement());const r=n._$placeholderHandlerRemover;"function"==typeof r&&r()};t(e)}else 1===e._$destroyOnRemoval&&(e._$destroyOnRemoval=2,e.destroyBackendElement())}static checkAndCallMoved(e){!function e(t){if(y(t)&&t._$attached&&(t.childNodes.forEach(e),E(t))){const n=t.getShadowRoot();n&&e(n),t.triggerLifetime("moved",[]),t._$relation&&(t._$relation.triggerLinkEvent(2,!1),t._$relation.triggerLinkEvent(4,!1),t._$relation.triggerLinkEvent(0,!1))}}(e)}static checkChildObservers(e,t,n){var r;const o=e._$mutationObserverTarget;if(o&&(!(null===(r=o.childObservers)||void 0===r?void 0:r.empty)||o.hasSubtreeListeners())){const r=[n];let o;o="add"===t?{type:"childList",target:e,addedNodes:r}:"remove"===t?{type:"childList",target:e,removedNodes:r}:{type:"childList",target:e,addedNodes:r,removedNodes:r},ae.callChildObservers(e,o)}}static hasSubtreeMutationObservers(e){var t;return(null===(t=e._$mutationObserverTarget)||void 0===t?void 0:t.hasSubtreeListeners())||!1}static _$insertChildReassignSlot(e,t,n,r){if(n)if(r){const e=[...n.slotNodes];for(let t=0;t<e.length;t+=1){const o=e[t];je._$spliceSlotNodes(n,0,1,void 0),je._$spliceSlotNodes(r,-1,0,[o]),je._$updateContainingSlot(o,r),o._$inheritSlots||je.insertChildReassign(o.parentNode,o,n,r,o.parentIndex)}}else{const e=[...n.slotNodes];for(let t=0;t<e.length;t+=1){const o=e[t];je._$spliceSlotNodes(n,0,1,void 0),je._$updateContainingSlot(o,r),o._$inheritSlots||je.insertChildReassign(o.parentNode,o,n,null,o.parentIndex)}}else{const n=[];e.forEachNodeInSpecifiedSlot(null,(e=>{null!==t&&(y(e)?e._$nodeSlot:"")!==t||n.push(e)}));for(let e=0;e<n.length;e+=1){const t=n[e];je._$spliceSlotNodes(r,-1,0,[t]),je._$updateContainingSlot(t,r),t._$inheritSlots||je.insertChildReassign(t.parentNode,t,null,r,t.parentIndex)}}}static insertChildReassign(e,t,n,r,o){if(1!==e.getBackendMode()){if(n)if(r&&3===e.getBackendMode());else{const r=je.findNearestNonVirtual(n);if(r){const n=je.countNonVirtual(t);if(n){const[t,o]=n;if(3===e.getBackendMode()){const e=t._$backendElement;for(let t=1;t<o;t+=1){const t=e.nextSibling;t&&r.removeChild(t)}o>0&&r.removeChild(e)}else r.spliceRemove(t._$backendElement,o)}}}r&&je.insertChildComposed(e,t,void 0,!1,o)}else t._$backendElement.reassignContainingSlot(n?n._$backendElement:null,r?r._$backendElement:null)}static findNearestNonVirtual(e){let t=e;for(;null==t?void 0:t._$virtual;)t=w(t)?t.getHostNode():void 0===t.containingSlot?t.parentNode:t.containingSlot;return t?t._$backendElement:null}static countNonVirtual(e){let t=null,n=0;const r=e=>{0===n&&(t=e),n+=1};var o;return y(o=e)&&o._$virtual?o.forEachNonVirtualComposedChild(r):r(o),t?[t,n]:null}static forEachNodeInSlot(e,t){const n=e=>{if(!1===t(e,e.containingSlot))return!1;if(e._$inheritSlots){const t=e.childNodes;for(let e=0;e<t.length;e+=1)if(!n(t[e]))return!1;return!0}return!0};return n(e)}static forEachNodeInSpecificSlot(e,t,n){const r=e=>{if(e.containingSlot===t&&!1===n(e))return!1;if(e._$inheritSlots){const t=e.childNodes;for(let e=0;e<t.length;e+=1)if(!r(t[e]))return!1;return!0}return!0};return r(e)}static forEachSlotContentInSlot(e,t){const n=e=>{if(e._$inheritSlots){const t=e.childNodes;for(let e=0;e<t.length;e+=1)if(!n(t[e]))return!1;return!0}return!1!==t(e,e.containingSlot)};return n(e)}static forEachSlotContentInSpecificSlot(e,t,n){const r=e=>{if(e._$inheritSlots){const t=e.childNodes;for(let e=0;e<t.length;e+=1)if(!r(t[e]))return!1;return!0}return e.containingSlot!==t||!1!==n(e)};return r(e)}static _$findFirstNonVirtualChild(e,t){const n=null!==e._$slotName,r=n?e.slotNodes:e.childNodes;if(t>=0&&t<r.length)for(let e=t;e<r.length;e+=1){let t=null;const o=e=>(t=e,!1),i=e=>{if(!n&&e._$inheritSlots){const t=e.childNodes;for(let e=0;e<t.length;e+=1)if(!1===i(t[e]))return!1}return e._$virtual?e.forEachNonVirtualComposedChild(o):o(e)};if(i(r[e]),t)return t}const o=e=>{if(!e._$virtual)return null;const t=e.containingSlot;if(null===t)return null;if(void 0!==t)return je._$findFirstNonVirtualChild(t,e.slotIndex+1);if(w(e))return o(e.getHostNode());const n=e.parentNode;return n?je._$findFirstNonVirtualChild(n,e.parentIndex+1):null};return o(e)}static _$findFirstNonVirtualSibling(e,t){const n=e.containingSlot;if(null===n)return null;if(void 0!==n){if(!n._$virtual)return null;if(void 0!==e.slotIndex)return je._$findFirstNonVirtualChild(n,e.slotIndex+1);const r=je._$findSlotNodeInsertPosition(n,e,t);return je._$findFirstNonVirtualChild(n,r)}let r=e;if(w(e))return r=e.getHostNode(),r._$virtual?je._$findFirstNonVirtualChild(r,r.parentIndex+1):null;const o=r.parentNode;return o?je._$findFirstNonVirtualChild(o,t):null}static insertChildComposed(e,t,n,r,o){var i,s,a;let c=!1,u=e;for(;null==u?void 0:u._$inheritSlots;)c=!0,u=u.parentNode;if(!u)return;const d=u,h=d._$nodeTreeContext;if(h.destroyed)return;let p;E(d)?d._$external?p=d.shadowRoot.slot:c=!0:(d._$virtual&&(c=!0),p=je.findNearestNonVirtual(d));let f=null;const v=(i,s)=>{const a=i||(s?je.findNearestNonVirtual(s):null);if(3!==e.getBackendMode()&&!a)return;let l=0,u=null,d=null,p=null;if(t){const e=f||(3===h.mode?h.document.createDocumentFragment():h.createFragment());f=e;const n=t=>{e.appendChild(t._$backendElement),d=e};je.forEachNodeInSpecificSlot(t,s,(e=>{p||(p=e),e._$virtual?e.forEachNonVirtualComposedChild(n):n(e)}))}if(3!==e.getBackendMode()||a){if((n||c)&&(r&&n?(je.forEachSlotContentInSpecificSlot(n,s,(e=>{if(y(e)){const t=je.countNonVirtual(e);t&&(u||(u=t[0]),l+=t[1])}else u||(u=e),l+=1;return!0})),0===l&&d&&p&&(u=je._$findFirstNonVirtualSibling(void 0===s?t:p,o+1))):d&&p&&(u=je._$findFirstNonVirtualSibling(void 0===s?t:p,o))),d)if(u)if(3===h.mode){const e=u._$backendElement;a.insertBefore(d,e);for(let t=1;t<l;t+=1){const t=e.nextSibling;t&&a.removeChild(t)}l>0&&a.removeChild(e)}else a.spliceBefore(u._$backendElement,l,d);else 3===h.mode?a.appendChild(d):a.spliceAppend(d);else if(l>0)if(3===h.mode){const e=u._$backendElement;for(let t=1;t<l;t+=1){const t=e.nextSibling;t&&a.removeChild(t)}l>0&&a.removeChild(e)}else a.spliceRemove(u._$backendElement,l)}else f=null};if(void 0!==p)null===p||(c||y(t)&&t._$virtual||y(n)&&n._$virtual?v(p,void 0):r?t?p.replaceChild(t._$backendElement,n._$backendElement):p.removeChild(n._$backendElement):n?p.insertBefore(t._$backendElement,n._$backendElement):p.appendChild(t._$backendElement));else if(t&&t._$inheritSlots||r&&n&&n._$inheritSlots){const e=new Set;r&&n&&je.forEachSlotContentInSlot(n,((t,n)=>{e.add(n)})),t&&je.forEachSlotContentInSlot(t,((t,n)=>{e.add(n)})),e.forEach((e=>v(null,e)))}else t&&v(null,t.containingSlot),!r||!n||t&&n.containingSlot===t.containingSlot||v(null,n.containingSlot);3!==h.mode&&f&&f.release(),l.writeExtraInfoToAttr&&(r&&y(n)&&(null===(i=n._$backendElement)||void 0===i||i.removeAttribute("exparser:info-in-slot-of")),y(t)&&(E(e)?null===(s=t._$backendElement)||void 0===s||s.setAttribute("exparser:info-in-slot-of",e._$componentInstanceId):null===(a=t._$backendElement)||void 0===a||a.removeAttribute("exparser:info-in-slot-of")))}static _$updateSubtreeSlotsInsertion(e,t,n,r,o){if(!t||!n)return;let i=e,s=null,a=null;const l=(e,t)=>{if(e._$subtreeSlotStart){const n=e.childNodes;let r=t+1,o=n[r];for(;o&&!o._$subtreeSlotStart;)r+=1,o=n[r];return void(o?(a=o._$subtreeSlotStart,s=a.prev):(s=e._$subtreeSlotEnd,s&&(a=s.next)))}let n=e,r=e.parentNode;for(;r&&!r._$subtreeSlotStart;)n=r,r=r.parentNode;r&&l(r,n.parentIndex)};for(l(i,r),s&&(s.next=t,t.prev=s),a&&(a.prev=n,n.next=a);i;){let e=!1;if(i._$subtreeSlotStart?i._$subtreeSlotStart===a?(i._$subtreeSlotStart=t,e=!0):i._$subtreeSlotEnd===s&&(i._$subtreeSlotEnd=n,e=!0):(i._$subtreeSlotStart=t,i._$subtreeSlotEnd=n,e=!0),!e||!i.parentNode)break;i=i.parentNode}const c=i.ownerShadowRoot;(null==c?void 0:c.isConnected(i))&&c._$applySlotsInsertion(t,n,o)}static _$updateSubtreeSlotsRemoval(e,t,n,r){if(!t||!n)return;let o=e;const i=t.prev,s=n.next;for(i&&(i.next=s,t.prev=null),s&&(s.prev=i,n.next=null);o;){let e=!1;if(o._$subtreeSlotStart===t&&o._$subtreeSlotEnd===n&&(o._$subtreeSlotStart=o._$subtreeSlotEnd=null,e=!0),o._$subtreeSlotStart===t?(o._$subtreeSlotStart=s,e=!0):o._$subtreeSlotEnd===n&&(o._$subtreeSlotEnd=i,e=!0),!e||!o.parentNode)break;o=o.parentNode}const a=o.ownerShadowRoot;(null==a?void 0:a.isConnected(o))&&a._$applySlotsRemoval(t,n,r)}static _$updateSubtreeSlotsReplacement(e,t,n,r,o,i,s){if(!t||!n)return void je._$updateSubtreeSlotsRemoval(e,r,o,s);if(!r||!o)return void je._$updateSubtreeSlotsInsertion(e,t,n,i,s);let a=e;const l=r.prev,c=o.next;for(l&&(l.next=t,t.prev=l,r.prev=null),c&&(c.prev=n,n.next=c,o.next=null);a;){let e=!1;if(a._$subtreeSlotStart===r&&(a._$subtreeSlotStart=t,e=!0),a._$subtreeSlotEnd===o&&(a._$subtreeSlotEnd=n,e=!0),!e||!a.parentNode)break;a=a.parentNode}const u=a.ownerShadowRoot;(null==u?void 0:u.isConnected(a))&&(u._$applySlotsRemoval(r,o,!1),u._$applySlotsInsertion(t,n,s))}static _$updateSubtreeSlotNodes(e,t,n,r,o){if(!n&&!r)return;const i=null==n?void 0:n.getSlotMode(),s=null==r?void 0:r.getSlotMode();if(!(void 0!==i&&0!==i||void 0!==s&&0!==s))return;if(!(void 0!==i&&1!==i||void 0!==s&&1!==s)){let e=-1,i=0,s=-1;const a=[],l=t[0].containingSlot,c=null==n?void 0:n.getContainingSlot(t[0]);for(let n=0;n<t.length;n+=1){const r=t[n];je.forEachNodeInSlot(r,(t=>{l&&(i?i+=1:(e=t.slotIndex,i=1)),a.push(t)}))}if(c&&a.length){const e=a[0];s=je._$findSlotNodeInsertPosition(c,e,o)}return{updateContainingSlot:()=>{for(let e=a.length-1;e>=0;e-=1){const t=a[e];je._$updateContainingSlot(t,c)}},removeSlotNodes:()=>{r&&l&&i&&je._$spliceSlotNodes(l,e,i,void 0)},insertSlotNodes:()=>{n&&c&&a.length&&je._$spliceSlotNodes(c,s,0,a)}}}const a=new Map,l=new Map,c=[];for(let e=0;e<t.length;e+=1){const r=t[e];je.forEachNodeInSlot(r,((e,t)=>{const r=0!==i?null==n?void 0:n.getContainingSlot(e):void 0;if(t){const n=l.get(t);n?n.count+=1:l.set(t,{start:e.slotIndex,count:1})}if(r){const t=a.get(r);t?t.nodes.push(e):a.set(r,{nodes:[e],insertPos:-1})}c.push([e,r])}))}if(n&&a.size){const e=a.entries();for(let t=e.next();!t.done;t=e.next()){const[e,{nodes:n}]=t.value,r=n[0];t.value[1].insertPos=je._$findSlotNodeInsertPosition(e,r,o)}}return{updateContainingSlot:()=>{for(let e=c.length-1;e>=0;e-=1){const[t,n]=c[e];je._$updateContainingSlot(t,n)}},removeSlotNodes:()=>{if(r&&l.size){const e=l.entries();for(let t=e.next();!t.done;t=e.next()){const[e,{start:n,count:r}]=t.value;je._$spliceSlotNodes(e,n,r,void 0)}}},insertSlotNodes:()=>{if(n&&a.size){const e=a.entries();for(let t=e.next();!t.done;t=e.next()){const[e,{nodes:n,insertPos:r}]=t.value;je._$spliceSlotNodes(e,r,0,n)}}}}}static insertChildSingleOperation(e,t,n,r){var o,i,s,a,l;if(t&&e.ownerShadowRoot!==t.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");let c=n;const u=c>=0?e.childNodes[c]:void 0;let d,h;if(d=!!r&&!!u&&t!==u,!d&&!t)return;if(t){if(h=t.parentNode,h){const n=h.childNodes,r=t.parentIndex;n.splice(r,1);for(let e=r;e<n.length;e+=1)n[e].parentIndex=e;t.parentIndex=-1,h===e&&r<c&&(c-=1);const i=je._$updateSubtreeSlotNodes(e,[t],null,je._$getParentHostShadowRoot(h),c);null==i||i.removeSlotNodes(),3===e.getBackendMode()||(1===e.getBackendMode()?null===(o=h._$backendElement)||void 0===o||o.removeChild(t._$backendElement,r):je.insertChildComposed(h,null,t,!0,r)),null==i||i.updateContainingSlot()}t.parentNode=e,h!==e&&(h&&(null===(i=h._$mutationObserverTarget)||void 0===i||i.detachChild(t)),null===(s=e._$mutationObserverTarget)||void 0===s||s.attachChild(t))}else h=null;const p=je._$getParentHostShadowRoot(e),f=t?je._$updateSubtreeSlotNodes(e,[t],p,null,c):null,v=u&&d?je._$updateSubtreeSlotNodes(e,[u],null,p,c):null;if(null==f||f.updateContainingSlot(),null==v||v.removeSlotNodes(),1===e.getBackendMode()){if(e._$backendElement)if(d)t?e._$backendElement.replaceChild(t._$backendElement,u._$backendElement,c):e._$backendElement.removeChild(u._$backendElement,c);else{const n=e.childNodes[c];n?e._$backendElement.insertBefore(t._$backendElement,n._$backendElement,c):e._$backendElement.appendChild(t._$backendElement)}}else je.insertChildComposed(e,t,u,d,c);null==f||f.insertSlotNodes(),null==v||v.updateContainingSlot(),d&&u&&(y(u)&&(null===(a=e._$mutationObserverTarget)||void 0===a||a.detachChild(u)),u.parentNode=null,u.parentIndex=-1);const g=e.childNodes;if(t)if(c<0)g.push(t),t.parentIndex=g.length-1;else if(d)g[c]=t,t.parentIndex=c;else{g.splice(c,0,t);for(let e=c;e<g.length;e+=1)g[e].parentIndex=e}else if(d){g.splice(c,1);for(let e=c;e<g.length;e+=1)g[e].parentIndex=e}const m=t?t._$subtreeSlotStart:null,_=t?t._$subtreeSlotEnd:null,b=u?u._$subtreeSlotStart:null,$=u?u._$subtreeSlotEnd:null;t?(h&&je._$updateSubtreeSlotsRemoval(h,m,_,!0),d?je._$updateSubtreeSlotsReplacement(e,m,_,b,$,c,!!h):je._$updateSubtreeSlotsInsertion(e,m,_,c,!!h)):d&&u&&je._$updateSubtreeSlotsRemoval(e,b,$,!1),null===(l=e.ownerShadowRoot)||void 0===l||l._$markIdCacheDirty(),d&&(je.checkAndCallDetached(u),je.checkChildObservers(e,"remove",u)),t&&((null==h?void 0:h._$attached)?e._$attached?je.checkAndCallMoved(t):je.checkAndCallDetached(t):e._$attached&&je.checkAndCallAttached(t),h===e?je.checkChildObservers(e,"move",t):(h&&je.checkChildObservers(h,"remove",t),je.checkChildObservers(e,"add",t)))}static insertChildBatchRemoval(e,t,n){var r,o;const i=e.childNodes[t];let s=e;for(;null==s?void 0:s._$inheritSlots;)s=s.parentNode;const a=E(s)&&!s._$external?s.shadowRoot:null,l=e.childNodes,c=l.splice(t,n);for(let e=t;e<l.length;e+=1)l[e].parentIndex=e;const u=je._$updateSubtreeSlotNodes(e,c,null,a,t);if(null==u||u.removeSlotNodes(),1===e.getBackendMode())e._$backendElement&&e._$backendElement.spliceRemove(i._$backendElement,n);else for(let t=n-1;t>=0;t-=1)je.insertChildComposed(e,null,c[t],!0,t);for(let t=0;t<n;t+=1){const n=c[t];n.parentNode=null,n.parentIndex=-1,y(n)&&(null===(r=e._$mutationObserverTarget)||void 0===r||r.detachChild(n))}null==u||u.updateContainingSlot();let d=null,h=null;for(let e=0;e<n;e+=1){const t=c[e];d||(d=t._$subtreeSlotStart),t._$subtreeSlotEnd&&(h=t._$subtreeSlotEnd)}je._$updateSubtreeSlotsRemoval(e,d,h,!1),null===(o=e.ownerShadowRoot)||void 0===o||o._$markIdCacheDirty();for(let t=0;t<n;t+=1){const n=c[t];je.checkAndCallDetached(n),je.checkChildObservers(e,"remove",n)}}static insertChildBatchInsertion(e,t,n){var r,o;const i=n>=0?e.childNodes[n]:void 0;let s=e;for(;null==s?void 0:s._$inheritSlots;)s=s.parentNode;const a=E(s)&&!s._$external?s.shadowRoot:null;let l;l=1===e.getBackendMode()&&t.length>=5?e.getBackendContext().createFragment():null;for(let n=0;n<t.length;n+=1){const o=t[n];if(e.ownerShadowRoot!==o.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");if(o.parentNode)throw new Error("Cannot batch-insert the node which already has a parent.");if(o.parentNode=e,null===(r=e._$mutationObserverTarget)||void 0===r||r.attachChild(o),1===e.getBackendMode()&&l){const e=o._$backendElement;l.appendChild(e)}}const c=je._$updateSubtreeSlotNodes(e,t,a,null,n);if(null==c||c.updateContainingSlot(),1===e.getBackendMode()){if(e._$backendElement)if(l)i?e._$backendElement.spliceBefore(i._$backendElement,0,l):e._$backendElement.spliceAppend(l),l.release();else if(i)for(let n=0;n<t.length;n+=1){const r=t[n];e._$backendElement.insertBefore(r._$backendElement,i._$backendElement)}else for(let n=0;n<t.length;n+=1){const r=t[n];e._$backendElement.appendChild(r._$backendElement)}}else{const r=n>=0?n:e.childNodes.length;for(let n=0;n<t.length;n+=1){const o=t[n];je.insertChildComposed(e,o,i,!1,r)}}null==c||c.insertSlotNodes();const u=e.childNodes;if(i){u.splice(n,0,...t);for(let e=n;e<u.length;e+=1)u[e].parentIndex=e}else{u.push(...t);for(let e=u.length-t.length;e<u.length;e+=1)u[e].parentIndex=e}let d=null,h=null;for(let e=0;e<t.length;e+=1){const n=t[e],r=n._$subtreeSlotStart,o=n._$subtreeSlotEnd;r&&(h?(r.prev=h,h.next=r,h=o):(d=r,h=o))}je._$updateSubtreeSlotsInsertion(e,d,h,n+t.length-1,!1),null===(o=e.ownerShadowRoot)||void 0===o||o._$markIdCacheDirty();for(let n=0;n<t.length;n+=1){const r=t[n];e._$attached&&je.checkAndCallAttached(r),je.checkChildObservers(e,"add",r)}}static insertChildPlaceholderReplace(e,t,n){var r,o,i,s,a,l;if(n&&e.ownerShadowRoot!==n.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");if(n.parentNode)throw new Error("Cannot replace with the node which already has a parent.");const c=e.childNodes[t];if(!y(c))throw new Error("Cannot replace on text nodes.");if(null!==c._$slotName||null!==n._$slotName)throw new Error("Cannot replace on slot nodes.");if(c===n)return;let u;u=1===e.getBackendMode()?e.getBackendContext().createFragment():null;const d=c.childNodes;if(1===e.getBackendMode()&&d.length>0){const e=c._$backendElement;e&&e.spliceRemove(d[0]._$backendElement,d.length)}for(let t=0;t<d.length;t+=1){const i=d[t];if(3===e.getBackendMode());else if(1===e.getBackendMode()){const e=i._$backendElement;u.appendChild(e)}else je.insertChildComposed(c,null,i,!0,t);i.parentNode=n,null===(r=c._$mutationObserverTarget)||void 0===r||r.detachChild(i),null===(o=e._$mutationObserverTarget)||void 0===o||o.attachChild(i)}c.childNodes=[],c.parentNode=null,c.parentIndex=-1,n.parentNode=e;const h=c.containingSlot,p=c.slotIndex;void 0!==h&&(je._$updateContainingSlot(n,h),h&&je._$spliceSlotNodes(h,p,1,void 0));const f=d.length?je._$updateSubtreeSlotNodes(n,d,je._$getParentHostShadowRoot(n),je._$getParentHostShadowRoot(c),0):null;if(null==f||f.updateContainingSlot(),null==f||f.removeSlotNodes(),e.childNodes[t]=n,n.parentIndex=t,1===e.getBackendMode())e._$backendElement&&(e._$backendElement.replaceChild(n._$backendElement,c._$backendElement,t),null===(i=n._$backendElement)||void 0===i||i.spliceAppend(u)),u.release();else{je.insertChildComposed(e,n,c,!0,t);for(let e=0;e<d.length;e+=1){const t=d[e];je.insertChildComposed(n,t,void 0,!1,e)}}null==f||f.insertSlotNodes(),void 0!==h&&(je._$updateContainingSlot(c,void 0),h&&je._$spliceSlotNodes(h,p,0,[n])),n._$subtreeSlotStart=c._$subtreeSlotStart,n._$subtreeSlotEnd=c._$subtreeSlotEnd,null===(s=e._$mutationObserverTarget)||void 0===s||s.detachChild(c),null===(a=e._$mutationObserverTarget)||void 0===a||a.attachChild(n),n.childNodes.push(...d);for(let e=n.childNodes.length-d.length;e<n.childNodes.length;e+=1)n.childNodes[e].parentIndex=e;if(null===(l=e.ownerShadowRoot)||void 0===l||l._$markIdCacheDirty(),e._$attached){je.checkAndCallDetached(c),je.checkChildObservers(e,"remove",c),je.checkAndCallAttached(n),je.checkChildObservers(e,"add",n);for(let t=0;t<d.length;t+=1){const n=d[t];je.checkAndCallMoved(n),je.checkChildObservers(e,"move",n)}}}appendChild(e){je.insertChildSingleOperation(this,e,this.childNodes.length,!1)}insertChildAt(e,t){je.insertChildSingleOperation(this,e,t,!1)}insertBefore(e,t){const n=t?t.parentIndex:-1;je.insertChildSingleOperation(this,e,n,!1)}removeChildAt(e){je.insertChildSingleOperation(this,null,e,!0)}removeChild(e){const t=e.parentIndex;je.insertChildSingleOperation(this,null,t,!0)}replaceChildAt(e,t){je.insertChildSingleOperation(this,e,t,!0)}replaceChild(e,t){const n=t.parentIndex;je.insertChildSingleOperation(this,e,n,!0)}insertChildren(e,t){je.insertChildBatchInsertion(this,e,t)}removeChildren(e,t){je.insertChildBatchRemoval(this,e,t)}selfReplaceWith(e){const t=this.parentNode;t&&je.insertChildPlaceholderReplace(t,this.parentIndex,e)}static _$generateIdMap(e){const t=Object.create(null);return function e(n){if(y(n)){const r=n._$nodeId;r&&(t[r]||(t[r]=n)),n.childNodes.forEach(e)}}(e),t}triggerEvent(e,t,n){Pe.triggerEvent(this,e,t,n)}dispatchEvent(e){Pe.dispatchEvent(this,e)}_$setListenerStats(e,t,n={}){if(!this._$backendElement)return;const r=!!n.capture||!!n.useCapture;let o;switch(t){case 2:o=0;break;case 4:o=1;break;case 3:o=2;break;default:return}this._$nodeTreeContext&&(3===this.getBackendMode()?this._$nodeTreeContext.setListenerStats(this._$backendElement,e,r,o):this._$backendElement.setListenerStats(e,r,o))}addListener(e,t,n){const r=this._$eventTarget.addListener(e,t,n);this._$setListenerStats(e,r,n),E(this)&&this._$definition._$options.listenerChangeLifetimes&&this.triggerLifetime("listenerChange",[!0,e,t,n])}removeListener(e,t,n){const r=this._$eventTarget.removeListener(e,t,n);1!==r&&(this._$setListenerStats(e,r,n),E(this)&&this._$definition._$options.listenerChangeLifetimes&&this.triggerLifetime("listenerChange",[!1,e,t,n]))}getAttribute(e){return this._$nodeAttributes&&Object.prototype.hasOwnProperty.call(this._$nodeAttributes,e)?this._$nodeAttributes[e]:null}updateAttribute(e,t){this.setAttribute(e,t)}setAttribute(e,t){let n;this._$nodeAttributes?n=this._$nodeAttributes:(n=Object.create(null),this._$nodeAttributes=n),n[e]=t;const r=this._$backendElement;r&&(3===this.getBackendMode()?!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t||null==t?"":String(t)):r.setAttribute(e,t)),this._$mutationObserverTarget&&ae.callAttrObservers(this,{type:"properties",target:this,nameType:"attribute",attributeName:e})}removeAttribute(e){this._$nodeAttributes&&delete this._$nodeAttributes[e];const t=this._$backendElement;t&&t.removeAttribute(e),this._$mutationObserverTarget&&ae.callAttrObservers(this,{type:"properties",target:this,nameType:"attribute",attributeName:e})}setDataset(e,t){this.dataset[e]=t,1===this.getBackendMode()&&this._$backendElement.setDataset(e,t),this._$mutationObserverTarget&&ae.callAttrObservers(this,{type:"properties",target:this,nameType:"dataset",attributeName:`data:${e}`})}setMark(e,t){if(this._$marks)this._$marks[e]=t;else{const n={};n[e]=t,this._$marks=n}this._$mutationObserverTarget&&ae.callAttrObservers(this,{type:"properties",target:this,nameType:"mark",attributeName:`mark:${e}`})}collectMarks(){const e={};let t;for(t=this;t;t=t.parentNode){const n=t._$marks;n&&Object.keys(n).forEach((t=>{Object.prototype.hasOwnProperty.call(e,t)||(e[t]=n[t])}))}return e}static replaceDocumentElement(e,t,n){if(e._$attached)throw new Error("An attached element cannot be attached again");e._$backendElement&&t.replaceChild(e._$backendElement,n),je.checkAndCallAttached(e)}static pretendAttached(e){e._$attached||je.checkAndCallAttached(e)}static pretendDetached(e){e._$attached&&je.checkAndCallDetached(e)}static isAttached(e){return e._$attached}static setSlotName(e,t){var n;if(e._$inheritSlots)throw new Error("Slot-inherit mode is not usable in slot element");const r=t?String(t):"",o=e._$slotName;if(o===r)return;const i=null===o;e._$slotName=r,i&&(e._$subtreeSlotStart=e._$subtreeSlotEnd={value:e,prev:null,next:null}),1===e.getBackendMode()&&(null===(n=e._$backendElement)||void 0===n||n.setSlotName(r));const s=e.ownerShadowRoot;if(s)if(i){3===s.getSlotMode()&&(e._$slotValues=Object.create(null)),e.slotNodes=[];const t=e.parentNode;t&&je._$updateSubtreeSlotsInsertion(t,e._$subtreeSlotStart,e._$subtreeSlotEnd,e.parentIndex,!1)}else s.isConnected(e)&&s._$applySlotRename(e,r,o);e._$mutationObserverTarget&&ae.callAttrObservers(e,{type:"properties",target:e,nameType:"basic",attributeName:"name"})}static getSlotName(e){const t=e._$slotName;return null===t?void 0:t}static setInheritSlots(e){if(!e._$virtual)throw new Error("Cannot set slot-inherit on non-virtual node");if(null!==e._$slotName||0!==e.childNodes.length)throw new Error("Slot-inherit mode cannot be set when the element has any child node");if(1===e.getBackendMode()){const t=e._$backendElement;t&&t.setInheritSlots()}e._$inheritSlots=!0}static getInheritSlots(e){return e._$inheritSlots}isInheritSlots(){return this._$inheritSlots}static setSlotElement(e,t){if(e._$slotElement===t)return;e._$slotElement=t;const n=je._$getParentHostShadowRoot(e.parentNode);if(n){const t=je._$updateSubtreeSlotNodes(e.parentNode,[e],n,n,e.parentIndex),r=e.containingSlot;null==t||t.updateContainingSlot(),null==t||t.removeSlotNodes();const o=e.containingSlot,i=e=>{if(y(e)&&e._$inheritSlots)for(let t=0;t<e.childNodes.length;t+=1)i(e.childNodes[t]);else je.insertChildReassign(e.parentNode,e,r,o,e.parentIndex)};i(e),null==t||t.insertSlotNodes()}}static _$updateContainingSlot(e,t){var n;e.containingSlot=t,1===(null===(n=e.ownerShadowRoot)||void 0===n?void 0:n.getBackendMode())&&e._$backendElement.setContainingSlot(t?t._$backendElement:t)}static _$spliceSlotNodes(e,t,n,r){const o=e.slotNodes=e.slotNodes||[],i=t>=0&&t<o.length;if(null==r?void 0:r.length)if(i){for(let e=t;e<t+n;e+=1)o[e].slotIndex=void 0;o.splice(t,n,...r);for(let e=t;e<o.length;e+=1)o[e].slotIndex=e}else{const e=o.length;o.push(...r);for(let t=e;t<o.length;t+=1)o[t].slotIndex=t}else if(n){for(let e=t;e<t+n;e+=1)o[e].slotIndex=void 0;o.splice(t,n);for(let e=t;e<o.length;e+=1)o[e].slotIndex=e}if(1===e.getBackendMode())if(null==r?void 0:r.length){const o=e._$nodeTreeContext.createFragment();for(let e=0;e<r.length;e+=1)o.appendChild(r[e]._$backendElement);i?e._$backendElement.spliceBeforeSlotNodes(t,n,o):e._$backendElement.spliceAppendSlotNodes(o),o.release()}else n&&e._$backendElement.spliceRemoveSlotNodes(t,n)}static _$findSlotNodeInsertPosition(e,t,n){const r=e.ownerShadowRoot.getHostNode(),o=e=>{let t=0,n=e;for(;n&&n!==r;)t+=1,n=n.parentNode;return t},i=o(t),s=(e,t,n,r,o,i,a)=>{if(e===r)return 0;if(e.parentNode===r.parentNode)return t-(-1===o?a:o);if(i<n){const t=e.parentNode;return s(t,t.parentIndex,n-1,r,o,i,a)}const l=n<i?e:e.parentNode,c=n<i?n:n-1,u=r.parentNode,d=i-1,h=s(l,l.parentIndex,c,u,u.parentIndex,d,a);return 0===h?-1:h},a=e.slotNodes;let l=a.length-1;for(;l>=0;l-=1){const e=a[l];if(s(e,e.parentIndex,o(e),t,t.parentIndex,i,n>=0?n-.5:a.length)<0)break}return l+1}getComposedParent(){if(w(this))return this.getHostNode();if(void 0!==this.containingSlot)return this.containingSlot;let e=this.parentNode;for(;null==e?void 0:e._$inheritSlots;)e=e.parentNode;return e}getComposedChildren(){const e=[];return this.forEachComposedChild((t=>{e.push(t)})),e}forEachComposedChild(e){if(this._$inheritSlots)return!0;if(E(this)&&!this._$external)return!1!==e(this.shadowRoot);if(null!==this._$slotName){const t=this.ownerShadowRoot;return!t||t.forEachNodeInSpecifiedSlot(this,e)}const t=n=>{for(let r=0;r<n.length;r+=1){const o=n[r];if(!1===e(o))return!1;if(o._$inheritSlots&&!t(o.childNodes))return!1}return!0};return t(this.childNodes)}*iterateComposedChild(){if(this._$inheritSlots)return;if(E(this)&&!this._$external)return void(yield this.shadowRoot);if(null!==this._$slotName){if(!this.ownerShadowRoot)return;const e=this.slotNodes;for(let t=0;t<e.length;t+=1)yield e[t];return}const e=function*(t){for(let n=0;n<t.length;n+=1){const r=t[n];yield r,r._$inheritSlots&&(yield*e(r.childNodes))}};yield*e(this.childNodes)}forEachNonVirtualComposedChild(e){if(this._$inheritSlots)return!0;const t=t=>t._$virtual?t.forEachNonVirtualComposedChild(e):!1!==e(t);if(E(this)&&!this._$external)return t(this.shadowRoot);if(null!==this._$slotName){const e=this.ownerShadowRoot;return!e||e.forEachSlotContentInSpecifiedSlot(this,t)}const n=e=>{for(let r=0;r<e.length;r+=1){const o=e[r];if(!t(o))return!1;if(o._$inheritSlots&&!n(o.childNodes))return!1}return!0};return n(this.childNodes)}static parseSelector(e){return new Me(e)}querySelector(e){return(e instanceof Me?e:new Me(e)).query(this,!0)}querySelectorAll(e){return(e instanceof Me?e:new Me(e)).query(this,!1)}static matchSelector(e,t){return(e instanceof Me?e:new Me(e)).testSelector(null,t)}matchSelector(e,t){return(e instanceof Me?e:new Me(e)).testSelector(this,t)}getBoundingClientRect(e){var t;const n=this._$backendElement;if(n)if(3===this.getBackendMode()){const r=n,o=(null===(t=r.getBoundingClientRect)||void 0===t?void 0:t.call(r))||{left:0,top:0,width:0,height:0};setTimeout((()=>{e(o)}),0)}else{const t=n;t.getBoundingClientRect?t.getBoundingClientRect(e):setTimeout((()=>{e({left:0,top:0,width:0,height:0})}),0)}else setTimeout((()=>{e({left:0,top:0,width:0,height:0})}),0)}getScrollOffset(e){const t=this._$backendElement;if(t)if(3===this.getBackendMode()){const n=t,r={scrollLeft:n.scrollLeft||0,scrollTop:n.scrollTop||0,scrollWidth:n.scrollWidth||0,scrollHeight:n.scrollHeight||0};setTimeout((()=>{e(r)}),0)}else{const n=t;n.getScrollOffset?n.getScrollOffset(e):setTimeout((()=>{e({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)}else setTimeout((()=>{e({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)}createIntersectionObserver(e,t,n,r){const o=this._$backendElement;if(o){if(e&&!e._$backendElement)return null;if(3===this.getBackendMode()){const i=this._$nodeTreeContext;return i&&i.createIntersectionObserver?i.createIntersectionObserver(o,(null==e?void 0:e._$backendElement)||null,t,n,r):null}const i=o;return i.createIntersectionObserver?i.createIntersectionObserver((null==e?void 0:e._$backendElement)||null,t,n,r):null}return null}getContext(e){const t=this._$backendElement;if(t)if(3===this.getBackendMode()){const n=this._$nodeTreeContext;(null==n?void 0:n.getContext)?n.getContext(t,e):e(null)}else{const n=t;n.getContext?n.getContext(e):e(null)}}}var Be;je.isElement=y,je._$getParentHostShadowRoot=e=>{let t=e;for(;null==t?void 0:t._$inheritSlots;)t=t.parentNode;return E(t)&&!t._$external?t.shadowRoot:null},je.prototype[v]=!0,function(e){e[e.Ancestor=0]="Ancestor",e[e.Descendant=1]="Descendant",e[e.ParentNonVirtualNode=2]="ParentNonVirtualNode",e[e.ChildNonVirtualNode=3]="ChildNonVirtualNode",e[e.ParentComponent=4]="ParentComponent",e[e.ChildComponent=5]="ChildComponent"}(Be||(Be={}));const Fe=(e,t,n,r)=>{const o=e=>"function"==typeof e?e:(void 0!==e&&T(`the "${n}" relation listener is not a function (when preparing behavior "${t}").`),null);let i;if("parent"===r.type)i=4;else if("child"===r.type)i=5;else if("parent-common-node"===r.type)i=2;else if("child-common-node"===r.type)i=3;else if("ancestor"===r.type)i=0;else{if("descendant"!==r.type){const e=r.type;return T(`the "${n}" relation has an invalid relation type "${e}" (when preparing behavior "${t}").`),null}i=1}let s=null;if(r.target instanceof _t)s=r.target.behavior;else if(r.target instanceof Ct||r.target instanceof q)s=r.target;else{const o=String(r.target||n),i=e.getComponentByUrlWithoutDefault(o,t);if(i)s=i.behavior;else{const t=e.getGlobalUsingComponent(o);"object"==typeof t&&null!==t&&(s=t.behavior)}}return s?{target:s,type:i,linked:o(r.linked),linkChanged:o(r.linkChanged),unlinked:o(r.unlinked),linkFailed:o(r.linkFailed)}:(T(`the target of relation "${n}" is not a valid behavior or component (when preparing behavior "${t}").`),null)};class Ue{constructor(e,t){this._$comp=e;const n=new Array(6);if(t)for(let e=0;e<6;e+=1){const r=t.definitions[e];if(r){const t=new Array(r.length);for(let e=0;e<r.length;e+=1)t[e]=null;n[e]=t}}this._$group=t,this._$sharedGroup=!0,this._$links=n}add(e){if(this._$sharedGroup){this._$sharedGroup=!1;const e=this._$group;this._$group=e?{definitions:e.definitions.slice(),keyMap:Object.assign(Object.create(null),e.keyMap)}:{definitions:new Array(6),keyMap:Object.create(null)}}const t=Symbol(""),n=this._$group.definitions,r=this._$group.keyMap,o=e.type;n[o]?(r[t]=[o,n[o].length],n[o].push(e)):(r[t]=[o,0],n[o]=[e]);const i=this._$links;return void 0===i[o]?i[o]=[null]:i[o].push(null),t}triggerLinkEvent(e,t){var n,r;const o=this._$comp,i=this._$links,s=null===(n=this._$group)||void 0===n?void 0:n.definitions[e];if(s)for(let n=0;n<s.length;n+=1){const a=i[e],l=a[n];let c=null;const u=s[n],d=u.target;if(!t){let t=o;for(;;){const n=t.parentNode;if(!n)break;if(t=n,!C(t)){if(E(t)){if(t.hasBehavior(d)){const n=t._$relation;if(n){let o;o=4===e?5:0===e?1:3;const i=null===(r=n._$group)||void 0===r?void 0:r.definitions[o];if(i){for(let e=0;e<i.length;e+=1){const n=i[e];if(n.target&&this._$comp.hasBehavior(n.target)){c={target:t,def:n};break}}if(c)break}}}if(4===e)break}if(2===e)break}}}if(a[n]=c,l){const e=l.target,t=l.def;c&&l.target===c.target&&l.def===c.def?(t.linkChanged&&p("Relation Link Changed Callback",t.linkChanged,e.getMethodCaller(),[o.getMethodCaller()],e),u.linkChanged&&p("Relation Link Changed Callback",u.linkChanged,o.getMethodCaller(),[e.getMethodCaller()],o)):(t.unlinked&&p("Relation Unlinked Callback",t.unlinked,e.getMethodCaller(),[o.getMethodCaller()],e),u.unlinked&&p("Relation Unlinked Callback",u.unlinked,o.getMethodCaller(),[e.getMethodCaller()],o))}if(c){const e=c.target,t=c.def;l&&l.target===c.target&&l.def===c.def||(t.linked&&p("Relation Linked Callback",t.linked,e.getMethodCaller(),[o.getMethodCaller()],e),u.linked&&p("Relation Linked Callback",u.linked,o.getMethodCaller(),[e.getMethodCaller()],o))}t||c||!u.linkFailed||p("Relation Link Failed Callback",u.linkFailed,o.getMethodCaller(),[],o)}}getLinkedTargets(e){var t,n,r,o;const i=null===(t=this._$group)||void 0===t?void 0:t.keyMap[e];if(!i)return T(`no relation "${String(e)}" found.`),[];const[s,a]=i;if(4===s||2===s||0===s){const e=null===(n=this._$links[s])||void 0===n?void 0:n[a];return e?[e.target]:[]}const l=[],c=this._$comp,u=null===(o=null===(r=this._$group)||void 0===r?void 0:r.definitions[s])||void 0===o?void 0:o[a],d=e=>{const t=e.childNodes;for(let e=0;e<t.length;e+=1){const n=t[e];if(y(n))if(C(n))d(n);else if(E(n)){if(n._$relation){let e;if(e=5===s?n._$relation._$links[4]:1===s?n._$relation._$links[0]:n._$relation._$links[2],e)for(let t=0;t<e.length;t+=1){const r=e[t];if(r&&r.target===c&&r.def===u){l.push(n);break}}}1===s&&d(n)}else 5!==s&&1!==s||d(n)}};return d(this._$comp),l}}class qe extends je{constructor(){throw new Error("Element cannot be constructed directly")}static create(e,t,n,r){var o,i;const s=Object.create(qe.prototype);s.is=e,s.stylingName=null!=n?n:e;const a=t.getBackendContext();let c=null;a&&(c=3===t.getBackendMode()?a.document.createElement(e):1===t.getBackendMode()?t._$backendShadowRoot.createElement(e,s.stylingName):a.createElement(e,s.stylingName)),s._$initialize(!1,c,t,t._$nodeTreeContext),s._$placeholderHandlerRemover=r;const u=t.getHostNode(),d=u.getComponentOptions(),h=null!==(o=d.styleScope)&&void 0!==o?o:B.globalScope(),p=null!==(i=d.extraStyleScope)&&void 0!==i?i:void 0,f=u._$behavior.ownerSpace.styleScopeManager;if(s.classList=new F(s,void 0,u.classList,h,p,f),c){if(2===t.getBackendMode()&&c.setStyleScope(h,p),l.writeExtraInfoToAttr){const e=f.queryName(h);e&&c.setAttribute("exparser:info-class-prefix",`${e}--`)}c.__wxElement=s,3!==t.getBackendMode()?c.associateValue(s):t.getBackendContext().associateValue(c,s)}return s}setModelBindingListener(e,t){if(this._$modelBindingListeners||(this._$modelBindingListeners=Object.create(null)),!this._$modelBindingListeners[e]){const t=this.getBackendElement();if(t){const n=t=>{var n;const r=null===(n=this._$modelBindingListeners)||void 0===n?void 0:n[e];r&&r.call(this,t)};3===this.getBackendMode()?this.getBackendContext().setModelBindingStat(t,e,n):t.setModelBindingStat(e,n)}}this._$modelBindingListeners[e]=t}getModelBindingListeners(){const e=Object.create(null);return this._$modelBindingListeners&&Object.keys(this._$modelBindingListeners).forEach((t=>{e[t]=e=>{var n;const r=null===(n=this._$modelBindingListeners)||void 0===n?void 0:n[t];r&&r.call(this,e)}})),e}}qe.isNativeNode=S,qe.prototype[g]=!0;class Ge{constructor(e,t){this._$slotElement=null,this._$destroyOnRemoval=0,this._$subtreeSlotStart=null,this._$subtreeSlotEnd=null,this._$mutationObserverTarget=null,this._$text=String(e);let n=null;const r=t.getBackendContext();r&&(n=3===t.getBackendMode()?r.document.createTextNode(e):1===t.getBackendMode()?t._$backendShadowRoot.createTextNode(e):r.createTextNode(e)),this._$backendElement=n,this.ownerShadowRoot=t,this.parentNode=null,this.parentIndex=-1,this.containingSlot=void 0}static create(e,t){return new Ge(e,t)}asTextNode(){return this}asElement(){return null}asNativeNode(){return null}asVirtualNode(){return null}asShadowRoot(){return null}asGeneralComponent(){return null}asInstanceOf(){return null}destroyBackendElement(){this._$backendElement&&(3!==this.ownerShadowRoot.getBackendMode()&&this._$backendElement.release(),this._$backendElement=null)}destroyBackendElementOnRemoval(){this._$destroyOnRemoval=1}cancelDestroyBackendElementOnRemoval(){this._$destroyOnRemoval=0}destroyBackendElementOnDetach(){this._$destroyOnRemoval=1}cancelDestroyBackendElementOnDetach(){this._$destroyOnRemoval=0}getBackendElement(){return this._$backendElement}getBackendContext(){return this.ownerShadowRoot.getBackendContext()}getComposedParent(){if(void 0!==this.containingSlot)return this.containingSlot;let e=this.parentNode;for(;null==e?void 0:e._$inheritSlots;)e=e.parentNode;return e}get $$(){return this._$backendElement}get textContent(){return this._$text}set textContent(e){const t=String(e);t!==this._$text&&(this._$text=t,this._$backendElement&&(3===this.ownerShadowRoot.getBackendMode()?this._$backendElement.textContent=this._$text:this._$backendElement.setText(this._$text)),this._$mutationObserverTarget&&ae.callTextObservers(this,{type:"characterData",target:this}))}}Ge.isTextNode=$,Ge.prototype[f]=!0;class We extends je{constructor(){throw new Error("Element cannot be constructed directly")}_$initializeVirtual(e,t,n){if(this.is=String(e),n&&1===n.mode){const r=t._$backendShadowRoot.createVirtualNode(e);this._$initialize(!0,r,t,n),r.__wxElement=this,r.associateValue(this)}else this._$initialize(!0,null,t,t._$nodeTreeContext)}static create(e,t){const n=Object.create(We.prototype);return n._$initializeVirtual(e,t,t.getBackendContext()),n}}var Ve;We.isVirtualNode=C,We.prototype[m]=!0,function(e){e[e.Direct=0]="Direct",e[e.Single=1]="Single",e[e.Multiple=2]="Multiple",e[e.Dynamic=3]="Dynamic"}(Ve||(Ve={}));class He extends We{constructor(){throw new Error("Element cannot be constructed directly")}static createShadowRoot(e){const t=Object.create(He.prototype);let n=null;1===e.getBackendMode()&&(n=e._$backendElement.getShadowRoot()),t.is="shadow",t._$idMap=null;let r=1;const o=e.getComponentOptions();return o.multipleSlots?r=2:o.dynamicSlots?r=3:o.directSlots&&(r=0),t._$slotMode=r,1===r?t._$singleSlot=null:2===r?(t._$slots=Object.create(null),t._$slotsList=Object.create(null)):3===r&&(t._$dynamicSlotsInserted=!1,t._$dynamicSlots=new Map,t._$requiredSlotValueNames=[],t._$propertyPassingDeepCopy=Se(o.propertyPassingDeepCopy),t._$insertDynamicSlotHandler=void 0,t._$removeDynamicSlotHandler=void 0,t._$updateDynamicSlotHandler=void 0),t._$backendShadowRoot=n,t._$initialize(!0,n,t,e._$nodeTreeContext),t._$host=e,t._$hooks=e.getOwnerSpace().hooks,e.shadowRoot=t,n&&(n.__wxElement=t,n.associateValue(t)),t}getHostNode(){return this._$host}createTextNode(e=""){return this._$hooks.createTextNode((e=>new Ge(e,this)),e)}createNativeNode(e){return this._$hooks.createNativeNode(((e,t)=>qe.create(e,this,t)),e,e)}createVirtualNode(e="virtual"){return We.create(e,this)}createNativeNodeWithInit(e,t,n,r){const o=this._$hooks.createNativeNode(((e,t)=>qe.create(e,this,t,n)),e,t);return null==r||r(o),o}createComponent(e,t,n,r,o){const i=this._$host,s=i._$behavior,a=i._$genericImpls,l=s.ownerSpace,c=void 0===t?e:t,u=[s._$using[c],a&&a[c]];for(let t=0;t<u.length;t+=1){const c=u[t];if(null==c)continue;if("string"==typeof c)return this.createNativeNodeWithInit(c,e,void 0,o);let d,h;if(c.final)d=c.final;else if(null!==c.placeholder){d=mt(c.placeholder,l,c.source,a);const e=c.waiting;r&&e&&(e.add(r),e.hintUsed(i),h=()=>{e.remove(r)})}if("string"==typeof d)return this.createNativeNodeWithInit(d,e,h,o);if(d)return this._$hooks.createComponent(((e,t)=>yt._$advancedCreate(e,t,this,null,gt(t,s,i,n),h,o)),e,d)}let d=l.getGlobalUsingComponent(c);if(null===d&&l._$allowUnusedNativeNode&&""!==c&&(d=c),!d){if(d=l.getDefaultComponent(),!d)throw new I(`Cannot find component "${c}"`,void 0,this._$host);T(`Cannot find component "${c}", using default component.`,this._$host)}return"string"==typeof d?this.createNativeNodeWithInit(d,e,void 0,o):this._$hooks.createComponent(((e,t)=>yt._$advancedCreate(e,t,this,null,gt(t,s,i,n),void 0,o)),e,d)}createComponentByDef(e,t){return this._$hooks.createComponent(((e,t)=>yt._$advancedCreate(e,t,this,null,null,void 0)),e,t)}createComponentOrNativeNode(e,t,n){const r=this._$host,o=r._$behavior,i=o.ownerSpace,s=i.getGlobalUsingComponent(e);if("string"==typeof s)return this.createNativeNodeWithInit(s,e,void 0,n);if(s)return this._$hooks.createComponent(((e,i)=>yt._$advancedCreate(e,i,this,null,gt(i,o,r,t),void 0,n)),e,s);if(i._$allowUnusedNativeNode){const t=this._$hooks.createNativeNode((e=>qe.create(e,this)),e,e);return null==n||n(t),t}throw new I(`Unknown tag name ${e}`,"[render]",r)}checkComponentPlaceholder(e){var t;let n;const r=this._$host._$behavior._$using[e];if(void 0!==r)n=r;else{const r=null===(t=this._$host._$genericImpls)||void 0===t?void 0:t[e];if(!r)return;n=r}return"string"!=typeof n&&!n.final&&null!==n.placeholder}getElementById(e){return this._$getIdMap()[e]}_$markIdCacheDirty(){this._$idMap=null}_$getIdMap(){if(this._$idMap)return this._$idMap;const e=je._$generateIdMap(this);return this._$idMap=e,e}getSlotElementFromName(e){const t=this._$slotMode;if(0===t)throw new Error("cannot get slot element in directSlots");if(1===t)return this._$singleSlot;if(2===t)return this._$slots[e]||null;if(3===t){const t=[];for(let n=this._$subtreeSlotStart;n;n=n.next){const r=n.value;(r._$slotName||"")===e&&t.push(r)}return t}return null}getContainingSlot(e){var t;const n=this._$slotMode;if(0===n)return(null==e?void 0:e.containingSlot)||null;if(1===n)return this._$singleSlot;if(3===n){if(!e)return null;let n=e;for(;null===(t=n.parentNode)||void 0===t?void 0:t._$inheritSlots;)n=n.parentNode;const r=n._$slotElement;if((null==r?void 0:r.ownerShadowRoot)===this)return r}if(2===n){let t;return t=y(e)?e._$nodeSlot:"",this._$slots[t]||null}return null}getSlotContentArray(e){if(null===e._$slotName)return null;const t=[];return this.forEachNodeInSpecifiedSlot(e,(e=>{t.push(e)})),t}forEachSlot(e){const t=this._$slotMode;if(0===t)throw new Error("Cannot iterate slots in directSlots");if(1===t)this._$singleSlot&&e(this._$singleSlot);else if(2===t){const t=Object.values(this._$slots);for(let n=0;n<t.length&&!1!==e(t[n]);n+=1);}else if(3===t)for(let t=this._$subtreeSlotStart;t&&!1!==e(t.value);t=t.next);}forEachNodeInSlot(e){const t=this._$host.childNodes;for(let n=0;n<t.length;n+=1)if(!je.forEachNodeInSlot(t[n],e))return!1;return!0}forEachNodeInSpecifiedSlot(e,t){if(e){const n=e.slotNodes;for(let e=0;e<n.length;e+=1){const r=n[e];if(!1===t(r))return!1}return!0}return this.forEachNodeInSlot(((e,n)=>null!==n||t(e)))}forEachSlotContentInSlot(e){const t=this._$host.childNodes;for(let n=0;n<t.length;n+=1)if(!je.forEachSlotContentInSlot(t[n],e))return!1;return!0}forEachSlotContentInSpecifiedSlot(e,t){if(e){const n=e.slotNodes;for(let e=0;e<n.length;e+=1){const r=n[e];if(!r._$inheritSlots&&!1===t(r))return!1}return!0}return this.forEachSlotContentInSlot(((e,n)=>null!==n||t(e)))}isConnected(e){if(e.ownerShadowRoot!==this)return!1;for(let t=e;t;t=t.parentNode)if(t===this)return!0;return!1}_$applyMultipleSlotInsertion(e,t,n){const r=this._$slotsList,o=this._$slots;if(r[t]){const n=r[t];let o={next:n},i=!0;for(let t=this._$subtreeSlotStart;t&&o.next&&t.value!==e;t=t.next)t.value===o.next.value&&(i=!1,o=o.next);if(i)r[t]=n.prev={value:e,prev:null,next:n};else{const t=o.next;o.next={value:e,prev:o,next:t},t&&(t.prev=o.next)}}else r[t]={value:e,prev:null,next:null};const i=o[t],s=r[t].value;i!==s&&(o[t]=s,je._$insertChildReassignSlot(this,t,i||null,s))}_$applyMultipleSlotsRemoval(e,t,n){const r=this._$slotsList,o=this._$slots;let i=r[t]||null;for(;i&&i.value!==e;i=i.next);if(!i)return;const s=i.prev,a=i.next;if(s&&(s.next=a),a&&(a.prev=s),s)return;const l=a;if(l){const i=l.value;r[t]=l,n||(o[t]=i,je._$insertChildReassignSlot(this,t,e,i))}else delete r[t],n||(delete o[t],je._$insertChildReassignSlot(this,t,e,null))}_$applySlotRename(e,t,n){const r=this._$slotMode;if(1!==r&&0!==r){if(2===r)return this._$applyMultipleSlotsRemoval(e,n,!1),void this._$applyMultipleSlotInsertion(e,t,!1);if(3===r){if(!this._$dynamicSlotsInserted)return;const n=this._$insertDynamicSlotHandler,r=this._$removeDynamicSlotHandler;this._$dynamicSlots.set(e,{updatePathTree:void 0}),null==r||r([e]),null==n||n([{slot:e,name:t,slotValues:e._$slotValues}])}}}_$applySlotsInsertion(e,t,n){const r=this._$slotMode;if(0!==r){if(1===r){const e=this._$singleSlot,t=this._$subtreeSlotStart.value;if(e===t)return;return this._$singleSlot=t,void je._$insertChildReassignSlot(this,null,e,t)}if(2!==r){if(3===r){if(n)return;if(!this._$dynamicSlotsInserted)return;const r=this._$insertDynamicSlotHandler,o=[];for(let n=e;n&&n!==t.next;n=n.next){const e=n.value,t=e._$slotName;this._$dynamicSlots.set(e,{updatePathTree:void 0}),o.push({slot:e,name:t,slotValues:e._$slotValues})}null==r||r(o)}}else for(let r=e;r&&r!==t.next;r=r.next){const e=r.value,t=e._$slotName;this._$applyMultipleSlotInsertion(e,t,n)}}}_$applySlotsRemoval(e,t,n){var r;const o=this._$slotMode;if(0!==o){if(1===o){if(n)return;const e=this._$singleSlot,t=(null===(r=this._$subtreeSlotStart)||void 0===r?void 0:r.value)||null;if(e===t)return;return this._$singleSlot=t,void je._$insertChildReassignSlot(this,null,e,t)}if(2!==o){if(3===o){if(n)return;if(!this._$dynamicSlotsInserted)return;const r=this._$removeDynamicSlotHandler,o=[];for(let n=e;n&&n!==t.next;n=n.next){const e=n.value;this._$dynamicSlots.delete(e),o.push(e)}null==r||r(o)}}else for(let r=e;r&&r!==t.next;r=r.next){const e=r.value,t=e._$slotName;this._$applyMultipleSlotsRemoval(e,t,n)}}}setDynamicSlotHandler(e,t,n,r){if(3===this._$slotMode&&(this._$requiredSlotValueNames=e,this._$insertDynamicSlotHandler=t,this._$removeDynamicSlotHandler=n,this._$updateDynamicSlotHandler=r,this._$dynamicSlotsInserted)){const e=this._$dynamicSlots.values();for(let t=e.next();!t.done;t=e.next()){const e=t.value;e.updatePathTree=e.updatePathTree||Object.create(null)}}}useDynamicSlotHandlerFrom(e){e._$insertDynamicSlotHandler&&this.setDynamicSlotHandler(e._$requiredSlotValueNames.slice(),e._$insertDynamicSlotHandler,e._$removeDynamicSlotHandler,e._$updateDynamicSlotHandler)}replaceSlotValue(e,t,n){var r;const o=e._$slotValues;if(!o)return;const i=o[t];let s=n;if(0!==this._$propertyPassingDeepCopy&&(s=2===this._$propertyPassingDeepCopy?ie(n,!0):oe(n)),i===s)return;if(o[t]=s,e._$mutationObserverTarget&&ae.callAttrObservers(e,{type:"properties",target:e,nameType:"slot-value",propertyName:t}),this._$requiredSlotValueNames.indexOf(t)<0)return;const a=null===(r=this._$dynamicSlots)||void 0===r?void 0:r.get(e);a&&(a.updatePathTree||(a.updatePathTree=Object.create(null)),a.updatePathTree[t]=!0)}applySlotValueUpdates(e){var t,n;const r=null===(t=this._$dynamicSlots)||void 0===t?void 0:t.get(e),o=null==r?void 0:r.updatePathTree;o&&(r.updatePathTree=void 0,null===(n=this._$updateDynamicSlotHandler)||void 0===n||n.call(this,e,e._$slotValues,o))}applySlotUpdates(){var e;if(this._$dynamicSlotsInserted){const t=this._$dynamicSlots.entries();for(let n=t.next();!n.done;n=t.next()){const[t,r]=n.value,o=r.updatePathTree;o&&(r.updatePathTree=void 0,null===(e=this._$updateDynamicSlotHandler)||void 0===e||e.call(this,t,t._$slotValues,o))}}else{this._$dynamicSlotsInserted=!0;const e=this._$insertDynamicSlotHandler,t=[];for(let e=this._$subtreeSlotStart;e;e=e.next){const n=e.value,r=n._$slotName;this._$dynamicSlots.set(n,{updatePathTree:void 0}),t.push({slot:n,name:r,slotValues:n._$slotValues})}null==e||e(t)}}getSlotMode(){return this._$slotMode}}He.isShadowRoot=w,He.prototype[_]=!0;class Ye{constructor(e,t,n,r,o){this.ownerShadowRoot=r,this.elem=n,this.keyName=e,this.updateKeys(t);const i=this.items,s=this.indexes,a=[];for(let e=0;e<i.length;e+=1){const t=i[e],n=null===s?e:s[e];a.push(o(t,n))}n.insertChildren(a,-1)}updateKeys(e){let t,n;if(Array.isArray(e))t=e,n=null;else if("object"==typeof e&&null!==e){const r=Object.keys(e);t=new Array(r.length),n=new Array(r.length);for(let o=0;o<r.length;o+=1){const i=r[o],s=e[i];t[o]=s,n[o]=i}}else if("string"==typeof e){T("Use string as for-list is generally for testing. Each character is treated as an item.",this.ownerShadowRoot.getHostNode(),this.elem),t=new Array(e.length),n=null;for(let n=0;n<e.length;n+=1)t[n]=e[n]}else if("number"==typeof e){T("Use number as for-list is generally for testing. The number is used as the repeated times of the item.",this.ownerShadowRoot.getHostNode(),this.elem);const r=Number.isSafeInteger(e)&&e>=0&&e<Math.pow(2,32)?e:0;t=new Array(r),n=null;for(let e=0;e<r;e+=1)t[e]=e}else T(`The for-list data is neither Array nor Object, got type "${null===e?"null":typeof e}".`,this.ownerShadowRoot.getHostNode(),this.elem),t=[],n=null;this.items=t,this.indexes=n;const r=this.keyName,o=new Array(t.length),i=Object.create(null);let s;if(null!==r){for(let e=0;e<t.length;e+=1){const n=t[e],a="*this"===r?n:null==n?void 0:n[r],l=null!=a?String(a):"";o[e]=l,(null==s?void 0:s[l])?s[l].push(e):void 0!==i[l]?(s||(s=Object.create(null)),s[l]=[i[l],e]):i[l]=e}if(s){const e=Object.keys(s);T(`Some keys are not unique while list updates: "${e.join('", "')}".`,this.ownerShadowRoot.getHostNode(),this.elem);for(let t=0;t<e.length;t+=1){const n=e[t],r=s[n];let a=0;for(let e=1;e<r.length;e+=1){const t=r[e];for(;void 0!==i[`${n}--${a}`];)a+=1;const s=`${n}--${a}`;i[s]=t,o[t]=s}}}}this.rawKeys=o,this.keyMap=i,this.sharedKeyMap=s}diff(e,t,n,r,o){const i=this.rawKeys,s=this.keyMap,a=this.sharedKeyMap,l=this.indexes;this.updateKeys(e);const c=this.rawKeys,u=this.sharedKeyMap,d=this.items,h=this.indexes,p=this.keyName,f="object"==typeof t&&Array.isArray(Object.getPrototypeOf(t));let v,g;if(!0===t)g=!0,v=null===p;else if(void 0===t)g=t,v=!0;else if(null===p)g=!0,v=!0;else{let e=!1;if(f)e=!0;else{const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=t[n[r]];if(!0===o||("*this"===p?o:null==o?void 0:o[p])){e=!0;break}}}if(e){g=new Array(c.length);for(let e=0;e<c.length;e+=1){const n=c[e];let r=!1;if(a||u)if(void 0!==(null==a?void 0:a[n])||void 0!==(null==u?void 0:u[n]))r=!0;else{const e=n.lastIndexOf("--");if(e>=0){const t=n.slice(0,e);void 0===(null==a?void 0:a[t])&&void 0===(null==u?void 0:u[t])||(r=!0)}}if(r)g[e]=!0;else{const n=t[e];void 0===n||(!0===n||("*this"===p?n:null==n?void 0:n[p])?g[e]=!0:g[e]=n)}}v=!1}else g=t,v=!1}if(v){let e;e=!!f||t;let s=0;for(;s<i.length&&s<c.length;){const t=d[s],r=null===h?s:h[s],i=null===l?s:l[s];o(t,r,!0===e||void 0===e?e:e[r],r!==i,n.childNodes[s]),s+=1}if(s<i.length)n.removeChildren(s,i.length-s);else if(s<c.length){const e=[];for(;s<c.length;s+=1){const t=d[s],n=null===h?s:h[s];e.push(r(t,n))}n.insertChildren(e,-1)}return}const m=[],_=[],b=new Array(c.length),$=new Array(c.length);let y=-1,S=-1;for(let e=0;e<c.length;e+=1){const t=c[e];if(i[y+1]===t){y+=1,S+=1,m[S]=y,_[S]=e,b[e]=S>0?_[S-1]:-1,$[e]=y;continue}const n=s[t];if(void 0===n){$[e]=-1;continue}let r=0,o=m.length;for(;r<o;){const e=Math.floor((r+o)/2);n<m[e]?o=e:r=e+1}m[o]=n,_[o]=e,b[e]=o>0?_[o-1]:-1,$[e]=n,y=n,S=o}const C=_.length;if(C===c.length&&C===i.length){let e=0;for(;e<i.length&&e<c.length;){const t=d[e],r=null===h?e:h[e],i=null===l?e:l[e];o(t,r,!0===g||void 0===g?g:g[e],r!==i,n.childNodes[e]),e+=1}return}let w=C>0?_[C-1]:-1,E=C;for(;-1!==w;)E-=1,m[E]=w,w=b[w];const N=m;let k;!function(e){e[e.Stable=0]="Stable",e[e.ForwardMove=1]="ForwardMove",e[e.BackwardMove=2]="BackwardMove"}(k||(k={}));const O=new Array(i.length),x=new Array(c.length);let P=-1;for(let e=0;e<$.length;e+=1){const t=$[e];if(e!==N[E])if(-1!==t)O[t]=t>P?2:1,x[e]=n.childNodes[t];else{const t=d[e],n=null===h?e:h[e];x[e]=r(t,n)}else P=t,E+=1,O[t]=0}let T=0,I=0,M=0;E=0;do{const e=E<N.length?N[E]:x.length,t=E<N.length?$[e]:O.length;for(;I<t;)if(void 0===O[I]){const e=I;I+=1;let r=1;for(;I<t&&void 0===O[I];)I+=1,r+=1;n.removeChildren(e+T,r),T-=r}else 2===O[I]&&(T-=1),I+=1;for(;M<e;){const r=x[M],i=$[M];if(-1===i){const r=M;M+=1;let o=1;for(;M<e&&-1===$[M];)M+=1,o+=1;n.insertChildren(x.slice(r,r+o),t+T),T+=o}else{r&&n.insertChildAt(r,t+T);const e=d[M],s=null===h?M:h[M],a=null===l?i:l[i];o(e,s,!0===g||void 0===g?g:g[M],s!==a,r),2===O[i]&&(T+=1),M+=1}}if(E<N.length){const r=d[e],i=null===h?e:h[e],s=null===l?t:l[t];o(r,i,!0===g||void 0===g?g:g[e],i!==s,n.childNodes[t+T])}I=t+1,M=e+1,E+=1}while(E<=N.length)}}const ze=e=>e,Qe=(e,t,n)=>n.apply(e,[t]),Ke=e=>{const t=e;return t._$wxTmplArgs=t._$wxTmplArgs||{}},Xe=e=>null==e?"":String(e),Ze=e=>e.replace(/-(.|$)/g,(e=>e[1]?e[1].toUpperCase():""));class Je{constructor(e,t,n){this.bindingMapDisabled=!1,this.changePropFilter=ze,this.eventListenerWrapper=Qe,this.s=(e,t)=>{e.slot=t,this.tryCallPropertyChangeListener(e,"slot",t)},this.l=(e,t,n,r)=>{var o;3===this.shadowRoot.getSlotMode()?this.shadowRoot.replaceSlotValue(e,t,n):this.checkFallbackEventListener(e,t,n,r)||T(`"${t}" is not a valid event binding or slot value`,null===(o=e.ownerShadowRoot)||void 0===o?void 0:o.getHostNode(),e),this.tryCallPropertyChangeListener(e,t,n)},this.i=(e,t)=>{e.id=t,this.tryCallPropertyChangeListener(e,"id",t)},this.c=(e,t)=>{E(e)&&e.hasExternalClass("class")&&e.setExternalClass("class",t),e.setNodeClass(t),this.tryCallPropertyChangeListener(e,"class",t)},this.y=(e,t)=>{if(E(e)&&yt.hasProperty(e,"style")){const n=yt.getDataProxy(e),r=Ze("style");n.replaceProperty(r,t)}else e.setNodeStyle(Xe(t),0);this.tryCallPropertyChangeListener(e,"style",t)},this.d=(e,t,n)=>{e.setDataset(t,n)},this.m=(e,t,n)=>{e.setMark(t,n)},this.v=(e,t,n,r,o,i,s,a)=>{const l="function"==typeof n?n:Xe(n),c=t=>{const n=e.ownerShadowRoot.getHostNode(),r=n.getMethodCaller(),o="function"==typeof l?l:yt.getMethod(n,l);if("function"==typeof o)return this.eventListenerWrapper(r,t,o,a)},u={final:r,mutated:o,capture:i};if(s){const n=Ke(e);n.dynEvListeners||(n.dynEvListeners={});const r=n.dynEvListeners;r[t]&&e.removeListener(t,r[t],u),r[t]=c}l&&e.addListener(t,c,u)},this.r=(e,t,n,r,o)=>{var i;if(E(e)){const s=yt.getDataProxy(e),a=Ze(t);s.replaceProperty(a,n)?void 0!==r&&(null===r?s.setModelBindingListener(a,(()=>{})):s.setModelBindingListener(a,(t=>{const n=e.ownerShadowRoot.getHostNode(),o=yt.getDataProxy(n);o.replaceDataOnPath(r,t),o.applyDataUpdates(!1)}))):e.hasExternalClass(t)?e.setExternalClass(t,n):this.checkFallbackEventListener(e,a,n,o)||T(`"${a}" is not a valid property`,null===(i=e.ownerShadowRoot)||void 0===i?void 0:i.getHostNode(),e)}else if(S(e)){if(this.fallbackListenerOnNativeNode){const r=Ze(t);this.checkFallbackEventListener(e,r,n,o)||e.updateAttribute(t,n)}else e.updateAttribute(t,n);r&&e.setModelBindingListener(t,(t=>{const n=e.ownerShadowRoot.getHostNode(),o=yt.getDataProxy(n);o.replaceDataOnPath(r,t),o.applyDataUpdates(!1)}))}this.tryCallPropertyChangeListener(e,t,n)},this.a=(e,t,n)=>{e.updateAttribute(t,n),this.tryCallPropertyChangeListener(e,t,n)},this.wl=(e,t,n)=>{E(e)&&e.triggerWorkletChangeLifetime(t,n)},this.p=(e,t,n,r)=>{const o=Ke(e);o.changeProp||(o.changeProp=Object.create(null)),o.changeProp[t]={listener:this.changePropFilter(n,r),oldValue:void 0}},this.shadowRoot=e,this.procGen=t,this.fallbackListenerOnNativeNode=n}create(e){const{shadowRoot:t,procGen:n}=this,r=n(this,!0,e,void 0);return this.handleChildrenCreationAndInsert(r.C,t,void 0,void 0),r.B}update(e,t){const{shadowRoot:n,procGen:r}=this,o=r(this,!1,e,t);this.handleChildrenUpdate(o.C,n,void 0,void 0)}bindingMapUpdate(e,t,n){if(this.bindingMapDisabled)return!1;const r=n[e];if(!r)return!1;let o=null;for(let e=0;e<r.length;e+=1)(0,r[e])(t,(e=>{null!==o&&e!==o&&E(o)&&o.hasPendingChanges()&&yt.getDataProxy(o).applyDataUpdates(!0),o=e}),((e,t)=>{e.textContent=t}));const i=o;return null!==i&&E(i)&&i.hasPendingChanges()&&yt.getDataProxy(i).applyDataUpdates(!0),!0}handleChildrenCreation(e,t,n){const r=[];return e(!0,((e,o)=>{if(t&&""!==n){const e=this.createDynamicPlaceholder(t);return void r.push(e)}const i=this.shadowRoot.createTextNode(e);i.destroyBackendElementOnRemoval(),t&&je.setSlotElement(i,t),o&&o(i),r.push(i)}),((e,o,i,s,a,l)=>{if(t&&n!==(a||"")){const e=this.createDynamicPlaceholder(t);return void r.push(e)}const c=this.createCommonElement(e,o,i,s,l);t?(je.setSlotElement(c,t),Ke(c).dynamicSlotNameMatched=!0):void 0!==a&&(c.slot=a),r.push(c)}),((e,o)=>{const i=this.shadowRoot.createVirtualNode("wx:if");i.destroyBackendElementOnRemoval(),je.setInheritSlots(i),t&&je.setSlotElement(i,t),Ke(i).key=e,this.handleChildrenCreationAndInsert(o,i,t,n),r.push(i)}),((e,o,i,s,a)=>{const l=this.shadowRoot,c=l.createVirtualNode("wx:for");c.destroyBackendElementOnRemoval(),je.setInheritSlots(c),t&&je.setSlotElement(c,t),Ke(c).keyList=new Ye(o,e,c,l,((e,r)=>{const o=l.createVirtualNode("wx:for-item");return o.destroyBackendElementOnRemoval(),je.setInheritSlots(o),t&&je.setSlotElement(c,t),this.handleChildrenCreationAndInsert(((t,n,o,i,l,c,u)=>{a(!0,e,r,void 0,void 0,s?[...s,r]:null,n,o,i,l,c,u)}),o,t,n),o})),r.push(c)}),((e,n,o)=>{const i=this.shadowRoot.createVirtualNode("slot");i.destroyBackendElementOnRemoval(),je.setSlotName(i,Xe(e)),t?je.setSlotElement(i,t):void 0!==o&&(i.slot=o),n&&n(i),r.push(i)}),((e,o)=>{if(void 0!==o)if(t)if(n===o){const n=this.shadowRoot.createVirtualNode("virtual");n.destroyBackendElementOnRemoval(),je.setSlotElement(n,t),Ke(n).dynamicSlotNameMatched=!0,this.handleChildrenCreationAndInsert(e,n,void 0,void 0),r.push(n)}else{const e=this.createDynamicPlaceholder(t);r.push(e)}else{const t=this.shadowRoot.createVirtualNode("virtual");t.destroyBackendElementOnRemoval(),t.slot=o,this.handleChildrenCreationAndInsert(e,t,void 0,void 0),r.push(t)}else{const o=this.shadowRoot.createVirtualNode("virtual");o.destroyBackendElementOnRemoval(),je.setInheritSlots(o),t&&je.setSlotElement(o,t),this.handleChildrenCreationAndInsert(e,o,t,n),r.push(o)}}),void 0,void 0),r}handleChildrenCreationAndInsert(e,t,n,r){const o=this.handleChildrenCreation(e,n,r);o.length&&t.insertChildren(o,-1)}handleChildrenUpdate(e,t,n,r){let o=0;const i=n?n.slotNodes.filter((e=>e.parentNode===t)):t.childNodes;e(!1,(e=>{const t=i[o];if(o+=1,t){if(n&&!Ke(t).dynamicSlotNameMatched)return;void 0!==e&&(t.textContent=e)}}),((e,s,a,l,c,u)=>{const d=i[o];if(o+=1,!d)return;if(n){const o=Ke(d);if(r!==(c||"")){if(o.dynamicSlotNameMatched){const e=this.createDynamicPlaceholder(n);t.replaceChild(e,d)}return}if(!o.dynamicSlotNameMatched){const r=this.createCommonElement(e,s,a,l,u);return je.setSlotElement(r,n),Ke(r).dynamicSlotNameMatched=!0,void t.replaceChild(r,d)}}a(d,!1);let h=!1;if(E(d)){const e=this.dynamicSlotUpdate(d,u,l);e&&(h=!0),d.hasPendingChanges()&&yt.getDataProxy(d).applyDataUpdates(!0),null==e||e.applySlotUpdates()}n||void 0!==c&&(d.slot=c),h||this.handleChildrenUpdate(l,d,void 0,void 0)}),((e,s)=>{const a=i[o];if(o+=1,!a)return;const l=Ke(a);if(l.key===e)this.handleChildrenUpdate(s,a,n,r);else{const i=this.shadowRoot.createVirtualNode("wx:if");i.destroyBackendElementOnRemoval(),je.setInheritSlots(i),n&&je.setSlotElement(i,n);const c=Ke(i);l.key=c.key=e,this.handleChildrenCreationAndInsert(s,i,n,r),n?t.replaceChild(i,a):t.replaceChildAt(i,o-1)}}),((e,t,s,a,l)=>{const c=i[o];o+=1,c&&Ke(c).keyList.diff(e,s,c,((e,t)=>{const o=this.shadowRoot.createVirtualNode("wx:for-item");return o.destroyBackendElementOnRemoval(),je.setInheritSlots(o),n&&je.setSlotElement(c,n),this.handleChildrenCreationAndInsert(((n,r,o,i,s,c,u)=>{l(!0,e,t,void 0,void 0,a?[...a,t]:null,r,o,i,s,c,u)}),o,n,r),o}),((e,t,o,i,s)=>{s&&this.handleChildrenUpdate(((n,r,s,c,u,d,h)=>{l(!1,e,t,o,!!i||void 0,a?[...a,t]:null,r,s,c,u,d,h)}),s,n,r)}))}),((e,t,r)=>{const s=i[o];o+=1,s&&(void 0!==e&&je.setSlotName(s,Xe(e)),n||void 0!==r&&(s.slot=r),t&&t(s),this.shadowRoot.applySlotValueUpdates(s))}),((e,s)=>{const a=i[o];if(o+=1,a)if(void 0!==s)if(n){const o=Ke(a);if(r===s)if(o.dynamicSlotNameMatched)this.handleChildrenUpdate(e,a,void 0,void 0);else{const r=this.shadowRoot.createVirtualNode("virtual");r.destroyBackendElementOnRemoval(),je.setSlotElement(r,n),Ke(r).dynamicSlotNameMatched=!0,this.handleChildrenCreationAndInsert(e,r,void 0,void 0),t.replaceChild(r,a)}else if(o.dynamicSlotNameMatched){const e=this.createDynamicPlaceholder(n);t.replaceChild(e,a)}}else a.slot=s,this.handleChildrenUpdate(e,a,void 0,void 0);else this.handleChildrenUpdate(e,a,n,r)}),void 0,void 0)}dynamicSlotUpdate(e,t,n){const r=e.getShadowRoot();return 3===(null==r?void 0:r.getSlotMode())?(r.setDynamicSlotHandler(t||[],(t=>{const r=[];for(let e=0;e<t.length;e+=1){const{slot:o,name:i,slotValues:s}=t[e],a=this.handleChildrenCreation(((e,t,r,o,i,a,l)=>{n(!0,t,r,o,i,a,l,s,void 0)}),o,i);r.push(...a)}r.length&&e.insertChildren(r,-1)}),(t=>{if(!t.length)return;const n=[];for(let e=0;e<t.length;e+=1)t[e].slotNodes.length&&n.push(t[e]);n.sort(((e,t)=>e.slotNodes[0].parentIndex-t.slotNodes[0].parentIndex));let r=0,o=0;for(let t=0;t<n.length;t+=1){const i=n[t].slotNodes,s=i[0].parentIndex,a=i.findLast((t=>t.parentNode===e)).parentIndex;o!==s&&(r>=0&&e.removeChildren(r,o-r),r=s),o=a+1}r!==o&&e.removeChildren(r,o-r)}),((t,r,o)=>{const i=t._$slotName||"";this.handleChildrenUpdate(((e,t,i,s,a,l,c)=>{n(!1,t,i,s,a,l,c,r,o)}),e,t,i)})),r):null}createDynamicPlaceholder(e){const t=this.shadowRoot.createVirtualNode("virtual");return t.destroyBackendElementOnRemoval(),je.setSlotElement(t,e),Ke(t).dynamicSlotNameMatched=!1,t}checkFallbackEventListener(e,t,n,r){if(t.startsWith("bind"))this.v(e,t.slice(4),n,!1,!1,!1,!0,r);else if(t.startsWith("captureBind"))this.v(e,t.slice(11),n,!1,!1,!0,!0,r);else if(t.startsWith("catch"))this.v(e,t.slice(5),n,!0,!1,!1,!0,r);else if(t.startsWith("captureCatch"))this.v(e,t.slice(12),n,!0,!1,!0,!0,r);else{if(!t.startsWith("on"))return!1;this.v(e,t.slice(2),n,!1,!1,!1,!0,r)}return!0}createCommonElement(e,t,n,r,o){let i=!1;const s=e=>{const t=E(e)?this.dynamicSlotUpdate(e,o,r):null;t&&(i=!0),n(e,!0),E(e)&&(e.hasPendingChanges()&&yt.getDataProxy(e).applyDataUpdates(!0),null==t||t.applySlotUpdates())},a=this.shadowRoot.createComponent(e,e,t,(()=>{var n;const r=this.shadowRoot.createComponent(e,e,t,void 0,s);r.destroyBackendElementOnRemoval();const o=r.getShadowRoot(),i=E(a)?a.getShadowRoot():null,l=3===(null==i?void 0:i.getSlotMode()),c=3===(null==o?void 0:o.getSlotMode());c!==l?P(new Error(`The "dynamicSlots" option of component <${r.is}> and its placeholder <${a.is}> should be the same.`),"[render]",E(r)?r:r.is):c?null===(n=a.parentNode)||void 0===n||n.replaceChild(r,a):a.selfReplaceWith(r)}),s);return a.destroyBackendElementOnRemoval(),i?this.bindingMapDisabled=!0:this.handleChildrenCreationAndInsert(r,a,void 0,void 0),a}tryCallPropertyChangeListener(e,t,n){var r;const o=Ke(e);if(null===(r=o.changeProp)||void 0===r?void 0:r[t]){const r=o.changeProp[t],i=r.oldValue;if(i!==n){r.oldValue=n;const t=e.ownerShadowRoot.getHostNode();p("Property Change Observer",r.listener,null,[n,i,t,e],t)}}}setFnFilter(e){this.changePropFilter=e}setEventListenerWrapper(e){"function"==typeof e&&(this.eventListenerWrapper=e)}devArgs(e){return(e=>{const t=e;return t._$wxTmplDevArgs=t._$wxTmplDevArgs||{}})(e)}}var et;!function(e){e[e.Data=0]="Data",e[e.Script=1]="Script",e[e.InlineScript=2]="InlineScript"}(et||(et={}));const tt=()=>{};class nt{constructor(e,t){this.shadowRoot=e,this.procGen=t}create(e){const{shadowRoot:t,procGen:n}=this,r=n(this,!0,e,void 0);return this.handleChildrenCreation(r.C,t.shadowRootElement),r.B}bindingMapUpdate(e,t,n){const r=n[e];if(void 0!==r)for(let e=0;e<r.length;e+=1)(0,r[e])(t,(()=>{}),((e,t)=>{e.textContent=t}))}handleChildrenCreation(e,t){let n=!0,r=!1;const o=()=>{n=!1,r=!1;const e=document.createElement("virtual");t.appendChild(e),this.shadowRoot.slot=e};e(!0,((e,i)=>{r?o():n=!1;const s=document.createTextNode(e||"");i&&i(s),t.appendChild(s)}),((e,i,s,a)=>{r?o():n=!1;const l=document.createElement(e);s(l,!0),this.handleChildrenCreation(a,l),t.appendChild(l)}),tt,tt,(()=>{n?(r=!0,this.shadowRoot.slot=t):o()}),(e=>{r?o():n=!1;const i=document.createElement("virtual");this.handleChildrenCreation(e,i),t.appendChild(i)}))}s(){}i(e,t){this.shadowRoot.idMap[t]=e}c(e,t){e.setAttribute("class",t)}y(e,t){e.setAttribute("style",t)}d(e,t,n){e.dataset[t]=Xe(n)}m(){}v(e,t,n,r){this.shadowRoot.setListener(e,t,(e=>{const t=this.shadowRoot.template.methods[n],o=null==t?void 0:t(e);return!r&&o}))}r(e,t,n){"boolean"==typeof n?n?e.setAttribute(t,""):e.removeAttribute(t):e.setAttribute(t,Xe(n))}a(e,t,n){this.r(e,t,n)}p(){}setFnFilter(){}devArgs(e){return(e=>{const t=e;return t._$wxTmplDevArgs=t._$wxTmplDevArgs||{}})(e)}}const rt=()=>({C:(e,t,n,r,o,i)=>{i("")},B:Object.create(null)}),ot=()=>rt;class it{constructor(e){if("object"!=typeof e._$template&&void 0!==e._$template)throw new Error(`Component template of ${e.is} must be a valid compiled template (or "null" for default template).`);{const t=e._$template||{content:ot};this.genObjectGroupEnv={list:t.groupList||Object.create(null),group:t.content}}this.updateMode="",this.methods=e._$methodMap}createInstance(e){return new st(this,e)}}class st{constructor(e,t){if(3!==t.getBackendMode())throw new Error(`Component template of ${t.is} cannot be initialized since external rendering is only supported in Domlike backend currently.`);const n=t.getBackendElement();if(!n)throw new Error(`Component template of ${t.is} cannot be initialized as external components since no suitable backend element found.`);this.comp=t,this.shadowRoot=this,this.shadowRootElement=n,this.root=n,this.slot=n,this.template=e;const r=e.genObjectGroupEnv.group("")||ot();this.procGenWrapper=new nt(this,r),this.idMap=Object.create(null),this.listeners=[]}initValues(e){if(this.bindingMapGen=this.procGenWrapper.create(e),!this.bindingMapGen)throw new Error("The component template does not support binding-map-update, so it cannot be used as external components.");const t=this.shadowRootElement;if(this.slot===t&&t.childNodes.length>0){const e=document.createElement("virtual");t.appendChild(e),this.slot=e}}getIdMap(){return this.idMap}updateValues(e,t){const n=this.bindingMapGen;for(let r=0;r<t.length;r+=1){const[o]=t[r];this.procGenWrapper.bindingMapUpdate(o[0],e,n)}}setListener(e,t,n){const r=e;r._$wxTmplEv?r._$wxTmplEv[t]=n:r._$wxTmplEv={[t]:n}}handleEvent(e,t){var n;const r=e;let o=r;const i=this.shadowRootElement,s=t.getEventName(),a=t.bubbles;for(;;){const e=t.wrapShadowedEvent(r,null,o),l=null===(n=o._$wxTmplEv)||void 0===n?void 0:n[s];if(l&&!1===l.call(o,e)&&(t.preventDefault(),t.stopPropagation()),!a||t.propagationStopped())break;if(o===i)break;const c=o.parentNode;if(!c)break;o=c}}}const at=()=>({C:(e,t,n,r,o,i)=>{i("")},B:Object.create(null)}),lt=()=>at;var ct;!function(e){e[e.Disabled=0]="Disabled",e[e.Enabled=1]="Enabled",e[e.Forced=2]="Forced"}(ct||(ct={}));const ut=e=>String(e>>>0)===e;class dt{create(e,t){return t.externalComponent?new it(e):new ht(e)}}class ht{constructor(e){this.updateTemplate(e)}updateTemplate(e){const t=e._$template;if("object"!=typeof t&&void 0!==t)throw new Error(`Component template of ${e.is} must be a valid compiled template (or "null" for default template).`);const n=t||{content:lt};this.genObjectGroupEnv={list:n.groupList||Object.create(null),group:n.content},this.updateMode=n.updateMode||"",this.fallbackListenerOnNativeNode=n.fallbackListenerOnNativeNode||!1}createInstance(e,t){return new pt(this,e,t(e))}}class pt{constructor(e,t,n){this.comp=t,this.shadowRoot=n,this.shadowRoot.destroyBackendElementOnRemoval(),this._$applyTemplate(e)}updateTemplate(e,t){this._$applyTemplate(e),this.shadowRoot.removeChildren(0,this.shadowRoot.childNodes.length),this.bindingMapGen=this.procGenWrapper.create(t)}_$applyTemplate(e){const t=e.genObjectGroupEnv.group("")||lt();"bindingMap"===e.updateMode?this.forceBindingMapUpdate=2:"virtualTree"===e.updateMode?this.forceBindingMapUpdate=0:this.forceBindingMapUpdate=1,this.procGenWrapper=new Je(this.shadowRoot,t,e.fallbackListenerOnNativeNode),this.bindingMapGen=void 0}initValues(e){return this.bindingMapGen=this.procGenWrapper.create(e),this.shadowRoot}updateValues(e,t){if(2===this.forceBindingMapUpdate){for(let n=0;n<t.length;n+=1)this.tryBindingMapUpdate(e,t[n]);return}if(1===this.forceBindingMapUpdate&&t.length<=1&&this.bindingMapGen&&this.tryBindingMapUpdate(e,t[0]))return;const n=Object.create(null);for(let e=0;e<t.length;e+=1){const[r,o,i,s]=t[e];let a=n;for(let e=0;e<r.length;e+=1){const t=r[e],n=a[t];if(!0===n)break;if(e===r.length-1){if(void 0===s)a[t]=!0;else{const e=i;if(void 0===n)a[t]=Object.create(new Array(e));else if(Array.isArray(Object.getPrototypeOf(n))){const t=Object.getPrototypeOf(n);t.length<e&&(t.length=e);const r=n,o=Object.keys(r);for(let e=0;e<o.length;e+=1){const n=o[e];ut(n)&&(t[Number(n)]=r[n],delete r[n])}}else{const r=new Array(e),o=Object.keys(n);let i=!1;for(let e=0;e<o.length;e+=1){const t=o[e],s=n[t];ut(t)?r[Number(t)]=s:"length"===t&&(i=!0)}const s=Object.create(r);i&&(s.length=!0),a[t]=s}const r=Object.getPrototypeOf(a[t]),l=new Array(o.length);l.fill(!0),r.splice(i,s,...l)}break}if(void 0===n){const e=Object.create(null);a[t]=e,a=e}else a=n}}this.procGenWrapper.update(e,n)}tryBindingMapUpdate(e,t){if(!t)return!0;const n=this.bindingMapGen;if(!n)return!1;const[r]=t;return 1===r.length&&this.procGenWrapper.bindingMapUpdate(r[0],e,n)}}let ft=null;const vt=()=>{if(ft)return ft;const e=new dt;return ft=e,e};Object.freeze({__proto__:null,DEFAULT_PROC_GEN_GROUP:lt,get GeneralLvaluePathPrefix(){return et},GlassEaselTemplateEngine:dt,getDefaultTemplateEngine:vt});const gt=(e,t,n,r)=>{const o=t.ownerSpace,i=null==n?void 0:n._$behavior._$using,s=null==n?void 0:n._$genericImpls;e._$detail||e.prepare();const a=e.behavior;let l;const c=a._$generics;if(c){const n=a._$genericDefaults;l=Object.create(null);for(let a=0;a<c.length;a+=1){const u=c[a];if(r&&Object.prototype.hasOwnProperty.call(r,u)){const n=r[u];if("string"==typeof n)if(null==i?void 0:i[n])l[u]=i[n];else if(s&&s[n])l[u]=s[n];else{const r=o.getGlobalUsingComponent(n);if("string"==typeof r)l[u]=r;else if(r)l[u]={final:r,source:t,placeholder:null,waiting:null};else{T(`Generic "${u}" value "${n}" is not valid`,e.is);const r=o.getDefaultComponent();if(!r)throw new I(`Cannot find default component for generic "${u}"`,"[prepare]",e.is);l[u]={final:r,source:t,placeholder:null,waiting:null}}}else l[u]=n}else{const r=n[u]||o.getDefaultComponent();if(!r)throw new I(`Cannot find default component for generic "${u}"`,"[prepare]",e.is);l[u]="string"==typeof r?r:{final:r,source:t,placeholder:null,waiting:null}}}}else l=null;return l},mt=(e,t,n,r)=>{const o=n._$using[e]||r&&r[e];let i=null;if(o&&("string"==typeof o?i=o:null===o.placeholder?i=o.final:T("Placeholder on generic implementation is not valid",n.is)),i)return i;let s=t.getGlobalUsingComponent(e);if(null===s&&t._$allowUnusedNativeNode&&""!==e&&(s=e),!s){if(s=t.getDefaultComponent(),!s)throw new I(`Cannot find placeholder target "${e}"`,"[prepare]",n.is);T(`Cannot find placeholder target "${e}", using default component.`,n.is)}return s};class _t{constructor(e){this.behavior=e,this.is=this.behavior.is,this._$detail=null,this._$options=c(e._$options,e.ownerSpace.getComponentOptions());const t=this._$options.templateEngine;this._$templateEngine=null!=t?t:vt()}general(){return this}getComponentOptions(){return this._$options}getComponentDependencies(){return this.behavior.getComponentDependencies()}updateTemplate(e){var t;if(!(null===(t=this._$detail)||void 0===t?void 0:t.template.updateTemplate))throw new Error(`The template engine of component "${this.is}" does not support template update`);this.behavior._$updateTemplate(e),this._$detail.template.updateTemplate(this.behavior)}isPrepared(){return!!this._$detail}prepare(){if(this._$detail)return;this.behavior.prepare();const e=this.behavior,t=this._$options,n={};if(t.writeFieldsToNode){const t=Object.keys(e._$propertyMap);for(let e=0;e<t.length;e+=1){const r=t[e];n[r]={enumerable:!0,get(){return this._$dataGroup.data[r]},set(e){const t=this._$dataGroup;t.replaceDataOnPath([r],e),t.applyDataUpdates()}}}const r=Object.keys(e._$methodMap);for(let t=0;t<r.length;t+=1){const o=r[t];n[o]={enumerable:!0,value:e._$methodMap[o]}}}const r=function(){};n.constructor={value:r,writable:!0};const o=r.prototype=Object.create(yt.prototype,n);o._$behavior=e,o._$definition=this,o._$methodMap=e._$methodMap,o._$dataGroupObserverTree=e._$generateObserverTree(),o._$lifetimeFuncs=e._$getAllLifetimeFuncs(),o._$pageLifetimeFuncs=e._$getAllPageLifetimeFuncs();const i=(e=>{if(void 0===e)return null;const t={definitions:new Array(6),keyMap:Object.create(null)},n=t.definitions,r=t.keyMap,o=Object.keys(e);for(let t=0;t<o.length;t+=1){const i=o[t],s=e[i],a=s.type;n[a]?(r[i]=[a,n[a].length],n[a].push(s)):(r[i]=[a,0],n[a]=[s])}return t})(e._$relationMap),s=Se(t.dataDeepCopy),a=Se(t.propertyPassingDeepCopy),l=this._$templateEngine.create(e,t);this._$detail={proto:o,template:l,dataDeepCopy:s,propertyPassingDeepCopy:a,relationDefinitionGroup:i}}}let bt=1,$t=null;class yt extends je{constructor(){throw new Error("Element cannot be constructed directly")}general(){return this}asInstanceOf(e){return this._$behavior!==e.behavior?null:this}static register(e,t){return(t||Q()).defineComponent(e)}static _$tagMethod(e){const t=e;return t[U]=!0,t}static isTaggedMethod(e){return"function"==typeof e&&!!e[U]}static _$advancedCreate(e,t,n,r,o,i,s){var a,c,u,d;t._$detail||t.prepare();const{proto:h,template:f,dataDeepCopy:v,propertyPassingDeepCopy:g,relationDefinitionGroup:m}=t._$detail,_=t._$options,b=t.behavior,$=n?n.getBackendContext():r||l.backendContext||(()=>{if($t)return $t;let e;return e=new R,$t=e,e})(),y=_.externalComponent,S=_.propertyEarlyInit,C=l.writeExtraInfoToAttr,w=_.virtualHost,E=Object.create(h);E._$genericImpls=o,E._$external=y,E.tagName=e,E._$methodCaller=E;const N=b.ownerSpace,k=N._$sharedStyleScope,O=_.styleScope&&_.styleScope!==k;let x=null;$&&(3===$.mode?w||(x=$.document.createElement(e),O&&x.setAttribute("wx-host",N.styleScopeManager.queryName(_.styleScope))):2===$.mode?w||(x=$.createElement(_.hostNodeTagName,e)):1===$.mode&&(x=(n?n._$backendShadowRoot:$.getRootNode()).createComponent(e,y,w,null!==(a=_.styleScope)&&void 0!==a?a:B.globalScope(),_.extraStyleScope,b._$externalClasses))),E._$initialize(w,x,n,n?n._$nodeTreeContext:$),E._$placeholderHandlerRemover=i;const P=n?n.getHostNode():void 0,T=null==P?void 0:P.getComponentOptions(),M=null!==(c=null==T?void 0:T.styleScope)&&void 0!==c?c:B.globalScope(),A=null!==(u=null==T?void 0:T.extraStyleScope)&&void 0!==u?u:void 0,D=null==P?void 0:P._$behavior.ownerSpace.styleScopeManager;if(E.classList=new F(E,b._$externalClasses,P?P.classList:null,M,A,D),x&&(2===$.mode&&x.setStyleScope(M,A,O?null!==(d=_.styleScope)&&void 0!==d?d:B.globalScope():void 0),D&&C)){const e=D.queryName(M);e&&x.setAttribute("exparser:info-class-prefix",`${e}--`)}const L=f.createInstance(E,He.createShadowRoot);if(x&&(x.__wxElement=E,3!==$.mode?x.associateValue(E):$.associateValue(x,E)),C&&x){const e=bt;bt+=1,E._$componentInstanceId=e,x.setAttribute("exparser:info-component-id",e)}E._$idPrefix=_.idPrefixGenerator?_.idPrefixGenerator.call(E):"";const j=b._$staticData,U=b._$data;let W;if(void 0===j)if(1===U.length)W=(0,U[0])();else{W={};for(let e=0;e<U.length;e+=1){const t=U[e];Object.assign(W,t())}}else{W=oe(j);for(let e=0;e<U.length;e+=1){const t=U[e];Object.assign(W,t())}}const V=E._$relation=new Ue(E,m);E._$traitGroup=new G;const H=b._$traitBehaviors;if(void 0!==H)for(let e=0;e<H.length;e+=1){const{traitBehavior:t,impl:n}=H[e];E._$traitGroup.implement(t,n)}if(b._$methodCallerInit){const e=b._$methodCallerInit.call(E);E._$methodCaller=e}let Y=!1;if(b._$init.length>0){let e=!0;const t=E.getMethodCaller(),n={self:t,data:W,setData:E.setData.bind(E),implement:(e,t)=>{if(Y)throw new I("Cannot execute init-time functions after initialization","[implement]",b.is);E._$traitGroup.implement(e,t)},relation:function(e){if(Y)throw new I("Cannot execute init-time functions after initialization","[implement]",b.is);const t=e.target,n=Fe(b.ownerSpace,b.is,"undefined",e);let r;return r=n?V.add(n):Symbol("invalid"),{list:()=>V.getLinkedTargets(r).map((e=>e.getMethodCaller())),listAsTrait:t instanceof q?()=>V.getLinkedTargets(r).map((e=>e.traitBehavior(t))):void 0}},observer:(e,t)=>{if(Y)throw new I("Cannot execute init-time functions after initialization","[implement]",b.is);E.dynamicAddObserver(t,e)},lifetime:(e,t)=>{if(Y)throw new I("Cannot execute init-time functions after initialization","[implement]",b.is);E.addLifetimeListener(e,t)},pageLifetime:(e,t)=>{if(Y)throw new I("Cannot execute init-time functions after initialization","[implement]",b.is);E.addPageLifetimeListener(e,t)},method:e=>yt._$tagMethod(e),listener:e=>yt._$tagMethod(e)},r=b._$init;for(let o=0;o<r.length;o+=1){const i=p("Component Init",r[o],t,[n],void 0);if(i){const t=Object.keys(i);for(let n=0;n<t.length;n+=1){const r=t[n],o=i[r];yt.isTaggedMethod(o)&&(e&&(e=!1,E._$methodMap=Object.create(E._$methodMap)),E._$methodMap[r]=o,_.writeFieldsToNode&&(E[r]=o))}}}}Y=!0;const z=L.shadowRoot;E.shadowRoot=z;const Q=new Ce(E,W,_.pureDataPattern||null,v,g,_.reflectToAttributes,E._$dataGroupObserverTree);E._$dataGroup=Q,S&&void 0!==s&&s(E),L.initValues(Q.innerData||Q.data),E._$tmplInst=L,Q.setUpdateListener(((e,t)=>{L.updateValues(e,t)}));const K=b._$listeners;if(void 0!==K)for(let e=0;e<K.length;e+=1){const{id:t,ev:n,listener:r}=K[e],o=r;if("this"===t)E.addListener(n,(e=>o.call(E._$methodCaller,e)));else if(y){const e=z,r=t?e.getIdMap()[t]:e.root;r&&e.setListener(r,n,(e=>o.call(E._$methodCaller,e)))}else{const e=z,r=t?e.getElementById(t):e;r&&r.addListener(n,(e=>o.call(E._$methodCaller,e)))}}return E.triggerLifetime("created",[]),S||void 0===s||s(E),E}static createWithGenericsAndContext(e,t,n,r,o){const i=e=>{let t;return n&&(t=Object.create(null),Object.entries(n).forEach((([n,r])=>{t[n]={final:r,source:e.behavior,placeholder:null,waiting:null}}))),gt(e,e.behavior,void 0,t)};if(t)return yt._$advancedCreate(String(e),t,null,r,i(t),void 0,o);if(e instanceof _t)return yt._$advancedCreate(e.is,e,null,r,i(e),void 0);const s=Q().getComponentByUrl(e,"");return yt._$advancedCreate(e,s,null,r,i(s),void 0)}static createWithGenerics(e,t,n,r){return yt.createWithGenericsAndContext(e,t,n,null,r)}static createWithContext(e,t,n,r){return yt.createWithGenericsAndContext(e,t,null,n,r)}static create(e,t,n){return yt.createWithGenericsAndContext(e,t,null,null,n)}get is(){return this._$definition.is}get properties(){return this._$dataGroup.data}get data(){return this._$dataGroup.data}set data(e){const t=this._$dataGroup;if(void 0===t)throw new I("Cannot update data before component created","data setter",this);Object.entries(e).forEach((([e,n])=>t.replaceDataOnPath([e],n))),t.applyDataUpdates()}get $(){return this._$external?this.shadowRoot.getIdMap():this.shadowRoot._$getIdMap()}getShadowRoot(){return this._$external?null:this.shadowRoot}applyTemplateUpdates(){var e;if(!(null===(e=this._$tmplInst)||void 0===e?void 0:e.updateTemplate))throw new Error(`The template engine of component "${this.is}" does not support template update`);const t=this._$dataGroup;this._$tmplInst.updateTemplate(this._$definition._$detail.template,t.innerData||t.data)}getOwnerSpace(){return this._$behavior.ownerSpace}isExternal(){return this._$external}static listProperties(e){return Object.keys(e._$behavior._$propertyMap)}static hasProperty(e,t){return!!e._$behavior._$propertyMap[t]}static getMethodsFromDef(e){return e.behavior._$methodMap}static getMethod(e,t){if(e._$definition._$options.useMethodCallerListeners&&Object.prototype.hasOwnProperty.call(e._$methodCaller,t)){const n=e._$methodCaller[t];return"function"==typeof n?n:void 0}return e._$methodMap[t]}callMethod(e,...t){const n=yt.getMethod(this,e);return null==n?void 0:n.call(this,...t)}getComponentDefinition(){return this._$definition}getComponentOptions(){return this._$definition._$options}hasBehavior(e){return e instanceof q?void 0!==this._$traitGroup.get(e):this._$behavior.hasBehavior(e)}getRootBehavior(){return this._$behavior}traitBehavior(e){return this._$traitGroup.get(e)}setMethodCaller(e){this._$methodCaller=e}getMethodCaller(){return this._$methodCaller}addLifetimeListener(e,t){Object.prototype.hasOwnProperty.call(this,"_$lifetimeFuncs")||(this._$lifetimeFuncs=this._$behavior._$getAllLifetimeFuncs());const n=this._$lifetimeFuncs;(n[e]=n[e]||new u("lifetime")).add(t)}removeLifetimeListener(e,t){Object.prototype.hasOwnProperty.call(this,"_$lifetimeFuncs")||(this._$lifetimeFuncs=this._$behavior._$getAllLifetimeFuncs());const n=this._$lifetimeFuncs[e];null==n||n.remove(t)}triggerLifetime(e,t){const n=this._$lifetimeFuncs[e];n&&n.call(this._$methodCaller,t,this)}triggerLifeTime(e,t){return this.triggerLifetime(e,t)}addPageLifetimeListener(e,t){Object.prototype.hasOwnProperty.call(this,"_$pageLifetimeFuncs")||(this._$pageLifetimeFuncs=this._$behavior._$getAllPageLifetimeFuncs());const n=this._$pageLifetimeFuncs;(n[e]=n[e]||new u("pageLifetime")).add(t)}removePageLifetimeListener(e,t){Object.prototype.hasOwnProperty.call(this,"_$pageLifetimeFuncs")||(this._$pageLifetimeFuncs=this._$behavior._$getAllPageLifetimeFuncs());const n=this._$pageLifetimeFuncs[e];null==n||n.remove(t)}triggerPageLifetime(e,t){const n=r=>{if(E(r)){if(r._$pageLifetimeFuncs){const n=r._$pageLifetimeFuncs[e];n&&n.call(r._$methodCaller,t,this)}r._$external||n(r.shadowRoot)}const o=r.childNodes;for(let e=0;e<o.length;e+=1){const t=o[e];y(t)&&n(t)}};n(this)}triggerPageLifeTime(e,t){return this.triggerPageLifetime(e,t)}dynamicAddObserver(e,t){Object.prototype.hasOwnProperty.call(this,"_$dataGroupObserverTree")||(this._$dataGroupObserverTree=this._$dataGroupObserverTree.cloneSub(),this._$dataGroup&&(this._$dataGroup._$observerTree=this._$dataGroupObserverTree));const n=this._$dataGroupObserverTree;try{n.addObserver(e,ne(t))}catch(e){P(e,"observer",this.is)}}getRelationNodes(e){var t;return(null===(t=this._$relation)||void 0===t?void 0:t.getLinkedTargets(e))||[]}hasExternalClass(e){return this.classList._$hasAlias(e)}setExternalClass(e,t){this.scheduleExternalClassChange(e,t),this.applyExternalClassChanges(),this._$mutationObserverTarget&&ae.callAttrObservers(this,{type:"properties",target:this,nameType:"external-class",attributeName:e})}getExternalClasses(){return this.classList._$getAlias()}scheduleExternalClassChange(e,t){this.classList._$setAlias(e,t)}applyExternalClassChanges(){if(this._$external)return;if(!this.classList._$shouldUpdateExternalClass())return;const e=t=>{if(!y(t))return;const n=t.classList;(null==n?void 0:n._$spreadExternalClassUpdate())&&E(t)&&t.applyExternalClassChanges();const r=t.childNodes;for(let t=0,n=r.length;t<n;t+=1)e(r[t]);null==n||n._$markExternalClassUpdated()};e(this.shadowRoot)}triggerWorkletChangeLifetime(e,t){this.triggerLifetime("workletChange",[e,t])}isInnerDataExcluded(e){var t;return(null===(t=this._$definition._$options.pureDataPattern)||void 0===t?void 0:t.test(e))||!1}static getInnerData(e){return e._$dataGroup.innerData}static getDataProxy(e){return e._$dataGroup}static replaceWholeData(e,t){e._$dataGroup.replaceWholeData(t)}replaceDataOnPath(e,t){const n=this._$dataGroup;if(void 0===n)throw new I("Cannot update data before component created","replaceDataOnPath",this);n.replaceDataOnPath(e,t)}spliceArrayDataOnPath(e,t,n,r){const o=this._$dataGroup;if(void 0===o)throw new I("Cannot update data before component created","spliceArrayDataOnPath",this);o.spliceArrayDataOnPath(e,t,n,r)}hasPendingChanges(){const e=this._$dataGroup;return void 0!==e&&e.getChanges().length>0}applyDataUpdates(){const e=this._$dataGroup;if(void 0===e)throw new I("Cannot update data before component created","applyDataUpdates",this);e.applyDataUpdates()}groupUpdates(e){const t=this._$dataGroup;if(void 0===t)throw new I("Cannot update data before component created","groupUpdates",this);const n=e();return t.applyDataUpdates(),n}updateData(e){const t=this._$dataGroup;if(void 0===t)throw new I("Cannot update data before component created","updateData",this);if("object"==typeof e&&null!==e){const n=Object.keys(e);for(let r=0;r<n.length;r+=1){const o=n[r];try{const n=te(o);t.replaceDataOnPath(n,e[o])}catch(e){P(e,"updateData",this)}}}}setData(e){const t=this._$dataGroup;if(void 0===t)throw new I("Cannot update data before component created","setData",this);if("object"==typeof e&&null!==e){const n=Object.keys(e);for(let r=0;r<n.length;r+=1){const o=n[r];try{const n=te(o);t.replaceDataOnPath(n,e[o])}catch(e){P(e,"setData",this)}}}t.applyDataUpdates()}}yt.isComponent=E,yt.prototype[b]=!0;class St{constructor(e,t){this._$behaviors=[],this._$traitBehaviors=[],this._$staticData=void 0,this._$data=[],this._$methods=[],this._$lifetimes=[],this._$pageLifetimes=[],this._$init=[],this._$is=e,this._$ownerSpace=t}methodCallerInit(e){return this._$methodCallerInit=e,this}behavior(e){return this._$behaviors.push(e),e._$chainingFilter?e._$chainingFilter(this):this}chainingFilter(e){return this._$chainingFilter=e,this}options(e){const t=this._$options;return this._$options=t?Object.assign(Object.assign({},t),e):e,this}implement(e,t){return this._$traitBehaviors.push({traitBehavior:e,impl:t}),this}template(e){return this._$template=e,this}usingComponents(e){return this._$using?this._$using=Object.assign(Object.assign({},this._$using),e):this._$using=e,this}placeholders(e){return this._$placeholders?this._$placeholders=Object.assign(Object.assign({},this._$placeholders),e):this._$placeholders=e,this}generics(e){return this._$generics?this._$generics=Object.assign(Object.assign({},this._$generics),e):this._$generics=e,this}externalClasses(e){return this._$externalClasses?this._$externalClasses=this._$externalClasses.concat(e):this._$externalClasses=e,this}data(e){return this._$data.push((()=>{var t;return null!==(t=p("Data Generator",e,null,[],this._$is))&&void 0!==t?t:{}})),this}staticData(e){return this._$staticData=e,this}property(e,t){return this._$properties||(this._$properties=[]),this._$properties.push({name:e,def:t}),this}methods(e){const t=Object.keys(e);for(let n=0;n<t.length;n+=1){const r=t[n],o=e[r];this._$methods.push({name:r,func:o})}return this}observer(e,t,n=!1){this._$observers||(this._$observers=[]);try{this._$observers.push({dataPaths:ne(e),func:t,once:n})}catch(e){P(e,"observer",this._$is)}return this}lifetime(e,t,n=!1){return this._$lifetimes.push({name:e,func:t,once:n}),this}pageLifetime(e,t,n=!1){return this._$pageLifetimes||(this._$pageLifetimes=[]),this._$pageLifetimes.push({name:e,func:t,once:n}),this}relation(e,t){return this._$relations||(this._$relations=[]),this._$relations.push({name:e,rel:t}),this}init(e){return this._$init.push(e),this}definition(e){e.behaviors&&this._$behaviors.push(...e.behaviors),e.options&&this.options(e.options),e.template&&this.template(e.template),e.using&&this.usingComponents(e.using),e.placeholders&&this.placeholders(e.placeholders),e.generics&&this.generics(e.generics),e.externalClasses&&this.externalClasses(e.externalClasses);const t=e.data;void 0!==t&&("function"==typeof t?this._$data.push((()=>{var e;return null!==(e=p("Data Generator",t,null,[],this._$is))&&void 0!==e?e:{}})):this._$staticData=t);const n=e.properties;if(void 0!==n){this._$properties||(this._$properties=[]);const e=Object.keys(n);for(let t=0;t<e.length;t+=1){const r=e[t],o=n[r];this._$properties.push({name:r,def:o})}}const r=e.methods;if(void 0!==r){const e=Object.keys(r);for(let t=0;t<e.length;t+=1){const n=e[t],o=r[n];this._$methods.push({name:n,func:o})}}const o=e.observers;if(void 0!==o)if(this._$observers||(this._$observers=[]),Array.isArray(o))for(let t=0;t<o.length;t+=1){const{fields:n,observer:r}=o[t];try{this._$observers.push({dataPaths:ne(null!=n?n:"**"),func:r,once:!1})}catch(e){P(e,"definition",this._$is)}}else{const t=Object.keys(o);for(let n=0;n<t.length;n+=1){const r=t[n],i=o[r];try{this._$observers.push({dataPaths:ne(r),func:i,once:!1})}catch(e){P(e,"definition",this._$is)}}}const i=e.lifetimes;if(void 0===(null==i?void 0:i.created)&&"function"==typeof e.created&&this._$lifetimes.push({name:"created",func:e.created,once:!0}),void 0===(null==i?void 0:i.attached)&&"function"==typeof e.attached&&this._$lifetimes.push({name:"attached",func:e.attached,once:!0}),void 0===(null==i?void 0:i.moved)&&"function"==typeof e.moved&&this._$lifetimes.push({name:"moved",func:e.moved,once:!0}),void 0===(null==i?void 0:i.detached)&&"function"==typeof e.detached&&this._$lifetimes.push({name:"detached",func:e.detached,once:!0}),void 0===(null==i?void 0:i.ready)&&"function"==typeof e.ready&&this._$lifetimes.push({name:"ready",func:e.ready,once:!0}),i){const e=Object.keys(i);for(let t=0;t<e.length;t+=1){const n=e[t],r=i[n];this._$lifetimes.push({name:n,func:r,once:!0})}}const s=e.pageLifetimes;if(s){this._$pageLifetimes||(this._$pageLifetimes=[]);const e=Object.keys(s);for(let t=0;t<e.length;t+=1){const n=e[t],r=s[n];this._$pageLifetimes.push({name:n,func:r,once:!0})}}this._$listeners=e.listeners;const a=e.relations;if(a){this._$relations||(this._$relations=[]);const e=Object.keys(a);for(let t=0;t<e.length;t+=1){const n=e[t],r=a[n];this._$relations.push({name:n,rel:r})}}return this}registerBehavior(){const e=this._$is,t=new Ct(this);return void 0!==e&&this._$ownerSpace._$registerBehavior(e,t),t}extraThisFieldsType(){return this}registerComponent(){const e=this._$is,t=new Ct(this),n=new _t(t);return void 0!==e&&this._$ownerSpace._$registerComponent(e,n),n}}class Ct{static create(e,t){return new St(e.is,t||Q()).definition(e).registerBehavior()}constructor(e){this._$unprepared=!0,this.is=e._$is||"",this.ownerSpace=e._$ownerSpace,this._$builder=e,this._$flatAncestors=new Set,this._$chainingFilter=e._$chainingFilter,this._$options=e._$options,this._$traitBehaviors=void 0,this._$template=e._$template,this._$using=Object.create(null),this._$generics=void 0,this._$genericDefaults=void 0,this._$externalClasses=e._$externalClasses,this._$staticData=void 0,this._$data=[],this._$propertyMap=Object.create(null),this._$methodMap=Object.create(null),this._$observers=[],this._$lifetimes=[],this._$pageLifetimes=void 0,this._$listeners=void 0,this._$relationMap=void 0,this._$init=[],this._$methodCallerInit=e._$methodCallerInit}general(){return this}getComponentDependencies(e){const t=new Set,n=function(e){e._$unprepared&&e.prepare();const r=Object.keys(e._$using);for(let o=0;o<r.length;o+=1){const i=r[o],s=e._$using[i];if("string"==typeof s)continue;const a=s.final;a&&!t.has(a)&&(t.add(a),n(a.behavior))}};if(n(this.general()),e){const r=Object.values(e);for(let e=0;e<r.length;e+=1){const o=r[e];"string"!=typeof o&&(t.has(o)||(t.add(o),n(o.behavior)))}}return t}static prepare(e){e.prepare()}prepare(){var e;if(!this._$unprepared)return;this._$unprepared=!1;const t=this.is,n=this.ownerSpace,r=this._$builder,o=this._$flatAncestors;if(Array.isArray(r._$behaviors))for(let e=0;e<r._$behaviors.length;e+=1){const i=r._$behaviors[e];let s=null;if(i instanceof Ct)s=i;else{const e=String(i);n&&(s=n.getBehaviorByUrl(e,t)),s||P(new Error(`behavior "${e}" is not found.`),"[prepare]",t)}if(!s)continue;s._$unprepared&&Ct.prepare(s);const a=s._$traitBehaviors;void 0!==a&&(this._$traitBehaviors||(this._$traitBehaviors=[]),this._$traitBehaviors.push(...a));const l=s._$staticData;l&&(this._$staticData||(this._$staticData={}),de(this._$staticData,l)),Object.assign(this._$methodMap,s._$methodMap),Object.assign(this._$propertyMap,s._$propertyMap),this._$data.push(...s._$data);const c=s._$observers;for(let e=0;e<c.length;e+=1){const t=c[e];t.once&&this._$observers.indexOf(t)>=0||this._$observers.push(t)}const u=s._$lifetimes;for(let e=0;e<u.length;e+=1){const t=u[e];t.once&&this._$lifetimes.indexOf(t)>=0||this._$lifetimes.push(t)}const d=s._$pageLifetimes;if(void 0!==d)if(this._$pageLifetimes)for(let e=0;e<d.length;e+=1){const t=d[e];t.once&&this._$pageLifetimes.indexOf(t)>=0||this._$pageLifetimes.push(t)}else this._$pageLifetimes=d.slice();const h=s._$listeners;void 0!==h&&(this._$listeners||(this._$listeners=[]),this._$listeners.push(...h));const p=s._$relationMap;void 0!==p&&(this._$relationMap||(this._$relationMap=Object.create(null)),Object.assign(this._$relationMap,p)),this._$init.push(...s._$init),s._$flatAncestors.forEach((e=>{o.add(e)}))}const i=r._$traitBehaviors;if(void 0!==i&&(this._$traitBehaviors||(this._$traitBehaviors=[]),this._$traitBehaviors.push(...i)),"object"==typeof r._$using&&null!==r._$using){const o="object"==typeof r._$placeholders&&null!==r._$placeholders,i=Object.keys(r._$using);for(let s=0;s<i.length;s+=1){const a=i[s],l=r._$using[a];let c=null;if(o&&(c=null!==(e=r._$placeholders[a])&&void 0!==e?e:null),l instanceof _t)this._$using[a]={final:l,source:this,placeholder:c,waiting:null};else if(n){const e=String(l),r=n.getComponentByUrlWithoutDefault(e,t);if(r)this._$using[a]={final:r,source:this,placeholder:null,waiting:null};else if(null!==c){const r={final:null,source:this,placeholder:c,waiting:null},o=n._$componentWaitingList(e,t);o&&(o.add((e=>{r.final=e,r.placeholder=null,r.waiting=null})),r.waiting=o),this._$using[a]=r}else{const t=n.getGlobalUsingComponent(e);this._$using[a]="string"==typeof t?t:{final:t,source:this,placeholder:null,waiting:null}}}else P(new Error(`cannot find component "${String(l)}"`),"[prepare]",t)}}if("object"==typeof r._$generics&&null!==r._$generics){const e=this._$generics=[],o=Object.create(null);this._$genericDefaults=o;const i=Object.keys(r._$generics);for(let s=0;s<i.length;s+=1){const a=i[s],l=r._$generics[a];let c=null;const u=!0===l||null==l?void 0:l.default;if(void 0!==u)if(u instanceof _t)c=u;else if(n){const e=String(u);c=n.getComponentByUrlWithoutDefault(e,t)||n.getGlobalUsingComponent(e)}else P(new Error(`cannot define generic "${a}" without a default implementor.`),"[prepare]",t);e.push(a),o[a]=c}}const s=r._$staticData;s&&(this._$staticData?de(this._$staticData,s):this._$staticData=s);const a=r._$methods;for(let e=0;e<a.length;e+=1){const{name:t,func:n}=a[e];this._$methodMap[t]=n}const l=r._$properties;if(void 0!==l){const e=[];for(let n=0;n<l.length;n+=1){const{name:r,def:o}=l[n],i="string"===(c=o)||c===String?{type:"string",optionalTypes:null,defaultFn:()=>"",observer:null,comparer:null,reflectIdPrefix:!1}:"number"===c||c===Number?{type:"number",optionalTypes:null,defaultFn:()=>0,observer:null,comparer:null,reflectIdPrefix:!1}:"boolean"===c||c===Boolean?{type:"boolean",optionalTypes:null,defaultFn:()=>!1,observer:null,comparer:null,reflectIdPrefix:!1}:"object"===c||c===Object?{type:"object",optionalTypes:null,defaultFn:()=>null,observer:null,comparer:null,reflectIdPrefix:!1}:"array"===c||c===Array?{type:"array",optionalTypes:null,defaultFn:()=>[],observer:null,comparer:null,reflectIdPrefix:!1}:"function"===c||c===Function?{type:"function",optionalTypes:null,defaultFn:()=>function(){},observer:null,comparer:null,reflectIdPrefix:!1}:"any"===c||null==c?{type:"any",optionalTypes:null,defaultFn:()=>null,observer:null,comparer:null,reflectIdPrefix:!1}:null;let s,a;if(null!==i)s=i,a=i.defaultFn;else{const e=o;let n=pe(e.type),i=null;Array.isArray(e.optionalTypes)&&(i=e.optionalTypes.map(pe),i.length>0&&("invalid"!==n&&"any"!==n||(n=i[0]))),"invalid"===n&&P(new Error(`the type of property "${r}" is illegal`),"[prepare]",t);const l=he(n);"function"==typeof e.default&&void 0!==e.value&&T(`the initial value of property "${r}" is not used when its default is provided.`,t);const c="function"==typeof e.default?()=>{const n=p(`Property "${r}" Default`,e.default,null,[],t);return void 0!==n?n:oe(l)}:()=>oe(l);let u,d;a="function"==typeof e.default?c:void 0!==e.value?()=>oe(e.value):()=>oe(l),"function"==typeof e.observer?u=e.observer:"string"==typeof e.observer?(u=this._$methodMap[e.observer]||null,u||P(new Error(`Cannot find method "${e.observer}" for observer of property "${r}".`),"[prepare]",t)):(u=null,void 0!==e.observer&&P(new Error(`The observer of property "${r}" is not a function, got "${typeof e.observer}".`),"[prepare]",t)),"function"==typeof e.comparer?d=e.comparer:(d=null,void 0!==e.comparer&&P(new Error(`the comparer of property "${r}" is not a function.`),"[prepare]",t)),s={type:n,optionalTypes:i,defaultFn:c,observer:u,comparer:d,reflectIdPrefix:!!e.reflectIdPrefix}}this._$propertyMap[r]=s,e.push({name:r,func:a})}this._$data.push((()=>{const t={};for(let n=0;n<e.length;n+=1){const{name:r,func:o}=e[n];t[r]=o()}return t}))}var c;this._$data.push(...r._$data);const u=r._$observers;if(void 0!==u)for(let e=0;e<u.length;e+=1){const{dataPaths:n,func:r,once:o}=u[e],i="function"==typeof r?r:this._$methodMap[r];"function"==typeof i?this._$observers.push({dataPaths:n,observer:i,once:o}):P(new Error(`the "${String(i)}" observer is not a function.`),"[prepare]",t)}const d=r._$lifetimes;this._$lifetimes.push(...d);const h=r._$pageLifetimes;h&&(this._$pageLifetimes||(this._$pageLifetimes=[]),this._$pageLifetimes.push(...h));const f=r._$listeners;if(void 0!==f){const e=Object.keys(f);if(e.length>0){this._$listeners=[];for(let n=0;n<e.length;n+=1){const r=e[n],o=f[r],i="function"==typeof o?o:this._$methodMap[o];if(i){const e=r.indexOf(".");let t,n;e>=0?(t=r.slice(0,e),n=r.slice(e+1)):(t="",n=r),this._$listeners.push({id:t,ev:n,listener:i})}else P(new Error(`the "${r}" listener is not a function or a method name`),"[prepare]",t)}}}const v=r._$relations;if(void 0!==v){this._$relationMap||(this._$relationMap=Object.create(null));for(let e=0;e<v.length;e+=1){const{name:r,rel:o}=v[e];if(null==o)continue;const i=Fe(n,t,r,o);i&&(this._$relationMap[r]=i)}}this._$init.push(...r._$init),o.add(this)}getTemplate(){return this._$template}_$updateTemplate(e){this._$template=e}hasBehavior(e){if(this._$unprepared&&this.prepare(),e instanceof Ct)return this._$flatAncestors.has(e);if(this.ownerSpace){const t=this.ownerSpace.getBehaviorByUrl(e,this.is);return!!t&&this._$flatAncestors.has(t)}return!1}listProperties(){return Object.keys(this._$propertyMap)}getPropertyType(e){var t;return null===(t=this._$propertyMap[e])||void 0===t?void 0:t.type}getPropertyOptionalType(e){var t;return null===(t=this._$propertyMap[e])||void 0===t?void 0:t.optionalTypes}getMethods(){return this._$methodMap}_$generateObserverTree(){const e=new me(this._$propertyMap),t=this._$observers;for(let n=0;n<t.length;n+=1){const{dataPaths:r,observer:o}=t[n];e.addObserver(o,r)}return e}_$getAllLifetimeFuncs(){const e=Object.create(null),t=this._$lifetimes;for(let n=0;n<t.length;n+=1){const{name:r,func:o}=t[n];e[r]?e[r].add(o):(e[r]=new u("lifetime")).add(o)}return e}_$getAllPageLifetimeFuncs(){const e=Object.create(null),t=this._$pageLifetimes;if(!t)return e;for(let n=0;n<t.length;n+=1){const{name:r,func:o}=t[n];e[r]?e[r].add(o):(e[r]=new u("pageLifetime")).add(o)}return e}}var wt;!function(e){e.ShadowAncestors="shadow-ancestors",e.ComposedAncestors="composed-ancestors",e.ShadowDescendantsRootFirst="shadow-descendants-root-first",e.ShadowDescendantsRootLast="shadow-descendants-root-last",e.ComposedDescendantsRootFirst="composed-descendants-root-first",e.ComposedDescendantsRootLast="composed-descendants-root-last"}(wt||(wt={})),Symbol.iterator,Object.freeze({__proto__:null}),Pe.triggerEvent,Pe.triggerExternalEvent;var Et=function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e?{type:"primitive",value:e}:"symbol"==typeof e?{type:"symbol",value:e.toString()}:"function"==typeof e?{type:"function"}:Array.isArray(e)?{type:"array"}:{type:"object"}},Nt=function(e){return"primitive"===e.type?String(e.value):"symbol"===e.type?e.value:"function"===e.type?"() => {...}":"object"===e.type?"{...}":"array"===e.type?"[...]":"[unknown]"},kt=function(e){return 257===e?3:258===e||259===e||260===e||261===e?1:9},Ot=n(443),xt=n.n(Ot);function Pt(e,t){return e.a===t.a?e.b===t.b?e.c-t.c:e.b-t.b:e.a-t.a}function Tt(e,t){const n=t?.customSpecificity?.(e);if(n)return n;if(!e)return{a:0,b:0,c:0};let r=0,o=0,i=0;if("universal"==e.type)return{a:0,b:0,c:0};if("id"===e.type)r+=1;else if("tag"===e.type)i+=1;else if("class"===e.type)o+=1;else if("attribute"===e.type)o+=1;else if(function(e){return Ot.isPseudoElement(e)}(e))switch(e.value.toLowerCase()){case"::slotted":if(i+=1,e.nodes&&e.nodes.length>0){const n=It(e.nodes,t);r+=n.a,o+=n.b,i+=n.c}break;case"::view-transition-group":case"::view-transition-image-pair":case"::view-transition-old":case"::view-transition-new":return e.nodes&&1===e.nodes.length&&"selector"===e.nodes[0].type&&function(e){if(!e)return!1;if(!e.nodes)return!1;const t=e.nodes.filter((e=>"comment"!==e.type));return 0===t.length||1===t.length&&"universal"===t[0].type}(e.nodes[0])?{a:0,b:0,c:0}:{a:0,b:0,c:1};default:i+=1}else if(Ot.isPseudoClass(e))switch(e.value.toLowerCase()){case":-webkit-any":case":any":default:o+=1;break;case":-moz-any":case":has":case":is":case":matches":case":not":if(e.nodes&&e.nodes.length>0){const n=It(e.nodes,t);r+=n.a,o+=n.b,i+=n.c}break;case":where":break;case":nth-child":case":nth-last-child":if(o+=1,e.nodes&&e.nodes.length>0){const n=e.nodes[0].nodes.findIndex((e=>"tag"===e.type&&"of"===e.value.toLowerCase()));if(n>-1){const s=Ot.selector({nodes:[],value:""});e.nodes[0].nodes.slice(n+1).forEach((e=>{s.append(e.clone())}));const a=[s];e.nodes.length>1&&a.push(...e.nodes.slice(1));const l=It(a,t);r+=l.a,o+=l.b,i+=l.c}}break;case":local":case":global":e.nodes&&e.nodes.length>0&&e.nodes.forEach((e=>{const n=Tt(e,t);r+=n.a,o+=n.b,i+=n.c}));break;case":host":case":host-context":if(o+=1,e.nodes&&e.nodes.length>0){const n=It(e.nodes,t);r+=n.a,o+=n.b,i+=n.c}break;case":active-view-transition":case":active-view-transition-type":return{a:0,b:1,c:0}}else Ot.isContainer(e)&&e.nodes?.length>0&&e.nodes.forEach((e=>{const n=Tt(e,t);r+=n.a,o+=n.b,i+=n.c}));return{a:r,b:o,c:i}}function It(e,t){let n={a:0,b:0,c:0};return e.forEach((e=>{const r=Tt(e,t);Pt(r,n)<0||(n=r)})),n}class Mt extends Error{sourceStart;sourceEnd;parserState;constructor(e,t,n,r){super(e),this.name="ParseError",this.sourceStart=t,this.sourceEnd=n,this.parserState=r}}class Rt extends Mt{token;constructor(e,t,n,r,o){super(e,t,n,r),this.token=o}}const At={UnexpectedNewLineInString:"Unexpected newline while consuming a string token.",UnexpectedEOFInString:"Unexpected EOF while consuming a string token.",UnexpectedEOFInComment:"Unexpected EOF while consuming a comment.",UnexpectedEOFInURL:"Unexpected EOF while consuming a url token.",UnexpectedEOFInEscapedCodePoint:"Unexpected EOF while consuming an escaped code point.",UnexpectedCharacterInURL:"Unexpected character while consuming a url token.",InvalidEscapeSequenceInURL:"Invalid escape sequence while consuming a url token.",InvalidEscapeSequenceAfterBackslash:'Invalid escape sequence after "\\"'};class Dt{cursor=0;source="";codePointSource=[];representationIndices=[-1];length=0;representationStart=0;representationEnd=-1;constructor(e){this.source=e;{let t=-1,n="";for(n of e)t+=n.length,this.codePointSource.push(n.codePointAt(0)),this.representationIndices.push(t)}this.length=this.codePointSource.length}advanceCodePoint(e=1){this.cursor=this.cursor+e,this.representationEnd=this.representationIndices[this.cursor]}readCodePoint(e=1){const t=this.codePointSource[this.cursor];return void 0!==t&&(this.cursor=this.cursor+e,this.representationEnd=this.representationIndices[this.cursor],t)}unreadCodePoint(e=1){this.cursor=this.cursor-e,this.representationEnd=this.representationIndices[this.cursor]}resetRepresentation(){this.representationStart=this.representationIndices[this.cursor]+1,this.representationEnd=-1}}function Lt(...e){let t="";for(let n=0;n<e.length;n++)t+=e[n][1];return t}"undefined"!=typeof globalThis&&globalThis;const jt=39,Bt=8,Ft=13,Ut=9,qt=127,Gt=12,Wt=46,Vt=45,Ht=31,Yt=69,zt=101,Qt=40,Kt=10,Xt=11,Zt=95,Jt=1114111,en=0,tn=37,nn=43,rn=34,on=65533,sn=92,an=41,ln=14,cn=32,un=117,dn=85,hn=114,pn=82,fn=108,vn=76;function gn(e){return e>=48&&e<=57}function mn(e){return gn(e)||e>=97&&e<=102||e>=65&&e<=70}function _n(e){return function(e){return function(e){return e>=97&&e<=122}(e)||function(e){return e>=65&&e<=90}(e)}(e)||function(e){return 183===e||8204===e||8205===e||8255===e||8256===e||8204===e||192<=e&&e<=214||216<=e&&e<=246||248<=e&&e<=893||895<=e&&e<=8191||8304<=e&&e<=8591||11264<=e&&e<=12271||12289<=e&&e<=55295||63744<=e&&e<=64975||65008<=e&&e<=65533||e>=65536}(e)||e===Zt}function bn(e){return _n(e)||gn(e)||e===Vt}function $n(e){return e===Kt||e===Ft||e===Gt}function yn(e){return e===cn||e===Kt||e===Ut||e===Ft||e===Gt}function Sn(e){return e.codePointSource[e.cursor]===sn&&!$n(e.codePointSource[e.cursor+1])}function Cn(e,t){return t.codePointSource[t.cursor]===Vt?t.codePointSource[t.cursor+1]===Vt||!!_n(t.codePointSource[t.cursor+1])||t.codePointSource[t.cursor+1]===sn&&!$n(t.codePointSource[t.cursor+2]):!!_n(t.codePointSource[t.cursor])||Sn(t)}function wn(e){return e.codePointSource[e.cursor]===nn||e.codePointSource[e.cursor]===Vt?!!gn(e.codePointSource[e.cursor+1])||e.codePointSource[e.cursor+1]===Wt&&gn(e.codePointSource[e.cursor+2]):e.codePointSource[e.cursor]===Wt?gn(e.codePointSource[e.cursor+1]):gn(e.codePointSource[e.cursor])}var En,Nn,kn;function On(e,t){const n=t.readCodePoint();if(!1===n)return e.onParseError(new Mt(At.UnexpectedEOFInEscapedCodePoint,t.representationStart,t.representationEnd,["4.3.7. Consume an escaped code point","Unexpected EOF"])),on;if(mn(n)){const e=[n];for(;void 0!==t.codePointSource[t.cursor]&&mn(t.codePointSource[t.cursor])&&e.length<6;)e.push(t.codePointSource[t.cursor]),t.advanceCodePoint();yn(t.codePointSource[t.cursor])&&t.advanceCodePoint();const o=parseInt(String.fromCodePoint(...e),16);return 0===o||(r=o)>=55296&&r<=57343||o>Jt?on:o}var r;return n}function xn(e,t){const n=[];for(;;)if(bn(t.codePointSource[t.cursor]))n.push(t.codePointSource[t.cursor]),t.advanceCodePoint();else{if(!Sn(t))return n;t.advanceCodePoint(),n.push(On(e,t))}}function Pn(e,t){let n;{const e=t.codePointSource[t.cursor];e===Vt?n="-":e===nn&&(n="+")}const r=function(e,t){let n=Nn.Integer;for(t.codePointSource[t.cursor]!==nn&&t.codePointSource[t.cursor]!==Vt||t.advanceCodePoint();gn(t.codePointSource[t.cursor]);)t.advanceCodePoint();if(t.codePointSource[t.cursor]===Wt&&gn(t.codePointSource[t.cursor+1]))for(t.advanceCodePoint(2),n=Nn.Number;gn(t.codePointSource[t.cursor]);)t.advanceCodePoint();if(t.codePointSource[t.cursor]===zt||t.codePointSource[t.cursor]===Yt){if(gn(t.codePointSource[t.cursor+1]))t.advanceCodePoint(2);else{if(t.codePointSource[t.cursor+1]!==Vt&&t.codePointSource[t.cursor+1]!==nn||!gn(t.codePointSource[t.cursor+2]))return n;t.advanceCodePoint(3)}for(n=Nn.Number;gn(t.codePointSource[t.cursor]);)t.advanceCodePoint()}return n}(0,t),o=parseFloat(t.source.slice(t.representationStart,t.representationEnd+1));if(Cn(0,t)){const i=xn(e,t);return[En.Dimension,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:o,signCharacter:n,type:r,unit:String.fromCodePoint(...i)}]}return t.codePointSource[t.cursor]===tn?(t.advanceCodePoint(),[En.Percentage,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:o,signCharacter:n}]):[En.Number,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:o,signCharacter:n,type:r}]}function Tn(e,t){for(;;){if(void 0===t.codePointSource[t.cursor])return;if(t.codePointSource[t.cursor]===an)return void t.advanceCodePoint();Sn(t)?(t.advanceCodePoint(),On(e,t)):t.advanceCodePoint()}}function In(e,t){const n=xn(e,t);if(t.codePointSource[t.cursor]!==Qt)return[En.Ident,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:String.fromCodePoint(...n)}];if(function(e){return!(3!==e.length||e[0]!==un&&e[0]!==dn||e[1]!==hn&&e[1]!==pn||e[2]!==fn&&e[2]!==vn)}(n)){t.advanceCodePoint();let r=0;for(;;){const e=yn(t.codePointSource[t.cursor]),o=yn(t.codePointSource[t.cursor+1]);if(e&&o){r+=1,t.advanceCodePoint(1);continue}const i=e?t.codePointSource[t.cursor+1]:t.codePointSource[t.cursor];if(i===rn||i===jt)return r>0&&t.unreadCodePoint(r),[En.Function,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:String.fromCodePoint(...n)}];break}return function(e,t){for(;yn(t.codePointSource[t.cursor]);)t.advanceCodePoint();let n="";for(;;){if(void 0===t.codePointSource[t.cursor]){const r=[En.URL,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:n}];return e.onParseError(new Rt(At.UnexpectedEOFInURL,t.representationStart,t.representationEnd,["4.3.6. Consume a url token","Unexpected EOF"],r)),r}if(t.codePointSource[t.cursor]===an)return t.advanceCodePoint(),[En.URL,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:n}];if(yn(t.codePointSource[t.cursor])){for(t.advanceCodePoint();yn(t.codePointSource[t.cursor]);)t.advanceCodePoint();if(void 0===t.codePointSource[t.cursor]){const r=[En.URL,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:n}];return e.onParseError(new Rt(At.UnexpectedEOFInURL,t.representationStart,t.representationEnd,["4.3.6. Consume a url token","Consume as much whitespace as possible","Unexpected EOF"],r)),r}return t.codePointSource[t.cursor]===an?(t.advanceCodePoint(),[En.URL,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:n}]):(Tn(e,t),[En.BadURL,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,void 0])}if(t.codePointSource[t.cursor]===rn||t.codePointSource[t.cursor]===jt||t.codePointSource[t.cursor]===Qt||(r=t.codePointSource[t.cursor])===Xt||r===qt||en<=r&&r<=Bt||ln<=r&&r<=Ht){Tn(e,t);const n=[En.BadURL,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,void 0];return e.onParseError(new Rt(At.UnexpectedCharacterInURL,t.representationStart,t.representationEnd,["4.3.6. Consume a url token","Unexpected U+0022 QUOTATION MARK (\"), U+0027 APOSTROPHE ('), U+0028 LEFT PARENTHESIS (() or non-printable code point"],n)),n}if(t.codePointSource[t.cursor]===sn){if(Sn(t)){t.advanceCodePoint(),n+=String.fromCodePoint(On(e,t));continue}Tn(e,t);const r=[En.BadURL,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,void 0];return e.onParseError(new Rt(At.InvalidEscapeSequenceInURL,t.representationStart,t.representationEnd,["4.3.6. Consume a url token","U+005C REVERSE SOLIDUS (\\)","The input stream does not start with a valid escape sequence"],r)),r}n+=String.fromCodePoint(t.codePointSource[t.cursor]),t.advanceCodePoint()}var r}(e,t)}return t.advanceCodePoint(),[En.Function,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:String.fromCodePoint(...n)}]}function Mn(e,t){const n=function(e,t){const n=e.css.valueOf(),r=e.unicodeRangesAllowed??!1,o=new Dt(n),i={onParseError:t?.onParseError??Rn};return{nextToken:function(){o.resetRepresentation();const e=o.codePointSource[o.cursor];if(void 0===e)return[En.EOF,"",-1,-1,void 0];if(47===e&&function(e){return 47===e.codePointSource[e.cursor]&&42===e.codePointSource[e.cursor+1]}(o))return function(e,t){for(t.advanceCodePoint(2);;){const n=t.readCodePoint();if(!1===n){const n=[En.Comment,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,void 0];return e.onParseError(new Rt(At.UnexpectedEOFInComment,t.representationStart,t.representationEnd,["4.3.2. Consume comments","Unexpected EOF"],n)),n}if(42===n&&void 0!==t.codePointSource[t.cursor]&&47===t.codePointSource[t.cursor]){t.advanceCodePoint();break}}return[En.Comment,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,void 0]}(i,o);if(r&&(e===un||e===dn)&&function(e){return!(e.codePointSource[e.cursor]!==un&&e.codePointSource[e.cursor]!==dn||e.codePointSource[e.cursor+1]!==nn||63!==e.codePointSource[e.cursor+2]&&!mn(e.codePointSource[e.cursor+2]))}(o))return function(e,t){t.advanceCodePoint(2);const n=[],r=[];for(;void 0!==t.codePointSource[t.cursor]&&n.length<6&&mn(t.codePointSource[t.cursor]);)n.push(t.codePointSource[t.cursor]),t.advanceCodePoint();for(;void 0!==t.codePointSource[t.cursor]&&n.length<6&&63===t.codePointSource[t.cursor];)0===r.length&&r.push(...n),n.push(48),r.push(70),t.advanceCodePoint();if(!r.length&&t.codePointSource[t.cursor]===Vt&&mn(t.codePointSource[t.cursor+1]))for(t.advanceCodePoint();void 0!==t.codePointSource[t.cursor]&&r.length<6&&mn(t.codePointSource[t.cursor]);)r.push(t.codePointSource[t.cursor]),t.advanceCodePoint();if(!r.length){const e=parseInt(String.fromCodePoint(...n),16);return[En.UnicodeRange,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{startOfRange:e,endOfRange:e}]}const o=parseInt(String.fromCodePoint(...n),16),i=parseInt(String.fromCodePoint(...r),16);return[En.UnicodeRange,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{startOfRange:o,endOfRange:i}]}(0,o);if(_n(e))return In(i,o);if(gn(e))return Pn(i,o);switch(e){case 44:return o.advanceCodePoint(),[En.Comma,",",o.representationStart,o.representationEnd,void 0];case 58:return o.advanceCodePoint(),[En.Colon,":",o.representationStart,o.representationEnd,void 0];case 59:return o.advanceCodePoint(),[En.Semicolon,";",o.representationStart,o.representationEnd,void 0];case Qt:return o.advanceCodePoint(),[En.OpenParen,"(",o.representationStart,o.representationEnd,void 0];case an:return o.advanceCodePoint(),[En.CloseParen,")",o.representationStart,o.representationEnd,void 0];case 91:return o.advanceCodePoint(),[En.OpenSquare,"[",o.representationStart,o.representationEnd,void 0];case 93:return o.advanceCodePoint(),[En.CloseSquare,"]",o.representationStart,o.representationEnd,void 0];case 123:return o.advanceCodePoint(),[En.OpenCurly,"{",o.representationStart,o.representationEnd,void 0];case 125:return o.advanceCodePoint(),[En.CloseCurly,"}",o.representationStart,o.representationEnd,void 0];case jt:case rn:return function(e,t){let n="";const r=t.readCodePoint();for(;;){const o=t.readCodePoint();if(!1===o){const r=[En.String,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:n}];return e.onParseError(new Rt(At.UnexpectedEOFInString,t.representationStart,t.representationEnd,["4.3.5. Consume a string token","Unexpected EOF"],r)),r}if($n(o)){t.unreadCodePoint();const n=[En.BadString,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,void 0];return e.onParseError(new Rt(At.UnexpectedNewLineInString,t.representationStart,t.codePointSource[t.cursor]===Ft&&t.codePointSource[t.cursor+1]===Kt?t.representationEnd+2:t.representationEnd+1,["4.3.5. Consume a string token","Unexpected newline"],n)),n}if(o===r)return[En.String,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:n}];if(o!==sn)n+=String.fromCodePoint(o);else{if(void 0===t.codePointSource[t.cursor])continue;if($n(t.codePointSource[t.cursor])){t.codePointSource[t.cursor]===Ft&&t.codePointSource[t.cursor+1]===Kt&&t.advanceCodePoint(),t.advanceCodePoint();continue}n+=String.fromCodePoint(On(e,t))}}}(i,o);case 35:return function(e,t){if(t.advanceCodePoint(),void 0!==t.codePointSource[t.cursor]&&(bn(t.codePointSource[t.cursor])||Sn(t))){let n=kn.Unrestricted;Cn(0,t)&&(n=kn.ID);const r=xn(e,t);return[En.Hash,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:String.fromCodePoint(...r),type:n}]}return[En.Delim,"#",t.representationStart,t.representationEnd,{value:"#"}]}(i,o);case nn:case Wt:return wn(o)?Pn(i,o):(o.advanceCodePoint(),[En.Delim,o.source[o.representationStart],o.representationStart,o.representationEnd,{value:o.source[o.representationStart]}]);case Kt:case Ft:case Gt:case Ut:case cn:return function(e){for(;yn(e.codePointSource[e.cursor]);)e.advanceCodePoint();return[En.Whitespace,e.source.slice(e.representationStart,e.representationEnd+1),e.representationStart,e.representationEnd,void 0]}(o);case Vt:return wn(o)?Pn(i,o):function(e){return e.codePointSource[e.cursor]===Vt&&e.codePointSource[e.cursor+1]===Vt&&62===e.codePointSource[e.cursor+2]}(o)?(o.advanceCodePoint(3),[En.CDC,"--\x3e",o.representationStart,o.representationEnd,void 0]):Cn(0,o)?In(i,o):(o.advanceCodePoint(),[En.Delim,"-",o.representationStart,o.representationEnd,{value:"-"}]);case 60:return function(e){return 60===e.codePointSource[e.cursor]&&33===e.codePointSource[e.cursor+1]&&e.codePointSource[e.cursor+2]===Vt&&e.codePointSource[e.cursor+3]===Vt}(o)?(o.advanceCodePoint(4),[En.CDO,"\x3c!--",o.representationStart,o.representationEnd,void 0]):(o.advanceCodePoint(),[En.Delim,"<",o.representationStart,o.representationEnd,{value:"<"}]);case 64:if(o.advanceCodePoint(),Cn(0,o)){const e=xn(i,o);return[En.AtKeyword,o.source.slice(o.representationStart,o.representationEnd+1),o.representationStart,o.representationEnd,{value:String.fromCodePoint(...e)}]}return[En.Delim,"@",o.representationStart,o.representationEnd,{value:"@"}];case sn:{if(Sn(o))return In(i,o);o.advanceCodePoint();const e=[En.Delim,"\\",o.representationStart,o.representationEnd,{value:"\\"}];return i.onParseError(new Rt(At.InvalidEscapeSequenceAfterBackslash,o.representationStart,o.representationEnd,["4.3.1. Consume a token","U+005C REVERSE SOLIDUS (\\)","The input stream does not start with a valid escape sequence"],e)),e}}return o.advanceCodePoint(),[En.Delim,o.source[o.representationStart],o.representationStart,o.representationEnd,{value:o.source[o.representationStart]}]},endOfFile:function(){return void 0===o.codePointSource[o.cursor]}}}(e,t),r=[];{for(;!n.endOfFile();){const e=n.nextToken();e&&r.push(e)}const e=n.nextToken();e&&r.push(e)}return r}function Rn(){}!function(e){e.Comment="comment",e.AtKeyword="at-keyword-token",e.BadString="bad-string-token",e.BadURL="bad-url-token",e.CDC="CDC-token",e.CDO="CDO-token",e.Colon="colon-token",e.Comma="comma-token",e.Delim="delim-token",e.Dimension="dimension-token",e.EOF="EOF-token",e.Function="function-token",e.Hash="hash-token",e.Ident="ident-token",e.Number="number-token",e.Percentage="percentage-token",e.Semicolon="semicolon-token",e.String="string-token",e.URL="url-token",e.Whitespace="whitespace-token",e.OpenParen="(-token",e.CloseParen=")-token",e.OpenSquare="[-token",e.CloseSquare="]-token",e.OpenCurly="{-token",e.CloseCurly="}-token",e.UnicodeRange="unicode-range-token"}(En||(En={})),function(e){e.Integer="integer",e.Number="number"}(Nn||(Nn={})),function(e){e.Unrestricted="unrestricted",e.ID="id"}(kn||(kn={})),Object.values(En);var An=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];console.warn.apply(console,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}(["[glass-easel-miniprogram-agent] ".concat(e)],t,!1))},Dn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},Ln=function(e){throw new Error('"'.concat(e,'" is not supported by the backend'))},jn=function(e,t){return new Promise((function(n){if(3===e.mode){var r=t.getBoundingClientRect(),o=r.left,i=r.top,s=r.width,a=r.height;n({left:o,top:i,width:s,height:a})}else t.getBoundingClientRect?t.getBoundingClientRect((function(e){n(e)})):Ln("Element#getBoundingClientRect")}))},Bn=function(e,t){return new Promise((function(n){var r=[];3===e.mode?"function"==typeof e.getAllComputedStyles?e.getAllComputedStyles(t,(function(e){r=e.properties,n({properties:r})})):Ln("Context#getAllComputedStyles"):"getAllComputedStyles"in t?t.getAllComputedStyles((function(e){r=e.properties,n({properties:r})})):Ln("Element#getAllComputedStyles")}))},Fn=function(e,t){var n=function(e){return e.endsWith("px")?Number(e.slice(0,-2)):NaN};return new Promise((function(r){"getBoxModel"in t?t.getBoxModel((function(e){r(e)})):Promise.resolve().then((function(){return o=void 0,i=void 0,a=function(){var o,i,s,a,l,c,u,d,h,p,f,v,g,m,_,b;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}(this,(function($){switch($.label){case 0:return[4,jn(e,t)];case 1:return o=$.sent(),[4,Bn(e,t)];case 2:return i=$.sent(),s=NaN,a=NaN,l=NaN,c=NaN,u=NaN,d=NaN,h=NaN,p=NaN,f=NaN,v=NaN,g=NaN,m=NaN,i.properties.forEach((function(e){var t=e.name,r=e.value;"margin-left"===t&&(s=n(r)),"margin-top"===t&&(a=n(r)),"margin-right"===t&&(l=n(r)),"margin-bottom"===t&&(c=n(r)),"padding-left"===t&&(u=n(r)),"padding-top"===t&&(d=n(r)),"padding-right"===t&&(h=n(r)),"padding-bottom"===t&&(p=n(r)),"border-left-width"===t&&(f=n(r)),"border-top-width"===t&&(v=n(r)),"border-right-width"===t&&(g=n(r)),"border-bottom-width"===t&&(m=n(r))})),_={left:o.left-s,top:o.top-a,width:o.width+s+l,height:o.height+a+c},b={left:o.left+f,top:o.top+v,width:o.width-f-g,height:o.height-v-m},r({margin:_,border:o,padding:b,content:{left:b.left+u,top:b.top+d,width:b.width-u-h,height:b.height-d-p}}),[2]}}))},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{l(a.next(e))}catch(e){t(e)}}function r(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var o;t.done?e(t.value):(o=t.value,o instanceof s?o:new s((function(e){e(o)}))).then(n,r)}l((a=a.apply(o,i||[])).next())}));var o,i,s,a}))}))},Un=function(e,t,n){return void 0===e||e[0]!==t?null:void 0===n?e[1]:n===e[1]?n:null},qn=function(e){var t=[],n=Mn({css:e});if(0===n.length)return null;for(var r=0,o=0;o<n.length;o+=1){var i=n[o];if(Un(i,En.Colon)){for(var s=Lt.apply(void 0,n.slice(r,o)).trim(),a=o+=1;o<n.length;o+=1){var l=n[o];if(Un(l,En.Semicolon))break}var c=Lt.apply(void 0,n.slice(a,o)).trim();t.push({name:s,value:c,disabled:!1}),r=o+1}}return t},Gn=function(e){return e.map((function(e){return{name:e.name.trim(),value:e.value.trim(),disabled:!1,important:e.important}}))},Wn=function(){function e(e){this.props=Gn(e)}return e.fromMaybeInlineStyle=function(t,n){var r;if(void 0===n)return new e(t);var o=new e([]);return o.props=null!==(r=qn(n))&&void 0!==r?r:[],o},e.prototype.updateWithProps=function(e,t){var n,r=this,o=this.props;this.props=void 0===t?Gn(e):null!==(n=qn(t))&&void 0!==n?n:[];var i=0;o.forEach((function(e){for(e.disabled&&(r.props.splice(i,0,e),i+=1);i<r.props.length&&(i+=1,e.name!==r.props[i-1].name););}))},e.prototype.getProps=function(){return this.props.slice()},e.prototype.clear=function(){this.props.length=0},e.prototype.countProps=function(){return this.props.length},e.prototype.append=function(e){var t,n,r=null!==(n=qn(e))&&void 0!==n?n:[];(t=this.props).push.apply(t,r)},e.prototype.setDisabled=function(e,t){return!(e>=this.props.length||(this.props[e].disabled=t,0))},e.prototype.remove=function(e){return!(e>=this.props.length||(this.props.splice(e,1),0))},e.prototype.replace=function(e,t){var n,r;if(e>=this.props.length)return!1;var o=null!==(r=qn(t))&&void 0!==r?r:[];return(n=this.props).splice.apply(n,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e,1],o,!1)),!0},e.prototype.stringify=function(){return this.props.map((function(e){var t=e.name,n=e.value,r=e.important;return e.disabled?"":r?"".concat(t,": ").concat(n," !important;\n"):"".concat(t,": ").concat(n,";\n")})).join("")},e}(),Vn=function(){function e(){this.inlineStyleMap=new WeakMap,this.ruleMap=new WeakMap}return e.prototype.createOrGetInline=function(e,t,n){var r=this.inlineStyleMap.get(e);if(r)return r.updateWithProps(t,n),r;var o=Wn.fromMaybeInlineStyle(t,n);return this.inlineStyleMap.set(e,o),o},e.prototype.createOrGetRule=function(e,t,n){var r="".concat(t.sheetIndex,"/").concat(t.ruleIndex),o=this.ruleMap.get(e);if(!o){var i=Object.create(null);return i[r]=Wn.fromMaybeInlineStyle(t.properties,n),this.ruleMap.set(e,i),i[r]}return o[r]?(o[r].updateWithProps(t.properties,n),o[r]):(o[r]=Wn.fromMaybeInlineStyle(t.properties,n),o[r])},e.prototype.updateInline=function(e,t,n){var r=this.inlineStyleMap.get(t);if(r){n(r);var o=r.stringify();3===e.mode?t.setAttribute("style",o):(2===e.mode||1===e.mode)&&t.setStyle(o)}},e.prototype.updateRule=function(e,t,n,r){var o,i="".concat(t,"/").concat(n),s=null===(o=this.ruleMap.get(e))||void 0===o?void 0:o[i];if(!s)return Promise.resolve();r(s);var a=s.stringify();return new Promise((function(r){var o;null===(o=e.replaceStyleSheetAllProperties)||void 0===o||o.call(e,t,n,a,(function(){r()}))}))},e}(),Hn=new Vn,Yn=function(){function e(){this.list=[]}return e.prototype.update=function(e){var t=this,n=this.list;this.list=e.map((function(e){return{className:e,disabled:!1}}));var r=0;return n.forEach((function(e){for(e.disabled&&(t.list.splice(r,0,e),r+=1);r<t.list.length&&(r+=1,e.className!==t.list[r-1].className););})),this},e.prototype.setDisabled=function(e,t){var n=this.list.find((function(t){return t.className===e}));n&&(n.disabled=t)},e.prototype.getClasses=function(){return this.list.slice()},e.prototype.setClasses=function(e){var t=this;this.list=[],e.forEach((function(e){var n=e.className,r=e.disabled;n.split(/\s+/g).forEach((function(e){e&&t.list.push({className:e,disabled:!!r})}))}))},e.prototype.stringify=function(){return this.list.filter((function(e){return!e.disabled})).map((function(e){return e.className})).join(" ")},e.prototype.matches=function(e){return this.stringify()===e},e}(),zn=new(function(){function e(){this.map=new WeakMap}return e.prototype.createOrGet=function(e,t){if(!this.map.get(t)){var n=Object.create(null);this.map.set(t,n)}var r=this.map.get(t),o=null!=e?e:"";return r[o]||(r[o]=new Yn),r[o]},e}()),Qn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},Kn=function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}},Xn=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Zn=function(e,t,n){if(257===t)return"#text";if(258===t)return e.asNativeNode().is;if(259===t){var r=e.asGeneralComponent();return n?r.is:r.tagName}return 260===t||261===t?e.asVirtualNode().is:"UNKNOWN"},Jn=function(){function e(e){this.nodeIdMap=new WeakMap,this.activeNodes=Object.create(null),this.activeBackendNodes=Object.create(null),this.documentNodeId=1,this.nodeIdInc=2,this.mountPoints=[],this.selectedNodeId=0,this.conn=e,this.init()}return e.prototype.init=function(){var e=this;this.conn.setRequestHandler("DOM.describeNode",(function(t){return Qn(e,void 0,void 0,(function(){var e,n,r,o;return Kn(this,(function(i){if(void 0!==t.nodeId)n=this.queryActiveNode(t.nodeId),e=this.collectNodeDetails(n,null!==(r=t.depth)&&void 0!==r?r:0,!1);else{if(void 0===t.backendNodeId)throw new Error("missing (backend) node id");if(!(n=this.activateBackendNodeIfNeeded(t.backendNodeId)))throw new Error("no such node found");e=this.collectNodeDetails(n,null!==(o=t.depth)&&void 0!==o?o:0,!1)}return[2,{node:e}]}))}))})),this.conn.setRequestHandler("DOM.getDocument",(function(t){return Qn(e,[t],void 0,(function(e){var t,n=this,r=e.depth;return Kn(this,(function(e){return r&&r>1&&(t=this.mountPoints.map((function(e){var t=e.nodeMeta;return n.collectNodeDetails(t,r-1,!0)}))),[2,{root:{backendNodeId:this.documentNodeId,nodeType:kt(256),glassEaselNodeType:256,nodeName:"#document",virtual:!0,inheritSlots:!1,nodeId:this.documentNodeId,localName:"#document",nodeValue:"",attributes:[],glassEaselAttributeCount:0,children:t}}]}))}))})),this.conn.setRequestHandler("DOM.setInspectedNode",(function(t){return Qn(e,[t],void 0,(function(e){var t=e.nodeId;return Kn(this,(function(e){return this.queryActiveNode(t).node.asElement()?(this.selectedNodeId=t,[2]):[2]}))}))})),this.conn.setRequestHandler("DOM.requestChildNodes",(function(t){return Qn(e,[t],void 0,(function(e){var t,n=e.nodeId;return Kn(this,(function(e){return t=this.queryActiveNode(n),this.sendChildNodes(t),[2]}))}))})),this.conn.setRequestHandler("DOM.getGlassEaselAttributes",(function(t){return Qn(e,[t],void 0,(function(e){var t,n,r,o,i,s,a,l,c,u,d,h,p,f,v,g,m,_,b,$,y,S,C,w,E,N,k,O=e.nodeId;return Kn(this,(function(e){return t=this.queryActiveNode(O).node,(n=t.asElement())?(r=n.asGeneralComponent(),o=n.asNativeNode(),i=n.asVirtualNode(),s=256,r&&(s=259),o&&(s=258),i&&(s=i.isInheritSlots()?261:260),a=n.isVirtual(),l="",r&&(l=r.is),o&&(l=o.is),i&&(l=i.is),c=n.id,u=zn.createOrGet("",n),d=u.update(n.class.split(/\s+/g).filter((function(e){return e}))).getClasses(),h=n.slot,"string"==typeof(f=Reflect.get(n,"_$slotName"))&&(p=f),"object"==typeof(g=Reflect.get(n,"_$slotValues"))&&null!==g&&(v=[],Object.entries(g).forEach((function(e){var t=e[0],n=e[1];v.push({name:t,value:Et(n)})}))),m=[],"object"==typeof(_=Reflect.get(n,"_$eventTarget"))&&null!==_&&(b=function(e,t){"object"==typeof t&&null!==t&&Object.entries(t).forEach((function(t){var n,r,o,i,s,a=t[0],l=t[1],c=null!==(o=null===(r=null===(n=null==l?void 0:l.funcArr)||void 0===n?void 0:n._$arr)||void 0===r?void 0:r.length)&&void 0!==o?o:0;if(c>0){var u=(null!==(i=null==l?void 0:l.finalCount)&&void 0!==i?i:0)>0,d=(null!==(s=null==l?void 0:l.finalCount)&&void 0!==s?s:0)>0;m.push({name:a,capture:e,count:c,hasCatch:u,hasMutBind:d})}}))},b(!0,_.captureListeners),b(!1,_.listeners)),o&&($=[],n.attributes.forEach((function(e){var t=e.name,n=e.value;$.push({name:t,value:Et(n)})}))),r&&(y=[],r.getComponentDefinition().behavior.listProperties().forEach((function(e){y.push({name:e,value:Et(r.data[e])})})),(C=r.getExternalClasses())&&(S=Object.entries(C).map((function(e){var t=e[0],r=e[1];return{name:t,value:zn.createOrGet(t,n).update(null!=r?r:[]).getClasses()}})))),w=[],Object.entries(null!==(k=n.dataset)&&void 0!==k?k:{}).forEach((function(e){var t=e[0],n=e[1];w.push({name:t,value:Et(n)})})),E=[],N=Reflect.get(n,"_$marks"),Object.entries(null!=N?N:{}).forEach((function(e){var t=e[0],n=e[1];E.push({name:t,value:Et(n)})})),[2,{glassEaselNodeType:s,virtual:a,is:l,id:c,classes:d,slot:h,slotName:p,slotValues:v,eventBindings:m,normalAttributes:$,properties:y,externalClasses:S,dataset:w,marks:E}]):[2,{glassEaselNodeType:257,virtual:!1,is:"",id:"",classes:[],slot:"",slotName:void 0,slotValues:void 0,eventBindings:[],dataset:[],marks:[]}]}))}))})),this.conn.setRequestHandler("DOM.setAttributeValue",(function(t){return Qn(e,[t],void 0,(function(e){var t,n,r,o,i,s,a,l,c=e.nodeId,u=e.name,d=e.value,h=e.nameType;return Kn(this,(function(e){return t=this.queryActiveNode(c).node,(n=t.asElement())?("normal-attribute"===h?n.setAttribute(u,d):"property"===h?null==(s=n.asGeneralComponent())||s.setData(((a={})[u]=d,a)):"external-class"===h?null==(s=n.asGeneralComponent())||s.setExternalClass(u,d):"id"===u?n.id=d:"class"===u?n.class=d:"slot"===u?n.slot=d:u.indexOf(":")>=0?(r=u.split(":",2),o=r[0],i=r[1],"dataset"===o?n.setDataset(i,d):"mark"===o&&n.setMark(i,d)):((s=n.asGeneralComponent())&&(s.getComponentDefinition().behavior.listProperties().includes(u)?s.setData(((l={})[u]=d,l)):Object.keys(s.getExternalClasses()).includes(u)&&s.setExternalClass(u,d)),n.setAttribute(u,d)),[2,void 0]):[2,void 0]}))}))})),this.conn.setRequestHandler("DOM.setGlassEaselClassList",(function(t){return Qn(e,[t],void 0,(function(e){var t,n,r,o,i=e.nodeId,s=e.externalClass,a=e.classes;return Kn(this,(function(e){return t=this.queryActiveNode(i).node,(n=t.asElement())?((r=zn.createOrGet(null!=s?s:"",n)).setClasses(a),s?null==(o=n.asGeneralComponent())||o.setExternalClass(s,r.stringify()):n.class=r.stringify(),[2,{classes:r.getClasses()}]):[2,{classes:[]}]}))}))})),this.conn.setRequestHandler("DOM.setNodeValue",(function(t){return Qn(e,[t],void 0,(function(e){var t,n,r=e.nodeId,o=e.value;return Kn(this,(function(e){return t=this.queryActiveNode(r).node,(n=t.asTextNode())?(n.textContent=o,[2,void 0]):[2,void 0]}))}))})),this.conn.setRequestHandler("DOM.getGlassEaselNonInheritComposedChildren",(function(t){return Qn(e,[t],void 0,(function(e){var t,n,r,o=this,i=e.nodeId;return Kn(this,(function(e){return t=this.queryActiveNode(i).node,(n=t.asElement())?(r=[],n.isInheritSlots()?n.childNodes.forEach((function(e){var t=o.activateNode(e);r.push(o.collectNodeDetails(t,0,!1))})):n.forEachComposedChild((function(e){var t;if(!(null===(t=e.parentNode)||void 0===t?void 0:t.isInheritSlots())){var n=o.activateNode(e);r.push(o.collectNodeDetails(n,0,!1))}})),[2,{nodes:r}]):[2,{nodes:[]}]}))}))})),this.conn.setRequestHandler("DOM.pushNodesByBackendIdsToFrontend",(function(t){return Qn(e,[t],void 0,(function(e){var t=this,n=e.backendNodeIds;return Kn(this,(function(e){return n.forEach((function(e){t.activateBackendNodeIfNeeded(e)})),[2,{nodeIds:n}]}))}))})),this.conn.setRequestHandler("DOM.getBoxModel",(function(t){return Qn(e,void 0,void 0,(function(){var e,n,r,o,i,s,a,l,c;return Kn(this,(function(u){switch(u.label){case 0:if(e="nodeId"in t?this.queryActiveNode(t.nodeId).node:this.getMaybeBackendNode(t.backendNodeId),n=null==e?void 0:e.getBackendContext(),r=null==e?void 0:e.getBackendElement(),!n||!r)throw new Error("no such backend node found");return[4,Fn(n,r)];case 1:return o=u.sent(),i=o.margin,s=o.border,a=o.padding,l=o.content,c=function(e){var t=[e.left,e.top],n=[e.left+e.width,e.top],r=[e.left,e.top+e.height],o=[e.left+e.width,e.top+e.height];return Xn(Xn(Xn(Xn([],t,!0),n,!0),o,!0),r,!0)},[2,{margin:c(i),border:c(s),padding:c(a),content:c(l),width:l.width,height:l.height}]}}))}))})),this.conn.setRequestHandler("DOM.useGlassEaselElementInConsole",(function(t){return Qn(e,[t],void 0,(function(e){var t,n=e.nodeId;return Kn(this,(function(e){return t=this.queryActiveNode(n).node,[2,{varName:this.useInConsole(t)}]}))}))})),this.conn.setRequestHandler("DOM.useGlassEaselAttributeInConsole",(function(t){return Qn(e,[t],void 0,(function(e){var t,n,r,o,i,s,a=e.nodeId,l=e.attribute;return Kn(this,(function(e){if(t=this.queryActiveNode(a).node,!(r=t.asElement()))throw new Error("not an element");return l.startsWith("data:")?n=r.dataset[l.slice(5)]:l.startsWith("mark:")?(o=Reflect.get(r,"_$marks"),n=null==o?void 0:o[l.slice(5)]):(i=r.asGeneralComponent(),n=i?i.data[l]:null===(s=r.attributes.find((function(e){return e.name===l})))||void 0===s?void 0:s.value),[2,{varName:this.useInConsole(n)}]}))}))})),this.conn.setRequestHandler("CSS.getComputedStyleForNode",(function(t){return Qn(e,[t],void 0,(function(e){var t,n,r,o=e.nodeId;return Kn(this,(function(e){switch(e.label){case 0:if(t=this.queryActiveNode(o).node,n=null==t?void 0:t.getBackendContext(),r=null==t?void 0:t.getBackendElement(),!n||!r)throw new Error("no such backend node found");return[4,Bn(n,r)];case 1:return[2,{computedStyle:e.sent().properties}]}}))}))})),this.conn.setRequestHandler("CSS.getMatchedStylesForNode",(function(t){return Qn(e,[t],void 0,(function(e){var t,n,r,o,i,s,a,l,c,u=e.nodeId;return Kn(this,(function(e){switch(e.label){case 0:if(t=this.queryActiveNode(u).node,!(n=t.asElement()))throw new Error("not an element");return[4,(d=n,h=function(e,t){var n=t.map((function(t){var n=Hn.createOrGetRule(e,t,t.propertyText);return t.properties=n.getProps(),[Tt(xt()().astSync(t.selector)),t]}));return n.sort((function(e,t){var n,r,o=e[0],i=e[1],s=t[0],a=t[1],l=(i.weightHighBits||0)-(a.weightHighBits||0);if(0!==l)return l;if(void 0!==i.weightLowBits||void 0!==a.weightLowBits){var c=(null!==(n=i.weightLowBits)&&void 0!==n?n:-1)-(null!==(r=a.weightLowBits)&&void 0!==r?r:-1);if(0!==c)return c}var u=Pt(o,s);if(0!==u)return u;var d=i.sheetIndex-a.sheetIndex;return 0!==d?d:i.ruleIndex-a.ruleIndex})),n.map((function(e){return e[0],e[1]})).reverse()},new Promise((function(e){var t=d.getBackendContext(),n=d.getBackendElement();if(t&&n)if(3===t.mode)if("function"==typeof t.getMatchedRules)try{t.getMatchedRules(n,(function(r){r.rules.forEach((function(e){var t=Mn({css:e.selector});if(Un(t[0],En.OpenSquare)&&Un(t[1],En.Ident,"wx-host")&&Un(t[2],En.Delim,"=")&&Un(t[3],En.String)&&Un(t[4],En.CloseSquare)&&null!==Un(t[5],En.EOF))return e.selector=":host",void(e.styleScope=t[3][4].value);for(var n=0;n<t.length;n+=1){var r=t[n];if(Un(r,En.Delim,".")){var o=Un(t[n+1],En.Ident);if(o){n+=1;var i=o.split("--",2),s=i[0],a=i[1];void 0!==a&&(e.styleScope=s,t[n][1]=a)}}}e.selector=Lt.apply(void 0,t)})),r.rules=h(t,r.rules);var o=Hn.createOrGetInline(n,r.inline,r.inlineText);r.inline=o.getProps(),e(r)}))}catch(t){e({inline:[],rules:[],crossOriginFailing:!0})}else Ln("Context#getMatchedRules");else"getMatchedRules"in n?n.getMatchedRules((function(r){r.rules=h(t,r.rules);var o=Hn.createOrGetInline(n,r.inline,r.inlineText);r.inline=o.getProps(),e(r)})):Ln("Element#getMatchedRules");else e({inline:[],rules:[]})})))];case 1:return r=e.sent(),o=r.inline,i=r.inlineText,s=r.rules,a=r.crossOriginFailing,l={cssProperties:o,cssText:i},c=s.map((function(e){return{rule:{selectorList:{selectors:[{text:e.selector}],text:e.selector},style:{cssProperties:e.properties,cssText:e.propertyText},media:e.mediaQueries.map((function(e){return{text:e}})),inactive:e.inactive||!1,styleSheetId:e.sheetIndex.toString(),ruleIndex:e.ruleIndex,styleScope:e.styleScope}}})),[2,{inlineStyle:l,matchedCSSRules:c,inherited:[],crossOriginFailing:a}]}var d,h}))}))})),this.conn.setRequestHandler("CSS.replaceGlassEaselStyleSheetProperty",(function(t){return Qn(e,[t],void 0,(function(e){var t,n,r,o,i,s=e.nodeId,a=e.styleSheetId,l=e.ruleIndex,c=e.propertyIndex,u=e.styleText;return Kn(this,(function(e){switch(e.label){case 0:if(t=this.queryActiveNode(s).node,n=null==t?void 0:t.getBackendContext(),r=null==t?void 0:t.getBackendElement(),!n||!r)throw new Error("no such backend node found");return o=function(e){e.replace(c,u)},void 0===a?[3,2]:(i=Number(a),[4,Hn.updateRule(n,i,l,o)]);case 1:return e.sent(),[3,3];case 2:Hn.updateInline(n,r,o),e.label=3;case 3:return[2]}}))}))})),this.conn.setRequestHandler("CSS.addGlassEaselStyleSheetProperty",(function(t){return Qn(e,[t],void 0,(function(e){var t,n,r,o,i,s=e.nodeId,a=e.styleSheetId,l=e.ruleIndex,c=e.styleText;return Kn(this,(function(e){switch(e.label){case 0:if(t=this.queryActiveNode(s).node,n=null==t?void 0:t.getBackendContext(),r=null==t?void 0:t.getBackendElement(),!n||!r)throw new Error("no such backend node found");return o=function(e){e.append(c)},void 0===a?[3,2]:(i=Number(a),[4,Hn.updateRule(n,i,l,o)]);case 1:return e.sent(),[3,3];case 2:Hn.updateInline(n,r,o),e.label=3;case 3:return[2]}}))}))})),this.conn.setRequestHandler("CSS.setGlassEaselStyleSheetPropertyDisabled",(function(t){return Qn(e,[t],void 0,(function(e){var t,n,r,o,i,s=e.nodeId,a=e.styleSheetId,l=e.ruleIndex,c=e.propertyIndex,u=e.disabled;return Kn(this,(function(e){switch(e.label){case 0:if(t=this.queryActiveNode(s).node,n=null==t?void 0:t.getBackendContext(),r=null==t?void 0:t.getBackendElement(),!n||!r)throw new Error("no such backend node found");return o=function(e){e.setDisabled(c,u)},void 0===a?[3,2]:(i=Number(a),[4,Hn.updateRule(n,i,l,o)]);case 1:return e.sent(),[3,3];case 2:Hn.updateInline(n,r,o),e.label=3;case 3:return[2]}}))}))})),this.conn.setRequestHandler("Overlay.setInspectMode",(function(t){return Qn(e,[t],void 0,(function(e){var t,n=this,r=e.mode;return Kn(this,(function(e){return"searchForNode"===r?(t=0,this.listOverlayComponents().forEach((function(e){return e.startNodeSelect((function(e,r){if(r){if(n.listOverlayComponents().forEach((function(e){return e.endNodeSelect()})),e){var o=n.addBackendNode(e);n.conn.sendEvent("Overlay.inspectNodeRequested",{backendNodeId:o})}n.conn.sendEvent("Overlay.inspectModeCanceled",{})}else{var i=e?n.getNodeId(e):0;n.activeNodes[i]||(i=0),t!==i&&(t=i,n.conn.sendEvent("Overlay.nodeHighlightRequested",{nodeId:i}))}}))}))):this.listOverlayComponents().forEach((function(e){return e.endNodeSelect()})),[2]}))}))})),this.conn.setRequestHandler("Overlay.highlightNode",(function(t){return Qn(e,void 0,void 0,(function(){var e,n;return Kn(this,(function(r){if("nodeId"in t)e=this.queryActiveNode(t.nodeId).node;else{if(!(n=this.getMaybeBackendNode(t.backendNodeId)))throw new Error("no such node found");e=n}return this.listOverlayComponents().forEach((function(e){e.highlight(null)})),this.getOverlayComponent(e).highlight(e),[2]}))}))})),this.conn.setRequestHandler("Overlay.hideHighlight",(function(){return Qn(e,void 0,void 0,(function(){return Kn(this,(function(e){return this.listOverlayComponents().forEach((function(e){e.highlight(null)})),[2]}))}))}))},e.prototype.attach=function(e,t){var n=this.activateNode(e),r=this.mountPoints[this.mountPoints.length-1],o=r?r.nodeMeta.nodeId:void 0;this.mountPoints.push({nodeMeta:n,env:t}),this.conn.sendEvent("DOM.childNodeInserted",{parentNodeId:this.documentNodeId,previousNodeId:null!=o?o:0,node:this.collectNodeDetails(n,0,!0)}),this.conn.sendEvent("DOM.childNodeCountUpdated",{nodeId:this.documentNodeId,childNodeCount:this.mountPoints.length})},e.prototype.detach=function(e){var t=this.mountPoints.findIndex((function(t){return t.nodeMeta.node===e}));if(t<0)An("no such mount point to remove");else{this.mountPoints.splice(t,1);var n=this.deactivateNodeTree(e);n&&(this.conn.sendEvent("DOM.childNodeRemoved",{parentNodeId:this.documentNodeId,nodeId:n}),this.conn.sendEvent("DOM.childNodeCountUpdated",{nodeId:this.documentNodeId,childNodeCount:this.mountPoints.length}))}},e.prototype.getOverlayComponent=function(e){var t=e.getBackendContext();if(!t)throw new Error("backend context has been released");return this.conn.getOverlayComponent(t)},e.prototype.listOverlayComponents=function(){var e=this,t=[];return this.mountPoints.forEach((function(n){var r=n.nodeMeta.node.getBackendContext();if(r){var o=e.conn.getOverlayComponent(r);t.includes(o)||t.push(o)}})),t},e.prototype.useInConsole=function(e){for(var t=0;t<=4294967295;){var n="temp".concat(t);if(!Object.prototype.hasOwnProperty.call(globalThis,n))return globalThis[n]=e,console.log(n,e),n;t+=1}return""},e.prototype.generateNodeId=function(){var e=this.nodeIdInc;return this.nodeIdInc+=1,e},e.prototype.getNodeId=function(e){var t=this.nodeIdMap.get(e);if(void 0!==t)return t;var n=this.generateNodeId();return this.nodeIdMap.set(e,n),n},e.prototype.getActiveNodeId=function(e){var t=this.nodeIdMap.get(e);return void 0!==t&&this.activeNodes[t]?t:null},e.prototype.queryActiveNode=function(e){var t=this.activeNodes[e];if(!t)throw new Error("no active node found for node id ".concat(e));return t},e.prototype.getMaybeBackendNode=function(e){var t,n,r=this.activeNodes[e];return r?null==r?void 0:r.node:null!==(n=null===(t=this.activeBackendNodes[e])||void 0===t?void 0:t.deref())&&void 0!==n?n:null},e.prototype.startWatch=function(e){var t=this,n=le.create((function(e){var n,r,o,i,s,a,l,c,u,d,h,p,f,v,g=e.target,m=t.getNodeId(g),_=t.activeNodes[m];if(_)if("properties"!==e.type){if("childList"===e.type){if(!_.childNodesSent)return;var b=g.asElement();return null===(f=e.addedNodes)||void 0===f||f.forEach((function(e){var n=b.childNodes.indexOf(e);if(!(n<0)){var r=0===n?0:t.getNodeId(b.childNodes[n-1]),o=t.activateNode(e),i=t.collectNodeDetails(o,0,!1);t.conn.sendEvent("DOM.childNodeInserted",{parentNodeId:m,previousNodeId:r,node:i});var s=e.getComposedParent();if(!b.isInheritSlots()&&s&&s!==b){var a=t.getActiveNodeId(s);if(a){var l=null,c=s.forEachComposedChild((function(t){return t!==e&&(l=t,!0)}));if(c){var u=l?t.getNodeId(l):0;t.conn.sendEvent("DOM.childNodeInserted",{parentNodeId:a,previousNodeId:u,node:i})}}}}})),void(null===(v=e.removedNodes)||void 0===v||v.forEach((function(e){t.deactivateNodeTree(e),t.conn.sendEvent("DOM.childNodeRemoved",{parentNodeId:m,nodeId:t.getNodeId(e)});var n=e.getComposedParent();if(!b.isInheritSlots()&&n&&n!==b){var r=t.getActiveNodeId(n);r&&t.conn.sendEvent("DOM.childNodeRemoved",{parentNodeId:r,nodeId:t.getNodeId(e)})}})))}"characterData"!==e.type?An("unknown mutation observer event"):t.conn.sendEvent("DOM.characterDataModified",{nodeId:m,characterData:g.asTextNode().textContent})}else{var $=g.asElement(),y=e.nameType;if("attribute"===y){var S=null!==(n=e.attributeName)&&void 0!==n?n:"";if(null===(E=$.getAttribute(S))||"undefined"===E)t.conn.sendEvent("DOM.attributeRemoved",{nodeId:m,name:S,nameType:y});else{var C=Et(E),w=Nt(C);t.conn.sendEvent("DOM.attributeModified",{nodeId:m,name:S,value:w,detail:C,nameType:y})}}else{S=void 0;var E=void 0;if("component-property"===y)S=null!==(r=e.propertyName)&&void 0!==r?r:"",E=null===(o=$.asGeneralComponent())||void 0===o?void 0:o.data[S];else if("slot-value"===y){S=null!==(i=e.propertyName)&&void 0!==i?i:"";var N=Reflect.get($,"_$slotValues");"object"==typeof N&&null!==N&&(E=N[S])}else if("dataset"===y&&(null===(s=e.attributeName)||void 0===s?void 0:s.startsWith("data:")))S=null!==(a=e.attributeName)&&void 0!==a?a:"",E=$.dataset[S.slice(5)];else if("mark"===y&&(null===(l=e.attributeName)||void 0===l?void 0:l.startsWith("mark:"))){S=null!==(c=e.attributeName)&&void 0!==c?c:"";var k=Reflect.get($,"_$marks");E=null==k?void 0:k[S.slice(5)]}else if("external-class"===y){var O=null!==(u=e.attributeName)&&void 0!==u?u:"",x=null===(p=null===(h=null===(d=$.asGeneralComponent())||void 0===d?void 0:d.getExternalClasses())||void 0===h?void 0:h[O])||void 0===p?void 0:p.join(" ");zn.createOrGet(O,$)||(S=O,E=null!=x?x:"")}else"slot"===e.attributeName?(S=e.attributeName,E=$.slot):"id"===e.attributeName?(S=e.attributeName,E=$.id):"class"===e.attributeName?zn.createOrGet("",$).matches($.class)||(S=e.attributeName,E=$.class):"style"===e.attributeName?(S=e.attributeName,E=$.style):"name"===e.attributeName&&(S=e.attributeName,E=Reflect.get($,"_$slotName"));S&&(C=Et(E),w=Nt(C),t.conn.sendEvent("DOM.attributeModified",{nodeId:m,name:S,value:w,detail:C,nameType:y}))}}}));return n.observe(e,{properties:"all",characterData:!0,childList:!0}),n},e.prototype.endWatch=function(e){e.disconnect()},e.prototype.activateNode=function(e){var t=this.getNodeId(e);if(delete this.activeBackendNodes[t],this.activeNodes[t])return this.activeNodes[t];var n=this.mountPoints.map((function(e){return e.nodeMeta.node})).includes(e);if(!n){var r;(r=e.parentNode?e.parentNode:e.asShadowRoot()?e.asShadowRoot().getHostNode():void 0)&&this.activateNode(r)}var o={node:e,nodeId:t,observer:this.startWatch(e),childNodesSent:!1};return this.activeNodes[t]=o,o},e.prototype.deactivateNodeTree=function(e){var t,n,r=this,o=this.nodeIdMap.get(e);if(void 0!==o){if(!this.activeNodes[o])return o;var i=this.activeNodes[o].observer;this.endWatch(i);var s=null===(n=null===(t=e.asGeneralComponent())||void 0===t?void 0:t.getShadowRoot)||void 0===n?void 0:n.call(t);s&&this.deactivateNodeTree(s);var a=e.childNodes;return a&&a.forEach((function(e){return r.deactivateNodeTree(e)})),delete this.activeNodes[o],o}},e.prototype.addBackendNode=function(e){var t=this.getNodeId(e);return this.activeBackendNodes[t]=new WeakRef(e),t},e.prototype.activateBackendNodeIfNeeded=function(e){var t,n=null===(t=this.activeBackendNodes[e])||void 0===t?void 0:t.deref();if(void 0===n){var r=this.activeNodes[e];return null!=r?r:null}return this.activateNode(n)},e.prototype.collectNodeBasicInfomation=function(e,t){var n,r,o,i,s=function(e){return e.asTextNode()?257:e.asNativeNode()?258:e.asVirtualNode()?e.asVirtualNode().isInheritSlots()?261:260:e.asGeneralComponent()?259:256}(t),a=Zn(t,s,!1),l=null!==(r=null===(n=t.asElement())||void 0===n?void 0:n.isVirtual())&&void 0!==r&&r,c=null!==(i=null===(o=t.asElement())||void 0===o?void 0:o.isInheritSlots())&&void 0!==i&&i;return{backendNodeId:e,nodeType:kt(s),glassEaselNodeType:s,nodeName:a,virtual:l,inheritSlots:c}},e.prototype.collectNodeDetails=function(e,t,n){var r,o,i,s,a,l,c,u=this,d=e.nodeId,h=e.node,p=h._$wxTmplDevArgs,f=this.collectNodeBasicInfomation(d,h),v=f.backendNodeId,g=f.nodeType,m=f.glassEaselNodeType,_=f.nodeName,b=f.virtual,$=f.inheritSlots;if(l=n?this.documentNodeId:h.parentNode?this.getNodeId(h.parentNode):h.asShadowRoot()?this.getNodeId(h.asShadowRoot().getHostNode()):void 0,n)c=this.documentNodeId;else if(null===(r=h.parentNode)||void 0===r?void 0:r.isInheritSlots())c=l;else{var y=h.getComposedParent();y&&(c=this.addBackendNode(y))}var S,C=Zn(h,m,!0),w=null!==(i=null===(o=h.asTextNode())||void 0===o?void 0:o.textContent)&&void 0!==i?i:"",E=[],N=0;if(257!==m){var k=null==p?void 0:p.A,O=h.asElement();if(k)k.forEach((function(e){var t,n,r;if(":"===e[0])":slot"===e&&E.push("slot",O.slot),":id"===e&&E.push("id",O.id),":class"===e&&E.push("class",O.class),":style"===e&&E.push("style",O.style),":name"===e&&E.push("style",Reflect.get(O,"_$slotName"));else if(e.startsWith("data:")){var o=null===(t=O.dataset)||void 0===t?void 0:t[e.slice(5)];E.push(e,Nt(Et(o)))}else if(e.startsWith("mark:")){var i=Reflect.get(O,"_$marks");o=null==i?void 0:i[e.slice(5)],E.push(e,Nt(Et(o)))}else if(e.indexOf(":")<0)if(O.asNativeNode())o=null===(n=O.attributes.find((function(t){var n=t.name;return e===n})))||void 0===n?void 0:n.value,E.push(e,Nt(Et(o)));else if(O.asGeneralComponent()){var s=O.asGeneralComponent();void 0!==s.getComponentDefinition().behavior.getPropertyType(e)?(o=s.data[e],E.push(e,Nt(Et(o)))):s.hasExternalClass(e)&&(o=null===(r=s.getExternalClasses()[e])||void 0===r?void 0:r.join(" "),E.push(e,Nt(Et(o))))}else if("string"==typeof Reflect.get(O,"_$slotName")){var a=Reflect.get(O,"_$slotValues");"object"==typeof a&&null!==a&&(o=a[e],E.push(e,Nt(Et(o))))}}));else{O.slot&&E.push("slot",O.slot),O.id&&E.push("id",O.id),O.class&&E.push("class",O.class),O.style&&E.push("style",O.style);var x=Reflect.get(O,"_$slotName");"string"==typeof x&&(S=x,E.push("name",S)),N=E.length/2,O.asNativeNode()&&O.attributes.forEach((function(e){var t=e.name,n=e.value;E.push(t,Nt(Et(n)))})),Object.entries(null!==(s=O.dataset)&&void 0!==s?s:{}).forEach((function(e){var t=e[0],n=e[1],r="data:".concat(t);E.push(r,Nt(Et(n)))}));var P=Reflect.get(O,"_$marks");Object.entries(null!=P?P:{}).forEach((function(e){var t=e[0],n=e[1],r="mark:".concat(t);E.push(r,Nt(Et(n)))}))}}var T,I,M,R=null===(a=h.asGeneralComponent())||void 0===a?void 0:a.getShadowRoot(),A=R?"open":void 0;if(R){var D=this.activateNode(R),L=this.collectNodeDetails(D,t-1,!1);L.nodeName="shadow-root",L&&(T=[L])}if(t>1&&257!==m){var j=h.asElement();I=[],e.childNodesSent=!0,j.childNodes.forEach((function(e){var n=u.activateNode(e),r=u.collectNodeDetails(n,t-1,!1);r&&I.push(r)}))}return"string"==typeof S&&(j=h.asElement(),M=[],j.forEachComposedChild((function(e){var t;if(!(null===(t=e.parentNode)||void 0===t?void 0:t.isInheritSlots())){var n=u.addBackendNode(e),r=u.collectNodeBasicInfomation(n,e);r&&M.push(r)}}))),{backendNodeId:v,nodeType:g,glassEaselNodeType:m,nodeName:_,virtual:b,inheritSlots:$,nodeId:d,parentId:l,glassEaselNonInheritComposedParentId:c,localName:C,nodeValue:w,attributes:E,glassEaselAttributeCount:N,shadowRootType:A,shadowRoots:T,children:I,distributedNodes:M}},e.prototype.sendChildNodes=function(e){var t=this,n=e.node,r=e.nodeId,o=n.asElement();if(o){e.childNodesSent=!0;var i=[];o.childNodes.forEach((function(e){var n=t.activateNode(e);i.push(t.collectNodeDetails(n,0,!1))})),this.conn.sendEvent("DOM.setChildNodes",{parentId:r,nodes:i})}},e}(),er=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},tr=function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}},nr=n(794),rr=new Y,or=rr.define("glass-easel-devtools-agent").template(nr).data((function(){return{state:0,selectMoveDetecting:!1,highlightRect:null}})).init((function(e){var t=e.self,n=e.data,r=e.setData,o=e.method,i=e.listener;t.setNodeStyle("\n display: block;\n position: absolute;\n left: 0;\n top: 0;\n width: 0;\n height: 0;\n background: red;\n z-index: 2147483647;\n ");var s=null,a=o((function(e){return(0===n.state||2===n.state)&&(r({state:1}),s=e,!0)})),l=o((function(){return 1===n.state&&(r({state:0,highlightRect:null}),s=null,!0)})),c=i((function(e){var o=e.detail;if(!n.selectMoveDetecting){var i=o.clientX,a=o.clientY,l=t.getBackendContext();l?(r({selectMoveDetecting:!0}),ir(l,i,a).then((function(e){return er(void 0,void 0,void 0,(function(){var t,o,i,a,l;return tr(this,(function(c){switch(c.label){case 0:return r({selectMoveDetecting:!1}),e?[4,sr(e)]:(r({highlightRect:null}),[2,void 0]);case 1:return t=c.sent(),o=t.left,i=t.top,a=t.width,l=t.height,1===n.state&&r({highlightRect:{left:o,top:i,width:a,height:l}}),null==s||s(e,!1),[2,void 0]}}))}))})).catch((function(){r({selectMoveDetecting:!1,highlightRect:null})}))):r({highlightRect:null})}})),u=i((function(e){var n=e.detail,o=s;l();var i=n.x,a=n.y,c=t.getBackendContext();c?ir(c,i,a).then((function(e){return er(void 0,void 0,void 0,(function(){return tr(this,(function(t){return null==o||o(e,!0),[2,void 0]}))}))})):r({highlightRect:null})})),d=o((function(e){return er(void 0,void 0,void 0,(function(){var t,o,i,s,a,l;return tr(this,(function(c){switch(c.label){case 0:return e&&e.asElement()?(t=e.asElement(),[4,sr(t)]):[3,2];case 1:return o=c.sent(),i=o.left,s=o.top,a=o.width,l=o.height,0!==n.state?[2,!1]:(r({state:2,highlightRect:{left:i,top:s,width:a,height:l}}),[3,3]);case 2:if(2!==n.state)return[2,!1];r({state:0,highlightRect:null}),c.label=3;case 3:return[2,!0]}}))}))}));return{startNodeSelect:a,endNodeSelect:l,nodeSelectMove:c,nodeSelectDone:u,highlight:d}})).registerComponent(),ir=function(e,t,n){return new Promise((function(r){(null==e?void 0:e.elementFromPoint)?e.elementFromPoint(t,n,(function(e){r(e)})):r(null)}))},sr=function(e){return new Promise((function(t){e.getBoundingClientRect((function(e){t(e)}))}))},ar=function(){function e(){this.backendContexts=new WeakMap}return e.prototype.get=function(e){var t=this.backendContexts.get(e);if(t)return t;var n,r,o=rr.createComponentByUrl("glass-easel-devtools-agent","glass-easel-devtools-agent",null,e);if(this.backendContexts.set(e,o),2!==e.mode&&1!==e.mode||!e.addPriorEventListener||e.addPriorEventListener((function(e,t,n,r){if(function(e){if(!(e instanceof je))return!1;for(var t=e;;){if(t===o)return!0;if(t.parentNode)t=t.parentNode;else{if(!t.ownerShadowRoot)return!1;t=t.ownerShadowRoot.getHostNode()}}}(e)){var i=new Pe(t,n,r);return Pe.dispatchEvent(e,i),i.defaultPrevented()?1:0}})),2===e.mode)n=e.getRootNode(),r=e.createElement("glass-easel-devtools-agent","glass-easel-devtools-agent"),n.appendChild(r);else if(3===e.mode)n=e.getRootNode(),r=e.document.createElement("glass-easel-devtools-agent"),n.appendChild(r);else{if(1!==e.mode)throw new Error("unrecognized host backend mode");var i=e.getRootNode();if(n=i,!i)throw new Error("the host element should be inside of a shadow tree");r=i.createElement("glass-easel-devtools-agent","glass-easel-devtools-agent"),i.appendChild(r)}return je.replaceDocumentElement(o,n,r),(2===e.mode||1===e.mode)&&(n.release(),r.release()),o},e}(),lr=function(){function e(e){var t=this;this.requestHandlers=Object.create(null),this.messageChannel=e,e.recv((function(e){"request"===e.kind&&(Dn("recv request ".concat(e.id),e.name,e.detail),t.recvRequest(e.id,e.name,e.detail))})),this.overlayManager=new ar}return e.prototype.recvRequest=function(e,t,n){var r=this,o=this.requestHandlers[t];if(o)o.call(this,n).then((function(t){Dn("send response ".concat(e),t);var n={kind:"response",id:e,detail:t};r.messageChannel.send(n)})).catch((function(t){var n={kind:"error",id:e,message:t instanceof Error?t.message:"",stack:t instanceof Error?t.stack:""};r.messageChannel.send(n)}));else{var i={kind:"error",id:e,message:"invalid request name"};this.messageChannel.send(i)}},e.prototype.setRequestHandler=function(e,t){this.requestHandlers[e]=t},e.prototype.sendEvent=function(e,t){Dn("send event",e,t);var n={kind:"event",name:e,detail:t};this.messageChannel.send(n)},e.prototype.getOverlayComponent=function(e){return this.overlayManager.get(e).asInstanceOf(or)},e}(),cr=function(){function e(e){var t=this;this.enabled=!1,this.conn=e,this.mountPoints=new Jn(e),e.setRequestHandler("DOM.enable",(function(){return e=t,n=void 0,o=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}(this,(function(e){return this.enabled||(this.enabled=!0),[2]}))},new((r=void 0)||(r=Promise))((function(t,i){function s(e){try{l(o.next(e))}catch(e){i(e)}}function a(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(e){e(n)}))).then(s,a)}l((o=o.apply(e,n||[])).next())}));var e,n,r,o}))}return e.prototype.addMountPoint=function(e,t){Dn("attach mount point",e),this.mountPoints.attach(e,t)},e.prototype.removeMountPoint=function(e){Dn("detach mount point",e),this.mountPoints.detach(e)},e}(),ur=function(e){var t=new lr(e);return{inspector:new cr(t)}}})(),module.exports=r})();
|
|
2
|
+
(()=>{var e={101:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(988))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var a=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.STRING,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),r}(o.default);t.default=a,e.exports=t.default},168:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(949))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var l=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.ROOT,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n);var o,l,c=r.prototype;return c.toString=function(){var e=this.reduce((function(e,t){return e.push(String(t)),e}),[]).join(",");return this.trailingComma?e+",":e},c.error=function(e,t){return this._error?this._error(e,t):new Error(e)},o=r,(l=[{key:"errorGenerator",set:function(e){this._error=e}}])&&s(o.prototype,l),Object.defineProperty(o,"prototype",{writable:!1}),r}(o.default);t.default=l,e.exports=t.default},205:(e,t,n)=>{"use strict";t.__esModule=!0,t.universal=t.tag=t.string=t.selector=t.root=t.pseudo=t.nesting=t.id=t.comment=t.combinator=t.className=t.attribute=void 0;var r=v(n(734)),o=v(n(493)),i=v(n(870)),s=v(n(303)),a=v(n(325)),l=v(n(752)),c=v(n(458)),u=v(n(168)),d=v(n(881)),h=v(n(101)),p=v(n(942)),f=v(n(487));function v(e){return e&&e.__esModule?e:{default:e}}t.attribute=function(e){return new r.default(e)},t.className=function(e){return new o.default(e)},t.combinator=function(e){return new i.default(e)},t.comment=function(e){return new s.default(e)},t.id=function(e){return new a.default(e)},t.nesting=function(e){return new l.default(e)},t.pseudo=function(e){return new c.default(e)},t.root=function(e){return new u.default(e)},t.selector=function(e){return new d.default(e)},t.string=function(e){return new h.default(e)},t.tag=function(e){return new p.default(e)},t.universal=function(e){return new f.default(e)}},236:(e,t,n)=>{"use strict";t.__esModule=!0,t.unesc=t.stripComments=t.getProp=t.ensureObject=void 0;var r=a(n(700));t.unesc=r.default;var o=a(n(529));t.getProp=o.default;var i=a(n(839));t.ensureObject=i.default;var s=a(n(652));function a(e){return e&&e.__esModule?e:{default:e}}t.stripComments=s.default},300:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o,i=w(n(168)),s=w(n(881)),a=w(n(493)),l=w(n(303)),c=w(n(325)),u=w(n(942)),d=w(n(101)),h=w(n(458)),p=C(n(734)),f=w(n(487)),v=w(n(870)),g=w(n(752)),m=w(n(617)),_=C(n(470)),b=C(n(397)),$=C(n(987)),y=n(236);function S(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(S=function(e){return e?n:t})(e)}function C(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=S(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function w(e){return e&&e.__esModule?e:{default:e}}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var N=((r={})[b.space]=!0,r[b.cr]=!0,r[b.feed]=!0,r[b.newline]=!0,r[b.tab]=!0,r),k=Object.assign({},N,((o={})[b.comment]=!0,o));function O(e){return{line:e[_.FIELDS.START_LINE],column:e[_.FIELDS.START_COL]}}function P(e){return{line:e[_.FIELDS.END_LINE],column:e[_.FIELDS.END_COL]}}function x(e,t,n,r){return{start:{line:e,column:t},end:{line:n,column:r}}}function T(e){return x(e[_.FIELDS.START_LINE],e[_.FIELDS.START_COL],e[_.FIELDS.END_LINE],e[_.FIELDS.END_COL])}function I(e,t){if(e)return x(e[_.FIELDS.START_LINE],e[_.FIELDS.START_COL],t[_.FIELDS.END_LINE],t[_.FIELDS.END_COL])}function M(e,t){var n=e[t];if("string"==typeof n)return-1!==n.indexOf("\\")&&((0,y.ensureObject)(e,"raws"),e[t]=(0,y.unesc)(n),void 0===e.raws[t]&&(e.raws[t]=n)),e}function R(e,t){for(var n=-1,r=[];-1!==(n=e.indexOf(t,n+1));)r.push(n);return r}var A=function(){function e(e,t){void 0===t&&(t={}),this.rule=e,this.options=Object.assign({lossy:!1,safe:!1},t),this.position=0,this.css="string"==typeof this.rule?this.rule:this.rule.selector,this.tokens=(0,_.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var n=I(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new i.default({source:n}),this.root.errorGenerator=this._errorGenerator();var r=new s.default({source:{start:{line:1,column:1}},sourceIndex:0});this.root.append(r),this.current=r,this.loop()}var t,n,r=e.prototype;return r._errorGenerator=function(){var e=this;return function(t,n){return"string"==typeof e.rule?new Error(t):e.rule.error(t,n)}},r.attribute=function(){var e=[],t=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[_.FIELDS.TYPE]!==b.closeSquare;)e.push(this.currToken),this.position++;if(this.currToken[_.FIELDS.TYPE]!==b.closeSquare)return this.expected("closing square bracket",this.currToken[_.FIELDS.START_POS]);var n=e.length,r={source:x(t[1],t[2],this.currToken[3],this.currToken[4]),sourceIndex:t[_.FIELDS.START_POS]};if(1===n&&!~[b.word].indexOf(e[0][_.FIELDS.TYPE]))return this.expected("attribute",e[0][_.FIELDS.START_POS]);for(var o=0,i="",s="",a=null,l=!1;o<n;){var c=e[o],u=this.content(c),d=e[o+1];switch(c[_.FIELDS.TYPE]){case b.space:if(l=!0,this.options.lossy)break;if(a){(0,y.ensureObject)(r,"spaces",a);var h=r.spaces[a].after||"";r.spaces[a].after=h+u;var f=(0,y.getProp)(r,"raws","spaces",a,"after")||null;f&&(r.raws.spaces[a].after=f+u)}else i+=u,s+=u;break;case b.asterisk:d[_.FIELDS.TYPE]===b.equals?(r.operator=u,a="operator"):r.namespace&&("namespace"!==a||l)||!d||(i&&((0,y.ensureObject)(r,"spaces","attribute"),r.spaces.attribute.before=i,i=""),s&&((0,y.ensureObject)(r,"raws","spaces","attribute"),r.raws.spaces.attribute.before=i,s=""),r.namespace=(r.namespace||"")+u,(0,y.getProp)(r,"raws","namespace")&&(r.raws.namespace+=u),a="namespace"),l=!1;break;case b.dollar:if("value"===a){var v=(0,y.getProp)(r,"raws","value");r.value+="$",v&&(r.raws.value=v+"$");break}case b.caret:d[_.FIELDS.TYPE]===b.equals&&(r.operator=u,a="operator"),l=!1;break;case b.combinator:if("~"===u&&d[_.FIELDS.TYPE]===b.equals&&(r.operator=u,a="operator"),"|"!==u){l=!1;break}d[_.FIELDS.TYPE]===b.equals?(r.operator=u,a="operator"):r.namespace||r.attribute||(r.namespace=!0),l=!1;break;case b.word:if(d&&"|"===this.content(d)&&e[o+2]&&e[o+2][_.FIELDS.TYPE]!==b.equals&&!r.operator&&!r.namespace)r.namespace=u,a="namespace";else if(!r.attribute||"attribute"===a&&!l)i&&((0,y.ensureObject)(r,"spaces","attribute"),r.spaces.attribute.before=i,i=""),s&&((0,y.ensureObject)(r,"raws","spaces","attribute"),r.raws.spaces.attribute.before=s,s=""),r.attribute=(r.attribute||"")+u,(0,y.getProp)(r,"raws","attribute")&&(r.raws.attribute+=u),a="attribute";else if(!r.value&&""!==r.value||"value"===a&&!l&&!r.quoteMark){var g=(0,y.unesc)(u),m=(0,y.getProp)(r,"raws","value")||"",$=r.value||"";r.value=$+g,r.quoteMark=null,(g!==u||m)&&((0,y.ensureObject)(r,"raws"),r.raws.value=(m||$)+u),a="value"}else{var S="i"===u||"I"===u;!r.value&&""!==r.value||!r.quoteMark&&!l?(r.value||""===r.value)&&(a="value",r.value+=u,r.raws.value&&(r.raws.value+=u)):(r.insensitive=S,S&&"I"!==u||((0,y.ensureObject)(r,"raws"),r.raws.insensitiveFlag=u),a="insensitive",i&&((0,y.ensureObject)(r,"spaces","insensitive"),r.spaces.insensitive.before=i,i=""),s&&((0,y.ensureObject)(r,"raws","spaces","insensitive"),r.raws.spaces.insensitive.before=s,s=""))}l=!1;break;case b.str:if(!r.attribute||!r.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:c[_.FIELDS.START_POS]});var C=(0,p.unescapeValue)(u),w=C.unescaped,E=C.quoteMark;r.value=w,r.quoteMark=E,a="value",(0,y.ensureObject)(r,"raws"),r.raws.value=u,l=!1;break;case b.equals:if(!r.attribute)return this.expected("attribute",c[_.FIELDS.START_POS],u);if(r.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:c[_.FIELDS.START_POS]});r.operator=r.operator?r.operator+u:u,a="operator",l=!1;break;case b.comment:if(a)if(l||d&&d[_.FIELDS.TYPE]===b.space||"insensitive"===a){var N=(0,y.getProp)(r,"spaces",a,"after")||"",k=(0,y.getProp)(r,"raws","spaces",a,"after")||N;(0,y.ensureObject)(r,"raws","spaces",a),r.raws.spaces[a].after=k+u}else{var O=r[a]||"",P=(0,y.getProp)(r,"raws",a)||O;(0,y.ensureObject)(r,"raws"),r.raws[a]=P+u}else s+=u;break;default:return this.error('Unexpected "'+u+'" found.',{index:c[_.FIELDS.START_POS]})}o++}M(r,"attribute"),M(r,"namespace"),this.newNode(new p.default(r)),this.position++},r.parseWhitespaceEquivalentTokens=function(e){e<0&&(e=this.tokens.length);var t=this.position,n=[],r="",o=void 0;do{if(N[this.currToken[_.FIELDS.TYPE]])this.options.lossy||(r+=this.content());else if(this.currToken[_.FIELDS.TYPE]===b.comment){var i={};r&&(i.before=r,r=""),o=new l.default({value:this.content(),source:T(this.currToken),sourceIndex:this.currToken[_.FIELDS.START_POS],spaces:i}),n.push(o)}}while(++this.position<e);if(r)if(o)o.spaces.after=r;else if(!this.options.lossy){var s=this.tokens[t],a=this.tokens[this.position-1];n.push(new d.default({value:"",source:x(s[_.FIELDS.START_LINE],s[_.FIELDS.START_COL],a[_.FIELDS.END_LINE],a[_.FIELDS.END_COL]),sourceIndex:s[_.FIELDS.START_POS],spaces:{before:r,after:""}}))}return n},r.convertWhitespaceNodesToSpace=function(e,t){var n=this;void 0===t&&(t=!1);var r="",o="";return e.forEach((function(e){var i=n.lossySpace(e.spaces.before,t),s=n.lossySpace(e.rawSpaceBefore,t);r+=i+n.lossySpace(e.spaces.after,t&&0===i.length),o+=i+e.value+n.lossySpace(e.rawSpaceAfter,t&&0===s.length)})),o===r&&(o=void 0),{space:r,rawSpace:o}},r.isNamedCombinator=function(e){return void 0===e&&(e=this.position),this.tokens[e+0]&&this.tokens[e+0][_.FIELDS.TYPE]===b.slash&&this.tokens[e+1]&&this.tokens[e+1][_.FIELDS.TYPE]===b.word&&this.tokens[e+2]&&this.tokens[e+2][_.FIELDS.TYPE]===b.slash},r.namedCombinator=function(){if(this.isNamedCombinator()){var e=this.content(this.tokens[this.position+1]),t=(0,y.unesc)(e).toLowerCase(),n={};t!==e&&(n.value="/"+e+"/");var r=new v.default({value:"/"+t+"/",source:x(this.currToken[_.FIELDS.START_LINE],this.currToken[_.FIELDS.START_COL],this.tokens[this.position+2][_.FIELDS.END_LINE],this.tokens[this.position+2][_.FIELDS.END_COL]),sourceIndex:this.currToken[_.FIELDS.START_POS],raws:n});return this.position=this.position+3,r}this.unexpected()},r.combinator=function(){var e=this;if("|"===this.content())return this.namespace();var t=this.locateNextMeaningfulToken(this.position);if(!(t<0||this.tokens[t][_.FIELDS.TYPE]===b.comma||this.tokens[t][_.FIELDS.TYPE]===b.closeParenthesis)){var n,r=this.currToken,o=void 0;if(t>this.position&&(o=this.parseWhitespaceEquivalentTokens(t)),this.isNamedCombinator()?n=this.namedCombinator():this.currToken[_.FIELDS.TYPE]===b.combinator?(n=new v.default({value:this.content(),source:T(this.currToken),sourceIndex:this.currToken[_.FIELDS.START_POS]}),this.position++):N[this.currToken[_.FIELDS.TYPE]]||o||this.unexpected(),n){if(o){var i=this.convertWhitespaceNodesToSpace(o),s=i.space,a=i.rawSpace;n.spaces.before=s,n.rawSpaceBefore=a}}else{var l=this.convertWhitespaceNodesToSpace(o,!0),c=l.space,u=l.rawSpace;u||(u=c);var d={},h={spaces:{}};c.endsWith(" ")&&u.endsWith(" ")?(d.before=c.slice(0,c.length-1),h.spaces.before=u.slice(0,u.length-1)):c.startsWith(" ")&&u.startsWith(" ")?(d.after=c.slice(1),h.spaces.after=u.slice(1)):h.value=u,n=new v.default({value:" ",source:I(r,this.tokens[this.position-1]),sourceIndex:r[_.FIELDS.START_POS],spaces:d,raws:h})}return this.currToken&&this.currToken[_.FIELDS.TYPE]===b.space&&(n.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(n)}var p=this.parseWhitespaceEquivalentTokens(t);if(p.length>0){var f=this.current.last;if(f){var g=this.convertWhitespaceNodesToSpace(p),m=g.space,$=g.rawSpace;void 0!==$&&(f.rawSpaceAfter+=$),f.spaces.after+=m}else p.forEach((function(t){return e.newNode(t)}))}},r.comma=function(){if(this.position===this.tokens.length-1)return this.root.trailingComma=!0,void this.position++;this.current._inferEndPosition();var e=new s.default({source:{start:O(this.tokens[this.position+1])},sourceIndex:this.tokens[this.position+1][_.FIELDS.START_POS]});this.current.parent.append(e),this.current=e,this.position++},r.comment=function(){var e=this.currToken;this.newNode(new l.default({value:this.content(),source:T(e),sourceIndex:e[_.FIELDS.START_POS]})),this.position++},r.error=function(e,t){throw this.root.error(e,t)},r.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[_.FIELDS.START_POS]})},r.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[_.FIELDS.START_POS])},r.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[_.FIELDS.START_POS])},r.unexpected=function(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[_.FIELDS.START_POS])},r.unexpectedPipe=function(){return this.error("Unexpected '|'.",this.currToken[_.FIELDS.START_POS])},r.namespace=function(){var e=this.prevToken&&this.content(this.prevToken)||!0;return this.nextToken[_.FIELDS.TYPE]===b.word?(this.position++,this.word(e)):this.nextToken[_.FIELDS.TYPE]===b.asterisk?(this.position++,this.universal(e)):void this.unexpectedPipe()},r.nesting=function(){if(this.nextToken&&"|"===this.content(this.nextToken))this.position++;else{var e=this.currToken;this.newNode(new g.default({value:this.content(),source:T(e),sourceIndex:e[_.FIELDS.START_POS]})),this.position++}},r.parentheses=function(){var e=this.current.last,t=1;if(this.position++,e&&e.type===$.PSEUDO){var n=new s.default({source:{start:O(this.tokens[this.position])},sourceIndex:this.tokens[this.position][_.FIELDS.START_POS]}),r=this.current;for(e.append(n),this.current=n;this.position<this.tokens.length&&t;)this.currToken[_.FIELDS.TYPE]===b.openParenthesis&&t++,this.currToken[_.FIELDS.TYPE]===b.closeParenthesis&&t--,t?this.parse():(this.current.source.end=P(this.currToken),this.current.parent.source.end=P(this.currToken),this.position++);this.current=r}else{for(var o,i=this.currToken,a="(";this.position<this.tokens.length&&t;)this.currToken[_.FIELDS.TYPE]===b.openParenthesis&&t++,this.currToken[_.FIELDS.TYPE]===b.closeParenthesis&&t--,o=this.currToken,a+=this.parseParenthesisToken(this.currToken),this.position++;e?e.appendToPropertyAndEscape("value",a,a):this.newNode(new d.default({value:a,source:x(i[_.FIELDS.START_LINE],i[_.FIELDS.START_COL],o[_.FIELDS.END_LINE],o[_.FIELDS.END_COL]),sourceIndex:i[_.FIELDS.START_POS]}))}if(t)return this.expected("closing parenthesis",this.currToken[_.FIELDS.START_POS])},r.pseudo=function(){for(var e=this,t="",n=this.currToken;this.currToken&&this.currToken[_.FIELDS.TYPE]===b.colon;)t+=this.content(),this.position++;return this.currToken?this.currToken[_.FIELDS.TYPE]!==b.word?this.expected(["pseudo-class","pseudo-element"],this.currToken[_.FIELDS.START_POS]):void this.splitWord(!1,(function(r,o){t+=r,e.newNode(new h.default({value:t,source:I(n,e.currToken),sourceIndex:n[_.FIELDS.START_POS]})),o>1&&e.nextToken&&e.nextToken[_.FIELDS.TYPE]===b.openParenthesis&&e.error("Misplaced parenthesis.",{index:e.nextToken[_.FIELDS.START_POS]})})):this.expected(["pseudo-class","pseudo-element"],this.position-1)},r.space=function(){var e=this.content();0===this.position||this.prevToken[_.FIELDS.TYPE]===b.comma||this.prevToken[_.FIELDS.TYPE]===b.openParenthesis||this.current.nodes.every((function(e){return"comment"===e.type}))?(this.spaces=this.optionalSpace(e),this.position++):this.position===this.tokens.length-1||this.nextToken[_.FIELDS.TYPE]===b.comma||this.nextToken[_.FIELDS.TYPE]===b.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(e),this.position++):this.combinator()},r.string=function(){var e=this.currToken;this.newNode(new d.default({value:this.content(),source:T(e),sourceIndex:e[_.FIELDS.START_POS]})),this.position++},r.universal=function(e){var t=this.nextToken;if(t&&"|"===this.content(t))return this.position++,this.namespace();var n=this.currToken;this.newNode(new f.default({value:this.content(),source:T(n),sourceIndex:n[_.FIELDS.START_POS]}),e),this.position++},r.splitWord=function(e,t){for(var n=this,r=this.nextToken,o=this.content();r&&~[b.dollar,b.caret,b.equals,b.word].indexOf(r[_.FIELDS.TYPE]);){this.position++;var i=this.content();if(o+=i,i.lastIndexOf("\\")===i.length-1){var s=this.nextToken;s&&s[_.FIELDS.TYPE]===b.space&&(o+=this.requiredSpace(this.content(s)),this.position++)}r=this.nextToken}var l=R(o,".").filter((function(e){var t="\\"===o[e-1],n=/^\d+\.\d+%$/.test(o);return!t&&!n})),d=R(o,"#").filter((function(e){return"\\"!==o[e-1]})),h=R(o,"#{");h.length&&(d=d.filter((function(e){return!~h.indexOf(e)})));var p=(0,m.default)(function(){var e=Array.prototype.concat.apply([],arguments);return e.filter((function(t,n){return n===e.indexOf(t)}))}([0].concat(l,d)));p.forEach((function(r,i){var s,h=p[i+1]||o.length,f=o.slice(r,h);if(0===i&&t)return t.call(n,f,p.length);var v=n.currToken,g=v[_.FIELDS.START_POS]+p[i],m=x(v[1],v[2]+r,v[3],v[2]+(h-1));if(~l.indexOf(r)){var b={value:f.slice(1),source:m,sourceIndex:g};s=new a.default(M(b,"value"))}else if(~d.indexOf(r)){var $={value:f.slice(1),source:m,sourceIndex:g};s=new c.default(M($,"value"))}else{var y={value:f,source:m,sourceIndex:g};M(y,"value"),s=new u.default(y)}n.newNode(s,e),e=null})),this.position++},r.word=function(e){var t=this.nextToken;return t&&"|"===this.content(t)?(this.position++,this.namespace()):this.splitWord(e)},r.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},r.parse=function(e){switch(this.currToken[_.FIELDS.TYPE]){case b.space:this.space();break;case b.comment:this.comment();break;case b.openParenthesis:this.parentheses();break;case b.closeParenthesis:e&&this.missingParenthesis();break;case b.openSquare:this.attribute();break;case b.dollar:case b.caret:case b.equals:case b.word:this.word();break;case b.colon:this.pseudo();break;case b.comma:this.comma();break;case b.asterisk:this.universal();break;case b.ampersand:this.nesting();break;case b.slash:case b.combinator:this.combinator();break;case b.str:this.string();break;case b.closeSquare:this.missingSquareBracket();case b.semicolon:this.missingBackslash();default:this.unexpected()}},r.expected=function(e,t,n){if(Array.isArray(e)){var r=e.pop();e=e.join(", ")+" or "+r}var o=/^[aeiou]/.test(e[0])?"an":"a";return n?this.error("Expected "+o+" "+e+', found "'+n+'" instead.',{index:t}):this.error("Expected "+o+" "+e+".",{index:t})},r.requiredSpace=function(e){return this.options.lossy?" ":e},r.optionalSpace=function(e){return this.options.lossy?"":e},r.lossySpace=function(e,t){return this.options.lossy?t?" ":"":e},r.parseParenthesisToken=function(e){var t=this.content(e);return e[_.FIELDS.TYPE]===b.space?this.requiredSpace(t):t},r.newNode=function(e,t){return t&&(/^ +$/.test(t)&&(this.options.lossy||(this.spaces=(this.spaces||"")+t),t=!0),e.namespace=t,M(e,"namespace")),this.spaces&&(e.spaces.before=this.spaces,this.spaces=""),this.current.append(e)},r.content=function(e){return void 0===e&&(e=this.currToken),this.css.slice(e[_.FIELDS.START_POS],e[_.FIELDS.END_POS])},r.locateNextMeaningfulToken=function(e){void 0===e&&(e=this.position+1);for(var t=e;t<this.tokens.length;){if(!k[this.tokens[t][_.FIELDS.TYPE]])return t;t++}return-1},t=e,(n=[{key:"currToken",get:function(){return this.tokens[this.position]}},{key:"nextToken",get:function(){return this.tokens[this.position+1]}},{key:"prevToken",get:function(){return this.tokens[this.position-1]}}])&&E(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=A,e.exports=t.default},303:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(988))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var a=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.COMMENT,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),r}(o.default);t.default=a,e.exports=t.default},325:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(988))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var a=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.ID,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),r.prototype.valueToString=function(){return"#"+e.prototype.valueToString.call(this)},r}(o.default);t.default=a,e.exports=t.default},330:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r=i(n(774)),o=n(236);function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}var l=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n);var l,c,u=i.prototype;return u.qualifiedName=function(e){return this.namespace?this.namespaceString+"|"+e:e},u.valueToString=function(){return this.qualifiedName(e.prototype.valueToString.call(this))},l=i,(c=[{key:"namespace",get:function(){return this._namespace},set:function(e){if(!0===e||"*"===e||"&"===e)return this._namespace=e,void(this.raws&&delete this.raws.namespace);var t=(0,r.default)(e,{isIdentifier:!0});this._namespace=e,t!==e?((0,o.ensureObject)(this,"raws"),this.raws.namespace=t):this.raws&&delete this.raws.namespace}},{key:"ns",get:function(){return this._namespace},set:function(e){this.namespace=e}},{key:"namespaceString",get:function(){if(this.namespace){var e=this.stringifyProperty("namespace");return!0===e?"":e}return""}}])&&s(l.prototype,c),Object.defineProperty(l,"prototype",{writable:!1}),i}(i(n(988)).default);t.default=l,e.exports=t.default},350:(e,t,n)=>{"use strict";t.__esModule=!0,t.isComment=t.isCombinator=t.isClassName=t.isAttribute=void 0,t.isContainer=function(e){return!(!s(e)||!e.walk)},t.isIdentifier=void 0,t.isNamespace=function(e){return l(e)||_(e)},t.isNesting=void 0,t.isNode=s,t.isPseudo=void 0,t.isPseudoClass=function(e){return f(e)&&!$(e)},t.isPseudoElement=$,t.isUniversal=t.isTag=t.isString=t.isSelector=t.isRoot=void 0;var r,o=n(987),i=((r={})[o.ATTRIBUTE]=!0,r[o.CLASS]=!0,r[o.COMBINATOR]=!0,r[o.COMMENT]=!0,r[o.ID]=!0,r[o.NESTING]=!0,r[o.PSEUDO]=!0,r[o.ROOT]=!0,r[o.SELECTOR]=!0,r[o.STRING]=!0,r[o.TAG]=!0,r[o.UNIVERSAL]=!0,r);function s(e){return"object"==typeof e&&i[e.type]}function a(e,t){return s(t)&&t.type===e}var l=a.bind(null,o.ATTRIBUTE);t.isAttribute=l;var c=a.bind(null,o.CLASS);t.isClassName=c;var u=a.bind(null,o.COMBINATOR);t.isCombinator=u;var d=a.bind(null,o.COMMENT);t.isComment=d;var h=a.bind(null,o.ID);t.isIdentifier=h;var p=a.bind(null,o.NESTING);t.isNesting=p;var f=a.bind(null,o.PSEUDO);t.isPseudo=f;var v=a.bind(null,o.ROOT);t.isRoot=v;var g=a.bind(null,o.SELECTOR);t.isSelector=g;var m=a.bind(null,o.STRING);t.isString=m;var _=a.bind(null,o.TAG);t.isTag=_;var b=a.bind(null,o.UNIVERSAL);function $(e){return f(e)&&e.value&&(e.value.startsWith("::")||":before"===e.value.toLowerCase()||":after"===e.value.toLowerCase()||":first-letter"===e.value.toLowerCase()||":first-line"===e.value.toLowerCase())}t.isUniversal=b},395:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(300))&&r.__esModule?r:{default:r},i=function(){function e(e,t){this.func=e||function(){},this.funcRes=null,this.options=t}var t=e.prototype;return t._shouldUpdateSelector=function(e,t){return void 0===t&&(t={}),!1!==Object.assign({},this.options,t).updateSelector&&"string"!=typeof e},t._isLossy=function(e){return void 0===e&&(e={}),!1===Object.assign({},this.options,e).lossless},t._root=function(e,t){return void 0===t&&(t={}),new o.default(e,this._parseOptions(t)).root},t._parseOptions=function(e){return{lossy:this._isLossy(e)}},t._run=function(e,t){var n=this;return void 0===t&&(t={}),new Promise((function(r,o){try{var i=n._root(e,t);Promise.resolve(n.func(i)).then((function(r){var o=void 0;return n._shouldUpdateSelector(e,t)&&(o=i.toString(),e.selector=o),{transform:r,root:i,string:o}})).then(r,o)}catch(e){return void o(e)}}))},t._runSync=function(e,t){void 0===t&&(t={});var n=this._root(e,t),r=this.func(n);if(r&&"function"==typeof r.then)throw new Error("Selector processor returned a promise to a synchronous call.");var o=void 0;return t.updateSelector&&"string"!=typeof e&&(o=n.toString(),e.selector=o),{transform:r,root:n,string:o}},t.ast=function(e,t){return this._run(e,t).then((function(e){return e.root}))},t.astSync=function(e,t){return this._runSync(e,t).root},t.transform=function(e,t){return this._run(e,t).then((function(e){return e.transform}))},t.transformSync=function(e,t){return this._runSync(e,t).transform},t.process=function(e,t){return this._run(e,t).then((function(e){return e.string||e.root.toString()}))},t.processSync=function(e,t){var n=this._runSync(e,t);return n.string||n.root.toString()},e}();t.default=i,e.exports=t.default},397:(e,t)=>{"use strict";t.__esModule=!0,t.word=t.tilde=t.tab=t.str=t.space=t.slash=t.singleQuote=t.semicolon=t.plus=t.pipe=t.openSquare=t.openParenthesis=t.newline=t.greaterThan=t.feed=t.equals=t.doubleQuote=t.dollar=t.cr=t.comment=t.comma=t.combinator=t.colon=t.closeSquare=t.closeParenthesis=t.caret=t.bang=t.backslash=t.at=t.asterisk=t.ampersand=void 0,t.ampersand=38,t.asterisk=42,t.at=64,t.comma=44,t.colon=58,t.semicolon=59,t.openParenthesis=40,t.closeParenthesis=41,t.openSquare=91,t.closeSquare=93,t.dollar=36,t.tilde=126,t.caret=94,t.plus=43,t.equals=61,t.pipe=124,t.greaterThan=62,t.space=32,t.singleQuote=39,t.doubleQuote=34,t.slash=47,t.bang=33,t.backslash=92,t.cr=13,t.feed=12,t.newline=10,t.tab=9,t.str=39,t.comment=-1,t.word=-2,t.combinator=-3},438:(e,t,n)=>{"use strict";t.__esModule=!0;var r=n(987);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||(t[e]=r[e]))}));var o=n(205);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||(t[e]=o[e]))}));var i=n(350);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||(t[e]=i[e]))}))},443:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(395))&&r.__esModule?r:{default:r},i=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(438));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}var a=function(e){return new o.default(e)};Object.assign(a,i),delete a.__esModule;var l=a;t.default=l,e.exports=t.default},458:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(949))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var a=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.PSEUDO,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),r.prototype.toString=function(){var e=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),e,this.rawSpaceAfter].join("")},r}(o.default);t.default=a,e.exports=t.default},470:(e,t,n)=>{"use strict";t.__esModule=!0,t.FIELDS=void 0,t.default=function(e){var t,n,r,o,s,a,l,c,u,h,p,f,v=[],g=e.css.valueOf(),m=g.length,_=-1,b=1,$=0,y=0;function S(t,n){if(!e.safe)throw e.error("Unclosed "+t,b,$-_,$);c=(g+=n).length-1}for(;$<m;){switch((t=g.charCodeAt($))===i.newline&&(_=$,b+=1),t){case i.space:case i.tab:case i.newline:case i.cr:case i.feed:c=$;do{c+=1,(t=g.charCodeAt(c))===i.newline&&(_=c,b+=1)}while(t===i.space||t===i.newline||t===i.tab||t===i.cr||t===i.feed);f=i.space,r=b,n=c-_-1,y=c;break;case i.plus:case i.greaterThan:case i.tilde:case i.pipe:c=$;do{c+=1,t=g.charCodeAt(c)}while(t===i.plus||t===i.greaterThan||t===i.tilde||t===i.pipe);f=i.combinator,r=b,n=$-_,y=c;break;case i.asterisk:case i.ampersand:case i.bang:case i.comma:case i.equals:case i.dollar:case i.caret:case i.openSquare:case i.closeSquare:case i.colon:case i.semicolon:case i.openParenthesis:case i.closeParenthesis:f=t,r=b,n=$-_,y=(c=$)+1;break;case i.singleQuote:case i.doubleQuote:p=t===i.singleQuote?"'":'"',c=$;do{for(o=!1,-1===(c=g.indexOf(p,c+1))&&S("quote",p),s=c;g.charCodeAt(s-1)===i.backslash;)s-=1,o=!o}while(o);f=i.str,r=b,n=$-_,y=c+1;break;default:t===i.slash&&g.charCodeAt($+1)===i.asterisk?(0===(c=g.indexOf("*/",$+2)+1)&&S("comment","*/"),(a=(l=g.slice($,c+1).split("\n")).length-1)>0?(u=b+a,h=c-l[a].length):(u=b,h=_),f=i.comment,b=u,r=u,n=c-h):t===i.slash?(f=t,r=b,n=$-_,y=(c=$)+1):(c=d(g,$),f=i.word,r=b,n=c-_),y=c+1}v.push([f,b,$-_,r,n,$,y]),h&&(_=h,h=null),$=y}return v};var r,o,i=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(397));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}for(var a=((r={})[i.tab]=!0,r[i.newline]=!0,r[i.cr]=!0,r[i.feed]=!0,r),l=((o={})[i.space]=!0,o[i.tab]=!0,o[i.newline]=!0,o[i.cr]=!0,o[i.feed]=!0,o[i.ampersand]=!0,o[i.asterisk]=!0,o[i.bang]=!0,o[i.comma]=!0,o[i.colon]=!0,o[i.semicolon]=!0,o[i.openParenthesis]=!0,o[i.closeParenthesis]=!0,o[i.openSquare]=!0,o[i.closeSquare]=!0,o[i.singleQuote]=!0,o[i.doubleQuote]=!0,o[i.plus]=!0,o[i.pipe]=!0,o[i.tilde]=!0,o[i.greaterThan]=!0,o[i.equals]=!0,o[i.dollar]=!0,o[i.caret]=!0,o[i.slash]=!0,o),c={},u=0;u<22;u++)c["0123456789abcdefABCDEF".charCodeAt(u)]=!0;function d(e,t){var n,r=t;do{if(n=e.charCodeAt(r),l[n])return r-1;n===i.backslash?r=h(e,r)+1:r++}while(r<e.length);return r-1}function h(e,t){var n=t,r=e.charCodeAt(n+1);if(a[r]);else if(c[r]){var o=0;do{n++,o++,r=e.charCodeAt(n+1)}while(c[r]&&o<6);o<6&&r===i.space&&n++}else n++;return n}t.FIELDS={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6}},487:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(330))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var a=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.UNIVERSAL,n.value="*",n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),r}(o.default);t.default=a,e.exports=t.default},493:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r=a(n(774)),o=n(236),i=a(n(988)),s=n(987);function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}var u=function(e){var t,n,i,a;function u(t){var n;return(n=e.call(this,t)||this).type=s.CLASS,n._constructed=!0,n}return n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),u.prototype.valueToString=function(){return"."+e.prototype.valueToString.call(this)},i=u,(a=[{key:"value",get:function(){return this._value},set:function(e){if(this._constructed){var t=(0,r.default)(e,{isIdentifier:!0});t!==e?((0,o.ensureObject)(this,"raws"),this.raws.value=t):this.raws&&delete this.raws.value}this._value=e}}])&&l(i.prototype,a),Object.defineProperty(i,"prototype",{writable:!1}),u}(i.default);t.default=u,e.exports=t.default},529:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(;n.length>0;){var o=n.shift();if(!e[o])return;e=e[o]}return e},e.exports=t.default},568:(e,t,n)=>{function r(e){try{if(!n.g.localStorage)return!1}catch(e){return!1}var t=n.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}},617:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e){return e.sort((function(e,t){return e-t}))},e.exports=t.default},652:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e){for(var t="",n=e.indexOf("/*"),r=0;n>=0;){t+=e.slice(r,n);var o=e.indexOf("*/",n+2);if(o<0)return t;r=o+2,n=e.indexOf("/*",r)}return t+e.slice(r)},e.exports=t.default},700:(e,t)=>{"use strict";function n(e){for(var t=e.toLowerCase(),n="",r=!1,o=0;o<6&&void 0!==t[o];o++){var i=t.charCodeAt(o);if(r=32===i,!(i>=97&&i<=102||i>=48&&i<=57))break;n+=t[o]}if(0!==n.length){var s=parseInt(n,16);return s>=55296&&s<=57343||0===s||s>1114111?["�",n.length+(r?1:0)]:[String.fromCodePoint(s),n.length+(r?1:0)]}}t.__esModule=!0,t.default=function(e){if(!r.test(e))return e;for(var t="",o=0;o<e.length;o++)if("\\"!==e[o])t+=e[o];else{var i=n(e.slice(o+1,o+7));if(void 0!==i){t+=i[0],o+=i[1];continue}if("\\"===e[o+1]){t+="\\",o++;continue}e.length===o+1&&(t+=e[o])}return t};var r=/\\/;e.exports=t.default},734:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0,t.unescapeValue=g;var r,o=l(n(774)),i=l(n(700)),s=l(n(330)),a=n(987);function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}var d=n(568),h=/^('|")([^]*)\1$/,p=d((function(){}),"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),f=d((function(){}),"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),v=d((function(){}),"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function g(e){var t=!1,n=null,r=e,o=r.match(h);return o&&(n=o[1],r=o[2]),(r=(0,i.default)(r))!==e&&(t=!0),{deprecatedUsage:t,unescaped:r,quoteMark:n}}var m=function(e){var t,n;function r(t){var n;return void 0===t&&(t={}),n=e.call(this,function(e){if(void 0!==e.quoteMark)return e;if(void 0===e.value)return e;v();var t=g(e.value),n=t.quoteMark,r=t.unescaped;return e.raws||(e.raws={}),void 0===e.raws.value&&(e.raws.value=e.value),e.value=r,e.quoteMark=n,e}(t))||this,n.type=a.ATTRIBUTE,n.raws=n.raws||{},Object.defineProperty(n.raws,"unquoted",{get:d((function(){return n.value}),"attr.raws.unquoted is deprecated. Call attr.value instead."),set:d((function(){return n.value}),"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")}),n._constructed=!0,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var i,s,l=r.prototype;return l.getQuotedValue=function(e){void 0===e&&(e={});var t=this._determineQuoteMark(e),n=_[t];return(0,o.default)(this._value,n)},l._determineQuoteMark=function(e){return e.smart?this.smartQuoteMark(e):this.preferredQuoteMark(e)},l.setValue=function(e,t){void 0===t&&(t={}),this._value=e,this._quoteMark=this._determineQuoteMark(t),this._syncRawValue()},l.smartQuoteMark=function(e){var t=this.value,n=t.replace(/[^']/g,"").length,i=t.replace(/[^"]/g,"").length;if(n+i===0){var s=(0,o.default)(t,{isIdentifier:!0});if(s===t)return r.NO_QUOTE;var a=this.preferredQuoteMark(e);if(a===r.NO_QUOTE){var l=this.quoteMark||e.quoteMark||r.DOUBLE_QUOTE,c=_[l];if((0,o.default)(t,c).length<s.length)return l}return a}return i===n?this.preferredQuoteMark(e):i<n?r.DOUBLE_QUOTE:r.SINGLE_QUOTE},l.preferredQuoteMark=function(e){var t=e.preferCurrentQuoteMark?this.quoteMark:e.quoteMark;return void 0===t&&(t=e.preferCurrentQuoteMark?e.quoteMark:this.quoteMark),void 0===t&&(t=r.DOUBLE_QUOTE),t},l._syncRawValue=function(){var e=(0,o.default)(this._value,_[this.quoteMark]);e===this._value?this.raws&&delete this.raws.value:this.raws.value=e},l._handleEscapes=function(e,t){if(this._constructed){var n=(0,o.default)(t,{isIdentifier:!0});n!==t?this.raws[e]=n:delete this.raws[e]}},l._spacesFor=function(e){var t=this.spaces[e]||{},n=this.raws.spaces&&this.raws.spaces[e]||{};return Object.assign({before:"",after:""},t,n)},l._stringFor=function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=b);var r=this._spacesFor(t);return n(this.stringifyProperty(e),r)},l.offsetOf=function(e){var t=1,n=this._spacesFor("attribute");if(t+=n.before.length,"namespace"===e||"ns"===e)return this.namespace?t:-1;if("attributeNS"===e)return t;if(t+=this.namespaceString.length,this.namespace&&(t+=1),"attribute"===e)return t;t+=this.stringifyProperty("attribute").length,t+=n.after.length;var r=this._spacesFor("operator");t+=r.before.length;var o=this.stringifyProperty("operator");if("operator"===e)return o?t:-1;t+=o.length,t+=r.after.length;var i=this._spacesFor("value");t+=i.before.length;var s=this.stringifyProperty("value");return"value"===e?s?t:-1:(t+=s.length,t+=i.after.length,t+=this._spacesFor("insensitive").before.length,"insensitive"===e&&this.insensitive?t:-1)},l.toString=function(){var e=this,t=[this.rawSpaceBefore,"["];return t.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||""===this.value)&&(t.push(this._stringFor("operator")),t.push(this._stringFor("value")),t.push(this._stringFor("insensitiveFlag","insensitive",(function(t,n){return!(t.length>0)||e.quoted||0!==n.before.length||e.spaces.value&&e.spaces.value.after||(n.before=" "),b(t,n)})))),t.push("]"),t.push(this.rawSpaceAfter),t.join("")},i=r,(s=[{key:"quoted",get:function(){var e=this.quoteMark;return"'"===e||'"'===e},set:function(e){f()}},{key:"quoteMark",get:function(){return this._quoteMark},set:function(e){this._constructed?this._quoteMark!==e&&(this._quoteMark=e,this._syncRawValue()):this._quoteMark=e}},{key:"qualifiedAttribute",get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function(){return this.insensitive?"i":""}},{key:"value",get:function(){return this._value},set:function(e){if(this._constructed){var t=g(e),n=t.deprecatedUsage,r=t.unescaped,o=t.quoteMark;if(n&&p(),r===this._value&&o===this._quoteMark)return;this._value=r,this._quoteMark=o,this._syncRawValue()}else this._value=e}},{key:"insensitive",get:function(){return this._insensitive},set:function(e){e||(this._insensitive=!1,!this.raws||"I"!==this.raws.insensitiveFlag&&"i"!==this.raws.insensitiveFlag||(this.raws.insensitiveFlag=void 0)),this._insensitive=e}},{key:"attribute",get:function(){return this._attribute},set:function(e){this._handleEscapes("attribute",e),this._attribute=e}}])&&c(i.prototype,s),Object.defineProperty(i,"prototype",{writable:!1}),r}(s.default);t.default=m,m.NO_QUOTE=null,m.SINGLE_QUOTE="'",m.DOUBLE_QUOTE='"';var _=((r={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}}).null={isIdentifier:!0},r);function b(e,t){return""+t.before+e+t.after}},752:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(988))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var a=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.NESTING,n.value="&",n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),r}(o.default);t.default=a,e.exports=t.default},774:e=>{"use strict";var t={}.hasOwnProperty,n=/[ -,\.\/:-@\[-\^`\{-~]/,r=/[ -,\.\/:-@\[\]\^`\{-~]/,o=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,i=function e(i,s){"single"!=(s=function(e,n){if(!e)return n;var r={};for(var o in n)r[o]=t.call(e,o)?e[o]:n[o];return r}(s,e.options)).quotes&&"double"!=s.quotes&&(s.quotes="single");for(var a="double"==s.quotes?'"':"'",l=s.isIdentifier,c=i.charAt(0),u="",d=0,h=i.length;d<h;){var p=i.charAt(d++),f=p.charCodeAt(),v=void 0;if(f<32||f>126){if(f>=55296&&f<=56319&&d<h){var g=i.charCodeAt(d++);56320==(64512&g)?f=((1023&f)<<10)+(1023&g)+65536:d--}v="\\"+f.toString(16).toUpperCase()+" "}else v=s.escapeEverything?n.test(p)?"\\"+p:"\\"+f.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(p)?"\\"+f.toString(16).toUpperCase()+" ":"\\"==p||!l&&('"'==p&&a==p||"'"==p&&a==p)||l&&r.test(p)?"\\"+p:p;u+=v}return l&&(/^-[-\d]/.test(u)?u="\\-"+u.slice(1):/\d/.test(c)&&(u="\\3"+c+" "+u.slice(1))),u=u.replace(o,(function(e,t,n){return t&&t.length%2?e:(t||"")+n})),!l&&s.wrap?a+u+a:u};i.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1},i.version="3.0.0",e.exports=i},794:e=>{var t,n,r,o,i,s,a=(r=function(e){return null==e?Object.create(null):e},o=function(e){return null==e?"":String(e)},i=function(e,t){return!0===e||(e?e[t]:void 0)},s={a:function(e){for(var t=0;t<e.length;t++)if(e[t])return e},b:function(e){for(var t=Object.values(e),n=0;n<t.length;n++)if(t[n])return t}},(n={})[""]=((t={})[""]=(e,t,n,a)=>{"function"==typeof e.setEventListenerWrapper&&e.setEventListenerWrapper(s.C),e.c,e.m,e.r;var l,c,u,d=!0===a,h=e=>{},p=(t,s,l)=>{1===c&&l("div",{},((t,s)=>{(s||d||i(a.highlightRect,"left")||i(a.highlightRect,"top")||i(a.highlightRect,"width")||i(a.highlightRect,"height"))&&e.y(t,"\n position: absolute;\n left: "+o(r(n.highlightRect).left)+"px;\n top: "+o(r(n.highlightRect).top)+"px;\n width: "+o(r(n.highlightRect).width)+"px;\n height: "+o(r(n.highlightRect).height)+"px;\n background: rgba(0, 128, 192, 0.25);\n ")}),h)},f=(e,t,r,o)=>{o(c=n.highlightRect?1:0,p)},v=(t,r,i)=>{1===l&&i("div",{},((t,r)=>{var i=n.selectMoveDetecting;(r||d||a.selectMoveDetecting)&&e.y(t,"\n position: absolute;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n overflow: hidden;\n "+o(i?"transform: translateY(-200vh)":"")+"\n "),r&&e.v(t,"mousemove","nodeSelectMove",!1,!1,!1,!1),r&&e.v(t,"tap","nodeSelectDone",!1,!1,!1,!1)}),f)},g=e=>{},m=(t,s,l)=>{1===u&&l("div",{},((t,s)=>{(s||d||i(a.highlightRect,"left")||i(a.highlightRect,"top")||i(a.highlightRect,"width")||i(a.highlightRect,"height"))&&e.y(t,"\n position: absolute;\n left: "+o(r(n.highlightRect).left)+"px;\n top: "+o(r(n.highlightRect).top)+"px;\n width: "+o(r(n.highlightRect).width)+"px;\n height: "+o(r(n.highlightRect).height)+"px;\n background: rgba(0, 128, 192, 0.25);\n ")}),g)};return{C:(e,t,r,o)=>{o(l=1===n.state?1:0,v),o(u=2===n.state&&n.highlightRect?1:0,m),a=Object.create(null),d=!1},B:{}}},Object.assign((function(e){return t[e]}),{_:t})),n);e.exports={groupList:a,content:a[""]}},839:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(;n.length>0;){var o=n.shift();e[o]||(e[o]={}),e=e[o]}},e.exports=t.default},870:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(988))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var a=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.COMBINATOR,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),r}(o.default);t.default=a,e.exports=t.default},881:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(949))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var a=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.SELECTOR,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),r}(o.default);t.default=a,e.exports=t.default},942:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(330))&&r.__esModule?r:{default:r},i=n(987);function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var a=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).type=i.TAG,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n),r}(o.default);t.default=a,e.exports=t.default},949:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(988))&&r.__esModule?r:{default:r},i=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(987));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}var u=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).nodes||(n.nodes=[]),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var o,s,u=r.prototype;return u.append=function(e){return e.parent=this,this.nodes.push(e),this},u.prepend=function(e){return e.parent=this,this.nodes.unshift(e),this},u.at=function(e){return this.nodes[e]},u.index=function(e){return"number"==typeof e?e:this.nodes.indexOf(e)},u.removeChild=function(e){var t;for(var n in e=this.index(e),this.at(e).parent=void 0,this.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this},u.removeAll=function(){for(var e,t=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.nodes);!(e=t()).done;)e.value.parent=void 0;return this.nodes=[],this},u.empty=function(){return this.removeAll()},u.insertAfter=function(e,t){t.parent=this;var n,r=this.index(e);for(var o in this.nodes.splice(r+1,0,t),t.parent=this,this.indexes)r<=(n=this.indexes[o])&&(this.indexes[o]=n+1);return this},u.insertBefore=function(e,t){t.parent=this;var n,r=this.index(e);for(var o in this.nodes.splice(r,0,t),t.parent=this,this.indexes)(n=this.indexes[o])<=r&&(this.indexes[o]=n+1);return this},u._findChildAtPosition=function(e,t){var n=void 0;return this.each((function(r){if(r.atPosition){var o=r.atPosition(e,t);if(o)return n=o,!1}else if(r.isAtPosition(e,t))return n=r,!1})),n},u.atPosition=function(e,t){return this.isAtPosition(e,t)?this._findChildAtPosition(e,t)||this:void 0},u._inferEndPosition=function(){this.last&&this.last.source&&this.last.source.end&&(this.source=this.source||{},this.source.end=this.source.end||{},Object.assign(this.source.end,this.last.source.end))},u.each=function(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var t=this.lastEach;if(this.indexes[t]=0,this.length){for(var n,r;this.indexes[t]<this.length&&(n=this.indexes[t],!1!==(r=e(this.at(n),n)));)this.indexes[t]+=1;return delete this.indexes[t],!1!==r&&void 0}},u.walk=function(e){return this.each((function(t,n){var r=e(t,n);if(!1!==r&&t.length&&(r=t.walk(e)),!1===r)return!1}))},u.walkAttributes=function(e){var t=this;return this.walk((function(n){if(n.type===i.ATTRIBUTE)return e.call(t,n)}))},u.walkClasses=function(e){var t=this;return this.walk((function(n){if(n.type===i.CLASS)return e.call(t,n)}))},u.walkCombinators=function(e){var t=this;return this.walk((function(n){if(n.type===i.COMBINATOR)return e.call(t,n)}))},u.walkComments=function(e){var t=this;return this.walk((function(n){if(n.type===i.COMMENT)return e.call(t,n)}))},u.walkIds=function(e){var t=this;return this.walk((function(n){if(n.type===i.ID)return e.call(t,n)}))},u.walkNesting=function(e){var t=this;return this.walk((function(n){if(n.type===i.NESTING)return e.call(t,n)}))},u.walkPseudos=function(e){var t=this;return this.walk((function(n){if(n.type===i.PSEUDO)return e.call(t,n)}))},u.walkTags=function(e){var t=this;return this.walk((function(n){if(n.type===i.TAG)return e.call(t,n)}))},u.walkUniversals=function(e){var t=this;return this.walk((function(n){if(n.type===i.UNIVERSAL)return e.call(t,n)}))},u.split=function(e){var t=this,n=[];return this.reduce((function(r,o,i){var s=e.call(t,o);return n.push(o),s?(r.push(n),n=[]):i===t.length-1&&r.push(n),r}),[])},u.map=function(e){return this.nodes.map(e)},u.reduce=function(e,t){return this.nodes.reduce(e,t)},u.every=function(e){return this.nodes.every(e)},u.some=function(e){return this.nodes.some(e)},u.filter=function(e){return this.nodes.filter(e)},u.sort=function(e){return this.nodes.sort(e)},u.toString=function(){return this.map(String).join("")},o=r,(s=[{key:"first",get:function(){return this.at(0)}},{key:"last",get:function(){return this.at(this.length-1)}},{key:"length",get:function(){return this.nodes.length}}])&&l(o.prototype,s),Object.defineProperty(o,"prototype",{writable:!1}),r}(o.default);t.default=u,e.exports=t.default},987:(e,t)=>{"use strict";t.__esModule=!0,t.UNIVERSAL=t.TAG=t.STRING=t.SELECTOR=t.ROOT=t.PSEUDO=t.NESTING=t.ID=t.COMMENT=t.COMBINATOR=t.CLASS=t.ATTRIBUTE=void 0,t.TAG="tag",t.STRING="string",t.SELECTOR="selector",t.ROOT="root",t.PSEUDO="pseudo",t.NESTING="nesting",t.ID="id",t.COMMENT="comment",t.COMBINATOR="combinator",t.CLASS="class",t.ATTRIBUTE="attribute",t.UNIVERSAL="universal"},988:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r=n(236);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=function e(t,n){if("object"!=typeof t||null===t)return t;var r=new t.constructor;for(var o in t)if(t.hasOwnProperty(o)){var i=t[o];"parent"===o&&"object"==typeof i?n&&(r[o]=n):r[o]=i instanceof Array?i.map((function(t){return e(t,r)})):e(i,r)}return r},s=function(){function e(e){void 0===e&&(e={}),Object.assign(this,e),this.spaces=this.spaces||{},this.spaces.before=this.spaces.before||"",this.spaces.after=this.spaces.after||""}var t,n,s=e.prototype;return s.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},s.replaceWith=function(){if(this.parent){for(var e in arguments)this.parent.insertBefore(this,arguments[e]);this.remove()}return this},s.next=function(){return this.parent.at(this.parent.index(this)+1)},s.prev=function(){return this.parent.at(this.parent.index(this)-1)},s.clone=function(e){void 0===e&&(e={});var t=i(this);for(var n in e)t[n]=e[n];return t},s.appendToPropertyAndEscape=function(e,t,n){this.raws||(this.raws={});var r=this[e],o=this.raws[e];this[e]=r+t,o||n!==t?this.raws[e]=(o||r)+n:delete this.raws[e]},s.setPropertyAndEscape=function(e,t,n){this.raws||(this.raws={}),this[e]=t,this.raws[e]=n},s.setPropertyWithoutEscape=function(e,t){this[e]=t,this.raws&&delete this.raws[e]},s.isAtPosition=function(e,t){if(this.source&&this.source.start&&this.source.end)return!(this.source.start.line>e||this.source.end.line<e||this.source.start.line===e&&this.source.start.column>t||this.source.end.line===e&&this.source.end.column<t)},s.stringifyProperty=function(e){return this.raws&&this.raws[e]||this[e]},s.valueToString=function(){return String(this.stringifyProperty("value"))},s.toString=function(){return[this.rawSpaceBefore,this.valueToString(),this.rawSpaceAfter].join("")},t=e,(n=[{key:"rawSpaceBefore",get:function(){var e=this.raws&&this.raws.spaces&&this.raws.spaces.before;return void 0===e&&(e=this.spaces&&this.spaces.before),e||""},set:function(e){(0,r.ensureObject)(this,"raws","spaces"),this.raws.spaces.before=e}},{key:"rawSpaceAfter",get:function(){var e=this.raws&&this.raws.spaces&&this.raws.spaces.after;return void 0===e&&(e=this.spaces.after),e||""},set:function(e){(0,r.ensureObject)(this,"raws","spaces"),this.raws.spaces.after=e}}])&&o(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=s,e.exports=t.default}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{Connection:()=>ur,getDevTools:()=>hr,protocol:()=>l});var e={};n.r(e),n.d(e,{glassEaselNodeTypeToCDP:()=>Pt});var t={};n.r(t);var o={};n.r(o);var i,s,a,l={};n.r(l),n.d(l,{css:()=>t,dom:()=>e,glassEaselVarToString:()=>Ot,overlay:()=>o,toGlassEaselVar:()=>kt}),function(e){e[e.Shadow=1]="Shadow",e[e.Composed=2]="Composed",e[e.Domlike=3]="Domlike"}(i||(i={})),function(e){e[e.ContentBox=1]="ContentBox",e[e.BorderBox=2]="BorderBox"}(s||(s={})),Object.freeze({__proto__:null,BM:{DYNAMIC:!0,SHADOW:!1,COMPOSED:!1,DOMLIKE:!1},get BackendMode(){return i},get ResizeObserverMode(){return s}}),Object.freeze({__proto__:null}),Object.freeze({__proto__:null}),function(e){e.None="none",e.Simple="simple",e.SimpleWithRecursion="simple-recursion"}(a||(a={}));const c={defaultComponentSpace:null,externalComponent:!1,templateEngine:null,styleScope:null,extraStyleScope:null,hostNodeTagName:"wx-x",multipleSlots:!1,dynamicSlots:!1,reflectToAttributes:!1,writeFieldsToNode:!0,writeIdToDOM:!1,useMethodCallerListeners:!1,idPrefixGenerator:null,pureDataPattern:null,dataDeepCopy:a.Simple,propertyPassingDeepCopy:a.Simple,listenerChangeLifetimes:!1,virtualHost:!1,propertyEarlyInit:!1,propertyComparer:null,unknownPropertyHandler:null,throwGlobalError:!1,writeExtraInfoToAttr:!1,backendContext:null,devTools:null},u=(e,t)=>{const n=void 0===t?c:t;if(void 0===e&&n!==c)return n;const r=null!=e?e:{};return{externalComponent:void 0!==r.externalComponent?r.externalComponent:n.externalComponent,templateEngine:void 0!==r.templateEngine?r.templateEngine:n.templateEngine,styleScope:void 0!==r.styleScope?r.styleScope:n.styleScope,hostNodeTagName:void 0!==r.hostNodeTagName?r.hostNodeTagName:n.hostNodeTagName,extraStyleScope:void 0!==r.extraStyleScope?r.extraStyleScope:n.extraStyleScope,multipleSlots:void 0!==r.multipleSlots?r.multipleSlots:n.multipleSlots,dynamicSlots:void 0!==r.dynamicSlots?r.dynamicSlots:n.dynamicSlots,reflectToAttributes:void 0!==r.reflectToAttributes?r.reflectToAttributes:n.reflectToAttributes,writeFieldsToNode:void 0!==r.writeFieldsToNode?r.writeFieldsToNode:n.writeFieldsToNode,writeIdToDOM:void 0!==r.writeIdToDOM?r.writeIdToDOM:n.writeIdToDOM,useMethodCallerListeners:void 0!==r.useMethodCallerListeners?r.useMethodCallerListeners:n.useMethodCallerListeners,idPrefixGenerator:void 0!==r.idPrefixGenerator?r.idPrefixGenerator:n.idPrefixGenerator,pureDataPattern:void 0!==r.pureDataPattern?r.pureDataPattern:n.pureDataPattern,dataDeepCopy:void 0!==r.dataDeepCopy?r.dataDeepCopy:n.dataDeepCopy,propertyPassingDeepCopy:void 0!==r.propertyPassingDeepCopy?r.propertyPassingDeepCopy:n.propertyPassingDeepCopy,listenerChangeLifetimes:void 0!==r.listenerChangeLifetimes?r.listenerChangeLifetimes:n.listenerChangeLifetimes,virtualHost:void 0!==r.virtualHost?r.virtualHost:n.virtualHost,propertyEarlyInit:void 0!==r.propertyEarlyInit?r.propertyEarlyInit:n.propertyEarlyInit,propertyComparer:void 0!==r.propertyComparer?r.propertyComparer:n.propertyComparer,unknownPropertyHandler:void 0!==r.unknownPropertyHandler?r.unknownPropertyHandler:n.unknownPropertyHandler}};class d{constructor(e){this.empty=!0,this._$arr=null,this._$type=e}add(e){this._$arr?this._$arr=this._$arr.concat(e):this._$arr=[e],this.empty=!1}remove(e){let t=null;if(this._$arr){const n=[],r=this._$arr;for(let o=0;o<r.length;o+=1){if(r[o]===e){n.push(...r.slice(o+1)),t=e;break}n.push(r[o])}this._$arr=n,this.empty=0===this._$arr.length}return t}call(e,t,n){const r=this._$arr;let o=!0;if(r)for(let i=0;i<r.length;i+=1)!1===f(this._$type,r[i],e,t,n)&&(o=!1);return o}}class h{constructor(e){this.empty=!0,this._$arr=null,this._$type=e}getArr(){return this._$arr}hasFunc(){return null!==this._$arr&&this._$arr.length>0}add(e,t){const n={f:e,data:t};this._$arr?this._$arr=this._$arr.concat(n):this._$arr=[n],this.empty=!1}remove(e){let t=null;if(this._$arr){const n=[],r=this._$arr;for(let o=0;o<r.length;o+=1){const i=r[o];if(i.f===e){n.push(...r.slice(o+1)),t=i.data;break}n.push(i)}this._$arr=n,this.empty=0===this._$arr.length}return t}call(e,t,n,r,o){const i=this._$arr;let s=!0;if(i)for(let a=0;a<i.length;a+=1){const{f:l,data:c}=i[a];if(!n(c))continue;const u=f(this._$type,l,e,t,r);!1===(o?o(u):u)&&(s=!1)}return s}}let p=()=>{};function f(e,t,n,r,o){try{return t.apply(n,r)}catch(n){return void p(n,`${e||"Listener"} ${t.name||"(anonymous)"}`,o)}}const v=Symbol("TextNode"),g=Symbol("Element"),m=Symbol("NativeNode"),_=Symbol("VirtualNode"),b=Symbol("ShadowRootSymbol"),$=Symbol("Component"),y=e=>!!e&&e[v],S=e=>!!e&&e[g],C=e=>!!e&&e[m],w=e=>!!e&&e[_],E=e=>!!e&&e[b],N=e=>!!e&&e[$],k=e=>{if(S(e)){let t;return t=w(e)?`(virtual):${e.is}`:N(e)?`${e.tagName}:${e.is}`:C(e)?e.is:"(unknown)",`<${t}${(e=>{let t="";if(S(e)){null!==e._$slotName&&(t+=` (slot) name="${e._$slotName}"`),e.id&&(t+=` id="${e.id}"`),e.slot&&(t+=` slot="${e.slot}"`);const n=e.class;n&&(t+=` class="${n}"`),e.style&&(t+=` style="${e.style}"`)}return w(e)||(N(e)?Object.keys(e._$behavior._$propertyMap).forEach((n=>{t+=` ${n}="${String(e.data[n])}"`})):e.attributes.forEach((e=>{t+=` ${e.name}="${String(e.value)}"`}))),t})(e)}>`}return y(e)?e.textContent.trim():null===e?"<(null)>":void 0===e?"<(undefined)>":"<(unknown)>"};let O=!1;const P=new d("error"),x=new d("warning");function T(e,t,n,r){if(!O){O=!0,N(n)&&n.triggerLifetime("error",[e]);const o=!1===P.call(e,[e,t,n,r]);if(O=!1,o)return}if(c.throwGlobalError)throw e;console.error([e instanceof Error?`${e.message}`:String(e),r?`\t@${k(r)}`:void 0,n?`\t${t||""}@${"string"==typeof n?`<${n}>`:k(n||!1)}`:void 0].filter(Boolean).join("\n"))}function I(e,t,n){x.call(null,[e,t||"",n])&&console.warn(e)}p=T;class M extends Error{constructor(e,t,n,r){super(e),this.additionalStack=t,this.relatedComponent=n,this.element=r,T(this,t,n,r)}}var R;!function(e){e[e.Fragment=0]="Fragment",e[e.Element=1]="Element",e[e.TextNode=2]="TextNode",e[e.Component=3]="Component",e[e.VirtualNode=4]="VirtualNode"}(R||(R={}));class A{constructor(){this.mode=1,this._$styleSheetIdInc=1,this._$renderCallbacks=null,this._$shadowRoot=new D}destroy(){}getWindowWidth(){return 1}getWindowHeight(){return 1}getDevicePixelRatio(){return 1}getTheme(){return"light"}registerStyleSheetContent(e,t){}appendStyleSheetPath(e,t){const n=this._$styleSheetIdInc;return this._$styleSheetIdInc+=1,n}disableStyleSheet(e){}render(e){if(this._$renderCallbacks)this._$renderCallbacks.push(e);else{const t=this._$renderCallbacks=[e];setTimeout((()=>{this._$renderCallbacks=null,t.forEach((e=>{f("Render Callback",e,this,[null])}))}),16)}}getRootNode(){return this._$shadowRoot}createFragment(){return new L(0)}onEvent(e,t){}}class L{constructor(e){this._$shadowRoot=3===e?new D:null}release(){}associateValue(e){}getShadowRoot(){return this._$shadowRoot||void 0}appendChild(e){}removeChild(e,t){}insertBefore(e,t,n){}replaceChild(e,t,n){}spliceBefore(e,t,n){}spliceAppend(e){}spliceRemove(e,t){}setId(e){}setSlot(e){}setSlotName(e){}setSlotElement(e){}setExternalSlot(e){}setInheritSlots(){}setStyle(e,t){}addClass(e){}removeClass(e){}clearClasses(){}setClassAlias(e,t){}setAttribute(e,t){}removeAttribute(e){}setDataset(e,t){}setText(e){}setListenerStats(e,t,n){}setModelBindingStat(e,t){}}class D extends L{constructor(){super(4)}createElement(e,t){return new L(1)}createTextNode(e){return new L(2)}createComponent(e,t,n,r,o,i,s,a){return new L(3)}createVirtualNode(e){return new L(4)}}const j=/[^\s.,]+/g,B=e=>{const t=[];let n;for(j.lastIndex=0;null!==(n=j.exec(e));)t.push(String(n[0]));return t};class F{constructor(){this._$names=[""]}static globalScope(){return 0}register(e){const t=this._$names.length;return this._$names.push(e),t}queryName(e){return this._$names[e]}}class U{constructor(e,t,n,r,o,i){this._$externalNames=void 0,this._$externalRawAlias=null,this._$dirtyExternalNames=null,this._$rawNames=[],this._$backendNames=[],this._$backendNameScopes=[],this._$backendNamesCount=[],this._$hasAliasNames=!1,this._$element=e,this._$owner=n,this._$defaultScope=r,this._$extraScope=o,this._$rootScope=(null==n?void 0:n._$owner)?n._$rootScope:r,this._$prefixManager=i,t&&(this._$externalNames=t,this._$externalRawAlias=[])}_$resolvePrefixes(e,t){const n=this._$owner,r=null==n?void 0:n._$externalNames,o=r?r.indexOf(e):-1;if(n&&-1!==o){this._$hasAliasNames=!0;const e=n._$externalRawAlias[o];if(e)for(let r=0;r<e.length;r+=1)n._$resolvePrefixes(e[r],t)}else if("~"===e[0])t(this._$rootScope,e.slice(1));else if("^"===e[0]){let n=e.slice(1),r=this._$owner;for(;"^"===n[0];)n=n.slice(1),r=null==r?void 0:r._$owner;t((null==r?void 0:r._$owner)?r._$defaultScope:this._$rootScope,n)}else void 0!==this._$extraScope&&t(this._$extraScope,e),t(this._$defaultScope,e)}_$hasAlias(e){return!!this._$externalNames&&this._$externalNames.includes(e)}_$setAlias(e,t){if(!this._$externalNames)return;let n;if(null==t)n=[];else if(Array.isArray(t)){n=Array(t.length);for(let e=0,r=t.length;e<r;e+=1)n[e]=String(t[e])}else n=B(String(t));const r=this._$externalNames.indexOf(e);-1!==r&&(this._$dirtyExternalNames=this._$dirtyExternalNames||[],this._$dirtyExternalNames.push(e),this._$externalRawAlias[r]=n)}_$getAlias(){var e;const t=Object.create(null);return null===(e=this._$externalNames)||void 0===e||e.forEach(((e,n)=>{t[e]=this._$externalRawAlias[n]})),t}_$spreadExternalClassUpdate(){const e=this._$owner;if(!(null==e?void 0:e._$dirtyExternalNames)||!this._$hasAliasNames)return!1;const t=e._$dirtyExternalNames,n=this._$externalNames;if(n)for(let e=0;e<n.length;e+=1){const r=this._$externalRawAlias[e]||[];for(let o=0;o<t.length;o+=1)r.includes(t[o])&&(this._$dirtyExternalNames=this._$dirtyExternalNames||[],this._$dirtyExternalNames.push(n[e]))}const r=this._$rawNames.some((e=>e.some((e=>t.includes(e)))));return r&&this._$updateResolvedNames(),!!this._$dirtyExternalNames||r}_$shouldUpdateExternalClass(){if(!this._$dirtyExternalNames)return!1;if(1===this._$element.getBackendMode()){const e=this._$dirtyExternalNames;for(let t=0;t<e.length;t+=1){const n=e[t],r=this._$externalNames.indexOf(n),o=this._$externalRawAlias[r]||[];this._$element._$backendElement.setClassAlias(n,o)}return this._$dirtyExternalNames=null,!1}return!0}_$markExternalClassUpdated(){this._$dirtyExternalNames=null}_$fasterAddUpdateResolvedNames(){const e=this._$element._$backendElement;if(!e)return!1;const t=this._$rawNames;this._$hasAliasNames=!1;for(let n=0,r=t.length;n<r;n+=1){const r=t[n];if(r)for(let t=0,n=r.length;t<n;t+=1){const n=r[t];1===this._$element.getBackendMode()?this._$addClass(n,void 0,e):this._$resolvePrefixes(n,((t,n)=>{this._$addClass(n,t,e)}))}}return!0}_$updateResolvedNames(){const e=this._$element._$backendElement;if(!e)return!1;const t=this._$rawNames,n=this._$backendNames,r=this._$backendNameScopes,o=this._$backendNamesCount,i=[],s=[],a=[];if(this._$hasAliasNames=!1,1===this._$element.getBackendMode())for(let e=0,n=t.length;e<n;e+=1){const n=t[e];if(n)for(let e=0,t=n.length;e<t;e+=1){const t=n[e];let r=!1;for(let e=0;e<i.length;e+=1)if(t===i[e]){a[e]+=1,r=!0;break}r||(i.push(t),s.push(void 0),a.push(1))}}else for(let e=0,n=t.length;e<n;e+=1){const n=t[e];if(n)for(let e=0,t=n.length;e<t;e+=1){const t=n[e];this._$resolvePrefixes(t,((e,t)=>{for(let n=0;n<i.length;n+=1)if(t===i[n]&&e===s[n])return void(a[n]+=1);i.push(t),s.push(e),a.push(1)}))}}let l=!1;for(let t=0;t<i.length;t+=1){let a=!1;for(let e=0;e<n.length;e+=1)if(i[t]===n[e]&&s[t]===r[e]){a=!0,o[e]=0;break}a||(l=!0,this._$addClassToBackend(i[t],s[t],e))}for(let t=0;t<n.length;t+=1)0!==o[t]&&(l=!0,this._$removeClassFromBackend(n[t],r[t],e));return this._$backendNames=i,this._$backendNameScopes=s,this._$backendNamesCount=a,l}_$addClassToBackend(e,t,n){var r;if(3===this._$element.getBackendMode()){const o=void 0===t?"":null===(r=this._$prefixManager)||void 0===r?void 0:r.queryName(t),i=o?`${o}--${e}`:e;n.classList.add(i)}else 2===this._$element.getBackendMode()?n.addClass(e,t):n.addClass(e)}_$removeClassFromBackend(e,t,n){var r;if(3===this._$element.getBackendMode()){const o=t&&(null===(r=this._$prefixManager)||void 0===r?void 0:r.queryName(t)),i=o?`${o}--${e}`:e;n.classList.remove(i)}else 2===this._$element.getBackendMode()?n.removeClass(e,t):n.removeClass(e)}_$addClass(e,t,n){const r=this._$backendNames,o=this._$backendNameScopes,i=this._$backendNamesCount;let s=!1;for(let n=0;n<r.length;n+=1)if(e===r[n]&&t===o[n]){s=!0,i[n]+=1;break}s||(r.push(e),o.push(t),i.push(1),this._$addClassToBackend(e,t,n))}_$removeClass(e,t,n){const r=this._$backendNames,o=this._$backendNameScopes,i=this._$backendNamesCount;for(let s=0;s<r.length;s+=1)if(e===r[s]&&t===o[s]){i[s]<=1?(r.splice(s,1),o.splice(s,1),i.splice(s,1),this._$removeClassFromBackend(e,t,n)):i[s]-=1;break}}toggle(e,t,n=0){const r=this._$element._$backendElement,o=this._$rawNames[n]?this._$rawNames[n].indexOf(e):-1;let i=!1;if(void 0===t?-1===o:t){if(-1===o){const t=this._$rawNames;t[n]||(t[n]=[]),t[n].push(e),r&&(1===this._$element.getBackendMode()?this._$addClass(e,void 0,r):this._$resolvePrefixes(e,((e,t)=>{this._$addClass(t,e,r)}))),i=!0}}else if(-1!==o){const t=this._$rawNames[n];t&&t.splice(o,1),r&&(1===this._$element.getBackendMode()?this._$removeClass(e,void 0,r):this._$resolvePrefixes(e,((e,t)=>{this._$removeClass(t,e,r)}))),i=!0}return i}contains(e,t=0){const n=this._$rawNames[t]||[];for(let t=0;t<n.length;t+=1){const r=n[t];if("~"===r[0]){if(r.slice(1)===e)return!0}else if("^"===r[0]){let t=r.slice(1);for(;"^"===t[0];)t=t.slice(1);if(t===e)return!0}else if(r===e)return!0}return!1}setClassNames(e,t=0){let n;n=null==e?[]:Array.isArray(e)?B(e.join(" ")):B(String(e));const r=0===this._$rawNames.length;return this._$rawNames[t]=n,r?this._$fasterAddUpdateResolvedNames():this._$updateResolvedNames()}setClassNameList(e,t=0){const n=0===this._$rawNames.length;return this._$rawNames[t]=e.filter((e=>""!==e)),n?this._$fasterAddUpdateResolvedNames():this._$updateResolvedNames()}getClassNames(e=0){const t=this._$rawNames[e]||[];return t?t.join(" "):""}}const q=Symbol("method");Object.freeze({__proto__:null,METHOD_TAG:q});class G{constructor(e,t){this.ownerSpace=e,this._$trans=t}_$implement(e){var t;return(null===(t=this._$trans)||void 0===t?void 0:t.call(this,e))||e}}class V{constructor(){this._$traits=new WeakMap}implement(e,t){const n=e._$implement(t);this._$traits.set(e,n)}get(e){return this._$traits.get(e)}}const W=(e,t)=>{let n;n="/"!==e[0]?t.split("/").slice(0,-1).concat(e.split("/")):e.split("/");const r=[];for(let e=0;e<n.length;e+=1){const t=n[e];""!==t&&"."!==t&&(".."!==t?r.push(t):r.pop())}return r.join("/")},H=(e,t)=>{const n=e.indexOf("://");if(n>0){const t=e.indexOf("/",n+3);return t>0?{domain:e.slice(0,t),absPath:W(e.slice(t+1),"")}:{domain:e.slice(0,n+3),absPath:W(e.slice(n+3),"")}}const r=t.indexOf("://");return r>0?{domain:t.slice(0,r+3),absPath:W(e,t.slice(r+3))}:{domain:null,absPath:W(e,t)}};class z{constructor(e,t,n){this._$callbacks=[],this._$ownerSpace=e,this._$isPub=t,this._$alias=n}add(e){this._$callbacks.push(e)}hintUsed(e){var t,n;null===(n=(t=this._$ownerSpace)._$componentWaitingListener)||void 0===n||n.call(t,this._$isPub,this._$alias,e)}remove(e){const t=this._$callbacks.indexOf(e);-1!==t&&this._$callbacks.splice(t,1)}call(e){for(;this._$callbacks.length>0;)this._$callbacks.shift()(e)}}class Y{constructor(e,t,n,r=!0){this._$behaviorList=Object.create(null),this._$pubBehaviorList=Object.create(null),this._$list=Object.create(null),this._$pubList=Object.create(null),this._$using=Object.create(null),this._$importedSpaces=Object.create(null),this._$listWaiting=Object.create(null),this._$pubListWaiting=Object.create(null),this._$groupingListWaiting=null,this._$componentWaitingListener=null,this._$allowUnusedNativeNode=!0,this._$sharedStyleScope=0,this.hooks={createTextNode:(e,t)=>e(t),createNativeNode:(e,t,n)=>e(t,n),createComponent:(e,t,n)=>e(t,n)},t&&(Object.assign(this._$list,t._$pubList),Object.assign(this._$behaviorList,t._$pubBehaviorList)),this._$defaultComponent=null!=e?e:"",this._$componentOptions=u({},null==t?void 0:t._$componentOptions),this.styleScopeManager=n||new F,this._$allowUnusedNativeNode=r}updateComponentOptions(e){this._$componentOptions=u(e,this._$componentOptions)}getComponentOptions(){return this._$componentOptions}setSharedStyleScope(e){this._$sharedStyleScope=e}setGlobalUsingComponent(e,t){this._$using[e]=t}importSpace(e,t,n){this._$importedSpaces[e]={space:t,privateUse:n}}getComponentByUrl(e,t){const{domain:n,absPath:r}=H(e,t),o=this.getComponent(r,!0,n);if(!o)throw new Error(`There is no component "${r}" in the space and no default component can be used`);return o}getComponentByUrlWithoutDefault(e,t){const{domain:n,absPath:r}=H(e,t);return this.getComponent(r,!1,n)||null}getComponent(e,t=!0,n=null){let r;if(n){const e=this._$importedSpaces[n];if(e){const{space:t,privateUse:n}=e;r=n?t._$list:t._$pubList}}else r=this._$list;if(r){const t=r[e];if(t)return t}if(t)return this._$list[this._$defaultComponent]}getDefaultComponent(){return this._$list[this._$defaultComponent]||null}isDefaultComponent(e){return this._$list[this._$defaultComponent]===e}getGlobalUsingComponent(e){return this._$using[e]||null}getBehaviorByUrl(e,t){const{domain:n,absPath:r}=H(e,t);return this._$getBehavior(r,n)||null}_$getBehavior(e,t=null){let n;if(t){const e=this._$importedSpaces[t];if(e){const{space:t,privateUse:r}=e;n=r?t._$behaviorList:t._$pubBehaviorList}}else n=this._$behaviorList;if(n){const t=n[e];if(t)return t}}defineComponent(e){const t=e.is;return new wt(t,this).definition(e).registerComponent()}defineBehavior(e){const t=e.is;return new wt(t,this).definition(e).registerBehavior()}define(e){return new wt(e,this)}defineWithMethodCaller(e){return new wt(e,this)}registerComponent(e,t){this._$list[e]=t,this._$behaviorList[e]=t.behavior;const n=this._$listWaiting[e];n&&(delete this._$listWaiting[e],this._$groupingListWaiting?this._$groupingListWaiting.push({waiting:n,comp:t}):n.call(t))}_$registerBehavior(e,t){this._$behaviorList[e]=t}startGroupRegister(){this._$groupingListWaiting=[]}endGroupRegister(){const e=this._$groupingListWaiting;if(e){this._$groupingListWaiting=null;for(let t=0;t<e.length;t+=1){const{waiting:n,comp:r}=e[t];n.call(r)}}}groupRegister(e){this.startGroupRegister();const t=f("group register",e,this,[]);return this.endGroupRegister(),t}exportComponent(e,t){const n=this._$list[t];if(!n)throw new Error(`There is no component "${t}" for aliasing`);this._$pubList[e]=n;const r=this._$pubListWaiting[e];r&&(delete this._$pubListWaiting[e],r.call(n))}getExportedComponent(e){return this._$pubList[e]}getExportedBehavior(e){return this._$pubBehaviorList[e]}exportBehavior(e,t){const n=this._$behaviorList[t];if(!n)throw new Error(`There is no behavior "${t}" for aliasing`);this._$pubBehaviorList[e]=n}_$componentWaitingList(e,t){const{domain:n,absPath:r}=H(e,t);let o,i,s;if(n){const e=this._$importedSpaces[n];if(!e)return null;if(i=e.space,s=!e.privateUse,s){if(i._$pubList[r])return null;o=i._$pubListWaiting}else{if(i._$list[r])return null;o=i._$listWaiting}}else{if(i=this,s=!1,this._$list[r])return null;o=this._$listWaiting}let a=o[r];return a||(a=o[r]=new z(i,s,r),a)}setComponentWaitingListener(e){this._$componentWaitingListener=e}createComponentByUrl(e,t,n,r){let o=t,i=null;const s=o.indexOf("#");s>=0&&(o=o.slice(0,s));const a=o.indexOf("?");a>=0&&(i=o.slice(a+1),o=o.slice(0,a));const l=this.getComponentByUrl(o,"");let c=null;return n&&(c=Object.create(null),Object.keys(n).forEach((e=>{const t=n[e],r=this.getComponentByUrl(t,"");c[e]=r}))),Ct.createWithGenericsAndContext(e,l,c,r,(e=>{if(i){let t=!1;i.split("&").forEach((n=>{const r=n.indexOf("=");if(r>=0){const o=decodeURIComponent(n.slice(0,r)),i=decodeURIComponent(n.slice(r+1));e._$dataGroup.replaceProperty(o,i)&&(t=!0)}})),t&&e.applyDataUpdates()}}))}defineTraitBehavior(e){return new G(this,e)}}let Q=null;const K=()=>{if(Q)return Q;const e=new Y;return Q=e,e},X=e=>{const t=e.str;for(;e.cur<t.length;){const n=t[e.cur];if(" "!==n&&"\n"!==n&&"\r"!==n&&"\t"!==n&&"\f"!==n)break;e.cur+=1}return e.cur<t.length},Z=e=>{const t=e.str;let n="";for(;e.cur<t.length;){const r=t[e.cur];if(!(r>="0"&&r<="9"))break;n+=r,e.cur+=1}if(!n)throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (illegal index)`);return parseInt(n,10)},J=e=>{const t=e.str;let n="";for(;e.cur<t.length;){const r=t[e.cur];if("\\"===r)e.cur+1===t.length||(n+=t[e.cur+1],e.cur+=1);else if(/^[_a-zA-Z]$/.test(r))n+=r;else{if(!(r>="0"&&r<="9"))break;if(""===n)throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (field name cannot start with digits)`);n+=r}e.cur+=1}return n},ee=e=>{const t=e.str;let n="";for(;e.cur<t.length;){const r=t[e.cur];if("\\"===r)if(e.cur+1===t.length)n+="\\",e.cur+=1;else{const r=t[e.cur+1];"."===r||"["===r||"]"===r||"\\"===r?(n+=r,e.cur+=2):(n+="\\",e.cur+=1)}else{if("."===r||"["===r)break;n+=r,e.cur+=1}}return n},te=e=>{const t=e.str;if(X(e),"*"===t[e.cur]&&"*"===t[e.cur+1])return e.cur+=2,["**"];const n=J(e);if(!n)throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (first field name illegal)`);const r=[n];for(;e.cur<t.length&&X(e);){const n=t[e.cur];if("."===n){if(e.cur+=1,X(e),"*"===t[e.cur]&&"*"===t[e.cur+1]){r.push("**"),e.cur+=2;break}const n=J(e);if(!n)throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (field name illegal)`);r.push(n)}else{if("["!==n)break;{e.cur+=1,X(e);const n=Z(e);if(X(e),"]"!==t[e.cur])throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (illegal index)`);e.cur+=1,r.push(n)}}}return r},ne=e=>{const t=(e=>{const t=e.str,n=[];for(;e.cur<t.length;){const r=t[e.cur];if("."===r){e.cur+=1;const t=ee(e);""!==t&&n.push(t)}else if("["===r){e.cur+=1;const r=Z(e);if("]"!==t[e.cur]&&e.cur<t.length)throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (illegal index)`);e.cur+=1,n.push(r)}else{const t=ee(e);n.push(t)}}return 0===n.length&&n.push(""),n})({str:e,cur:0});return t},re=e=>{if("string"!=typeof e)return e.map((e=>te({str:e,cur:0})));const t={str:e,cur:0},n=(e=>{const t=[];for(t.push(te(e)),X(e);","===e.str[e.cur];)e.cur+=1,t.push(te(e)),X(e);return t})(t);if(t.cur!==e.length)throw new Error(`data path descriptor "${e}" is illegal at char ${t.cur}`);return n};Object.freeze({__proto__:null,parseMultiPaths:re,parseSinglePath:ne});const oe=(e,t)=>{if("object"==typeof e&&null!==e){const n=t.get(e);if(void 0!==n)return n;if(Array.isArray(e)){const n=[];t.set(e,n);for(let r=0;r<e.length;r+=1)n[r]=oe(e[r],t);return n}const r={};t.set(e,r);const o=Object.keys(e);for(let n=0;n<o.length;n+=1){const i=o[n];r[i]=oe(e[i],t)}return r}return"symbol"==typeof e?Symbol(e.description):e},ie=e=>{if("object"==typeof e&&null!==e){if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n+=1)t[n]=ie(e[n]);return t}const t={},n=Object.keys(e);for(let r=0;r<n.length;r+=1){const o=n[r];t[o]=ie(e[o])}return t}return"symbol"==typeof e?Symbol(e.description):e},se=(e,t)=>t?oe(e,new WeakMap):ie(e);var ae;!function(e){e[e.Disabled=0]="Disabled",e[e.Enabled=1]="Enabled",e[e.Destroyed=2]="Destroyed"}(ae||(ae={})),Object.freeze({__proto__:null,get AutoDestroyState(){return ae},deepCopy:se,simpleDeepCopy:ie});class le{constructor(e){this._$subtreeObserversCount=0,this.attrObservers=null,this.allAttrObservers=null,this.textObservers=null,this.childObservers=null,this.attachObservers=null,this._$bound=e}attachChild(e){e._$mutationObserverTarget||(e._$mutationObserverTarget=new le(e)),this._$subtreeObserversCount>0&&e._$mutationObserverTarget.updateSubtreeCount(this._$subtreeObserversCount)}detachChild(e){e._$mutationObserverTarget&&e._$mutationObserverTarget.updateSubtreeCount(-this._$subtreeObserversCount)}updateSubtreeCount(e){this._$subtreeObserversCount+=e;const t=this._$bound;S(t)&&t.childNodes.forEach((t=>{t._$mutationObserverTarget||(t._$mutationObserverTarget=new le(t)),t._$mutationObserverTarget.updateSubtreeCount(e)}))}hasSubtreeListeners(){return this._$subtreeObserversCount>0}static callAttrObservers(e,t){var n;let r=e;do{const e=r._$mutationObserverTarget;null===(n=null==e?void 0:e.allAttrObservers)||void 0===n||n.call(r,[t]),!(null==e?void 0:e.attrObservers)||"basic"!==t.nameType&&"attribute"!==t.nameType&&"component-property"!==t.nameType||e.attrObservers.call(r,[t]);const o=r.parentNode;if(!o)break;if(r=o,!r._$mutationObserverTarget)break}while(r._$mutationObserverTarget._$subtreeObserversCount>0)}static callTextObservers(e,t){var n;let r=e;do{const e=r._$mutationObserverTarget;null===(n=null==e?void 0:e.textObservers)||void 0===n||n.call(r,[t]);const o=r.parentNode;if(!o)break;if(r=o,!r._$mutationObserverTarget)break}while(r._$mutationObserverTarget._$subtreeObserversCount>0)}static callChildObservers(e,t){var n;let r=e;do{const e=r._$mutationObserverTarget;null===(n=null==e?void 0:e.childObservers)||void 0===n||n.call(r,[t]);const o=r.parentNode;if(!o)break;if(r=o,!r._$mutationObserverTarget)break}while(r._$mutationObserverTarget._$subtreeObserversCount>0)}static callAttachObservers(e,t){var n;const r=e._$mutationObserverTarget;null===(n=null==r?void 0:r.attachObservers)||void 0===n||n.call(e,[t])}}class ce{constructor(e){this._$subtreeListenersCount=0,this._$boundFuncArrs=[],this._$boundTarget=null,this._$listener=e,this._$normalizedListener=null}static create(e){return new ce(e)}observe(e,t={properties:!1,childList:!1,characterData:!1,subtree:!1,attachStatus:!1}){const n=this._$listener;if(!n)throw new Error("A MutationObserver can only observe once");let r;e._$mutationObserverTarget?r=e._$mutationObserverTarget:(r=new le(e),e._$mutationObserverTarget=r),this._$listener=null;const o=t.subtree?n:function(e){e.target===this&&n.call(this,e)};this._$normalizedListener=o,this._$boundTarget=r,"all"===t.properties?(r.allAttrObservers||(r.allAttrObservers=new d("attributeObserver")),r.allAttrObservers.add(o),this._$boundFuncArrs.push(r.allAttrObservers),this._$subtreeListenersCount+=1):t.properties&&(r.attrObservers||(r.attrObservers=new d("attributeObserver")),r.attrObservers.add(o),this._$boundFuncArrs.push(r.attrObservers),this._$subtreeListenersCount+=1),t.childList&&(r.childObservers||(r.childObservers=new d("childObserver")),r.childObservers.add(o),this._$boundFuncArrs.push(r.childObservers),this._$subtreeListenersCount+=1),t.characterData&&(r.textObservers||(r.textObservers=new d("textObserver")),r.textObservers.add(o),this._$boundFuncArrs.push(r.textObservers),this._$subtreeListenersCount+=1),t.subtree&&r.updateSubtreeCount(this._$subtreeListenersCount),t.attachStatus&&(r.attachObservers||(r.attachObservers=new d("attachObserver")),r.attachObservers.add(o),this._$boundFuncArrs.push(r.attachObservers))}disconnect(){var e;null===(e=this._$boundTarget)||void 0===e||e.updateSubtreeCount(-this._$subtreeListenersCount);const t=this._$boundFuncArrs;this._$boundFuncArrs=[];const n=this._$normalizedListener;n&&t.forEach((e=>{e.remove(n)}))}}Object.freeze({__proto__:null,MutationObserver:ce,MutationObserverTarget:le});const ue=Object.prototype.hasOwnProperty;var de;!function(e){e.Invalid="invalid",e.Any="any",e.String="string",e.Number="number",e.Boolean="boolean",e.Object="object",e.Array="array",e.Function="function"}(de||(de={}));const he=(e,t)=>{const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];if(Object.prototype.hasOwnProperty.call(e,o))if("_"===o[0]&&I(`data field "${o}" from different behaviors is overriding or merging.`),"object"!=typeof e[o]||"object"!=typeof t[o]||null===t[o]||Array.isArray(t[o]))e[o]=t[o];else{if(Array.isArray(e[o]))e[o]=e[o].slice();else{const t=e[o],n={},r=Object.keys(t);for(let e=0;e<r.length;e+=1){const o=r[e];n[o]=t[o]}e[o]=n}he(e[o],t[o])}else e[o]=t[o]}},pe=e=>{switch(e){case"string":return"";case"number":return 0;case"boolean":return!1;case"array":return[];case"function":return function(){};default:return null}},fe=e=>"string"===e||e===String?"string":"number"===e||e===Number?"number":"boolean"===e||e===Boolean?"boolean":"object"===e||e===Object?"object":"array"===e||e===Array?"array":"function"===e||e===Function?"function":"any"===e||null==e?"any":"invalid",ve=(e,t,n)=>{const r=n.type,o=n.optionalTypes;if(o)for(let t=0;t<o.length;t+=1)if(ge(o[t],e))return e;return"string"===r?null==e?(I(`property "${t}" received type-incompatible value: expected <String> but get null value. Used default value instead.`),n.defaultFn()):("object"==typeof e&&I(`property "${t}" received type-incompatible value: expected <String> but got object-typed value. Force converted.`),String(e)):"number"===r?isFinite(e)?Number(e):(I("number"==typeof e?`property "${t}" received type-incompatible value: expected <Number> but got NaN or Infinity. Used default value instead.`:`property "${t}" received type-incompatible value: expected <Number> but got non-number value. Used default value instead.`),n.defaultFn()):"boolean"===r?!!e:"array"===r?Array.isArray(e)?e:(I(`property "${t}" received type-incompatible value: expected <Array> but got non-array value. Used default value instead.`),n.defaultFn()):"object"===r?"object"==typeof e?e:(I(`property "${t}" received type-incompatible value: expected <Object> but got non-object value. Used default value instead.`),n.defaultFn()):"function"===r?"function"==typeof e?e:(I(`property "${t}" received type-incompatible value: expected <Function> but got non-function value. Used default value instead.`),n.defaultFn()):void 0===e?n.defaultFn():e},ge=(e,t)=>{if("string"===e){if("string"!=typeof t)return!1}else if("number"===e){if(!Number.isFinite(t))return!1}else if("boolean"===e){if("boolean"!=typeof t)return!1}else if("object"===e){if("object"!=typeof t||Array.isArray(t))return!1}else if("array"===e){if("object"!=typeof t||!Array.isArray(t))return!1}else if("function"===e){if("function"!=typeof t)return!1}else if(void 0===t)return!1;return!0};var me;!function(e){e[e.None=0]="None",e[e.Simple=1]="Simple",e[e.SimpleWithRecursion=2]="SimpleWithRecursion"}(me||(me={}));class _e{constructor(e){this.observerRoot={sub:{}},this.observers=[],this.propFields=e}cloneSub(){const e=new _e(this.propFields);return this.observers.length>0&&(e.observerRoot=ie(this.observerRoot),e.observers=this.observers.slice()),e}addObserver(e,t){const n=this.observers.length;this.observers.push({path:t,f:e});for(let e=0;e<t.length;e+=1){const r=t[e];let o=this.observerRoot,i=!1;for(let e=0;e<r.length;e+=1){const t=r[e];if("**"===t){i=!0;break}o.sub[t]||(o.sub[t]={sub:{}}),o=o.sub[t]}i?o.wildcard?o.wildcard.push(n):o.wildcard=[n]:o.listener?o.listener.push(n):o.listener=[n]}}}const be=(e,t,n,r)=>{const o=new Array(n.length);for(let e=0;e<n.length;e+=1){const r=n[e];let i=t;for(let e=0;e<r.length;e+=1){const t=r[e];if("**"===t)break;if("object"!=typeof i||null===i){i=void 0;break}i=i[t]}o[e]=i}f("Data Observer",r,e.getMethodCaller(),o,e||void 0)},$e=(e,t)=>{if(e.listener)for(let n=0;n<e.listener.length;n+=1)t[e.listener[n]]=!0;if(e.wildcard)for(let n=0;n<e.wildcard.length;n+=1)t[e.wildcard[n]]=!0;const n=Object.keys(e.sub);for(let r=0;r<n.length;r+=1){const o=n[r];$e(e.sub[o],t)}},ye=(e,t,n)=>{let r=e,o=!0;for(let e=0;e<n.length;e+=1){const i=n[e];if(r.wildcard){const e=r.wildcard;for(let n=0;n<e.length;n+=1)t[e[n]]=!0}if(!ue.call(r.sub,i)){o=!1;break}r=r.sub[i]}o&&$e(r,t)},Se=(e,t,n,r)=>{for(let o=0;o<e.length;o+=1){const{path:i,f:s}=e[o];t[o]&&(t[o]=!1,n&&be(n,r,i,s))}},Ce=e=>e===a.Simple?1:e===a.SimpleWithRecursion?2:0;class we{_$generateInnerData(e){const t=this._$pureDataPattern,n=this._$dataDeepCopy;if(t||0!==n){const r={},o=Object.keys(e);for(let i=0;i<o.length;i+=1){const s=o[i],a=e[s];t&&t.test(s)||(r[s]=0===n?a:2===n?se(a,!0):ie(a))}return r}return null}constructor(e,t,n,r,o,i,s,a,l){this._$modelBindingListener=null,this._$pendingChanges=[],this._$doingUpdates=null,this._$recUpdateLevel=0,this._$comp=e,this.data=t,this._$pureDataPattern=n,this._$dataDeepCopy=r,this._$propertyPassingDeepCopy=o,this._$reflectToAttributes=i&&!!e,this._$propFields=s.propFields,this._$observerTree=s,this._$observerStatus=new Array(s.observers.length),this._$propertyComparer=a,this._$unknownPropertyHandler=l,this.innerData=this._$generateInnerData(t)}static create(e){return new we(null,e,null,0,0,!1,new _e({}),null,null)}setUpdateListener(e){this._$updateListener=e}replaceWholeData(e){this.data=e,this.innerData=this._$generateInnerData(e)}replaceDataOnPath(e,t){this._$pendingChanges.push([e,t,void 0,void 0])}spliceArrayDataOnPath(e,t,n,r){Array.isArray(r)?this._$pendingChanges.push([e,r,null!=t?t:-1,n||0]):I(`The splice insertion must be a string (on path "${e.join(".")}"). The change is ignored.`)}replaceProperty(e,t){var n,r;let o=t;return this._$propFields[e]?(0!==this._$propertyPassingDeepCopy&&(o=2===this._$propertyPassingDeepCopy?se(t,!0):ie(t)),this._$pendingChanges.push([[e],o,void 0,void 0]),!0):null!==(r=null===(n=this._$unknownPropertyHandler)||void 0===n?void 0:n.call(this._$comp,e,t))&&void 0!==r&&r}setChanges(e){this._$pendingChanges=e}getChanges(){return this._$pendingChanges}setModelBindingListener(e,t){this._$modelBindingListener?this._$modelBindingListener[e]=t:(this._$modelBindingListener=Object.create(null))[e]=t}applyDataUpdates(e=!1){var t;const n=this._$propFields,r=this._$comp,o=this._$pureDataPattern,i=this._$dataDeepCopy,s=!!this._$doingUpdates;let a,l;this._$observerTree.observers.length>0?this._$doingUpdates?(a=this._$doingUpdates.combined,l=this._$doingUpdates.prop):(this._$doingUpdates={prop:[],combined:[],count:0},a=this._$doingUpdates.combined,l=this._$doingUpdates.prop):(a=[],l=[]);const c=this._$pendingChanges;this._$pendingChanges=[];for(let t=0;t<c.length;t+=1){const s=c[t],[u,d,h,p]=s,v=void 0!==p,g=String(u[0]),m=!!o&&o.test(g),_=!m&&this.innerData,b=n[g];let $=!0;if(b&&1===u.length){const t=this.data[g];let n,o,a;if(v){if(Array.isArray(t)){const e=s,r=h;n=r>=0&&r<t.length?r:t.length,e[2]=n,t.splice(n,p,...d)}else I(`An array splice change cannot be applied to a non-array value (on path "${u.join(".")}"). The change is ignored.`);o=t}else o=ve(d,g,b);if(_){let e;if(0===i)s[1]=e=o;else if(void 0!==n){let t;e=this.innerData[g],s[1]=t=2===i?se(d,!0):ie(d),e.splice(n,p,...t)}else s[1]=e=2===i?se(o,!0):ie(o);this.innerData[g]=e}if(this.data[g]=o,this._$reflectToAttributes){const e=r.getBackendElement();if(e){let t=o;if(b.reflectIdPrefix){const e=r.ownerShadowRoot;if(e){const n=e.getHostNode()._$idPrefix;n&&(t=`${n}--${o}`)}}const n=g.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`)),i=typeof t;"boolean"===i?o?e.setAttribute(n,""):e.removeAttribute(n):"object"===i?e.setAttribute(n,JSON.stringify(t)):e.setAttribute(n,t)}}v||!b.comparer&&!this._$propertyComparer?a=t!==o:(a=!!f("Property Comparer",b.comparer||this._$propertyComparer,r,[d,t],null==r?void 0:r.general()),$=a),!m&&a&&l.push({propName:g,prop:b,oldValue:t,newValue:o,skipModelListener:e})}else{let t,n=this.data,r=g;for(let e=1;e<u.length;e+=1){const t=u[e];Number.isFinite(t)?(ue.call(n,r)&&Array.isArray(n[r])||(n[r]=[]),_||m||t>=n[r].length&&a.push([u.slice(0,e).concat("length"),!0,void 0,void 0])):ue.call(n,r)&&null!==n[r]&&"object"==typeof n[r]&&!Array.isArray(n[r])||(n[r]={}),n=n[r],r=t}if(v){const e=n.length,o=n[r];if(Array.isArray(o)){const r=s,i=h;t=i>=0&&i<o.length?i:o.length,r[2]=t,o.splice(t,p,...d),_||m||n.length===e||a.push([u.concat("length"),!0,void 0,void 0])}else I(`An array splice change cannot be applied to a non-array value (on path "${u.join(".")}"). The change is ignored.`)}else n[r]=d;if(_){n=this.innerData,r=g;for(let e=1;e<u.length;e+=1){const t=u[e];Number.isFinite(t)?(ue.call(n,r)&&Array.isArray(n[r])||(n[r]=[]),t>=n[r].length&&a.push([u.slice(0,e).concat("length"),!0,void 0,void 0])):ue.call(n,r)&&null!==n[r]&&"object"==typeof n[r]&&!Array.isArray(n[r])||(n[r]={}),n=n[r],r=t}let e;if(0===i)s[1]=e=d;else if(void 0!==t){const o=n.length;let l;e=n[r],s[1]=l=2===i?se(d,!0):ie(d),e.splice(t,p,...l),n.length!==o&&a.push([u.concat("length"),!0,void 0,void 0])}else s[1]=e=2===i?se(d,!0):ie(d);n[r]=e}!m&&b&&l.push({propName:g,prop:b,oldValue:void 0,newValue:d,skipModelListener:e||!1})}ye(this._$observerTree.observerRoot,this._$observerStatus,u),!m&&$&&a.push(s),this._$doingUpdates&&(this._$doingUpdates.count+=1)}if(!s){if(this._$doingUpdates){let e;do{e=this._$doingUpdates.count,Se(this._$observerTree.observers,this._$observerStatus,r,this.data)}while(e!==this._$doingUpdates.count);this._$doingUpdates=null}if(this._$recUpdateLevel>0&&r&&I(`recursive update detected: a data update is applying during another data update for component "${r.is}" - this may disorder node trees`,r),this._$recUpdateLevel+=1,null===(t=this._$updateListener)||void 0===t||t.call(this,this.innerData||this.data,a),this._$recUpdateLevel-=1,r)for(let e=0;e<l.length;e+=1){const{propName:t,prop:n,oldValue:o,newValue:i,skipModelListener:s}=l[e];if(!s&&this._$modelBindingListener){const e=this._$modelBindingListener[t];e&&e(i)}n.observer&&f("Property Observer",n.observer,r.getMethodCaller(),[i,o],r),r._$mutationObserverTarget&&le.callAttrObservers(r,{type:"properties",target:r,nameType:"component-property",propertyName:t})}}}}var Ee;!function(e){e[e.Normal=0]="Normal",e[e.NoDefault=1]="NoDefault"}(Ee||(Ee={}));let Ne=Date.now(),ke=Ne;var Oe,Pe,xe;!function(e){e[e.None=0]="None",e[e.Mut=1]="Mut",e[e.Final=2]="Final"}(Oe||(Oe={})),function(e){e[e.NotChanged=0]="NotChanged",e[e.Failed=1]="Failed",e[e.None=2]="None",e[e.Final=3]="Final",e[e.Mut=4]="Mut"}(Pe||(Pe={})),function(e){e[e.None=0]="None",e[e.CapturingPhase=1]="CapturingPhase",e[e.AtTarget=2]="AtTarget",e[e.BubblingPhase=3]="BubblingPhase"}(xe||(xe={}));class Te{constructor(){this.listeners=Object.create(null),this.captureListeners=null}addListener(e,t,n={}){const r=n.final?2:n.mutated?1:0;let o,i,s;return n.capture||n.useCapture?this.captureListeners?o=this.captureListeners:(o=Object.create(null),this.captureListeners=o):o=this.listeners,o[e]?(s=!0,i=o[e]):(s=!1,i=o[e]={mutCount:0,finalCount:0,funcArr:new h("listener")}),i.funcArr.add(t,r),2===r?(i.finalCount+=1,s&&1!==i.finalCount?0:3):1===r?(i.mutCount+=1,!s||1===i.mutCount&&0===i.finalCount?4:0):s?0:2}removeListener(e,t,n={}){const r=n.capture||n.useCapture?this.captureListeners:this.listeners;if(!r)return 1;const o=r[e];if(!o)return 1;const i=o.funcArr.remove(t);return null===i?1:2===i?(o.finalCount-=1,0!==o.finalCount?0:o.mutCount>0?4:2):1===i?(o.mutCount-=1,0!==o.mutCount||0!==o.finalCount?0:2):0}getListeners(){const e=Object.create(null),t=(t,n)=>{const r=Object.keys(t);for(let o=0;o<r.length;o+=1){const i=r[o],s=t[i];e[i]||(e[i]=[]);const a=s.funcArr.getArr();if(a)for(let t=0;t<a.length;t+=1){const r=a[t];e[i].push({listener:r.f,mutated:1===r.data,final:2===r.data,capture:n,useCapture:n})}}};return t(this.listeners,!1),this.captureListeners&&t(this.captureListeners,!1),e}}let Ie=class e{constructor(e,t,n={}){this.eventPhase=0;const r=(()=>{const e=Date.now();return e<ke&&(Ne+=e-ke),ke=e,e-Ne})();this._$eventName=this.type=e,this.timeStamp=r,this.detail=t,this.bubbles=n.bubbles||!1,this.composed=n.composed||!1,this._$capturePhase=n.capturePhase||!1,this._$eventBubblingControl={stopped:!1,mutated:!1,noDefault:!1},this._$originalEvent=n.originalEvent,this._$dispatched=!1,this._$hasListener=!1,this._$handleListenerReturn=n.handleListenerReturn,n.extraFields&&(Object.assign(this,n.extraFields),this.extraFields=n.extraFields)}getEventBubbleStatus(){return this._$eventBubblingControl.noDefault?1:0}wrapShadowedEvent(e,t,n){const r=Object.create(this);return r.target=e,r.mark=t,r.currentTarget=n,r}getEventName(){return this._$eventName}getOriginalEvent(){return this._$originalEvent}preventDefault(){this._$eventBubblingControl.noDefault=!0}defaultPrevented(){return this._$eventBubblingControl.noDefault}stopPropagation(){this._$eventBubblingControl.stopped=!0}propagationStopped(){return this._$eventBubblingControl.stopped}hasListener(){return this._$hasListener}markMutated(){this._$eventBubblingControl.mutated=!0}mutatedMarked(){return this._$eventBubblingControl.mutated}listenerReturnHandler(){return this._$handleListenerReturn}isCapturePhase(){return 1===this.eventPhase}callListener(e,t,n,r){const o=this._$eventName,i=e._$eventTarget;if(!i)return;const s=r?i.captureListeners:i.listeners;if(!s)return;const a=s[o];if(!a)return;const l=this.mutatedMarked(),c=N(n)&&n.getMethodCaller()||n,u=N(e)&&e.getMethodCaller()||e;this._$hasListener||(this._$hasListener=a.funcArr.hasFunc());const d=this.wrapShadowedEvent(c,t,u);!1===a.funcArr.call(u,[d],(e=>!l||1!==e),N(n)?n:void 0,this._$handleListenerReturn)||a.finalCount>0?(d.stopPropagation(),d.preventDefault()):a.mutCount>0&&d.markMutated()}dispatch(e,t){if(this._$dispatched)throw new Error("Event cannot be dispatched twice");this._$dispatched=!0;const n=this.composed,r=this.bubbles,o=t&&!n,i=this._$eventBubblingControl,s=(e,t)=>{const r=e=>{let o=e;const i=e.collectMarks();for(;;){if(!1===t(o,e,i))return null;let s;if(n){if(E(o))return o.getHostNode();if(null===o.containingSlot)return null;if(o.containingSlot)s=r(o.containingSlot);else for(s=o.parentNode;null==s?void 0:s._$inheritSlots;)s=s.parentNode}else s=o.parentNode;if(!s)return null;o=s}};let o=e;for(;;){const e=r(o);if(!e)break;o=e}};if(this._$capturePhase&&!i.stopped&&!o){this.eventPhase=1;const t=[];s(e,((e,n,r)=>{t.push([e,n,r])}));for(let e=t.length-1;e>=0;e-=1){const[n,r,o]=t[e];if(n._$eventTarget&&(this.callListener(n,o,r,!0),i.stopped))break}}if(this.eventPhase=2,!i.stopped&&t&&N(e)&&e._$external&&e.shadowRoot.handleEvent(t,this),!i.stopped&&!o){let t=!0;s(e,((e,n,o)=>{if(!t&&N(e)&&e._$external){const t=e.shadowRoot;t.handleEvent(t.slot,this)}return t=!1,this.eventPhase=3,e._$eventTarget&&!i.stopped&&this.callListener(e,o,n,!1),r&&!i.stopped}))}return this.eventPhase=0,this.getEventBubbleStatus()}static dispatchEvent(e,t){return t.dispatch(e)}static dispatchExternalEvent(e,t,n){return n.dispatch(e,t)}static triggerEvent(t,n,r,o){const i=new e(n,r,o);return e.dispatchEvent(t,i)}static triggerExternalEvent(t,n,r,o,i){const s=new e(r,o,i);return e.dispatchExternalEvent(t,n,s)}};var Me;!function(e){e[e.Child=0]="Child",e[e.Descendant=1]="Descendant",e[e.CrossShadowDescendant=2]="CrossShadowDescendant"}(Me||(Me={}));const Re=e=>{var t;return null===(t=e.ownerShadowRoot)||void 0===t?void 0:t.getHostNode().getRootBehavior().ownerSpace};class Ae{static _$parseSegment(e,t){const n=/^(#[_a-zA-Z][-_a-zA-Z0-9:]*|)((?:\.-?[_a-zA-Z][-_a-zA-Z0-9]*)+|)$/.exec(e);if(!n)return null;const r=n[1].slice(1),o=n[2].split(".");return o.shift(),r||o.length?{id:r,classes:o,relation:t}:null}constructor(e){this.unions=[];const t=String(e||"").split(",");for(let e=0;e<t.length;e+=1){const n=t[e].split(/( |\t|>+)/g),r=[];let o=1,i=0;for(;i<n.length;i+=1){const e=n[i];if(!e||" "===e||"\t"===e||">>"===e)continue;if(">"===e[0]){if(1!==o)break;o=3===e.length?2:0;continue}const t=Ae._$parseSegment(e,o);if(o=1,!t)break;r.push(t)}i===n.length&&r.length&&this.unions.push(r)}}isEmpty(){return 0===this.unions.length}static _$testSelectorSegment(e,t,n,r,o,i){var s;if(n===e)return!1;const a=r[o];let l=!0;(Re(n)!==t||a.id&&a.id!==n.id)&&(l=!1);const c=a.classes;for(let e=0;l&&e<c.length;e+=1)(null===(s=n.classList)||void 0===s?void 0:s.contains(c[e]))||(l=!1);if(!l&&0===i)return!1;let u=n;if(l&&0===o){if(null===e)return!0;for(u=u.parentNode;u;u=u.parentNode)if(u===e)return!0;if(2!==i)return!1;u=n,l=!1}const d=l?a.relation:i;do{u.parentNode?u=u.parentNode:2===d?u=E(u)?u.getHostNode():null:2===i?(l=!1,u=E(u)?u.getHostNode():null):u=null,u===e&&(u=null)}while(w(u));if(!u)return!1;if(l){if(Ae._$testSelectorSegment(e,t,u,r,o-1,d))return!0;if(2!==i)return!1}return Ae._$testSelectorSegment(e,t,u,r,o,i)}testSelector(e,t){if(w(t))return!1;const n=this.unions;let r;if(r=null!==e&&Re(e)||Re(t),void 0===r)return!1;for(let o=0;o<n.length;o+=1){const i=n[o];if(Ae._$testSelectorSegment(e,r,t,i,i.length-1,0))return!0}return!1}query(e,t){const n=[],r=(e,t,o)=>{if(this.testSelector(e,t)){if(o)return t;n.push(t)}if(N(t)){const n=t.getShadowRoot();if(n){const t=r(e,n,o);if(t&&o)return t}}const i=t.childNodes;for(let t=0;t<i.length;t+=1){const n=i[t];if(S(n)){const t=r(e,n,o);if(t&&o)return t}}return null},o=r(e,e,t);return t?o:n}}var Le;!function(e){e[e.MAIN=0]="MAIN",e[e.TEMPLATE_EXTRA=1]="TEMPLATE_EXTRA",e[e.ANIMATION_EXTRA=2]="ANIMATION_EXTRA",e[e.TEMP_EXTRA=3]="TEMP_EXTRA"}(Le||(Le={}));const De={mode:1,destroyed:!0,dropBackendAfterRelease:!0},je={mode:2,destroyed:!0,dropBackendAfterRelease:!0},Be={mode:3,destroyed:!0,dropBackendAfterRelease:!0};class Fe{constructor(){throw new Error("Element cannot be constructed directly")}_$initialize(e,t,n,r){this._$backendElement=t,this._$destroyOnRemoval=0,this._$nodeTreeContext=r,this._$nodeId="",this._$nodeAttributes=null,this._$nodeSlot="",this._$slotName=null,this._$slotElement=null,this._$slotValues=null,this._$subtreeSlotStart=null,this._$subtreeSlotEnd=null,this._$inheritSlots=!1,this._$placeholderHandlerRemover=void 0,this._$virtual=e,this.dataset={},this._$marks=null,this._$attached=!1,this.classList=null,this._$styleSegments=[],this.parentNode=null,this.parentIndex=-1,this.childNodes=[],this.slotNodes=void 0,this.ownerShadowRoot=n,this._$mutationObserverTarget=null,this._$eventTarget=new Te}get $$(){return this._$backendElement}get id(){return this._$nodeId}set id(e){var t;const n=String(e);if(this._$nodeId===n)return;this._$nodeId=n;const r=this._$backendElement;if(this.ownerShadowRoot){const e=this.ownerShadowRoot.getHostNode();if(this.ownerShadowRoot._$markIdCacheDirty(),e.getComponentOptions().writeIdToDOM){const t=e._$idPrefix,o=t?`${t}--${n}`:n;r&&(3===this.getBackendMode()?r.id=o:2===this.getBackendMode()&&r.setId(o))}}1===this.getBackendMode()&&r.setId(n),c.writeExtraInfoToAttr&&(null===(t=this._$backendElement)||void 0===t||t.setAttribute("exparser:info-attr-id",n)),this._$mutationObserverTarget&&le.callAttrObservers(this,{type:"properties",target:this,nameType:"basic",attributeName:"id"})}get slot(){return this._$nodeSlot}set slot(e){const t=String(e);if(this._$nodeSlot===t)return;if(this._$inheritSlots)throw new Error('slots-inherited nodes do not support "slot" attribute.');this._$nodeSlot=t,1===this.getBackendMode()&&this._$backendElement.setSlot(t);const n=Fe._$getParentHostShadowRoot(this.parentNode);if(n){if(3===n.getSlotMode())throw new Error("nodes inside dynamic slots should change binding slots through Element#setSlotElement.");const e=Fe._$updateSubtreeSlotNodes(this.parentNode,[this],n,n,this.parentIndex);null==e||e.removeSlotNodes();const t=this.containingSlot;null==e||e.updateContainingSlot();const r=this.containingSlot;Fe.insertChildReassign(this.parentNode,this,t,r,this.parentIndex+1),null==e||e.insertSlotNodes()}this._$mutationObserverTarget&&le.callAttrObservers(this,{type:"properties",target:this,nameType:"basic",attributeName:"slot"})}get attributes(){const e=[];return this._$nodeAttributes&&Object.entries(this._$nodeAttributes).forEach((([t,n])=>{e.push({name:t,value:n})})),e}get class(){return this.classList?this.classList.getClassNames(0):""}set class(e){this.setNodeClass(e,0)}get style(){return this._$styleSegments[0]||""}set style(e){this.setNodeStyle(e,0)}asTextNode(){return null}asElement(){return this}asNativeNode(){return C(this)?this:null}asVirtualNode(){return w(this)?this:null}asShadowRoot(){return E(this)?this:null}asGeneralComponent(){return N(this)?this:null}asInstanceOf(e){return N(this)?this.asInstanceOf(e):null}getBackendContext(){const e=this._$nodeTreeContext;return e===De||e===je||e===Be?null:e}getBackendMode(){return this._$nodeTreeContext.mode}getBackendElement(){return this._$backendElement}destroyBackendElement(){this._$backendElement&&3!==this.getBackendMode()&&this._$backendElement.release(),this._$nodeTreeContext.dropBackendAfterRelease&&(this._$backendElement=null,2===this.getBackendMode()?this._$nodeTreeContext=je:3===this.getBackendMode()?this._$nodeTreeContext=Be:this._$nodeTreeContext=De)}destroyBackendElementOnSubtree(){const e=function(t){for(let n=0;n<t.childNodes.length;n+=1){const r=t.childNodes[n];S(r)?e(r):r.destroyBackendElement()}if(N(t)){const n=t.getShadowRoot();n&&e(n)}t.destroyBackendElement()};e(this)}destroyBackendElementOnRemoval(){this._$destroyOnRemoval=1}cancelDestroyBackendElementOnRemoval(){this._$destroyOnRemoval=0}destroyBackendElementOnDetach(){this._$destroyOnRemoval=1}cancelDestroyBackendElementOnDetach(){this._$destroyOnRemoval=0}isVirtual(){return this._$virtual}setNodeClass(e,t=0){var n;(null===(n=this.classList)||void 0===n?void 0:n.setClassNames(e,t))&&this._$mutationObserverTarget&&le.callAttrObservers(this,{type:"properties",target:this,nameType:"basic",attributeName:"class"})}setNodeClassList(e,t=0){var n;(null===(n=this.classList)||void 0===n?void 0:n.setClassNameList(e,t))&&this._$mutationObserverTarget&&le.callAttrObservers(this,{type:"properties",target:this,nameType:"basic",attributeName:"class"})}toggleNodeClass(e,t,n=0){var r;(null===(r=this.classList)||void 0===r?void 0:r.toggle(e,t,n))&&this._$mutationObserverTarget&&le.callAttrObservers(this,{type:"properties",target:this,nameType:"basic",attributeName:"class"})}setNodeStyle(e,t=0){if(0===t&&this._$styleSegments[t]===e)return;this._$styleSegments[t]=e;const n=this._$styleSegments.join(";");this._$backendElement&&(3===this.getBackendMode()?this._$backendElement.setAttribute("style",n):2===this.getBackendMode()?this._$backendElement.setStyle(n):this._$backendElement.setStyle(e,t)),this._$mutationObserverTarget&&le.callAttrObservers(this,{type:"properties",target:this,nameType:"basic",attributeName:"style"})}getNodeStyleSegments(){return this._$styleSegments}static checkAndCallAttached(e){!function e(t){if(S(t)&&!t._$attached){t._$attached=!0;const n=N(t);if(n&&(t.triggerLifetime("attached",[]),t._$relation&&(t._$relation.triggerLinkEvent(2,!1),t._$relation.triggerLinkEvent(4,!1),t._$relation.triggerLinkEvent(0,!1))),t._$mutationObserverTarget&&le.callAttachObservers(t,{type:"attachStatus",target:t,status:"attached"}),n){const n=t.getShadowRoot();n&&e(n)}const r=t.childNodes;for(let t=0;t<r.length;t+=1)e(r[t])}}(e)}static checkAndCallDetached(e){if(function e(t){if(S(t)&&t._$attached){if(N(t)&&t.triggerLifetime("beforeDetach",[]),t.childNodes.forEach(e),N(t)){const n=t.getShadowRoot();n&&e(n),t._$attached=!1,t.triggerLifetime("detached",[]),t._$relation&&(t._$relation.triggerLinkEvent(2,!0),t._$relation.triggerLinkEvent(4,!0),t._$relation.triggerLinkEvent(0,!0))}else t._$attached=!1;t._$mutationObserverTarget&&le.callAttachObservers(t,{type:"attachStatus",target:t,status:"detached"})}}(e),S(e)){const t=function(n){if(2===e._$destroyOnRemoval)return;for(let e=0;e<n.childNodes.length;e+=1){const r=n.childNodes[e];S(r)?t(r):1===r._$destroyOnRemoval&&(r._$destroyOnRemoval=2,r.destroyBackendElement())}if(N(n)){const e=n.getShadowRoot();e&&t(e)}1===n._$destroyOnRemoval&&(n._$destroyOnRemoval=2,n.destroyBackendElement());const r=n._$placeholderHandlerRemover;"function"==typeof r&&r()};t(e)}else 1===e._$destroyOnRemoval&&(e._$destroyOnRemoval=2,e.destroyBackendElement())}static checkAndCallMoved(e){!function e(t){if(S(t)&&t._$attached&&(t.childNodes.forEach(e),N(t))){const n=t.getShadowRoot();n&&e(n),t.triggerLifetime("moved",[]),t._$relation&&(t._$relation.triggerLinkEvent(2,!1),t._$relation.triggerLinkEvent(4,!1),t._$relation.triggerLinkEvent(0,!1))}}(e)}static checkChildObservers(e,t,n){var r;const o=e._$mutationObserverTarget;if(o&&(!(null===(r=o.childObservers)||void 0===r?void 0:r.empty)||o.hasSubtreeListeners())){const r=[n];let o;o="add"===t?{type:"childList",target:e,addedNodes:r}:"remove"===t?{type:"childList",target:e,removedNodes:r}:{type:"childList",target:e,addedNodes:r,removedNodes:r},le.callChildObservers(e,o)}}static hasSubtreeMutationObservers(e){var t;return(null===(t=e._$mutationObserverTarget)||void 0===t?void 0:t.hasSubtreeListeners())||!1}static _$insertChildReassignSlot(e,t,n,r){if(n)if(r){const e=[...n.slotNodes];for(let t=0;t<e.length;t+=1){const o=e[t];Fe._$spliceSlotNodes(n,0,1,void 0),Fe._$spliceSlotNodes(r,-1,0,[o]),Fe._$updateContainingSlot(o,r),o._$inheritSlots||Fe.insertChildReassign(o.parentNode,o,n,r,o.parentIndex)}}else{const e=[...n.slotNodes];for(let t=0;t<e.length;t+=1){const o=e[t];Fe._$spliceSlotNodes(n,0,1,void 0),Fe._$updateContainingSlot(o,r),o._$inheritSlots||Fe.insertChildReassign(o.parentNode,o,n,null,o.parentIndex)}}else{const n=[];e.forEachNodeInSpecifiedSlot(null,(e=>{null!==t&&(S(e)?e._$nodeSlot:"")!==t||n.push(e)}));for(let e=0;e<n.length;e+=1){const t=n[e];Fe._$spliceSlotNodes(r,-1,0,[t]),Fe._$updateContainingSlot(t,r),t._$inheritSlots||Fe.insertChildReassign(t.parentNode,t,null,r,t.parentIndex)}}}static insertChildReassign(e,t,n,r,o){if(1!==e.getBackendMode()){if(n)if(r&&3===e.getBackendMode());else{const r=Fe.findNearestNonVirtual(n);if(r){const n=Fe.countNonVirtual(t);if(n){const[t,o]=n;if(3===e.getBackendMode()){const e=t._$backendElement;for(let t=1;t<o;t+=1){const t=e.nextSibling;t&&r.removeChild(t)}o>0&&r.removeChild(e)}else r.spliceRemove(t._$backendElement,o)}}}r&&Fe.insertChildComposed(e,t,void 0,!1,o)}}static findNearestNonVirtual(e){let t=e;for(;null==t?void 0:t._$virtual;)t=E(t)?t.getHostNode():void 0===t.containingSlot?t.parentNode:t.containingSlot;return N(t)&&t._$external?t.shadowRoot.slot:t?t._$backendElement:null}static countNonVirtual(e){let t=null,n=0;const r=e=>{0===n&&(t=e),n+=1};var o;return S(o=e)&&o._$virtual?o.forEachNonVirtualComposedChild(r):r(o),t?[t,n]:null}static forEachNodeInSlot(e,t){const n=e=>{if(!1===t(e,e.containingSlot))return!1;if(e._$inheritSlots){const t=e.childNodes;for(let e=0;e<t.length;e+=1)if(!n(t[e]))return!1;return!0}return!0};return n(e)}static forEachNodeInSpecificSlot(e,t,n){const r=e=>{if(e.containingSlot===t&&!1===n(e))return!1;if(e._$inheritSlots){const t=e.childNodes;for(let e=0;e<t.length;e+=1)if(!r(t[e]))return!1;return!0}return!0};return r(e)}static forEachSlotContentInSlot(e,t){const n=e=>{if(e._$inheritSlots){const t=e.childNodes;for(let e=0;e<t.length;e+=1)if(!n(t[e]))return!1;return!0}return!1!==t(e,e.containingSlot)};return n(e)}static forEachSlotContentInSpecificSlot(e,t,n){const r=e=>{if(e._$inheritSlots){const t=e.childNodes;for(let e=0;e<t.length;e+=1)if(!r(t[e]))return!1;return!0}return e.containingSlot!==t||!1!==n(e)};return r(e)}static _$findFirstNonVirtualChild(e,t){const n=null!==e._$slotName,r=n?e.slotNodes:e.childNodes;if(t>=0&&t<r.length)for(let e=t;e<r.length;e+=1){let t=null;const o=e=>(t=e,!1),i=e=>{if(!n&&e._$inheritSlots){const t=e.childNodes;for(let e=0;e<t.length;e+=1)if(!1===i(t[e]))return!1}return e._$virtual?e.forEachNonVirtualComposedChild(o):o(e)};if(i(r[e]),t)return t}const o=e=>{if(!e._$virtual)return null;const t=e.containingSlot;if(null===t)return null;if(void 0!==t)return Fe._$findFirstNonVirtualChild(t,e.slotIndex+1);if(E(e))return o(e.getHostNode());const n=e.parentNode;return n?Fe._$findFirstNonVirtualChild(n,e.parentIndex+1):null};return o(e)}static _$findFirstNonVirtualSibling(e,t){const n=e.containingSlot;if(null===n)return null;if(void 0!==n){if(!n._$virtual)return null;if(void 0!==e.slotIndex)return Fe._$findFirstNonVirtualChild(n,e.slotIndex+1);const r=Fe._$findSlotNodeInsertPosition(n,e,t);return Fe._$findFirstNonVirtualChild(n,r)}let r=e;if(E(e))return r=e.getHostNode(),r._$virtual?Fe._$findFirstNonVirtualChild(r,r.parentIndex+1):null;const o=r.parentNode;return o?Fe._$findFirstNonVirtualChild(o,t):null}static insertChildComposed(e,t,n,r,o){var i,s,a;let l=!1,u=e;for(;null==u?void 0:u._$inheritSlots;)l=!0,u=u.parentNode;if(!u)return;const d=u,h=d._$nodeTreeContext;if(h.destroyed)return;let p;N(d)?d._$external?p=d.shadowRoot.slot:l=!0:(d._$virtual&&(l=!0),p=Fe.findNearestNonVirtual(d));let f=null;const v=(i,s)=>{const a=i||(s?Fe.findNearestNonVirtual(s):null);if(3!==e.getBackendMode()&&!a)return;let c=0,u=null,d=null,p=null;if(t){const e=f||(3===h.mode?h.document.createDocumentFragment():h.createFragment());f=e;const n=t=>{e.appendChild(t._$backendElement),d=e};Fe.forEachNodeInSpecificSlot(t,s,(e=>{p||(p=e),e._$virtual?e.forEachNonVirtualComposedChild(n):n(e)}))}if(3!==e.getBackendMode()||a){if((n||l)&&(r&&n?(Fe.forEachSlotContentInSpecificSlot(n,s,(e=>{if(S(e)){const t=Fe.countNonVirtual(e);t&&(u||(u=t[0]),c+=t[1])}else u||(u=e),c+=1;return!0})),0===c&&d&&p&&(u=Fe._$findFirstNonVirtualSibling(void 0===s?t:p,o+1))):d&&p&&(u=Fe._$findFirstNonVirtualSibling(void 0===s?t:p,o))),d)if(u)if(3===h.mode){const e=u._$backendElement;a.insertBefore(d,e);for(let t=1;t<c;t+=1){const t=e.nextSibling;t&&a.removeChild(t)}c>0&&a.removeChild(e)}else a.spliceBefore(u._$backendElement,c,d);else 3===h.mode?a.appendChild(d):a.spliceAppend(d);else if(c>0)if(3===h.mode){const e=u._$backendElement;for(let t=1;t<c;t+=1){const t=e.nextSibling;t&&a.removeChild(t)}c>0&&a.removeChild(e)}else a.spliceRemove(u._$backendElement,c)}else f=null};if(void 0!==p)null===p||(l||S(t)&&t._$virtual||S(n)&&n._$virtual?v(p,void 0):r?t?p.replaceChild(t._$backendElement,n._$backendElement):p.removeChild(n._$backendElement):n?p.insertBefore(t._$backendElement,n._$backendElement):p.appendChild(t._$backendElement));else if(t&&t._$inheritSlots||r&&n&&n._$inheritSlots){const e=new Set;r&&n&&Fe.forEachSlotContentInSlot(n,((t,n)=>{e.add(n)})),t&&Fe.forEachSlotContentInSlot(t,((t,n)=>{e.add(n)})),e.forEach((e=>v(null,e)))}else t&&v(null,t.containingSlot),!r||!n||t&&n.containingSlot===t.containingSlot||v(null,n.containingSlot);3!==h.mode&&f&&f.release(),c.writeExtraInfoToAttr&&(r&&S(n)&&(null===(i=n._$backendElement)||void 0===i||i.removeAttribute("exparser:info-in-slot-of")),S(t)&&(N(e)?null===(s=t._$backendElement)||void 0===s||s.setAttribute("exparser:info-in-slot-of",e._$componentInstanceId):null===(a=t._$backendElement)||void 0===a||a.removeAttribute("exparser:info-in-slot-of")))}static _$updateSubtreeSlotsInsertion(e,t,n,r,o){if(!t||!n)return;let i=e,s=null,a=null;const l=(e,t)=>{if(e._$subtreeSlotStart){const n=e.childNodes;let r=t+1,o=n[r];for(;o&&!o._$subtreeSlotStart;)r+=1,o=n[r];return void(o?(a=o._$subtreeSlotStart,s=a.prev):(s=e._$subtreeSlotEnd,s&&(a=s.next)))}let n=e,r=e.parentNode;for(;r&&!r._$subtreeSlotStart;)n=r,r=r.parentNode;r&&l(r,n.parentIndex)};for(l(i,r),s&&(s.next=t,t.prev=s),a&&(a.prev=n,n.next=a);i;){let e=!1;if(i._$subtreeSlotStart?i._$subtreeSlotStart===a?(i._$subtreeSlotStart=t,e=!0):i._$subtreeSlotEnd===s&&(i._$subtreeSlotEnd=n,e=!0):(i._$subtreeSlotStart=t,i._$subtreeSlotEnd=n,e=!0),!e||!i.parentNode)break;i=i.parentNode}const c=i.ownerShadowRoot;(null==c?void 0:c.isConnected(i))&&c._$applySlotsInsertion(t,n,o)}static _$updateSubtreeSlotsRemoval(e,t,n,r){if(!t||!n)return;let o=e;const i=t.prev,s=n.next;for(i&&(i.next=s,t.prev=null),s&&(s.prev=i,n.next=null);o;){let e=!1;if(o._$subtreeSlotStart===t&&o._$subtreeSlotEnd===n&&(o._$subtreeSlotStart=o._$subtreeSlotEnd=null,e=!0),o._$subtreeSlotStart===t?(o._$subtreeSlotStart=s,e=!0):o._$subtreeSlotEnd===n&&(o._$subtreeSlotEnd=i,e=!0),!e||!o.parentNode)break;o=o.parentNode}const a=o.ownerShadowRoot;(null==a?void 0:a.isConnected(o))&&a._$applySlotsRemoval(t,n,r)}static _$updateSubtreeSlotsReplacement(e,t,n,r,o,i,s){if(!t||!n)return void Fe._$updateSubtreeSlotsRemoval(e,r,o,s);if(!r||!o)return void Fe._$updateSubtreeSlotsInsertion(e,t,n,i,s);let a=e;const l=r.prev,c=o.next;for(l&&(l.next=t,t.prev=l,r.prev=null),c&&(c.prev=n,n.next=c,o.next=null);a;){let e=!1;if(a._$subtreeSlotStart===r&&(a._$subtreeSlotStart=t,e=!0),a._$subtreeSlotEnd===o&&(a._$subtreeSlotEnd=n,e=!0),!e||!a.parentNode)break;a=a.parentNode}const u=a.ownerShadowRoot;(null==u?void 0:u.isConnected(a))&&(u._$applySlotsRemoval(r,o,!1),u._$applySlotsInsertion(t,n,s))}static _$updateSubtreeSlotNodes(e,t,n,r,o){if(!n&&!r)return;const i=null==n?void 0:n.getSlotMode(),s=null==r?void 0:r.getSlotMode();if(!(void 0!==i&&1!==i||void 0!==s&&1!==s)){let e=-1,i=0,s=-1;const a=[],l=t[0].containingSlot,c=null==n?void 0:n.getContainingSlot(t[0]);for(let n=0;n<t.length;n+=1){const r=t[n];Fe.forEachNodeInSlot(r,(t=>{l&&(i?i+=1:(e=t.slotIndex,i=1)),a.push(t)}))}if(c&&a.length){const e=a[0];s=Fe._$findSlotNodeInsertPosition(c,e,o)}return{updateContainingSlot:()=>{for(let e=a.length-1;e>=0;e-=1){const t=a[e];Fe._$updateContainingSlot(t,c)}},removeSlotNodes:()=>{r&&l&&i&&Fe._$spliceSlotNodes(l,e,i,void 0)},insertSlotNodes:()=>{n&&c&&a.length&&Fe._$spliceSlotNodes(c,s,0,a)}}}const a=new Map,l=new Map,c=[];for(let e=0;e<t.length;e+=1){const r=t[e];Fe.forEachNodeInSlot(r,((e,t)=>{const r=null==n?void 0:n.getContainingSlot(e);if(t){const n=l.get(t);n?n.count+=1:l.set(t,{start:e.slotIndex,count:1})}if(r){const t=a.get(r);t?t.nodes.push(e):a.set(r,{nodes:[e],insertPos:-1})}c.push([e,r])}))}if(n&&a.size){const e=a.entries();for(let t=e.next();!t.done;t=e.next()){const[e,{nodes:n}]=t.value,r=n[0];t.value[1].insertPos=Fe._$findSlotNodeInsertPosition(e,r,o)}}return{updateContainingSlot:()=>{for(let e=c.length-1;e>=0;e-=1){const[t,n]=c[e];Fe._$updateContainingSlot(t,n)}},removeSlotNodes:()=>{if(r&&l.size){const e=l.entries();for(let t=e.next();!t.done;t=e.next()){const[e,{start:n,count:r}]=t.value;Fe._$spliceSlotNodes(e,n,r,void 0)}}},insertSlotNodes:()=>{if(n&&a.size){const e=a.entries();for(let t=e.next();!t.done;t=e.next()){const[e,{nodes:n,insertPos:r}]=t.value;Fe._$spliceSlotNodes(e,r,0,n)}}}}}static insertChildSingleOperation(e,t,n,r){var o,i,s,a,l;if(t&&e.ownerShadowRoot!==t.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");let c=n;const u=c>=0?e.childNodes[c]:void 0;let d,h;if(d=!!r&&!!u&&t!==u,!d&&!t)return;if(t){if(h=t.parentNode,h){const n=h.childNodes,r=t.parentIndex;n.splice(r,1);for(let e=r;e<n.length;e+=1)n[e].parentIndex=e;t.parentIndex=-1,h===e&&r<c&&(c-=1);const i=Fe._$updateSubtreeSlotNodes(e,[t],null,Fe._$getParentHostShadowRoot(h),c);null==i||i.removeSlotNodes(),3===e.getBackendMode()||(1===e.getBackendMode()?null===(o=h._$backendElement)||void 0===o||o.removeChild(t._$backendElement,r):Fe.insertChildComposed(h,null,t,!0,r)),null==i||i.updateContainingSlot()}t.parentNode=e,h!==e&&(h&&(null===(i=h._$mutationObserverTarget)||void 0===i||i.detachChild(t)),null===(s=e._$mutationObserverTarget)||void 0===s||s.attachChild(t))}else h=null;const p=Fe._$getParentHostShadowRoot(e),f=t?Fe._$updateSubtreeSlotNodes(e,[t],p,null,c):null,v=u&&d?Fe._$updateSubtreeSlotNodes(e,[u],null,p,c):null;if(null==f||f.updateContainingSlot(),null==v||v.removeSlotNodes(),1===e.getBackendMode()){if(e._$backendElement)if(d)t?e._$backendElement.replaceChild(t._$backendElement,u._$backendElement,c):e._$backendElement.removeChild(u._$backendElement,c);else{const n=e.childNodes[c];n?e._$backendElement.insertBefore(t._$backendElement,n._$backendElement,c):e._$backendElement.appendChild(t._$backendElement)}}else Fe.insertChildComposed(e,t,u,d,c);null==f||f.insertSlotNodes(),null==v||v.updateContainingSlot(),d&&u&&(S(u)&&(null===(a=e._$mutationObserverTarget)||void 0===a||a.detachChild(u)),u.parentNode=null,u.parentIndex=-1);const g=e.childNodes;if(t)if(c<0)g.push(t),t.parentIndex=g.length-1;else if(d)g[c]=t,t.parentIndex=c;else{g.splice(c,0,t);for(let e=c;e<g.length;e+=1)g[e].parentIndex=e}else if(d){g.splice(c,1);for(let e=c;e<g.length;e+=1)g[e].parentIndex=e}const m=t?t._$subtreeSlotStart:null,_=t?t._$subtreeSlotEnd:null,b=u?u._$subtreeSlotStart:null,$=u?u._$subtreeSlotEnd:null;t?(h&&Fe._$updateSubtreeSlotsRemoval(h,m,_,!0),d?Fe._$updateSubtreeSlotsReplacement(e,m,_,b,$,c,!!h):Fe._$updateSubtreeSlotsInsertion(e,m,_,c,!!h)):d&&u&&Fe._$updateSubtreeSlotsRemoval(e,b,$,!1),null===(l=e.ownerShadowRoot)||void 0===l||l._$markIdCacheDirty(),d&&(Fe.checkAndCallDetached(u),Fe.checkChildObservers(e,"remove",u)),t&&((null==h?void 0:h._$attached)?e._$attached?Fe.checkAndCallMoved(t):Fe.checkAndCallDetached(t):e._$attached&&Fe.checkAndCallAttached(t),h===e?Fe.checkChildObservers(e,"move",t):(h&&Fe.checkChildObservers(h,"remove",t),Fe.checkChildObservers(e,"add",t)))}static insertChildBatchRemoval(e,t,n){var r,o;const i=e.childNodes[t];let s=e;for(;null==s?void 0:s._$inheritSlots;)s=s.parentNode;const a=N(s)&&!s._$external?s.shadowRoot:null,l=e.childNodes,c=l.splice(t,n);for(let e=t;e<l.length;e+=1)l[e].parentIndex=e;const u=Fe._$updateSubtreeSlotNodes(e,c,null,a,t);if(null==u||u.removeSlotNodes(),1===e.getBackendMode())e._$backendElement&&e._$backendElement.spliceRemove(i._$backendElement,n);else for(let t=n-1;t>=0;t-=1)Fe.insertChildComposed(e,null,c[t],!0,t);for(let t=0;t<n;t+=1){const n=c[t];n.parentNode=null,n.parentIndex=-1,S(n)&&(null===(r=e._$mutationObserverTarget)||void 0===r||r.detachChild(n))}null==u||u.updateContainingSlot();let d=null,h=null;for(let e=0;e<n;e+=1){const t=c[e];d||(d=t._$subtreeSlotStart),t._$subtreeSlotEnd&&(h=t._$subtreeSlotEnd)}Fe._$updateSubtreeSlotsRemoval(e,d,h,!1),null===(o=e.ownerShadowRoot)||void 0===o||o._$markIdCacheDirty();for(let t=0;t<n;t+=1){const n=c[t];Fe.checkAndCallDetached(n),Fe.checkChildObservers(e,"remove",n)}}static insertChildBatchInsertion(e,t,n){var r,o;const i=n>=0?e.childNodes[n]:void 0,s=n>=0?n:e.childNodes.length;let a=e;for(;null==a?void 0:a._$inheritSlots;)a=a.parentNode;const l=N(a)&&!a._$external?a.shadowRoot:null;let c;c=1===e.getBackendMode()&&t.length>=5?e.getBackendContext().createFragment():null;for(let n=0;n<t.length;n+=1){const o=t[n];if(e.ownerShadowRoot!==o.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");if(o.parentNode)throw new Error("Cannot batch-insert the node which already has a parent.");if(o.parentNode=e,null===(r=e._$mutationObserverTarget)||void 0===r||r.attachChild(o),1===e.getBackendMode()&&c){const e=o._$backendElement;c.appendChild(e)}}const u=Fe._$updateSubtreeSlotNodes(e,t,l,null,n);if(null==u||u.updateContainingSlot(),1===e.getBackendMode()){if(e._$backendElement)if(c)i?e._$backendElement.spliceBefore(i._$backendElement,0,c):e._$backendElement.spliceAppend(c),c.release();else if(i)for(let n=0;n<t.length;n+=1){const r=t[n];e._$backendElement.insertBefore(r._$backendElement,i._$backendElement)}else for(let n=0;n<t.length;n+=1){const r=t[n];e._$backendElement.appendChild(r._$backendElement)}}else{const r=n>=0?n:e.childNodes.length;for(let n=0;n<t.length;n+=1){const o=t[n];Fe.insertChildComposed(e,o,i,!1,r)}}null==u||u.insertSlotNodes();const d=e.childNodes;if(i){d.splice(n,0,...t);for(let e=n;e<d.length;e+=1)d[e].parentIndex=e}else{d.push(...t);for(let e=d.length-t.length;e<d.length;e+=1)d[e].parentIndex=e}let h=null,p=null;for(let e=0;e<t.length;e+=1){const n=t[e],r=n._$subtreeSlotStart,o=n._$subtreeSlotEnd;r&&(p?(r.prev=p,p.next=r,p=o):(h=r,p=o))}Fe._$updateSubtreeSlotsInsertion(e,h,p,s+t.length-1,!1),null===(o=e.ownerShadowRoot)||void 0===o||o._$markIdCacheDirty();for(let n=0;n<t.length;n+=1){const r=t[n];e._$attached&&Fe.checkAndCallAttached(r),Fe.checkChildObservers(e,"add",r)}}static insertChildPlaceholderReplace(e,t,n){var r,o,i,s,a,l;if(n&&e.ownerShadowRoot!==n.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");if(n.parentNode)throw new Error("Cannot replace with the node which already has a parent.");const c=e.childNodes[t];if(!S(c))throw new Error("Cannot replace on text nodes.");if(null!==c._$slotName||null!==n._$slotName)throw new Error("Cannot replace on slot nodes.");if(c===n)return;let u=null;const d=c.childNodes;if(1===e.getBackendMode()&&d.length>0){const e=c._$backendElement;e&&e.spliceRemove(d[0]._$backendElement,d.length)}for(let t=0;t<d.length;t+=1){const i=d[t];if(3===e.getBackendMode());else if(1===e.getBackendMode()){u||(u=e.getBackendContext().createFragment());const t=i._$backendElement;u.appendChild(t)}else Fe.insertChildComposed(c,null,i,!0,t);i.parentNode=n,null===(r=c._$mutationObserverTarget)||void 0===r||r.detachChild(i),null===(o=e._$mutationObserverTarget)||void 0===o||o.attachChild(i)}c.childNodes=[],c.parentNode=null,c.parentIndex=-1,n.parentNode=e;const h=c.containingSlot,p=c.slotIndex;void 0!==h&&(Fe._$updateContainingSlot(n,h),h&&Fe._$spliceSlotNodes(h,p,1,void 0));const f=d.length?Fe._$updateSubtreeSlotNodes(n,d,Fe._$getParentHostShadowRoot(n),Fe._$getParentHostShadowRoot(c),0):null;if(null==f||f.updateContainingSlot(),null==f||f.removeSlotNodes(),e.childNodes[t]=n,n.parentIndex=t,1===e.getBackendMode())e._$backendElement&&(e._$backendElement.replaceChild(n._$backendElement,c._$backendElement,t),u&&(null===(i=n._$backendElement)||void 0===i||i.spliceAppend(u))),u&&u.release();else{Fe.insertChildComposed(e,n,c,!0,t);for(let e=0;e<d.length;e+=1){const t=d[e];Fe.insertChildComposed(n,t,void 0,!1,e)}}null==f||f.insertSlotNodes(),void 0!==h&&(Fe._$updateContainingSlot(c,void 0),h&&Fe._$spliceSlotNodes(h,p,0,[n])),n._$subtreeSlotStart=c._$subtreeSlotStart,n._$subtreeSlotEnd=c._$subtreeSlotEnd,null===(s=e._$mutationObserverTarget)||void 0===s||s.detachChild(c),null===(a=e._$mutationObserverTarget)||void 0===a||a.attachChild(n),n.childNodes.push(...d);for(let e=n.childNodes.length-d.length;e<n.childNodes.length;e+=1)n.childNodes[e].parentIndex=e;if(null===(l=e.ownerShadowRoot)||void 0===l||l._$markIdCacheDirty(),e._$attached){Fe.checkAndCallDetached(c),Fe.checkChildObservers(e,"remove",c),Fe.checkAndCallAttached(n),Fe.checkChildObservers(e,"add",n);for(let t=0;t<d.length;t+=1){const n=d[t];Fe.checkAndCallMoved(n),Fe.checkChildObservers(e,"move",n)}}}appendChild(e){Fe.insertChildSingleOperation(this,e,this.childNodes.length,!1)}insertChildAt(e,t){Fe.insertChildSingleOperation(this,e,t,!1)}insertBefore(e,t){const n=t?t.parentIndex:-1;Fe.insertChildSingleOperation(this,e,n,!1)}removeChildAt(e){Fe.insertChildSingleOperation(this,null,e,!0)}removeChild(e){const t=e.parentIndex;Fe.insertChildSingleOperation(this,null,t,!0)}replaceChildAt(e,t){Fe.insertChildSingleOperation(this,e,t,!0)}replaceChild(e,t){const n=t.parentIndex;Fe.insertChildSingleOperation(this,e,n,!0)}insertChildren(e,t){Fe.insertChildBatchInsertion(this,e,t)}removeChildren(e,t){Fe.insertChildBatchRemoval(this,e,t)}selfReplaceWith(e){const t=this.parentNode;t&&Fe.insertChildPlaceholderReplace(t,this.parentIndex,e)}static _$generateIdMap(e){const t=Object.create(null);return function e(n){if(S(n)){const r=n._$nodeId;r&&(t[r]||(t[r]=n)),n.childNodes.forEach(e)}}(e),t}triggerEvent(e,t,n){Ie.triggerEvent(this,e,t,n)}dispatchEvent(e){Ie.dispatchEvent(this,e)}_$setListenerStats(e,t,n={}){if(!this._$backendElement)return;const r=!!n.capture||!!n.useCapture;let o;switch(t){case 2:o=0;break;case 4:o=1;break;case 3:o=2;break;default:return}this._$nodeTreeContext&&(3===this.getBackendMode()?this._$nodeTreeContext.setListenerStats(this._$backendElement,e,r,o):this._$backendElement.setListenerStats(e,r,o))}addListener(e,t,n){const r=this._$eventTarget.addListener(e,t,n);this._$setListenerStats(e,r,n),N(this)&&this._$definition._$options.listenerChangeLifetimes&&this.triggerLifetime("listenerChange",[!0,e,t,n])}removeListener(e,t,n){const r=this._$eventTarget.removeListener(e,t,n);1!==r&&(this._$setListenerStats(e,r,n),N(this)&&this._$definition._$options.listenerChangeLifetimes&&this.triggerLifetime("listenerChange",[!1,e,t,n]))}getListeners(){return this._$eventTarget.getListeners()}getAttribute(e){return this._$nodeAttributes&&Object.prototype.hasOwnProperty.call(this._$nodeAttributes,e)?this._$nodeAttributes[e]:null}updateAttribute(e,t){this.setAttribute(e,t)}setAttribute(e,t){let n;this._$nodeAttributes?n=this._$nodeAttributes:(n=Object.create(null),this._$nodeAttributes=n),n[e]=t;const r=this._$backendElement;r&&(3===this.getBackendMode()?!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t||null==t?"":String(t)):r.setAttribute(e,t)),this._$mutationObserverTarget&&le.callAttrObservers(this,{type:"properties",target:this,nameType:"attribute",attributeName:e})}removeAttribute(e){this._$nodeAttributes&&delete this._$nodeAttributes[e];const t=this._$backendElement;t&&t.removeAttribute(e),this._$mutationObserverTarget&&le.callAttrObservers(this,{type:"properties",target:this,nameType:"attribute",attributeName:e})}setDataset(e,t){this.dataset[e]=t,this._$backendElement&&1===this.getBackendMode()&&this._$backendElement.setDataset(e,t),this._$mutationObserverTarget&&le.callAttrObservers(this,{type:"properties",target:this,nameType:"dataset",attributeName:`data:${e}`})}setMark(e,t){if(this._$marks)this._$marks[e]=t;else{const n={};n[e]=t,this._$marks=n}this._$mutationObserverTarget&&le.callAttrObservers(this,{type:"properties",target:this,nameType:"mark",attributeName:`mark:${e}`})}collectMarks(){const e={};let t;for(t=this;t;t=t.parentNode){const n=t._$marks;n&&Object.keys(n).forEach((t=>{Object.prototype.hasOwnProperty.call(e,t)||(e[t]=n[t])}))}return e}static replaceDocumentElement(e,t,n){if(e._$attached)throw new Error("An attached element cannot be attached again");e._$backendElement&&t.replaceChild(e._$backendElement,n),Fe.checkAndCallAttached(e)}static pretendAttached(e){e._$attached||Fe.checkAndCallAttached(e)}static pretendDetached(e){e._$attached&&Fe.checkAndCallDetached(e)}static isAttached(e){return e._$attached}static setSlotName(e,t){var n;if(e._$inheritSlots)throw new Error("Slot-inherit mode is not usable in slot element");const r=t?String(t):"",o=e._$slotName;if(o===r)return;const i=null===o;e._$slotName=r,i&&(e._$subtreeSlotStart=e._$subtreeSlotEnd={value:e,prev:null,next:null}),1===e.getBackendMode()&&(null===(n=e._$backendElement)||void 0===n||n.setSlotName(r));const s=e.ownerShadowRoot;if(s)if(i){3===s.getSlotMode()&&(e._$slotValues=Object.create(null)),e.slotNodes=[];const t=e.parentNode;t&&Fe._$updateSubtreeSlotsInsertion(t,e._$subtreeSlotStart,e._$subtreeSlotEnd,e.parentIndex,!1)}else s.isConnected(e)&&s._$applySlotRename(e,r,o);e._$mutationObserverTarget&&le.callAttrObservers(e,{type:"properties",target:e,nameType:"basic",attributeName:"name"})}static getSlotName(e){const t=e._$slotName;return null===t?void 0:t}static setInheritSlots(e){if(!e._$virtual)throw new Error("Cannot set slot-inherit on non-virtual node");if(null!==e._$slotName||0!==e.childNodes.length)throw new Error("Slot-inherit mode cannot be set when the element has any child node");if(1===e.getBackendMode()){const t=e._$backendElement;t&&t.setInheritSlots()}e._$inheritSlots=!0}static getInheritSlots(e){return e._$inheritSlots}isInheritSlots(){return this._$inheritSlots}static setSlotElement(e,t){var n;if(e._$slotElement===t)return;e._$slotElement=t,1===e.ownerShadowRoot.getBackendMode()&&(null===(n=e._$backendElement)||void 0===n||n.setSlotElement(t?t.getBackendElement():null));const r=Fe._$getParentHostShadowRoot(e.parentNode);if(r){const t=Fe._$updateSubtreeSlotNodes(e.parentNode,[e],r,r,e.parentIndex),n=e.containingSlot;null==t||t.updateContainingSlot(),null==t||t.removeSlotNodes();const o=e.containingSlot,i=e=>{if(S(e)&&e._$inheritSlots)for(let t=0;t<e.childNodes.length;t+=1)i(e.childNodes[t]);else Fe.insertChildReassign(e.parentNode,e,n,o,e.parentIndex)};i(e),null==t||t.insertSlotNodes()}}static getSlotElement(e){return e._$slotElement}static _$updateContainingSlot(e,t){e.containingSlot=t}static _$spliceSlotNodes(e,t,n,r){const o=e.slotNodes=e.slotNodes||[],i=t>=0&&t<o.length;if(null==r?void 0:r.length)if(i){for(let e=t;e<t+n;e+=1)o[e].slotIndex=void 0;o.splice(t,n,...r);for(let e=t;e<o.length;e+=1)o[e].slotIndex=e}else{const e=o.length;o.push(...r);for(let t=e;t<o.length;t+=1)o[t].slotIndex=t}else if(n){for(let e=t;e<t+n;e+=1)o[e].slotIndex=void 0;o.splice(t,n);for(let e=t;e<o.length;e+=1)o[e].slotIndex=e}}static _$findSlotNodeInsertPosition(e,t,n){const r=e.ownerShadowRoot.getHostNode(),o=e=>{let t=0,n=e;for(;n&&n!==r;)t+=1,n=n.parentNode;return t},i=o(t),s=(e,t,n,r,o,i,a)=>{if(e===r)return 0;if(e.parentNode===r.parentNode)return t-(-1===o?a:o);if(i<n){const t=e.parentNode;return s(t,t.parentIndex,n-1,r,o,i,a)}const l=n<i?e:e.parentNode,c=n<i?n:n-1,u=r.parentNode,d=i-1,h=s(l,l.parentIndex,c,u,u.parentIndex,d,a);return 0===h?-1:h},a=e.slotNodes;let l=a.length-1;for(;l>=0;l-=1){const e=a[l];if(s(e,e.parentIndex,o(e),t,t.parentIndex,i,n>=0?n-.5:a.length)<0)break}return l+1}getComposedParent(){if(E(this))return this.getHostNode();if(void 0!==this.containingSlot)return this.containingSlot;let e=this.parentNode;for(;null==e?void 0:e._$inheritSlots;)e=e.parentNode;return e}getComposedChildren(){const e=[];return this.forEachComposedChild((t=>{e.push(t)})),e}forEachComposedChild(e){if(this._$inheritSlots)return!0;if(N(this)&&!this._$external)return!1!==e(this.shadowRoot);if(null!==this._$slotName){const t=this.ownerShadowRoot;return!t||t.forEachNodeInSpecifiedSlot(this,e)}const t=n=>{for(let r=0;r<n.length;r+=1){const o=n[r];if(!1===e(o))return!1;if(o._$inheritSlots&&!t(o.childNodes))return!1}return!0};return t(this.childNodes)}*iterateComposedChild(){if(this._$inheritSlots)return;if(N(this)&&!this._$external)return void(yield this.shadowRoot);if(null!==this._$slotName){if(!this.ownerShadowRoot)return;const e=this.slotNodes;for(let t=0;t<e.length;t+=1)yield e[t];return}const e=function*(t){for(let n=0;n<t.length;n+=1){const r=t[n];yield r,r._$inheritSlots&&(yield*e(r.childNodes))}};yield*e(this.childNodes)}forEachNonVirtualComposedChild(e){if(this._$inheritSlots)return!0;const t=t=>t._$virtual?t.forEachNonVirtualComposedChild(e):!1!==e(t);if(N(this)&&!this._$external)return t(this.shadowRoot);if(null!==this._$slotName){const e=this.ownerShadowRoot;return!e||e.forEachSlotContentInSpecifiedSlot(this,t)}const n=e=>{for(let r=0;r<e.length;r+=1){const o=e[r];if(!t(o))return!1;if(o._$inheritSlots&&!n(o.childNodes))return!1}return!0};return n(this.childNodes)}static parseSelector(e){return new Ae(e)}querySelector(e){return(e instanceof Ae?e:new Ae(e)).query(this,!0)}querySelectorAll(e){return(e instanceof Ae?e:new Ae(e)).query(this,!1)}static matchSelector(e,t){return(e instanceof Ae?e:new Ae(e)).testSelector(null,t)}matchSelector(e,t){return(e instanceof Ae?e:new Ae(e)).testSelector(this,t)}getBoundingClientRect(e){var t;const n=this._$backendElement;if(n)if(3===this.getBackendMode()){const r=n,o=(null===(t=r.getBoundingClientRect)||void 0===t?void 0:t.call(r))||{left:0,top:0,width:0,height:0};setTimeout((()=>{e(o)}),0)}else{const t=n;t.getBoundingClientRect?t.getBoundingClientRect(e):setTimeout((()=>{e({left:0,top:0,width:0,height:0})}),0)}else setTimeout((()=>{e({left:0,top:0,width:0,height:0})}),0)}getScrollOffset(e){const t=this._$backendElement;if(t)if(3===this.getBackendMode()){const n=t,r={scrollLeft:n.scrollLeft||0,scrollTop:n.scrollTop||0,scrollWidth:n.scrollWidth||0,scrollHeight:n.scrollHeight||0};setTimeout((()=>{e(r)}),0)}else{const n=t;n.getScrollOffset?n.getScrollOffset(e):setTimeout((()=>{e({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)}else setTimeout((()=>{e({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)}createIntersectionObserver(e,t,n,r){const o=this._$backendElement;if(o){if(e&&!e._$backendElement)return null;if(3===this.getBackendMode()){const i=this._$nodeTreeContext;return i&&i.createIntersectionObserver?i.createIntersectionObserver(o,(null==e?void 0:e._$backendElement)||null,t,n,r):null}const i=o;return i.createIntersectionObserver?i.createIntersectionObserver((null==e?void 0:e._$backendElement)||null,t,n,r):null}return null}createResizeObserver(e,t){const n=this._$backendElement;if(n){if(3===this.getBackendMode()){const r=this._$nodeTreeContext;return r&&r.createResizeObserver?r.createResizeObserver(n,e,t):null}const r=n;return r.createResizeObserver?r.createResizeObserver(e,t):null}return null}getContext(e){const t=this._$backendElement;if(t)if(3===this.getBackendMode()){const n=this._$nodeTreeContext;(null==n?void 0:n.getContext)?n.getContext(t,e):e(null)}else{const n=t;n.getContext?n.getContext(e):e(null)}}}var Ue;Fe.isElement=S,Fe._$getParentHostShadowRoot=e=>{let t=e;for(;null==t?void 0:t._$inheritSlots;)t=t.parentNode;return N(t)&&!t._$external?t.shadowRoot:null},Fe.prototype[g]=!0,function(e){e[e.Ancestor=0]="Ancestor",e[e.Descendant=1]="Descendant",e[e.ParentNonVirtualNode=2]="ParentNonVirtualNode",e[e.ChildNonVirtualNode=3]="ChildNonVirtualNode",e[e.ParentComponent=4]="ParentComponent",e[e.ChildComponent=5]="ChildComponent"}(Ue||(Ue={}));const qe=(e,t,n,r)=>{const o=e=>"function"==typeof e?e:(void 0!==e&&I(`the "${n}" relation listener is not a function (when preparing behavior "${t}").`),null);let i;if("parent"===r.type)i=4;else if("child"===r.type)i=5;else if("parent-common-node"===r.type)i=2;else if("child-common-node"===r.type)i=3;else if("ancestor"===r.type)i=0;else{if("descendant"!==r.type){const e=r.type;return I(`the "${n}" relation has an invalid relation type "${e}" (when preparing behavior "${t}").`),null}i=1}let s=null;if(r.target instanceof $t)s=r.target.behavior;else if(r.target instanceof Et||r.target instanceof G)s=r.target;else{const o=String(r.target||n),i=e.getBehaviorByUrl(o,t);if(i)s=i;else{const t=e.getGlobalUsingComponent(o);s="object"==typeof t&&null!==t?t.behavior:o}}return s?{target:s,type:i,linked:o(r.linked),linkChanged:o(r.linkChanged),unlinked:o(r.unlinked),linkFailed:o(r.linkFailed)}:(I(`the target of relation "${n}" is not a valid behavior or component (when preparing behavior "${t}").`),null)};class Ge{constructor(e,t){this._$comp=e;const n=new Array(6);if(t)for(let e=0;e<6;e+=1){const r=t.definitions[e];if(r){const t=new Array(r.length);for(let e=0;e<r.length;e+=1)t[e]=null;n[e]=t}}this._$group=t,this._$sharedGroup=!0,this._$links=n}add(e){if(this._$sharedGroup){this._$sharedGroup=!1;const e=this._$group;this._$group=e?{definitions:e.definitions.slice(),keyMap:Object.assign(Object.create(null),e.keyMap)}:{definitions:new Array(6),keyMap:Object.create(null)}}const t=Symbol(""),n=this._$group.definitions,r=this._$group.keyMap,o=e.type;n[o]?(r[t]=[o,n[o].length],n[o].push(e)):(r[t]=[o,0],n[o]=[e]);const i=this._$links;return void 0===i[o]?i[o]=[null]:i[o].push(null),t}triggerLinkEvent(e,t){var n,r;const o=this._$comp,i=this._$links,s=null===(n=this._$group)||void 0===n?void 0:n.definitions[e];if(s)for(let n=0;n<s.length;n+=1){const a=i[e],l=a[n];let c=null;const u=s[n],d=u.target;if(!t){let t=o;for(;;){const n=t.parentNode;if(!n)break;if(t=n,!w(t)){if(N(t)){if(t.hasBehavior(d)){const n=t._$relation;if(n){let o;o=4===e?5:0===e?1:3;const i=null===(r=n._$group)||void 0===r?void 0:r.definitions[o];if(i){for(let e=0;e<i.length;e+=1){const n=i[e];if(n.target&&this._$comp.hasBehavior(n.target)){c={target:t,def:n};break}}if(c)break}}}if(4===e)break}if(2===e)break}}}if(a[n]=c,l){const e=l.target,t=l.def;c&&l.target===c.target&&l.def===c.def?(t.linkChanged&&f("Relation Link Changed Callback",t.linkChanged,e.getMethodCaller(),[o.getMethodCaller()],e),u.linkChanged&&f("Relation Link Changed Callback",u.linkChanged,o.getMethodCaller(),[e.getMethodCaller()],o)):(t.unlinked&&f("Relation Unlinked Callback",t.unlinked,e.getMethodCaller(),[o.getMethodCaller()],e),u.unlinked&&f("Relation Unlinked Callback",u.unlinked,o.getMethodCaller(),[e.getMethodCaller()],o))}if(c){const e=c.target,t=c.def;l&&l.target===c.target&&l.def===c.def||(t.linked&&f("Relation Linked Callback",t.linked,e.getMethodCaller(),[o.getMethodCaller()],e),u.linked&&f("Relation Linked Callback",u.linked,o.getMethodCaller(),[e.getMethodCaller()],o))}t||c||!u.linkFailed||f("Relation Link Failed Callback",u.linkFailed,o.getMethodCaller(),[],o)}}getLinkedTargets(e){var t,n,r,o;const i=null===(t=this._$group)||void 0===t?void 0:t.keyMap[e];if(!i)return I(`no relation "${String(e)}" found.`),[];const[s,a]=i;if(4===s||2===s||0===s){const e=null===(n=this._$links[s])||void 0===n?void 0:n[a];return e?[e.target]:[]}const l=[],c=this._$comp,u=null===(o=null===(r=this._$group)||void 0===r?void 0:r.definitions[s])||void 0===o?void 0:o[a],d=e=>{const t=e.childNodes;for(let e=0;e<t.length;e+=1){const n=t[e];if(S(n))if(w(n))d(n);else if(N(n)){if(n._$relation){let e;if(e=5===s?n._$relation._$links[4]:1===s?n._$relation._$links[0]:n._$relation._$links[2],e)for(let t=0;t<e.length;t+=1){const r=e[t];if(r&&r.target===c&&r.def===u){l.push(n);break}}}1===s&&d(n)}else 5!==s&&1!==s||d(n)}};return d(this._$comp),l}}class Ve extends Fe{constructor(){throw new Error("Element cannot be constructed directly")}static create(e,t,n,r){var o,i;const s=Object.create(Ve.prototype);s.is=e,s.stylingName=null!=n?n:e;const a=t.getBackendContext();let l=null;a&&(l=3===t.getBackendMode()?a.document.createElement(e):1===t.getBackendMode()?t._$backendShadowRoot.createElement(e,s.stylingName):a.createElement(e,s.stylingName)),s._$initialize(!1,l,t,t._$nodeTreeContext),s._$placeholderHandlerRemover=r;const u=t.getHostNode(),d=u.getComponentOptions(),h=null!==(o=d.styleScope)&&void 0!==o?o:F.globalScope(),p=null!==(i=d.extraStyleScope)&&void 0!==i?i:void 0,f=u._$behavior.ownerSpace.styleScopeManager;if(s.classList=new U(s,void 0,u.classList,h,p,f),l){if(2===t.getBackendMode()&&l.setStyleScope(h,p),c.writeExtraInfoToAttr){const e=f.queryName(h);e&&l.setAttribute("exparser:info-class-prefix",`${e}--`)}l.__wxElement=s,3!==t.getBackendMode()?l.associateValue(s):t.getBackendContext().associateValue(l,s)}return s}setModelBindingListener(e,t){if(this._$modelBindingListeners||(this._$modelBindingListeners=Object.create(null)),!this._$modelBindingListeners[e]){const t=this.getBackendElement();if(t){const n=t=>{var n;const r=null===(n=this._$modelBindingListeners)||void 0===n?void 0:n[e];r&&r.call(this,t)};3===this.getBackendMode()?this.getBackendContext().setModelBindingStat(t,e,n):t.setModelBindingStat(e,n)}}this._$modelBindingListeners[e]=t}getModelBindingListeners(){const e=Object.create(null);return this._$modelBindingListeners&&Object.keys(this._$modelBindingListeners).forEach((t=>{e[t]=e=>{var n;const r=null===(n=this._$modelBindingListeners)||void 0===n?void 0:n[t];r&&r.call(this,e)}})),e}}Ve.isNativeNode=C,Ve.prototype[m]=!0;class We{constructor(e,t){this._$slotElement=null,this._$destroyOnRemoval=0,this._$subtreeSlotStart=null,this._$subtreeSlotEnd=null,this._$mutationObserverTarget=null,this._$text=String(e);let n=null;const r=t.getBackendContext();r&&(n=3===t.getBackendMode()?r.document.createTextNode(e):1===t.getBackendMode()?t._$backendShadowRoot.createTextNode(e):r.createTextNode(e)),this._$backendElement=n,this.ownerShadowRoot=t,this.parentNode=null,this.parentIndex=-1,this.containingSlot=void 0}static create(e,t){return new We(e,t)}asTextNode(){return this}asElement(){return null}asNativeNode(){return null}asVirtualNode(){return null}asShadowRoot(){return null}asGeneralComponent(){return null}asInstanceOf(){return null}destroyBackendElement(){this._$backendElement&&3!==this.ownerShadowRoot.getBackendMode()&&this._$backendElement.release(),this.ownerShadowRoot._$nodeTreeContext.dropBackendAfterRelease&&(this._$backendElement=null)}destroyBackendElementOnRemoval(){this._$destroyOnRemoval=1}cancelDestroyBackendElementOnRemoval(){this._$destroyOnRemoval=0}destroyBackendElementOnDetach(){this._$destroyOnRemoval=1}cancelDestroyBackendElementOnDetach(){this._$destroyOnRemoval=0}getBackendElement(){return this._$backendElement}getBackendContext(){return this.ownerShadowRoot.getBackendContext()}getComposedParent(){if(void 0!==this.containingSlot)return this.containingSlot;let e=this.parentNode;for(;null==e?void 0:e._$inheritSlots;)e=e.parentNode;return e}get $$(){return this._$backendElement}get textContent(){return this._$text}set textContent(e){const t=String(e);t!==this._$text&&(this._$text=t,this._$backendElement&&(3===this.ownerShadowRoot.getBackendMode()?this._$backendElement.textContent=this._$text:this._$backendElement.setText(this._$text)),this._$mutationObserverTarget&&le.callTextObservers(this,{type:"characterData",target:this}))}}We.isTextNode=y,We.prototype[v]=!0;class He extends Fe{constructor(){throw new Error("Element cannot be constructed directly")}_$initializeVirtual(e,t,n){if(this.is=String(e),n&&1===n.mode){const r=t._$backendShadowRoot.createVirtualNode(e);this._$initialize(!0,r,t,n),r.__wxElement=this,r.associateValue(this)}else this._$initialize(!0,null,t,t._$nodeTreeContext)}static create(e,t){const n=Object.create(He.prototype);return n._$initializeVirtual(e,t,t.getBackendContext()),n}}var ze;He.isVirtualNode=w,He.prototype[_]=!0,function(e){e[e.Single=1]="Single",e[e.Multiple=2]="Multiple",e[e.Dynamic=3]="Dynamic"}(ze||(ze={}));class Ye extends He{constructor(){throw new Error("Element cannot be constructed directly")}static createShadowRoot(e){const t=Object.create(Ye.prototype);let n=null;1===e.getBackendMode()&&(n=e._$backendElement.getShadowRoot()),t.is="shadow",t._$idMap=null;let r=1;const o=e.getComponentOptions();return o.multipleSlots?r=2:o.dynamicSlots&&(r=3),t._$slotMode=r,1===r?t._$singleSlot=null:2===r?(t._$slots=Object.create(null),t._$slotsList=Object.create(null)):3===r&&(t._$dynamicSlotsInserted=!1,t._$dynamicSlots=new Map,t._$requiredSlotValueNames=[],t._$propertyPassingDeepCopy=Ce(o.propertyPassingDeepCopy),t._$insertDynamicSlotHandler=void 0,t._$removeDynamicSlotHandler=void 0,t._$updateDynamicSlotHandler=void 0),t._$backendShadowRoot=n,t._$initialize(!0,n,t,e._$nodeTreeContext),t._$host=e,t._$hooks=e.getOwnerSpace().hooks,e.shadowRoot=t,n&&(n.__wxElement=t,n.associateValue(t)),t}getHostNode(){return this._$host}createTextNode(e=""){return this._$hooks.createTextNode((e=>new We(e,this)),e)}createNativeNode(e){return this._$hooks.createNativeNode(((e,t)=>Ve.create(e,this,t)),e,e)}createVirtualNode(e="virtual"){return He.create(e,this)}createNativeNodeWithInit(e,t,n,r){const o=this._$hooks.createNativeNode(((e,t)=>Ve.create(e,this,t,n)),e,t);return null==r||r(o),o}createComponent(e,t,n,r,o){const i=this._$host,s=i._$behavior,a=i._$genericImpls,l=s.ownerSpace,c=void 0===t?e:t,u=[s._$using[c],a&&a[c]];for(let t=0;t<u.length;t+=1){const c=u[t];if(null==c)continue;if("string"==typeof c)return this.createNativeNodeWithInit(c,e,void 0,o);let d,h;if(c.final)d=c.final;else if(null!==c.placeholder){d=bt(c.placeholder,l,c.source,a);const e=c.waiting;r&&e&&(e.add(r),e.hintUsed(i),h=()=>{e.remove(r)})}if("string"==typeof d)return this.createNativeNodeWithInit(d,e,h,o);if(d)return this._$hooks.createComponent(((e,t)=>Ct._$advancedCreate(e,t,this,null,_t(t,s,i,n),h,o)),e,d)}let d=l.getGlobalUsingComponent(c);if(null===d&&l._$allowUnusedNativeNode&&""!==c&&(d=c),!d){if(d=l.getDefaultComponent(),!d)throw new M(`Cannot find component "${c}"`,void 0,this._$host);I(`Cannot find component "${c}", using default component.`,this._$host)}return"string"==typeof d?this.createNativeNodeWithInit(d,e,void 0,o):this._$hooks.createComponent(((e,t)=>Ct._$advancedCreate(e,t,this,null,_t(t,s,i,n),void 0,o)),e,d)}createComponentByDef(e,t){return this._$hooks.createComponent(((e,t)=>Ct._$advancedCreate(e,t,this,null,null,void 0)),e,t)}createComponentOrNativeNode(e,t,n){const r=this._$host,o=r._$behavior,i=o.ownerSpace,s=i.getGlobalUsingComponent(e);if("string"==typeof s)return this.createNativeNodeWithInit(s,e,void 0,n);if(s)return this._$hooks.createComponent(((e,i)=>Ct._$advancedCreate(e,i,this,null,_t(i,o,r,t),void 0,n)),e,s);if(i._$allowUnusedNativeNode){const t=this._$hooks.createNativeNode((e=>Ve.create(e,this)),e,e);return null==n||n(t),t}throw new M(`Unknown tag name ${e}`,"[render]",r)}checkComponentPlaceholder(e){var t;let n;const r=this._$host._$behavior._$using[e];if(void 0!==r)n=r;else{const r=null===(t=this._$host._$genericImpls)||void 0===t?void 0:t[e];if(!r)return;n=r}return"string"!=typeof n&&!n.final&&null!==n.placeholder}getElementById(e){return this._$getIdMap()[e]}_$markIdCacheDirty(){this._$idMap=null}_$getIdMap(){if(this._$idMap)return this._$idMap;const e=Fe._$generateIdMap(this);return this._$idMap=e,e}getSlotElementFromName(e){const t=this._$slotMode;if(1===t)return this._$singleSlot;if(2===t)return this._$slots[e]||null;if(3===t){const t=[];for(let n=this._$subtreeSlotStart;n;n=n.next){const r=n.value;(r._$slotName||"")===e&&t.push(r)}return t}return null}getContainingSlot(e){var t;const n=this._$slotMode;if(1===n)return this._$singleSlot;if(3===n){if(!e)return null;let n=e;for(;null===(t=n.parentNode)||void 0===t?void 0:t._$inheritSlots;)n=n.parentNode;const r=n._$slotElement;if((null==r?void 0:r.ownerShadowRoot)===this)return r}if(2===n){let t;return t=S(e)?e._$nodeSlot:"",this._$slots[t]||null}return null}getSlotContentArray(e){if(null===e._$slotName)return null;const t=[];return this.forEachNodeInSpecifiedSlot(e,(e=>{t.push(e)})),t}forEachSlot(e){const t=this._$slotMode;if(1===t)this._$singleSlot&&e(this._$singleSlot);else if(2===t){const t=Object.values(this._$slots);for(let n=0;n<t.length&&!1!==e(t[n]);n+=1);}else if(3===t)for(let t=this._$subtreeSlotStart;t&&!1!==e(t.value);t=t.next);}forEachNodeInSlot(e){const t=this._$host.childNodes;for(let n=0;n<t.length;n+=1)if(!Fe.forEachNodeInSlot(t[n],e))return!1;return!0}forEachNodeInSpecifiedSlot(e,t){if(e){const n=e.slotNodes;for(let e=0;e<n.length;e+=1){const r=n[e];if(!1===t(r))return!1}return!0}return this.forEachNodeInSlot(((e,n)=>null!==n||t(e)))}forEachSlotContentInSlot(e){const t=this._$host.childNodes;for(let n=0;n<t.length;n+=1)if(!Fe.forEachSlotContentInSlot(t[n],e))return!1;return!0}forEachSlotContentInSpecifiedSlot(e,t){if(e){const n=e.slotNodes;for(let e=0;e<n.length;e+=1){const r=n[e];if(!r._$inheritSlots&&!1===t(r))return!1}return!0}return this.forEachSlotContentInSlot(((e,n)=>null!==n||t(e)))}isConnected(e){if(e.ownerShadowRoot!==this)return!1;for(let t=e;t;t=t.parentNode)if(t===this)return!0;return!1}_$applyMultipleSlotInsertion(e,t,n){const r=this._$slotsList,o=this._$slots;if(r[t]){const n=r[t];let o={next:n},i=!0;for(let t=this._$subtreeSlotStart;t&&o.next&&t.value!==e;t=t.next)t.value===o.next.value&&(i=!1,o=o.next);if(i)r[t]=n.prev={value:e,prev:null,next:n};else{const t=o.next;o.next={value:e,prev:o,next:t},t&&(t.prev=o.next)}}else r[t]={value:e,prev:null,next:null};const i=o[t],s=r[t].value;i!==s&&(o[t]=s,Fe._$insertChildReassignSlot(this,t,i||null,s))}_$applyMultipleSlotsRemoval(e,t,n){const r=this._$slotsList,o=this._$slots;let i=r[t]||null;for(;i&&i.value!==e;i=i.next);if(!i)return;const s=i.prev,a=i.next;if(s&&(s.next=a),a&&(a.prev=s),s)return;const l=a;if(l){const i=l.value;r[t]=l,n||(o[t]=i,Fe._$insertChildReassignSlot(this,t,e,i))}else delete r[t],n||(delete o[t],Fe._$insertChildReassignSlot(this,t,e,null))}_$applySlotRename(e,t,n){const r=this._$slotMode;if(1!==r){if(2===r)return this._$applyMultipleSlotsRemoval(e,n,!1),void this._$applyMultipleSlotInsertion(e,t,!1);if(3===r){if(!this._$dynamicSlotsInserted)return;const n=this._$insertDynamicSlotHandler,r=this._$removeDynamicSlotHandler;this._$dynamicSlots.set(e,{updatePathTree:void 0}),null==r||r([e]),null==n||n([{slot:e,name:t,slotValues:e._$slotValues}])}}}_$applySlotsInsertion(e,t,n){const r=this._$slotMode;if(1===r){const e=this._$singleSlot,t=this._$subtreeSlotStart.value;if(e===t)return;return this._$singleSlot=t,void Fe._$insertChildReassignSlot(this,null,e,t)}if(2!==r){if(3===r){if(n)return;if(!this._$dynamicSlotsInserted)return;const r=this._$insertDynamicSlotHandler,o=[];for(let n=e;n&&n!==t.next;n=n.next){const e=n.value,t=e._$slotName;this._$dynamicSlots.set(e,{updatePathTree:void 0}),o.push({slot:e,name:t,slotValues:e._$slotValues})}null==r||r(o)}}else for(let r=e;r&&r!==t.next;r=r.next){const e=r.value,t=e._$slotName;this._$applyMultipleSlotInsertion(e,t,n)}}_$applySlotsRemoval(e,t,n){var r;const o=this._$slotMode;if(1===o){if(n)return;const e=this._$singleSlot,t=(null===(r=this._$subtreeSlotStart)||void 0===r?void 0:r.value)||null;if(e===t)return;return this._$singleSlot=t,void Fe._$insertChildReassignSlot(this,null,e,t)}if(2!==o){if(3===o){if(n)return;if(!this._$dynamicSlotsInserted)return;const r=this._$removeDynamicSlotHandler,o=[];for(let n=e;n&&n!==t.next;n=n.next){const e=n.value;this._$dynamicSlots.delete(e),o.push(e)}null==r||r(o)}}else for(let r=e;r&&r!==t.next;r=r.next){const e=r.value,t=e._$slotName;this._$applyMultipleSlotsRemoval(e,t,n)}}setDynamicSlotHandler(e,t,n,r){if(3===this._$slotMode&&(this._$requiredSlotValueNames=e,this._$insertDynamicSlotHandler=t,this._$removeDynamicSlotHandler=n,this._$updateDynamicSlotHandler=r,this._$dynamicSlotsInserted)){const e=this._$dynamicSlots.values();for(let t=e.next();!t.done;t=e.next()){const e=t.value;e.updatePathTree=e.updatePathTree||Object.create(null)}}}useDynamicSlotHandlerFrom(e){e._$insertDynamicSlotHandler&&this.setDynamicSlotHandler(e._$requiredSlotValueNames.slice(),e._$insertDynamicSlotHandler,e._$removeDynamicSlotHandler,e._$updateDynamicSlotHandler)}replaceSlotValue(e,t,n){var r;const o=e._$slotValues;if(!o)return;const i=o[t];let s=n;if(0!==this._$propertyPassingDeepCopy&&(s=2===this._$propertyPassingDeepCopy?se(n,!0):ie(n)),i===s)return;if(o[t]=s,e._$mutationObserverTarget&&le.callAttrObservers(e,{type:"properties",target:e,nameType:"slot-value",propertyName:t}),this._$requiredSlotValueNames.indexOf(t)<0)return;const a=null===(r=this._$dynamicSlots)||void 0===r?void 0:r.get(e);a&&(a.updatePathTree||(a.updatePathTree=Object.create(null)),a.updatePathTree[t]=!0)}applySlotValueUpdates(e){var t,n;const r=null===(t=this._$dynamicSlots)||void 0===t?void 0:t.get(e),o=null==r?void 0:r.updatePathTree;o&&(r.updatePathTree=void 0,null===(n=this._$updateDynamicSlotHandler)||void 0===n||n.call(this,e,e._$slotValues,o))}applySlotUpdates(){var e;if(this._$dynamicSlotsInserted){const t=this._$dynamicSlots.entries();for(let n=t.next();!n.done;n=t.next()){const[t,r]=n.value,o=r.updatePathTree;o&&(r.updatePathTree=void 0,null===(e=this._$updateDynamicSlotHandler)||void 0===e||e.call(this,t,t._$slotValues,o))}}else{this._$dynamicSlotsInserted=!0;const e=this._$insertDynamicSlotHandler,t=[];for(let e=this._$subtreeSlotStart;e;e=e.next){const n=e.value,r=n._$slotName;this._$dynamicSlots.set(n,{updatePathTree:void 0}),t.push({slot:n,name:r,slotValues:n._$slotValues})}null==e||e(t)}}getSlotMode(){return this._$slotMode}}Ye.isShadowRoot=E,Ye.prototype[b]=!0;class Qe{constructor(e,t,n,r,o){this.ownerShadowRoot=r,this.elem=n,this.keyName=e,this.updateKeys(t);const i=this.items,s=this.indexes,a=[];for(let e=0;e<i.length;e+=1){const t=i[e],n=null===s?e:s[e];a.push(o(t,n))}n.insertChildren(a,-1)}updateKeys(e){let t,n;if(Array.isArray(e))t=e,n=null;else if("object"==typeof e&&null!==e){const r=Object.keys(e);t=new Array(r.length),n=new Array(r.length);for(let o=0;o<r.length;o+=1){const i=r[o],s=e[i];t[o]=s,n[o]=i}}else if("string"==typeof e){I("Use string as for-list is generally for testing. Each character is treated as an item.",this.ownerShadowRoot.getHostNode(),this.elem),t=new Array(e.length),n=null;for(let n=0;n<e.length;n+=1)t[n]=e[n]}else if("number"==typeof e){I("Use number as for-list is generally for testing. The number is used as the repeated times of the item.",this.ownerShadowRoot.getHostNode(),this.elem);const r=Number.isSafeInteger(e)&&e>=0&&e<Math.pow(2,32)?e:0;t=new Array(r),n=null;for(let e=0;e<r;e+=1)t[e]=e}else I(`The for-list data is neither Array nor Object, got type "${null===e?"null":typeof e}".`,this.ownerShadowRoot.getHostNode(),this.elem),t=[],n=null;this.items=t,this.indexes=n;const r=this.keyName,o=new Array(t.length),i=Object.create(null);let s;if(null!==r){for(let e=0;e<t.length;e+=1){const n=t[e],a="*this"===r?n:null==n?void 0:n[r],l=null!=a?String(a):"";o[e]=l,(null==s?void 0:s[l])?s[l].push(e):void 0!==i[l]?(s||(s=Object.create(null)),s[l]=[i[l],e]):i[l]=e}if(s){const e=Object.keys(s);I(`Some keys are not unique while list updates: "${e.join('", "')}".`,this.ownerShadowRoot.getHostNode(),this.elem);for(let t=0;t<e.length;t+=1){const n=e[t],r=s[n];let a=0;for(let e=1;e<r.length;e+=1){const t=r[e];for(;void 0!==i[`${n}--${a}`];)a+=1;const s=`${n}--${a}`;i[s]=t,o[t]=s}}}}this.rawKeys=o,this.keyMap=i,this.sharedKeyMap=s}diff(e,t,n,r,o){const i=this.rawKeys,s=this.keyMap,a=this.sharedKeyMap,l=this.indexes;this.updateKeys(e);const c=this.rawKeys,u=this.sharedKeyMap,d=this.items,h=this.indexes,p=this.keyName,f="object"==typeof t&&Array.isArray(Object.getPrototypeOf(t));let v,g;if(!0===t)g=!0,v=null===p;else if(void 0===t)g=t,v=!0;else if(null===p)g=!0,v=!0;else{let e=!1;if(f)e=!0;else{const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=t[n[r]];if(!0===o||("*this"===p?o:null==o?void 0:o[p])){e=!0;break}}}if(e){g=new Array(c.length);for(let e=0;e<c.length;e+=1){const n=c[e];let r=!1;if(a||u)if(void 0!==(null==a?void 0:a[n])||void 0!==(null==u?void 0:u[n]))r=!0;else{const e=n.lastIndexOf("--");if(e>=0){const t=n.slice(0,e);void 0===(null==a?void 0:a[t])&&void 0===(null==u?void 0:u[t])||(r=!0)}}if(r)g[e]=!0;else{const n=t[e];void 0===n||(!0===n||("*this"===p?n:null==n?void 0:n[p])?g[e]=!0:g[e]=n)}}v=!1}else g=t,v=!1}if(v){let e;e=!!f||t;let s=0;for(;s<i.length&&s<c.length;){const t=d[s],r=null===h?s:h[s],i=null===l?s:l[s];o(t,r,!0===e||void 0===e?e:e[r],r!==i,n.childNodes[s]),s+=1}if(s<i.length)n.removeChildren(s,i.length-s);else if(s<c.length){const e=[];for(;s<c.length;s+=1){const t=d[s],n=null===h?s:h[s];e.push(r(t,n))}n.insertChildren(e,-1)}return}const m=[],_=[],b=new Array(c.length),$=new Array(c.length);let y=-1,S=-1;for(let e=0;e<c.length;e+=1){const t=c[e];if(i[y+1]===t){y+=1,S+=1,m[S]=y,_[S]=e,b[e]=S>0?_[S-1]:-1,$[e]=y;continue}const n=s[t];if(void 0===n){$[e]=-1;continue}let r=0,o=m.length;for(;r<o;){const e=Math.floor((r+o)/2);n<m[e]?o=e:r=e+1}m[o]=n,_[o]=e,b[e]=o>0?_[o-1]:-1,$[e]=n,y=n,S=o}const C=_.length;if(C===c.length&&C===i.length){let e=0;for(;e<i.length&&e<c.length;){const t=d[e],r=null===h?e:h[e],i=null===l?e:l[e];o(t,r,!0===g||void 0===g?g:g[e],r!==i,n.childNodes[e]),e+=1}return}let w=C>0?_[C-1]:-1,E=C;for(;-1!==w;)E-=1,m[E]=w,w=b[w];const N=m;let k;!function(e){e[e.Stable=0]="Stable",e[e.ForwardMove=1]="ForwardMove",e[e.BackwardMove=2]="BackwardMove"}(k||(k={}));const O=new Array(i.length),P=new Array(c.length);let x=-1;for(let e=0;e<$.length;e+=1){const t=$[e];if(e!==N[E])if(-1!==t)O[t]=t>x?2:1,P[e]=n.childNodes[t];else{const t=d[e],n=null===h?e:h[e];P[e]=r(t,n)}else x=t,E+=1,O[t]=0}let T=0,I=0,M=0;E=0;do{const e=E<N.length?N[E]:P.length,t=E<N.length?$[e]:O.length;for(;I<t;)if(void 0===O[I]){const e=I;I+=1;let r=1;for(;I<t&&void 0===O[I];)I+=1,r+=1;n.removeChildren(e+T,r),T-=r}else 2===O[I]&&(T-=1),I+=1;for(;M<e;){const r=P[M],i=$[M];if(-1===i){const r=M;M+=1;let o=1;for(;M<e&&-1===$[M];)M+=1,o+=1;n.insertChildren(P.slice(r,r+o),t+T),T+=o}else{r&&n.insertChildAt(r,t+T);const e=d[M],s=null===h?M:h[M],a=null===l?i:l[i];o(e,s,!0===g||void 0===g?g:g[M],s!==a,r),2===O[i]&&(T+=1),M+=1}}if(E<N.length){const r=d[e],i=null===h?e:h[e],s=null===l?t:l[t];o(r,i,!0===g||void 0===g?g:g[e],i!==s,n.childNodes[t+T])}I=t+1,M=e+1,E+=1}while(E<=N.length)}}const Ke=e=>e,Xe=(e,t,n)=>t=>{var r;return n.call(null===(r=e.ownerShadowRoot)||void 0===r?void 0:r.getHostNode().getMethodCaller(),t)},Ze=e=>{const t=e;return t._$wxTmplArgs=t._$wxTmplArgs||{}},Je=e=>null==e?"":String(e),et=e=>e.replace(/-(.|$)/g,(e=>e[1]?e[1].toUpperCase():""));class tt{constructor(e,t,n){this.bindingMapDisabled=!1,this.changePropFilter=Ke,this.eventListenerWrapper=Xe,this.s=(e,t)=>{e.slot=t,this.tryCallPropertyChangeListener(e,"slot",t)},this.l=(e,t,n,r)=>{var o;3===this.shadowRoot.getSlotMode()?this.shadowRoot.replaceSlotValue(e,t,n):this.checkFallbackEventListener(e,t,n,r)||I(`"${t}" is not a valid event binding or slot value`,null===(o=e.ownerShadowRoot)||void 0===o?void 0:o.getHostNode(),e),this.tryCallPropertyChangeListener(e,t,n)},this.i=(e,t)=>{e.id=t,this.tryCallPropertyChangeListener(e,"id",t)},this.c=(e,t)=>{N(e)&&e.hasExternalClass("class")&&e.setExternalClass("class",t),e.setNodeClass(t),this.tryCallPropertyChangeListener(e,"class",t)},this.e=(e,t)=>{const n=Ze(e);n.staticClasses||(n.staticClasses=new Array(t.length));const r=n.staticClasses;for(let e=0;e<t.length;e+=1){const n=t[e];"string"==typeof n&&(r[e]=n)}this.applyClassListUpdates(e)},this.ei=(e,t,n)=>{const r=Ze(e);r.staticClasses||(r.staticClasses=[]),r.staticClasses[t]=n,r.staticClassesDirty=!0},this.y=(e,t)=>{N(e)&&Ct.getDataProxy(e).replaceProperty("style",t)||e.setNodeStyle(Je(t),0),this.tryCallPropertyChangeListener(e,"style",t)},this.w=(e,t)=>{const n=Ze(e);n.styleNameValues||(n.styleNameValues=new Array(t.length));const r=n.styleNameValues;for(let e=0;e<t.length;e+=2){const n=t[e+1];"string"==typeof n&&(r[e]=t[e],r[e+1]=n)}this.applyStyleListUpdates(e)},this.wi=(e,t,n)=>{const r=Ze(e);r.styleNameValues||(r.styleNameValues=[]),r.styleNameValues[2*t+1]=n,r.styleNameValuesDirty=!0},this.d=(e,t,n,r)=>{if(r&&N(e)){const r=Ct.getDataProxy(e),i=`data${t[0].toUpperCase()}${t.slice(1)}`;if(r.replaceProperty(i,n));else{const i=`data-${o=t,o.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}`;e.hasExternalClass(i)?e.setExternalClass(i,n):r.replaceProperty(i,n)||e.setDataset(t,n)}this.tryCallPropertyChangeListener(e,t,n)}else e.setDataset(t,n);var o},this.m=(e,t,n)=>{e.setMark(t,n)},this.v=(e,t,n,r,o,i,s,a)=>{const l="function"==typeof n?n:Je(n),c=this.eventListenerWrapper(e,t,(function(...t){const n=e.ownerShadowRoot.getHostNode(),r="function"==typeof l?l:Ct.getMethod(n,l);if("function"==typeof r)return r.call(this,...t)}),r,o,i,a);c&&Object.defineProperty(c,"name",{value:"string"==typeof l?l:l.name});const u={final:r,mutated:o,capture:i};if(s){const n=Ze(e);n.dynEvListeners||(n.dynEvListeners={});const r=n.dynEvListeners;r[t]&&e.removeListener(t,r[t],u),r[t]=c}l&&c&&e.addListener(t,c,u)},this.r=(e,t,n,r,o)=>{var i;if(N(e)){const s=Ct.getDataProxy(e),a=et(t);s.replaceProperty(a,n)?void 0!==r&&(null===r?s.setModelBindingListener(a,(()=>{})):s.setModelBindingListener(a,(t=>{const n=e.ownerShadowRoot.getHostNode(),o=Ct.getDataProxy(n);o.replaceDataOnPath(r,t),o.applyDataUpdates(!1)}))):e.hasExternalClass(t)?e.setExternalClass(t,n):this.checkFallbackEventListener(e,a,n,o)||I(`"${a}" is not a valid property`,null===(i=e.ownerShadowRoot)||void 0===i?void 0:i.getHostNode(),e)}else if(C(e)){if(this.fallbackListenerOnNativeNode){const r=et(t);this.checkFallbackEventListener(e,r,n,o)||e.updateAttribute(t,n)}else e.updateAttribute(t,n);r&&e.setModelBindingListener(t,(t=>{const n=e.ownerShadowRoot.getHostNode(),o=Ct.getDataProxy(n);o.replaceDataOnPath(r,t),o.applyDataUpdates(!1)}))}this.tryCallPropertyChangeListener(e,t,n)},this.a=(e,t,n)=>{e.updateAttribute(t,n),this.tryCallPropertyChangeListener(e,t,n)},this.wl=(e,t,n)=>{N(e)&&e.triggerWorkletChangeLifetime(t,n)},this.p=(e,t,n,r)=>{const o=Ze(e);o.changeProp||(o.changeProp=Object.create(null)),o.changeProp[t]={listener:this.changePropFilter(n,r,e,t),oldValue:void 0}},this.shadowRoot=e,this.procGen=t,this.fallbackListenerOnNativeNode=n}create(e){const{shadowRoot:t,procGen:n}=this,r=n(this,!0,e);return this.handleChildrenCreationAndInsert(r.C,t,void 0,void 0),r.B}update(e,t){const{shadowRoot:n,procGen:r}=this,o=r(this,!1,e,t);this.handleChildrenUpdate(o.C,n,void 0,void 0)}endBindingMapUpdateForElement(e){const t=e._$wxTmplArgs;t&&(t.staticClassesDirty&&(t.staticClassesDirty=!1,this.applyClassListUpdates(e)),t.styleNameValuesDirty&&(t.styleNameValuesDirty=!1,this.applyStyleListUpdates(e))),N(e)&&e.hasPendingChanges()&&Ct.getDataProxy(e).applyDataUpdates(!0)}bindingMapUpdate(e,t,n){if(this.bindingMapDisabled)return!1;const r=n[e];if(!r)return!1;let o=null;for(let e=0;e<r.length;e+=1)(0,r[e])(t,(e=>{null!==o&&e!==o&&this.endBindingMapUpdateForElement(o),o=e}),((e,t)=>{e.textContent=t}));const i=o;return null!==i&&this.endBindingMapUpdateForElement(i),!0}handleChildrenCreation(e,t,n){const r=[];return e(!0,((e,o)=>{if(t&&""!==n){const e=this.createDynamicPlaceholder(t);return void r.push(e)}const i=this.shadowRoot.createTextNode(e);i.destroyBackendElementOnRemoval(),t&&Fe.setSlotElement(i,t),o&&o(i),r.push(i)}),((e,o,i,s,a,l)=>{if(t&&n!==(a||"")){const e=this.createDynamicPlaceholder(t);return void r.push(e)}const c=this.createCommonElement(e,o,i,s,l);t?(Fe.setSlotElement(c,t),Ze(c).dynamicSlotNameMatched=!0):void 0!==a&&(c.slot=a),r.push(c)}),((e,o)=>{const i=this.shadowRoot.createVirtualNode("wx:if");i.destroyBackendElementOnRemoval(),Fe.setInheritSlots(i),t&&Fe.setSlotElement(i,t),Ze(i).key=e,this.handleChildrenCreationAndInsert(o,i,t,n),r.push(i)}),((e,o,i,s,a)=>{const l=this.shadowRoot,c=l.createVirtualNode("wx:for");c.destroyBackendElementOnRemoval(),Fe.setInheritSlots(c),t&&Fe.setSlotElement(c,t),Ze(c).keyList=new Qe(o,e,c,l,((e,r)=>{const o=l.createVirtualNode("wx:for-item");return o.destroyBackendElementOnRemoval(),Fe.setInheritSlots(o),t&&Fe.setSlotElement(c,t),this.handleChildrenCreationAndInsert(((t,n,o,i,l,c,u)=>{a(!0,e,r,void 0,void 0,s?[...s,r]:null,n,o,i,l,c,u)}),o,t,n),o})),r.push(c)}),((e,n,o)=>{const i=this.shadowRoot.createVirtualNode("slot");i.destroyBackendElementOnRemoval(),Fe.setSlotName(i,Je(e)),t?Fe.setSlotElement(i,t):void 0!==o&&(i.slot=o),n&&n(i),r.push(i)}),((e,o)=>{if(void 0!==o)if(t)if(n===o){const n=this.shadowRoot.createVirtualNode("virtual");n.destroyBackendElementOnRemoval(),Fe.setSlotElement(n,t),Ze(n).dynamicSlotNameMatched=!0,this.handleChildrenCreationAndInsert(e,n,void 0,void 0),r.push(n)}else{const e=this.createDynamicPlaceholder(t);r.push(e)}else{const t=this.shadowRoot.createVirtualNode("virtual");t.destroyBackendElementOnRemoval(),t.slot=o,this.handleChildrenCreationAndInsert(e,t,void 0,void 0),r.push(t)}else{const o=this.shadowRoot.createVirtualNode("virtual");o.destroyBackendElementOnRemoval(),Fe.setInheritSlots(o),t&&Fe.setSlotElement(o,t),this.handleChildrenCreationAndInsert(e,o,t,n),r.push(o)}}),void 0,void 0),r}handleChildrenCreationAndInsert(e,t,n,r){const o=this.handleChildrenCreation(e,n,r);o.length&&t.insertChildren(o,-1)}handleChildrenUpdate(e,t,n,r){let o=0;const i=n?n.slotNodes.filter((e=>e.parentNode===t)):t.childNodes;e(!1,(e=>{const t=i[o];if(o+=1,t){if(n&&!Ze(t).dynamicSlotNameMatched)return;void 0!==e&&(t.textContent=e)}}),((e,s,a,l,c,u)=>{const d=i[o];if(o+=1,!d)return;if(n){const o=Ze(d);if(r!==(c||"")){if(o.dynamicSlotNameMatched){const e=this.createDynamicPlaceholder(n);t.replaceChild(e,d)}return}if(!o.dynamicSlotNameMatched){const r=this.createCommonElement(e,s,a,l,u);return Fe.setSlotElement(r,n),Ze(r).dynamicSlotNameMatched=!0,void t.replaceChild(r,d)}}a(d,!1);let h=!1;if(N(d)){const e=this.dynamicSlotUpdate(d,u,l);e&&(h=!0),d.hasPendingChanges()&&Ct.getDataProxy(d).applyDataUpdates(!0),null==e||e.applySlotUpdates()}n||void 0!==c&&(d.slot=c),h||this.handleChildrenUpdate(l,d,void 0,void 0)}),((e,s)=>{const a=i[o];if(o+=1,!a)return;const l=Ze(a);if(l.key===e)this.handleChildrenUpdate(s,a,n,r);else{const i=this.shadowRoot.createVirtualNode("wx:if");i.destroyBackendElementOnRemoval(),Fe.setInheritSlots(i),n&&Fe.setSlotElement(i,n);const c=Ze(i);l.key=c.key=e,this.handleChildrenCreationAndInsert(s,i,n,r),n?t.replaceChild(i,a):t.replaceChildAt(i,o-1)}}),((e,t,s,a,l)=>{const c=i[o];o+=1,c&&Ze(c).keyList.diff(e,s,c,((e,t)=>{const o=this.shadowRoot.createVirtualNode("wx:for-item");return o.destroyBackendElementOnRemoval(),Fe.setInheritSlots(o),n&&Fe.setSlotElement(c,n),this.handleChildrenCreationAndInsert(((n,r,o,i,s,c,u)=>{l(!0,e,t,void 0,void 0,a?[...a,t]:null,r,o,i,s,c,u)}),o,n,r),o}),((e,t,o,i,s)=>{s&&this.handleChildrenUpdate(((n,r,s,c,u,d,h)=>{l(!1,e,t,o,!!i||void 0,a?[...a,t]:null,r,s,c,u,d,h)}),s,n,r)}))}),((e,t,r)=>{const s=i[o];o+=1,s&&(void 0!==e&&Fe.setSlotName(s,Je(e)),n||void 0!==r&&(s.slot=r),t&&t(s),this.shadowRoot.applySlotValueUpdates(s))}),((e,s)=>{const a=i[o];if(o+=1,a)if(void 0!==s)if(n){const o=Ze(a);if(r===s)if(o.dynamicSlotNameMatched)this.handleChildrenUpdate(e,a,void 0,void 0);else{const r=this.shadowRoot.createVirtualNode("virtual");r.destroyBackendElementOnRemoval(),Fe.setSlotElement(r,n),Ze(r).dynamicSlotNameMatched=!0,this.handleChildrenCreationAndInsert(e,r,void 0,void 0),t.replaceChild(r,a)}else if(o.dynamicSlotNameMatched){const e=this.createDynamicPlaceholder(n);t.replaceChild(e,a)}}else a.slot=s,this.handleChildrenUpdate(e,a,void 0,void 0);else this.handleChildrenUpdate(e,a,n,r)}),void 0,void 0)}dynamicSlotUpdate(e,t,n){const r=e.getShadowRoot();return 3===(null==r?void 0:r.getSlotMode())?(r.setDynamicSlotHandler(t||[],(t=>{const r=[];for(let e=0;e<t.length;e+=1){const{slot:o,name:i,slotValues:s}=t[e],a=this.handleChildrenCreation(((e,t,r,o,i,a,l)=>{n(!0,t,r,o,i,a,l,s,void 0)}),o,i);r.push(...a)}r.length&&e.insertChildren(r,-1)}),(t=>{if(!t.length)return;const n=[];for(let e=0;e<t.length;e+=1)t[e].slotNodes.length&&n.push(t[e]);n.sort(((e,t)=>e.slotNodes[0].parentIndex-t.slotNodes[0].parentIndex));let r=0,o=0;for(let t=0;t<n.length;t+=1){const i=n[t].slotNodes,s=i[0].parentIndex;let a=s;for(let t=i.length-1;t>0;t-=1)if(i[t].parentNode===e){a=i[t].parentIndex;break}o!==s&&(r>=0&&e.removeChildren(r,o-r),r=s),o=a+1}r!==o&&e.removeChildren(r,o-r)}),((t,r,o)=>{const i=t._$slotName||"";this.handleChildrenUpdate(((e,t,i,s,a,l,c)=>{n(!1,t,i,s,a,l,c,r,o)}),e,t,i)})),r):null}createDynamicPlaceholder(e){const t=this.shadowRoot.createVirtualNode("virtual");return t.destroyBackendElementOnRemoval(),Fe.setSlotElement(t,e),Ze(t).dynamicSlotNameMatched=!1,t}checkFallbackEventListener(e,t,n,r){if(t.startsWith("bind"))this.v(e,t.slice(4),n,!1,!1,!1,!0,r);else if(t.startsWith("captureBind"))this.v(e,t.slice(11),n,!1,!1,!0,!0,r);else if(t.startsWith("catch"))this.v(e,t.slice(5),n,!0,!1,!1,!0,r);else if(t.startsWith("captureCatch"))this.v(e,t.slice(12),n,!0,!1,!0,!0,r);else{if(!t.startsWith("on"))return!1;this.v(e,t.slice(2),n,!1,!1,!1,!0,r)}return!0}createCommonElement(e,t,n,r,o){let i=!1;const s=e=>{const t=N(e)?this.dynamicSlotUpdate(e,o,r):null;t&&(i=!0),n(e,!0),N(e)&&(e.hasPendingChanges()&&Ct.getDataProxy(e).applyDataUpdates(!0),null==t||t.applySlotUpdates())},a=this.shadowRoot.createComponent(e,e,t,(()=>{var n;const r=this.shadowRoot.createComponent(e,e,t,void 0,s);r.destroyBackendElementOnRemoval();const o=r.getShadowRoot(),i=N(a)?a.getShadowRoot():null,l=3===(null==i?void 0:i.getSlotMode()),c=3===(null==o?void 0:o.getSlotMode());c!==l?T(new Error(`The "dynamicSlots" option of component <${r.is}> and its placeholder <${a.is}> should be the same.`),"[render]",N(r)?r:r.is):c?null===(n=a.parentNode)||void 0===n||n.replaceChild(r,a):a.selfReplaceWith(r)}),s);return a.destroyBackendElementOnRemoval(),i?this.bindingMapDisabled=!0:this.handleChildrenCreationAndInsert(r,a,void 0,void 0),a}tryCallPropertyChangeListener(e,t,n){var r;const o=Ze(e);if(null===(r=o.changeProp)||void 0===r?void 0:r[t]){const r=o.changeProp[t],i=r.oldValue;if(i!==n){r.oldValue=n;const t=e.ownerShadowRoot.getHostNode();f("Property Change Observer",r.listener,null,[n,i,t,e],t)}}}applyClassListUpdates(e){const t=Ze(e).staticClasses;e.setNodeClassList(t),this.tryCallPropertyChangeListener(e,"class",t)}applyStyleListUpdates(e){const t=Ze(e).styleNameValues;let n="";for(let e=0;e<t.length;e+=2)n+=`${t[e]}:${t[e+1]};`;N(e)&&Ct.getDataProxy(e).replaceProperty("style",n)||e.setNodeStyle(Je(n),0),this.tryCallPropertyChangeListener(e,"style",n)}setFnFilter(e){this.changePropFilter=e}setEventListenerWrapper(e){"function"==typeof e&&(this.eventListenerWrapper=e)}devArgs(e){return(e=>{const t=e;return t._$wxTmplDevArgs=t._$wxTmplDevArgs||{}})(e)}}var nt;!function(e){e[e.Data=0]="Data",e[e.Script=1]="Script",e[e.InlineScript=2]="InlineScript"}(nt||(nt={}));const rt=()=>{};class ot{constructor(e,t){this.i=(e,t)=>{this.shadowRoot.idMap[t]=e},this.v=(e,t,n,r)=>{const o=e=>{const t=this.shadowRoot.comp.callMethod(n,e);return!r&&t};Object.defineProperty(o,"name",{value:n}),this.shadowRoot.setListener(e,t,o)},this.a=(e,t,n)=>{this.r(e,t,n)},this.shadowRoot=e,this.procGen=t}create(e){const{shadowRoot:t,procGen:n}=this,r=n(this,!0,e);return this.handleChildrenCreation(r.C,t.shadowRootElement),r.B}bindingMapUpdate(e,t,n){const r=n[e];if(void 0!==r)for(let e=0;e<r.length;e+=1)(0,r[e])(t,(()=>{}),((e,t)=>{e.textContent=t}))}handleChildrenCreation(e,t){let n=!0,r=!1;const o=()=>{n=!1,r=!1;const e=document.createElement("virtual");t.appendChild(e),this.shadowRoot.slot=e};e(!0,((e,i)=>{r?o():n=!1;const s=document.createTextNode(e||"");i&&i(s),t.appendChild(s)}),((e,i,s,a)=>{r?o():n=!1;const l=document.createElement(e);s(l,!0),this.handleChildrenCreation(a,l),t.appendChild(l)}),rt,rt,(()=>{n?(r=!0,this.shadowRoot.slot=t):o()}),(e=>{r?o():n=!1;const i=document.createElement("virtual");this.handleChildrenCreation(e,i),t.appendChild(i)}))}s(){}l(){}c(e,t){e.setAttribute("class",t)}e(){}ei(){}y(e,t){e.setAttribute("style",t)}w(){}wi(){}d(e,t,n){e.dataset[t]=Je(n)}m(){}r(e,t,n){"boolean"==typeof n?n?e.setAttribute(t,""):e.removeAttribute(t):e.setAttribute(t,Je(n))}wl(){}p(){}setFnFilter(){}setEventListenerWrapper(){}devArgs(e){return(e=>{const t=e;return t._$wxTmplDevArgs=t._$wxTmplDevArgs||{}})(e)}}const it=()=>({C:(e,t,n,r,o,i)=>{i("")},B:Object.create(null)}),st=()=>it;class at{constructor(e){if("object"!=typeof e._$template&&void 0!==e._$template)throw new Error(`Component template of ${e.is} must be a valid compiled template (or "null" for default template).`);{const t=e._$template||{content:st};this.genObjectGroupEnv={list:t.groupList||Object.create(null),group:t.content}}this.updateMode=""}createInstance(e){return new lt(this,e)}}class lt{constructor(e,t){if(3!==t.getBackendMode())throw new Error(`Component template of ${t.is} cannot be initialized since external rendering is only supported in Domlike backend currently.`);const n=t.getBackendElement();if(!n)throw new Error(`Component template of ${t.is} cannot be initialized as external components since no suitable backend element found.`);this.comp=t,this.shadowRoot=this,this.shadowRootElement=n,this.root=n,this.slot=n,this.template=e;const r=e.genObjectGroupEnv.group("")||st();this.procGenWrapper=new ot(this,r),this.idMap=Object.create(null),this.listeners=[]}initValues(e){if(this.bindingMapGen=this.procGenWrapper.create(e),!this.bindingMapGen)throw new Error("The component template does not support binding-map-update, so it cannot be used as external components.");const t=this.shadowRootElement;if(this.slot===t&&t.childNodes.length>0){const e=document.createElement("virtual");t.appendChild(e),this.slot=e}}getIdMap(){return this.idMap}updateValues(e,t){const n=this.bindingMapGen;for(let r=0;r<t.length;r+=1){const[o]=t[r];this.procGenWrapper.bindingMapUpdate(o[0],e,n)}}setListener(e,t,n){const r=e;r._$wxTmplEv?r._$wxTmplEv[t]=n:r._$wxTmplEv={[t]:n}}handleEvent(e,t){var n;const r=e;let o=r;const i=this.shadowRootElement,s=t.getEventName(),a=t.bubbles;for(;;){const e=t.wrapShadowedEvent(r,null,o),l=null===(n=o._$wxTmplEv)||void 0===n?void 0:n[s];if(l&&!1===l.call(o,e)&&(t.preventDefault(),t.stopPropagation()),!a||t.propagationStopped())break;if(o===i)break;const c=o.parentNode;if(!c)break;o=c}}}const ct=()=>({C:(e,t,n,r,o,i)=>{i("")},B:Object.create(null)}),ut=()=>ct;var dt;!function(e){e[e.Disabled=0]="Disabled",e[e.Enabled=1]="Enabled",e[e.Forced=2]="Forced"}(dt||(dt={}));const ht=e=>String(e>>>0)===e;class pt{create(e,t){return t.externalComponent?new at(e):new ft(e)}}class ft{constructor(e){this.updateTemplate(e)}updateTemplate(e){const t=e._$template;if("object"!=typeof t&&void 0!==t)throw new Error(`Component template of ${e.is} must be a valid compiled template (or "null" for default template).`);const n=t||{content:ut};this.genObjectGroupEnv={list:n.groupList||Object.create(null),group:n.content},this.updateMode=n.updateMode||"",this.fallbackListenerOnNativeNode=n.fallbackListenerOnNativeNode||!1}createInstance(e,t){return new vt(this,e,t(e))}}class vt{constructor(e,t,n){this.comp=t,this.shadowRoot=n,this.shadowRoot.destroyBackendElementOnRemoval(),this._$applyTemplate(e)}updateTemplate(e,t){this._$applyTemplate(e),this.shadowRoot.removeChildren(0,this.shadowRoot.childNodes.length),this.bindingMapGen=this.procGenWrapper.create(t)}_$applyTemplate(e){const t=e.genObjectGroupEnv.group("")||ut();"bindingMap"===e.updateMode?this.forceBindingMapUpdate=2:"virtualTree"===e.updateMode?this.forceBindingMapUpdate=0:this.forceBindingMapUpdate=1,this.procGenWrapper=new tt(this.shadowRoot,t,e.fallbackListenerOnNativeNode),this.bindingMapGen=void 0}initValues(e){return this.bindingMapGen=this.procGenWrapper.create(e),this.shadowRoot}updateValues(e,t){if(2===this.forceBindingMapUpdate){for(let n=0;n<t.length;n+=1)this.tryBindingMapUpdate(e,t[n]);return}if(1===this.forceBindingMapUpdate&&t.length<=1&&this.bindingMapGen&&this.tryBindingMapUpdate(e,t[0]))return;const n=Object.create(null);for(let e=0;e<t.length;e+=1){const[r,o,i,s]=t[e];let a=n;for(let e=0;e<r.length;e+=1){const t=r[e],n=a[t];if(!0===n)break;if(e===r.length-1){if(void 0===s)a[t]=!0;else{const e=i;if(void 0===n)a[t]=Object.create(new Array(e));else if(Array.isArray(Object.getPrototypeOf(n))){const t=Object.getPrototypeOf(n);t.length<e&&(t.length=e);const r=n,o=Object.keys(r);for(let e=0;e<o.length;e+=1){const n=o[e];ht(n)&&(t[Number(n)]=r[n],delete r[n])}}else{const r=new Array(e),o=Object.keys(n);let i=!1;for(let e=0;e<o.length;e+=1){const t=o[e],s=n[t];ht(t)?r[Number(t)]=s:"length"===t&&(i=!0)}const s=Object.create(r);i&&(s.length=!0),a[t]=s}const r=Object.getPrototypeOf(a[t]),l=new Array(o.length);l.fill(!0),r.splice(i,s,...l)}break}if(void 0===n){const e=Object.create(null);a[t]=e,a=e}else a=n}}this.procGenWrapper.update(e,n)}tryBindingMapUpdate(e,t){if(!t)return!0;const n=this.bindingMapGen;if(!n)return!1;const[r]=t;return 1===r.length&&this.procGenWrapper.bindingMapUpdate(r[0],e,n)}}let gt=null;const mt=()=>{if(gt)return gt;const e=new pt;return gt=e,e};Object.freeze({__proto__:null,DEFAULT_PROC_GEN_GROUP:ut,get GeneralLvaluePathPrefix(){return nt},GlassEaselTemplateEngine:pt,GlassEaselTemplateInstance:vt,getDefaultTemplateEngine:mt});const _t=(e,t,n,r)=>{const o=t.ownerSpace,i=null==n?void 0:n._$behavior._$using,s=null==n?void 0:n._$genericImpls;e._$detail||e.prepare();const a=e.behavior;let l;const c=a._$generics;if(c){const n=a._$genericDefaults;l=Object.create(null);for(let a=0;a<c.length;a+=1){const u=c[a];if(r&&Object.prototype.hasOwnProperty.call(r,u)){const n=r[u];if("string"==typeof n)if(null==i?void 0:i[n])l[u]=i[n];else if(s&&s[n])l[u]=s[n];else{const r=o.getGlobalUsingComponent(n);if("string"==typeof r)l[u]=r;else if(r)l[u]={final:r,source:t,placeholder:null,waiting:null};else{I(`Generic "${u}" value "${n}" is not valid`,e.is);const r=o.getDefaultComponent();if(!r)throw new M(`Cannot find default component for generic "${u}"`,"[prepare]",e.is);l[u]={final:r,source:t,placeholder:null,waiting:null}}}else l[u]=n}else{let r=n[u];if(!r){if(r=o.getDefaultComponent(),!r)throw new M(`Cannot find default component for generic "${u}"`,"[prepare]",e.is);I(`No component specified for generic "${u}", using default component (on component "${e.is}")`)}l[u]="string"==typeof r?r:{final:r,source:t,placeholder:null,waiting:null}}}}else l=null;return l},bt=(e,t,n,r)=>{const o=n._$using[e]||r&&r[e];let i=null;if(o&&("string"==typeof o?i=o:null===o.placeholder?i=o.final:I("Placeholder on generic implementation is not valid",n.is)),i)return i;let s=t.getGlobalUsingComponent(e);if(null===s&&t._$allowUnusedNativeNode&&""!==e&&(s=e),!s){if(s=t.getDefaultComponent(),!s)throw new M(`Cannot find placeholder target "${e}"`,"[prepare]",n.is);I(`Cannot find placeholder target "${e}", using default component.`,n.is)}return s};class $t{constructor(e){this.behavior=e,this.is=this.behavior.is,this._$detail=null,this._$options=u(e._$options,e.ownerSpace.getComponentOptions());const t=this._$options.templateEngine;this._$templateEngine=null!=t?t:mt()}general(){return this}getComponentOptions(){return this._$options}getComponentDependencies(){return this.behavior.getComponentDependencies()}updateTemplate(e){var t;if(!(null===(t=this._$detail)||void 0===t?void 0:t.template.updateTemplate))throw new Error(`The template engine of component "${this.is}" does not support template update`);this.behavior._$updateTemplate(e),this._$detail.template.updateTemplate(this.behavior)}isPrepared(){return!!this._$detail}prepare(){if(this._$detail)return;this.behavior.prepare();const e=this.behavior,t=this._$options,n={};if(t.writeFieldsToNode){const t=Object.keys(e._$propertyMap);for(let e=0;e<t.length;e+=1){const r=t[e];n[r]={enumerable:!0,get(){return this._$dataGroup.data[r]},set(e){const t=this._$dataGroup;t.replaceDataOnPath([r],e),t.applyDataUpdates()}}}const r=Object.keys(e._$methodMap);for(let t=0;t<r.length;t+=1){const o=r[t];n[o]={enumerable:!0,value:e._$methodMap[o]}}}const r=function(){};n.constructor={value:r,writable:!0};const o=r.prototype=Object.create(Ct.prototype,n);o._$behavior=e,o._$definition=this,o._$methodMap=e._$methodMap,o._$dataGroupObserverTree=e._$generateObserverTree(),o._$lifetimeFuncs=e._$getAllLifetimeFuncs(),o._$pageLifetimeFuncs=e._$getAllPageLifetimeFuncs();const i=(e=>{if(void 0===e)return null;const t={definitions:new Array(6),keyMap:Object.create(null)},n=t.definitions,r=t.keyMap,o=Object.keys(e);for(let t=0;t<o.length;t+=1){const i=o[t],s=e[i],a=s.type;n[a]?(r[i]=[a,n[a].length],n[a].push(s)):(r[i]=[a,0],n[a]=[s])}return t})(e._$relationMap),s=Ce(t.dataDeepCopy),a=Ce(t.propertyPassingDeepCopy),l=this._$templateEngine.create(e,t);this._$detail={proto:o,template:l,dataDeepCopy:s,propertyPassingDeepCopy:a,relationDefinitionGroup:i}}}let yt=1,St=null;class Ct extends Fe{constructor(){throw new Error("Element cannot be constructed directly")}general(){return this}asInstanceOf(e){return this._$behavior!==e.behavior?null:this}static register(e,t){return(t||K()).defineComponent(e)}static _$tagMethod(e){const t=e;return t[q]=!0,t}static isTaggedMethod(e){return"function"==typeof e&&!!e[q]}static _$advancedCreate(e,t,n,r,o,i,s){var a,l,u,d,h,p;t._$detail||t.prepare();const{proto:v,template:g,dataDeepCopy:m,propertyPassingDeepCopy:_,relationDefinitionGroup:b}=t._$detail,$=t._$options,y=t.behavior,S=n?n.getBackendContext():r||c.backendContext||(()=>{if(St)return St;let e;return e=new A,St=e,e})(),C=$.externalComponent,w=$.propertyEarlyInit,E=c.writeExtraInfoToAttr,N=$.virtualHost,k=Object.create(v);k._$genericImpls=o,k._$external=C,k.tagName=e,k._$methodCaller=k;const O=y.ownerSpace,P=O._$sharedStyleScope,x=$.styleScope&&$.styleScope!==P;let T=null;if(S)if(3===S.mode){if(!N&&(T=S.document.createElement(e),x)){const e=O.styleScopeManager.queryName($.styleScope);e&&T.setAttribute("wx-host",e)}}else 2===S.mode?N||(T=S.createElement($.hostNodeTagName,e)):1===S.mode&&(T=(n?n._$backendShadowRoot:S.getRootNode()).createComponent(e,C,N,null!==(a=$.styleScope)&&void 0!==a?a:F.globalScope(),$.extraStyleScope,y._$externalClasses,C?null:$.dynamicSlots?3:$.multipleSlots?2:1,$.writeIdToDOM));k._$initialize(N,T,n,null!==(l=null==n?void 0:n._$nodeTreeContext)&&void 0!==l?l:S),k._$placeholderHandlerRemover=i;const I=n?n.getHostNode():void 0,R=null==I?void 0:I.getComponentOptions(),L=null!==(u=null==R?void 0:R.styleScope)&&void 0!==u?u:F.globalScope(),D=null!==(d=null==R?void 0:R.extraStyleScope)&&void 0!==d?d:void 0,j=null==I?void 0:I._$behavior.ownerSpace.styleScopeManager;if(k.classList=new U(k,y._$externalClasses,I?I.classList:null,L,D,j),T){const e=null!==(h=null==R?void 0:R.styleScope)&&void 0!==h?h:$.styleScope;e&&2===S.mode&&T.setStyleScope(e,D,x?null!==(p=$.styleScope)&&void 0!==p?p:F.globalScope():void 0)}if(T&&(T.__wxElement=k,3!==S.mode?T.associateValue(k):S.associateValue(T,k),j&&E)){const e=j.queryName(L);e&&T.setAttribute("exparser:info-class-prefix",`${e}--`)}const B=g.createInstance(k,Ye.createShadowRoot);if(k.templateInstance=B,E&&T){const e=yt;yt+=1,k._$componentInstanceId=e,T.setAttribute("exparser:info-component-id",e)}k._$idPrefix=$.idPrefixGenerator?$.idPrefixGenerator.call(k):"";const q=y._$staticData,W=y._$data;let H;if(void 0===q)if(1===W.length)H=(0,W[0])();else{H={};for(let e=0;e<W.length;e+=1){const t=W[e];Object.assign(H,t())}}else{H=ie(q);for(let e=0;e<W.length;e+=1){const t=W[e];Object.assign(H,t())}}const z=k._$relation=new Ge(k,b);k._$traitGroup=new V;const Y=y._$traitBehaviors;if(void 0!==Y)for(let e=0;e<Y.length;e+=1){const{traitBehavior:t,impl:n}=Y[e];k._$traitGroup.implement(t,n)}if(y._$methodCallerInit){const e=y._$methodCallerInit.call(k);k._$methodCaller=e}let Q=!1;if(y._$init.length>0){let e=!0;const t=k.getMethodCaller(),n={self:t,data:H,setData:k.setData.bind(k),implement:(e,t)=>{if(Q)throw new M("Cannot execute init-time functions after initialization","[implement]",y.is);k._$traitGroup.implement(e,t)},relation:function(e){if(Q)throw new M("Cannot execute init-time functions after initialization","[implement]",y.is);const t=e.target,n=qe(y.ownerSpace,y.is,"undefined",e);let r;return r=n?z.add(n):Symbol("invalid"),{list:()=>z.getLinkedTargets(r).map((e=>e.getMethodCaller())),listAsTrait:t instanceof G?()=>z.getLinkedTargets(r).map((e=>e.traitBehavior(t))):void 0}},observer:(e,t)=>{if(Q)throw new M("Cannot execute init-time functions after initialization","[implement]",y.is);k.dynamicAddObserver(t,e)},lifetime:(e,t)=>{if(Q)throw new M("Cannot execute init-time functions after initialization","[implement]",y.is);k.addLifetimeListener(e,t)},pageLifetime:(e,t)=>{if(Q)throw new M("Cannot execute init-time functions after initialization","[implement]",y.is);k.addPageLifetimeListener(e,t)},method:e=>Ct._$tagMethod(e),listener:e=>Ct._$tagMethod(e)},r=y._$init;for(let o=0;o<r.length;o+=1){const i=f("Component Init",r[o].func,t,[n],void 0);if(i){const t=Object.keys(i);for(let n=0;n<t.length;n+=1){const r=t[n],o=i[r];Ct.isTaggedMethod(o)&&(e&&(e=!1,k._$methodMap=Object.create(k._$methodMap)),k._$methodMap[r]=o,$.writeFieldsToNode&&(k[r]=o))}}}}Q=!0;const K=B.shadowRoot;if(k.shadowRoot=K,C&&1===S.mode){const e=K.slot;T.setExternalSlot(e)}const X=new we(k,H,$.pureDataPattern||null,m,_,$.reflectToAttributes,k._$dataGroupObserverTree,$.propertyComparer,$.unknownPropertyHandler);k._$dataGroup=X,w&&void 0!==s&&s(k),B.initValues(X.innerData||X.data),X.setUpdateListener(((e,t)=>{B.updateValues(e,t)}));const Z=y._$listeners;if(void 0!==Z)for(let e=0;e<Z.length;e+=1){const{id:t,ev:n,listener:r}=Z[e],o=r;if("this"===t)k.addListener(n,(e=>o.call(k._$methodCaller,e)));else if(C){const e=K,r=t?e.getIdMap()[t]:e.root;r&&e.setListener(r,n,(e=>o.call(k._$methodCaller,e)))}else{const e=K,r=t?e.getElementById(t):e;r&&r.addListener(n,(e=>o.call(k._$methodCaller,e)))}}return k.triggerLifetime("created",[]),w||void 0===s||s(k),k}static createWithGenericsAndContext(e,t,n,r,o){const i=e=>{let t;return n&&(t=Object.create(null),Object.entries(n).forEach((([n,r])=>{t[n]={final:r,source:e.behavior,placeholder:null,waiting:null}}))),_t(e,e.behavior,void 0,t)};if(t)return Ct._$advancedCreate(String(e),t,null,r,i(t),void 0,o);if(e instanceof $t)return Ct._$advancedCreate(e.is,e,null,r,i(e),void 0);const s=K().getComponentByUrl(e,"");return Ct._$advancedCreate(e,s,null,r,i(s),void 0)}static createWithGenerics(e,t,n,r){return Ct.createWithGenericsAndContext(e,t,n,null,r)}static createWithContext(e,t,n,r){return Ct.createWithGenericsAndContext(e,t,null,n,r)}static create(e,t,n){return Ct.createWithGenericsAndContext(e,t,null,null,n)}get is(){return this._$definition.is}get properties(){return this._$dataGroup.data}get data(){return this._$dataGroup.data}set data(e){const t=this._$dataGroup;if(void 0===t)throw new M("Cannot update data before component created","data setter",this);Object.entries(e).forEach((([e,n])=>t.replaceDataOnPath([e],n))),t.applyDataUpdates()}get $(){return this._$external?this.shadowRoot.getIdMap():this.shadowRoot._$getIdMap()}getShadowRoot(){return this._$external?null:this.shadowRoot}applyTemplateUpdates(){var e;if(!(null===(e=this.templateInstance)||void 0===e?void 0:e.updateTemplate))throw new Error(`The template engine of component "${this.is}" does not support template update`);const t=this._$dataGroup;this.templateInstance.updateTemplate(this._$definition._$detail.template,t.innerData||t.data)}getOwnerSpace(){return this._$behavior.ownerSpace}isExternal(){return this._$external}static listProperties(e){return Object.keys(e._$behavior._$propertyMap)}static hasProperty(e,t){return!!e._$behavior._$propertyMap[t]}static getMethodsFromDef(e){return e.behavior._$methodMap}static getMethod(e,t){if(e._$definition._$options.useMethodCallerListeners&&Object.prototype.hasOwnProperty.call(e._$methodCaller,t)){const n=e._$methodCaller[t];return"function"==typeof n?n:void 0}return e._$methodMap[t]}callMethod(e,...t){const n=Ct.getMethod(this,e);return null==n?void 0:n.call(this,...t)}getComponentDefinition(){return this._$definition}getComponentOptions(){return this._$definition._$options}hasBehavior(e){return e instanceof G?void 0!==this._$traitGroup.get(e):this._$behavior.hasBehavior(e)}getRootBehavior(){return this._$behavior}traitBehavior(e){return this._$traitGroup.get(e)}setMethodCaller(e){this._$methodCaller=e}getMethodCaller(){return this._$methodCaller}addLifetimeListener(e,t){Object.prototype.hasOwnProperty.call(this,"_$lifetimeFuncs")||(this._$lifetimeFuncs=this._$behavior._$getAllLifetimeFuncs());const n=this._$lifetimeFuncs;(n[e]=n[e]||new d("lifetime")).add(t)}removeLifetimeListener(e,t){Object.prototype.hasOwnProperty.call(this,"_$lifetimeFuncs")||(this._$lifetimeFuncs=this._$behavior._$getAllLifetimeFuncs());const n=this._$lifetimeFuncs[e];null==n||n.remove(t)}triggerLifetime(e,t){const n=this._$lifetimeFuncs[e];n&&n.call(this._$methodCaller,t,this)}triggerLifeTime(e,t){return this.triggerLifetime(e,t)}addPageLifetimeListener(e,t){Object.prototype.hasOwnProperty.call(this,"_$pageLifetimeFuncs")||(this._$pageLifetimeFuncs=this._$behavior._$getAllPageLifetimeFuncs());const n=this._$pageLifetimeFuncs;(n[e]=n[e]||new d("pageLifetime")).add(t)}removePageLifetimeListener(e,t){Object.prototype.hasOwnProperty.call(this,"_$pageLifetimeFuncs")||(this._$pageLifetimeFuncs=this._$behavior._$getAllPageLifetimeFuncs());const n=this._$pageLifetimeFuncs[e];null==n||n.remove(t)}triggerPageLifetime(e,t){const n=r=>{if(N(r)){if(r._$pageLifetimeFuncs){const n=r._$pageLifetimeFuncs[e];n&&n.call(r._$methodCaller,t,this)}r._$external||n(r.shadowRoot)}const o=r.childNodes;for(let e=0;e<o.length;e+=1){const t=o[e];S(t)&&n(t)}};n(this)}triggerPageLifeTime(e,t){return this.triggerPageLifetime(e,t)}dynamicAddObserver(e,t){Object.prototype.hasOwnProperty.call(this,"_$dataGroupObserverTree")||(this._$dataGroupObserverTree=this._$dataGroupObserverTree.cloneSub(),this._$dataGroup&&(this._$dataGroup._$observerTree=this._$dataGroupObserverTree));const n=this._$dataGroupObserverTree;try{n.addObserver(e,re(t))}catch(e){T(e,"observer",this.is)}}getRelationNodes(e){var t;return(null===(t=this._$relation)||void 0===t?void 0:t.getLinkedTargets(e))||[]}hasExternalClass(e){return this.classList._$hasAlias(e)}setExternalClass(e,t){this.scheduleExternalClassChange(e,t),this.applyExternalClassChanges(),this._$mutationObserverTarget&&le.callAttrObservers(this,{type:"properties",target:this,nameType:"external-class",attributeName:e})}getExternalClasses(){return this.classList._$getAlias()}scheduleExternalClassChange(e,t){this.classList._$setAlias(e,t)}applyExternalClassChanges(){if(this._$external)return;if(!this.classList._$shouldUpdateExternalClass())return;const e=t=>{if(!S(t))return;const n=t.classList;(null==n?void 0:n._$spreadExternalClassUpdate())&&N(t)&&t.applyExternalClassChanges();const r=t.childNodes;for(let t=0,n=r.length;t<n;t+=1)e(r[t]);null==n||n._$markExternalClassUpdated()};e(this.shadowRoot)}triggerWorkletChangeLifetime(e,t){this.triggerLifetime("workletChange",[e,t])}isInnerDataExcluded(e){var t;return(null===(t=this._$definition._$options.pureDataPattern)||void 0===t?void 0:t.test(e))||!1}static getInnerData(e){return e._$dataGroup.innerData}static getDataProxy(e){return e._$dataGroup}static replaceWholeData(e,t){e._$dataGroup.replaceWholeData(t)}replaceDataOnPath(e,t){const n=this._$dataGroup;if(void 0===n)throw new M("Cannot update data before component created","replaceDataOnPath",this);n.replaceDataOnPath(e,t)}spliceArrayDataOnPath(e,t,n,r){const o=this._$dataGroup;if(void 0===o)throw new M("Cannot update data before component created","spliceArrayDataOnPath",this);o.spliceArrayDataOnPath(e,t,n,r)}hasPendingChanges(){const e=this._$dataGroup;return void 0!==e&&e.getChanges().length>0}applyDataUpdates(){const e=this._$dataGroup;if(void 0===e)throw new M("Cannot update data before component created","applyDataUpdates",this);e.applyDataUpdates()}groupUpdates(e){const t=this._$dataGroup;if(void 0===t)throw new M("Cannot update data before component created","groupUpdates",this);const n=e();return t.applyDataUpdates(),n}updateData(e){const t=this._$dataGroup;if(void 0===t)throw new M("Cannot update data before component created","updateData",this);if("object"==typeof e&&null!==e){const n=Object.keys(e);for(let r=0;r<n.length;r+=1){const o=n[r];try{const n=ne(o);t.replaceDataOnPath(n,e[o])}catch(e){T(e,"updateData",this)}}}}setData(e){const t=this._$dataGroup;if(void 0===t)throw new M("Cannot update data before component created","setData",this);if("object"==typeof e&&null!==e){const n=Object.keys(e);for(let r=0;r<n.length;r+=1){const o=n[r];try{const n=ne(o);t.replaceDataOnPath(n,e[o])}catch(e){T(e,"setData",this)}}}t.applyDataUpdates()}}Ct.isComponent=N,Ct.prototype[$]=!0;class wt{constructor(e,t){this._$behaviors=[],this._$traitBehaviors=[],this._$staticData=void 0,this._$data=[],this._$methods=[],this._$lifetimes=[],this._$pageLifetimes=[],this._$init=[],this.is=e,this._$ownerSpace=t}methodCallerInit(e){return this._$methodCallerInit=e,this}behavior(e){return this._$behaviors.push(e),e._$chainingFilter?e._$chainingFilter(this):this}chainingFilter(e){return this._$chainingFilter=e,this}options(e){const t=this._$options;return this._$options=t?Object.assign(Object.assign({},t),e):e,this}implement(e,t){return this._$traitBehaviors.push({traitBehavior:e,impl:t}),this}template(e){return this._$template=e,this}usingComponents(e){return this._$using?this._$using=Object.assign(Object.assign({},this._$using),e):this._$using=e,this}placeholders(e){return this._$placeholders?this._$placeholders=Object.assign(Object.assign({},this._$placeholders),e):this._$placeholders=e,this}generics(e){return this._$generics?this._$generics=Object.assign(Object.assign({},this._$generics),e):this._$generics=e,this}externalClasses(e){return this._$externalClasses?this._$externalClasses=this._$externalClasses.concat(e):this._$externalClasses=e,this}data(e){return this._$data.push((()=>{var t;return null!==(t=f("Data Generator",e,null,[],this.is))&&void 0!==t?t:{}})),this}staticData(e){return this._$staticData=e,this}property(e,t){return this._$properties||(this._$properties=[]),this._$properties.push({name:e,def:t}),this}methods(e){const t=Object.keys(e);for(let n=0;n<t.length;n+=1){const r=t[n],o=e[r];this._$methods.push({name:r,func:o})}return this}observer(e,t,n=!1){this._$observers||(this._$observers=[]);try{this._$observers.push({dataPaths:re(e),func:t,once:n})}catch(e){T(e,"observer",this.is)}return this}lifetime(e,t,n=!1){return this._$lifetimes.push({name:e,func:t,once:n}),this}pageLifetime(e,t,n=!1){return this._$pageLifetimes||(this._$pageLifetimes=[]),this._$pageLifetimes.push({name:e,func:t,once:n}),this}relation(e,t){return this._$relations||(this._$relations=[]),this._$relations.push({name:e,rel:t}),this}init(e,t=!1){return this._$init.push({func:e,once:t}),this}definition(e){e.behaviors&&this._$behaviors.push(...e.behaviors),e.options&&this.options(e.options),e.template&&this.template(e.template),e.using&&this.usingComponents(e.using),e.placeholders&&this.placeholders(e.placeholders),e.generics&&this.generics(e.generics),e.externalClasses&&this.externalClasses(e.externalClasses);const t=e.data;void 0!==t&&("function"==typeof t?this._$data.push((()=>{var e;return null!==(e=f("Data Generator",t,null,[],this.is))&&void 0!==e?e:{}})):this._$staticData=t);const n=e.properties;if(void 0!==n){this._$properties||(this._$properties=[]);const e=Object.keys(n);for(let t=0;t<e.length;t+=1){const r=e[t],o=n[r];this._$properties.push({name:r,def:o})}}const r=e.methods;if(void 0!==r){const e=Object.keys(r);for(let t=0;t<e.length;t+=1){const n=e[t],o=r[n];this._$methods.push({name:n,func:o})}}const o=e.observers;if(void 0!==o)if(this._$observers||(this._$observers=[]),Array.isArray(o))for(let t=0;t<o.length;t+=1){const{fields:n,observer:r}=o[t];try{this._$observers.push({dataPaths:re(null!=n?n:"**"),func:r,once:!1})}catch(e){T(e,"definition",this.is)}}else{const t=Object.keys(o);for(let n=0;n<t.length;n+=1){const r=t[n],i=o[r];try{this._$observers.push({dataPaths:re(r),func:i,once:!1})}catch(e){T(e,"definition",this.is)}}}const i=e.lifetimes;if(void 0===(null==i?void 0:i.created)&&"function"==typeof e.created&&this._$lifetimes.push({name:"created",func:e.created,once:!0}),void 0===(null==i?void 0:i.attached)&&"function"==typeof e.attached&&this._$lifetimes.push({name:"attached",func:e.attached,once:!0}),void 0===(null==i?void 0:i.moved)&&"function"==typeof e.moved&&this._$lifetimes.push({name:"moved",func:e.moved,once:!0}),void 0===(null==i?void 0:i.detached)&&"function"==typeof e.detached&&this._$lifetimes.push({name:"detached",func:e.detached,once:!0}),void 0===(null==i?void 0:i.ready)&&"function"==typeof e.ready&&this._$lifetimes.push({name:"ready",func:e.ready,once:!0}),i){const e=Object.keys(i);for(let t=0;t<e.length;t+=1){const n=e[t],r=i[n];this._$lifetimes.push({name:n,func:r,once:!0})}}const s=e.pageLifetimes;if(s){this._$pageLifetimes||(this._$pageLifetimes=[]);const e=Object.keys(s);for(let t=0;t<e.length;t+=1){const n=e[t],r=s[n];this._$pageLifetimes.push({name:n,func:r,once:!0})}}const a=e.listeners;if(a){this._$listeners||(this._$listeners={});const e=Object.keys(a);for(let t=0;t<e.length;t+=1){const n=e[t],r=a[n];this._$listeners[n]={func:r,once:!0}}}const l=e.relations;if(l){this._$relations||(this._$relations=[]);const e=Object.keys(l);for(let t=0;t<e.length;t+=1){const n=e[t],r=l[n];this._$relations.push({name:n,rel:r})}}return this}registerBehavior(){const e=this.is,t=new Et(this);return void 0!==e&&this._$ownerSpace._$registerBehavior(e,t),t}extraThisFieldsType(){return this}registerComponent(){const e=this.is,t=new Et(this),n=new $t(t);return void 0!==e&&this._$ownerSpace.registerComponent(e,n),n}}class Et{static create(e,t){return new wt(e.is,t||K()).definition(e).registerBehavior()}constructor(e){this._$unprepared=!0,this.is=e.is||"",this.ownerSpace=e._$ownerSpace,this._$builder=e,this._$flatAncestors=new Set,this._$chainingFilter=e._$chainingFilter,this._$options=e._$options,this._$traitBehaviors=void 0,this._$template=e._$template,this._$using=Object.create(null),this._$generics=void 0,this._$genericDefaults=void 0,this._$externalClasses=e._$externalClasses,this._$staticData=void 0,this._$data=[],this._$propertyMap=Object.create(null),this._$methodMap=Object.create(null),this._$observers=[],this._$lifetimes=[],this._$pageLifetimes=void 0,this._$listeners=void 0,this._$relationMap=void 0,this._$init=[],this._$methodCallerInit=e._$methodCallerInit}general(){return this}getComponentDependencies(e){const t=new Set,n=function(e){e._$unprepared&&e.prepare();const r=Object.keys(e._$using);for(let o=0;o<r.length;o+=1){const i=r[o],s=e._$using[i];if("string"==typeof s)continue;const a=s.final;a&&!t.has(a)&&(t.add(a),n(a.behavior))}};if(n(this.general()),e){const r=Object.values(e);for(let e=0;e<r.length;e+=1){const o=r[e];"string"!=typeof o&&(t.has(o)||(t.add(o),n(o.behavior)))}}return t}static prepare(e){e.prepare()}prepare(){var e;if(!this._$unprepared)return;this._$unprepared=!1;const t=this.is,n=this.ownerSpace,r=this._$builder,o=this._$flatAncestors;if(Array.isArray(r._$behaviors))for(let e=0;e<r._$behaviors.length;e+=1){const i=r._$behaviors[e];let s=null;if(i instanceof Et)s=i;else{const e=String(i);n&&(s=n.getBehaviorByUrl(e,t)),s||T(new Error(`behavior "${e}" is not found.`),"[prepare]",t)}if(!s)continue;s._$unprepared&&Et.prepare(s);const a=s._$traitBehaviors;void 0!==a&&(this._$traitBehaviors||(this._$traitBehaviors=[]),this._$traitBehaviors.push(...a));const l=s._$staticData;l&&(this._$staticData||(this._$staticData={}),he(this._$staticData,l)),Object.assign(this._$methodMap,s._$methodMap),Object.assign(this._$propertyMap,s._$propertyMap),this._$data.push(...s._$data);const c=s._$observers;for(let e=0;e<c.length;e+=1){const t=c[e];t.once&&this._$observers.indexOf(t)>=0||this._$observers.push(t)}const u=s._$lifetimes;for(let e=0;e<u.length;e+=1){const t=u[e];t.once&&this._$lifetimes.indexOf(t)>=0||this._$lifetimes.push(t)}const d=s._$pageLifetimes;if(void 0!==d)if(this._$pageLifetimes)for(let e=0;e<d.length;e+=1){const t=d[e];t.once&&this._$pageLifetimes.indexOf(t)>=0||this._$pageLifetimes.push(t)}else this._$pageLifetimes=d.slice();const h=s._$listeners;if(void 0!==h)if(this._$listeners)for(let e=0;e<h.length;e+=1){const t=h[e];t.once&&this._$listeners.indexOf(t)>=0||this._$listeners.push(t)}else this._$listeners=h.slice().slice();const p=s._$relationMap;void 0!==p&&(this._$relationMap||(this._$relationMap=Object.create(null)),Object.assign(this._$relationMap,p));for(let e=0;e<s._$init.length;e+=1){const t=s._$init[e];t.once&&this._$init.indexOf(t)>=0||this._$init.push(t)}s._$flatAncestors.forEach((e=>{o.add(e)}))}const i=r._$traitBehaviors;if(void 0!==i&&(this._$traitBehaviors||(this._$traitBehaviors=[]),this._$traitBehaviors.push(...i)),"object"==typeof r._$using&&null!==r._$using){const o="object"==typeof r._$placeholders&&null!==r._$placeholders,i=Object.keys(r._$using);for(let s=0;s<i.length;s+=1){const a=i[s],l=r._$using[a];let c=null;if(o&&(c=null!==(e=r._$placeholders[a])&&void 0!==e?e:null),l instanceof $t)this._$using[a]={final:l,source:this,placeholder:c,waiting:null};else if(n){const e=String(l),r=n.getComponentByUrlWithoutDefault(e,t);if(r)this._$using[a]={final:r,source:this,placeholder:null,waiting:null};else if(null!==c){const r={final:null,source:this,placeholder:c,waiting:null},o=n._$componentWaitingList(e,t);o&&(o.add((e=>{r.final=e,r.placeholder=null,r.waiting=null})),r.waiting=o),this._$using[a]=r}else{const t=n.getGlobalUsingComponent(e);this._$using[a]="string"==typeof t?t:{final:t,source:this,placeholder:null,waiting:null}}}else T(new Error(`cannot find component "${String(l)}"`),"[prepare]",t)}}if("object"==typeof r._$generics&&null!==r._$generics){const e=this._$generics=[],o=Object.create(null);this._$genericDefaults=o;const i=Object.keys(r._$generics);for(let s=0;s<i.length;s+=1){const a=i[s],l=r._$generics[a];let c=null;const u=!0===l||null==l?void 0:l.default;if(void 0!==u)if(u instanceof $t)c=u;else if(n){const e=String(u);c=n.getComponentByUrlWithoutDefault(e,t)||n.getGlobalUsingComponent(e)}else T(new Error(`cannot define generic "${a}" without a default implementor.`),"[prepare]",t);e.push(a),o[a]=c}}const s=r._$staticData;s&&(this._$staticData?he(this._$staticData,s):this._$staticData=s);const a=r._$methods;for(let e=0;e<a.length;e+=1){const{name:t,func:n}=a[e];this._$methodMap[t]=n}const l=r._$properties;if(void 0!==l){const e=[];for(let n=0;n<l.length;n+=1){const{name:r,def:o}=l[n],i="string"===(c=o)||c===String?{type:"string",optionalTypes:null,defaultFn:()=>"",observer:null,comparer:null,reflectIdPrefix:!1}:"number"===c||c===Number?{type:"number",optionalTypes:null,defaultFn:()=>0,observer:null,comparer:null,reflectIdPrefix:!1}:"boolean"===c||c===Boolean?{type:"boolean",optionalTypes:null,defaultFn:()=>!1,observer:null,comparer:null,reflectIdPrefix:!1}:"object"===c||c===Object?{type:"object",optionalTypes:null,defaultFn:()=>null,observer:null,comparer:null,reflectIdPrefix:!1}:"array"===c||c===Array?{type:"array",optionalTypes:null,defaultFn:()=>[],observer:null,comparer:null,reflectIdPrefix:!1}:"function"===c||c===Function?{type:"function",optionalTypes:null,defaultFn:()=>function(){},observer:null,comparer:null,reflectIdPrefix:!1}:"any"===c||null==c?{type:"any",optionalTypes:null,defaultFn:()=>null,observer:null,comparer:null,reflectIdPrefix:!1}:null;let s,a;if(null!==i)s=i,a=i.defaultFn;else{const e=o;let n=fe(e.type),i=null;Array.isArray(e.optionalTypes)&&(i=e.optionalTypes.map(fe),i.length>0&&("invalid"!==n&&"any"!==n||(n=i[0]))),"invalid"===n&&T(new Error(`the type of property "${r}" is illegal`),"[prepare]",t);const l=pe(n);"function"==typeof e.default&&void 0!==e.value&&I(`the initial value of property "${r}" is not used when its default is provided.`,t);const c="function"==typeof e.default?()=>{const n=f(`Property "${r}" Default`,e.default,null,[],t);return void 0!==n?n:ie(l)}:()=>ie(l);let u,d;a="function"==typeof e.default?c:void 0!==e.value?()=>ie(e.value):()=>ie(l),"function"==typeof e.observer?u=e.observer:"string"==typeof e.observer?(u=this._$methodMap[e.observer]||null,u||T(new Error(`Cannot find method "${e.observer}" for observer of property "${r}".`),"[prepare]",t)):(u=null,void 0!==e.observer&&T(new Error(`The observer of property "${r}" is not a function, got "${typeof e.observer}".`),"[prepare]",t)),"function"==typeof e.comparer?d=e.comparer:(d=null,void 0!==e.comparer&&T(new Error(`the comparer of property "${r}" is not a function.`),"[prepare]",t)),s={type:n,optionalTypes:i,defaultFn:c,observer:u,comparer:d,reflectIdPrefix:!!e.reflectIdPrefix}}this._$propertyMap[r]=s,e.push({name:r,func:a})}this._$data.push((()=>{const t={};for(let n=0;n<e.length;n+=1){const{name:r,func:o}=e[n];t[r]=o()}return t}))}var c;this._$data.push(...r._$data);const u=r._$observers;if(void 0!==u)for(let e=0;e<u.length;e+=1){const{dataPaths:n,func:r,once:o}=u[e],i="function"==typeof r?r:this._$methodMap[r];"function"==typeof i?this._$observers.push({dataPaths:n,observer:i,once:o}):T(new Error(`the "${String(i)}" observer is not a function.`),"[prepare]",t)}const d=r._$lifetimes;this._$lifetimes.push(...d);const h=r._$pageLifetimes;h&&(this._$pageLifetimes||(this._$pageLifetimes=[]),this._$pageLifetimes.push(...h));const p=r._$listeners;if(void 0!==p){const e=Object.keys(p);if(e.length>0){this._$listeners||(this._$listeners=[]);for(let n=0;n<e.length;n+=1){const r=e[n],{func:o,once:i}=p[r],s="function"==typeof o?o:this._$methodMap[o];if(s){const e=r.indexOf(".");let t,n;e>=0?(t=r.slice(0,e),n=r.slice(e+1)):(t="",n=r),this._$listeners.push({id:t,ev:n,listener:s,once:i})}else T(new Error(`the "${r}" listener is not a function or a method name`),"[prepare]",t)}}}const v=r._$relations;if(void 0!==v){this._$relationMap||(this._$relationMap=Object.create(null));for(let e=0;e<v.length;e+=1){const{name:r,rel:o}=v[e];if(null==o)continue;const i=qe(n,t,r,o);i&&(this._$relationMap[r]=i)}}this._$init.push(...r._$init),o.add(this)}getTemplate(){return this._$template}_$updateTemplate(e){this._$template=e}hasBehavior(e){if(this._$unprepared&&this.prepare(),e instanceof Et)return this._$flatAncestors.has(e);if(this.ownerSpace){const t=this.ownerSpace.getBehaviorByUrl(e,this.is);return!!t&&this._$flatAncestors.has(t)}return!1}listProperties(){return Object.keys(this._$propertyMap)}getPropertyType(e){var t;return null===(t=this._$propertyMap[e])||void 0===t?void 0:t.type}getPropertyOptionalType(e){var t;return null===(t=this._$propertyMap[e])||void 0===t?void 0:t.optionalTypes}getMethods(){return this._$methodMap}_$generateObserverTree(){const e=new _e(this._$propertyMap),t=this._$observers;for(let n=0;n<t.length;n+=1){const{dataPaths:r,observer:o}=t[n];e.addObserver(o,r)}return e}_$getAllLifetimeFuncs(){const e=Object.create(null),t=this._$lifetimes;for(let n=0;n<t.length;n+=1){const{name:r,func:o}=t[n];e[r]?e[r].add(o):(e[r]=new d("lifetime")).add(o)}return e}_$getAllPageLifetimeFuncs(){const e=Object.create(null),t=this._$pageLifetimes;if(!t)return e;for(let n=0;n<t.length;n+=1){const{name:r,func:o}=t[n];e[r]?e[r].add(o):(e[r]=new d("pageLifetime")).add(o)}return e}}var Nt;!function(e){e.ShadowAncestors="shadow-ancestors",e.ComposedAncestors="composed-ancestors",e.ShadowDescendantsRootFirst="shadow-descendants-root-first",e.ShadowDescendantsRootLast="shadow-descendants-root-last",e.ComposedDescendantsRootFirst="composed-descendants-root-first",e.ComposedDescendantsRootLast="composed-descendants-root-last"}(Nt||(Nt={})),Symbol.iterator,Object.freeze({__proto__:null}),Ie.triggerEvent,Ie.triggerExternalEvent;var kt=function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e?{type:"primitive",value:e}:"symbol"==typeof e?{type:"symbol",value:e.toString()}:"function"==typeof e?{type:"function"}:Array.isArray(e)?{type:"array"}:{type:"object"}},Ot=function(e){return"primitive"===e.type?String(e.value):"symbol"===e.type?e.value:"function"===e.type?"() => {...}":"object"===e.type?"{...}":"[unknown]"},Pt=function(e){return 257===e?3:258===e||259===e||260===e||261===e?1:9},xt=n(443),Tt=n.n(xt);function It(e,t){return e.a===t.a?e.b===t.b?e.c-t.c:e.b-t.b:e.a-t.a}function Mt(e,t){const n=t?.customSpecificity?.(e);if(n)return n;if(!e)return{a:0,b:0,c:0};let r=0,o=0,i=0;if("universal"==e.type)return{a:0,b:0,c:0};if("id"===e.type)r+=1;else if("tag"===e.type)i+=1;else if("class"===e.type)o+=1;else if("attribute"===e.type)o+=1;else if(function(e){return xt.isPseudoElement(e)}(e))switch(e.value.toLowerCase()){case"::slotted":if(i+=1,e.nodes&&e.nodes.length>0){const n=Rt(e.nodes,t);r+=n.a,o+=n.b,i+=n.c}break;case"::view-transition-group":case"::view-transition-image-pair":case"::view-transition-old":case"::view-transition-new":return e.nodes&&1===e.nodes.length&&"selector"===e.nodes[0].type&&function(e){if(!e)return!1;if(!e.nodes)return!1;const t=e.nodes.filter((e=>"comment"!==e.type));return 0===t.length||1===t.length&&"universal"===t[0].type}(e.nodes[0])?{a:0,b:0,c:0}:{a:0,b:0,c:1};default:i+=1}else if(xt.isPseudoClass(e))switch(e.value.toLowerCase()){case":-webkit-any":case":any":default:o+=1;break;case":-moz-any":case":has":case":is":case":matches":case":not":if(e.nodes&&e.nodes.length>0){const n=Rt(e.nodes,t);r+=n.a,o+=n.b,i+=n.c}break;case":where":break;case":nth-child":case":nth-last-child":if(o+=1,e.nodes&&e.nodes.length>0){const n=e.nodes[0].nodes.findIndex((e=>"tag"===e.type&&"of"===e.value.toLowerCase()));if(n>-1){const s=xt.selector({nodes:[],value:""});e.nodes[0].nodes.slice(n+1).forEach((e=>{s.append(e.clone())}));const a=[s];e.nodes.length>1&&a.push(...e.nodes.slice(1));const l=Rt(a,t);r+=l.a,o+=l.b,i+=l.c}}break;case":local":case":global":e.nodes&&e.nodes.length>0&&e.nodes.forEach((e=>{const n=Mt(e,t);r+=n.a,o+=n.b,i+=n.c}));break;case":host":case":host-context":if(o+=1,e.nodes&&e.nodes.length>0){const n=Rt(e.nodes,t);r+=n.a,o+=n.b,i+=n.c}break;case":active-view-transition":case":active-view-transition-type":return{a:0,b:1,c:0}}else xt.isContainer(e)&&e.nodes?.length>0&&e.nodes.forEach((e=>{const n=Mt(e,t);r+=n.a,o+=n.b,i+=n.c}));return{a:r,b:o,c:i}}function Rt(e,t){let n={a:0,b:0,c:0};return e.forEach((e=>{const r=Mt(e,t);It(r,n)<0||(n=r)})),n}class At extends Error{sourceStart;sourceEnd;parserState;constructor(e,t,n,r){super(e),this.name="ParseError",this.sourceStart=t,this.sourceEnd=n,this.parserState=r}}class Lt extends At{token;constructor(e,t,n,r,o){super(e,t,n,r),this.token=o}}const Dt={UnexpectedNewLineInString:"Unexpected newline while consuming a string token.",UnexpectedEOFInString:"Unexpected EOF while consuming a string token.",UnexpectedEOFInComment:"Unexpected EOF while consuming a comment.",UnexpectedEOFInURL:"Unexpected EOF while consuming a url token.",UnexpectedEOFInEscapedCodePoint:"Unexpected EOF while consuming an escaped code point.",UnexpectedCharacterInURL:"Unexpected character while consuming a url token.",InvalidEscapeSequenceInURL:"Invalid escape sequence while consuming a url token.",InvalidEscapeSequenceAfterBackslash:'Invalid escape sequence after "\\"'};class jt{cursor=0;source="";codePointSource=[];representationIndices=[-1];length=0;representationStart=0;representationEnd=-1;constructor(e){this.source=e;{let t=-1,n="";for(n of e)t+=n.length,this.codePointSource.push(n.codePointAt(0)),this.representationIndices.push(t)}this.length=this.codePointSource.length}advanceCodePoint(e=1){this.cursor=this.cursor+e,this.representationEnd=this.representationIndices[this.cursor]}readCodePoint(e=1){const t=this.codePointSource[this.cursor];return void 0!==t&&(this.cursor=this.cursor+e,this.representationEnd=this.representationIndices[this.cursor],t)}unreadCodePoint(e=1){this.cursor=this.cursor-e,this.representationEnd=this.representationIndices[this.cursor]}resetRepresentation(){this.representationStart=this.representationIndices[this.cursor]+1,this.representationEnd=-1}}function Bt(...e){let t="";for(let n=0;n<e.length;n++)t+=e[n][1];return t}"undefined"!=typeof globalThis&&globalThis;const Ft=39,Ut=8,qt=13,Gt=9,Vt=127,Wt=12,Ht=46,zt=45,Yt=31,Qt=69,Kt=101,Xt=40,Zt=10,Jt=11,en=95,tn=1114111,nn=0,rn=37,on=43,sn=34,an=65533,ln=92,cn=41,un=14,dn=32,hn=117,pn=85,fn=114,vn=82,gn=108,mn=76;function _n(e){return e>=48&&e<=57}function bn(e){return _n(e)||e>=97&&e<=102||e>=65&&e<=70}function $n(e){return function(e){return function(e){return e>=97&&e<=122}(e)||function(e){return e>=65&&e<=90}(e)}(e)||function(e){return 183===e||8204===e||8205===e||8255===e||8256===e||8204===e||192<=e&&e<=214||216<=e&&e<=246||248<=e&&e<=893||895<=e&&e<=8191||8304<=e&&e<=8591||11264<=e&&e<=12271||12289<=e&&e<=55295||63744<=e&&e<=64975||65008<=e&&e<=65533||e>=65536}(e)||e===en}function yn(e){return $n(e)||_n(e)||e===zt}function Sn(e){return e===Zt||e===qt||e===Wt}function Cn(e){return e===dn||e===Zt||e===Gt||e===qt||e===Wt}function wn(e){return e.codePointSource[e.cursor]===ln&&!Sn(e.codePointSource[e.cursor+1])}function En(e,t){return t.codePointSource[t.cursor]===zt?t.codePointSource[t.cursor+1]===zt||!!$n(t.codePointSource[t.cursor+1])||t.codePointSource[t.cursor+1]===ln&&!Sn(t.codePointSource[t.cursor+2]):!!$n(t.codePointSource[t.cursor])||wn(t)}function Nn(e){return e.codePointSource[e.cursor]===on||e.codePointSource[e.cursor]===zt?!!_n(e.codePointSource[e.cursor+1])||e.codePointSource[e.cursor+1]===Ht&&_n(e.codePointSource[e.cursor+2]):e.codePointSource[e.cursor]===Ht?_n(e.codePointSource[e.cursor+1]):_n(e.codePointSource[e.cursor])}var kn,On,Pn;function xn(e,t){const n=t.readCodePoint();if(!1===n)return e.onParseError(new At(Dt.UnexpectedEOFInEscapedCodePoint,t.representationStart,t.representationEnd,["4.3.7. Consume an escaped code point","Unexpected EOF"])),an;if(bn(n)){const e=[n];for(;void 0!==t.codePointSource[t.cursor]&&bn(t.codePointSource[t.cursor])&&e.length<6;)e.push(t.codePointSource[t.cursor]),t.advanceCodePoint();Cn(t.codePointSource[t.cursor])&&t.advanceCodePoint();const o=parseInt(String.fromCodePoint(...e),16);return 0===o||(r=o)>=55296&&r<=57343||o>tn?an:o}var r;return n}function Tn(e,t){const n=[];for(;;)if(yn(t.codePointSource[t.cursor]))n.push(t.codePointSource[t.cursor]),t.advanceCodePoint();else{if(!wn(t))return n;t.advanceCodePoint(),n.push(xn(e,t))}}function In(e,t){let n;{const e=t.codePointSource[t.cursor];e===zt?n="-":e===on&&(n="+")}const r=function(e,t){let n=On.Integer;for(t.codePointSource[t.cursor]!==on&&t.codePointSource[t.cursor]!==zt||t.advanceCodePoint();_n(t.codePointSource[t.cursor]);)t.advanceCodePoint();if(t.codePointSource[t.cursor]===Ht&&_n(t.codePointSource[t.cursor+1]))for(t.advanceCodePoint(2),n=On.Number;_n(t.codePointSource[t.cursor]);)t.advanceCodePoint();if(t.codePointSource[t.cursor]===Kt||t.codePointSource[t.cursor]===Qt){if(_n(t.codePointSource[t.cursor+1]))t.advanceCodePoint(2);else{if(t.codePointSource[t.cursor+1]!==zt&&t.codePointSource[t.cursor+1]!==on||!_n(t.codePointSource[t.cursor+2]))return n;t.advanceCodePoint(3)}for(n=On.Number;_n(t.codePointSource[t.cursor]);)t.advanceCodePoint()}return n}(0,t),o=parseFloat(t.source.slice(t.representationStart,t.representationEnd+1));if(En(0,t)){const i=Tn(e,t);return[kn.Dimension,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:o,signCharacter:n,type:r,unit:String.fromCodePoint(...i)}]}return t.codePointSource[t.cursor]===rn?(t.advanceCodePoint(),[kn.Percentage,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:o,signCharacter:n}]):[kn.Number,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:o,signCharacter:n,type:r}]}function Mn(e,t){for(;;){if(void 0===t.codePointSource[t.cursor])return;if(t.codePointSource[t.cursor]===cn)return void t.advanceCodePoint();wn(t)?(t.advanceCodePoint(),xn(e,t)):t.advanceCodePoint()}}function Rn(e,t){const n=Tn(e,t);if(t.codePointSource[t.cursor]!==Xt)return[kn.Ident,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:String.fromCodePoint(...n)}];if(function(e){return!(3!==e.length||e[0]!==hn&&e[0]!==pn||e[1]!==fn&&e[1]!==vn||e[2]!==gn&&e[2]!==mn)}(n)){t.advanceCodePoint();let r=0;for(;;){const e=Cn(t.codePointSource[t.cursor]),o=Cn(t.codePointSource[t.cursor+1]);if(e&&o){r+=1,t.advanceCodePoint(1);continue}const i=e?t.codePointSource[t.cursor+1]:t.codePointSource[t.cursor];if(i===sn||i===Ft)return r>0&&t.unreadCodePoint(r),[kn.Function,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:String.fromCodePoint(...n)}];break}return function(e,t){for(;Cn(t.codePointSource[t.cursor]);)t.advanceCodePoint();let n="";for(;;){if(void 0===t.codePointSource[t.cursor]){const r=[kn.URL,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:n}];return e.onParseError(new Lt(Dt.UnexpectedEOFInURL,t.representationStart,t.representationEnd,["4.3.6. Consume a url token","Unexpected EOF"],r)),r}if(t.codePointSource[t.cursor]===cn)return t.advanceCodePoint(),[kn.URL,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:n}];if(Cn(t.codePointSource[t.cursor])){for(t.advanceCodePoint();Cn(t.codePointSource[t.cursor]);)t.advanceCodePoint();if(void 0===t.codePointSource[t.cursor]){const r=[kn.URL,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:n}];return e.onParseError(new Lt(Dt.UnexpectedEOFInURL,t.representationStart,t.representationEnd,["4.3.6. Consume a url token","Consume as much whitespace as possible","Unexpected EOF"],r)),r}return t.codePointSource[t.cursor]===cn?(t.advanceCodePoint(),[kn.URL,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:n}]):(Mn(e,t),[kn.BadURL,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,void 0])}if(t.codePointSource[t.cursor]===sn||t.codePointSource[t.cursor]===Ft||t.codePointSource[t.cursor]===Xt||(r=t.codePointSource[t.cursor])===Jt||r===Vt||nn<=r&&r<=Ut||un<=r&&r<=Yt){Mn(e,t);const n=[kn.BadURL,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,void 0];return e.onParseError(new Lt(Dt.UnexpectedCharacterInURL,t.representationStart,t.representationEnd,["4.3.6. Consume a url token","Unexpected U+0022 QUOTATION MARK (\"), U+0027 APOSTROPHE ('), U+0028 LEFT PARENTHESIS (() or non-printable code point"],n)),n}if(t.codePointSource[t.cursor]===ln){if(wn(t)){t.advanceCodePoint(),n+=String.fromCodePoint(xn(e,t));continue}Mn(e,t);const r=[kn.BadURL,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,void 0];return e.onParseError(new Lt(Dt.InvalidEscapeSequenceInURL,t.representationStart,t.representationEnd,["4.3.6. Consume a url token","U+005C REVERSE SOLIDUS (\\)","The input stream does not start with a valid escape sequence"],r)),r}n+=String.fromCodePoint(t.codePointSource[t.cursor]),t.advanceCodePoint()}var r}(e,t)}return t.advanceCodePoint(),[kn.Function,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:String.fromCodePoint(...n)}]}function An(e,t){const n=function(e,t){const n=e.css.valueOf(),r=e.unicodeRangesAllowed??!1,o=new jt(n),i={onParseError:t?.onParseError??Ln};return{nextToken:function(){o.resetRepresentation();const e=o.codePointSource[o.cursor];if(void 0===e)return[kn.EOF,"",-1,-1,void 0];if(47===e&&function(e){return 47===e.codePointSource[e.cursor]&&42===e.codePointSource[e.cursor+1]}(o))return function(e,t){for(t.advanceCodePoint(2);;){const n=t.readCodePoint();if(!1===n){const n=[kn.Comment,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,void 0];return e.onParseError(new Lt(Dt.UnexpectedEOFInComment,t.representationStart,t.representationEnd,["4.3.2. Consume comments","Unexpected EOF"],n)),n}if(42===n&&void 0!==t.codePointSource[t.cursor]&&47===t.codePointSource[t.cursor]){t.advanceCodePoint();break}}return[kn.Comment,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,void 0]}(i,o);if(r&&(e===hn||e===pn)&&function(e){return!(e.codePointSource[e.cursor]!==hn&&e.codePointSource[e.cursor]!==pn||e.codePointSource[e.cursor+1]!==on||63!==e.codePointSource[e.cursor+2]&&!bn(e.codePointSource[e.cursor+2]))}(o))return function(e,t){t.advanceCodePoint(2);const n=[],r=[];for(;void 0!==t.codePointSource[t.cursor]&&n.length<6&&bn(t.codePointSource[t.cursor]);)n.push(t.codePointSource[t.cursor]),t.advanceCodePoint();for(;void 0!==t.codePointSource[t.cursor]&&n.length<6&&63===t.codePointSource[t.cursor];)0===r.length&&r.push(...n),n.push(48),r.push(70),t.advanceCodePoint();if(!r.length&&t.codePointSource[t.cursor]===zt&&bn(t.codePointSource[t.cursor+1]))for(t.advanceCodePoint();void 0!==t.codePointSource[t.cursor]&&r.length<6&&bn(t.codePointSource[t.cursor]);)r.push(t.codePointSource[t.cursor]),t.advanceCodePoint();if(!r.length){const e=parseInt(String.fromCodePoint(...n),16);return[kn.UnicodeRange,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{startOfRange:e,endOfRange:e}]}const o=parseInt(String.fromCodePoint(...n),16),i=parseInt(String.fromCodePoint(...r),16);return[kn.UnicodeRange,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{startOfRange:o,endOfRange:i}]}(0,o);if($n(e))return Rn(i,o);if(_n(e))return In(i,o);switch(e){case 44:return o.advanceCodePoint(),[kn.Comma,",",o.representationStart,o.representationEnd,void 0];case 58:return o.advanceCodePoint(),[kn.Colon,":",o.representationStart,o.representationEnd,void 0];case 59:return o.advanceCodePoint(),[kn.Semicolon,";",o.representationStart,o.representationEnd,void 0];case Xt:return o.advanceCodePoint(),[kn.OpenParen,"(",o.representationStart,o.representationEnd,void 0];case cn:return o.advanceCodePoint(),[kn.CloseParen,")",o.representationStart,o.representationEnd,void 0];case 91:return o.advanceCodePoint(),[kn.OpenSquare,"[",o.representationStart,o.representationEnd,void 0];case 93:return o.advanceCodePoint(),[kn.CloseSquare,"]",o.representationStart,o.representationEnd,void 0];case 123:return o.advanceCodePoint(),[kn.OpenCurly,"{",o.representationStart,o.representationEnd,void 0];case 125:return o.advanceCodePoint(),[kn.CloseCurly,"}",o.representationStart,o.representationEnd,void 0];case Ft:case sn:return function(e,t){let n="";const r=t.readCodePoint();for(;;){const o=t.readCodePoint();if(!1===o){const r=[kn.String,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:n}];return e.onParseError(new Lt(Dt.UnexpectedEOFInString,t.representationStart,t.representationEnd,["4.3.5. Consume a string token","Unexpected EOF"],r)),r}if(Sn(o)){t.unreadCodePoint();const n=[kn.BadString,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,void 0];return e.onParseError(new Lt(Dt.UnexpectedNewLineInString,t.representationStart,t.codePointSource[t.cursor]===qt&&t.codePointSource[t.cursor+1]===Zt?t.representationEnd+2:t.representationEnd+1,["4.3.5. Consume a string token","Unexpected newline"],n)),n}if(o===r)return[kn.String,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:n}];if(o!==ln)n+=String.fromCodePoint(o);else{if(void 0===t.codePointSource[t.cursor])continue;if(Sn(t.codePointSource[t.cursor])){t.codePointSource[t.cursor]===qt&&t.codePointSource[t.cursor+1]===Zt&&t.advanceCodePoint(),t.advanceCodePoint();continue}n+=String.fromCodePoint(xn(e,t))}}}(i,o);case 35:return function(e,t){if(t.advanceCodePoint(),void 0!==t.codePointSource[t.cursor]&&(yn(t.codePointSource[t.cursor])||wn(t))){let n=Pn.Unrestricted;En(0,t)&&(n=Pn.ID);const r=Tn(e,t);return[kn.Hash,t.source.slice(t.representationStart,t.representationEnd+1),t.representationStart,t.representationEnd,{value:String.fromCodePoint(...r),type:n}]}return[kn.Delim,"#",t.representationStart,t.representationEnd,{value:"#"}]}(i,o);case on:case Ht:return Nn(o)?In(i,o):(o.advanceCodePoint(),[kn.Delim,o.source[o.representationStart],o.representationStart,o.representationEnd,{value:o.source[o.representationStart]}]);case Zt:case qt:case Wt:case Gt:case dn:return function(e){for(;Cn(e.codePointSource[e.cursor]);)e.advanceCodePoint();return[kn.Whitespace,e.source.slice(e.representationStart,e.representationEnd+1),e.representationStart,e.representationEnd,void 0]}(o);case zt:return Nn(o)?In(i,o):function(e){return e.codePointSource[e.cursor]===zt&&e.codePointSource[e.cursor+1]===zt&&62===e.codePointSource[e.cursor+2]}(o)?(o.advanceCodePoint(3),[kn.CDC,"--\x3e",o.representationStart,o.representationEnd,void 0]):En(0,o)?Rn(i,o):(o.advanceCodePoint(),[kn.Delim,"-",o.representationStart,o.representationEnd,{value:"-"}]);case 60:return function(e){return 60===e.codePointSource[e.cursor]&&33===e.codePointSource[e.cursor+1]&&e.codePointSource[e.cursor+2]===zt&&e.codePointSource[e.cursor+3]===zt}(o)?(o.advanceCodePoint(4),[kn.CDO,"\x3c!--",o.representationStart,o.representationEnd,void 0]):(o.advanceCodePoint(),[kn.Delim,"<",o.representationStart,o.representationEnd,{value:"<"}]);case 64:if(o.advanceCodePoint(),En(0,o)){const e=Tn(i,o);return[kn.AtKeyword,o.source.slice(o.representationStart,o.representationEnd+1),o.representationStart,o.representationEnd,{value:String.fromCodePoint(...e)}]}return[kn.Delim,"@",o.representationStart,o.representationEnd,{value:"@"}];case ln:{if(wn(o))return Rn(i,o);o.advanceCodePoint();const e=[kn.Delim,"\\",o.representationStart,o.representationEnd,{value:"\\"}];return i.onParseError(new Lt(Dt.InvalidEscapeSequenceAfterBackslash,o.representationStart,o.representationEnd,["4.3.1. Consume a token","U+005C REVERSE SOLIDUS (\\)","The input stream does not start with a valid escape sequence"],e)),e}}return o.advanceCodePoint(),[kn.Delim,o.source[o.representationStart],o.representationStart,o.representationEnd,{value:o.source[o.representationStart]}]},endOfFile:function(){return void 0===o.codePointSource[o.cursor]}}}(e,t),r=[];{for(;!n.endOfFile();){const e=n.nextToken();e&&r.push(e)}const e=n.nextToken();e&&r.push(e)}return r}function Ln(){}!function(e){e.Comment="comment",e.AtKeyword="at-keyword-token",e.BadString="bad-string-token",e.BadURL="bad-url-token",e.CDC="CDC-token",e.CDO="CDO-token",e.Colon="colon-token",e.Comma="comma-token",e.Delim="delim-token",e.Dimension="dimension-token",e.EOF="EOF-token",e.Function="function-token",e.Hash="hash-token",e.Ident="ident-token",e.Number="number-token",e.Percentage="percentage-token",e.Semicolon="semicolon-token",e.String="string-token",e.URL="url-token",e.Whitespace="whitespace-token",e.OpenParen="(-token",e.CloseParen=")-token",e.OpenSquare="[-token",e.CloseSquare="]-token",e.OpenCurly="{-token",e.CloseCurly="}-token",e.UnicodeRange="unicode-range-token"}(kn||(kn={})),function(e){e.Integer="integer",e.Number="number"}(On||(On={})),function(e){e.Unrestricted="unrestricted",e.ID="id"}(Pn||(Pn={})),Object.values(kn);var Dn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];console.warn.apply(console,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}(["[glass-easel-miniprogram-agent] ".concat(e)],t,!1))},jn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},Bn=function(e){throw new Error('"'.concat(e,'" is not supported by the backend'))},Fn=function(e,t){return new Promise((function(n){if(3===e.mode){var r=t.getBoundingClientRect(),o=r.left,i=r.top,s=r.width,a=r.height;n({left:o,top:i,width:s,height:a})}else t.getBoundingClientRect?t.getBoundingClientRect((function(e){n(e)})):Bn("Element#getBoundingClientRect")}))},Un=function(e,t){return new Promise((function(n){var r=[];3===e.mode?"function"==typeof e.getAllComputedStyles?e.getAllComputedStyles(t,(function(e){r=e.properties,n({properties:r})})):Bn("Context#getAllComputedStyles"):"getAllComputedStyles"in t?t.getAllComputedStyles((function(e){r=e.properties,n({properties:r})})):Bn("Element#getAllComputedStyles")}))},qn=function(e,t){var n=function(e){return e.endsWith("px")?Number(e.slice(0,-2)):NaN};return new Promise((function(r){"getBoxModel"in t?t.getBoxModel((function(e){r(e)})):Promise.resolve().then((function(){return o=void 0,i=void 0,a=function(){var o,i,s,a,l,c,u,d,h,p,f,v,g,m,_,b;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}(this,(function($){switch($.label){case 0:return[4,Fn(e,t)];case 1:return o=$.sent(),[4,Un(e,t)];case 2:return i=$.sent(),s=NaN,a=NaN,l=NaN,c=NaN,u=NaN,d=NaN,h=NaN,p=NaN,f=NaN,v=NaN,g=NaN,m=NaN,i.properties.forEach((function(e){var t=e.name,r=e.value;"margin-left"===t&&(s=n(r)),"margin-top"===t&&(a=n(r)),"margin-right"===t&&(l=n(r)),"margin-bottom"===t&&(c=n(r)),"padding-left"===t&&(u=n(r)),"padding-top"===t&&(d=n(r)),"padding-right"===t&&(h=n(r)),"padding-bottom"===t&&(p=n(r)),"border-left-width"===t&&(f=n(r)),"border-top-width"===t&&(v=n(r)),"border-right-width"===t&&(g=n(r)),"border-bottom-width"===t&&(m=n(r))})),_={left:o.left-s,top:o.top-a,width:o.width+s+l,height:o.height+a+c},b={left:o.left+f,top:o.top+v,width:o.width-f-g,height:o.height-v-m},r({margin:_,border:o,padding:b,content:{left:b.left+u,top:b.top+d,width:b.width-u-h,height:b.height-d-p}}),[2]}}))},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{l(a.next(e))}catch(e){t(e)}}function r(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var o;t.done?e(t.value):(o=t.value,o instanceof s?o:new s((function(e){e(o)}))).then(n,r)}l((a=a.apply(o,i||[])).next())}));var o,i,s,a}))}))},Gn=function(e,t,n){return void 0===e||e[0]!==t?null:void 0===n?e[1]:n===e[1]?n:null},Vn=function(e){var t=[],n=An({css:e});if(0===n.length)return null;for(var r=0,o=0;o<n.length;o+=1){var i=n[o];if(Gn(i,kn.Colon)){for(var s=Bt.apply(void 0,n.slice(r,o)).trim(),a=o+=1;o<n.length;o+=1){var l=n[o];if(Gn(l,kn.Semicolon))break}var c=Bt.apply(void 0,n.slice(a,o)).trim();t.push({name:s,value:c,disabled:!1}),r=o+1}}return t},Wn=function(e){return e.map((function(e){return{name:e.name.trim(),value:e.value.trim(),disabled:!1,important:e.important}}))},Hn=function(){function e(e){this.props=Wn(e)}return e.fromMaybeInlineStyle=function(t,n){var r;if(void 0===n)return new e(t);var o=new e([]);return o.props=null!==(r=Vn(n))&&void 0!==r?r:[],o},e.prototype.updateWithProps=function(e,t){var n,r=this,o=this.props;this.props=void 0===t?Wn(e):null!==(n=Vn(t))&&void 0!==n?n:[];var i=0;o.forEach((function(e){for(e.disabled&&(r.props.splice(i,0,e),i+=1);i<r.props.length&&(i+=1,e.name!==r.props[i-1].name););}))},e.prototype.getProps=function(){return this.props.slice()},e.prototype.clear=function(){this.props.length=0},e.prototype.countProps=function(){return this.props.length},e.prototype.append=function(e){var t,n,r=null!==(n=Vn(e))&&void 0!==n?n:[];(t=this.props).push.apply(t,r)},e.prototype.setDisabled=function(e,t){return!(e>=this.props.length||(this.props[e].disabled=t,0))},e.prototype.remove=function(e){return!(e>=this.props.length||(this.props.splice(e,1),0))},e.prototype.replace=function(e,t){var n,r;if(e>=this.props.length)return!1;var o=null!==(r=Vn(t))&&void 0!==r?r:[];return(n=this.props).splice.apply(n,function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e,1],o,!1)),!0},e.prototype.stringify=function(){return this.props.map((function(e){var t=e.name,n=e.value,r=e.important;return e.disabled?"":r?"".concat(t,": ").concat(n," !important;\n"):"".concat(t,": ").concat(n,";\n")})).join("")},e}(),zn=function(){function e(){this.inlineStyleMap=new WeakMap,this.ruleMap=new WeakMap}return e.prototype.createOrGetInline=function(e,t,n){var r=this.inlineStyleMap.get(e);if(r)return r.updateWithProps(t,n),r;var o=Hn.fromMaybeInlineStyle(t,n);return this.inlineStyleMap.set(e,o),o},e.prototype.createOrGetRule=function(e,t,n){var r="".concat(t.sheetIndex.toString(),"/").concat(t.ruleIndex.toString()),o=this.ruleMap.get(e);if(!o){var i=Object.create(null);return i[r]=Hn.fromMaybeInlineStyle(t.properties,n),this.ruleMap.set(e,i),i[r]}return o[r]?(o[r].updateWithProps(t.properties,n),o[r]):(o[r]=Hn.fromMaybeInlineStyle(t.properties,n),o[r])},e.prototype.updateInline=function(e,t,n){var r=this.inlineStyleMap.get(t);if(r){n(r);var o=r.stringify();3===e.mode?t.setAttribute("style",o):2===e.mode?t.setStyle(o):1===e.mode&&t.setStyle(o,0)}},e.prototype.updateRule=function(e,t,n,r){var o,i="".concat(t.toString(),"/").concat(n.toString()),s=null===(o=this.ruleMap.get(e))||void 0===o?void 0:o[i];if(!s)return Promise.resolve();r(s);var a=s.stringify();return new Promise((function(r){var o;null===(o=e.replaceStyleSheetAllProperties)||void 0===o||o.call(e,t,n,a,(function(){r()}))}))},e}(),Yn=new zn,Qn=function(){function e(){this.list=[]}return e.prototype.update=function(e){var t=this,n=this.list;this.list=e.map((function(e){return{className:e,disabled:!1}}));var r=0;return n.forEach((function(e){for(e.disabled&&(t.list.splice(r,0,e),r+=1);r<t.list.length&&(r+=1,e.className!==t.list[r-1].className););})),this},e.prototype.setDisabled=function(e,t){var n=this.list.find((function(t){return t.className===e}));n&&(n.disabled=t)},e.prototype.getClasses=function(){return this.list.slice()},e.prototype.setClasses=function(e){var t=this;this.list=[],e.forEach((function(e){var n=e.className,r=e.disabled;n.split(/\s+/g).forEach((function(e){e&&t.list.push({className:e,disabled:!!r})}))}))},e.prototype.stringify=function(){return this.list.filter((function(e){return!e.disabled})).map((function(e){return e.className})).join(" ")},e.prototype.matches=function(e){return this.stringify()===e},e}(),Kn=new(function(){function e(){this.map=new WeakMap}return e.prototype.createOrGet=function(e,t){if(!this.map.get(t)){var n=Object.create(null);this.map.set(t,n)}var r=this.map.get(t),o=null!=e?e:"";return r[o]||(r[o]=new Qn),r[o]},e}()),Xn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},Zn=function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}},Jn=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},er=function(e,t,n){if(257===t)return"#text";if(258===t)return e.asNativeNode().is;if(259===t){var r=e.asGeneralComponent();return n?r.is:r.tagName}return 260===t||261===t?e.asVirtualNode().is:"UNKNOWN"},tr=function(){function e(e){this.nodeIdMap=new WeakMap,this.activeNodes=Object.create(null),this.activeBackendNodes=Object.create(null),this.documentNodeId=1,this.nodeIdInc=2,this.mountPoints=[],this.selectedNodeId=0,this.conn=e,this.init()}return e.prototype.init=function(){var e=this;this.conn.setRequestHandler("DOM.describeNode",(function(t){return Xn(e,void 0,void 0,(function(){var e,n,r,o;return Zn(this,(function(i){if(void 0!==t.nodeId)n=this.queryActiveNode(t.nodeId),e=this.collectNodeDetails(n,null!==(r=t.depth)&&void 0!==r?r:0,!1);else{if(void 0===t.backendNodeId)throw new Error("missing (backend) node id");if(!(n=this.activateBackendNodeIfNeeded(t.backendNodeId)))throw new Error("no such node found");e=this.collectNodeDetails(n,null!==(o=t.depth)&&void 0!==o?o:0,!1)}return[2,{node:e}]}))}))})),this.conn.setRequestHandler("DOM.getDocument",(function(t){return Xn(e,[t],void 0,(function(e){var t,n=this,r=e.depth;return Zn(this,(function(e){return r&&r>1&&(t=this.mountPoints.map((function(e){var t=e.nodeMeta;return n.collectNodeDetails(t,r-1,!0)}))),[2,{root:{backendNodeId:this.documentNodeId,nodeType:Pt(256),glassEaselNodeType:256,nodeName:"#document",virtual:!0,inheritSlots:!1,nodeId:this.documentNodeId,localName:"#document",nodeValue:"",attributes:[],glassEaselAttributeCount:0,children:t}}]}))}))})),this.conn.setRequestHandler("DOM.setInspectedNode",(function(t){return Xn(e,[t],void 0,(function(e){var t=e.nodeId;return Zn(this,(function(e){return this.queryActiveNode(t).node.asElement()?(this.selectedNodeId=t,[2]):[2]}))}))})),this.conn.setRequestHandler("DOM.requestChildNodes",(function(t){return Xn(e,[t],void 0,(function(e){var t,n=e.nodeId;return Zn(this,(function(e){return t=this.queryActiveNode(n),this.sendChildNodes(t),[2]}))}))})),this.conn.setRequestHandler("DOM.getGlassEaselAttributes",(function(t){return Xn(e,[t],void 0,(function(e){var t,n,r,o,i,s,a,l,c,u,d,h,p,f,v,g,m,_,b,$,y,S,C,w,E,N,k=e.nodeId;return Zn(this,(function(e){return t=this.queryActiveNode(k).node,(n=t.asElement())?(r=n.asGeneralComponent(),o=n.asNativeNode(),i=n.asVirtualNode(),s=256,r&&(s=259),o&&(s=258),i&&(s=i.isInheritSlots()?261:260),a=n.isVirtual(),l="",r&&(l=r.is),o&&(l=o.is),i&&(l=i.is),c=n.id,u=Kn.createOrGet("",n),d=u.update(n.class.split(/\s+/g).filter((function(e){return e}))).getClasses(),h=n.slot,"string"==typeof(f=Reflect.get(n,"_$slotName"))&&(p=f),"object"==typeof(g=Reflect.get(n,"_$slotValues"))&&null!==g&&(v=[],Object.entries(g).forEach((function(e){var t=e[0],n=e[1];v.push({name:t,value:kt(n)})}))),m=[],"object"==typeof(_=Reflect.get(n,"_$eventTarget"))&&null!==_&&(b=function(e,t){"object"==typeof t&&null!==t&&Object.entries(t).forEach((function(t){var n,r,o,i,s,a=t[0],l=t[1],c=null!==(o=null===(r=null===(n=l.funcArr)||void 0===n?void 0:n._$arr)||void 0===r?void 0:r.length)&&void 0!==o?o:0;if(c>0){var u=(null!==(i=l.finalCount)&&void 0!==i?i:0)>0,d=(null!==(s=l.mutCount)&&void 0!==s?s:0)>0;m.push({name:a,capture:e,count:c,hasCatch:u,hasMutBind:d})}}))},b(!0,_.captureListeners),b(!1,_.listeners)),o&&($=[],n.attributes.forEach((function(e){var t=e.name,n=e.value;$.push({name:t,value:kt(n)})}))),r&&(y=[],r.getComponentDefinition().behavior.listProperties().forEach((function(e){y.push({name:e,value:kt(r.data[e])})})),C=r.getExternalClasses(),S=Object.entries(C).map((function(e){var t=e[0],r=e[1];return{name:t,value:Kn.createOrGet(t,n).update(null!=r?r:[]).getClasses()}}))),w=[],Object.entries(n.dataset).forEach((function(e){var t=e[0],n=e[1];w.push({name:t,value:kt(n)})})),E=[],N=Reflect.get(n,"_$marks"),Object.entries(null!=N?N:{}).forEach((function(e){var t=e[0],n=e[1];E.push({name:t,value:kt(n)})})),[2,{glassEaselNodeType:s,virtual:a,is:l,id:c,classes:d,slot:h,slotName:p,slotValues:v,eventBindings:m,normalAttributes:$,properties:y,externalClasses:S,dataset:w,marks:E}]):[2,{glassEaselNodeType:257,virtual:!1,is:"",id:"",classes:[],slot:"",slotName:void 0,slotValues:void 0,eventBindings:[],dataset:[],marks:[]}]}))}))})),this.conn.setRequestHandler("DOM.setAttributeValue",(function(t){return Xn(e,[t],void 0,(function(e){var t,n,r,o,i,s,a,l,c=e.nodeId,u=e.name,d=e.value,h=e.nameType;return Zn(this,(function(e){return t=this.queryActiveNode(c).node,(n=t.asElement())?("normal-attribute"===h?n.setAttribute(u,d):"property"===h?null==(s=n.asGeneralComponent())||s.setData(((a={})[u]=d,a)):"external-class"===h?null==(s=n.asGeneralComponent())||s.setExternalClass(u,d):"id"===u?n.id=d:"class"===u?n.class=d:"slot"===u?n.slot=d:u.indexOf(":")>=0?(r=u.split(":",2),o=r[0],i=r[1],"dataset"===o?n.setDataset(i,d):"mark"===o&&n.setMark(i,d)):((s=n.asGeneralComponent())&&(s.getComponentDefinition().behavior.listProperties().includes(u)?s.setData(((l={})[u]=d,l)):Object.keys(s.getExternalClasses()).includes(u)&&s.setExternalClass(u,d)),n.setAttribute(u,d)),[2,void 0]):[2,void 0]}))}))})),this.conn.setRequestHandler("DOM.setGlassEaselClassList",(function(t){return Xn(e,[t],void 0,(function(e){var t,n,r,o,i=e.nodeId,s=e.externalClass,a=e.classes;return Zn(this,(function(e){return t=this.queryActiveNode(i).node,(n=t.asElement())?((r=Kn.createOrGet(null!=s?s:"",n)).setClasses(a),s?null==(o=n.asGeneralComponent())||o.setExternalClass(s,r.stringify()):n.class=r.stringify(),[2,{classes:r.getClasses()}]):[2,{classes:[]}]}))}))})),this.conn.setRequestHandler("DOM.setNodeValue",(function(t){return Xn(e,[t],void 0,(function(e){var t,n,r=e.nodeId,o=e.value;return Zn(this,(function(e){return t=this.queryActiveNode(r).node,(n=t.asTextNode())?(n.textContent=o,[2,void 0]):[2,void 0]}))}))})),this.conn.setRequestHandler("DOM.getGlassEaselNonInheritComposedChildren",(function(t){return Xn(e,[t],void 0,(function(e){var t,n,r,o=this,i=e.nodeId;return Zn(this,(function(e){return t=this.queryActiveNode(i).node,(n=t.asElement())?(r=[],n.isInheritSlots()?n.childNodes.forEach((function(e){var t=o.activateNode(e);r.push(o.collectNodeDetails(t,0,!1))})):n.forEachComposedChild((function(e){var t;if(!(null===(t=e.parentNode)||void 0===t?void 0:t.isInheritSlots())){var n=o.activateNode(e);r.push(o.collectNodeDetails(n,0,!1))}})),[2,{nodes:r}]):[2,{nodes:[]}]}))}))})),this.conn.setRequestHandler("DOM.pushNodesByBackendIdsToFrontend",(function(t){return Xn(e,[t],void 0,(function(e){var t=this,n=e.backendNodeIds;return Zn(this,(function(e){return n.forEach((function(e){t.activateBackendNodeIfNeeded(e)})),[2,{nodeIds:n}]}))}))})),this.conn.setRequestHandler("DOM.getBoxModel",(function(t){return Xn(e,void 0,void 0,(function(){var e,n,r,o,i,s,a,l,c;return Zn(this,(function(u){switch(u.label){case 0:if(e="nodeId"in t?this.queryActiveNode(t.nodeId).node:this.getMaybeBackendNode(t.backendNodeId),n=null==e?void 0:e.getBackendContext(),r=null==e?void 0:e.getBackendElement(),!n||!r)throw new Error("no such backend node found");return[4,qn(n,r)];case 1:return o=u.sent(),i=o.margin,s=o.border,a=o.padding,l=o.content,c=function(e){var t=[e.left,e.top],n=[e.left+e.width,e.top],r=[e.left,e.top+e.height],o=[e.left+e.width,e.top+e.height];return Jn(Jn(Jn(Jn([],t,!0),n,!0),o,!0),r,!0)},[2,{margin:c(i),border:c(s),padding:c(a),content:c(l),width:l.width,height:l.height}]}}))}))})),this.conn.setRequestHandler("DOM.useGlassEaselElementInConsole",(function(t){return Xn(e,[t],void 0,(function(e){var t,n=e.nodeId;return Zn(this,(function(e){return t=this.queryActiveNode(n).node,[2,{varName:this.useInConsole(t)}]}))}))})),this.conn.setRequestHandler("DOM.useGlassEaselAttributeInConsole",(function(t){return Xn(e,[t],void 0,(function(e){var t,n,r,o,i,s,a=e.nodeId,l=e.attribute;return Zn(this,(function(e){if(t=this.queryActiveNode(a).node,!(r=t.asElement()))throw new Error("not an element");return l.startsWith("data:")?n=r.dataset[l.slice(5)]:l.startsWith("mark:")?(o=Reflect.get(r,"_$marks"),n=null==o?void 0:o[l.slice(5)]):(i=r.asGeneralComponent(),n=i?i.data[l]:null===(s=r.attributes.find((function(e){return e.name===l})))||void 0===s?void 0:s.value),[2,{varName:this.useInConsole(n)}]}))}))})),this.conn.setRequestHandler("CSS.getComputedStyleForNode",(function(t){return Xn(e,[t],void 0,(function(e){var t,n,r,o=e.nodeId;return Zn(this,(function(e){switch(e.label){case 0:if(t=this.queryActiveNode(o).node,n=t.getBackendContext(),r=t.getBackendElement(),!n||!r)throw new Error("no such backend node found");return[4,Un(n,r)];case 1:return[2,{computedStyle:e.sent().properties}]}}))}))})),this.conn.setRequestHandler("CSS.getMatchedStylesForNode",(function(t){return Xn(e,[t],void 0,(function(e){var t,n,r,o,i,s,a,l,c,u=e.nodeId;return Zn(this,(function(e){switch(e.label){case 0:if(t=this.queryActiveNode(u).node,!(n=t.asElement()))throw new Error("not an element");return[4,(d=n,h=function(e,t){var n=t.map((function(t){var n=Yn.createOrGetRule(e,t,t.propertyText);return t.properties=n.getProps(),[Mt(Tt()().astSync(t.selector)),t]}));return n.sort((function(e,t){var n,r,o=e[0],i=e[1],s=t[0],a=t[1],l=(i.weightHighBits||0)-(a.weightHighBits||0);if(0!==l)return l;if(void 0!==i.weightLowBits||void 0!==a.weightLowBits){var c=(null!==(n=i.weightLowBits)&&void 0!==n?n:-1)-(null!==(r=a.weightLowBits)&&void 0!==r?r:-1);if(0!==c)return c}var u=It(o,s);if(0!==u)return u;var d=i.sheetIndex-a.sheetIndex;return 0!==d?d:i.ruleIndex-a.ruleIndex})),n.map((function(e){return e[0],e[1]})).reverse()},new Promise((function(e){var t=d.getBackendContext(),n=d.getBackendElement();if(t&&n)if(3===t.mode)if("function"==typeof t.getMatchedRules)try{t.getMatchedRules(n,(function(r){r.rules.forEach((function(e){var t=An({css:e.selector});if(Gn(t[0],kn.OpenSquare)&&Gn(t[1],kn.Ident,"wx-host")&&Gn(t[2],kn.Delim,"=")&&Gn(t[3],kn.String)&&Gn(t[4],kn.CloseSquare)&&null!==Gn(t[5],kn.EOF))return e.selector=":host",void(e.styleScope=t[3][4].value);for(var n=0;n<t.length;n+=1){var r=t[n];if(Gn(r,kn.Delim,".")){var o=Gn(t[n+1],kn.Ident);if(o){n+=1;var i=o.split("--",2),s=i[0],a=i[1];s!==o&&(e.styleScope=s,t[n][1]=a)}}}e.selector=Bt.apply(void 0,t)})),r.rules=h(t,r.rules);var o=Yn.createOrGetInline(n,r.inline,r.inlineText);r.inline=o.getProps(),e(r)}))}catch(t){e({inline:[],rules:[],crossOriginFailing:!0})}else Bn("Context#getMatchedRules");else"getMatchedRules"in n?n.getMatchedRules((function(r){r.rules=h(t,r.rules);var o=Yn.createOrGetInline(n,r.inline,r.inlineText);r.inline=o.getProps(),e(r)})):Bn("Element#getMatchedRules");else e({inline:[],rules:[]})})))];case 1:return r=e.sent(),o=r.inline,i=r.inlineText,s=r.rules,a=r.crossOriginFailing,l={cssProperties:o,cssText:i},c=s.map((function(e){return{rule:{selectorList:{selectors:[{text:e.selector}],text:e.selector},style:{cssProperties:e.properties,cssText:e.propertyText},media:e.mediaQueries.map((function(e){return{text:e}})),inactive:e.inactive||!1,styleSheetId:e.sheetIndex.toString(),ruleIndex:e.ruleIndex,styleScope:e.styleScope}}})),[2,{inlineStyle:l,matchedCSSRules:c,inherited:[],crossOriginFailing:a}]}var d,h}))}))})),this.conn.setRequestHandler("CSS.replaceGlassEaselStyleSheetProperty",(function(t){return Xn(e,[t],void 0,(function(e){var t,n,r,o,i,s=e.nodeId,a=e.styleSheetId,l=e.ruleIndex,c=e.propertyIndex,u=e.styleText;return Zn(this,(function(e){switch(e.label){case 0:if(t=this.queryActiveNode(s).node,n=t.getBackendContext(),r=t.getBackendElement(),!n||!r)throw new Error("no such backend node found");return o=function(e){e.replace(c,u)},void 0===a?[3,2]:(i=Number(a),[4,Yn.updateRule(n,i,l,o)]);case 1:return e.sent(),[3,3];case 2:Yn.updateInline(n,r,o),e.label=3;case 3:return[2]}}))}))})),this.conn.setRequestHandler("CSS.addGlassEaselStyleSheetProperty",(function(t){return Xn(e,[t],void 0,(function(e){var t,n,r,o,i,s=e.nodeId,a=e.styleSheetId,l=e.ruleIndex,c=e.styleText;return Zn(this,(function(e){switch(e.label){case 0:if(t=this.queryActiveNode(s).node,n=t.getBackendContext(),r=t.getBackendElement(),!n||!r)throw new Error("no such backend node found");return o=function(e){e.append(c)},void 0===a?[3,2]:(i=Number(a),[4,Yn.updateRule(n,i,l,o)]);case 1:return e.sent(),[3,3];case 2:Yn.updateInline(n,r,o),e.label=3;case 3:return[2]}}))}))})),this.conn.setRequestHandler("CSS.setGlassEaselStyleSheetPropertyDisabled",(function(t){return Xn(e,[t],void 0,(function(e){var t,n,r,o,i,s=e.nodeId,a=e.styleSheetId,l=e.ruleIndex,c=e.propertyIndex,u=e.disabled;return Zn(this,(function(e){switch(e.label){case 0:if(t=this.queryActiveNode(s).node,n=t.getBackendContext(),r=t.getBackendElement(),!n||!r)throw new Error("no such backend node found");return o=function(e){e.setDisabled(c,u)},void 0===a?[3,2]:(i=Number(a),[4,Yn.updateRule(n,i,l,o)]);case 1:return e.sent(),[3,3];case 2:Yn.updateInline(n,r,o),e.label=3;case 3:return[2]}}))}))})),this.conn.setRequestHandler("Overlay.setInspectMode",(function(t){return Xn(e,[t],void 0,(function(e){var t,n=this,r=e.mode;return Zn(this,(function(e){return"searchForNode"===r?(t=0,this.listOverlayComponents().forEach((function(e){return e.startNodeSelect((function(e,r){if(r){if(n.listOverlayComponents().forEach((function(e){return e.endNodeSelect()})),e){var o=n.addBackendNode(e);n.conn.sendEvent("Overlay.inspectNodeRequested",{backendNodeId:o})}n.conn.sendEvent("Overlay.inspectModeCanceled",{})}else{var i=e?n.getNodeId(e):0;n.activeNodes[i]||(i=0),t!==i&&(t=i,n.conn.sendEvent("Overlay.nodeHighlightRequested",{nodeId:i}))}}))}))):this.listOverlayComponents().forEach((function(e){return e.endNodeSelect()})),[2]}))}))})),this.conn.setRequestHandler("Overlay.highlightNode",(function(t){return Xn(e,void 0,void 0,(function(){var e,n;return Zn(this,(function(r){if("nodeId"in t)e=this.queryActiveNode(t.nodeId).node;else{if(!(n=this.getMaybeBackendNode(t.backendNodeId)))throw new Error("no such node found");e=n}return this.listOverlayComponents().forEach((function(e){e.highlight(null)})),this.getOverlayComponent(e).highlight(e),[2]}))}))})),this.conn.setRequestHandler("Overlay.hideHighlight",(function(){return Xn(e,void 0,void 0,(function(){return Zn(this,(function(e){return this.listOverlayComponents().forEach((function(e){e.highlight(null)})),[2]}))}))}))},e.prototype.attach=function(e,t){var n=this.activateNode(e),r=this.mountPoints.length>0?this.mountPoints[this.mountPoints.length-1]:null,o=r?r.nodeMeta.nodeId:void 0;this.mountPoints.push({nodeMeta:n,env:t}),this.conn.sendEvent("DOM.childNodeInserted",{parentNodeId:this.documentNodeId,previousNodeId:null!=o?o:0,node:this.collectNodeDetails(n,0,!0)}),this.conn.sendEvent("DOM.childNodeCountUpdated",{nodeId:this.documentNodeId,childNodeCount:this.mountPoints.length})},e.prototype.detach=function(e){var t=this.mountPoints.findIndex((function(t){return t.nodeMeta.node===e}));if(t<0)Dn("no such mount point to remove");else{this.mountPoints.splice(t,1);var n=this.deactivateNodeTree(e);n&&(this.conn.sendEvent("DOM.childNodeRemoved",{parentNodeId:this.documentNodeId,nodeId:n}),this.conn.sendEvent("DOM.childNodeCountUpdated",{nodeId:this.documentNodeId,childNodeCount:this.mountPoints.length}))}},e.prototype.getOverlayComponent=function(e){var t=e.getBackendContext();if(!t)throw new Error("backend context has been released");return this.conn.getOverlayComponent(t)},e.prototype.listOverlayComponents=function(){var e=this,t=[];return this.mountPoints.forEach((function(n){var r=n.nodeMeta.node.getBackendContext();if(r){var o=e.conn.getOverlayComponent(r);t.includes(o)||t.push(o)}})),t},e.prototype.useInConsole=function(e){for(var t=0;t<=4294967295;){var n="temp".concat(t.toString());if(!Object.prototype.hasOwnProperty.call(globalThis,n))return globalThis[n]=e,console.log(n,e),n;t+=1}return""},e.prototype.generateNodeId=function(){var e=this.nodeIdInc;return this.nodeIdInc+=1,e},e.prototype.getNodeId=function(e){var t=this.nodeIdMap.get(e);if(void 0!==t)return t;var n=this.generateNodeId();return this.nodeIdMap.set(e,n),n},e.prototype.getActiveNodeId=function(e){var t=this.nodeIdMap.get(e);return void 0!==t&&this.activeNodes[t]?t:null},e.prototype.queryActiveNode=function(e){var t=this.activeNodes[e];if(!t)throw new Error("no active node found for node id ".concat(e.toString()));return t},e.prototype.getMaybeBackendNode=function(e){var t,n,r=this.activeNodes[e];return r?r.node:null!==(n=null===(t=this.activeBackendNodes[e])||void 0===t?void 0:t.deref())&&void 0!==n?n:null},e.prototype.startWatch=function(e){var t=this,n=ce.create((function(e){var n,r,o,i,s,a,l,c,u,d,h,p,f,v=e.target,g=t.getNodeId(v),m=t.activeNodes[g];if(m)if("properties"!==e.type){if("childList"===e.type){if(!m.childNodesSent)return;var _=v.asElement();return null===(p=e.addedNodes)||void 0===p||p.forEach((function(e){var n=_.childNodes.indexOf(e);if(!(n<0)){var r=0===n?0:t.getNodeId(_.childNodes[n-1]),o=t.activateNode(e),i=t.collectNodeDetails(o,0,!1);t.conn.sendEvent("DOM.childNodeInserted",{parentNodeId:g,previousNodeId:r,node:i});var s=e.getComposedParent();if(!_.isInheritSlots()&&s&&s!==_){var a=t.getActiveNodeId(s);if(a){var l=null,c=s.forEachComposedChild((function(t){return t!==e&&(l=t,!0)}));if(c){var u=l?t.getNodeId(l):0;t.conn.sendEvent("DOM.childNodeInserted",{parentNodeId:a,previousNodeId:u,node:i})}}}}})),void(null===(f=e.removedNodes)||void 0===f||f.forEach((function(e){t.deactivateNodeTree(e),t.conn.sendEvent("DOM.childNodeRemoved",{parentNodeId:g,nodeId:t.getNodeId(e)});var n=e.getComposedParent();if(!_.isInheritSlots()&&n&&n!==_){var r=t.getActiveNodeId(n);r&&t.conn.sendEvent("DOM.childNodeRemoved",{parentNodeId:r,nodeId:t.getNodeId(e)})}})))}"characterData"!==e.type?Dn("unknown mutation observer event"):t.conn.sendEvent("DOM.characterDataModified",{nodeId:g,characterData:v.asTextNode().textContent})}else{var b=v.asElement(),$=e.nameType;if("attribute"===$){var y=null!==(n=e.attributeName)&&void 0!==n?n:"";if(null===(w=b.getAttribute(y))||"undefined"===w)t.conn.sendEvent("DOM.attributeRemoved",{nodeId:g,name:y,nameType:$});else{var S=kt(w),C=Ot(S);t.conn.sendEvent("DOM.attributeModified",{nodeId:g,name:y,value:C,detail:S,nameType:$})}}else{y=void 0;var w=void 0;if("component-property"===$)y=null!==(r=e.propertyName)&&void 0!==r?r:"",w=null===(o=b.asGeneralComponent())||void 0===o?void 0:o.data[y];else if("slot-value"===$){y=null!==(i=e.propertyName)&&void 0!==i?i:"";var E=Reflect.get(b,"_$slotValues");"object"==typeof E&&null!==E&&(w=E[y])}else if("dataset"===$&&(null===(s=e.attributeName)||void 0===s?void 0:s.startsWith("data:")))y=null!==(a=e.attributeName)&&void 0!==a?a:"",w=b.dataset[y.slice(5)];else if("mark"===$&&(null===(l=e.attributeName)||void 0===l?void 0:l.startsWith("mark:"))){y=null!==(c=e.attributeName)&&void 0!==c?c:"";var N=Reflect.get(b,"_$marks");w=null==N?void 0:N[y.slice(5)]}else if("external-class"===$){var k=null!==(u=e.attributeName)&&void 0!==u?u:"",O=null===(h=null===(d=b.asGeneralComponent())||void 0===d?void 0:d.getExternalClasses()[k])||void 0===h?void 0:h.join(" ");y=k,w=null!=O?O:""}else"slot"===e.attributeName?(y=e.attributeName,w=b.slot):"id"===e.attributeName?(y=e.attributeName,w=b.id):"class"===e.attributeName?Kn.createOrGet("",b).matches(b.class)||(y=e.attributeName,w=b.class):"style"===e.attributeName?(y=e.attributeName,w=b.style):"name"===e.attributeName&&(y=e.attributeName,w=Reflect.get(b,"_$slotName"));y&&(S=kt(w),C=Ot(S),t.conn.sendEvent("DOM.attributeModified",{nodeId:g,name:y,value:C,detail:S,nameType:$}))}}}));return n.observe(e,{properties:"all",characterData:!0,childList:!0}),n},e.prototype.endWatch=function(e){e.disconnect()},e.prototype.activateNode=function(e){var t=this.getNodeId(e);if(delete this.activeBackendNodes[t],this.activeNodes[t])return this.activeNodes[t];var n=this.mountPoints.map((function(e){return e.nodeMeta.node})).includes(e);if(!n){var r;(r=e.parentNode?e.parentNode:e.asShadowRoot()?e.asShadowRoot().getHostNode():void 0)&&this.activateNode(r)}var o={node:e,nodeId:t,observer:this.startWatch(e),childNodesSent:!1};return this.activeNodes[t]=o,o},e.prototype.deactivateNodeTree=function(e){var t,n,r=this,o=this.nodeIdMap.get(e);if(void 0!==o){if(!this.activeNodes[o])return o;var i=this.activeNodes[o].observer;this.endWatch(i);var s=null===(t=e.asGeneralComponent())||void 0===t?void 0:t.getShadowRoot();s&&this.deactivateNodeTree(s);var a=null===(n=e.asElement())||void 0===n?void 0:n.childNodes;return a&&a.forEach((function(e){return r.deactivateNodeTree(e)})),delete this.activeNodes[o],o}},e.prototype.addBackendNode=function(e){var t=this.getNodeId(e);return this.activeBackendNodes[t]=new WeakRef(e),t},e.prototype.activateBackendNodeIfNeeded=function(e){var t,n=null===(t=this.activeBackendNodes[e])||void 0===t?void 0:t.deref();if(void 0===n){var r=this.activeNodes[e];return null!=r?r:null}return this.activateNode(n)},e.prototype.collectNodeBasicInfomation=function(e,t){var n,r,o,i,s=function(e){return e.asTextNode()?257:e.asNativeNode()?258:e.asVirtualNode()?e.asVirtualNode().isInheritSlots()?261:260:e.asGeneralComponent()?259:256}(t),a=er(t,s,!1),l=null!==(r=null===(n=t.asElement())||void 0===n?void 0:n.isVirtual())&&void 0!==r&&r,c=null!==(i=null===(o=t.asElement())||void 0===o?void 0:o.isInheritSlots())&&void 0!==i&&i;return{backendNodeId:e,nodeType:Pt(s),glassEaselNodeType:s,nodeName:a,virtual:l,inheritSlots:c}},e.prototype.collectNodeDetails=function(e,t,n){var r,o,i,s,a,l,c=this,u=e.nodeId,d=e.node,h=d._$wxTmplDevArgs,p=this.collectNodeBasicInfomation(u,d),f=p.backendNodeId,v=p.nodeType,g=p.glassEaselNodeType,m=p.nodeName,_=p.virtual,b=p.inheritSlots;if(a=n?this.documentNodeId:d.parentNode?this.getNodeId(d.parentNode):d.asShadowRoot()?this.getNodeId(d.asShadowRoot().getHostNode()):void 0,n)l=this.documentNodeId;else if(null===(r=d.parentNode)||void 0===r?void 0:r.isInheritSlots())l=a;else{var $=d.getComposedParent();$&&(l=this.addBackendNode($))}var y,S=er(d,g,!0),C=null!==(i=null===(o=d.asTextNode())||void 0===o?void 0:o.textContent)&&void 0!==i?i:"",w=[],E=0;if(257!==g){var N=null==h?void 0:h.A,k=d.asElement();if(N)N.forEach((function(e){var t,n;if(":"===e[0])":slot"===e&&w.push("slot",k.slot),":id"===e&&w.push("id",k.id),":class"===e&&w.push("class",k.class),":style"===e&&w.push("style",k.style),":name"===e&&w.push("style",Reflect.get(k,"_$slotName"));else if(e.startsWith("data:")){var r=k.dataset[e.slice(5)];w.push(e,Ot(kt(r)))}else if(e.startsWith("mark:")){var o=Reflect.get(k,"_$marks");r=null==o?void 0:o[e.slice(5)],w.push(e,Ot(kt(r)))}else if(e.indexOf(":")<0)if(k.asNativeNode())r=null===(t=k.attributes.find((function(t){var n=t.name;return e===n})))||void 0===t?void 0:t.value,w.push(e,Ot(kt(r)));else if(k.asGeneralComponent()){var i=k.asGeneralComponent();void 0!==i.getComponentDefinition().behavior.getPropertyType(e)?(r=i.data[e],w.push(e,Ot(kt(r)))):i.hasExternalClass(e)&&(r=null===(n=i.getExternalClasses()[e])||void 0===n?void 0:n.join(" "),w.push(e,Ot(kt(r))))}else if("string"==typeof Reflect.get(k,"_$slotName")){var s=Reflect.get(k,"_$slotValues");"object"==typeof s&&null!==s&&(r=s[e],w.push(e,Ot(kt(r))))}}));else{k.slot&&w.push("slot",k.slot),k.id&&w.push("id",k.id),k.class&&w.push("class",k.class),k.style&&w.push("style",k.style);var O=Reflect.get(k,"_$slotName");"string"==typeof O&&(y=O,w.push("name",y)),E=w.length/2,k.asNativeNode()&&k.attributes.forEach((function(e){var t=e.name,n=e.value;w.push(t,Ot(kt(n)))})),Object.entries(k.dataset).forEach((function(e){var t=e[0],n=e[1],r="data:".concat(t);w.push(r,Ot(kt(n)))}));var P=Reflect.get(k,"_$marks");Object.entries(null!=P?P:{}).forEach((function(e){var t=e[0],n=e[1],r="mark:".concat(t);w.push(r,Ot(kt(n)))}))}}var x,T,I,M=null===(s=d.asGeneralComponent())||void 0===s?void 0:s.getShadowRoot(),R=M?"open":void 0;if(M){var A=this.activateNode(M),L=this.collectNodeDetails(A,t-1,!1);L.nodeName="shadow-root",x=[L]}if(t>1&&257!==g){var D=d.asElement();T=[],e.childNodesSent=!0,D.childNodes.forEach((function(e){var n=c.activateNode(e),r=c.collectNodeDetails(n,t-1,!1);T.push(r)}))}return"string"==typeof y&&(D=d.asElement(),I=[],D.forEachComposedChild((function(e){var t;if(!(null===(t=e.parentNode)||void 0===t?void 0:t.isInheritSlots())){var n=c.addBackendNode(e),r=c.collectNodeBasicInfomation(n,e);I.push(r)}}))),{backendNodeId:f,nodeType:v,glassEaselNodeType:g,nodeName:m,virtual:_,inheritSlots:b,nodeId:u,parentId:a,glassEaselNonInheritComposedParentId:l,localName:S,nodeValue:C,attributes:w,glassEaselAttributeCount:E,shadowRootType:R,shadowRoots:x,children:T,distributedNodes:I}},e.prototype.sendChildNodes=function(e){var t=this,n=e.node,r=e.nodeId,o=n.asElement();if(o){e.childNodesSent=!0;var i=[];o.childNodes.forEach((function(e){var n=t.activateNode(e);i.push(t.collectNodeDetails(n,0,!1))})),this.conn.sendEvent("DOM.setChildNodes",{parentId:r,nodes:i})}},e}(),nr=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},rr=function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}},or=n(794),ir=new Y,sr=ir.define("glass-easel-devtools-agent").template(or).data((function(){return{state:0,selectMoveDetecting:!1,highlightRect:null}})).init((function(e){var t=e.self,n=e.data,r=e.setData,o=e.method,i=e.listener;t.setNodeStyle("\n display: block;\n position: absolute;\n left: 0;\n top: 0;\n width: 0;\n height: 0;\n background: red;\n z-index: 2147483647;\n ");var s=null,a=o((function(e){return(0===n.state||2===n.state)&&(r({state:1}),s=e,!0)})),l=o((function(){return 1===n.state&&(r({state:0,highlightRect:null}),s=null,!0)})),c=i((function(e){var o=e.detail;if(!n.selectMoveDetecting){var i=o.clientX,a=o.clientY,l=t.getBackendContext();l?(r({selectMoveDetecting:!0}),ar(l,i,a).then((function(e){return nr(void 0,void 0,void 0,(function(){var t,o,i,a,l;return rr(this,(function(c){switch(c.label){case 0:return r({selectMoveDetecting:!1}),e?[4,lr(e)]:(r({highlightRect:null}),[2,void 0]);case 1:return t=c.sent(),o=t.left,i=t.top,a=t.width,l=t.height,1===n.state&&r({highlightRect:{left:o,top:i,width:a,height:l}}),null==s||s(e,!1),[2,void 0]}}))}))})).catch((function(){r({selectMoveDetecting:!1,highlightRect:null})}))):r({highlightRect:null})}})),u=i((function(e){var n=e.detail,o=s;l();var i=n.x,a=n.y,c=t.getBackendContext();c?ar(c,i,a).then((function(e){return nr(void 0,void 0,void 0,(function(){return rr(this,(function(t){return null==o||o(e,!0),[2,void 0]}))}))})):r({highlightRect:null})})),d=o((function(e){return nr(void 0,void 0,void 0,(function(){var t,o,i,s,a,l;return rr(this,(function(c){switch(c.label){case 0:return e&&e.asElement()?(t=e.asElement(),[4,lr(t)]):[3,2];case 1:return o=c.sent(),i=o.left,s=o.top,a=o.width,l=o.height,0!==n.state?[2,!1]:(r({state:2,highlightRect:{left:i,top:s,width:a,height:l}}),[3,3]);case 2:if(2!==n.state)return[2,!1];r({state:0,highlightRect:null}),c.label=3;case 3:return[2,!0]}}))}))}));return{startNodeSelect:a,endNodeSelect:l,nodeSelectMove:c,nodeSelectDone:u,highlight:d}})).registerComponent(),ar=function(e,t,n){return new Promise((function(r){e.elementFromPoint?e.elementFromPoint(t,n,(function(e){r(e)})):r(null)}))},lr=function(e){return new Promise((function(t){e.getBoundingClientRect((function(e){t(e)}))}))},cr=function(){function e(){this.backendContexts=new WeakMap}return e.prototype.get=function(e){var t=this.backendContexts.get(e);if(t)return t;var n,r,o=ir.createComponentByUrl("glass-easel-devtools-agent","glass-easel-devtools-agent",null,e);if(this.backendContexts.set(e,o),2!==e.mode&&1!==e.mode||!e.addPriorEventListener||e.addPriorEventListener((function(e,t,n,r){if(function(e){if(!(e instanceof Fe))return!1;for(var t=e;;){if(t===o)return!0;if(t.parentNode)t=t.parentNode;else{if(!t.ownerShadowRoot)return!1;t=t.ownerShadowRoot.getHostNode()}}}(e)){var i=new Ie(t,n,r);return Ie.dispatchEvent(e,i),i.defaultPrevented()?1:0}})),2===e.mode)n=e.getRootNode(),r=e.createElement("glass-easel-devtools-agent","glass-easel-devtools-agent"),n.appendChild(r);else if(3===e.mode)n=e.getRootNode(),r=e.document.createElement("glass-easel-devtools-agent"),n.appendChild(r);else{if(1!==e.mode)throw new Error("unrecognized host backend mode");var i=e.getRootNode();n=i,r=i.createElement("glass-easel-devtools-agent","glass-easel-devtools-agent"),i.appendChild(r)}return Fe.replaceDocumentElement(o,n,r),(2===e.mode||1===e.mode)&&(n.release(),r.release()),o},e}(),ur=function(){function e(e){var t=this;this.requestHandlers=Object.create(null),this.messageChannel=e,e.recv((function(e){"request"===e.kind&&(jn("recv request ".concat(e.id.toString()),e.name,e.detail),t.recvRequest(e.id,e.name,e.detail))})),this.overlayManager=new cr}return e.prototype.recvRequest=function(e,t,n){var r=this,o=this.requestHandlers[t];if(o)o.call(this,n).then((function(t){jn("send response ".concat(e.toString()),t);var n={kind:"response",id:e,detail:t};r.messageChannel.send(n)})).catch((function(t){var n={kind:"error",id:e,message:t instanceof Error?t.message:"",stack:t instanceof Error?t.stack:""};r.messageChannel.send(n)}));else{var i={kind:"error",id:e,message:"invalid request name"};this.messageChannel.send(i)}},e.prototype.setRequestHandler=function(e,t){this.requestHandlers[e]=t},e.prototype.sendEvent=function(e,t){jn("send event",e,t);var n={kind:"event",name:e,detail:t};this.messageChannel.send(n)},e.prototype.getOverlayComponent=function(e){return this.overlayManager.get(e).asInstanceOf(sr)},e}(),dr=function(){function e(e){var t=this;this.enabled=!1,this.conn=e,this.mountPoints=new tr(e),e.setRequestHandler("DOM.enable",(function(){return e=t,n=void 0,o=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}(this,(function(e){return this.enabled||(this.enabled=!0),[2]}))},new((r=void 0)||(r=Promise))((function(t,i){function s(e){try{l(o.next(e))}catch(e){i(e)}}function a(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(e){e(n)}))).then(s,a)}l((o=o.apply(e,n||[])).next())}));var e,n,r,o}))}return e.prototype.addMountPoint=function(e,t){jn("attach mount point",e),this.mountPoints.attach(e,t)},e.prototype.removeMountPoint=function(e){jn("detach mount point",e),this.mountPoints.detach(e)},e}(),hr=function(e){var t=new ur(e);return{inspector:new dr(t)}}})(),module.exports=r})();
|