glass-easel 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/.eslintignore +4 -0
  2. package/dist/glass_easel.all.js +2 -2
  3. package/dist/glass_easel.all.js.map +1 -1
  4. package/dist/glass_easel.d.ts +2546 -0
  5. package/dist/glass_easel.domlike.global.js +2 -2
  6. package/dist/glass_easel.domlike.global.js.map +1 -1
  7. package/guide/zh_CN/appendix/backend_protocol.md +164 -74
  8. package/jest.unit.config.js +7 -4
  9. package/package.json +7 -5
  10. package/rollup.config.ts +101 -0
  11. package/src/backend/backend_protocol.ts +26 -345
  12. package/src/backend/composed_backend_protocol.ts +10 -264
  13. package/src/backend/current_window_backend_context.ts +478 -0
  14. package/src/backend/domlike_backend_protocol.ts +9 -498
  15. package/src/backend/empty_backend.ts +265 -0
  16. package/src/backend/empty_composed_backend.ts +245 -0
  17. package/src/backend/index.ts +18 -0
  18. package/src/backend/suggested_backend_protocol.ts +62 -11
  19. package/src/behavior.ts +131 -442
  20. package/src/class_list.ts +328 -222
  21. package/src/component.ts +349 -184
  22. package/src/component_params.ts +54 -25
  23. package/src/component_space.ts +36 -15
  24. package/src/data_path.ts +22 -34
  25. package/src/data_proxy.ts +334 -27
  26. package/src/devtool.ts +89 -0
  27. package/src/element.ts +667 -285
  28. package/src/element_iterator.ts +9 -4
  29. package/src/event.ts +39 -20
  30. package/src/external_shadow_tree.ts +2 -2
  31. package/src/func_arr.ts +55 -101
  32. package/src/global_options.ts +18 -42
  33. package/src/index.ts +72 -73
  34. package/src/mutation_observer.ts +10 -7
  35. package/src/native_node.ts +79 -35
  36. package/src/node.ts +23 -30
  37. package/src/relation.ts +101 -12
  38. package/src/render.ts +5 -3
  39. package/src/selector.ts +9 -7
  40. package/src/shadow_root.ts +96 -240
  41. package/src/template_engine.ts +10 -7
  42. package/src/text_node.ts +43 -19
  43. package/src/tmpl/index.ts +38 -30
  44. package/src/tmpl/native_rendering.ts +14 -21
  45. package/src/tmpl/proc_gen_wrapper.ts +189 -151
  46. package/src/tmpl/proc_gen_wrapper_dom.ts +10 -8
  47. package/src/tmpl/range_list_diff.ts +30 -9
  48. package/src/trait_behaviors.ts +1 -1
  49. package/src/type_symbol.ts +36 -0
  50. package/src/virtual_node.ts +26 -13
  51. package/src/warning.ts +119 -0
  52. package/tests/base/composed_backend.ts +143 -142
  53. package/tests/base/env.ts +76 -3
  54. package/tests/base/match.ts +24 -22
  55. package/tests/base/shadow_backend.ts +917 -0
  56. package/tests/core/backend.test.ts +53 -1
  57. package/tests/core/behavior.test.ts +1 -1
  58. package/tests/core/data_update.test.ts +135 -0
  59. package/tests/core/misc.test.ts +91 -21
  60. package/tests/core/placeholder.test.ts +66 -25
  61. package/tests/core/slot.test.ts +161 -23
  62. package/tests/legacy/component.test.js +152 -78
  63. package/tests/legacy/data_path.test.js +19 -19
  64. package/tests/legacy/data_proxy.test.js +14 -7
  65. package/tests/legacy/external.test.js +8 -8
  66. package/tests/legacy/mutation_observer.test.js +7 -5
  67. package/tests/legacy/slot.test.js +2 -3
  68. package/tests/legacy/virtual.test.js +258 -25
  69. package/tests/tmpl/binding_map.test.ts +201 -195
  70. package/tests/tmpl/event.test.ts +138 -23
  71. package/tests/tmpl/expression.test.ts +15 -15
  72. package/tests/tmpl/lvalue.test.ts +101 -0
  73. package/tests/tmpl/structure.test.ts +486 -43
  74. package/tests/types/chaining.test.ts +27 -30
  75. package/tests/types/createElement.test.ts +5 -4
  76. package/tests/types/definition.test.ts +11 -14
  77. package/tsconfig.json +1 -3
  78. package/dist/glass_easel.all.d.ts +0 -1
  79. package/dist/glass_easel.domlike.global.d.ts +0 -1
  80. package/dist/index.d.ts +0 -1
  81. package/dist/index.js +0 -1
  82. package/dist/types/src/backend/backend_protocol.d.ts +0 -141
  83. package/dist/types/src/backend/backend_protocol.d.ts.map +0 -1
  84. package/dist/types/src/backend/composed_backend_protocol.d.ts +0 -102
  85. package/dist/types/src/backend/composed_backend_protocol.d.ts.map +0 -1
  86. package/dist/types/src/backend/domlike_backend_protocol.d.ts +0 -100
  87. package/dist/types/src/backend/domlike_backend_protocol.d.ts.map +0 -1
  88. package/dist/types/src/backend/mode.d.ts +0 -65
  89. package/dist/types/src/backend/mode.d.ts.map +0 -1
  90. package/dist/types/src/backend/suggested_backend_protocol.d.ts +0 -30
  91. package/dist/types/src/backend/suggested_backend_protocol.d.ts.map +0 -1
  92. package/dist/types/src/behavior.d.ts +0 -434
  93. package/dist/types/src/behavior.d.ts.map +0 -1
  94. package/dist/types/src/class_list.d.ts +0 -83
  95. package/dist/types/src/class_list.d.ts.map +0 -1
  96. package/dist/types/src/component.d.ts +0 -325
  97. package/dist/types/src/component.d.ts.map +0 -1
  98. package/dist/types/src/component_params.d.ts +0 -236
  99. package/dist/types/src/component_params.d.ts.map +0 -1
  100. package/dist/types/src/component_space.d.ts +0 -211
  101. package/dist/types/src/component_space.d.ts.map +0 -1
  102. package/dist/types/src/data_path.d.ts +0 -5
  103. package/dist/types/src/data_path.d.ts.map +0 -1
  104. package/dist/types/src/data_proxy.d.ts +0 -107
  105. package/dist/types/src/data_proxy.d.ts.map +0 -1
  106. package/dist/types/src/data_utils.d.ts +0 -3
  107. package/dist/types/src/data_utils.d.ts.map +0 -1
  108. package/dist/types/src/element.d.ts +0 -365
  109. package/dist/types/src/element.d.ts.map +0 -1
  110. package/dist/types/src/element_iterator.d.ts +0 -43
  111. package/dist/types/src/element_iterator.d.ts.map +0 -1
  112. package/dist/types/src/event.d.ts +0 -105
  113. package/dist/types/src/event.d.ts.map +0 -1
  114. package/dist/types/src/external_shadow_tree.d.ts +0 -20
  115. package/dist/types/src/external_shadow_tree.d.ts.map +0 -1
  116. package/dist/types/src/func_arr.d.ts +0 -39
  117. package/dist/types/src/func_arr.d.ts.map +0 -1
  118. package/dist/types/src/global_options.d.ts +0 -120
  119. package/dist/types/src/global_options.d.ts.map +0 -1
  120. package/dist/types/src/index.d.ts +0 -43
  121. package/dist/types/src/index.d.ts.map +0 -1
  122. package/dist/types/src/mutation_observer.d.ts +0 -79
  123. package/dist/types/src/mutation_observer.d.ts.map +0 -1
  124. package/dist/types/src/native_node.d.ts +0 -11
  125. package/dist/types/src/native_node.d.ts.map +0 -1
  126. package/dist/types/src/node.d.ts +0 -48
  127. package/dist/types/src/node.d.ts.map +0 -1
  128. package/dist/types/src/relation.d.ts +0 -46
  129. package/dist/types/src/relation.d.ts.map +0 -1
  130. package/dist/types/src/render.d.ts +0 -3
  131. package/dist/types/src/render.d.ts.map +0 -1
  132. package/dist/types/src/selector.d.ts +0 -32
  133. package/dist/types/src/selector.d.ts.map +0 -1
  134. package/dist/types/src/shadow_root.d.ts +0 -174
  135. package/dist/types/src/shadow_root.d.ts.map +0 -1
  136. package/dist/types/src/template_engine.d.ts +0 -56
  137. package/dist/types/src/template_engine.d.ts.map +0 -1
  138. package/dist/types/src/text_node.d.ts +0 -44
  139. package/dist/types/src/text_node.d.ts.map +0 -1
  140. package/dist/types/src/tmpl/index.d.ts +0 -19
  141. package/dist/types/src/tmpl/index.d.ts.map +0 -1
  142. package/dist/types/src/tmpl/native_rendering.d.ts +0 -45
  143. package/dist/types/src/tmpl/native_rendering.d.ts.map +0 -1
  144. package/dist/types/src/tmpl/proc_gen_wrapper.d.ts +0 -89
  145. package/dist/types/src/tmpl/proc_gen_wrapper.d.ts.map +0 -1
  146. package/dist/types/src/tmpl/proc_gen_wrapper_dom.d.ts +0 -50
  147. package/dist/types/src/tmpl/proc_gen_wrapper_dom.d.ts.map +0 -1
  148. package/dist/types/src/tmpl/range_list_diff.d.ts +0 -19
  149. package/dist/types/src/tmpl/range_list_diff.d.ts.map +0 -1
  150. package/dist/types/src/trait_behaviors.d.ts +0 -38
  151. package/dist/types/src/trait_behaviors.d.ts.map +0 -1
  152. package/dist/types/src/virtual_node.d.ts +0 -10
  153. package/dist/types/src/virtual_node.d.ts.map +0 -1
  154. package/dist/types/tests/backend/domlike.test.d.ts +0 -2
  155. package/dist/types/tests/backend/domlike.test.d.ts.map +0 -1
  156. package/dist/types/tests/base/composed_backend.d.ts +0 -123
  157. package/dist/types/tests/base/composed_backend.d.ts.map +0 -1
  158. package/dist/types/tests/base/env.d.ts +0 -30
  159. package/dist/types/tests/base/env.d.ts.map +0 -1
  160. package/dist/types/tests/base/match.d.ts +0 -9
  161. package/dist/types/tests/base/match.d.ts.map +0 -1
  162. package/dist/types/tests/core/backend.test.d.ts +0 -2
  163. package/dist/types/tests/core/backend.test.d.ts.map +0 -1
  164. package/dist/types/tests/core/behavior.test.d.ts +0 -2
  165. package/dist/types/tests/core/behavior.test.d.ts.map +0 -1
  166. package/dist/types/tests/core/component_space.test.d.ts +0 -2
  167. package/dist/types/tests/core/component_space.test.d.ts.map +0 -1
  168. package/dist/types/tests/core/data_update.test.d.ts +0 -2
  169. package/dist/types/tests/core/data_update.test.d.ts.map +0 -1
  170. package/dist/types/tests/core/misc.test.d.ts +0 -2
  171. package/dist/types/tests/core/misc.test.d.ts.map +0 -1
  172. package/dist/types/tests/core/placeholder.test.d.ts +0 -2
  173. package/dist/types/tests/core/placeholder.test.d.ts.map +0 -1
  174. package/dist/types/tests/core/slot.test.d.ts +0 -2
  175. package/dist/types/tests/core/slot.test.d.ts.map +0 -1
  176. package/dist/types/tests/core/trait_behaviors.test.d.ts +0 -2
  177. package/dist/types/tests/core/trait_behaviors.test.d.ts.map +0 -1
  178. package/dist/types/tests/tmpl/binding_map.test.d.ts +0 -2
  179. package/dist/types/tests/tmpl/binding_map.test.d.ts.map +0 -1
  180. package/dist/types/tests/tmpl/event.test.d.ts +0 -2
  181. package/dist/types/tests/tmpl/event.test.d.ts.map +0 -1
  182. package/dist/types/tests/tmpl/expression.test.d.ts +0 -2
  183. package/dist/types/tests/tmpl/expression.test.d.ts.map +0 -1
  184. package/dist/types/tests/tmpl/lvalue.test.d.ts +0 -2
  185. package/dist/types/tests/tmpl/lvalue.test.d.ts.map +0 -1
  186. package/dist/types/tests/tmpl/native_rendering.test.d.ts +0 -2
  187. package/dist/types/tests/tmpl/native_rendering.test.d.ts.map +0 -1
  188. package/dist/types/tests/tmpl/structure.test.d.ts +0 -2
  189. package/dist/types/tests/tmpl/structure.test.d.ts.map +0 -1
  190. package/dist/types/tests/types/chaining.test.d.ts +0 -2
  191. package/dist/types/tests/types/chaining.test.d.ts.map +0 -1
  192. package/dist/types/tests/types/createElement.test.d.ts +0 -2
  193. package/dist/types/tests/types/createElement.test.d.ts.map +0 -1
  194. package/dist/types/tests/types/definition.test.d.ts +0 -2
  195. package/dist/types/tests/types/definition.test.d.ts.map +0 -1
  196. package/webpack.config.js +0 -275
  197. /package/src/backend/{mode.ts → shared.ts} +0 -0
@@ -1,2 +1,2 @@
1
- var glassEasel;(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{BackendMode:()=>c,Behavior:()=>Ot,BehaviorBuilder:()=>Et,ClassList:()=>N,Component:()=>$t,ComponentDefinition:()=>gt,ComponentSpace:()=>Lt,DataGroup:()=>H,DeepCopyKind:()=>qt,Element:()=>ot,ElementIterator:()=>Ee,ElementIteratorType:()=>ye,Event:()=>Q,EventBubbleStatus:()=>j,EventMutLevel:()=>z,FuncArr:()=>re,MutationObserver:()=>ve,NativeNode:()=>$e,NormalizedPropertyType:()=>lt,Observer:()=>ve,ParsedSelector:()=>et,RelationType:()=>rt,ShadowRoot:()=>Se,StyleScopeManager:()=>w,StyleSegmentIndex:()=>J,TextNode:()=>ge,TraitBehavior:()=>ct,VirtualNode:()=>st,addGlobalErrorListener:()=>ce,addGlobalWarningListener:()=>pe,backend:()=>n,composedBackend:()=>r,createElement:()=>Ae,dataPath:()=>i,dataUtils:()=>a,domlikeBackend:()=>o,dumpElement:()=>Ne,dumpElementToString:()=>we,dumpSingleElementToString:()=>Ce,getDefaultComponentSpace:()=>Qt,glassEaselTemplate:()=>l,globalOptions:()=>ee,mutationObserver:()=>u,registerBehavior:()=>xe,registerElement:()=>ke,removeGlobalErrorListener:()=>de,removeGlobalWarningListener:()=>he,safeCallback:()=>ue,template:()=>l,templateEngine:()=>d,triggerEvent:()=>Le,triggerExternalEvent:()=>De,triggerRender:()=>Oe,typeUtils:()=>s});var n={};t.r(n),t.d(n,{BackendMode:()=>c,EmptyBackendContext:()=>g,EmptyBackendElement:()=>_,EmptyBackendElementType:()=>h,EmptyBackendShadowRootContext:()=>$});var r={};t.r(r),t.d(r,{EmptyComposedBackendContext:()=>m,EmptyComposedBackendElement:()=>y});var o={};t.r(o),t.d(o,{CurrentWindowBackendContext:()=>S});var i={};t.r(i),t.d(i,{parseMultiPaths:()=>D,parseSinglePath:()=>L});var a={};t.r(a),t.d(a,{deepCopy:()=>I,simpleDeepCopy:()=>M});var s={};t.r(s),t.d(s,{METHOD_TAG:()=>it});var l={};t.r(l),t.d(l,{DEFAULT_PROC_GEN_GROUP:()=>zt,GlassEaselTemplateEngine:()=>Xt});var u={};t.r(u),t.d(u,{MutationObserver:()=>ve,MutationObserverTarget:()=>fe});var c,d={};t.r(d),function(t){t[t.Shadow=1]="Shadow",t[t.Composed=2]="Composed",t[t.Domlike=3]="Domlike"}(c||(c={}));var p,h,f=(p=function(t,e){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},p(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}p(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});!function(t){t[t.Fragment=0]="Fragment",t[t.Element=1]="Element",t[t.TextNode=2]="TextNode",t[t.Component=3]="Component",t[t.VirtualNode=4]="VirtualNode"}(h||(h={}));var v,g=function(){function t(){this.mode=1,this._$styleSheetIdInc=1,this._$renderCallbacks=null,this._$shadowRoot=new $}return t.prototype.destroy=function(){},t.prototype.getWindowWidth=function(){return 1},t.prototype.getWindowHeight=function(){return 1},t.prototype.getDevicePixelRatio=function(){return 1},t.prototype.getTheme=function(){return"light"},t.prototype.registerStyleSheetContent=function(t,e){},t.prototype.appendStyleSheetPath=function(t,e){var n=this._$styleSheetIdInc;return this._$styleSheetIdInc+=1,n},t.prototype.disableStyleSheet=function(t){},t.prototype.render=function(t){var e=this;if(this._$renderCallbacks)this._$renderCallbacks.push(t);else{var n=this._$renderCallbacks=[t];setTimeout((function(){e._$renderCallbacks=null,n.forEach((function(t){ue("Render Callback",t,e,[null])}))}),16)}},t.prototype.getRootNode=function(){return this._$shadowRoot},t.prototype.createFragment=function(){return new _(0)},t.prototype.onEvent=function(t){},t.prototype.createMediaQueryObserver=function(t,e){return{disconnect:function(){}}},t}(),_=function(){function t(t){this._$shadowRoot=3===t?new $:null}return t.prototype.release=function(){},t.prototype.associateValue=function(t){},t.prototype.getShadowRoot=function(){return this._$shadowRoot||void 0},t.prototype.appendChild=function(t){},t.prototype.removeChild=function(t,e){},t.prototype.insertBefore=function(t,e,n){},t.prototype.replaceChild=function(t,e,n){},t.prototype.spliceBefore=function(t,e,n){},t.prototype.spliceAppend=function(t){},t.prototype.spliceRemove=function(t,e){},t.prototype.setId=function(t){},t.prototype.setSlotName=function(t){},t.prototype.setContainingSlot=function(t){},t.prototype.reassignContainingSlot=function(t,e){},t.prototype.spliceBeforeSlotNodes=function(t,e,n){},t.prototype.spliceRemoveSlotNodes=function(t,e){},t.prototype.spliceAppendSlotNodes=function(t){},t.prototype.setInheritSlots=function(){},t.prototype.setVirtualHost=function(){},t.prototype.setStyleScope=function(t){},t.prototype.setStyle=function(t){},t.prototype.addClass=function(t,e){},t.prototype.removeClass=function(t,e){},t.prototype.clearClasses=function(){},t.prototype.setAttribute=function(t,e){},t.prototype.removeAttribute=function(t){},t.prototype.setDataset=function(t,e){},t.prototype.setText=function(t){},t.prototype.getBoundingClientRect=function(t){setTimeout((function(){t({left:0,top:0,width:0,height:0})}),0)},t.prototype.getScrollOffset=function(t){setTimeout((function(){t({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)},t.prototype.setListenerStats=function(t,e,n){},t.prototype.setModelBindingStat=function(t,e){},t.prototype.createIntersectionObserver=function(t,e,n,r){return{disconnect:function(){}}},t.prototype.getContext=function(t){t(null)},t}(),$=function(t){function e(){return t.call(this,4)||this}return f(e,t),e.prototype.createElement=function(t,e){return new _(1)},e.prototype.createTextNode=function(t){return new _(2)},e.prototype.createComponent=function(t){return new _(3)},e.prototype.createVirtualNode=function(t){return new _(4)},e}(_),m=function(){function t(){this.mode=2,this._$styleSheetIdInc=1,this._$renderCallbacks=null,this._$rootNode=new y}return t.prototype.destroy=function(){},t.prototype.getWindowWidth=function(){return 1},t.prototype.getWindowHeight=function(){return 1},t.prototype.getDevicePixelRatio=function(){return 1},t.prototype.getTheme=function(){return"light"},t.prototype.registerStyleSheetContent=function(t,e){},t.prototype.appendStyleSheetPath=function(t,e){var n=this._$styleSheetIdInc;return this._$styleSheetIdInc+=1,n},t.prototype.disableStyleSheet=function(t){},t.prototype.render=function(t){var e=this;if(this._$renderCallbacks)this._$renderCallbacks.push(t);else{var n=this._$renderCallbacks=[t];setTimeout((function(){e._$renderCallbacks=null,n.forEach((function(t){ue("Render Callback",t,e,[null])}))}),16)}},t.prototype.getRootNode=function(){return this._$rootNode},t.prototype.createElement=function(t,e){return new y},t.prototype.createTextNode=function(t){return new y},t.prototype.createFragment=function(){return new y},t.prototype.onEvent=function(t){},t.prototype.createMediaQueryObserver=function(t,e){return{disconnect:function(){}}},t}(),y=function(){function t(){}return t.prototype.release=function(){},t.prototype.associateValue=function(t){},t.prototype.appendChild=function(t){},t.prototype.removeChild=function(t,e){},t.prototype.insertBefore=function(t,e,n){},t.prototype.replaceChild=function(t,e,n){},t.prototype.spliceBefore=function(t,e,n){},t.prototype.spliceAppend=function(t){},t.prototype.spliceRemove=function(t,e){},t.prototype.setId=function(t){},t.prototype.setStyleScope=function(t){},t.prototype.setStyle=function(t){},t.prototype.addClass=function(t,e){},t.prototype.removeClass=function(t,e){},t.prototype.clearClasses=function(){},t.prototype.setAttribute=function(t,e){},t.prototype.removeAttribute=function(t){},t.prototype.setText=function(t){},t.prototype.getBoundingClientRect=function(t){setTimeout((function(){t({left:0,top:0,width:0,height:0})}),0)},t.prototype.getScrollOffset=function(t){setTimeout((function(){t({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)},t.prototype.setListenerStats=function(t,e,n){},t.prototype.setModelBindingStat=function(t,e){},t.prototype.createIntersectionObserver=function(t,e,n,r){return{disconnect:function(){}}},t.prototype.getContext=function(t){t(null)},t}(),b=["touchstart","touchmove","touchend","touchcancel","mousedown","mousemove","mouseout","mouseover","mouseup","click"],S=function(){function t(){this.mode=3,this.document=document,this._$styleSheets=[],this._$styleSheetRegistry=Object.create(null),this._$delegatedEventListeners=Object.create(null),this._$elementEventListeners=new WeakMap,this._$elementCaptureEventListeners=new WeakMap,this._$triggedEvents=new WeakSet}return t.prototype.destroy=function(){},t.prototype.getWindowWidth=function(){return document.documentElement.clientWidth},t.prototype.getWindowHeight=function(){return document.documentElement.clientHeight},t.prototype.getDevicePixelRatio=function(){return window.devicePixelRatio},t.prototype.getTheme=function(){return"light"},t.prototype.registerStyleSheetContent=function(t,e){this._$styleSheetRegistry[t]=String(e)},t.prototype.appendStyleSheetPath=function(t,e){var n=this._$styleSheetRegistry[t];if(void 0===n)throw new Error('No style sheet registry "'.concat(t,'"'));var r=document.createElement("style");r.innerText=n,void 0!==e&&r.setAttribute("wx-style-scope",String(e)),document.head.appendChild(r);var o=this._$styleSheets.length;return this._$styleSheets.push(r),o},t.prototype.disableStyleSheet=function(t){var e=this._$styleSheets[t];e&&document.head.removeChild(e)},t.prototype.render=function(t){var e=this;window.requestAnimationFrame((function(){ue("Render Callback",t,e,[null])}))},t.prototype.getRootNode=function(){return document.body},t.prototype.associateValue=function(t,e){t.__wxElement=e},t.prototype.onEvent=function(t){this._$eventListener||this._$initEvent(),this._$eventListener=t},t.prototype._$getEventDetail=function(t){for(var e={},n=t;Object.getPrototypeOf(n)!==Event.prototype;){for(var r=Object.keys(n),o=0;o<r.length;o+=1){var i=r[o];"function"!=typeof t[i]&&(e[i]=t[i])}n=Object.getPrototypeOf(n)}return e},t.prototype._$trigger=function(t,e,n,r,o){if(this._$eventListener&&t.target){for(var i=t.target;i&&!i.__wxElement;)i=i.parentNode;i&&1===this._$eventListener(i.__wxElement,e,n,{originalEvent:t,bubbles:r,composed:o,capturePhase:!0})&&t.preventDefault()}},t.prototype._$initEvent=function(){var t=this,e=Object.create(null),n=!1,r=function(t,n){e[n.identifier]={x:n.clientX,y:n.clientY}},o=function(n,r){var o=r.identifier;if(e[o]){var i=e[o];(Math.abs(i.x-r.clientX)>10||Math.abs(i.y-r.clientY)>10)&&(delete e[o],t._$trigger(n,"canceltap",i,!0,!0))}},i=function(n,r){var o=r.identifier;if(e[o]){var i=e[o];delete e[o],Math.abs(i.x-r.clientX)>10||Math.abs(i.y-r.clientY)>10?t._$trigger(n,"canceltap",i,!0,!0):t._$trigger(n,"tap",i,!0,!0)}},a=function(n,r){var o=r.identifier;if(e[o]){var i=e[o];delete e[o],t._$trigger(n,"canceltap",i,!0,!0)}};document.body.addEventListener("touchstart",(function(e){t._$trigger(e,"touchstart",t._$getEventDetail(e),e.bubbles,e.composed),n=!0;for(var o=e.changedTouches,i=0;i<o.length;i+=1)r(0,o[i])}),{capture:!0}),document.body.addEventListener("touchmove",(function(e){t._$trigger(e,"touchmove",t._$getEventDetail(e),e.bubbles,e.composed);for(var n=e.changedTouches,r=0;r<n.length;r+=1)o(e,n[r])}),{capture:!0}),document.body.addEventListener("touchend",(function(e){t._$trigger(e,"touchend",t._$getEventDetail(e),e.bubbles,e.composed);for(var n=e.changedTouches,r=0;r<n.length;r+=1)i(e,n[r])}),{capture:!0}),document.body.addEventListener("touchcancel",(function(e){t._$trigger(e,"touchcancel",t._$getEventDetail(e),e.bubbles,e.composed);for(var n=e.changedTouches,r=0;r<n.length;r+=1)a(e,n[r])}),{capture:!0}),document.body.addEventListener("mousedown",(function(e){t._$trigger(e,"mousedown",t._$getEventDetail(e),e.bubbles,e.composed),n||r(0,{identifier:-1,clientX:e.clientX,clientY:e.clientY})}),{capture:!0}),document.body.addEventListener("mousemove",(function(e){t._$trigger(e,"mousemove",t._$getEventDetail(e),e.bubbles,e.composed),n||o(e,{identifier:-1,clientX:e.clientX,clientY:e.clientY})}),{capture:!0}),document.body.addEventListener("mouseup",(function(e){t._$trigger(e,"mouseup",t._$getEventDetail(e),e.bubbles,e.composed),n||i(e,{identifier:-1,clientX:e.clientX,clientY:e.clientY})}),{capture:!0});var s=this._$delegatedEventListeners;s.touchstart=!0,s.touchmove=!0,s.touchend=!0,s.mousedown=!0,s.mousemove=!0,s.mouseup=!0},t.prototype.setListenerStats=function(t,e,n,r){var o=this;if(t){var i=b.includes(e),a=2===r;if(i){if(this._$delegatedEventListeners[e])return;return this._$delegatedEventListeners[e]=!0,void document.body.addEventListener(e,(function(t){a&&t.preventDefault(),o._$trigger(t,e,o._$getEventDetail(t),t.bubbles,t.composed)}),{capture:!0})}var s=n?this._$elementCaptureEventListeners:this._$elementEventListeners;s.has(t)||s.set(t,Object.create(null));var l=s.get(t);l[e]||(l[e]=!0,t.addEventListener(e,(function(t){o._$triggedEvents.has(t)||(o._$triggedEvents.add(t),a&&t.preventDefault(),o._$trigger(t,e,o._$getEventDetail(t),t.bubbles,t.composed))})))}},t.prototype.setModelBindingStat=function(t,e,n){var r=function(r,o){if(t._$wxArgs||(t._$wxArgs={modelListeners:Object.create(null)}),void 0===t._$wxArgs.modelListeners[e]){if(!n)return;t._$wxArgs.modelListeners[e]=n,t.addEventListener(r,(function(){var n,r=null===(n=t._$wxArgs)||void 0===n?void 0:n.modelListeners[e];null==r||r(o())}))}t._$wxArgs.modelListeners[e]=n},o=t.tagName,i=!1;if("INPUT"===o){var a=t,s=a.type;"checkbox"===s||"radio"===s?"checked"===e&&(i=!0,r("change",(function(){return a.checked}))):"value"===e&&(i=!0,r("input",(function(){return a.value})))}else if("TEXTAREA"===o){var l=t;"value"===e&&(i=!0,r("input",(function(){return l.value})))}else if("SELECT"===o){var u=t;"value"===e&&(i=!0,r("change",(function(){return u.value})))}i||oe('unsupported model binding on "'.concat(e,'" of "').concat(o.toLowerCase(),'" element.'))},t.prototype.createIntersectionObserver=function(t,e,n,r,o){var i=new IntersectionObserver((function(t){t.forEach((function(t){o({intersectionRatio:t.intersectionRatio,boundingClientRect:t.boundingClientRect,intersectionRect:t.intersectionRect,relativeRect:t.rootBounds,time:t.time})}))}),{root:e,rootMargin:n,threshold:r});return i.observe(t),{disconnect:function(){i.disconnect()}}},t.prototype.createMediaQueryObserver=function(t,e){var n=null,r=function(){var r,o,i=(r=document.documentElement.clientWidth,o=document.documentElement.clientHeight,!(void 0!==t.width&&r!==t.width||void 0!==t.maxWidth&&r>t.maxWidth||void 0!==t.minWidth&&r<t.minWidth||void 0!==t.width&&o!==t.height||void 0!==t.maxHeight&&o>t.maxHeight||void 0!==t.minHeight&&o<t.minHeight||(r>o?"landscape":"portrait")!==t.orientation));n!==i&&(n=i,e({matches:i}))};return setTimeout(r,0),window.addEventListener("resize",r),{disconnect:function(){window.removeEventListener("resize",r)}}},t.prototype.getContext=function(t,e){e(null)},t}(),C=/(~|\^+)?-?[_0-9a-z][-_0-9a-z]*/gi,w=function(){function t(){this._$names=[""]}return t.globalScope=function(){return 0},t.prototype.register=function(t){var e=this._$names.length;return this._$names.push(t),e},t.prototype.queryName=function(t){return this._$names[t]},t}(),N=function(){function t(t,e){var n,r,o;this._$aliasDirty=!1,this._$rawNames=[],this._$rawNamesSegmentSep=[],this._$hasResolvedNames=!1,this._$elem=t;var i=null===(n=t.ownerShadowRoot)||void 0===n?void 0:n.getHostNode();if(i){var a=i.getComponentOptions();this._$owner=i.classList,this._$defaultScope=a.styleScope,this._$extraScope=null===a.extraStyleScope?void 0:a.extraStyleScope,this._$rootScope=null!==(r=i.classList._$rootScope)&&void 0!==r?r:this._$defaultScope}else this._$owner=null,this._$defaultScope=w.globalScope(),this._$extraScope=void 0,this._$rootScope=void 0;if(this._$alias=e,e){var s=Object.create(null);Object.keys(e).forEach((function(t){s[t]=null})),this._$resolvedAlias=s}else this._$resolvedAlias=null;this._$prefixManager=null===(o=t.ownerShadowRoot)||void 0===o?void 0:o.getHostNode().getRootBehavior().ownerSpace.styleScopeManager}return t.prototype._$resolvePrefixes=function(t,e){var n,r=null===(n=this._$owner)||void 0===n?void 0:n._$resolvedAlias;if(r&&void 0!==r[t]){var o=r[t];if(this._$hasResolvedNames=!0,o)for(var i=0;i<o.length;i+=1){var a=o[i];e(a.scopeId,a.className)}}else if("~"===t[0])e(this._$rootScope,t.slice(1));else if("^"===t[0]){for(var s=t.slice(1),l=this._$owner;l&&"^"===s[0];)s=s.slice(1),l=l._$owner;e(l?l._$defaultScope:this._$rootScope,s)}else void 0!==this._$extraScope&&e(this._$extraScope,t),e(this._$defaultScope,t)},t.prototype._$updateResolvedAliases=function(t){var e=this,n=this._$alias[t],r=[];n&&n.forEach((function(t){e._$resolvePrefixes(t,(function(t,e){r.push({scopeId:t,className:e})}))}));var o=!1,i=this._$resolvedAlias[t];if(i)if(i.length!==r.length)o=!0;else for(var a=0;a<i.length;a+=1){var s=i[a],l=r[a];if(s.scopeId!==l.scopeId||s.className!==l.className){o=!0;break}}else r.length>0&&(o=!0);return this._$resolvedAlias[t]=r,o},t.prototype._$hasAlias=function(t){return!(!this._$alias||void 0===this._$alias[t])},t.prototype._$setAlias=function(t,e){if(this._$alias){var n=String(e).match(C)||null;this._$alias[t]=n,this._$updateResolvedAliases(t)&&(this._$aliasDirty=!0)}},t.prototype._$spreadAliasUpdate=function(){if(this._$aliasDirty){this._$aliasDirty=!1;var t=function(e){var n=e.classList;if(n){var r=n._$alias;if(r){var o=!1;if(Object.keys(r).forEach((function(t){n._$updateResolvedAliases(t)&&(o=!0)})),o){var i=e;!1===i._$external&&t(i.shadowRoot)}}n._$hasResolvedNames&&n._$updateResolvedNames()}e.childNodes.forEach((function(e){e instanceof ot&&t(e)}))},e=this._$elem;!1===e._$external&&t(e.shadowRoot)}},t.prototype._$updateResolvedNames=function(){var t=this,e=this._$elem.getBackendElement();e&&(this._$hasResolvedNames=!1,e.setAttribute("class",""),this._$rawNames.forEach((function(n){t._$addClassToBackend(n,e)})))},t.prototype._$classListAdd=function(t,e,n){var r,o=void 0===e?"":null===(r=this._$prefixManager)||void 0===r?void 0:r.queryName(e),i=o?"".concat(o,"--").concat(t):t;n.classList.add(i)},t.prototype._$classListRemove=function(t,e,n){var r,o=e&&(null===(r=this._$prefixManager)||void 0===r?void 0:r.queryName(e)),i=o?"".concat(o,"--").concat(t):t;n.classList.remove(i)},t.prototype._$addClassToBackend=function(t,e){var n=this;this._$resolvePrefixes(t,(function(t,r){n._$classListAdd(r,t,e)}))},t.prototype._$removeClassFromBackend=function(t,e){var n=this;this._$resolvePrefixes(t,(function(t,r){n._$classListRemove(r,t,e)}))},t.prototype.toggle=function(t,e){var n=this,r=String(t).match(C)||null;if(r){var o=this._$elem.getBackendElement();r.forEach((function(r){var i=n._$rawNames.indexOf(t),a=!1;if((void 0===e?i<0:e)?i<0&&(n._$rawNames.push(r),o&&n._$addClassToBackend(r,o),a=!0):i>=0&&(n._$rawNames.splice(i,1),o&&n._$removeClassFromBackend(r,o),a=!0),a){var s=n._$elem;s._$mutationObserverTarget&&fe.callAttrObservers(s,{type:"properties",target:s,attributeName:"class"})}}))}},t.prototype.contains=function(t){for(var e=0;e<this._$rawNames.length;e+=1){var n=this._$rawNames[e];if("~"===n[0]){if((r=n.slice(1))===t)return!0}else if("^"===n[0]){for(var r=n.slice(1);"^"===r[0];)r=r.slice(1);if(r===t)return!0}else if(n===t)return!0}return!1},t.prototype.setClassNames=function(t,e){var n;void 0===e&&(e=0);for(var r=(null==t?"":String(t)).match(C)||[];this._$rawNamesSegmentSep.length<e;)this._$rawNamesSegmentSep.push(this._$rawNamesSegmentSep.length>0?this._$rawNamesSegmentSep[this._$rawNamesSegmentSep.length-1]:this._$rawNames.length);if(0===this._$rawNamesSegmentSep.length)this._$rawNames=r;else{for(var o=e<this._$rawNamesSegmentSep.length?this._$rawNamesSegmentSep[e]:this._$rawNames.length,i=e>0?this._$rawNamesSegmentSep[e-1]:0,a=o-i,s=r.length-a,l=e;l<this._$rawNamesSegmentSep.length;l+=1)this._$rawNamesSegmentSep[l]+=s;(n=this._$rawNames).splice.apply(n,function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}([i,a],r,!1))}this._$updateResolvedNames();var u=this._$elem;u._$mutationObserverTarget&&fe.callAttrObservers(u,{type:"properties",target:u,attributeName:"class"})},t.prototype.getClassNames=function(){return this._$rawNames?this._$rawNames.join(" "):""},t}(),E=function(t){for(var e=t.str;t.cur<e.length;){var n=e[t.cur];if(" "!==n&&"\n"!==n&&"\r"!==n&&"\t"!==n&&"\f"!==n)break;t.cur+=1}return t.cur<e.length},O=function(t){for(var e=t.str,n="";t.cur<e.length;){var r=e[t.cur];if(!(r>="0"&&r<="9"))break;n+=r,t.cur+=1}if(!n)throw new Error('data path descriptor "'.concat(e,'" is illegal at char ').concat(t.cur," (illegal index)"));return parseInt(n,10)},x=function(t){for(var e=t.str,n="";t.cur<e.length;){var r=e[t.cur];if("\\"===r)t.cur+1===e.length||(n+=e[t.cur+1],t.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 "'.concat(e,'" is illegal at char ').concat(t.cur," (field name cannot start with digits)"));n+=r}t.cur+=1}return n},k=function(t){for(var e=t.str,n="";t.cur<e.length;){var r=e[t.cur];if("\\"===r)if(t.cur+1===e.length)n+="\\",t.cur+=1;else{var o=e[t.cur+1];"."===o||"["===o||"]"===o||"\\"===o?(n+=o,t.cur+=2):(n+="\\",t.cur+=1)}else{if("."===r||"["===r)break;n+=r,t.cur+=1}}return n},A=function(t){var e=t.str;if(E(t),"*"===e[t.cur]&&"*"===e[t.cur+1])return t.cur+=2,["**"];var n=x(t);if(!n)throw new Error('data path descriptor "'.concat(e,'" is illegal at char ').concat(t.cur," (first field name illegal)"));for(var r=[n];t.cur<e.length&&E(t);){var o=e[t.cur];if("."===o){if(t.cur+=1,E(t),"*"===e[t.cur]&&"*"===e[t.cur+1]){r.push("**"),t.cur+=2;break}var i=x(t);if(!i)throw new Error('data path descriptor "'.concat(e,'" is illegal at char ').concat(t.cur," (field name illegal)"));r.push(i)}else{if("["!==o)break;t.cur+=1,E(t);var a=O(t);if(E(t),"]"!==e[t.cur])throw new Error('data path descriptor "'.concat(e,'" is illegal at char ').concat(t.cur," (illegal index)"));t.cur+=1,r.push(a)}}return r},L=function(t){try{var e=function(t){for(var e=t.str,n=[];t.cur<e.length;){var r=e[t.cur];if("."===r)t.cur+=1,""!==(i=k(t))&&n.push(i);else if("["===r){t.cur+=1;var o=O(t);if("]"!==e[t.cur]&&t.cur<e.length)throw new Error('data path descriptor "'.concat(e,'" is illegal at char ').concat(t.cur," (illegal index)"));t.cur+=1,n.push(o)}else{var i=k(t);n.push(i)}}return 0===n.length&&n.push(""),n}({str:t,cur:0});return e}catch(t){return oe(t.message),null}},D=function(t){try{if(Array.isArray(t))return t.map((function(t){return A({str:t,cur:0})}));var e={str:t,cur:0},n=function(t){var e=[];for(e.push(A(t)),E(t);","===t.str[t.cur];)t.cur+=1,e.push(A(t)),E(t);return e}(e);if(e.cur!==t.length)throw new Error('data path descriptor "'.concat(t,'" is illegal at char ').concat(e.cur));return n}catch(t){return oe(t.message),[]}},T=function(t,e){if("object"==typeof t&&null!==t){var n=e.get(t);if(void 0!==n)return n;if(Array.isArray(t)){var r=[];e.set(t,r);for(var o=0;o<t.length;o+=1)r[o]=T(t[o],e);return r}var i={};e.set(t,i);var a=Object.keys(t);for(o=0;o<a.length;o+=1){var s=a[o];i[s]=T(t[s],e)}return i}return"symbol"==typeof t?Symbol(t.description):t},M=function(t){if("object"==typeof t&&null!==t){if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n+=1)e[n]=M(t[n]);return e}var r={},o=Object.keys(t);for(n=0;n<o.length;n+=1){var i=o[n];r[i]=M(t[i])}return r}return"symbol"==typeof t?Symbol(t.description):t},I=function(t,e){return e?T(t,new WeakMap):M(t)},R=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},P=Object.prototype.hasOwnProperty;!function(t){t[t.None=0]="None",t[t.Simple=1]="Simple",t[t.SimpleWithRecursion=2]="SimpleWithRecursion"}(v||(v={}));var j,B=function(){function t(t){this.observerTree={sub:{}},this.observers=[],this.propFields=t}return t.prototype.cloneSub=function(){var e=new t(this.propFields);return this.observers.length>0&&(e.observerTree=M(this.observerTree),e.observers=this.observers.slice()),e},t.prototype.addObserver=function(t,e){var n=this.observers.length;this.observers.push({path:e,f:t});for(var r=0;r<e.length;r+=1){for(var o=e[r],i=this.observerTree,a=!1,s=0;s<o.length;s+=1){var l=o[s];if("**"===l){a=!0;break}i.sub[l]||(i.sub[l]={sub:{}}),i=i.sub[l]}a?i.wildcard?i.wildcard.push(n):i.wildcard=[n]:i.listener?i.listener.push(n):i.listener=[n]}},t}(),U=function(t,e,n,r){for(var o=new Array(n.length),i=0;i<n.length;i+=1){for(var a=n[i],s=e,l=0;l<a.length;l+=1){var u=a[l];if("**"===u)break;if("object"!=typeof s||null===s){s=void 0;break}s=s[u]}o[i]=s}ue("Data Observer",r,t.getMethodCaller(),o,t||void 0)},F=function(t,e){if(t.listener)for(var n=0;n<t.listener.length;n+=1)e[t.listener[n]]=!0;if(t.wildcard)for(n=0;n<t.wildcard.length;n+=1)e[t.wildcard[n]]=!0;var r=Object.keys(t.sub);for(n=0;n<r.length;n+=1){var o=r[n];F(t.sub[o],e)}},G=function(t,e,n){for(var r=t,o=!0,i=0;i<n.length;i+=1){var a=n[i];if(r.wildcard)for(var s=r.wildcard,l=0;l<s.length;l+=1)e[s[l]]=!0;if(!P.call(r.sub,a)){o=!1;break}r=r.sub[a]}o&&F(r,e)},W=function(t,e,n,r){for(var o=0;o<t.length;o+=1){var i=t[o],a=i.path,s=i.f;e[o]&&(e[o]=!1,n&&U(n,r,a,s))}},V=function(t){return t===qt.Simple?1:t===qt.SimpleWithRecursion?2:0},H=function(){function t(t,e,n,r,o,i,a){this._$modelBindingListener=null,this._$pendingChanges=[],this._$doingUpdates=null,this._$comp=t,this.data=e,this._$pureDataPattern=n,this._$dataDeepCopy=r,this._$propertyPassingDeepCopy=o,this._$reflectToAttributes=i&&!!t,this._$propFields=a.propFields,this._$observerTree=a.observerTree,this._$observers=a.observers,this._$observerStatus=new Array(a.observers.length),this.innerData=this._$generateInnerData(e)}return t.prototype._$generateInnerData=function(t){var e=this._$pureDataPattern,n=this._$dataDeepCopy;if(e||0!==n){for(var r={},o=Object.keys(t),i=0;i<o.length;i+=1){var a=o[i],s=t[a];e&&e.test(a)||(r[a]=0===n?s:2===n?I(s,!0):M(s))}return r}return null},t.create=function(e){return new t(null,e,null,0,0,!1,new B({}))},t.prototype.setUpdateListener=function(t){this._$updateListener=t},t.prototype.replaceWholeData=function(t){this.data=t,this.innerData=this._$generateInnerData(t)},t.prototype.replaceDataOnPath=function(t,e){this._$pendingChanges.push([t,e,void 0,void 0])},t.prototype.spliceArrayDataOnPath=function(t,e,n,r){Array.isArray(r)?this._$pendingChanges.push([t,r,null!=e?e:-1,n||0]):oe('The splice insertion must be a string (on path "'.concat(t.join("."),'"). The change is ignored.'))},t.prototype.replaceProperty=function(t,e){var n=e;return!!this._$propFields[t]&&(0!==this._$propertyPassingDeepCopy&&(n=2===this._$propertyPassingDeepCopy?I(e,!0):M(e)),this._$pendingChanges.push([[t],n,void 0,void 0]),!0)},t.prototype.setChanges=function(t){this._$pendingChanges=t},t.prototype.getChanges=function(){return this._$pendingChanges},t.prototype.setModelBindingListener=function(t,e){this._$modelBindingListener?this._$modelBindingListener[t]=e:(this._$modelBindingListener=Object.create(null))[t]=e},t.prototype.applyDataUpdates=function(t){var e,n,r;void 0===t&&(t=!1);var o,i,a=this._$propFields,s=this._$comp,l=this._$pureDataPattern,u=this._$dataDeepCopy,c=!!this._$doingUpdates;this._$observers.length>0?this._$doingUpdates?(o=this._$doingUpdates.combined,i=this._$doingUpdates.prop):(this._$doingUpdates={prop:[],combined:[],count:0},o=this._$doingUpdates.combined,i=this._$doingUpdates.prop):(o=[],i=[]);var d=this._$pendingChanges;this._$pendingChanges=[];for(var p=0;p<d.length;p+=1){var h=d[p],f=h[0],v=h[1],g=h[2],_=h[3],$=void 0!==_,m=String(f[0]),y=!!l&&l.test(m),b=!0;if((q=a[m])&&1===f.length){var S=this.data[m],C=void 0,w=void 0;if($){if(Array.isArray(S)){var N=h;C=g>=0&&g<S.length?g:S.length,N[2]=C,S.splice.apply(S,R([C,_],v,!1))}else oe('An array splice change cannot be applied to a non-array value (on path "'.concat(f.join("."),'"). The change is ignored.'));w=S}else w=Ct(v,m,q);if(!y&&this.innerData){var E=void 0;if(0===u)h[1]=E=w;else if(void 0!==C){E=this.innerData[m];var O=void 0;h[1]=O=2===u?I(v,!0):M(v),(e=E).splice.apply(e,R([C,_],O,!1))}else h[1]=E=2===u?I(w,!0):M(w);this.innerData[m]=E}if(this.data[m]=w,this._$reflectToAttributes){var x=s.getBackendElement();if(x){var k=w;if(q.reflectIdPrefix){var A=s.ownerShadowRoot;if(A){var L=A.getHostNode()._$idPrefix;L&&(k="".concat(L,"--").concat(w))}}var D=m.replace(/[A-Z]/g,(function(t){return"-".concat(t.toLowerCase())})),T=typeof k;"boolean"===T?w?x.setAttribute(D,""):x.removeAttribute(D):"object"===T?x.setAttribute(D,JSON.stringify(k)):x.setAttribute(D,k)}}b=q.comparer?!!ue("Property Comparer",q.comparer,s,[v,S],null==s?void 0:s.general()):S!==w,!y&&b&&i.push({propName:m,prop:q,oldValue:S,newValue:w,skipModelListener:t})}else{for(var j=this.data,B=m,U=1;U<f.length;U+=1){var F=f[U];Number.isFinite(F)?P.call(j,B)&&Array.isArray(j[B])||(j[B]=[]):P.call(j,B)&&null!==j[B]&&"object"==typeof j[B]&&!Array.isArray(j[B])||(j[B]={}),j=j[B],B=F}if(C=void 0,$?(S=j[B],Array.isArray(S)?(N=h,C=g>=0&&g<S.length?g:S.length,N[2]=C,S.splice.apply(S,R([C,_],v,!1))):oe('An array splice change cannot be applied to a non-array value (on path "'.concat(f.join("."),'"). The change is ignored.'))):j[B]=v,!y&&this.innerData){j=this.innerData,B=m;for(var V=1;V<f.length;V+=1)F=f[V],Number.isFinite(F)?P.call(j,B)&&Array.isArray(j[B])||(j[B]=[]):P.call(j,B)&&null!==j[B]&&"object"==typeof j[B]&&!Array.isArray(j[B])||(j[B]={}),j=j[B],B=F;E=void 0,0===u?h[1]=E=v:void 0!==C?(E=j[B],O=void 0,h[1]=O=2===u?I(v,!0):M(v),(n=E).splice.apply(n,R([C,_],O,!1))):h[1]=E=2===u?I(v,!0):M(v),j[B]=E}!y&&q&&i.push({propName:m,prop:q,oldValue:void 0,newValue:v,skipModelListener:t||!1})}G(this._$observerTree,this._$observerStatus,f),!y&&b&&o.push(h),this._$doingUpdates&&(this._$doingUpdates.count+=1)}if(!c){if(this._$doingUpdates){var H=void 0;do{H=this._$doingUpdates.count,W(this._$observers,this._$observerStatus,s,this.data)}while(H!==this._$doingUpdates.count);this._$doingUpdates=null}if(null===(r=this._$updateListener)||void 0===r||r.call(this,this.innerData||this.data,o),s)for(p=0;p<i.length;p+=1){var z=i[p],q=(m=z.propName,z.prop),X=z.oldValue,K=z.newValue;if(!z.skipModelListener&&this._$modelBindingListener){var Y=this._$modelBindingListener[m];Y&&Y(K)}q.observer&&ue("Property Observer",q.observer,s.getMethodCaller(),[K,X],s),s._$mutationObserverTarget&&fe.callAttrObservers(s,{type:"properties",target:s,propertyName:m})}}},t}();!function(t){t[t.Normal=0]="Normal",t[t.NoDefault=1]="NoDefault"}(j||(j={}));var z,q,X=Date.now(),K=X;!function(t){t[t.None=0]="None",t[t.Mut=1]="Mut",t[t.Final=2]="Final"}(z||(z={})),function(t){t[t.NotChanged=0]="NotChanged",t[t.Failed=1]="Failed",t[t.None=2]="None",t[t.Final=3]="Final",t[t.Mut=4]="Mut"}(q||(q={}));var Y,Z=function(){function t(){this.listeners=Object.create(null),this.captureListeners=null}return t.prototype.addListener=function(t,e,n){void 0===n&&(n={});var r,o,i,a=n.final?2:n.mutated?1:0;return n.capture||n.useCapture?this.captureListeners?r=this.captureListeners:(r=Object.create(null),this.captureListeners=r):r=this.listeners,r[t]?(i=!0,o=r[t]):(i=!1,o=r[t]={mutCount:0,finalCount:0,funcArr:new le}),o.funcArr.add(e,a),2===a?(o.finalCount+=1,i&&1!==o.finalCount?0:3):1===a?(o.mutCount+=1,!i||1===o.mutCount&&0===o.finalCount?4:0):i?0:2},t.prototype.removeListener=function(t,e,n){void 0===n&&(n={});var r=n.capture||n.useCapture?this.captureListeners:this.listeners;if(!r)return 1;var o=r[t];if(!o)return 1;var i=o.funcArr.remove(e);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},t}(),Q=function(){function t(t,e,n){void 0===n&&(n={});var r=function(){var t=Date.now();return t<K&&(X+=t-K),K=t,t-X}();this.type=t,this.timeStamp=r,this.detail=e,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,n.extraFields&&Object.assign(this,n.extraFields)}return t.prototype.getEventBubbleStatus=function(){return this._$eventBubblingControl.noDefault?1:0},t.prototype.wrapShadowedEvent=function(t,e,n){var r=Object.create(this);return r.target=t,r.mark=e,r.currentTarget=n,r},t.prototype.getOriginalEvent=function(){return this._$originalEvent},t.prototype.preventDefault=function(){this._$eventBubblingControl.noDefault=!0},t.prototype.defaultPrevented=function(){return this._$eventBubblingControl.noDefault},t.prototype.stopPropagation=function(){this._$eventBubblingControl.stopped=!0},t.prototype.propagationStopped=function(){return this._$eventBubblingControl.stopped},t.prototype.markMutated=function(){this._$eventBubblingControl.mutated=!0},t.prototype.mutatedMarked=function(){return this._$eventBubblingControl.mutated},t.prototype.callListener=function(t,e,n,r){var o=this.type,i=t._$eventTarget;if(i){var a=r?i.captureListeners:i.listeners;if(a){var s=a[o];if(s){var l=this.mutatedMarked(),u=n instanceof $t&&n.getMethodCaller()||n,c=t instanceof $t&&t.getMethodCaller()||t,d=this.wrapShadowedEvent(u,e,c);!1===s.funcArr.call(c,[d],(function(t){return!l||1!==t}),n instanceof $t?n:void 0)||s.finalCount>0?(d.stopPropagation(),d.preventDefault()):s.mutCount>0&&d.markMutated()}}}},t.prototype.dispatch=function(t,e){var n=this;if(this._$dispatched)throw new Error("Event cannot be dispatched twice");this._$dispatched=!0;var r=this.composed,o=this.bubbles,i=e&&!r,a=this._$eventBubblingControl,s=function(t,e){for(var n=function(t){for(var o=t,i=t.collectMarks();;){if(!1===e(o,t,i))return null;var a=void 0;if(r){if(o instanceof Se)return o.getHostNode();if(null===o.containingSlot)return null;if(o.containingSlot)a=n(o.containingSlot);else for(a=o.parentNode;null==a?void 0:a._$inheritSlots;)a=a.parentNode}else a=o.parentNode;if(!a)return null;o=a}},o=t;;){var i=n(o);if(!i)break;o=i}};if(this._$capturePhase&&!a.stopped&&!i){var l=[];s(t,(function(t,e,n){l.push([t,e,n])}));for(var u=l.length-1;u>=0;u-=1){var c=l[u],d=c[0],p=c[1],h=c[2];if(d._$eventTarget&&(this.callListener(d,h,p,!0),a.stopped))break}}if(!a.stopped&&e&&t instanceof $t&&t._$external&&t.shadowRoot.handleEvent(e,this),!a.stopped&&!i){var f=!0;s(t,(function(t,e,r){if(!f&&t instanceof $t&&t._$external){var i=t.shadowRoot;i.handleEvent(i.slot,n)}return f=!1,t._$eventTarget&&n.callListener(t,r,e,!1),o&&!a.stopped}))}},t.dispatchEvent=function(t,e){return e.dispatch(t)},t.dispatchExternalEvent=function(t,e,n){return n.dispatch(t,e)},t.triggerEvent=function(e,n,r,o){var i=new t(n,r,o);t.dispatchEvent(e,i)},t.triggerExternalEvent=function(e,n,r,o,i){var a=new t(r,o,i);t.dispatchExternalEvent(e,n,a)},t}();!function(t){t[t.Child=0]="Child",t[t.Descendant=1]="Descendant",t[t.CrossShadowDescendant=2]="CrossShadowDescendant"}(Y||(Y={}));var J,tt=function(t){var e;return null===(e=t.ownerShadowRoot)||void 0===e?void 0:e.getHostNode().getRootBehavior().ownerSpace},et=function(){function t(e){this.unions=[];for(var n=String(e||"").split(","),r=0;r<n.length;r+=1){for(var o=n[r].split(/( |\t|>+)/g),i=[],a=1,s=0;s<o.length;s+=1){var l=o[s];if(l&&" "!==l&&"\t"!==l&&">>"!==l)if(">"!==l[0]){var u=t._$parseSegment(l,a);if(a=1,!u)break;i.push(u)}else{if(1!==a)break;a=3===l.length?2:0}}s===o.length&&i.length&&this.unions.push(i)}}return t._$parseSegment=function(t,e){var n=/^(#[_a-zA-Z][-_a-zA-Z0-9:]*|)((?:\.-?[_a-zA-Z][-_a-zA-Z0-9]*)+|)$/.exec(t);if(!n)return null;var r=n[1].slice(1),o=n[2].split(".");return o.shift(),r||o.length?{id:r,classes:o,relation:e}:null},t.prototype.isEmpty=function(){return 0===this.unions.length},t._$testSelectorSegment=function(e,n,r,o,i,a){var s;if(r===e)return!1;var l=o[i],u=!0;(tt(r)!==n||l.id&&l.id!==r.id)&&(u=!1);for(var c=l.classes,d=0;u&&d<c.length;d+=1)(null===(s=r.classList)||void 0===s?void 0:s.contains(c[d]))||(u=!1);if(!u&&0===a)return!1;var p=r;if(u&&0===i){if(null===e)return!0;for(p=p.parentNode;p;p=p.parentNode)if(p===e)return!0;if(2!==a)return!1;p=r,u=!1}var h=u?l.relation:a;do{p.parentNode?p=p.parentNode:2===h?p=p instanceof Se?p.getHostNode():null:2===a?(u=!1,p=p instanceof Se?p.getHostNode():null):p=null,p===e&&(p=null)}while(p instanceof st);if(!p)return!1;if(u){if(t._$testSelectorSegment(e,n,p,o,i-1,h))return!0;if(2!==a)return!1}return t._$testSelectorSegment(e,n,p,o,i,a)},t.prototype.testSelector=function(e,n){if(n instanceof st)return!1;var r,o=this.unions;if(void 0===(r=null!==e&&tt(e)||tt(n)))return!1;for(var i=0;i<o.length;i+=1){var a=o[i];if(t._$testSelectorSegment(e,r,n,a,a.length-1,0))return!0}return!1},t.prototype.query=function(t,e){var n=this,r=[],o=function(t,e,i){if(n.testSelector(t,e)){if(i)return e;r.push(e)}if(e instanceof $t){var a=e.getShadowRoot();if(a){var s=o(t,a,i);if(s&&i)return s}}for(var l=e.childNodes,u=0;u<l.length;u+=1){var c=l[u];if(c instanceof ot){var d=o(t,c,i);if(d&&i)return d}}return null},i=o(t,t,e);return e?i:r},t}(),nt=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};!function(t){t[t.MAIN=0]="MAIN",t[t.TEMPLATE_EXTRA=1]="TEMPLATE_EXTRA",t[t.ANIMATION_EXTRA=2]="ANIMATION_EXTRA",t[t.TEMP_EXTRA=3]="TEMP_EXTRA"}(J||(J={}));var rt,ot=function(){function t(){throw new Error("Element cannot be constructed directly")}return t.prototype._$initialize=function(t,e,n,r){this._$backendElement=e,this._$destroyOnDetach=!1,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._$placeholderHandler=void 0,this._$virtual=t,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 Z},Object.defineProperty(t.prototype,"$$",{get:function(){return this._$backendElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this._$nodeId},set:function(t){var e,n=String(t);if(this._$nodeId!==n){if(this._$nodeId=n,this.ownerShadowRoot){var r=this.ownerShadowRoot.getHostNode();if(this.ownerShadowRoot._$markIdCacheDirty(),r.getComponentOptions().writeIdToDOM){var o=r._$idPrefix,i=o?"".concat(o,"--").concat(n):n,a=this._$backendElement;a&&(a.id=i)}}ee.writeExtraInfoToAttr&&(null===(e=this._$backendElement)||void 0===e||e.setAttribute("exparser:info-attr-id",n)),this._$mutationObserverTarget&&fe.callAttrObservers(this,{type:"properties",target:this,attributeName:"id"})}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"slot",{get:function(){return this._$nodeSlot},set:function(e){var n=String(e);if(this._$nodeSlot!==n)if(this._$inheritSlots)oe('slots-inherited nodes do not support "slot" attribute.');else{this._$nodeSlot=n;var r=t._$getParentHostShadowRoot(this.parentNode);if(r){var o=r.getSlotMode();if(3===o)return void oe("nodes inside dynamic slots should change binding slots through Element#setSlotElement.");if(0===o)return void oe("nodes inside direct slots should not change slot name.");var i=Se._$updateSubtreeSlotNodes(this.parentNode,[this],r,r,this.parentIndex);null==i||i.removeSlotNodes();var a=this.containingSlot;null==i||i.updateContainingSlot();var s=this.containingSlot;t.insertChildReassign(this.parentNode,this,a,s,this.parentIndex+1),null==i||i.insertSlotNodes()}this._$mutationObserverTarget&&fe.callAttrObservers(this,{type:"properties",target:this,attributeName:"slot"})}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var t=[];return this._$nodeAttributes&&Object.entries(this._$nodeAttributes).forEach((function(e){var n=e[0],r=e[1];t.push({name:n,value:r})})),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"class",{get:function(){return this.classList?this.classList.getClassNames():""},set:function(t){this.classList&&this.classList.setClassNames(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this._$styleSegments[0]||""},set:function(t){this.setNodeStyle(t,0)},enumerable:!1,configurable:!0}),t.prototype.asTextNode=function(){return null},t.prototype.asElement=function(){return this},t.prototype.asNativeNode=function(){return this instanceof $e?this:null},t.prototype.asVirtualNode=function(){return this instanceof st?this:null},t.prototype.asInstanceOf=function(t){return this instanceof $t?this.asInstanceOf(t):null},t.prototype.getBackendContext=function(){return this._$nodeTreeContext},t.prototype.getBackendMode=function(){return this._$nodeTreeContext.mode},t.prototype.getBackendElement=function(){return this._$backendElement},t.prototype.destroyBackendElement=function(){this._$backendElement&&(this._$backendElement=null)},t.prototype.destroyBackendElementOnDetach=function(){this._$destroyOnDetach=!0},t.prototype.cancelDestroyBackendElementOnDetach=function(){this._$destroyOnDetach=!1},t.prototype.isVirtual=function(){return this._$virtual},t.prototype.setNodeClass=function(t,e){var n;void 0===e&&(e=0),null===(n=this.classList)||void 0===n||n.setClassNames(t,e)},t.prototype.setNodeStyle=function(t,e){if(void 0===e&&(e=0),this._$styleSegments[e]!==t){this._$styleSegments[e]=t;var n=this._$styleSegments.join(";");this._$backendElement&&this._$backendElement.setAttribute("style",n),this._$mutationObserverTarget&&fe.callAttrObservers(this,{type:"properties",target:this,attributeName:"style"})}},t.checkAndCallAttached=function(e){!function e(n){if(n instanceof t&&!n._$attached){if(n._$attached=!0,n instanceof $t){n.triggerLifetime("attached",[]),n._$relation&&(n._$relation.triggerLinkEvent(2,!1),n._$relation.triggerLinkEvent(4,!1),n._$relation.triggerLinkEvent(0,!1)),n._$mutationObserverTarget&&fe.callAttachObservers(n,{type:"attachStatus",target:n,status:"attached"});var r=n.getShadowRoot();r&&e(r)}for(var o=n.childNodes,i=0;i<o.length;i+=1)e(o[i])}}(e)},t.checkAndCallDetached=function(e){!function e(n){if(n._$destroyOnDetach&&n.destroyBackendElement(),n instanceof t&&n._$attached)if(n instanceof $t&&n.triggerLifetime("beforeDetach",[]),n.childNodes.forEach(e),n instanceof $t){var r=n._$placeholderHandler;r&&r();var o=n.getShadowRoot();o&&e(o),n._$attached=!1,n.triggerLifetime("detached",[]),n._$relation&&(n._$relation.triggerLinkEvent(2,!0),n._$relation.triggerLinkEvent(4,!0),n._$relation.triggerLinkEvent(0,!0)),n._$mutationObserverTarget&&fe.callAttachObservers(n,{type:"attachStatus",target:n,status:"detached"})}else n._$attached=!1}(e)},t.checkAndCallMoved=function(e){!function e(n){if(n instanceof t&&n._$attached&&(n.childNodes.forEach(e),n instanceof $t)){var r=n.getShadowRoot();r&&e(r),n.triggerLifetime("moved",[]),n._$relation&&(n._$relation.triggerLinkEvent(2,!1),n._$relation.triggerLinkEvent(4,!1),n._$relation.triggerLinkEvent(0,!1))}}(e)},t.checkChildObservers=function(t,e,n){var r,o=t._$mutationObserverTarget;if(o&&(!(null===(r=o.childObservers)||void 0===r?void 0:r.empty)||o.hasSubtreeListeners())){var i,a=[n];i="add"===e?{type:"childList",target:t,addedNodes:a}:"remove"===e?{type:"childList",target:t,removedNodes:a}:{type:"childList",target:t,addedNodes:a,removedNodes:a},fe.callChildObservers(t,i)}},t.hasSubtreeMutationObservers=function(t){var e;return(null===(e=t._$mutationObserverTarget)||void 0===e?void 0:e.hasSubtreeListeners())||!1},t._$insertChildReassignSlot=function(e,n,r,o){if(r)if(o)for(i=nt([],r.slotNodes,!0),a=0;a<i.length;a+=1)s=i[a],t._$spliceSlotNodes(r,0,1,void 0),t._$spliceSlotNodes(o,-1,0,[s]),t._$updateContainingSlot(s,o),s._$inheritSlots||t.insertChildReassign(s.parentNode,s,r,o,s.parentIndex);else for(var i=nt([],r.slotNodes,!0),a=0;a<i.length;a+=1){var s=i[a];t._$spliceSlotNodes(r,0,1,void 0),t._$updateContainingSlot(s,o),s._$inheritSlots||t.insertChildReassign(s.parentNode,s,r,null,s.parentIndex)}else{var l=[];e.forEachNodeInSpecifiedSlot(null,(function(e){null!==n&&(e instanceof t?e._$nodeSlot:"")!==n||l.push(e)}));for(a=0;a<l.length;a+=1){s=l[a];t._$spliceSlotNodes(o,-1,0,[s]),t._$updateContainingSlot(s,o),s._$inheritSlots||t.insertChildReassign(s.parentNode,s,null,o,s.parentIndex)}}},t.insertChildReassign=function(e,n,r,o,i){if(r)if(o);else{var a=t.findNearestNonVirtual(r);if(a){var s=t.countNonVirtual(n);if(s){for(var l=s[0],u=s[1],c=l._$backendElement,d=1;d<u;d+=1){var p=c.nextSibling;p&&a.removeChild(p)}u>0&&a.removeChild(c)}}}o&&t.insertChildComposed(e,n,void 0,!1,i)},t.findNearestNonVirtual=function(t){for(var e=t;null==e?void 0:e._$virtual;)e=e instanceof Se?e.getHostNode():void 0===e.containingSlot?e.parentNode:e.containingSlot;return e?e._$backendElement:null},t.countNonVirtual=function(e){var n,r=null,o=0,i=function(t){0===o&&(r=t),o+=1};return(n=e)instanceof t&&n._$virtual?n.forEachNonVirtualComposedChild(i):i(n),r?[r,o]:null},t.forEachNodeInSlot=function(t,e){var n=function(t){if(!1===e(t,t.containingSlot))return!1;if(t._$inheritSlots){for(var r=t.childNodes,o=0;o<r.length;o+=1)if(!n(r[o]))return!1;return!0}return!0};return n(t)},t.forEachNodeInSpecificSlot=function(t,e,n){var r=function(t){if(t.containingSlot===e&&!1===n(t))return!1;if(t._$inheritSlots){for(var o=t.childNodes,i=0;i<o.length;i+=1)if(!r(o[i]))return!1;return!0}return!0};return r(t)},t.forEachSlotContentInSlot=function(t,e){var n=function(t){if(t._$inheritSlots){for(var r=t.childNodes,o=0;o<r.length;o+=1)if(!n(r[o]))return!1;return!0}return!1!==e(t,t.containingSlot)};return n(t)},t.forEachSlotContentInSpecificSlot=function(t,e,n){var r=function(t){if(t._$inheritSlots){for(var o=t.childNodes,i=0;i<o.length;i+=1)if(!r(o[i]))return!1;return!0}return t.containingSlot!==e||!1!==n(t)};return r(t)},t._$findFirstNonVirtualChild=function(e,n){var r=null!==e._$slotName,o=r?e.slotNodes:e.childNodes;if(n>=0&&n<o.length)for(var i=function(t){var e=null,n=function(t){return e=t,!1},i=function(t){if(!r&&t._$inheritSlots)for(var e=t.childNodes,o=0;o<e.length;o+=1)if(!1===i(e[o]))return!1;return t._$virtual?t.forEachNonVirtualComposedChild(n):n(t)};if(i(o[t]),e)return{value:e}},a=n;a<o.length;a+=1){var s=i(a);if("object"==typeof s)return s.value}if(!e._$virtual)return null;var l=e.containingSlot;if(null===l)return null;if(void 0!==l)return t._$findFirstNonVirtualChild(l,e.slotIndex+1);var u=e;if(e instanceof Se&&!(u=e.getHostNode())._$virtual)return null;var c=u.parentNode;return c?t._$findFirstNonVirtualChild(c,u.parentIndex+1):null},t._$findFirstNonVirtualSibling=function(e,n){var r=e.containingSlot;if(null===r)return null;if(void 0!==r){if(!r._$virtual)return null;if(void 0!==e.slotIndex)return t._$findFirstNonVirtualChild(r,e.slotIndex+1);var o=t._$findSlotNodeInsertPosition(r,e,n);return t._$findFirstNonVirtualChild(r,o)}var i=e;if(e instanceof Se&&!(i=e.getHostNode())._$virtual)return null;var a=i.parentNode;return a?t._$findFirstNonVirtualChild(a,n):null},t.insertChildComposed=function(e,n,r,o,i){for(var a,s,l,u=!1,c=e;null==c?void 0:c._$inheritSlots;)u=!0,c=c.parentNode;if(c){var d,p=c,h=p._$nodeTreeContext;p instanceof $t?p._$external?d=p.shadowRoot.slot:u=!0:(p._$virtual&&(u=!0),d=t.findNearestNonVirtual(p));var f=null,v=function(e,a){var s=e||(a?t.findNearestNonVirtual(a):null),l=0,c=null,d=null,p=null;if(n){var v=f||h.document.createDocumentFragment();f=v;var g=function(t){v.appendChild(t._$backendElement),d=v};t.forEachNodeInSpecificSlot(n,a,(function(t){p||(p=t),t._$virtual?t.forEachNonVirtualComposedChild(g):g(t)}))}if(s){if((r||u)&&(o&&r?(t.forEachSlotContentInSpecificSlot(r,a,(function(e){if(e instanceof t){var n=t.countNonVirtual(e);n&&(c||(c=n[0]),l+=n[1])}else c||(c=e),l+=1;return!0})),0===l&&d&&p&&(c=t._$findFirstNonVirtualSibling(void 0===a?n:p,i+1))):d&&p&&(c=t._$findFirstNonVirtualSibling(void 0===a?n:p,i))),d)if(c){var _=c._$backendElement;s.insertBefore(d,_);for(var $=1;$<l;$+=1)(m=_.nextSibling)&&s.removeChild(m);l>0&&s.removeChild(_)}else s.appendChild(d);else if(l>0){for(_=c._$backendElement,$=1;$<l;$+=1){var m;(m=_.nextSibling)&&s.removeChild(m)}l>0&&s.removeChild(_)}}else f=null};if(void 0!==d)null===d||(u||n instanceof t&&n._$virtual||r instanceof t&&r._$virtual?v(d,void 0):o?n?d.replaceChild(n._$backendElement,r._$backendElement):d.removeChild(r._$backendElement):r?d.insertBefore(n._$backendElement,r._$backendElement):d.appendChild(n._$backendElement));else if(n&&n._$inheritSlots||o&&r&&r._$inheritSlots){var g=new Set;o&&r&&t.forEachSlotContentInSlot(r,(function(t,e){g.add(e)})),n&&t.forEachSlotContentInSlot(n,(function(t,e){g.add(e)})),g.forEach((function(t){return v(null,t)}))}else n&&v(null,n.containingSlot),!o||!r||n&&r.containingSlot===n.containingSlot||v(null,r.containingSlot);ee.writeExtraInfoToAttr&&(o&&r instanceof t&&(null===(a=r._$backendElement)||void 0===a||a.removeAttribute("exparser:info-in-slot-of")),n instanceof t&&(e instanceof $t?null===(s=n._$backendElement)||void 0===s||s.setAttribute("exparser:info-in-slot-of",e._$componentInstanceId):null===(l=n._$backendElement)||void 0===l||l.removeAttribute("exparser:info-in-slot-of")))}},t._$updateSubtreeSlotsInsertion=function(t,e,n,r,o){if(e&&n){var i=t,a=null,s=null,l=function(t,e){if(t._$subtreeSlotStart){for(var n=t.childNodes,r=e+1,o=n[r];o&&!o._$subtreeSlotStart;)o=n[r+=1];o?(s=o._$subtreeSlotStart,a=s.prev):(a=t._$subtreeSlotEnd)&&(s=a.next)}else{for(var i=t,u=t.parentNode;u&&!u._$subtreeSlotStart;)i=u,u=u.parentNode;u&&l(u,i.parentIndex)}};for(l(i,r),a&&(a.next=e,e.prev=a),s&&(s.prev=n,n.next=s);i;){var u=!1;if(i._$subtreeSlotStart?i._$subtreeSlotStart===s?(i._$subtreeSlotStart=e,u=!0):i._$subtreeSlotEnd===a&&(i._$subtreeSlotEnd=n,u=!0):(i._$subtreeSlotStart=e,i._$subtreeSlotEnd=n,u=!0),!u||!i.parentNode)break;i=i.parentNode}var c=i.ownerShadowRoot;(null==c?void 0:c.isConnected(i))&&c._$applySlotsInsertion(e,n,o)}},t._$updateSubtreeSlotsRemoval=function(t,e,n,r){if(e&&n){var o=t,i=e.prev,a=n.next;for(i&&(i.next=a,e.prev=null),a&&(a.prev=i,n.next=null);o;){var s=!1;if(o._$subtreeSlotStart===e&&o._$subtreeSlotEnd===n&&(o._$subtreeSlotStart=o._$subtreeSlotEnd=null,s=!0),o._$subtreeSlotStart===e?(o._$subtreeSlotStart=a,s=!0):o._$subtreeSlotEnd===n&&(o._$subtreeSlotEnd=i,s=!0),!s||!o.parentNode)break;o=o.parentNode}var l=o.ownerShadowRoot;(null==l?void 0:l.isConnected(o))&&l._$applySlotsRemoval(e,n,r)}},t._$updateSubtreeSlotsReplacement=function(e,n,r,o,i,a,s){if(n&&r)if(o&&i){var l=e,u=o.prev,c=i.next;for(u&&(u.next=n,n.prev=u,o.prev=null),c&&(c.prev=r,r.next=c,i.next=null);l;){var d=!1;if(l._$subtreeSlotStart===o&&(l._$subtreeSlotStart=n,d=!0),l._$subtreeSlotEnd===i&&(l._$subtreeSlotEnd=r,d=!0),!d||!l.parentNode)break;l=l.parentNode}var p=l.ownerShadowRoot;(null==p?void 0:p.isConnected(l))&&(p._$applySlotsRemoval(o,i,!1),p._$applySlotsInsertion(n,r,s))}else t._$updateSubtreeSlotsInsertion(e,n,r,a,s);else t._$updateSubtreeSlotsRemoval(e,o,i,s)},t.insertChildSingleOperation=function(e,n,r,o){var i,a,s,l;if(n&&e.ownerShadowRoot!==n.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");var u,c=r,d=c>=0?e.childNodes[c]:void 0;if((u=!!o&&!!d&&n!==d)||n){var p;if(n){if(p=n.parentNode){var h=p.childNodes,f=n.parentIndex;h.splice(f,1);for(var v=f;v<h.length;v+=1)h[v].parentIndex=v;n.parentIndex=-1,p===e&&f<c&&(c-=1);var g=Se._$updateSubtreeSlotNodes(e,[n],null,t._$getParentHostShadowRoot(p),c);null==g||g.removeSlotNodes(),null==g||g.updateContainingSlot()}n.parentNode=e,n instanceof t&&p!==e&&(p&&(null===(i=p._$mutationObserverTarget)||void 0===i||i.detachChild(n)),null===(a=e._$mutationObserverTarget)||void 0===a||a.attachChild(n))}else p=null;var _=t._$getParentHostShadowRoot(e),$=n?Se._$updateSubtreeSlotNodes(e,[n],_,null,c):null,m=d&&u?Se._$updateSubtreeSlotNodes(e,[d],null,_,c):null;null==$||$.updateContainingSlot(),null==m||m.removeSlotNodes(),t.insertChildComposed(e,n,d,u,c),null==$||$.insertSlotNodes(),null==m||m.updateContainingSlot(),u&&d&&(d instanceof t&&(null===(s=e._$mutationObserverTarget)||void 0===s||s.detachChild(d)),d.parentNode=null,d.parentIndex=-1);var y=e.childNodes;if(n)if(c<0)y.push(n),n.parentIndex=y.length-1;else if(u)y[c]=n,n.parentIndex=c;else for(y.splice(c,0,n),v=c;v<y.length;v+=1)y[v].parentIndex=v;else if(u)for(y.splice(c,1),v=c;v<y.length;v+=1)y[v].parentIndex=v;var b=n?n._$subtreeSlotStart:null,S=n?n._$subtreeSlotEnd:null,C=d?d._$subtreeSlotStart:null,w=d?d._$subtreeSlotEnd:null;n?(p&&t._$updateSubtreeSlotsRemoval(p,b,S,!0),u?t._$updateSubtreeSlotsReplacement(e,b,S,C,w,c,!!p):t._$updateSubtreeSlotsInsertion(e,b,S,c,!!p)):u&&d&&t._$updateSubtreeSlotsRemoval(e,C,w,!1),null===(l=e.ownerShadowRoot)||void 0===l||l._$markIdCacheDirty(),u&&(t.checkAndCallDetached(d),t.checkChildObservers(e,"remove",d)),n&&((null==p?void 0:p._$attached)?e._$attached?t.checkAndCallMoved(n):t.checkAndCallDetached(n):e._$attached&&t.checkAndCallAttached(n),p===e?t.checkChildObservers(e,"move",n):(p&&t.checkChildObservers(p,"remove",n),t.checkChildObservers(e,"add",n)))}},t.insertChildBatchRemoval=function(e,n,r){e.childNodes[n];for(var o,i,a=e;null==a?void 0:a._$inheritSlots;)a=a.parentNode;for(var s=a instanceof $t&&!a._$external?a.shadowRoot:null,l=e.childNodes,u=l.splice(n,r),c=n;c<l.length;c+=1)l[c].parentIndex=c;var d=Se._$updateSubtreeSlotNodes(e,u,null,s,n);for(null==d||d.removeSlotNodes(),c=r-1;c>=0;c-=1)t.insertChildComposed(e,null,u[c],!0,c);for(c=0;c<r;c+=1){var p=u[c];p.parentNode=null,p.parentIndex=-1,p instanceof t&&(null===(o=e._$mutationObserverTarget)||void 0===o||o.detachChild(p))}null==d||d.updateContainingSlot();var h=null,f=null;for(c=0;c<r;c+=1){var v=u[c];h||(h=v._$subtreeSlotStart),v._$subtreeSlotEnd&&(f=v._$subtreeSlotEnd)}for(t._$updateSubtreeSlotsRemoval(e,h,f,!1),null===(i=e.ownerShadowRoot)||void 0===i||i._$markIdCacheDirty(),c=0;c<r;c+=1){var g=u[c];t.checkAndCallDetached(g),t.checkChildObservers(e,"remove",g)}},t.insertChildBatchInsertion=function(e,n,r){for(var o,i,a=r>=0?e.childNodes[r]:void 0,s=e;null==s?void 0:s._$inheritSlots;)s=s.parentNode;for(var l=s instanceof $t&&!s._$external?s.shadowRoot:null,u=0;u<n.length;u+=1){var c=n[u];if(e.ownerShadowRoot!==c.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");if(c.parentNode)throw new Error("Cannot batch-insert the node which already has a parent.");c.parentNode=e,c instanceof t&&(null===(o=e._$mutationObserverTarget)||void 0===o||o.attachChild(c))}var d=Se._$updateSubtreeSlotNodes(e,n,l,null,r);null==d||d.updateContainingSlot();var p=r>=0?r:e.childNodes.length;for(u=0;u<n.length;u+=1)c=n[u],t.insertChildComposed(e,c,a,!1,p);null==d||d.insertSlotNodes();var h=e.childNodes;if(a)for(h.splice.apply(h,nt([r,0],n,!1)),u=r;u<h.length;u+=1)h[u].parentIndex=u;else for(h.push.apply(h,n),u=h.length-n.length;u<h.length;u+=1)h[u].parentIndex=u;var f=null,v=null;for(u=0;u<n.length;u+=1){var g=(c=n[u])._$subtreeSlotStart,_=c._$subtreeSlotEnd;g&&(v?(g.prev=v,v.next=g,v=_):(f=g,v=_))}for(t._$updateSubtreeSlotsInsertion(e,f,v,r+n.length-1,!1),null===(i=e.ownerShadowRoot)||void 0===i||i._$markIdCacheDirty(),u=0;u<n.length;u+=1)c=n[u],e._$attached&&t.checkAndCallAttached(c),t.checkChildObservers(e,"add",c)},t.insertChildPlaceholderReplace=function(e,n,r){var o,i,a,s,l,u;if(r&&e.ownerShadowRoot!==r.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");if(r.parentNode)throw new Error("Cannot replace with the node which already has a parent.");var c=e.childNodes[n];if(!(c instanceof t))throw new Error("Cannot replace on text nodes.");if(null!==c._$slotName||null!==r._$slotName)throw new Error("Cannot replace on slot nodes.");if(c!==r){for(var d=c.childNodes,p=0;p<d.length;p+=1)(v=d[p]).parentNode=r,v instanceof t&&(null===(i=c._$mutationObserverTarget)||void 0===i||i.detachChild(v),null===(a=e._$mutationObserverTarget)||void 0===a||a.attachChild(v));c.parentNode=null,c.parentIndex=-1,r.parentNode=e;var h=c.containingSlot;void 0!==h&&(t._$updateContainingSlot(c,void 0),t._$updateContainingSlot(r,h));var f=d.length?Se._$updateSubtreeSlotNodes(r,d,t._$getParentHostShadowRoot(r),t._$getParentHostShadowRoot(c),0):null;for(null==f||f.updateContainingSlot(),null==f||f.removeSlotNodes(),e.childNodes[n]=r,r.parentIndex=n,c.isVirtual()?t.insertChildComposed(e,r,void 0,!1,n):t.insertChildComposed(e,r,c,!0,n),p=0;p<d.length;p+=1){var v=d[p];t.insertChildComposed(r,v,void 0,!1,p)}for(null==f||f.insertSlotNodes(),r._$subtreeSlotStart=c._$subtreeSlotStart,r._$subtreeSlotEnd=c._$subtreeSlotEnd,null===(s=e._$mutationObserverTarget)||void 0===s||s.detachChild(c),null===(l=e._$mutationObserverTarget)||void 0===l||l.attachChild(r),(o=r.childNodes).push.apply(o,c.childNodes),p=r.childNodes.length-c.childNodes.length;p<r.childNodes.length;p+=1)r.childNodes[p].parentIndex=p;if(c.childNodes=[],null===(u=e.ownerShadowRoot)||void 0===u||u._$markIdCacheDirty(),e._$attached)for(t.checkAndCallDetached(c),t.checkChildObservers(e,"remove",c),t.checkAndCallAttached(r),t.checkChildObservers(e,"add",r),p=0;p<d.length;p+=1)v=d[p],t.checkAndCallMoved(v),t.checkChildObservers(e,"move",v)}},t.prototype.appendChild=function(e){t.insertChildSingleOperation(this,e,this.childNodes.length,!1)},t.prototype.insertChildAt=function(e,n){t.insertChildSingleOperation(this,e,n,!1)},t.prototype.insertBefore=function(e,n){var r=n?n.parentIndex:-1;t.insertChildSingleOperation(this,e,r,!1)},t.prototype.removeChildAt=function(e){t.insertChildSingleOperation(this,null,e,!0)},t.prototype.removeChild=function(e){var n=e.parentIndex;t.insertChildSingleOperation(this,null,n,!0)},t.prototype.replaceChildAt=function(e,n){t.insertChildSingleOperation(this,e,n,!0)},t.prototype.replaceChild=function(e,n){var r=n.parentIndex;t.insertChildSingleOperation(this,e,r,!0)},t.prototype.insertChildren=function(e,n){t.insertChildBatchInsertion(this,e,n)},t.prototype.removeChildren=function(e,n){t.insertChildBatchRemoval(this,e,n)},t.prototype.selfReplaceWith=function(e){var n=this.parentNode;n&&t.insertChildPlaceholderReplace(n,this.parentIndex,e)},t._$generateIdMap=function(e){var n=Object.create(null);return function e(r){if(r instanceof t){var o=r._$nodeId;o&&(n[o]||(n[o]=r)),r.childNodes.forEach(e)}}(e),n},t.prototype.triggerEvent=function(t,e,n){Q.triggerEvent(this,t,e,n)},t.prototype.dispatchEvent=function(t){Q.dispatchEvent(this,t)},t.prototype._$setListenerStats=function(t,e,n){if(void 0===n&&(n={}),this._$backendElement){var r,o=!!n.capture||!!n.useCapture;switch(e){case 2:r=0;break;case 4:r=1;break;case 3:r=2;break;default:return}this._$nodeTreeContext.setListenerStats(this._$backendElement,t,o,r)}},t.prototype.addListener=function(t,e,n){var r=this._$eventTarget.addListener(t,e,n);this._$setListenerStats(t,r,n),this instanceof $t&&this._$definition._$options.listenerChangeLifetimes&&this.triggerLifetime("listenerChange",[!0,t,e,n])},t.prototype.removeListener=function(t,e,n){var r=this._$eventTarget.removeListener(t,e,n);1!==r&&(this._$setListenerStats(t,r,n),this instanceof $t&&this._$definition._$options.listenerChangeLifetimes&&this.triggerLifetime("listenerChange",[!1,t,e,n]))},t.prototype.getAttribute=function(t){return this._$nodeAttributes?this._$nodeAttributes[t]:null},t.prototype.updateAttribute=function(t,e){"boolean"==typeof e?!0===e?this.setAttribute(t,""):this.removeAttribute(t):this.setAttribute(t,null==e?"":String(e))},t.prototype.setAttribute=function(t,e){var n;this._$nodeAttributes?n=this._$nodeAttributes:(n=Object.create(null),this._$nodeAttributes=n),n[t]=e,this._$backendElement&&this._$backendElement.setAttribute(t,e)},t.prototype.removeAttribute=function(t){this._$nodeAttributes&&delete this._$nodeAttributes[t],this._$backendElement&&this._$backendElement.removeAttribute(t)},t.prototype.setDataset=function(t,e){this.dataset[t]=e},t.prototype.setMark=function(t,e){if(this._$marks)this._$marks[t]=e;else{var n={};n[t]=e,this._$marks=n}},t.prototype.collectMarks=function(){var t,e={},n=function(){var n=t._$marks;n&&Object.keys(n).forEach((function(t){Object.prototype.hasOwnProperty.call(e,t)||(e[t]=n[t])}))};for(t=this;t;t=t.parentNode)n();return e},t.replaceDocumentElement=function(e,n,r){if(e._$attached)throw new Error("An attached element cannot be attached again");e._$backendElement&&n.replaceChild(e._$backendElement,r),t.checkAndCallAttached(e)},t.pretendAttached=function(e){e._$attached||t.checkAndCallAttached(e)},t.pretendDetached=function(e){e._$attached&&t.checkAndCallDetached(e)},t.isAttached=function(t){return t._$attached},t.setSlotName=function(e,n){if(e._$inheritSlots)throw new Error("Slot-inherit mode is not usable in slot element");var r=n?String(n):"",o=e._$slotName;if(o!==r){var i=null===o;e._$slotName=r,i&&(e._$subtreeSlotStart=e._$subtreeSlotEnd={value:e,prev:null,next:null});var a=e.ownerShadowRoot;if(a)if(i){3===a.getSlotMode()&&(e._$slotValues=Object.create(null)),e.slotNodes=[];var s=e.parentNode;s&&t._$updateSubtreeSlotsInsertion(s,e._$subtreeSlotStart,e._$subtreeSlotEnd,e.parentIndex,!1)}else a.isConnected(e)&&a._$applySlotRename(e,r,o)}},t.getSlotName=function(t){var e=t._$slotName;return null===e?void 0:e},t.setInheritSlots=function(t){if(!t._$virtual)throw new Error("Cannot set slot-inherit on non-virtual node");if(null!==t._$slotName||0!==t.childNodes.length)throw new Error("Slot-inherit mode cannot be set when the element has any child node");t._$inheritSlots=!0},t.getInheritSlots=function(t){return t._$inheritSlots},t.setSlotElement=function(e,n){if(e._$slotElement!==n){e._$slotElement=n;var r=t._$getParentHostShadowRoot(e.parentNode);if(r){var o=Se._$updateSubtreeSlotNodes(e.parentNode,[e],r,r,e.parentIndex),i=e.containingSlot;null==o||o.updateContainingSlot(),null==o||o.removeSlotNodes();var a=e.containingSlot;t.insertChildReassign(e.parentNode,e,i,a,e.parentIndex),null==o||o.insertSlotNodes()}}},t._$updateContainingSlot=function(t,e){t.containingSlot=e},t._$spliceSlotNodes=function(t,e,n,r){var o=t.slotNodes=t.slotNodes||[],i=e>=0&&e<o.length;if(null==r?void 0:r.length)if(i){for(var a=e;a<e+n;a+=1)o[a].slotIndex=void 0;o.splice.apply(o,nt([e,n],r,!1));for(a=e;a<o.length;a+=1)o[a].slotIndex=a}else{var s=o.length;for(o.push.apply(o,r),a=s;a<o.length;a+=1)o[a].slotIndex=a}else if(n){for(a=e;a<e+n;a+=1)o[a].slotIndex=void 0;for(o.splice(e,n),a=e;a<o.length;a+=1)o[a].slotIndex=a}},t._$findSlotNodeInsertPosition=function(t,e,n){for(var r=t.ownerShadowRoot.getHostNode(),o=function(t){for(var e=0,n=t;n&&n!==r;)e+=1,n=n.parentNode;return e},i=o(e),a=function(t,e,n,r,o,i,s){if(t===r)return 0;if(t.parentNode===r.parentNode)return e-(-1===o?s:o);if(i<n){var l=t.parentNode;return a(l,l.parentIndex,n-1,r,o,i,s)}var u=n<i?t:t.parentNode,c=n<i?n:n-1,d=r.parentNode,p=i-1,h=a(u,u.parentIndex,c,d,d.parentIndex,p,s);return 0===h?-1:h},s=t.slotNodes,l=s.length-1;l>=0;l-=1){var u=s[l];if(a(u,u.parentIndex,o(u),e,e.parentIndex,i,n-.5)<0)break}return l+1},t.prototype.getComposedParent=function(){if(this instanceof Se)return this.getHostNode();if(void 0!==this.containingSlot)return this.containingSlot;for(var t=this.parentNode;null==t?void 0:t._$inheritSlots;)t=t.parentNode;return t},t.prototype.getComposedChildren=function(){var t=[];return this.forEachComposedChild((function(e){t.push(e)})),t},t.prototype.forEachComposedChild=function(t){if(this._$inheritSlots)return!0;if(this instanceof $t&&!this._$external)return!1!==t(this.shadowRoot);if(null!==this._$slotName){var e=this.ownerShadowRoot;return!e||e.forEachNodeInSpecifiedSlot(this,t)}var n=function(e){for(var r=0;r<e.length;r+=1){var o=e[r];if(!1===t(o))return!1;if(o._$inheritSlots&&!n(o.childNodes))return!1}return!0};return n(this.childNodes)},t.prototype.forEachNonVirtualComposedChild=function(t){if(this._$inheritSlots)return!0;var e=function(e){return e._$virtual?e.forEachNonVirtualComposedChild(t):!1!==t(e)};if(this instanceof $t&&!this._$external)return e(this.shadowRoot);if(null!==this._$slotName){var n=this.ownerShadowRoot;return!n||n.forEachSlotContentInSpecifiedSlot(this,e)}var r=function(t){for(var n=0;n<t.length;n+=1){var o=t[n];if(!e(o))return!1;if(o._$inheritSlots&&!r(o.childNodes))return!1}return!0};return r(this.childNodes)},t.parseSelector=function(t){return new et(t)},t.prototype.querySelector=function(t){return(t instanceof et?t:new et(t)).query(this,!0)},t.prototype.querySelectorAll=function(t){return(t instanceof et?t:new et(t)).query(this,!1)},t.matchSelector=function(t,e){return(t instanceof et?t:new et(t)).testSelector(null,e)},t.prototype.matchSelector=function(t,e){return(t instanceof et?t:new et(t)).testSelector(this,e)},t.prototype.getBoundingClientRect=function(t){var e=this._$backendElement;if(e){var n=e.getBoundingClientRect();setTimeout((function(){t(n)}),0)}else setTimeout((function(){t({left:0,top:0,width:0,height:0})}),0)},t.prototype.getScrollOffset=function(t){var e=this._$backendElement;if(e){var n=e,r={scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight};setTimeout((function(){t(r)}),0)}else setTimeout((function(){t({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)},t.prototype.createIntersectionObserver=function(t,e,n,r){var o=this._$backendElement;return o?t&&!t._$backendElement?null:this._$nodeTreeContext.createIntersectionObserver(o,(null==t?void 0:t._$backendElement)||null,e,n,r):null},t.prototype.getContext=function(t){var e=this._$backendElement;e&&this._$nodeTreeContext.getContext(e,t)},t._$getParentHostShadowRoot=function(t){for(var e=t;null==e?void 0:e._$inheritSlots;)e=e.parentNode;return e instanceof $t&&!e._$external?e.shadowRoot:null},t}(),it=Symbol("method"),at=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),st=function(t){function e(){throw new Error("Element cannot be constructed directly")}return at(e,t),e.prototype._$initializeVirtual=function(t,e,n,r){this.is=String(t),this._$initialize(!0,r,e,n)},e.create=function(t,n){var r=Object.create(e.prototype);return r._$initializeVirtual(t,n,n._$nodeTreeContext,null),r},e}(ot);!function(t){t[t.Ancestor=0]="Ancestor",t[t.Descendant=1]="Descendant",t[t.ParentNonVirtualNode=2]="ParentNonVirtualNode",t[t.ChildNonVirtualNode=3]="ChildNonVirtualNode",t[t.ParentComponent=4]="ParentComponent",t[t.ChildComponent=5]="ChildComponent"}(rt||(rt={}));var lt,ut=function(){function t(t,e){this._$comp=t;var n=new Array(6);if(e)for(var r=0;r<6;r+=1){var o=e.definitions[r];if(o){for(var i=new Array(o.length),a=0;a<o.length;a+=1)i[a]=null;n[r]=i}}this._$group=e,this._$sharedGroup=!0,this._$links=n}return t.prototype.add=function(t){if(this._$sharedGroup){this._$sharedGroup=!1;var 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)}}var n=Symbol(""),r=this._$group.definitions,o=this._$group.keyMap,i=t.type;r[i]?(o[n]=[i,r[i].length],r[i].push(t)):(o[n]=[i,0],r[i]=[t]);var a=this._$links;return void 0===a[i]?a[i]=[null]:a[i].push(null),n},t.prototype.triggerLinkEvent=function(t,e){var n,r,o=this._$comp,i=this._$links,a=null===(n=this._$group)||void 0===n?void 0:n.definitions[t];if(a)for(var s=0;s<a.length;s+=1){var l=i[t],u=l[s],c=null,d=a[s],p=d.target;if(!e)for(var h=o;;){var f=h.parentNode;if(!f)break;if(!((h=f)instanceof st)){if(h instanceof $t){if(h.hasBehavior(p)){var v=h._$relation;if(v){var g;g=4===t?5:0===t?1:3;var _=null===(r=v._$group)||void 0===r?void 0:r.definitions[g];if(_){for(var $=0;$<_.length;$+=1){var m=_[$];if(m.target&&this._$comp.hasBehavior(m.target)){c={target:h,def:m};break}}if(c)break}}}if(4===t)break}if(2===t)break}}if(l[s]=c,u){var y=u.target,b=u.def;c&&u.target===c.target&&u.def===c.def?(b.linkChanged&&ue("Relation Link Changed Callback",b.linkChanged,y.getMethodCaller(),[o.getMethodCaller()],y),d.linkChanged&&ue("Relation Link Changed Callback",d.linkChanged,o.getMethodCaller(),[y.getMethodCaller()],o)):(b.unlinked&&ue("Relation Unlinked Callback",b.unlinked,y.getMethodCaller(),[o.getMethodCaller()],y),d.unlinked&&ue("Relation Unlinked Callback",d.unlinked,o.getMethodCaller(),[y.getMethodCaller()],o))}if(c){var S=c.target,C=c.def;u&&u.target===c.target&&u.def===c.def||(C.linked&&ue("Relation Linked Callback",C.linked,S.getMethodCaller(),[o.getMethodCaller()],S),d.linked&&ue("Relation Linked Callback",d.linked,o.getMethodCaller(),[S.getMethodCaller()],o))}e||c||!d.linkFailed||ue("Relation Link Failed Callback",d.linkFailed,o.getMethodCaller(),[],o)}},t.prototype.getLinkedTargets=function(t){var e,n,r,o,i=null===(e=this._$group)||void 0===e?void 0:e.keyMap[t];if(!i)return oe('no relation "'.concat(String(t),'" found.')),[];var a=i[0],s=i[1];if(4===a||2===a||0===a){var l=null===(n=this._$links[a])||void 0===n?void 0:n[s];return l?[l.target]:[]}var u=[],c=this._$comp,d=null===(o=null===(r=this._$group)||void 0===r?void 0:r.definitions[a])||void 0===o?void 0:o[s],p=function(t){for(var e=t.childNodes,n=0;n<e.length;n+=1){var r=e[n];if(r instanceof ot)if(r instanceof st)p(r);else if(r instanceof $t){if(r._$relation){var o;if(o=5===a?r._$relation._$links[4]:1===a?r._$relation._$links[0]:r._$relation._$links[2])for(var i=0;i<o.length;i+=1){var s=o[i];if(s&&s.target===c&&s.def===d){u.push(r);break}}}1===a&&p(r)}else 5!==a&&1!==a||p(r)}};return p(this._$comp),u},t}(),ct=function(){function t(t,e){this.ownerSpace=t,this._$trans=e}return t.prototype._$implement=function(t){var e;return(null===(e=this._$trans)||void 0===e?void 0:e.call(this,t))||t},t}(),dt=function(){function t(){this._$traits=new WeakMap}return t.prototype.implement=function(t,e){var n=t._$implement(e);this._$traits.set(t,n)},t.prototype.get=function(t){return this._$traits.get(t)},t}(),pt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ht=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},ft=function(t,e,n,r){var o=e.ownerSpace,i=null==n?void 0:n._$behavior._$using,a=null==n?void 0:n._$genericImpls;t._$detail||t.prepare();var s,l=t.behavior,u=l._$generics;if(u){var c=l._$genericDefaults;s=Object.create(null);for(var d=0;d<u.length;d+=1){var p=u[d];if(r&&Object.prototype.hasOwnProperty.call(r,p)){var h=r[p];if("string"==typeof h)if(null==i?void 0:i[h])s[p]=i[h];else if(a&&a[h])s[p]=a[h];else{var f=o.getGlobalUsingComponent(h);if("string"==typeof f)s[p]=f;else if(f)s[p]={final:f,source:e,placeholder:null,waiting:null};else{if(oe('Generic "'.concat(p,'" value "').concat(h,'" is not valid (on component "').concat(t.is,'").')),!(v=o.getDefaultComponent()))throw new Error('Cannot find default component for generic "'.concat(p,'" (on component "').concat(t.is,'")'));s[p]={final:v,source:e,placeholder:null,waiting:null}}}else s[p]=h}else{var v;if(!(v=c[p]||o.getDefaultComponent()))throw new Error('Cannot find default component for generic "'.concat(p,'" (on component "').concat(t.is,'")'));s[p]="string"==typeof v?v:{final:v,source:e,placeholder:null,waiting:null}}}}else s=null;return s},vt=function(t,e,n,r){var o,i=n._$using[t]||r&&r[t],a=null;if(i&&("string"==typeof i?a=i:null===i.placeholder?a=i.final:oe('Placeholder on generic implementation is not valid (on component "'.concat(n.is,'")'))),a)return a;var s=null!==(o=e.getGlobalUsingComponent(t))&&void 0!==o?o:e.getDefaultComponent();if(!s)throw new Error('Cannot find default component for placeholder target "'.concat(t,'" (on component "').concat(n.is,'")'));return s},gt=function(){function t(t){this.behavior=t,this.is=this.behavior.is,this._$detail=null,this._$options=ne(t._$options,t.ownerSpace.getComponentOptions());var e=this._$options.templateEngine;this._$templateEngine=e}return t.prototype.general=function(){return this},t.prototype.getComponentOptions=function(){return this._$options},t.prototype.getComponentDependencies=function(){return this.behavior.getComponentDependencies()},t.prototype.updateTemplate=function(t){var e;this.behavior._$updateTemplate(t),(null===(e=this._$detail)||void 0===e?void 0:e.template.updateTemplate)?this._$detail.template.updateTemplate(this.behavior):oe('The template engine of component "'.concat(this.is,'" does not support template update'))},t.prototype.isPrepared=function(){return!!this._$detail},t.prototype.prepare=function(){if(!this._$detail){this.behavior.prepare();var t=this.behavior,e=this._$options,n={};if(e.writeFieldsToNode){for(var r=Object.keys(t._$propertyMap),o=function(t){var e=r[t];n[e]={enumerable:!0,get:function(){return this._$dataGroup.data[e]},set:function(t){var n=this._$dataGroup;n.replaceDataOnPath([e],t),n.applyDataUpdates()}}},i=0;i<r.length;i+=1)o(i);var a=Object.keys(t._$methodMap);for(i=0;i<a.length;i+=1){var s=a[i];n[s]={enumerable:!0,value:t._$methodMap[s]}}}var l=function(){};n.constructor={value:l,writable:!0};var u=l.prototype=Object.create($t.prototype,n);u._$behavior=t,u._$definition=this,u._$methodMap=t._$methodMap;var c=t._$generateObserverTree();u._$lifetimeFuncs=t._$getAllLifetimeFuncs(),u._$pageLifetimeFuncs=t._$getAllPageLifetimeFuncs();var d=function(t){if(void 0===t)return null;for(var e={definitions:new Array(6),keyMap:Object.create(null)},n=e.definitions,r=e.keyMap,o=Object.keys(t),i=0;i<o.length;i+=1){var a=o[i],s=t[a],l=s.type;n[l]?(r[a]=[l,n[l].length],n[l].push(s)):(r[a]=[l,0],n[l]=[s])}return e}(t._$relationMap),p=V(e.dataDeepCopy),h=V(e.propertyPassingDeepCopy),f=this._$templateEngine.create(t,e);this._$detail={proto:u,template:f,dataGroupObserverTree:c,dataDeepCopy:p,propertyPassingDeepCopy:h,relationDefinitionGroup:d}}},t}(),_t=1,$t=function(t){function e(){throw new Error("Element cannot be constructed directly")}return pt(e,t),e.prototype.general=function(){return this},e.prototype.asInstanceOf=function(t){return this._$behavior!==t.behavior?null:this},e.register=function(t,e){return(e||Qt()).defineComponent(t)},e._$tagMethod=function(t){var e=t;return e[it]=!0,e},e._$isTaggedMethod=function(t){return"function"==typeof t&&!!t[it]},e._$advancedCreate=function(t,n,r,o,i,a,s){var l,u;n._$detail||n.prepare();var c=n._$detail,d=c.proto,p=c.template,h=c.dataDeepCopy,f=c.propertyPassingDeepCopy,v=c.relationDefinitionGroup,g=n._$detail.dataGroupObserverTree,_=n._$options,$=n.behavior,m=r?r._$nodeTreeContext:o||ee.backendContext||te(),y=_.externalComponent,b=_.propertyEarlyInit,S=ee.writeExtraInfoToAttr,C=_.virtualHost,w=Object.create(d);w._$genericImpls=i,w._$placeholderHandler=a,w._$external=y,w.tagName=t,w._$methodCaller=w;var E=null;r?C||(E=r._$nodeTreeContext.document.createElement(t)):C||(E=m.document.createElement(t)),w._$initialize(C,E,r,m);var O={};if($._$externalClasses)for(var x=$._$externalClasses,k=0;k<x.length;k+=1)O[x[k]]=null;if(w.classList=new N(w,O),E){var A=r?r.getHostNode()._$definition._$options.styleScope:_.styleScope;if(r&&S){var L=null===(l=r.getHostNode()._$behavior.ownerSpace)||void 0===l?void 0:l.styleScopeManager.queryName(A);L&&E.setAttribute("exparser:info-class-prefix","".concat(L,"--"))}}if(E&&m.associateValue(E,w),S&&E){var T=_t;_t+=1,w._$componentInstanceId=T,E.setAttribute("exparser:info-component-id",T)}w._$idPrefix=_.idPrefixGenerator?_.idPrefixGenerator.call(w):"";var I,R=$._$staticData,P=$._$data;if(void 0===R)if(1===P.length)I=(j=P[0])();else for(I={},k=0;k<P.length;k+=1){var j=P[k];Object.assign(I,j())}else for(I=M(R),k=0;k<P.length;k+=1)j=P[k],Object.assign(I,j());var B=w._$relation=new ut(w,v);w._$traitGroup=new dt;var U=$._$traitBehaviors;if(void 0!==U)for(k=0;k<U.length;k+=1){var F=U[k],G=F.traitBehavior,W=F.impl;w._$traitGroup.implement(G,W)}if($._$methodCallerInit){var V=$._$methodCallerInit.call(w);w._$methodCaller=V}var z=!1;if($._$init.length>0){var q=!0,X=!0,K=!0,Y=!0,Z={self:V=w.getMethodCaller(),data:I,setData:w.setData.bind(w),implement:function(t,e){if(z)throw new Error("Cannot execute init-time functions after initialization");w._$traitGroup.implement(t,e)},relation:function(t){if(z)throw new Error("Cannot execute init-time functions after initialization");var e,n=t.target,r=Nt($.ownerSpace,$.is,"undefined",t);return e=r?B.add(r):Symbol("invalid"),{list:function(){return B.getLinkedTargets(e).map((function(t){return t.getMethodCaller()}))},listAsTrait:n instanceof ct?function(){return B.getLinkedTargets(e).map((function(t){return t.traitBehavior(n)}))}:void 0}},observer:function(t,e){if(z)throw new Error("Cannot execute init-time functions after initialization");q&&(q=!1,g=g.cloneSub()),g.addObserver(e,D(t))},lifetime:function(t,e){if(z)throw new Error("Cannot execute init-time functions after initialization");X&&(X=!1,w._$lifetimeFuncs=$._$getAllLifetimeFuncs());var n=w._$lifetimeFuncs;n[t]?n[t].add(e):(n[t]=new re).add(e)},pageLifetime:function(t,e){if(z)throw new Error("Cannot execute init-time functions after initialization");K&&(K=!1,w._$pageLifetimeFuncs=$._$getAllPageLifetimeFuncs());var n=w._$pageLifetimeFuncs;n[t]?n[t].add(e):(n[t]=new re).add(e)},method:function(t){return e._$tagMethod(t)},listener:function(t){return e._$tagMethod(t)}},Q=$._$init;for(k=0;k<Q.length;k+=1){var J=Q[k],tt=ue("Component Init",J,V,[Z],void 0);if(tt)for(var et=Object.keys(tt),nt=0;nt<et.length;nt+=1){var rt=et[nt],ot=tt[rt];e._$isTaggedMethod(ot)&&(Y&&(Y=!1,w._$methodMap=Object.create(w._$methodMap)),w._$methodMap[rt]=ot,_.writeFieldsToNode&&(w[rt]=ot))}}}z=!0;var it=p.createInstance(w),at=it.shadowRoot;w.shadowRoot=at;var st=new H(w,I,_.pureDataPattern||null,h,f,_.reflectToAttributes,g);w._$dataGroup=st,b&&void 0!==s&&s(w),it.initValues(st.innerData||st.data),w._$tmplInst=it,st.setUpdateListener(it.updateValues.bind(it));var lt=$._$listeners;if(void 0!==lt){var pt=function(t){var e=lt[t],n=e.id,r=e.ev,o=e.listener;if("this"===n)w.addListener(r,(function(t){return o.call(w._$methodCaller,t)}));else if(y)a=at,(i=n?a.getIdMap()[n]:a.root)&&a.setListener(i,r,(function(t){return o.call(w._$methodCaller,t)}));else{var i,a=at;(i=n?a.getElementById(n):a)&&i.addListener(r,(function(t){return o.call(w._$methodCaller,t)}))}};for(k=0;k<lt.length;k+=1)pt(k)}return null===(u=w._$lifetimeFuncs.created)||void 0===u||u.call(w._$methodCaller,[],w),b||void 0===s||s(w),w},e.createWithGenericsAndContext=function(t,n,r,o,i){var a=function(t){var e;return r&&(e=Object.create(null),Object.entries(r).forEach((function(n){var r=n[0],o=n[1];e[r]={final:o,source:t.behavior,placeholder:null,waiting:null}}))),ft(t,t.behavior,void 0,e)};if(n)return e._$advancedCreate(String(t),n,null,o,a(n),void 0,i);if(t instanceof gt)return e._$advancedCreate(t.is,t,null,o,a(t),void 0);var s=Qt().getComponentByUrl(t,"");return e._$advancedCreate(t,s,null,o,a(s),void 0)},e.createWithGenerics=function(t,n,r,o){return e.createWithGenericsAndContext(t,n,r,null,o)},e.createWithContext=function(t,n,r,o){return e.createWithGenericsAndContext(t,n,null,r,o)},e.create=function(t,n,r){return e.createWithGenericsAndContext(t,n,null,null,r)},Object.defineProperty(e.prototype,"is",{get:function(){return this._$definition.is},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){return this._$dataGroup.data},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this._$dataGroup.data},set:function(t){var e=this._$dataGroup;Object.entries(t).forEach((function(t){var n=t[0],r=t[1];return e.replaceDataOnPath([n],r)})),e.applyDataUpdates()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"$",{get:function(){return this._$external?this.shadowRoot.getIdMap():this.shadowRoot._$getIdMap()},enumerable:!1,configurable:!0}),e.prototype.getShadowRoot=function(){return this._$external?null:this.shadowRoot},e.prototype.applyTemplateUpdates=function(){var t;if(null===(t=this._$tmplInst)||void 0===t?void 0:t.updateTemplate){var e=this._$dataGroup;this._$tmplInst.updateTemplate(this._$definition._$detail.template,e.innerData||e.data)}else oe('The template engine of component "'.concat(this.is,'" does not support template update'))},e.listProperties=function(t){return Object.keys(t._$behavior._$propertyMap)},e.hasProperty=function(t,e){return!!t._$behavior._$propertyMap[e]},e.getMethodsFromDef=function(t){return t.behavior._$methodMap},e.getMethod=function(t,e){if(t._$definition._$options.useMethodCallerListeners){var n=t._$methodCaller[e];return"function"==typeof n?n:void 0}return t._$methodMap[e]},e.prototype.callMethod=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=e.getMethod(this,t);return null==o?void 0:o.call.apply(o,ht([this],n,!1))},e.prototype.getComponentDefinition=function(){return this._$definition},e.prototype.getComponentOptions=function(){return this._$definition._$options},e.prototype.hasBehavior=function(t){return t instanceof ct?void 0!==this._$traitGroup.get(t):this._$behavior.hasBehavior(t)},e.prototype.getRootBehavior=function(){return this._$behavior},e.prototype.traitBehavior=function(t){return this._$traitGroup.get(t)},e.prototype.setMethodCaller=function(t){this._$methodCaller=t},e.prototype.getMethodCaller=function(){return this._$methodCaller},e.prototype.triggerLifetime=function(t,e){var n=this._$lifetimeFuncs[t];n&&n.call(this._$methodCaller,e)},e.prototype.triggerLifeTime=function(t,e){return this.triggerLifetime(t,e)},e.prototype.triggerPageLifetime=function(t,n){var r=function(o){if(o instanceof e){if(o._$pageLifetimeFuncs){var i=o._$pageLifetimeFuncs[t];i&&i.call(o._$methodCaller,n)}o._$external||r(o.shadowRoot)}for(var a=o.childNodes,s=0;s<a.length;s+=1){var l=a[s];l instanceof ot&&r(l)}};r(this)},e.prototype.triggerPageLifeTime=function(t,e){return this.triggerPageLifetime(t,e)},e.prototype.getRelationNodes=function(t){var e;return(null===(e=this._$relation)||void 0===e?void 0:e.getLinkedTargets(t))||[]},e.prototype.hasExternalClass=function(t){return this.classList._$hasAlias(t)},e.prototype.setExternalClass=function(t,e){var n=this.classList;n._$setAlias(t,e),n._$spreadAliasUpdate()},e.prototype.scheduleExternalClassChange=function(t,e){this.classList._$setAlias(t,e)},e.prototype.applyExternalClassChanges=function(){this.classList._$spreadAliasUpdate()},e.prototype.triggerWorkletChangeLifetime=function(t,e){this.triggerLifetime("workletChange",[t,e])},e.prototype.isInnerDataExcluded=function(t){var e;return(null===(e=this._$definition._$options.pureDataPattern)||void 0===e?void 0:e.test(t))||!1},e.getInnerData=function(t){return t._$dataGroup.innerData},e.getDataProxy=function(t){return t._$dataGroup},e.replaceWholeData=function(t,e){t._$dataGroup.replaceWholeData(e)},e.prototype.replaceDataOnPath=function(t,e){var n=this._$dataGroup;if(void 0===n)throw new Error("Cannot update data before component created");n.replaceDataOnPath(t,e)},e.prototype.spliceArrayDataOnPath=function(t,e,n,r){var o=this._$dataGroup;if(void 0===o)throw new Error("Cannot update data before component created");o.spliceArrayDataOnPath(t,e,n,r)},e.prototype.hasPendingChanges=function(){var t=this._$dataGroup;return void 0!==t&&t.getChanges().length>0},e.prototype.applyDataUpdates=function(){var t=this._$dataGroup;if(void 0===t)throw new Error("Cannot update data before component created");t.applyDataUpdates()},e.prototype.groupUpdates=function(t){var e=this._$dataGroup;if(void 0===e)throw new Error("Cannot update data before component created");var n=t();return e.applyDataUpdates(),n},e.prototype.updateData=function(t){var e=this._$dataGroup;if(void 0===e)throw new Error("Cannot update data before component created");if("object"==typeof t&&null!==t)for(var n=Object.keys(t),r=0;r<n.length;r+=1){var o=n[r],i=L(o);i&&e.replaceDataOnPath(i,t[o])}},e.prototype.setData=function(t){var e=this._$dataGroup;if(void 0===e)throw new Error("Cannot update data before component created");if("object"==typeof t&&null!==t)for(var n=Object.keys(t),r=0;r<n.length;r+=1){var o=n[r],i=L(o);i&&e.replaceDataOnPath(i,t[o])}e.applyDataUpdates()},e}(ot),mt=function(){return mt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},mt.apply(this,arguments)};!function(t){t.Invalid="invalid",t.Any="any",t.String="string",t.Number="number",t.Boolean="boolean",t.Object="object",t.Array="array",t.Function="function"}(lt||(lt={}));var yt,bt=function(t,e){for(var n=Object.keys(e),r=0;r<n.length;r+=1){var o=n[r];if(Object.prototype.hasOwnProperty.call(t,o))if("_"===o[0]&&oe('data field "'.concat(o,'" from different behaviors is overriding or merging.')),"object"!=typeof t[o]||"object"!=typeof e[o]||null===e[o]||Array.isArray(e[o]))t[o]=e[o];else{if(Array.isArray(t[o]))t[o]=t[o].slice();else{for(var i=t[o],a={},s=Object.keys(i),l=0;l<s.length;l+=1){var u=s[l];a[u]=i[u]}t[o]=a}bt(t[o],e[o])}else t[o]=e[o]}},St=function(t){return"string"===t||t===String?"string":"number"===t||t===Number?"number":"boolean"===t||t===Boolean?"boolean":"object"===t||t===Object?"object":"array"===t||t===Array?"array":"function"===t||t===Function?"function":"any"===t||null==t?"any":"invalid"},Ct=function(t,e,n){var r=n.type,o=n.default,i=n.optionalTypes;if(i)for(var a=0;a<i.length;a+=1)if(wt(i[a],t))return t;return"string"===r?null==t?(oe('property "'.concat(e,'" received type-incompatible value: expected <String> but get null value. Used default value instead.')),void 0===o?"":o()):("object"==typeof t&&oe('property "'.concat(e,'" received type-incompatible value: expected <String> but got object-typed value. Force converted.')),String(t)):"number"===r?isFinite(t)?Number(t):(oe('property "'.concat(e,"number"==typeof t?'" received type-incompatible value: expected <Number> but got NaN or Infinity. Used default value instead.':'" received type-incompatible value: expected <Number> but got non-number value. Used default value instead.')),void 0===o?0:o()):"boolean"===r?!!t:"array"===r?Array.isArray(t)?t:(oe('property "'.concat(e,'" received type-incompatible value: expected <Array> but got non-array value. Used default value instead.')),void 0===o?[]:o()):"object"===r?"object"==typeof t?t:(oe('property "'.concat(e,'" received type-incompatible value: expected <Object> but got non-object value. Used default value instead.')),void 0===o?null:o()):"function"===r?"function"==typeof t?t:(oe('property "'.concat(e,'" received type-incompatible value: expected <Function> but got non-function value. Used default value instead.')),void 0===o?function(){}:o()):void 0===t?void 0===o?null:o():t},wt=function(t,e){if("string"===t){if("string"!=typeof e)return!1}else if("number"===t){if(!Number.isFinite(e))return!1}else if("boolean"===t){if("boolean"!=typeof e)return!1}else if("object"===t){if("object"!=typeof e||Array.isArray(e))return!1}else if("array"===t){if("object"!=typeof e||!Array.isArray(e))return!1}else if("function"===t){if("function"!=typeof e)return!1}else if(void 0===e)return!1;return!0},Nt=function(t,e,n,r){var o,i=function(t){return"function"==typeof t?t:(void 0!==t&&oe('the "'.concat(n,'" relation listener is not a function (when preparing behavior "').concat(e,'").')),null)};if("parent"===r.type)o=4;else if("child"===r.type)o=5;else if("parent-common-node"===r.type)o=2;else if("child-common-node"===r.type)o=3;else if("ancestor"===r.type)o=0;else{if("descendant"!==r.type){var a=r.type;return oe('the "'.concat(n,'" relation has an invalid relation type "').concat(a,'" (when preparing behavior "').concat(e,'").')),null}o=1}var s=null;if(r.target instanceof gt)s=r.target.behavior;else if(r.target instanceof Ot||r.target instanceof ct)s=r.target;else{var l=String(r.target||n),u=t.getComponentByUrlWithoutDefault(l,e);if(u)s=u.behavior;else{var c=t.getGlobalUsingComponent(l);"object"==typeof c&&null!==c&&(s=c.behavior)}}return s?{target:s,type:o,linked:i(r.linked),linkChanged:i(r.linkChanged),unlinked:i(r.unlinked),linkFailed:i(r.linkFailed)}:(oe('the target of relation "'.concat(n,'" is not a valid behavior or component (when preparing behavior "').concat(e,'").')),null)},Et=function(){function t(t,e){this._$behaviors=[],this._$traitBehaviors=[],this._$staticData=void 0,this._$data=[],this._$methods=[],this._$lifetimes=[],this._$pageLifetimes=[],this._$init=[],this._$is=t,this._$ownerSpace=e}return t.prototype.methodCallerInit=function(t){return this._$methodCallerInit=t,this},t.prototype.behavior=function(t){return this._$behaviors.push(t),t._$chainingFilter?t._$chainingFilter(this):this},t.prototype.chainingFilter=function(t){return this._$chainingFilter=t,this},t.prototype.options=function(t){var e=this._$options;return this._$options=e?mt(mt({},e),t):t,this},t.prototype.implement=function(t,e){return this._$traitBehaviors.push({traitBehavior:t,impl:e}),this},t.prototype.template=function(t){return this._$template=t,this},t.prototype.usingComponents=function(t){return this._$using?this._$using=mt(mt({},this._$using),t):this._$using=t,this},t.prototype.placeholders=function(t){return this._$placeholders?this._$placeholders=mt(mt({},this._$placeholders),t):this._$placeholders=t,this},t.prototype.generics=function(t){return this._$generics?this._$generics=mt(mt({},this._$generics),t):this._$generics=t,this},t.prototype.externalClasses=function(t){return this._$externalClasses?this._$externalClasses=this._$externalClasses.concat(t):this._$externalClasses=t,this},t.prototype.data=function(t){return this._$data.push(t),this},t.prototype.staticData=function(t){return this._$staticData=t,this},t.prototype.property=function(t,e){return this._$properties||(this._$properties=[]),this._$properties.push({name:t,def:e}),this},t.prototype.methods=function(t){for(var e=Object.keys(t),n=0;n<e.length;n+=1){var r=e[n],o=t[r];this._$methods.push({name:r,func:o})}return this},t.prototype.observer=function(t,e,n){return void 0===n&&(n=!1),this._$observers||(this._$observers=[]),this._$observers.push({dataPaths:D(t),func:e,once:n}),this},t.prototype.lifetime=function(t,e,n){return void 0===n&&(n=!1),this._$lifetimes.push({name:t,func:e,once:n}),this},t.prototype.pageLifetime=function(t,e,n){return void 0===n&&(n=!1),this._$pageLifetimes||(this._$pageLifetimes=[]),this._$pageLifetimes.push({name:t,func:e,once:n}),this},t.prototype.relation=function(t,e){return this._$relations||(this._$relations=[]),this._$relations.push({name:t,rel:e}),this},t.prototype.init=function(t){return this._$init.push(t),this},t.prototype.definition=function(t){var e;t.behaviors&&(e=this._$behaviors).push.apply(e,t.behaviors),t.options&&this.options(t.options),t.template&&this.template(t.template),t.using&&this.usingComponents(t.using),t.placeholders&&this.placeholders(t.placeholders),t.generics&&this.generics(t.generics),t.externalClasses&&this.externalClasses(t.externalClasses);var n=t.data;void 0!==n&&("function"==typeof n?this._$data.push(n):this._$staticData=n);var r=t.properties;if(void 0!==r){this._$properties||(this._$properties=[]);for(var o=Object.keys(r),i=0;i<o.length;i+=1){var a=o[i],s=r[a];this._$properties.push({name:a,def:s})}}var l=t.methods;if(void 0!==l)for(o=Object.keys(l),i=0;i<o.length;i+=1){var u=o[i],c=l[u];this._$methods.push({name:u,func:c})}var d=t.observers;if(void 0!==d)if(this._$observers||(this._$observers=[]),Array.isArray(d))for(i=0;i<d.length;i+=1){var p=d[i],h=p.fields,f=p.observer;this._$observers.push({dataPaths:D(null!=h?h:"**"),func:f,once:!1})}else for(o=Object.keys(d),i=0;i<o.length;i+=1)f=d[h=o[i]],this._$observers.push({dataPaths:D(h),func:f,once:!1});var v=t.lifetimes;if(void 0===(null==v?void 0:v.created)&&"function"==typeof t.created&&this._$lifetimes.push({name:"created",func:t.created,once:!0}),void 0===(null==v?void 0:v.attached)&&"function"==typeof t.attached&&this._$lifetimes.push({name:"attached",func:t.attached,once:!0}),void 0===(null==v?void 0:v.moved)&&"function"==typeof t.moved&&this._$lifetimes.push({name:"moved",func:t.moved,once:!0}),void 0===(null==v?void 0:v.detached)&&"function"==typeof t.detached&&this._$lifetimes.push({name:"detached",func:t.detached,once:!0}),void 0===(null==v?void 0:v.ready)&&"function"==typeof t.ready&&this._$lifetimes.push({name:"ready",func:t.ready,once:!0}),v)for(o=Object.keys(v),i=0;i<o.length;i+=1){var g=o[i];c=v[g],this._$lifetimes.push({name:g,func:c,once:!0})}var _=t.pageLifetimes;if(_)for(this._$pageLifetimes||(this._$pageLifetimes=[]),o=Object.keys(_),i=0;i<o.length;i+=1){var $=o[i];c=_[$],this._$pageLifetimes.push({name:$,func:c,once:!0})}this._$listeners=t.listeners;var m=t.relations;if(m)for(this._$relations||(this._$relations=[]),o=Object.keys(m),i=0;i<o.length;i+=1){var y=o[i],b=m[y];this._$relations.push({name:y,rel:b})}return this},t.prototype.registerBehavior=function(){var t=this._$is,e=new Ot(this);return void 0!==t&&this._$ownerSpace._$registerBehavior(t,e),e},t.prototype.registerComponent=function(){var t=this._$is,e=new Ot(this),n=new gt(e);return void 0!==t&&this._$ownerSpace._$registerComponent(t,n),n},t}(),Ot=function(){function t(t){this._$unprepared=!0,this.is=t._$is||"",this.ownerSpace=t._$ownerSpace,this._$builder=t,this._$flatAncestors=new Set,this._$chainingFilter=t._$chainingFilter,this._$options=t._$options,this._$traitBehaviors=void 0,this._$template=t._$template,this._$using=Object.create(null),this._$generics=void 0,this._$genericDefaults=void 0,this._$externalClasses=t._$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=t._$methodCallerInit}return t.create=function(t,e){return new Et(t.is,e||Qt()).definition(t).registerBehavior()},t.prototype.general=function(){return this},t.prototype.getComponentDependencies=function(t){var e=new Set,n=function(t){t._$unprepared&&t.prepare();for(var r=Object.keys(t._$using),o=0;o<r.length;o+=1){var i=r[o],a=t._$using[i];if("string"!=typeof a){var s=a.final;s&&!e.has(s)&&(e.add(s),n(s.behavior))}}};if(n(this.general()),t)for(var r=Object.values(t),o=0;o<r.length;o+=1){var i=r[o];"string"!=typeof i&&(e.has(i)||(e.add(i),n(i.behavior)))}return e},t.prepare=function(t){t.prepare()},t.prototype.prepare=function(){var e,n,r,o,i,a,s,l,u,c;if(this._$unprepared){this._$unprepared=!1;var d=this.is,p=this.ownerSpace,h=this._$builder,f=this._$flatAncestors;if(Array.isArray(h._$behaviors))for(var v=0;v<h._$behaviors.length;v+=1){var g=h._$behaviors[v],_=null;if(g instanceof t)_=g;else{var $=String(g);p&&(_=p.getBehaviorByUrl($,d)),_||oe('behavior "'.concat($,'" is not found (when preparing behavior "').concat(d,'").'))}if(_){_._$unprepared&&t.prepare(_);var m=_._$traitBehaviors;void 0!==m&&(this._$traitBehaviors||(this._$traitBehaviors=[]),(e=this._$traitBehaviors).push.apply(e,m));var y=_._$staticData;y&&(this._$staticData||(this._$staticData={}),bt(this._$staticData,y)),Object.assign(this._$methodMap,_._$methodMap),Object.assign(this._$propertyMap,_._$propertyMap),(n=this._$data).push.apply(n,_._$data);for(var b=_._$observers,S=0;S<b.length;S+=1)(O=b[S]).once&&this._$observers.indexOf(O)>=0||this._$observers.push(O);for(var C=_._$lifetimes,w=0;w<C.length;w+=1)(O=C[w]).once&&this._$lifetimes.indexOf(O)>=0||this._$lifetimes.push(O);var N=_._$pageLifetimes;if(void 0!==N)if(this._$pageLifetimes)for(var E=0;E<N.length;E+=1){var O;(O=N[E]).once&&this._$pageLifetimes.indexOf(O)>=0||this._$pageLifetimes.push(O)}else this._$pageLifetimes=N.slice();var x=_._$listeners;void 0!==x&&(this._$listeners||(this._$listeners=[]),(r=this._$listeners).push.apply(r,x));var k=_._$relationMap;void 0!==k&&(this._$relationMap||(this._$relationMap=Object.create(null)),Object.assign(this._$relationMap,k)),(o=this._$init).push.apply(o,_._$init),_._$flatAncestors.forEach((function(t){f.add(t)}))}}var A=h._$traitBehaviors;if(void 0!==A&&(this._$traitBehaviors||(this._$traitBehaviors=[]),(i=this._$traitBehaviors).push.apply(i,A)),"object"==typeof h._$using&&null!==h._$using){var L="object"==typeof h._$placeholders&&null!==h._$placeholders,D=Object.keys(h._$using),T=function(t){var e=D[t],n=h._$using[e],r=null;if(L&&(r=null!==(c=h._$placeholders[e])&&void 0!==c?c:null),n instanceof gt)I._$using[e]={final:n,source:I,placeholder:r,waiting:null};else if(p){var o=String(n),i=p.getComponentByUrlWithoutDefault(o,d);if(i)I._$using[e]={final:i,source:I,placeholder:null,waiting:null};else if(null!==r){var a={final:null,source:I,placeholder:r,waiting:null},s=p._$componentWaitingList(o,d);s&&(s.add((function(t){a.final=t,a.placeholder=null,a.waiting=null})),a.waiting=s),I._$using[e]=a}else{var l=p.getGlobalUsingComponent(o);I._$using[e]="string"==typeof l?l:{final:l,source:I,placeholder:null,waiting:null}}}else oe('cannot find component "'.concat(String(n),'" (when preparing behavior "').concat(d,'").'))},I=this;for(v=0;v<D.length;v+=1)T(v)}if("object"==typeof h._$generics&&null!==h._$generics){var R=this._$generics=[],P=Object.create(null);this._$genericDefaults=P;var j=Object.keys(h._$generics);for(v=0;v<j.length;v+=1){var B=j[v],U=h._$generics[B],F=null,G=!0===U||null==U?void 0:U.default;if(void 0!==G)if(G instanceof gt)F=G;else if(p){var W=String(G);F=p.getComponentByUrlWithoutDefault(W,d)||p.getGlobalUsingComponent(W)}else oe('cannot define generic "'.concat(B,'" without a default implementor (when preparing behavior "').concat(d,'").'));R.push(B),P[B]=F}}var V=h._$staticData;V&&(this._$staticData?bt(this._$staticData,V):this._$staticData=V);var H=h._$methods;for(v=0;v<H.length;v+=1){var z=H[v],q=z.name,X=z.func;this._$methodMap[q]=X}var K=h._$properties;if(void 0!==K){var Y=[],Z=function(t){var e,n=K[t],r=n.name,o=n.def,i=function(t){return"string"===t||t===String?{type:"string",optionalTypes:null,value:"",default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"number"===t||t===Number?{type:"number",optionalTypes:null,value:0,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"boolean"===t||t===Boolean?{type:"boolean",optionalTypes:null,value:!1,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"object"===t||t===Object?{type:"object",optionalTypes:null,value:null,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"array"===t||t===Array?{type:"array",optionalTypes:null,value:[],default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"function"===t||t===Function?{type:"function",optionalTypes:null,value:function(){},default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"any"===t||null==t?{type:"any",optionalTypes:null,value:null,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:null}(o);if(null!==i)e=i;else{var a=o,s=St(a.type),l=null;Array.isArray(a.optionalTypes)&&(l=a.optionalTypes.map(St)).length>0&&("invalid"!==s&&"any"!==s||(s=l[0])),"invalid"===s&&oe('the type of property "'.concat(r,'" is illegal (when preparing behavior "').concat(d,'").'));var u=a.value;void 0===a.value?u="string"===s?"":"number"===s?0:"boolean"!==s&&("array"===s?[]:null):void 0!==a.default&&oe('the initial value of property "'.concat(r,'" is not used when its default is provided (when preparing behavior "').concat(d,'").'));var c=void 0;"function"==typeof a.observer?c=a.observer:a.observer?c=Q._$methodMap[a.observer]||null:(c=null,void 0!==a.observer&&oe('the observer of property "'.concat(r,'" is not a function (when preparing behavior "').concat(d,'").')));var p=void 0;"function"==typeof a.comparer?p=a.comparer:(p=null,void 0!==a.comparer&&oe('the comparer of property "'.concat(r,'" is not a function (when preparing behavior "').concat(d,'").')));var h=!!a.reflectIdPrefix;e={type:s,optionalTypes:l,value:u,default:a.default,observer:c,comparer:p,reflectIdPrefix:h}}Q._$propertyMap[r]=e,Y.push({name:r,func:void 0===e.default?function(){return M(e.value)}:e.default})},Q=this;for(v=0;v<K.length;v+=1)Z(v);this._$data.push((function(){for(var t={},e=0;e<Y.length;e+=1){var n=Y[e],r=n.name,o=n.func;t[r]=o()}return t}))}(a=this._$data).push.apply(a,h._$data);var J=h._$observers;if(void 0!==J)for(v=0;v<J.length;v+=1){var tt=J[v],et=tt.dataPaths,nt=(X=tt.func,tt.once),rt="function"==typeof X?X:this._$methodMap[X];"function"==typeof rt?this._$observers.push({dataPaths:et,observer:rt,once:nt}):oe('the "'.concat(String(rt),'" observer is not a function (when preparing behavior "').concat(d,'").'))}var ot=h._$lifetimes;(s=this._$lifetimes).push.apply(s,ot);var it=h._$pageLifetimes;it&&(this._$pageLifetimes||(this._$pageLifetimes=[]),(l=this._$pageLifetimes).push.apply(l,it));var at=h._$listeners;if(void 0!==at&&(D=Object.keys(at)).length>0)for(this._$listeners=[],v=0;v<D.length;v+=1){var st=at[B=D[v]],lt="function"==typeof st?st:this._$methodMap[st];if(lt){var ut=B.indexOf("."),ct=void 0,dt=void 0;ut>=0?(ct=B.slice(0,ut),dt=B.slice(ut+1)):(ct="",dt=B),this._$listeners.push({id:ct,ev:dt,listener:lt})}else oe('the "'.concat(B,'" listener is not a function or a method name (when preparing behavior "').concat(d,'").'))}var pt=h._$relations;if(void 0!==pt)for(this._$relationMap||(this._$relationMap=Object.create(null)),v=0;v<pt.length;v+=1){var ht=pt[v],ft=ht.name,vt=ht.rel;if(null!=vt){var _t=Nt(p,d,ft,vt);_t&&(this._$relationMap[ft]=_t)}}(u=this._$init).push.apply(u,h._$init),f.add(this)}},t.prototype.getTemplate=function(){return this._$template},t.prototype._$updateTemplate=function(t){this._$template=t},t.prototype.hasBehavior=function(e){if(this._$unprepared&&this.prepare(),e instanceof t)return this._$flatAncestors.has(e);if(this.ownerSpace){var n=this.ownerSpace.getBehaviorByUrl(e,this.is);return!!n&&this._$flatAncestors.has(n)}return!1},t.prototype.getMethods=function(){return this._$methodMap},t.prototype._$generateObserverTree=function(){for(var t=new B(this._$propertyMap),e=this._$observers,n=0;n<e.length;n+=1){var r=e[n],o=r.dataPaths,i=r.observer;t.addObserver(i,o)}return t},t.prototype._$getAllLifetimeFuncs=function(){for(var t=Object.create(null),e=this._$lifetimes,n=0;n<e.length;n+=1){var r=e[n],o=r.name,i=r.func;t[o]?t[o].add(i):(t[o]=new re).add(i)}return t},t.prototype._$getAllPageLifetimeFuncs=function(){var t=Object.create(null),e=this._$pageLifetimes;if(!e)return t;for(var n=0;n<e.length;n+=1){var r=e[n],o=r.name,i=r.func;t[o]?t[o].add(i):(t[o]=new re).add(i)}return t},t}(),xt=function(t,e){var n;n="/"!==t[0]?e.split("/").slice(0,-1).concat(t.split("/")):t.split("/");for(var r=[],o=0;o<n.length;o+=1){var i=n[o];""!==i&&"."!==i&&(".."!==i?r.push(i):r.pop())}return r.join("/")},kt=function(t,e){var n=t.indexOf("://");if(n>0){var r=t.indexOf("/",n+3);return r>0?{domain:t.slice(0,r),absPath:xt(t.slice(r+1),"")}:{domain:t.slice(0,n+3),absPath:xt(t.slice(n+3),"")}}return{domain:null,absPath:xt(t,e)}},At=function(){function t(t,e,n){this._$callbacks=[],this._$ownerSpace=t,this._$isPub=e,this._$alias=n}return t.prototype.add=function(t){this._$callbacks.push(t)},t.prototype.hintUsed=function(t){var e,n;null===(n=(e=this._$ownerSpace)._$componentWaitingListener)||void 0===n||n.call(e,this._$isPub,this._$alias,t)},t.prototype.remove=function(t){var e=this._$callbacks.indexOf(t);this._$callbacks.splice(e,1)},t.prototype.call=function(t){var e=this._$callbacks;this._$callbacks=[];for(var n=0;n<e.length;n+=1)(0,e[n])(t)},t}(),Lt=function(){function t(t,e,n){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,e&&(Object.assign(this._$list,e._$pubList),Object.assign(this._$behaviorList,e._$pubBehaviorList)),this._$defaultComponent=null!=t?t:"",this._$componentOptions=ne({},null==e?void 0:e._$componentOptions),this.styleScopeManager=n||new w}return t.prototype.updateComponentOptions=function(t){this._$componentOptions=ne(t,this._$componentOptions)},t.prototype.getComponentOptions=function(){return this._$componentOptions},t.prototype.setGlobalUsingComponent=function(t,e){this._$using[t]=e},t.prototype.importSpace=function(t,e,n){this._$importedSpaces[t]={space:e,privateUse:n}},t.prototype.getComponentByUrl=function(t,e){var n=kt(t,e),r=n.domain,o=n.absPath,i=this.getComponent(o,!0,r);if(!i)throw new Error('There is no component "'.concat(o,'" in the space and no default component can be used'));return i},t.prototype.getComponentByUrlWithoutDefault=function(t,e){var n=kt(t,e),r=n.domain,o=n.absPath;return this.getComponent(o,!1,r)||null},t.prototype.getComponent=function(t,e,n){var r;if(void 0===e&&(e=!0),void 0===n&&(n=null),n){var o=this._$importedSpaces[n];if(o){var i=o.space;r=o.privateUse?i._$list:i._$pubList}}else r=this._$list;if(r){var a=r[t];if(a)return a}if(e)return this._$list[this._$defaultComponent]},t.prototype.getDefaultComponent=function(){return this._$list[this._$defaultComponent]||null},t.prototype.isDefaultComponent=function(t){return this._$list[this._$defaultComponent]===t},t.prototype.getGlobalUsingComponent=function(t){return this._$using[t]||null},t.prototype.getBehaviorByUrl=function(t,e){var n=kt(t,e),r=n.domain,o=n.absPath;return this._$getBehavior(o,r)||null},t.prototype._$getBehavior=function(t,e){var n;if(void 0===e&&(e=null),e){var r=this._$importedSpaces[e];if(r){var o=r.space;n=r.privateUse?o._$behaviorList:o._$pubBehaviorList}}else n=this._$behaviorList;if(n){var i=n[t];if(i)return i}},t.prototype.defineComponent=function(t){var e=t.is;return new Et(e,this).definition(t).registerComponent()},t.prototype.defineBehavior=function(t){var e=t.is;return new Et(e,this).definition(t).registerBehavior()},t.prototype.define=function(t){return new Et(t,this)},t.prototype.defineWithMethodCaller=function(t){return new Et(t,this)},t.prototype._$registerComponent=function(t,e){this._$list[t]=e,this._$behaviorList[t]=e.behavior;var n=this._$listWaiting[t];n&&(delete this._$listWaiting[t],this._$groupingListWaiting?this._$groupingListWaiting.push({waiting:n,comp:e}):n.call(e))},t.prototype._$registerBehavior=function(t,e){this._$behaviorList[t]=e},t.prototype.startGroupRegister=function(){this._$groupingListWaiting=[]},t.prototype.endGroupRegister=function(){var t=this._$groupingListWaiting;if(t){this._$groupingListWaiting=null;for(var e=0;e<t.length;e+=1){var n=t[e],r=n.waiting,o=n.comp;r.call(o)}}},t.prototype.groupRegister=function(t){this.startGroupRegister();var e=ue("group register",t,this,[]);return this.endGroupRegister(),e},t.prototype.exportComponent=function(t,e){var n=this._$list[e];if(!n)throw new Error('There is no component "'.concat(e,'" for aliasing'));this._$pubList[t]=n;var r=this._$pubListWaiting[t];r&&(delete this._$pubListWaiting[t],r.call(n))},t.prototype.getExportedComponent=function(t){return this._$pubList[t]},t.prototype.getExportedBehavior=function(t){return this._$pubBehaviorList[t]},t.prototype.exportBehavior=function(t,e){var n=this._$behaviorList[e];if(!n)throw new Error('There is no behavior "'.concat(e,'" for aliasing'));this._$pubBehaviorList[t]=n},t.prototype._$componentWaitingList=function(t,e){var n,r,o,i=kt(t,e),a=i.domain,s=i.absPath;if(a){var l=this._$importedSpaces[a];if(!l)return null;if(r=l.space,o=!l.privateUse){if(r._$pubList[s])return null;n=r._$pubListWaiting}else{if(r._$list[s])return null;n=r._$listWaiting}}else{if(r=this,o=!1,this._$list[s])return null;n=this._$listWaiting}var u=n[s];return u||(n[s]=new At(r,o,s))},t.prototype.setComponentWaitingListener=function(t){this._$componentWaitingListener=t},t.prototype.createComponentByUrl=function(t,e,n,r){var o=this,i=e,a=null,s=i.indexOf("#");s>=0&&(i=i.slice(0,s));var l=i.indexOf("?");l>=0&&(a=i.slice(l+1),i=i.slice(0,l));var u=this.getComponentByUrl(i,""),c=null;return n&&(c=Object.create(null),Object.keys(n).forEach((function(t){var e=n[t],r=o.getComponentByUrl(e,"");c[t]=r}))),$t.createWithGenericsAndContext(t,u,c,r,(function(t){if(a){var e=!1;a.split("&").forEach((function(n){var r=n.indexOf("=");if(r>=0){var o=decodeURIComponent(n.slice(0,r)),i=decodeURIComponent(n.slice(r+1));t._$dataGroup.replaceProperty(o,i)&&(e=!0)}})),e&&t.applyDataUpdates()}}))},t.prototype.defineTraitBehavior=function(t){return new ct(this,t)},t}(),Dt=function(){function t(t,e,n,r){this.keyName=t,this.updateKeys(e);for(var o=this.items,i=this.indexes,a=[],s=0;s<o.length;s+=1){var l=o[s],u=null===i?s:i[s];a.push(r(l,u))}n.insertChildren(a,-1)}return t.prototype.updateKeys=function(t){var e,n;if(Array.isArray(t))e=t,n=null;else if("object"==typeof t&&null!==t){var r=Object.keys(t);e=new Array(r.length),n=new Array(r.length);for(var o=0;o<r.length;o+=1){var i=t[h=r[o]];e[o]=i,n[o]=h}}else if("string"==typeof t)for(oe("Use string as for-list is generally for testing. Each character is treated as an item."),e=new Array(t.length),n=null,o=0;o<t.length;o+=1)e[o]=t[o];else if("number"==typeof t)for(oe("Use number as for-list is generally for testing. The number is used as the repeated times of the item."),e=new Array(t),n=null,o=0;o<t;o+=1)e[o]=o;else oe("The for-list data is invalid. Use empty array instead."),e=[],n=null;this.items=e,this.indexes=n;var a,s=this.keyName,l=new Array(e.length),u=Object.create(null);if(null!==s){for(o=0;o<e.length;o+=1){i=e[o];var c="*this"===s?i:null==i?void 0:i[s],d=null!=c?String(c):"";l[o]=d,void 0!==u[d]?(a||(a=Object.create(null)),a[d]=[u[d],o],delete u[d]):(null==a?void 0:a[d])?a[d].push(o):u[d]=o}if(a){var p=Object.keys(a);for(oe('Some keys are not unique while list updates: "'.concat(p.join('", "'),'".')),o=0;o<p.length;o+=1)for(var h,f=a[h=p[o]],v=0,g=0;g<f.length;g+=1){for(var _=f[g];void 0!==u["".concat(h,"--").concat(v)];)v+=1;u[r="".concat(h,"--").concat(v)]=_,l[_]=r}}}this.rawKeys=l,this.keyMap=u,this.sharedKeyMap=a},t.prototype.diff=function(t,e,n,r,o){var i=this.rawKeys,a=this.keyMap,s=this.sharedKeyMap,l=this.indexes;this.updateKeys(t);var u,c,d=this.rawKeys,p=this.sharedKeyMap,h=this.items,f=this.indexes,v=this.keyName;if(!0===e)c=!0,u=null===v;else if(void 0===e)c=e,u=!0;else if(null===v)c=!0,u=!0;else{var g=!1;if(Array.isArray(e))g=!0;else for(var _=Object.keys(e),$=0;$<_.length;$+=1)if(!0===(m=e[y=_[$]])||("*this"===v?m:null==m?void 0:m[v])){g=!0;break}if(g){for(c=new Array(d.length),$=0;$<d.length;$+=1){var m,y=d[$];void 0!==(null==s?void 0:s[y])||void 0!==(null==p?void 0:p[y])?c[$]=!0:void 0===(m=e[$])||(!0===m||("*this"===v?m:null==m?void 0:m[v])?c[$]=!0:c[$]=m)}u=!1}else c=e,u=!1}if(u){var b;for(b=!!Array.isArray(e)||e,$=0;$<i.length&&$<d.length;){var S=h[$],C=null===f?$:f[$],w=null===l?$:l[$];o(S,C,!0===b||void 0===b?b:b[$],C!==w,n.childNodes[$]),$+=1}if($<i.length)n.removeChildren($,i.length-$);else if($<d.length){for(var N=[];$<d.length;$+=1)S=h[$],C=null===f?$:f[$],N.push(r(S,C));n.insertChildren(N,-1)}}else{var E=[],O=[],x=new Array(d.length),k=new Array(d.length),A=-1,L=-1;for($=0;$<d.length;$+=1){var D=d[$];if(i[A+1]!==D)if(void 0!==(w=a[D])){for(var T=0,M=E.length;T<M;){var I=Math.floor((T+M)/2);w<E[I]?M=I:T=I+1}E[M]=w,O[M]=$,x[$]=M>0?O[M-1]:-1,k[$]=w,A=w,L=M}else k[$]=-1;else A+=1,E[L+=1]=A,O[L]=$,x[$]=L>0?O[L-1]:-1,k[$]=A}var R=O.length;if(R!==d.length||R!==i.length){for(var P=R>0?O[R-1]:-1,j=R;-1!==P;)E[j-=1]=P,P=x[P];var B,U=E;!function(t){t[t.Stable=0]="Stable",t[t.ForwardMove=1]="ForwardMove",t[t.BackwardMove=2]="BackwardMove"}(B||(B={}));var F=new Array(i.length),G=new Array(d.length),W=U[j];for($=0;$<k.length;$+=1){var V=k[$];$!==U[j]?-1!==V?(F[V]=V>W?2:1,G[$]=n.childNodes[V]):(S=h[$],C=null===f?$:f[$],G[$]=r(S,C)):(W=V,j+=1,F[V]=0)}var H=0,z=0,q=0;j=0;do{for(var X=j<U.length?U[j]:G.length,K=j<U.length?k[X]:F.length;z<K;)if(void 0===F[z]){var Y=z;z+=1;for(var Z=1;z<K&&void 0===F[z];)z+=1,Z+=1;n.removeChildren(Y+H,Z),H-=Z}else 2===F[z]&&(H-=1),z+=1;for(;q<X;){var Q=G[q];if(-1===(V=k[q])){for(Y=q,q+=1,Z=1;q<X&&-1===k[q];)q+=1,Z+=1;n.insertChildren(G.slice(Y,Y+Z),K+H),H+=Z}else n.insertChildAt(Q,K+H),S=h[q],C=null===f?q:f[q],w=null===l?V:l[V],o(S,C,!0===c||void 0===c?c:c[q],C!==w,Q),2===F[V]&&(H+=1),q+=1}j<U.length&&(S=h[X],C=null===f?X:f[X],w=null===l?K:l[K],o(S,C,!0===c||void 0===c?c:c[X],C!==w,n.childNodes[K+H])),z=K+1,q=X+1,j+=1}while(j<=U.length)}else for($=0;$<i.length&&$<d.length;){S=h[$],C=null===f?$:f[$],w=null===l?$:l[$];o(S,C,!0===c||void 0===c?c:c[$],C!==w,n.childNodes[$]),$+=1}}},t}(),Tt=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},Mt=function(t){return t},It=function(t){var e=t;return e._$wxTmplArgs=e._$wxTmplArgs||{}},Rt=function(t){return null==t?"":String(t)},Pt=function(){function t(t,e,n,r){this.bindingMapDisabled=!1,this.eventObjectFilter=Mt,this.changePropFilter=Mt,this.eventListenerFilter=Mt,this.shadowRoot=t,this.procGen=e,this.disallowNativeNode=n,r&&(this.eventObjectFilter=r)}return t.prototype.create=function(t){var e=this.shadowRoot,n=(0,this.procGen)(this,!0,t,void 0);return this.handleChildrenCreationAndInsert(n.C,e,void 0,void 0),n.B},t.prototype.update=function(t,e){var n=this.shadowRoot,r=(0,this.procGen)(this,!1,t,e);this.handleChildrenUpdate(r.C,n,void 0,void 0)},t.prototype.bindingMapUpdate=function(t,e,n){if(this.bindingMapDisabled)return!1;var r=n[t];if(!r)return!1;for(var o=null,i=0;i<r.length;i+=1)(0,r[i])(e,(function(t){null!==o&&t!==o&&o instanceof $t&&o.hasPendingChanges()&&$t.getDataProxy(o).applyDataUpdates(!0),o=t}),(function(t,e){t.textContent=e}));var a=o;return null!==a&&a instanceof $t&&a.hasPendingChanges()&&$t.getDataProxy(a).applyDataUpdates(!0),!0},t.prototype.handleChildrenCreation=function(t,e,n){var r=this,o=[];return t(!0,(function(t,i){if(e&&""!==n){var a=r.createDynamicPlaceholder(e);o.push(a)}else{var s=r.shadowRoot.createTextNode(t);s.destroyBackendElementOnDetach(),e&&ot.setSlotElement(s,e),i&&i(s),o.push(s)}}),(function(t,i,a,s,l,u){if(e&&n!==(l||"")){var c=r.createDynamicPlaceholder(e);o.push(c)}else{var d=r.createCommonElement(t,i,a,s,u);e?(ot.setSlotElement(d,e),It(d).dynamicSlotNameMatched=!0):void 0!==l&&(d.slot=l),o.push(d)}}),(function(t,i){var a=r.shadowRoot.createVirtualNode("wx:if");a.destroyBackendElementOnDetach(),ot.setInheritSlots(a),e&&ot.setSlotElement(a,e),It(a).key=t,r.handleChildrenCreationAndInsert(i,a,e,n),o.push(a)}),(function(t,i,a,s,l){var u=r.shadowRoot,c=u.createVirtualNode("wx:for");c.destroyBackendElementOnDetach(),ot.setInheritSlots(c),e&&ot.setSlotElement(c,e),It(c).keyList=new Dt(i,t,c,(function(t,o){var i=u.createVirtualNode("wx:for-item");return i.destroyBackendElementOnDetach(),ot.setInheritSlots(i),e&&ot.setSlotElement(c,e),r.handleChildrenCreationAndInsert((function(e,n,r,i,a,u,c){l(!0,t,o,void 0,void 0,s?Tt(Tt([],s,!0),[o],!1):null,n,r,i,a,u,c)}),i,e,n),i})),o.push(c)}),(function(t,n){var i=r.shadowRoot.createVirtualNode("slot");i.destroyBackendElementOnDetach(),ot.setSlotName(i,Rt(t)),e&&ot.setSlotElement(i,e),n&&n(i),o.push(i)}),(function(t,i){if(void 0!==i)if(e)if(n===i)(a=r.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),ot.setSlotElement(a,e),It(a).dynamicSlotNameMatched=!0,r.handleChildrenCreationAndInsert(t,a,void 0,void 0),o.push(a);else{var a=r.createDynamicPlaceholder(e);o.push(a)}else(a=r.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),a.slot=i,r.handleChildrenCreationAndInsert(t,a,void 0,void 0),o.push(a);else(a=r.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),ot.setInheritSlots(a),e&&ot.setSlotElement(a,e),r.handleChildrenCreationAndInsert(t,a,e,n),o.push(a)}),void 0,void 0),o},t.prototype.handleChildrenCreationAndInsert=function(t,e,n,r){var o=this.handleChildrenCreation(t,n,r);o.length&&e.insertChildren(o,-1)},t.prototype.handleChildrenUpdate=function(t,e,n,r){var o=this,i=0,a=n?n.slotNodes.filter((function(t){return t.parentNode===e})):e.childNodes;t(!1,(function(t){var e=a[i];i+=1,(!n||It(e).dynamicSlotNameMatched)&&void 0!==t&&(e.textContent=t)}),(function(t,s,l,u,c,d){var p=a[i];if(i+=1,n){var h=It(p);if(r!==(c||""))return void(h.dynamicSlotNameMatched&&(f=o.createDynamicPlaceholder(n),e.replaceChild(f,p)));if(!h.dynamicSlotNameMatched){var f=o.createCommonElement(t,s,l,u,d);return ot.setSlotElement(f,n),It(f).dynamicSlotNameMatched=!0,void e.replaceChild(f,p)}}l(p,!1);var v=!1;if(p instanceof $t){var g=o.dynamicSlotUpdate(p,d,u);g&&(v=!0),p.hasPendingChanges()&&$t.getDataProxy(p).applyDataUpdates(!0),null==g||g.applySlotUpdates()}n||void 0!==c&&(p.slot=c),v||o.handleChildrenUpdate(u,p,void 0,void 0)}),(function(t,s){var l=a[i];if(i+=1,It(l).key===t)o.handleChildrenUpdate(s,l,n,r);else{var u=o.shadowRoot.createVirtualNode("wx:if");u.destroyBackendElementOnDetach(),ot.setInheritSlots(u),n&&ot.setSlotElement(u,n),It(u).key=t,o.handleChildrenCreationAndInsert(s,u,n,r),n?e.replaceChild(u,l):e.replaceChildAt(u,i-1)}}),(function(t,e,s,l,u){var c=a[i];i+=1,It(c).keyList.diff(t,s,c,(function(t,e){var i=o.shadowRoot.createVirtualNode("wx:for-item");return i.destroyBackendElementOnDetach(),ot.setInheritSlots(i),n&&ot.setSlotElement(c,n),o.handleChildrenCreationAndInsert((function(n,r,o,i,a,s,c){u(!0,t,e,void 0,void 0,l?Tt(Tt([],l,!0),[e],!1):null,r,o,i,a,s,c)}),i,n,r),i}),(function(t,e,i,a,s){o.handleChildrenUpdate((function(n,r,o,s,c,d,p){u(!1,t,e,i,!!a||void 0,l?Tt(Tt([],l,!0),[e],!1):null,r,o,s,c,d,p)}),s,n,r)}))}),(function(t,e){var n=a[i];i+=1,void 0!==t&&ot.setSlotName(n,Rt(t)),e&&e(n),o.shadowRoot.applySlotValueUpdates(n)}),(function(t,s){var l=a[i];if(i+=1,void 0!==s)if(n){var u=It(l);if(r===s)u.dynamicSlotNameMatched?o.handleChildrenUpdate(t,l,void 0,void 0):((c=o.shadowRoot.createVirtualNode("virtual")).destroyBackendElementOnDetach(),ot.setSlotElement(c,n),It(c).dynamicSlotNameMatched=!0,o.handleChildrenCreationAndInsert(t,c,void 0,void 0),e.replaceChild(c,l));else if(u.dynamicSlotNameMatched){var c=o.createDynamicPlaceholder(n);e.replaceChild(c,l)}}else l.slot=s,o.handleChildrenUpdate(t,l,void 0,void 0);else o.handleChildrenUpdate(t,l,n,r)}),void 0,void 0)},t.prototype.dynamicSlotUpdate=function(t,e,n){var r=this,o=t.getShadowRoot();return 3===(null==o?void 0:o.getSlotMode())?(o.setDynamicSlotHandler(e||[],(function(e){for(var o=[],i=function(t){var i=e[t],a=i.slot,s=i.name,l=i.slotValues,u=r.handleChildrenCreation((function(t,e,r,o,i,a,s){n(!0,e,r,o,i,a,s,l,void 0)}),a,s);o.push.apply(o,u)},a=0;a<e.length;a+=1)i(a);o.length&&t.insertChildren(o,-1)}),(function(e){if(e.length&&e[0].slotNodes.length){e.sort((function(t,e){return t.slotNodes[0].parentIndex-e.slotNodes[0].parentIndex}));for(var n=-1/0,r=-1/0,o=0;o<e.length;o+=1){var i=e[o].slotNodes,a=i[0].parentIndex;r===a||(n>=0&&t.removeChildren(n,r-n),n=a),r=a+i.length}n>=0&&t.removeChildren(n,r-n)}}),(function(e,o,i){var a=e._$slotName||"";r.handleChildrenUpdate((function(t,e,r,a,s,l,u){n(!1,e,r,a,s,l,u,o,i)}),t,e,a)})),o):null},t.prototype.createDynamicPlaceholder=function(t){var e=this.shadowRoot.createVirtualNode("virtual");return e.destroyBackendElementOnDetach(),ot.setSlotElement(e,t),It(e).dynamicSlotNameMatched=!1,e},t.prototype.createCommonElement=function(t,e,n,r,o){var i,a=this,s=this.shadowRoot.checkComponentPlaceholder(t),l=!1,u=function(t){var e=t instanceof $t?a.dynamicSlotUpdate(t,o,r):null;e&&(l=!0),n(t,!0),t instanceof $t&&(t.hasPendingChanges()&&$t.getDataProxy(t).applyDataUpdates(!0),null==e||e.applySlotUpdates())};if(this.disallowNativeNode||"boolean"==typeof s){var c=void 0;s&&(c=function(){var n,r=a.shadowRoot.createComponent(t,t,e,void 0,u);r.destroyBackendElementOnDetach();var o=r.getShadowRoot(),s=i instanceof $t?i.getShadowRoot():null,l=3===(null==s?void 0:s.getSlotMode());if(3===(null==o?void 0:o.getSlotMode())){if(!l)throw new Error('The "dynamicSlots" option of the component and its placeholder should be the same.');null===(n=i.parentNode)||void 0===n||n.replaceChild(r,i)}else{if(l)throw new Error('The "dynamicSlots" option of the component and its placeholder should be the same.');i.selfReplaceWith(r)}}),(i=this.shadowRoot.createComponent(t,t,e,c,u)).destroyBackendElementOnDetach()}else(i=this.shadowRoot.createComponentOrNativeNode(null!=s?s:t,e,u)).destroyBackendElementOnDetach();return l?this.bindingMapDisabled=!0:this.handleChildrenCreationAndInsert(r,i,void 0,void 0),i},t.prototype.s=function(t,e){t.slot=e},t.prototype.l=function(t,e,n){this.shadowRoot.replaceSlotValue(t,e,n)},t.prototype.i=function(t,e){t.id=e},t.prototype.c=function(t,e){t instanceof $t?(t.hasExternalClass("class")&&t.setExternalClass("class",Rt(e)),t.class=Rt(e)):t.class=Rt(e)},t.prototype.y=function(t,e){t.setNodeStyle(Rt(e),0)},t.prototype.d=function(t,e,n){t.setDataset(e,n)},t.prototype.m=function(t,e,n){t.setMark(e,n)},t.prototype.v=function(t,e,n,r,o,i,a){var s=this,l="function"==typeof n?this.eventListenerFilter(n):Rt(n),u=function(e){var n,r=t.ownerShadowRoot.getHostNode(),o=r.getMethodCaller(),i="function"==typeof l?l:$t.getMethod(r,l);if("function"==typeof i){var a=s.eventObjectFilter(e);n=i.call(o,a)}return n},c={final:r,mutated:o,capture:i};if(a){var d=It(t);d.dynEvListeners||(d.dynEvListeners={});var p=d.dynEvListeners;p[e]&&t.removeListener(e,p[e],c),p[e]=u}l&&t.addListener(e,u,c)},t.prototype.r=function(t,e,n,r){var o;if(t instanceof $t){var i=$t.getDataProxy(t),a=e.replace(/-(.|$)/g,(function(t){return t[1]?t[1].toUpperCase():""}));if(i.replaceProperty(a,n)){r&&i.setModelBindingListener(a,(function(e){var n=t.ownerShadowRoot.getHostNode(),o=$t.getDataProxy(n);o.replaceDataOnPath(r,e),o.applyDataUpdates(!1)}));var s=It(t);if(null===(o=s.changeProp)||void 0===o?void 0:o[e]){var l=s.changeProp[e],u=l.oldValue;if(u!==n){l.oldValue=n;var c=t.ownerShadowRoot.getHostNode();l.listener.call(c.getMethodCaller(),n,u,c,t)}}}else t.hasExternalClass(e)?t.setExternalClass(e,Rt(n)):a.startsWith("bind")?this.v(t,a.slice("bind".length),Rt(n),!1,!1,!1,!0):a.startsWith("captureBind")?this.v(t,a.slice("captureBind".length),Rt(n),!1,!1,!0,!0):a.startsWith("catch")?this.v(t,a.slice("catch".length),Rt(n),!0,!1,!1,!0):a.startsWith("captureCatch")?this.v(t,a.slice("captureCatch".length),Rt(n),!0,!1,!0,!0):a.startsWith("on")&&this.v(t,a.slice("on".length),Rt(n),!1,!1,!1,!0)}else t instanceof $e&&(t.updateAttribute(e,n),r&&t.setModelBindingListener(e,(function(e){var n=t.ownerShadowRoot.getHostNode(),o=$t.getDataProxy(n);o.replaceDataOnPath(r,e),o.applyDataUpdates(!1)})))},t.prototype.wl=function(t,e,n){t instanceof $t&&t.triggerWorkletChangeLifetime(e,n)},t.prototype.p=function(t,e,n){if(t instanceof $t&&$t.hasProperty(t,e)){var r=It(t);r.changeProp||(r.changeProp=Object.create(null)),r.changeProp[e]={listener:this.changePropFilter(n),oldValue:t.data[e]}}},t.prototype.setFnFilter=function(t,e){this.changePropFilter=t,this.eventListenerFilter=e},t}(),jt=function(){},Bt=function(){function t(t,e){this.shadowRoot=t,this.procGen=e}return t.prototype.create=function(t){var e=this.shadowRoot,n=(0,this.procGen)(this,!0,t,void 0);return this.handleChildrenCreation(n.C,e.shadowRootElement),n.B},t.prototype.bindingMapUpdate=function(t,e,n){var r=n[t];if(void 0!==r)for(var o=0;o<r.length;o+=1)(0,r[o])(e,(function(){}),(function(t,e){t.textContent=e}))},t.prototype.handleChildrenCreation=function(t,e){var n=this,r=!0,o=!1,i=function(){r=!1,o=!1;var t=document.createElement("virtual");e.appendChild(t),n.shadowRoot.slot=t};t(!0,(function(t,n){o?i():r=!1;var a=document.createTextNode(t||"");n&&n(a),e.appendChild(a)}),(function(t,a,s,l){o?i():r=!1;var u=document.createElement(t);s(u,!0),n.handleChildrenCreation(l,u),e.appendChild(u)}),jt,jt,(function(){r?(o=!0,n.shadowRoot.slot=e):i()}),(function(t){o?i():r=!1;var a=document.createElement("virtual");n.handleChildrenCreation(t,a),e.appendChild(a)}))},t.prototype.s=function(){},t.prototype.i=function(t,e){this.shadowRoot.idMap[e]=t},t.prototype.c=function(t,e){t.setAttribute("class",e)},t.prototype.y=function(t,e){t.setAttribute("style",e)},t.prototype.d=function(t,e,n){t.dataset[e]=Rt(n)},t.prototype.m=function(){},t.prototype.v=function(t,e,n,r){var o=this;this.shadowRoot.setListener(t,e,(function(t){var e=o.shadowRoot.template.methods[n],i=null==e?void 0:e(t);return!r&&i}))},t.prototype.r=function(t,e,n){"boolean"==typeof n?n?t.setAttribute(e,""):t.removeAttribute(e):t.setAttribute(e,Rt(n))},t.prototype.p=function(){},t.prototype.setFnFilter=function(){},t}(),Ut=function(){return{C:function(t,e,n,r,o,i){i("")},B:Object.create(null)}},Ft=function(){return Ut},Gt=function(){function t(t){if("object"!=typeof t._$template&&void 0!==t._$template)throw new Error("Component template of ".concat(t.is,' must be a valid compiled template (or "null" for default template).'));var e=t._$template||{content:Ft};this.genObjectGroupEnv={list:e.groupList||Object.create(null),group:e.content},this.updateMode="",this.methods=t._$methodMap}return t.prototype.createInstance=function(t){return new Wt(this,t)},t}(),Wt=function(){function t(t,e){if(3!==e.getBackendMode())throw new Error("Component template of ".concat(e.is," cannot be initialized since external rendering is only supported in Domlike backend currently."));var n=e.getBackendElement();if(!n)throw new Error("Component template of ".concat(e.is," cannot be initialized as external components since no suitable backend element found."));this.comp=e,this.shadowRoot=this,this.shadowRootElement=n,this.root=n,this.slot=n,this.template=t;var r=t.genObjectGroupEnv.group("")||Ft();this.procGenWrapper=new Bt(this,r),this.idMap=Object.create(null),this.listeners=[]}return t.prototype.initValues=function(t){if(this.bindingMapGen=this.procGenWrapper.create(t),!this.bindingMapGen)throw new Error("The component template does not support binding-map-update, so it cannot be used as external components.");var e=this.shadowRootElement;if(this.slot===e&&e.childNodes.length>0){var n=document.createElement("virtual");e.appendChild(n),this.slot=n}},t.prototype.getIdMap=function(){return this.idMap},t.prototype.updateValues=function(t,e){for(var n=this.bindingMapGen,r=0;r<e.length;r+=1){var o=e[r][0];this.procGenWrapper.bindingMapUpdate(o[0],t,n)}},t.prototype.setListener=function(t,e,n){var r,o=t;o._$wxTmplEv?o._$wxTmplEv[e]=n:o._$wxTmplEv=((r={})[e]=n,r)},t.prototype.handleEvent=function(t,e){for(var n,r=t,o=r,i=this.shadowRootElement,a=e.type,s=e.bubbles;;){var l=e.wrapShadowedEvent(r,null,o),u=null===(n=o._$wxTmplEv)||void 0===n?void 0:n[a];if(u&&!1===u.call(o,l)&&(e.preventDefault(),e.stopPropagation()),!s||e.propagationStopped())break;if(o===i)break;var c=o.parentNode;if(!c)break;o=c}},t}(),Vt=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},Ht=function(){return{C:function(t,e,n,r,o,i){i("")},B:Object.create(null)}},zt=function(){return Ht};!function(t){t[t.Disabled=0]="Disabled",t[t.Enabled=1]="Enabled",t[t.Forced=2]="Forced"}(yt||(yt={}));var qt,Xt=function(){function t(){}return t.prototype.create=function(t,e){return e.externalComponent?new Gt(t):new Kt(t)},t}(),Kt=function(){function t(t){this.updateTemplate(t)}return t.prototype.updateTemplate=function(t){var e=t._$template;if("object"!=typeof e&&void 0!==e)throw new Error("Component template of ".concat(t.is,' must be a valid compiled template (or "null" for default template).'));var n=e||{content:zt};this.genObjectGroupEnv={list:n.groupList||Object.create(null),group:n.content},this.updateMode=n.updateMode||"",this.disallowNativeNode=n.disallowNativeNode||!1,this.eventObjectFilter=n.eventObjectFilter},t.prototype.createInstance=function(t){return new Yt(this,t)},t}(),Yt=function(){function t(t,e){this.comp=e,this.shadowRoot=Se.createShadowRoot(e),this.shadowRoot.destroyBackendElementOnDetach(),this._$applyTemplate(t)}return t.prototype.updateTemplate=function(t,e){this._$applyTemplate(t),this.shadowRoot.removeChildren(0,this.shadowRoot.childNodes.length),this.bindingMapGen=this.procGenWrapper.create(e)},t.prototype._$applyTemplate=function(t){var e=t.genObjectGroupEnv.group("")||zt("");"bindingMap"===t.updateMode?this.forceBindingMapUpdate=2:"virtualTree"===t.updateMode?this.forceBindingMapUpdate=0:this.forceBindingMapUpdate=1,this.procGenWrapper=new Pt(this.shadowRoot,e,t.disallowNativeNode,t.eventObjectFilter),this.bindingMapGen=void 0},t.prototype.initValues=function(t){return this.bindingMapGen=this.procGenWrapper.create(t),this.shadowRoot},t.prototype.updateValues=function(t,e){if(2!==this.forceBindingMapUpdate){if(!(1===this.forceBindingMapUpdate&&e.length<=1&&this.bindingMapGen&&this.tryBindingMapUpdate(t,e[0]))){var n=Object.create(null);for(S=0;S<e.length;S+=1)for(var r=e[S],o=r[0],i=r[1],a=r[2],s=r[3],l=n,u=0;u<o.length;u+=1){var c=o[u],d=l[c];if(!0===d)break;if(u===o.length-1){if(void 0===s)l[c]=!0;else{var p=a;if(void 0===d)l[c]=new Array(p);else if(!Array.isArray(d)){for(var h=new Array(p),f=Object.keys(d),v=0;v<f.length;v+=1){var g=f[v],_=d[g],$=Number(g);h.length<$&&(h.length=$),h[g]=_}l[c]=h}var m=l[c];m.length<p&&(m.length=p);var y=new Array(i.length);y.fill(!0),m.splice.apply(m,Vt([a,s],y,!1))}break}if(void 0===d){var b=Object.create(null);l[c]=b,l=b}else l=d}this.procGenWrapper.update(t,n)}}else for(var S=0;S<e.length;S+=1)this.tryBindingMapUpdate(t,e[S])},t.prototype.tryBindingMapUpdate=function(t,e){if(!e)return!0;var n=this.bindingMapGen;if(!n)return!1;var r=e[0];return 1===r.length&&this.procGenWrapper.bindingMapUpdate(r[0],t,n)},t}();!function(t){t.None="none",t.Simple="simple",t.SimpleWithRecursion="simple-recursion"}(qt||(qt={}));var Zt=null,Qt=function(){if(Zt)return Zt;var t=new Lt;return Zt=t,t},Jt=null,te=function(){return Jt||(t=new S,Jt=t,t);var t},ee={defaultComponentSpace:null,externalComponent:!1,templateEngine:new Xt,styleScope:w.globalScope(),extraStyleScope:null,hostNodeTagName:"wx-x",multipleSlots:!1,dynamicSlots:!1,directSlots:!1,reflectToAttributes:!1,writeFieldsToNode:!0,writeIdToDOM:!1,useMethodCallerListeners:!1,idPrefixGenerator:null,pureDataPattern:null,dataDeepCopy:qt.Simple,propertyPassingDeepCopy:qt.Simple,listenerChangeLifetimes:!1,virtualHost:!1,propertyEarlyInit:!1,throwGlobalError:!1,writeExtraInfoToAttr:!1,backendContext:null},ne=function(t,e){var n=void 0===e?ee:e;if(void 0===t&&n!==ee)return n;var r=null!=t?t:{};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}},re=function(){function t(){this.empty=!0,this._$type="",this._$arr=null,this._$avoidErrorHandler=!1}return t.prototype.add=function(t){this._$arr?this._$arr=this._$arr.concat(t):this._$arr=[t],this.empty=!1},t.prototype.remove=function(t){var e=null;if(this._$arr){for(var n=[],r=this._$arr,o=0;o<r.length;o+=1){if(r[o]===t){n.push.apply(n,r.slice(o+1)),e=t;break}n.push(r[o])}this._$arr=n,this.empty=0===this._$arr.length}return e},t.prototype.call=function(t,e,n){var r=this._$arr,o=!0;if(r)for(var i=0;i<r.length;i+=1)!1===ue(this._$type,r[i],t,e,n,this._$avoidErrorHandler)&&(o=!1);return o},t.safeCallback=function(t,e,n,r,o,i){void 0===i&&(i=!1);try{return e.apply(n,r)}catch(s){var a="[Error] [Component] ".concat(t||"Error Listener"," Error @ ");return n instanceof $t&&(a+=n.is),a+="#".concat(e.name||"(anonymous)"),o&&o.triggerLifetime("error",[s]),void function(t,e,n){if(n||!1!==ie.call(t,[t,e])){if(ee.throwGlobalError)throw t;console.error(t instanceof Error?"".concat(t.message,"\n").concat(t.stack||""):String(t))}}(s,{message:a,type:t,element:n,method:e,args:r},i)}},t.addGlobalErrorListener=function(t){ie.add(t)},t.removeGlobalErrorListener=function(t){ie.remove(t)},t.addGlobalWarningListener=function(t){se.add(t)},t.removeGlobalWarningListener=function(t){se.remove(t)},t}();function oe(t){var e="[Warning] [Component] ".concat(t);se.call(e,[e])&&console.warn(e)}var ie=new re;ie._$avoidErrorHandler=!0;var ae,se=new re,le=function(){function t(){this.empty=!0,this._$type="",this._$arr=null}return t.prototype.add=function(t,e){var n={f:t,data:e};this._$arr?this._$arr=this._$arr.concat(n):this._$arr=[n],this.empty=!1},t.prototype.remove=function(t){var e=null;if(this._$arr){for(var n=[],r=this._$arr,o=0;o<r.length;o+=1){var i=r[o];if(i.f===t){n.push.apply(n,r.slice(o+1)),e=i.data;break}n.push(i)}this._$arr=n,this.empty=0===this._$arr.length}return e},t.prototype.call=function(t,e,n,r){var o=this._$arr,i=!0;if(o)for(var a=0;a<o.length;a+=1){var s=o[a],l=s.f;n(s.data)&&!1===re.safeCallback(this._$type,l,t,e,r)&&(i=!1)}return i},t}(),ue=re.safeCallback,ce=re.addGlobalErrorListener,de=re.removeGlobalErrorListener,pe=re.addGlobalWarningListener,he=re.removeGlobalWarningListener,fe=function(){function t(t){this._$subtreeObserversCount=0,this.attrObservers=null,this.textObservers=null,this.childObservers=null,this.attachObservers=null,this._$boundElement=t}return t.prototype.attachChild=function(e){e._$mutationObserverTarget||(e._$mutationObserverTarget=new t(e)),this._$subtreeObserversCount>0&&e._$mutationObserverTarget.updateSubtreeCount(this._$subtreeObserversCount)},t.prototype.detachChild=function(t){t._$mutationObserverTarget&&t._$mutationObserverTarget.updateSubtreeCount(-this._$subtreeObserversCount)},t.prototype.updateSubtreeCount=function(e){this._$subtreeObserversCount+=e,this._$boundElement.childNodes.forEach((function(n){n instanceof ot&&(n._$mutationObserverTarget||(n._$mutationObserverTarget=new t(n)),n._$mutationObserverTarget.updateSubtreeCount(e))}))},t.prototype.hasSubtreeListeners=function(){return this._$subtreeObserversCount>0},t.callAttrObservers=function(t,e){var n,r=t;do{var o=r._$mutationObserverTarget;null===(n=null==o?void 0:o.attrObservers)||void 0===n||n.call(r,[e]);var i=r.parentNode;if(!i)break;if(!(r=i)._$mutationObserverTarget)break}while(r._$mutationObserverTarget._$subtreeObserversCount>0)},t.callTextObservers=function(t,e){for(var n,r=t.parentNode;r;){var o=r._$mutationObserverTarget;if(!o||0===o._$subtreeObserversCount)break;null===(n=o.textObservers)||void 0===n||n.call(r,[e]),r=r.parentNode}},t.callChildObservers=function(t,e){var n,r=t;do{var o=r._$mutationObserverTarget;null===(n=null==o?void 0:o.childObservers)||void 0===n||n.call(r,[e]);var i=r.parentNode;if(!i)break;if(!(r=i)._$mutationObserverTarget)break}while(r._$mutationObserverTarget._$subtreeObserversCount>0)},t.callAttachObservers=function(t,e){var n,r=t._$mutationObserverTarget;null===(n=null==r?void 0:r.attachObservers)||void 0===n||n.call(t,[e])},t}(),ve=function(){function t(t){this._$subtreeListenersCount=0,this._$boundFuncArrs=[],this._$boundTarget=null,this._$listener=t,this._$normalizedListener=null}return t.create=function(e){return new t(e)},t.prototype.observe=function(t,e){void 0===e&&(e={properties:!1,childList:!1,characterData:!1,subtree:!1,attachStatus:!1});var n,r=this._$listener;if(!r)throw new Error("A MutationObserver can only observe once");t._$mutationObserverTarget?n=t._$mutationObserverTarget:(n=new fe(t),t._$mutationObserverTarget=n),this._$listener=null;var o=e.subtree?r:function(t){t.target===this&&r.call(this,t)};this._$normalizedListener=o,this._$boundTarget=n,e.properties&&(n.attrObservers||(n.attrObservers=new re),n.attrObservers.add(o),this._$boundFuncArrs.push(n.attrObservers),this._$subtreeListenersCount+=1),e.childList&&(n.childObservers||(n.childObservers=new re),n.childObservers.add(o),this._$boundFuncArrs.push(n.childObservers),this._$subtreeListenersCount+=1),e.characterData&&(n.textObservers||(n.textObservers=new re),n.textObservers.add(o),this._$boundFuncArrs.push(n.textObservers),this._$subtreeListenersCount+=1),e.subtree&&n.updateSubtreeCount(this._$subtreeListenersCount),e.attachStatus&&(n.attachObservers||(n.attachObservers=new re),n.attachObservers.add(o),this._$boundFuncArrs.push(n.attachObservers))},t.prototype.disconnect=function(){var t;null===(t=this._$boundTarget)||void 0===t||t.updateSubtreeCount(-this._$subtreeListenersCount);var e=this._$boundFuncArrs;this._$boundFuncArrs=[];var n=this._$normalizedListener;n&&e.forEach((function(t){t.remove(n)}))},t}(),ge=function(){function t(t,e){var n;this._$slotElement=null,this._$destroyOnDetach=!1,this._$subtreeSlotStart=null,this._$subtreeSlotEnd=null,this._$text=String(t),n=e._$nodeTreeContext.document.createTextNode(t),this._$backendElement=n,this.ownerShadowRoot=e,this.parentNode=null,this.parentIndex=-1,this.containingSlot=void 0}return t.create=function(e,n){return new t(e,n)},t.prototype.asTextNode=function(){return this},t.prototype.asElement=function(){return null},t.prototype.asNativeNode=function(){return null},t.prototype.asVirtualNode=function(){return null},t.prototype.asInstanceOf=function(){return null},t.prototype.destroyBackendElement=function(){this._$backendElement&&(this._$backendElement=null)},t.prototype.destroyBackendElementOnDetach=function(){this._$destroyOnDetach=!0},t.prototype.getBackendElement=function(){return this._$backendElement},t.prototype.getComposedParent=function(){if(void 0!==this.containingSlot)return this.containingSlot;for(var t=this.parentNode;null==t?void 0:t._$inheritSlots;)t=t.parentNode;return t},Object.defineProperty(t.prototype,"$$",{get:function(){return this._$backendElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this._$text},set:function(t){this._$text=String(t),this._$backendElement&&(this._$backendElement.textContent=this._$text),fe.callTextObservers(this,{type:"characterData",target:this})},enumerable:!1,configurable:!0}),t}(),_e=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$e=function(t){function e(){throw new Error("Element cannot be constructed directly")}return _e(e,t),e.create=function(t,n,r,o){var i,a=Object.create(e.prototype);a.is=t,a._$placeholderHandler=o;var s,l=n._$nodeTreeContext;if(s=l.document.createElement(t),a._$initialize(!1,s,n,l),a.classList=new N(a,null),n&&s){var u=n.getHostNode()._$definition._$options.styleScope;if(ee.writeExtraInfoToAttr){var c=null===(i=n.getHostNode()._$behavior.ownerSpace)||void 0===i?void 0:i.styleScopeManager.queryName(u);c&&s.setAttribute("exparser:info-class-prefix","".concat(c,"--"))}}return s&&n._$nodeTreeContext.associateValue(s,a),a},e.prototype.setModelBindingListener=function(t,e){var n=this;if(this._$modelBindingListeners||(this._$modelBindingListeners=Object.create(null)),!this._$modelBindingListeners[t]){var r=this.getBackendElement();r&&this.getBackendContext().setModelBindingStat(r,t,(function(e){var r,o=null===(r=n._$modelBindingListeners)||void 0===r?void 0:r[t];o&&o.call(n,e)}))}this._$modelBindingListeners[t]=e},e}(ot),me=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){t[t.Direct=0]="Direct",t[t.Single=1]="Single",t[t.Multiple=2]="Multiple",t[t.Dynamic=3]="Dynamic"}(ae||(ae={}));var ye,be=function(t,e,n){var r=e.waiting;if(r)return r.add(t),r.hintUsed(n),function(){r.remove(t)}},Se=function(t){function e(){throw new Error("Element cannot be constructed directly")}return me(e,t),e.createShadowRoot=function(t){var n=Object.create(e.prototype),r=null;n._$initializeVirtual("shadow",n,t._$nodeTreeContext,r),n._$idMap=null;var o=1,i=t.getComponentOptions();return i.multipleSlots?o=2:i.dynamicSlots?o=3:i.directSlots&&(o=0),n._$slotMode=o,1===o?n._$singleSlot=null:2===o?(n._$slots=Object.create(null),n._$slotsList=Object.create(null)):3===o&&(n._$dynamicSlotsInserted=!1,n._$dynamicSlots=new Map,n._$requiredSlotValueNames=[],n._$propertyPassingDeepCopy=V(i.propertyPassingDeepCopy),n._$insertDynamicSlotHandler=void 0,n._$removeDynamicSlotHandler=void 0,n._$updateDynamicSlotHandler=void 0),n._$backendShadowRoot=r,n._$initialize(!0,r,n,t._$nodeTreeContext),n._$host=t,t.shadowRoot=n,n},e.prototype.getHostNode=function(){return this._$host},e.prototype.createTextNode=function(t){return void 0===t&&(t=""),new ge(t,this)},e.prototype.createNativeNode=function(t){return $e.create(t,this)},e.prototype.createVirtualNode=function(t){return void 0===t&&(t="virtual"),st.create(t,this)},e.prototype.createNativeNodeWithInit=function(t,e,n,r){var o=$e.create(t,this,e,n);return null==r||r(o),o},e.prototype.createComponent=function(t,e,n,r,o){var i,a=this._$host,s=a._$behavior,l=a._$genericImpls,u=s.ownerSpace,c=void 0===e?t:e,d=s._$using[c];if("string"==typeof d)return this.createNativeNodeWithInit(d,t,void 0,o);if(d){var p=void 0;d.final?p=d.final:null!==d.placeholder&&(p=vt(d.placeholder,u,d.source,l));var h=r?be(r,d,a):void 0;if("string"==typeof p)return this.createNativeNodeWithInit(p,t,h,o);if(p)return $t._$advancedCreate(t,p,this,null,ft(p,s,a,n),h,o)}var f=l&&l[c];if("string"==typeof f)return this.createNativeNodeWithInit(f,t,void 0,o);if(f){var v=void 0;if(f.final?v=f.final:null!==f.placeholder&&(v=vt(f.placeholder,u,f.source,l)),h=r?be(r,f,a):void 0,"string"==typeof v)return this.createNativeNodeWithInit(v,t,h,o);if(v)return $t._$advancedCreate(t,v,this,null,ft(v,s,a,n),h,o)}var g=null!==(i=u.getGlobalUsingComponent(c))&&void 0!==i?i:u.getDefaultComponent();if(!g)throw new Error('Cannot find component "'.concat(c,'"'));return"string"==typeof g?this.createNativeNodeWithInit(g,t,void 0,o):$t._$advancedCreate(t,g,this,null,ft(g,s,a,n),void 0,o)},e.prototype.createComponentOrNativeNode=function(t,e,n){var r=this._$host,o=r._$behavior,i=o.ownerSpace.getGlobalUsingComponent(t);if("string"==typeof i)return this.createNativeNodeWithInit(i,t,void 0,n);if(i)return $t._$advancedCreate(t,i,this,null,ft(i,o,r,e),void 0,n);var a=$e.create(t,this);return null==n||n(a),a},e.prototype.checkComponentPlaceholder=function(t){var e,n,r=this._$host._$behavior._$using[t];if(void 0!==r)n=r;else{var o=null===(e=this._$host._$genericImpls)||void 0===e?void 0:e[t];if(!o)return;n=o}return"string"!=typeof n&&!n.final&&null!==n.placeholder},e.prototype.getElementById=function(t){return this._$getIdMap()[t]},e.prototype._$markIdCacheDirty=function(){this._$idMap=null},e.prototype._$getIdMap=function(){if(this._$idMap)return this._$idMap;var t=ot._$generateIdMap(this);return this._$idMap=t,t},e.prototype.getSlotElementFromName=function(t){var e=this._$slotMode;if(0===e)throw new Error("cannot get slot element in directSlots");if(1===e)return this._$singleSlot;if(2===e)return this._$slots[t]||null;if(3===e){for(var n=[],r=this._$subtreeSlotStart;r;r=r.next){var o=r.value;(o._$slotName||"")===t&&n.push(o)}return n}return null},e.prototype.getContainingSlot=function(t){var e,n,r=this._$slotMode;if(0===r)return(null==t?void 0:t.containingSlot)||null;if(1===r)return this._$singleSlot;if(3===r){if(!t)return null;for(var o=t;null===(e=o.parentNode)||void 0===e?void 0:e._$inheritSlots;)o=o.parentNode;var i=o._$slotElement;if((null==i?void 0:i.ownerShadowRoot)===this)return i}return 2===r?(n=t instanceof ot?t._$nodeSlot:"",this._$slots[n]||null):null},e.prototype.getSlotContentArray=function(t){if(null===t._$slotName)return null;var e=[];return this.forEachNodeInSpecifiedSlot(t,(function(t){e.push(t)})),e},e.prototype.forEachSlot=function(t){var e=this._$slotMode;if(0===e)throw new Error("Cannot iterate slots in directSlots");if(1===e)this._$singleSlot&&t(this._$singleSlot);else if(2===e)for(var n=Object.values(this._$slots),r=0;r<n.length&&!1!==t(n[r]);r+=1);else if(3===e)for(var o=this._$subtreeSlotStart;o&&!1!==t(o.value);o=o.next);},e.prototype.forEachNodeInSlot=function(t){for(var e=this._$host.childNodes,n=0;n<e.length;n+=1)if(!ot.forEachNodeInSlot(e[n],t))return!1;return!0},e.prototype.forEachNodeInSpecifiedSlot=function(t,e){if(t){for(var n=t.slotNodes,r=0;r<n.length;r+=1){var o=n[r];if(!1===e(o))return!1}return!0}return this.forEachNodeInSlot((function(t,n){return null!==n||e(t)}))},e.prototype.forEachSlotContentInSlot=function(t){for(var e=this._$host.childNodes,n=0;n<e.length;n+=1)if(!ot.forEachSlotContentInSlot(e[n],t))return!1;return!0},e.prototype.forEachSlotContentInSpecifiedSlot=function(t,e){if(t){for(var n=t.slotNodes,r=0;r<n.length;r+=1){var o=n[r];if(!o._$inheritSlots&&!1===e(o))return!1}return!0}return this.forEachSlotContentInSlot((function(t,n){return null!==n||e(t)}))},e.prototype.isConnected=function(t){if(t.ownerShadowRoot!==this)return!1;for(var e=t;e;e=e.parentNode)if(e===this)return!0;return!1},e.prototype._$applyMultipleSlotInsertion=function(t,e,n){var r=this._$slotsList,o=this._$slots;if(r[e]){for(var i=r[e],a={next:i},s=!0,l=this._$subtreeSlotStart;l&&a.next&&l.value!==t;l=l.next)l.value===a.next.value&&(s=!1,a=a.next);if(s)r[e]=i.prev={value:t,prev:null,next:i};else{var u=a.next;a.next={value:t,prev:a,next:u},u&&(u.prev=a.next)}}else r[e]={value:t,prev:null,next:null};var c=o[e],d=r[e].value;c!==d&&(o[e]=d,ot._$insertChildReassignSlot(this,e,c||null,d))},e.prototype._$applyMultipleSlotsRemoval=function(t,e,n){for(var r=this._$slotsList,o=this._$slots,i=r[e]||null;i&&i.value!==t;i=i.next);if(i){var a=i.prev,s=i.next;if(a&&(a.next=s),s&&(s.prev=a),!a){var l=s;if(l){var u=l.value;r[e]=l,n||(o[e]=u,ot._$insertChildReassignSlot(this,e,t,u))}else delete r[e],n||(delete o[e],ot._$insertChildReassignSlot(this,e,t,null))}}},e.prototype._$applySlotRename=function(t,e,n){var r=this._$slotMode;if(1!==r&&0!==r){if(2===r)return this._$applyMultipleSlotsRemoval(t,n,!1),void this._$applyMultipleSlotInsertion(t,e,!1);if(3===r){if(!this._$dynamicSlotsInserted)return;var o=this._$insertDynamicSlotHandler,i=this._$removeDynamicSlotHandler;this._$dynamicSlots.set(t,{updatePathTree:void 0}),null==i||i([t]),null==o||o([{slot:t,name:e,slotValues:t._$slotValues}])}}},e.prototype._$applySlotsInsertion=function(t,e,n){var r=this._$slotMode;if(0!==r){if(1===r){var o=this._$singleSlot,i=this._$subtreeSlotStart.value;if(o===i)return;return this._$singleSlot=i,void ot._$insertChildReassignSlot(this,null,o||null,i)}if(2!==r){if(3===r){if(n)return;if(!this._$dynamicSlotsInserted)return;for(var a=this._$insertDynamicSlotHandler,s=[],l=t;l&&l!==e.next;l=l.next)d=(c=l.value)._$slotName,this._$dynamicSlots.set(c,{updatePathTree:void 0}),s.push({slot:c,name:d,slotValues:c._$slotValues});null==a||a(s)}}else for(var u=t;u&&u!==e.next;u=u.next){var c,d=(c=u.value)._$slotName;this._$applyMultipleSlotInsertion(c,d,n)}}},e.prototype._$applySlotsRemoval=function(t,e,n){var r,o=this._$slotMode;if(0!==o){if(1===o){if(n)return;var i=this._$singleSlot,a=null===(r=this._$subtreeSlotStart)||void 0===r?void 0:r.value;if(i===a)return;return this._$singleSlot=a,void ot._$insertChildReassignSlot(this,null,i||null,a||null)}if(2!==o){if(3===o){if(n)return;if(!this._$dynamicSlotsInserted)return;for(var s=this._$removeDynamicSlotHandler,l=[],u=t;u&&u!==e.next;u=u.next)d=u.value,this._$dynamicSlots.delete(d),l.push(d);null==s||s(l)}}else for(var c=t;c&&c!==e.next;c=c.next){var d,p=(d=c.value)._$slotName;this._$applyMultipleSlotsRemoval(d,p,n)}}},e.prototype.setDynamicSlotHandler=function(t,e,n,r){if(3===this._$slotMode&&(this._$requiredSlotValueNames=t,this._$insertDynamicSlotHandler=e,this._$removeDynamicSlotHandler=n,this._$updateDynamicSlotHandler=r,this._$dynamicSlotsInserted))for(var o=this._$dynamicSlots.values(),i=o.next();!i.done;i=o.next()){var a=i.value;a.updatePathTree=a.updatePathTree||Object.create(null)}},e.prototype.useDynamicSlotHandlerFrom=function(t){t._$insertDynamicSlotHandler&&this.setDynamicSlotHandler(t._$requiredSlotValueNames.slice(),t._$insertDynamicSlotHandler,t._$removeDynamicSlotHandler,t._$updateDynamicSlotHandler)},e.prototype.replaceSlotValue=function(t,e,n){var r,o=t._$slotValues;if(o){var i=o[e],a=n;if(0!==this._$propertyPassingDeepCopy&&(a=2===this._$propertyPassingDeepCopy?I(n,!0):M(n)),i!==a&&(o[e]=a,!(this._$requiredSlotValueNames.indexOf(e)<0))){var s=null===(r=this._$dynamicSlots)||void 0===r?void 0:r.get(t);s&&(s.updatePathTree||(s.updatePathTree=Object.create(null)),s.updatePathTree[e]=!0)}}},e.prototype.applySlotValueUpdates=function(t){var e,n,r=null===(e=this._$dynamicSlots)||void 0===e?void 0:e.get(t),o=null==r?void 0:r.updatePathTree;o&&(r.updatePathTree=void 0,null===(n=this._$updateDynamicSlotHandler)||void 0===n||n.call(this,t,t._$slotValues,o))},e.prototype.applySlotUpdates=function(){var t;if(this._$dynamicSlotsInserted)for(var e=this._$dynamicSlots.entries(),n=e.next();!n.done;n=e.next()){var r=n.value,o=(u=r[0],r[1]),i=o.updatePathTree;i&&(o.updatePathTree=void 0,null===(t=this._$updateDynamicSlotHandler)||void 0===t||t.call(this,u,u._$slotValues,i))}else{this._$dynamicSlotsInserted=!0;for(var a=this._$insertDynamicSlotHandler,s=[],l=this._$subtreeSlotStart;l;l=l.next){var u,c=(u=l.value)._$slotName;this._$dynamicSlots.set(u,{updatePathTree:void 0}),s.push({slot:u,name:c,slotValues:u._$slotValues})}null==a||a(s)}},e.prototype.getSlotMode=function(){return this._$slotMode},e._$updateSubtreeSlotNodes=function(t,e,n,r,o){if(n||r){var i=null==n?void 0:n.getSlotMode(),a=null==r?void 0:r.getSlotMode();if(void 0!==i&&0!==i||void 0!==a&&0!==a){if(!(void 0!==i&&1!==i||void 0!==a&&1!==a)){for(var s=-1,l=0,u=-1,c=[],d=e[0].containingSlot,p=null==n?void 0:n.getContainingSlot(e[0]),h=0;h<e.length;h+=1){var f=e[h];ot.forEachNodeInSlot(f,(function(t){d&&(l?l+=1:(s=t.slotIndex,l=1)),c.push(t)}))}if(p&&c.length){var v=c[0];u=ot._$findSlotNodeInsertPosition(p,v,o)}return{updateContainingSlot:function(){for(var t=c.length-1;t>=0;t-=1){var e=c[t];ot._$updateContainingSlot(e,p)}},removeSlotNodes:function(){r&&d&&l&&ot._$spliceSlotNodes(d,s,l,void 0)},insertSlotNodes:function(){n&&p&&c.length&&ot._$spliceSlotNodes(p,u,0,c)}}}var g=new Map,_=new Map,$=[];for(h=0;h<e.length;h+=1)f=e[h],ot.forEachNodeInSlot(f,(function(t,e){var r=0!==i?null==n?void 0:n.getContainingSlot(t):void 0;if(e){var o=_.get(e);o?o.count+=1:_.set(e,{start:t.slotIndex,count:1})}if(r){var a=g.get(r);a?a.nodes.push(t):g.set(r,{nodes:[t],insertPos:-1})}$.push([t,r])}));if(n&&g.size)for(var m=g.entries(),y=m.next();!y.done;y=m.next()){var b=y.value,S=b[0],C=b[1].nodes[0];y.value[1].insertPos=ot._$findSlotNodeInsertPosition(S,C,o)}return{updateContainingSlot:function(){for(var t=$.length-1;t>=0;t-=1){var e=$[t],n=e[0],r=e[1];ot._$updateContainingSlot(n,r)}},removeSlotNodes:function(){if(r&&_.size)for(var t=_.entries(),e=t.next();!e.done;e=t.next()){var n=e.value,o=n[0],i=n[1],a=i.start,s=i.count;ot._$spliceSlotNodes(o,a,s,void 0)}},insertSlotNodes:function(){if(n&&g.size)for(var t=g.entries(),e=t.next();!e.done;e=t.next()){var r=e.value,o=r[0],i=r[1],a=i.nodes,s=i.insertPos;ot._$spliceSlotNodes(o,s,0,a)}}}}}},e}(st),Ce=function(t){if(t instanceof ot){var e;return e=t instanceof st?"(virtual):".concat(t.is):t instanceof $t?"".concat(t.tagName,":").concat(t.is):t instanceof $e?t.is:"(unknown)","<".concat(e).concat(function(t){var e="";if(t instanceof ot){null!==t._$slotName&&(e+=' (slot) name="'.concat(t._$slotName,'"')),t.id&&(e+=' id="'.concat(t.id,'"')),t.slot&&(e+=' slot="'.concat(t.slot,'"'));var n=t.class;n&&(e+=' class="'.concat(n,'"')),t.style&&(e+=' style="'.concat(t.style,'"'))}return t instanceof st||(t instanceof $t?$t.listProperties(t).forEach((function(n){e+=" ".concat(n,'="').concat(String(t.data[n]),'"')})):t.attributes.forEach((function(t){e+=" ".concat(t.name,'="').concat(String(t.value),'"')}))),e}(t),">")}return t instanceof ge?t.textContent.trim():null===t?"<(null)>":void 0===t?"<(undefined)>":"<(unknown)>"},we=function(t,e,n){void 0===n&&(n=0);for(var r="",o=n;o;o-=1)r+=" ";var i=r+Ce(t),a=!1;return t instanceof ot&&(t instanceof $t&&(a=t._$external),e?a?(i+="\n".concat(r," <(external)>"),t.forEachComposedChild((function(t){i+="\n".concat(we(t,e,n+2))}))):t.forEachComposedChild((function(t){i+="\n".concat(we(t,e,n+1))})):t.childNodes.forEach((function(t){i+="\n".concat(we(t,e,n+1))}))),i},Ne=function(t,e){console.log(we(t,e))};!function(t){t.ShadowAncestors="shadow-ancestors",t.ComposedAncestors="composed-ancestors",t.ShadowDescendantsRootFirst="shadow-descendants-root-first",t.ShadowDescendantsRootLast="shadow-descendants-root-last",t.ComposedDescendantsRootFirst="composed-descendants-root-first",t.ComposedDescendantsRootLast="composed-descendants-root-last"}(ye||(ye={}));var Ee=function(){function t(t,e,n){if(void 0===n&&(n=ot),!(t instanceof ot||t instanceof ge))throw new Error("Element iterators can only be used in elements or text nodes");if(this._$node=t,this._$nodeTypeLimit=n||ot,"shadow-ancestors"===e||"shadow-descendants-root-first"===e||"shadow-descendants-root-last"===e)this._$composed=!1;else{if("composed-ancestors"!==e&&"composed-descendants-root-first"!==e&&"composed-descendants-root-last"!==e)throw new Error('Unrecognized iterator type "'.concat(String(e),'"'));this._$composed=!0}this._$isAncestor="shadow-ancestors"===e||"composed-ancestors"===e,this._$rootFirst="shadow-descendants-root-first"===e||"composed-descendants-root-first"===e}return t.create=function(e,n,r){return new t(e,n,r)},t.prototype.forEach=function(t){var e=this._$nodeTypeLimit,n=this._$composed;if(this._$isAncestor)for(var r=this._$node;;){if(r instanceof e&&!1===t(r))return;var o;if(!(o=n?r.getComposedParent():r.parentNode))break;r=o}else{var i=this._$rootFirst,a=function(r){if(i&&r instanceof e&&!1===t(r))return!1;if(r instanceof ot){var o=!1,s=function(t){return!1!==a(t)||(o=!0,!1)};if(n?r.forEachComposedChild(s):r.childNodes.forEach(s),o)return!1}return!(!i&&r instanceof e&&!1===t(r))};a(this._$node)}},t}(),Oe=function(t,e){var n,r;n=t.getBackendContext(),r=e||null,n.render((function(){"function"==typeof r&&ue("render",r,n,[null])}))},xe=function(t){return Qt().defineBehavior(t)},ke=function(t){return Qt().defineComponent(t)};function Ae(t,e){return $t.create(t,e||null)}var Le=Q.triggerEvent,De=Q.triggerExternalEvent;glassEasel=e})();
2
- //# sourceMappingURL=glass_easel.domlike.global.js.map
1
+ var glassEasel=function(e){"use strict";var t;e.BackendMode=void 0,(t=e.BackendMode||(e.BackendMode={}))[t.Shadow=1]="Shadow",t[t.Composed=2]="Composed",t[t.Domlike=3]="Domlike";var n,i=Object.freeze({__proto__:null,BM:{DYNAMIC:!0,SHADOW:!1,COMPOSED:!1,DOMLIKE:!1},get BackendMode(){return e.BackendMode}}),s=Object.freeze({__proto__:null}),o=Object.freeze({__proto__:null});process.env.NODE_ENV,e.DeepCopyKind=void 0,(n=e.DeepCopyKind||(e.DeepCopyKind={})).None="none",n.Simple="simple",n.SimpleWithRecursion="simple-recursion";const r={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:e.DeepCopyKind.Simple,propertyPassingDeepCopy:e.DeepCopyKind.Simple,listenerChangeLifetimes:!1,virtualHost:!1,propertyEarlyInit:!1,throwGlobalError:!1,writeExtraInfoToAttr:!1,backendContext:null,devtool:null},l=(e,t)=>{const n=void 0===t?r:t;if(void 0===e&&n!==r)return n;const i=null!=e?e:{};return{externalComponent:void 0!==i.externalComponent?i.externalComponent:n.externalComponent,templateEngine:void 0!==i.templateEngine?i.templateEngine:n.templateEngine,styleScope:void 0!==i.styleScope?i.styleScope:n.styleScope,hostNodeTagName:void 0!==i.hostNodeTagName?i.hostNodeTagName:n.hostNodeTagName,extraStyleScope:void 0!==i.extraStyleScope?i.extraStyleScope:n.extraStyleScope,multipleSlots:void 0!==i.multipleSlots?i.multipleSlots:n.multipleSlots,dynamicSlots:void 0!==i.dynamicSlots?i.dynamicSlots:n.dynamicSlots,directSlots:void 0!==i.directSlots?i.directSlots:n.directSlots,reflectToAttributes:void 0!==i.reflectToAttributes?i.reflectToAttributes:n.reflectToAttributes,writeFieldsToNode:void 0!==i.writeFieldsToNode?i.writeFieldsToNode:n.writeFieldsToNode,writeIdToDOM:void 0!==i.writeIdToDOM?i.writeIdToDOM:n.writeIdToDOM,useMethodCallerListeners:void 0!==i.useMethodCallerListeners?i.useMethodCallerListeners:n.useMethodCallerListeners,idPrefixGenerator:void 0!==i.idPrefixGenerator?i.idPrefixGenerator:n.idPrefixGenerator,pureDataPattern:void 0!==i.pureDataPattern?i.pureDataPattern:n.pureDataPattern,dataDeepCopy:void 0!==i.dataDeepCopy?i.dataDeepCopy:n.dataDeepCopy,propertyPassingDeepCopy:void 0!==i.propertyPassingDeepCopy?i.propertyPassingDeepCopy:n.propertyPassingDeepCopy,listenerChangeLifetimes:void 0!==i.listenerChangeLifetimes?i.listenerChangeLifetimes:n.listenerChangeLifetimes,virtualHost:void 0!==i.virtualHost?i.virtualHost:n.virtualHost,propertyEarlyInit:void 0!==i.propertyEarlyInit?i.propertyEarlyInit:n.propertyEarlyInit}};class a{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=[],i=this._$arr;for(let s=0;s<i.length;s+=1){if(i[s]===e){n.push(...i.slice(s+1)),t=e;break}n.push(i[s])}this._$arr=n,this.empty=0===this._$arr.length}return t}call(e,t,n){const i=this._$arr;let s=!0;if(i)for(let o=0;o<i.length;o+=1){!1===h(this._$type,i[o],e,t,n)&&(s=!1)}return s}}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=[],i=this._$arr;for(let s=0;s<i.length;s+=1){const o=i[s];if(o.f===e){n.push(...i.slice(s+1)),t=o.data;break}n.push(o)}this._$arr=n,this.empty=0===this._$arr.length}return t}call(e,t,n,i,s){const o=this._$arr;let r=!0;if(o)for(let l=0;l<o.length;l+=1){const{f:a,data:d}=o[l];if(!n(d))continue;const c=h(this._$type,a,e,t,i);!1===(s?s(c):c)&&(r=!1)}return r}}let c=()=>{};function h(e,t,n,i,s){try{return t.apply(n,i)}catch(n){return void c(n,`${e||"Listener"} ${t.name||"(anonymous)"}`,s)}}const u=Symbol("TextNode"),p=Symbol("Element"),f=Symbol("NativeNode"),$=Symbol("VirtualNode"),_=Symbol("ShadowRootSymbol"),g=Symbol("Component"),m=e=>!!e&&e[u],v=e=>!!e&&e[p],b=e=>!!e&&e[f],S=e=>!!e&&e[$],y=e=>!!e&&e[_],C=e=>!!e&&e[g],w=e=>{if(v(e)){let t;return t=S(e)?`(virtual):${e.is}`:C(e)?`${e.tagName}:${e.is}`:b(e)?e.is:"(unknown)",`<${t}${(e=>{let t="";if(v(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 S(e)||(C(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 m(e)?e.textContent.trim():null===e?"<(null)>":void 0===e?"<(undefined)>":"<(unknown)>"},N=(e,t,n=0)=>{let i="";for(let e=n;e;e-=1)i+=" ";let s=i+w(e),o=!1;return v(e)&&(C(e)&&(o=e._$external),t?o?(s+=`\n${i} <(external)>`,e.forEachComposedChild((e=>{s+=`\n${N(e,t,n+2)}`}))):e.forEachComposedChild((e=>{s+=`\n${N(e,t,n+1)}`})):e.childNodes.forEach((e=>{s+=`\n${N(e,t,n+1)}`}))),s};let E=!1;const x=new a("error"),O=new a("warning");function k(e,t,n,i){if(!E){E=!0,C(n)&&n.triggerLifetime("error",[e]);const s=!1===x.call(e,[e,t,n,i]);if(E=!1,s)return}if(r.throwGlobalError)throw e;console.error([e instanceof Error?`${e.message}`:String(e),i?`\t@${w(i)}`:void 0,n?`\t${t||""}@${"string"==typeof n?`<${n}>`:w(n||!1)}`:void 0].filter(Boolean).join("\n"))}function L(e,t,n){O.call(null,[e,t||"",n])&&console.warn(e)}c=k;class D extends Error{constructor(e,t,n,i){super(e),this.additionalStack=t,this.relatedComponent=n,this.element=i,k(this,t,n,i)}}const A=["touchstart","touchmove","touchend","touchcancel","mousedown","mousemove","mouseout","mouseover","mouseup","click"];class M{constructor(){this.mode=3,this.document=document,this._$styleSheets=[],this._$styleSheetRegistry=Object.create(null),this._$delegatedEventListeners=Object.create(null),this._$elementEventListeners=new WeakMap,this._$elementCaptureEventListeners=new WeakMap,this._$triggedEvents=new WeakSet}destroy(){}getWindowWidth(){return document.documentElement.clientWidth}getWindowHeight(){return document.documentElement.clientHeight}getDevicePixelRatio(){return window.devicePixelRatio}getTheme(){return"light"}registerStyleSheetContent(e,t){this._$styleSheetRegistry[e]=String(t)}appendStyleSheetPath(e,t){const n=this._$styleSheetRegistry[e];if(void 0===n)throw new Error(`No style sheet registry "${e}"`);const i=document.createElement("style");i.type="text/css",i.innerHTML=n,void 0!==t&&i.setAttribute("wx-style-scope",String(t)),document.head.appendChild(i);const s=this._$styleSheets.length;return this._$styleSheets.push(i),s}disableStyleSheet(e){const t=this._$styleSheets[e];t&&document.head.removeChild(t)}render(e){window.requestAnimationFrame((()=>{h("Render Callback",e,this,[null])}))}getRootNode(){return document.body}associateValue(e,t){e.__wxElement=t}onEvent(e){this._$eventListener||this._$initEvent(),this._$eventListener=e}_$getEventDetail(e){const t={};let n=e;for(;Object.getPrototypeOf(n)!==Event.prototype;){const i=Object.keys(n);for(let n=0;n<i.length;n+=1){const s=i[n];"function"!=typeof e[s]&&(t[s]=e[s])}n=Object.getPrototypeOf(n)}return t}_$trigger(e,t,n,i,s){if(!this._$eventListener||!e.target)return;let o=e.target;for(;o&&!o.__wxElement;)o=o.parentNode;if(!o)return;1===this._$eventListener(o.__wxElement,t,n,{originalEvent:e,bubbles:i,composed:s,capturePhase:!0})&&e.preventDefault()}_$initEvent(){const e=Object.create(null);let t=!1;const n=(t,n)=>{e[n.identifier]={x:n.clientX,y:n.clientY}},i=(t,n)=>{const i=n.identifier;if(e[i]){const s=e[i];(Math.abs(s.x-n.clientX)>10||Math.abs(s.y-n.clientY)>10)&&(delete e[i],this._$trigger(t,"canceltap",s,!0,!0))}},s=(t,n)=>{const i=n.identifier;if(e[i]){const s=e[i];delete e[i],Math.abs(s.x-n.clientX)>10||Math.abs(s.y-n.clientY)>10?this._$trigger(t,"canceltap",s,!0,!0):this._$trigger(t,"tap",s,!0,!0)}},o=(t,n)=>{const i=n.identifier;if(e[i]){const n=e[i];delete e[i],this._$trigger(t,"canceltap",n,!0,!0)}},r=e=>{const t=e.changedTouches;for(let n=0;n<t.length;n+=1)s(e,t[n]);const n=e.target;n.__touchCount-=t.length,n.__touchCount<=0&&(n.__touchCount=0,n.removeEventListener("touchend",r),n.removeEventListener("touchcancel",l))},l=e=>{const t=e.changedTouches;for(let n=0;n<t.length;n+=1)o(e,t[n]);const n=e.target;n.__touchCount-=t.length,n.__touchCount<=0&&(n.__touchCount=0,n.removeEventListener("touchend",r),n.removeEventListener("touchcancel",l))};document.body.addEventListener("touchstart",(e=>{t=!0;const i=e.changedTouches;for(let e=0;e<i.length;e+=1)n(0,i[e]);const s=e.target;s.__touchCount||(s.__touchCount=0,s.addEventListener("touchend",r),s.addEventListener("touchcancel",l)),s.__touchCount+=i.length}),{capture:!0}),document.body.addEventListener("touchmove",(e=>{const t=e.changedTouches;for(let n=0;n<t.length;n+=1)i(e,t[n])}),{capture:!0}),document.body.addEventListener("mousedown",(e=>{t||n(0,{identifier:-1,clientX:e.clientX,clientY:e.clientY})}),{capture:!0}),document.body.addEventListener("mousemove",(e=>{t||i(e,{identifier:-1,clientX:e.clientX,clientY:e.clientY})}),{capture:!0}),document.body.addEventListener("mouseup",(e=>{t||s(e,{identifier:-1,clientX:e.clientX,clientY:e.clientY})}),{capture:!0})}setListenerStats(e,t,n,i){if(!e)return;const s=A.includes(t),o=2===i;if(s){if(this._$delegatedEventListeners[t])return;return this._$delegatedEventListeners[t]=!0,void document.body.addEventListener(t,(e=>{o&&e.preventDefault(),this._$trigger(e,t,this._$getEventDetail(e),e.bubbles,e.composed)}),{capture:!0})}const r=n?this._$elementCaptureEventListeners:this._$elementEventListeners;r.has(e)||r.set(e,Object.create(null));const l=r.get(e);l[t]||(l[t]=!0,e.addEventListener(t,(e=>{this._$triggedEvents.has(e)||(this._$triggedEvents.add(e),o&&e.preventDefault(),this._$trigger(e,t,this._$getEventDetail(e),e.bubbles,e.composed))})))}setModelBindingStat(e,t,n){const i=(i,s)=>{if(e._$wxArgs||(e._$wxArgs={modelListeners:Object.create(null)}),void 0===e._$wxArgs.modelListeners[t]){if(!n)return;e._$wxArgs.modelListeners[t]=n,e.addEventListener(i,(()=>{var n;const i=null===(n=e._$wxArgs)||void 0===n?void 0:n.modelListeners[t];null==i||i(s())}))}e._$wxArgs.modelListeners[t]=n},s=e.tagName;let o=!1;if("INPUT"===s){const n=e,s=n.type;"checkbox"===s||"radio"===s?"checked"===t&&(o=!0,i("change",(()=>n.checked))):"value"===t&&(o=!0,i("input",(()=>n.value)))}else if("TEXTAREA"===s){const n=e;"value"===t&&(o=!0,i("input",(()=>n.value)))}else if("SELECT"===s){const n=e;"value"===t&&(o=!0,i("change",(()=>n.value)))}o||L(`unsupported model binding on "${t}" of "${s.toLowerCase()}" element.`)}createIntersectionObserver(e,t,n,i,s){const o=new IntersectionObserver((e=>{e.forEach((e=>{s({intersectionRatio:e.intersectionRatio,boundingClientRect:e.boundingClientRect,intersectionRect:e.intersectionRect,relativeRect:e.rootBounds,time:e.time})}))}),{root:t,rootMargin:n,threshold:i});return o.observe(e),{disconnect(){o.disconnect()}}}createMediaQueryObserver(e,t){let n=null;const i=()=>{const i=(()=>{const t=document.documentElement.clientWidth,n=document.documentElement.clientHeight;return(void 0===e.width||t===e.width)&&(!(void 0!==e.maxWidth&&t>e.maxWidth)&&(!(void 0!==e.minWidth&&t<e.minWidth)&&((void 0===e.width||n===e.height)&&(!(void 0!==e.maxHeight&&n>e.maxHeight)&&(!(void 0!==e.minHeight&&n<e.minHeight)&&(t>n?"landscape":"portrait")===e.orientation)))))})();n!==i&&(n=i,t({matches:i}))};return setTimeout(i,0),window.addEventListener("resize",i),{disconnect(){window.removeEventListener("resize",i)}}}getContext(e,t){t(null)}}var T;!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"}(T||(T={}));class I{constructor(e){this._$shadowRoot=3===e?new R: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 R extends I{constructor(){super(4)}createElement(e,t){return new I(1)}createTextNode(e){return new I(2)}createComponent(e,t,n,i,s,o){return new I(3)}createVirtualNode(e){return new I(4)}}class P{release(){}associateValue(e){}appendChild(e){}removeChild(e,t){}insertBefore(e,t,n){}replaceChild(e,t,n){}spliceBefore(e,t,n){}spliceAppend(e){}spliceRemove(e,t){}setId(e){}setStyleScope(e,t,n){}setStyle(e){}addClass(e,t){}removeClass(e,t){}clearClasses(){}setAttribute(e,t){}removeAttribute(e){}setText(e){}getBoundingClientRect(e){setTimeout((()=>{e({left:0,top:0,width:0,height:0})}),0)}getScrollOffset(e){setTimeout((()=>{e({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)}setListenerStats(e,t,n){}setModelBindingStat(e,t){}createIntersectionObserver(e,t,n,i){return{disconnect:()=>{}}}getContext(e){e(null)}}const B=/\s+/;class j{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,i,s,o){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=i,this._$extraScope=s,this._$rootScope=(null==n?void 0:n._$owner)?n._$rootScope:i,this._$prefixManager=o,t&&(this._$externalNames=t,this._$externalRawAlias=[])}_$resolvePrefixes(e,t){const n=this._$owner,i=null==n?void 0:n._$externalNames,s=i?i.indexOf(e):-1;if(n&&-1!==s){this._$hasAliasNames=!0;const e=n._$externalRawAlias[s];if(e)for(let i=0;i<e.length;i+=1)n._$resolvePrefixes(e[i],t)}else if("~"===e[0])t(this._$rootScope,e.slice(1));else if("^"===e[0]){let n=e.slice(1),i=this._$owner;for(;"^"===n[0];)n=n.slice(1),i=null==i?void 0:i._$owner;t((null==i?void 0:i._$owner)?i._$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,i=t.length;e<i;e+=1)n[e]=String(t[e])}else n=String(t).split(B).filter((e=>""!==e));const i=this._$externalNames.indexOf(e);-1!==i&&(this._$dirtyExternalNames=this._$dirtyExternalNames||[],this._$dirtyExternalNames.push(e),this._$externalRawAlias[i]=n)}_$getAlias(){return this._$externalNames}_$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 i=this._$externalRawAlias[e]||[];for(let s=0;s<t.length;s+=1)i.includes(t[s])&&(this._$dirtyExternalNames=this._$dirtyExternalNames||[],this._$dirtyExternalNames.push(n[e]))}const i=this._$rawNames.some((e=>e.some((e=>t.includes(e)))));return i&&this._$updateResolvedNames(),!!this._$dirtyExternalNames||i}_$shouldUpdateExternalClass(){return!!this._$dirtyExternalNames}_$markExternalClassUpdated(){this._$dirtyExternalNames=null}_$updateResolvedNames(){const e=this._$element._$backendElement;if(!e)return!1;const t=this._$rawNames,n=this._$backendNames,i=this._$backendNameScopes,s=this._$backendNamesCount,o=[],r=[],l=[];this._$hasAliasNames=!1;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<o.length;n+=1)if(t===o[n]&&e===r[n])return void(l[n]+=1);o.push(t),r.push(e),l.push(1)}))}}let a=!1;for(let t=0;t<o.length;t+=1){let l=!1;for(let e=0;e<n.length;e+=1)if(o[t]===n[e]&&r[t]===i[e]){l=!0,s[e]=0;break}l||(a=!0,this._$addClassToBackend(o[t],r[t],e))}for(let t=0;t<n.length;t+=1)0!==s[t]&&(a=!0,this._$removeClassFromBackend(n[t],i[t],e));return this._$backendNames=o,this._$backendNameScopes=r,this._$backendNamesCount=l,a}_$addClassToBackend(e,t,n){var i;{const s=void 0===t?"":null===(i=this._$prefixManager)||void 0===i?void 0:i.queryName(t),o=s?`${s}--${e}`:e;n.classList.add(o)}}_$removeClassFromBackend(e,t,n){var i;{const s=t&&(null===(i=this._$prefixManager)||void 0===i?void 0:i.queryName(t)),o=s?`${s}--${e}`:e;n.classList.remove(o)}}_$addClass(e,t,n){const i=this._$backendNames,s=this._$backendNameScopes,o=this._$backendNamesCount;let r=!1;for(let n=0;n<i.length;n+=1)if(e===i[n]&&t===s[n]){r=!0,o[n]+=1;break}r||(i.push(e),s.push(t),o.push(1),this._$addClassToBackend(e,t,n))}_$removeClass(e,t,n){const i=this._$backendNames,s=this._$backendNameScopes,o=this._$backendNamesCount;for(let r=0;r<i.length;r+=1)if(e===i[r]&&t===s[r]){o[r]<=1?(i.splice(r,1),s.splice(r,1),o.splice(r,1),this._$removeClassFromBackend(e,t,n)):o[r]-=1;break}}toggle(e,t,n=0){if(B.test(e))throw new Error("Class name contains space characters.");const i=this._$element._$backendElement,s=this._$rawNames[n]?this._$rawNames[n].indexOf(e):-1;let o=!1;if(void 0===t?-1===s:!!t){if(-1===s){const t=this._$rawNames;t[n]||(t[n]=[]);t[n].push(e),i&&this._$resolvePrefixes(e,((e,t)=>{this._$addClass(t,e,i)})),o=!0}}else if(-1!==s){const t=this._$rawNames[n];t&&t.splice(s,1),i&&this._$resolvePrefixes(e,((e,t)=>{this._$removeClass(t,e,i)})),o=!0}return o}contains(e,t=0){const n=this._$rawNames[t]||[];for(let t=0;t<n.length;t+=1){const i=n[t];if("~"===i[0]){if(i.slice(1)===e)return!0}else if("^"===i[0]){let t=i.slice(1);for(;"^"===t[0];)t=t.slice(1);if(t===e)return!0}else if(i===e)return!0}return!1}setClassNames(e,t=0){let n;if(null==e)n=[];else if(Array.isArray(e)){n=Array(e.length);for(let t=0,i=e.length;t<i;t+=1)n[t]=String(e[t])}else n=String(e).split(B).filter((e=>""!==e));return this._$rawNames[t]=n,this._$updateResolvedNames()}getClassNames(e=0){const t=this._$rawNames[e]||[];return t?t.join(" "):""}}const F=Symbol("method");var G=Object.freeze({__proto__:null,METHOD_TAG:F});class V{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 W{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 H=(e,t)=>{let n;n="/"!==e[0]?t.split("/").slice(0,-1).concat(e.split("/")):e.split("/");const i=[];for(let e=0;e<n.length;e+=1){const t=n[e];""!==t&&"."!==t&&(".."!==t?i.push(t):i.pop())}return i.join("/")},z=(e,t)=>{const n=e.indexOf("://");if(n>0){const t=e.indexOf("/",n+3);if(t>0){return{domain:e.slice(0,t),absPath:H(e.slice(t+1),"")}}return{domain:e.slice(0,n+3),absPath:H(e.slice(n+3),"")}}return{domain:null,absPath:H(e,t)}};class K{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);this._$callbacks.splice(t,1)}call(e){const t=this._$callbacks;this._$callbacks=[];for(let n=0;n<t.length;n+=1){(0,t[n])(e)}}}class q{constructor(e,t,n,i=!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,t&&(Object.assign(this._$list,t._$pubList),Object.assign(this._$behaviorList,t._$pubBehaviorList)),this._$defaultComponent=null!=e?e:"",this._$componentOptions=l({},null==t?void 0:t._$componentOptions),this.styleScopeManager=n||new j,this._$allowUnusedNativeNode=i}updateComponentOptions(e){this._$componentOptions=l(e,this._$componentOptions)}getComponentOptions(){return this._$componentOptions}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:i}=z(e,t),s=this.getComponent(i,!0,n);if(!s)throw new Error(`There is no component "${i}" in the space and no default component can be used`);return s}getComponentByUrlWithoutDefault(e,t){const{domain:n,absPath:i}=z(e,t);return this.getComponent(i,!1,n)||null}getComponent(e,t=!0,n=null){let i;if(n){const e=this._$importedSpaces[n];if(e){const{space:t,privateUse:n}=e;i=n?t._$list:t._$pubList}}else i=this._$list;if(i){const t=i[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:i}=z(e,t);return this._$getBehavior(i,n)||null}_$getBehavior(e,t=null){let n;if(t){const e=this._$importedSpaces[t];if(e){const{space:t,privateUse:i}=e;n=i?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 bt(t,this).definition(e).registerComponent()}defineBehavior(e){const t=e.is;return new bt(t,this).definition(e).registerBehavior()}define(e){return new bt(e,this)}defineWithMethodCaller(e){return new bt(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:i}=e[t];n.call(i)}}}groupRegister(e){this.startGroupRegister();const t=h("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 i=this._$pubListWaiting[e];i&&(delete this._$pubListWaiting[e],i.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:i}=z(e,t);let s,o,r;if(n){const e=this._$importedSpaces[n];if(!e)return null;if(o=e.space,r=!e.privateUse,r){if(o._$pubList[i])return null;s=o._$pubListWaiting}else{if(o._$list[i])return null;s=o._$listWaiting}}else{if(o=this,r=!1,this._$list[i])return null;s=this._$listWaiting}let l=s[i];return l||(l=s[i]=new K(o,r,i),l)}setComponentWaitingListener(e){this._$componentWaitingListener=e}createComponentByUrl(e,t,n,i){let s=t,o=null;const r=s.indexOf("#");r>=0&&(s=s.slice(0,r));const l=s.indexOf("?");l>=0&&(o=s.slice(l+1),s=s.slice(0,l));const a=this.getComponentByUrl(s,"");let d=null;n&&(d=Object.create(null),Object.keys(n).forEach((e=>{const t=n[e],i=this.getComponentByUrl(t,"");d[e]=i})));return vt.createWithGenericsAndContext(e,a,d,i,(e=>{if(o){let t=!1;o.split("&").forEach((n=>{const i=n.indexOf("=");if(i>=0){const s=decodeURIComponent(n.slice(0,i)),o=decodeURIComponent(n.slice(i+1));e._$dataGroup.replaceProperty(s,o)&&(t=!0)}})),t&&e.applyDataUpdates()}}))}defineTraitBehavior(e){return new V(this,e)}}let X=null;const Y=()=>{if(X)return X;const e=new q;return X=e,e},Z=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},Q=e=>{const t=e.str;let n="";for(;e.cur<t.length;){const i=t[e.cur];if(!(i>="0"&&i<="9"))break;n+=i,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 i=t[e.cur];if("\\"===i)if(e.cur+1===t.length);else{n+=t[e.cur+1],e.cur+=1}else if(/^[_a-zA-Z]$/.test(i))n+=i;else{if(!(i>="0"&&i<="9"))break;if(""===n)throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (field name cannot start with digits)`);n+=i}e.cur+=1}return n},ee=e=>{const t=e.str;let n="";for(;e.cur<t.length;){const i=t[e.cur];if("\\"===i)if(e.cur+1===t.length)n+="\\",e.cur+=1;else{const i=t[e.cur+1];"."===i||"["===i||"]"===i||"\\"===i?(n+=i,e.cur+=2):(n+="\\",e.cur+=1)}else{if("."===i||"["===i)break;n+=i,e.cur+=1}}return n},te=e=>{const t=e.str;if(Z(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 i=[n];for(;e.cur<t.length&&Z(e);){const n=t[e.cur];if("."===n){if(e.cur+=1,Z(e),"*"===t[e.cur]&&"*"===t[e.cur+1]){i.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)`);i.push(n)}else{if("["!==n)break;{e.cur+=1,Z(e);const n=Q(e);Z(e);if("]"!==t[e.cur])throw new Error(`data path descriptor "${t}" is illegal at char ${e.cur} (illegal index)`);e.cur+=1,i.push(n)}}}return i},ne=e=>{const t=(e=>{const t=e.str,n=[];for(;e.cur<t.length;){const i=t[e.cur];if("."===i){e.cur+=1;const t=ee(e);""!==t&&n.push(t)}else if("["===i){e.cur+=1;const i=Q(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(i)}else{const t=ee(e);n.push(t)}}return 0===n.length&&n.push(""),n})({str:e,cur:0});return t},ie=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)),Z(e);","===e.str[e.cur];)e.cur+=1,t.push(te(e)),Z(e);return t})(t);if(t.cur!==e.length)throw new Error(`data path descriptor "${e}" is illegal at char ${t.cur}`);return n};var se=Object.freeze({__proto__:null,parseMultiPaths:ie,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 i=0;i<e.length;i+=1)n[i]=oe(e[i],t);return n}const i={};t.set(e,i);const s=Object.keys(e);for(let n=0;n<s.length;n+=1){const o=s[n];i[o]=oe(e[o],t)}return i}return"symbol"==typeof e?Symbol(e.description):e},re=e=>{if("object"==typeof e&&null!==e){if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n+=1)t[n]=re(e[n]);return t}const t={},n=Object.keys(e);for(let i=0;i<n.length;i+=1){const s=n[i];t[s]=re(e[s])}return t}return"symbol"==typeof e?Symbol(e.description):e},le=(e,t)=>t?oe(e,new WeakMap):re(e);var ae=Object.freeze({__proto__:null,deepCopy:le,simpleDeepCopy:re});class de{constructor(e){this._$subtreeObserversCount=0,this.attrObservers=null,this.textObservers=null,this.childObservers=null,this.attachObservers=null,this._$boundElement=e}attachChild(e){e._$mutationObserverTarget||(e._$mutationObserverTarget=new de(e)),this._$subtreeObserversCount>0&&e._$mutationObserverTarget.updateSubtreeCount(this._$subtreeObserversCount)}detachChild(e){e._$mutationObserverTarget&&e._$mutationObserverTarget.updateSubtreeCount(-this._$subtreeObserversCount)}updateSubtreeCount(e){this._$subtreeObserversCount+=e;this._$boundElement.childNodes.forEach((t=>{v(t)&&(t._$mutationObserverTarget||(t._$mutationObserverTarget=new de(t)),t._$mutationObserverTarget.updateSubtreeCount(e))}))}hasSubtreeListeners(){return this._$subtreeObserversCount>0}static callAttrObservers(e,t){var n;let i=e;do{const e=i._$mutationObserverTarget;null===(n=null==e?void 0:e.attrObservers)||void 0===n||n.call(i,[t]);const s=i.parentNode;if(!s)break;if(i=s,!i._$mutationObserverTarget)break}while(i._$mutationObserverTarget._$subtreeObserversCount>0)}static callTextObservers(e,t){var n;let i=e.parentNode;for(;i;){const e=i._$mutationObserverTarget;if(!e||0===e._$subtreeObserversCount)break;null===(n=e.textObservers)||void 0===n||n.call(i,[t]),i=i.parentNode}}static callChildObservers(e,t){var n;let i=e;do{const e=i._$mutationObserverTarget;null===(n=null==e?void 0:e.childObservers)||void 0===n||n.call(i,[t]);const s=i.parentNode;if(!s)break;if(i=s,!i._$mutationObserverTarget)break}while(i._$mutationObserverTarget._$subtreeObserversCount>0)}static callAttachObservers(e,t){var n;const i=e._$mutationObserverTarget;null===(n=null==i?void 0:i.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 i;e._$mutationObserverTarget?i=e._$mutationObserverTarget:(i=new de(e),e._$mutationObserverTarget=i),this._$listener=null;const s=t.subtree?n:function(e){e.target===this&&n.call(this,e)};this._$normalizedListener=s,this._$boundTarget=i,t.properties&&(i.attrObservers||(i.attrObservers=new a("attributeObserver")),i.attrObservers.add(s),this._$boundFuncArrs.push(i.attrObservers),this._$subtreeListenersCount+=1),t.childList&&(i.childObservers||(i.childObservers=new a("childObserver")),i.childObservers.add(s),this._$boundFuncArrs.push(i.childObservers),this._$subtreeListenersCount+=1),t.characterData&&(i.textObservers||(i.textObservers=new a("textObserver")),i.textObservers.add(s),this._$boundFuncArrs.push(i.textObservers),this._$subtreeListenersCount+=1),t.subtree&&i.updateSubtreeCount(this._$subtreeListenersCount),t.attachStatus&&(i.attachObservers||(i.attachObservers=new a("attachObserver")),i.attachObservers.add(s),this._$boundFuncArrs.push(i.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)}))}}const he=Object.prototype.hasOwnProperty;var ue;e.NormalizedPropertyType=void 0,(ue=e.NormalizedPropertyType||(e.NormalizedPropertyType={})).Invalid="invalid",ue.Any="any",ue.String="string",ue.Number="number",ue.Boolean="boolean",ue.Object="object",ue.Array="array",ue.Function="function";const pe=(e,t)=>{const n=Object.keys(t);for(let i=0;i<n.length;i+=1){const s=n[i];if(Object.prototype.hasOwnProperty.call(e,s))if("_"===s[0]&&L(`data field "${s}" from different behaviors is overriding or merging.`),"object"!=typeof e[s]||"object"!=typeof t[s]||null===t[s]||Array.isArray(t[s]))e[s]=t[s];else{if(Array.isArray(e[s]))e[s]=e[s].slice();else{const t=e[s],n={},i=Object.keys(t);for(let e=0;e<i.length;e+=1){const s=i[e];n[s]=t[s]}e[s]=n}pe(e[s],t[s])}else e[s]=t[s]}},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",$e=(e,t,n,i)=>{const s=n.type,o=void 0===n.default?void 0:()=>h(`Property "${t}" Default`,n.default,null,[],i||void 0),r=n.optionalTypes;if(r)for(let t=0;t<r.length;t+=1)if(_e(r[t],e))return e;return"string"===s?null==e?(L(`property "${t}" received type-incompatible value: expected <String> but get null value. Used default value instead.`),void 0===o?"":o()):("object"==typeof e&&L(`property "${t}" received type-incompatible value: expected <String> but got object-typed value. Force converted.`),String(e)):"number"===s?isFinite(e)?Number(e):(L("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.`),void 0===o?0:o()):"boolean"===s?!!e:"array"===s?Array.isArray(e)?e:(L(`property "${t}" received type-incompatible value: expected <Array> but got non-array value. Used default value instead.`),void 0===o?[]:o()):"object"===s?"object"==typeof e?e:(L(`property "${t}" received type-incompatible value: expected <Object> but got non-object value. Used default value instead.`),void 0===o?null:o()):"function"===s?"function"==typeof e?e:(L(`property "${t}" received type-incompatible value: expected <Function> but got non-function value. Used default value instead.`),void 0===o?function(){}:o()):void 0===e?void 0===o?null:o():e},_e=(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.observerTree={sub:{}},this.observers=[],this.propFields=e}cloneSub(){const e=new me(this.propFields);return this.observers.length>0&&(e.observerTree=re(this.observerTree),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 i=t[e];let s=this.observerTree,o=!1;for(let e=0;e<i.length;e+=1){const t=i[e];if("**"===t){o=!0;break}s.sub[t]||(s.sub[t]={sub:{}}),s=s.sub[t]}o?s.wildcard?s.wildcard.push(n):s.wildcard=[n]:s.listener?s.listener.push(n):s.listener=[n]}}}const ve=(e,t,n,i)=>{const s=new Array(n.length);for(let e=0;e<n.length;e+=1){const i=n[e];let o=t;for(let e=0;e<i.length;e+=1){const t=i[e];if("**"===t)break;if("object"!=typeof o||null===o){o=void 0;break}o=o[t]}s[e]=o}h("Data Observer",i,e.getMethodCaller(),s,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 i=0;i<n.length;i+=1){const s=n[i];be(e.sub[s],t)}},Se=(e,t,n)=>{let i=e,s=!0;for(let e=0;e<n.length;e+=1){const o=n[e];if(i.wildcard){const e=i.wildcard;for(let n=0;n<e.length;n+=1){t[e[n]]=!0}}if(!he.call(i.sub,o)){s=!1;break}i=i.sub[o]}s&&be(i,t)},ye=(e,t,n,i)=>{for(let s=0;s<e.length;s+=1){const{path:o,f:r}=e[s];t[s]&&(t[s]=!1,n&&ve(n,i,o,r))}},Ce=t=>t===e.DeepCopyKind.Simple?1:t===e.DeepCopyKind.SimpleWithRecursion?2:0;class we{_$generateInnerData(e){const t=this._$pureDataPattern,n=this._$dataDeepCopy;if(t||0!==n){const i={},s=Object.keys(e);for(let o=0;o<s.length;o+=1){const r=s[o],l=e[r];t&&t.test(r)||(i[r]=0===n?l:2===n?le(l,!0):re(l))}return i}return null}constructor(e,t,n,i,s,o,r){this._$modelBindingListener=null,this._$pendingChanges=[],this._$doingUpdates=null,this._$comp=e,this.data=t,this._$pureDataPattern=n,this._$dataDeepCopy=i,this._$propertyPassingDeepCopy=s,this._$reflectToAttributes=o&&!!e,this._$propFields=r.propFields,this._$observerTree=r.observerTree,this._$observers=r.observers,this._$observerStatus=new Array(r.observers.length),this.innerData=this._$generateInnerData(t)}static create(e){return new we(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,i){Array.isArray(i)?this._$pendingChanges.push([e,i,null!=t?t:-1,n||0]):L(`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?le(t,!0):re(t)),this._$pendingChanges.push([[e],n,!0,void 0]),!0)}setChanges(e){this._$pendingChanges=e}getChanges(){return this._$pendingChanges}setModelBindingListener(e,t){if(this._$modelBindingListener)this._$modelBindingListener[e]=t;else{(this._$modelBindingListener=Object.create(null))[e]=t}}applyDataUpdates(e=!1){var t;const n=this._$propFields,i=this._$comp,s=this._$pureDataPattern,o=this._$dataDeepCopy,r=!!this._$doingUpdates;let l,a;this._$observers.length>0?this._$doingUpdates?(l=this._$doingUpdates.combined,a=this._$doingUpdates.prop):(this._$doingUpdates={prop:[],combined:[],count:0},l=this._$doingUpdates.combined,a=this._$doingUpdates.prop):(l=[],a=[]);const d=this._$pendingChanges;this._$pendingChanges=[];for(let t=0;t<d.length;t+=1){const r=d[t],[c,u,p,f]=r,$=void 0!==f,_=String(c[0]),g=!!s&&s.test(_),m=n[_];let v=!0;if(m&&1===c.length){const t=this.data[_];let n,s,l;if($){if(Array.isArray(t)){const e=r,i=p;n=i>=0&&i<t.length?i:t.length,e[2]=n,t.splice(n,f,...u)}else L(`An array splice change cannot be applied to a non-array value (on path "${c.join(".")}"). The change is ignored.`);s=t}else s=$e(u,_,m,this._$comp);if(!g&&this.innerData){let e;if(0===o)r[1]=e=s;else if(void 0!==n){let t;e=this.innerData[_],r[1]=t=2===o?le(u,!0):re(u),e.splice(n,f,...t)}else r[1]=e=2===o?le(s,!0):re(s);this.innerData[_]=e}if(this.data[_]=s,this._$reflectToAttributes){const e=i.getBackendElement();if(e){let t=s;if(m.reflectIdPrefix){const e=i.ownerShadowRoot;if(e){const n=e.getHostNode()._$idPrefix;n&&(t=`${n}--${s}`)}}const n=_.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`)),o=typeof t;"boolean"===o?s?e.setAttribute(n,""):e.removeAttribute(n):"object"===o?e.setAttribute(n,JSON.stringify(t)):e.setAttribute(n,t)}}$||!0!==p?l=t!==s:(m.comparer?(r[2]=void 0,l=!!h("Property Comparer",m.comparer,i,[u,t],null==i?void 0:i.general())):l=t!==s,v=l),!g&&l&&a.push({propName:_,prop:m,oldValue:t,newValue:s,skipModelListener:e})}else{let t,n=this.data,i=_;for(let e=1;e<c.length;e+=1){const t=c[e];Number.isFinite(t)?he.call(n,i)&&Array.isArray(n[i])||(n[i]=[]):he.call(n,i)&&null!==n[i]&&"object"==typeof n[i]&&!Array.isArray(n[i])||(n[i]={}),n=n[i],i=t}if($){const e=n[i];if(Array.isArray(e)){const n=r,i=p;t=i>=0&&i<e.length?i:e.length,n[2]=t,e.splice(t,f,...u)}else L(`An array splice change cannot be applied to a non-array value (on path "${c.join(".")}"). The change is ignored.`)}else n[i]=u;if(!g&&this.innerData){n=this.innerData,i=_;for(let e=1;e<c.length;e+=1){const t=c[e];Number.isFinite(t)?he.call(n,i)&&Array.isArray(n[i])||(n[i]=[]):he.call(n,i)&&null!==n[i]&&"object"==typeof n[i]&&!Array.isArray(n[i])||(n[i]={}),n=n[i],i=t}let e;if(0===o)r[1]=e=u;else if(void 0!==t){let s;e=n[i],r[1]=s=2===o?le(u,!0):re(u),e.splice(t,f,...s)}else r[1]=e=2===o?le(u,!0):re(u);n[i]=e}!g&&m&&a.push({propName:_,prop:m,oldValue:void 0,newValue:u,skipModelListener:e||!1})}Se(this._$observerTree,this._$observerStatus,c),!g&&v&&l.push(r),this._$doingUpdates&&(this._$doingUpdates.count+=1)}if(!r){if(this._$doingUpdates){let e;do{e=this._$doingUpdates.count,ye(this._$observers,this._$observerStatus,i,this.data)}while(e!==this._$doingUpdates.count);this._$doingUpdates=null}if(null===(t=this._$updateListener)||void 0===t||t.call(this,this.innerData||this.data,l),i)for(let e=0;e<a.length;e+=1){const{propName:t,prop:n,oldValue:s,newValue:o,skipModelListener:r}=a[e];if(!r&&this._$modelBindingListener){const e=this._$modelBindingListener[t];e&&e(o)}n.observer&&h("Property Observer",n.observer,i.getMethodCaller(),[o,s],i),i._$mutationObserverTarget&&de.callAttrObservers(i,{type:"properties",target:i,propertyName:t})}}}}var Ne;e.EventBubbleStatus=void 0,(Ne=e.EventBubbleStatus||(e.EventBubbleStatus={}))[Ne.Normal=0]="Normal",Ne[Ne.NoDefault=1]="NoDefault";let Ee=Date.now(),xe=Ee;var Oe,ke;e.EventMutLevel=void 0,(Oe=e.EventMutLevel||(e.EventMutLevel={}))[Oe.None=0]="None",Oe[Oe.Mut=1]="Mut",Oe[Oe.Final=2]="Final",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"}(ke||(ke={}));class Le{constructor(){this.listeners=Object.create(null),this.captureListeners=null}addListener(e,t,n={}){const i=n.final?2:n.mutated?1:0;let s,o,r;return n.capture||n.useCapture?this.captureListeners?s=this.captureListeners:(s=Object.create(null),this.captureListeners=s):s=this.listeners,s[e]?(r=!0,o=s[e]):(r=!1,o=s[e]={mutCount:0,finalCount:0,funcArr:new d("listener")}),o.funcArr.add(t,i),2===i?(o.finalCount+=1,r&&1!==o.finalCount?0:3):1===i?(o.mutCount+=1,!r||1===o.mutCount&&0===o.finalCount?4:0):r?0:2}removeListener(e,t,n={}){const i=n.capture||n.useCapture?this.captureListeners:this.listeners;if(!i)return 1;const s=i[e];if(!s)return 1;const o=s.funcArr.remove(t);return null===o?1:2===o?(s.finalCount-=1,0!==s.finalCount?0:s.mutCount>0?4:2):1===o?(s.mutCount-=1,0!==s.mutCount||0!==s.finalCount?0:2):0}}let De=class e{constructor(e,t,n={}){const i=(()=>{const e=Date.now();return e<xe&&(Ee+=e-xe),xe=e,e-Ee})();this._$eventName=this.type=e,this.timeStamp=i,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)}getEventBubbleStatus(){return this._$eventBubblingControl.noDefault?1:0}wrapShadowedEvent(e,t,n){const i=Object.create(this);return i.target=e,i.mark=t,i.currentTarget=n,i}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,i){const s=this._$eventName,o=e._$eventTarget;if(!o)return;const r=i?o.captureListeners:o.listeners;if(!r)return;const l=r[s];if(!l)return;const a=this.mutatedMarked(),d=C(n)&&n.getMethodCaller()||n,c=C(e)&&e.getMethodCaller()||e,h=this.wrapShadowedEvent(d,t,c);!1===l.funcArr.call(c,[h],(e=>!a||1!==e),C(n)?n:void 0,this._$handleListenerReturn)||l.finalCount>0?(h.stopPropagation(),h.preventDefault()):l.mutCount>0&&h.markMutated()}dispatch(e,t){if(this._$dispatched)throw new Error("Event cannot be dispatched twice");this._$dispatched=!0;const n=this.composed,i=this.bubbles,s=t&&!n,o=this._$eventBubblingControl,r=(e,t)=>{const i=e=>{let s=e;const o=e.collectMarks();for(;;){if(!1===t(s,e,o))return null;let r;if(n){if(y(s))return s.getHostNode();if(null===s.containingSlot)return null;if(s.containingSlot)r=i(s.containingSlot);else for(r=s.parentNode;null==r?void 0:r._$inheritSlots;)r=r.parentNode}else r=s.parentNode;if(!r)return null;s=r}};let s=e;for(;;){const e=i(s);if(!e)break;s=e}};if(this._$capturePhase&&!o.stopped&&!s){const t=[];r(e,((e,n,i)=>{t.push([e,n,i])}));for(let e=t.length-1;e>=0;e-=1){const[n,i,s]=t[e];if(n._$eventTarget&&(this.callListener(n,s,i,!0),o.stopped))break}}if(!o.stopped&&t&&C(e)&&e._$external&&e.shadowRoot.handleEvent(t,this),!o.stopped&&!s){let t=!0;r(e,((e,n,s)=>{if(!t&&C(e)&&e._$external){const t=e.shadowRoot;t.handleEvent(t.slot,this)}return t=!1,e._$eventTarget&&this.callListener(e,s,n,!1),i&&!o.stopped}))}}static dispatchEvent(e,t){return t.dispatch(e)}static dispatchExternalEvent(e,t,n){return n.dispatch(e,t)}static triggerEvent(t,n,i,s){const o=new e(n,i,s);e.dispatchEvent(t,o)}static triggerExternalEvent(t,n,i,s,o){const r=new e(i,s,o);e.dispatchExternalEvent(t,n,r)}};var Ae;!function(e){e[e.Child=0]="Child",e[e.Descendant=1]="Descendant",e[e.CrossShadowDescendant=2]="CrossShadowDescendant"}(Ae||(Ae={}));const Me=e=>{var t;return null===(t=e.ownerShadowRoot)||void 0===t?void 0:t.getHostNode().getRootBehavior().ownerSpace};class Te{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 i=n[1].slice(1),s=n[2].split(".");return s.shift(),i||s.length?{id:i,classes:s,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),i=[];let s=1,o=0;for(;o<n.length;o+=1){const e=n[o];if(!e||" "===e||"\t"===e||">>"===e)continue;if(">"===e[0]){if(1!==s)break;s=3===e.length?2:0;continue}const t=Te._$parseSegment(e,s);if(s=1,!t)break;i.push(t)}o===n.length&&(i.length&&this.unions.push(i))}}isEmpty(){return 0===this.unions.length}static _$testSelectorSegment(e,t,n,i,s,o){var r;if(n===e)return!1;const l=i[s];let a=!0;(Me(n)!==t||l.id&&l.id!==n.id)&&(a=!1);const d=l.classes;for(let e=0;a&&e<d.length;e+=1)(null===(r=n.classList)||void 0===r?void 0:r.contains(d[e]))||(a=!1);if(!a&&0===o)return!1;let c=n;if(a&&0===s){if(null===e)return!0;for(c=c.parentNode;c;c=c.parentNode)if(c===e)return!0;if(2!==o)return!1;c=n,a=!1}const h=a?l.relation:o;do{c.parentNode?c=c.parentNode:2===h?c=y(c)?c.getHostNode():null:2===o?(a=!1,c=y(c)?c.getHostNode():null):c=null,c===e&&(c=null)}while(S(c));if(!c)return!1;if(a){if(Te._$testSelectorSegment(e,t,c,i,s-1,h))return!0;if(2!==o)return!1}return Te._$testSelectorSegment(e,t,c,i,s,o)}testSelector(e,t){if(S(t))return!1;const n=this.unions;let i;if(i=null!==e&&Me(e)||Me(t),void 0===i)return!1;for(let s=0;s<n.length;s+=1){const o=n[s];if(Te._$testSelectorSegment(e,i,t,o,o.length-1,0))return!0}return!1}query(e,t){const n=[],i=(e,t,s)=>{if(this.testSelector(e,t)){if(s)return t;n.push(t)}if(C(t)){const n=t.getShadowRoot();if(n){const t=i(e,n,s);if(t&&s)return t}}const o=t.childNodes;for(let t=0;t<o.length;t+=1){const n=o[t];if(v(n)){const t=i(e,n,s);if(t&&s)return t}}return null},s=i(e,e,t);return t?s:n}}var Ie;e.StyleSegmentIndex=void 0,(Ie=e.StyleSegmentIndex||(e.StyleSegmentIndex={}))[Ie.MAIN=0]="MAIN",Ie[Ie.TEMPLATE_EXTRA=1]="TEMPLATE_EXTRA",Ie[Ie.ANIMATION_EXTRA=2]="ANIMATION_EXTRA",Ie[Ie.TEMP_EXTRA=3]="TEMP_EXTRA";const Re={mode:3,destroyed:!0};class Pe{constructor(){throw new Error("Element cannot be constructed directly")}_$initialize(e,t,n,i){this._$backendElement=t,this._$destroyOnDetach=!1,this._$nodeTreeContext=i,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 Le}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,i=t?`${t}--${n}`:n,s=this._$backendElement;s&&(s.id=i)}}r.writeExtraInfoToAttr&&(null===(t=this._$backendElement)||void 0===t||t.setAttribute("exparser:info-attr-id",n)),this._$mutationObserverTarget&&de.callAttrObservers(this,{type:"properties",target:this,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=Pe._$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=Pe._$updateSubtreeSlotNodes(this.parentNode,[this],n,n,this.parentIndex);null==t||t.removeSlotNodes();const i=this.containingSlot;null==t||t.updateContainingSlot();const s=this.containingSlot;Pe.insertChildReassign(this.parentNode,this,i,s,this.parentIndex+1),null==t||t.insertSlotNodes()}this._$mutationObserverTarget&&de.callAttrObservers(this,{type:"properties",target:this,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 b(this)?this:null}asVirtualNode(){return S(this)?this:null}asInstanceOf(e){return C(this)?this.asInstanceOf(e):null}getBackendContext(){const e=this._$nodeTreeContext;return e===Re?null:e}getBackendMode(){return this._$nodeTreeContext.mode}getBackendElement(){return this._$backendElement}destroyBackendElement(){this._$backendElement&&(this._$backendElement=null),this._$nodeTreeContext=Re}destroyBackendElementOnDetach(){this._$destroyOnDetach=!0}cancelDestroyBackendElementOnDetach(){this._$destroyOnDetach=!1}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&&de.callAttrObservers(this,{type:"properties",target:this,attributeName:"class"})}toggleNodeClass(e,t,n=0){var i;(null===(i=this.classList)||void 0===i?void 0:i.toggle(e,t,n))&&this._$mutationObserverTarget&&de.callAttrObservers(this,{type:"properties",target:this,attributeName:"class"})}setNodeStyle(e,t=0){if(this._$styleSegments[t]===e)return;this._$styleSegments[t]=e;const n=this._$styleSegments.join(";");this._$backendElement&&this._$backendElement.setAttribute("style",n),this._$mutationObserverTarget&&de.callAttrObservers(this,{type:"properties",target:this,attributeName:"style"})}static checkAndCallAttached(e){!function e(t){if(v(t)&&!t._$attached){if(t._$attached=!0,C(t)){t.triggerLifetime("attached",[]),t._$relation&&(t._$relation.triggerLinkEvent(2,!1),t._$relation.triggerLinkEvent(4,!1),t._$relation.triggerLinkEvent(0,!1)),t._$mutationObserverTarget&&de.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){const t=[];!function e(n){if(n._$destroyOnDetach&&t.push(n),v(n)&&n._$attached)if(C(n)&&n.triggerLifetime("beforeDetach",[]),n.childNodes.forEach(e),C(n)){const t=n._$placeholderHandlerRemover;t&&t();const i=n.getShadowRoot();i&&e(i),n._$attached=!1,n.triggerLifetime("detached",[]),n._$relation&&(n._$relation.triggerLinkEvent(2,!0),n._$relation.triggerLinkEvent(4,!0),n._$relation.triggerLinkEvent(0,!0)),n._$mutationObserverTarget&&de.callAttachObservers(n,{type:"attachStatus",target:n,status:"detached"})}else n._$attached=!1}(e);for(let e=0;e<t.length;e+=1)t[e].destroyBackendElement()}static checkAndCallMoved(e){!function e(t){if(v(t)&&t._$attached&&(t.childNodes.forEach(e),C(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 i;const s=e._$mutationObserverTarget;if(s&&(!(null===(i=s.childObservers)||void 0===i?void 0:i.empty)||s.hasSubtreeListeners())){const i=[n];let s;s="add"===t?{type:"childList",target:e,addedNodes:i}:"remove"===t?{type:"childList",target:e,removedNodes:i}:{type:"childList",target:e,addedNodes:i,removedNodes:i},de.callChildObservers(e,s)}}static hasSubtreeMutationObservers(e){var t;return(null===(t=e._$mutationObserverTarget)||void 0===t?void 0:t.hasSubtreeListeners())||!1}static _$insertChildReassignSlot(e,t,n,i){if(n)if(i){const e=[...n.slotNodes];for(let t=0;t<e.length;t+=1){const s=e[t];Pe._$spliceSlotNodes(n,0,1,void 0),Pe._$spliceSlotNodes(i,-1,0,[s]),Pe._$updateContainingSlot(s,i),s._$inheritSlots||Pe.insertChildReassign(s.parentNode,s,n,i,s.parentIndex)}}else{const e=[...n.slotNodes];for(let t=0;t<e.length;t+=1){const s=e[t];Pe._$spliceSlotNodes(n,0,1,void 0),Pe._$updateContainingSlot(s,i),s._$inheritSlots||Pe.insertChildReassign(s.parentNode,s,n,null,s.parentIndex)}}else{const n=[];e.forEachNodeInSpecifiedSlot(null,(e=>{if(null!==t){if((v(e)?e._$nodeSlot:"")!==t)return}n.push(e)}));for(let e=0;e<n.length;e+=1){const t=n[e];Pe._$spliceSlotNodes(i,-1,0,[t]),Pe._$updateContainingSlot(t,i),t._$inheritSlots||Pe.insertChildReassign(t.parentNode,t,null,i,t.parentIndex)}}}static insertChildReassign(e,t,n,i,s){if(n)if(i);else{const e=Pe.findNearestNonVirtual(n);if(e){const n=Pe.countNonVirtual(t);if(n){const[t,i]=n;{const n=t._$backendElement;for(let t=1;t<i;t+=1){const t=n.nextSibling;t&&e.removeChild(t)}i>0&&e.removeChild(n)}}}}i&&Pe.insertChildComposed(e,t,void 0,!1,s)}static findNearestNonVirtual(e){let t=e;for(;null==t?void 0:t._$virtual;)t=y(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 i=e=>{0===n&&(t=e),n+=1};var s;return v(s=e)&&s._$virtual?s.forEachNonVirtualComposedChild(i):i(s),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 i=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(!i(t[e]))return!1;return!0}return!0};return i(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 i=e=>{if(e._$inheritSlots){const t=e.childNodes;for(let e=0;e<t.length;e+=1)if(!i(t[e]))return!1;return!0}return e.containingSlot!==t||!1!==n(e)};return i(e)}static _$findFirstNonVirtualChild(e,t){const n=null!==e._$slotName,i=n?e.slotNodes:e.childNodes;if(t>=0&&t<i.length)for(let e=t;e<i.length;e+=1){let t=null;const s=e=>(t=e,!1),o=e=>{if(!n&&e._$inheritSlots){const t=e.childNodes;for(let e=0;e<t.length;e+=1)if(!1===o(t[e]))return!1}return e._$virtual?e.forEachNonVirtualComposedChild(s):s(e)};if(o(i[e]),t)return t}const s=e=>{if(!e._$virtual)return null;const t=e.containingSlot;if(null===t)return null;if(void 0!==t)return Pe._$findFirstNonVirtualChild(t,e.slotIndex+1);if(y(e))return s(e.getHostNode());const n=e.parentNode;return n?Pe._$findFirstNonVirtualChild(n,e.parentIndex+1):null};return s(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 Pe._$findFirstNonVirtualChild(n,e.slotIndex+1);const i=Pe._$findSlotNodeInsertPosition(n,e,t);return Pe._$findFirstNonVirtualChild(n,i)}let i=e;if(y(e))return i=e.getHostNode(),i._$virtual?Pe._$findFirstNonVirtualChild(i,i.parentIndex+1):null;const s=i.parentNode;return s?Pe._$findFirstNonVirtualChild(s,t):null}static insertChildComposed(e,t,n,i,s){var o,l,a;let d=!1,c=e;for(;null==c?void 0:c._$inheritSlots;)d=!0,c=c.parentNode;if(!c)return;const h=c,u=h._$nodeTreeContext;if(!u)return;let p;C(h)?h._$external?p=h.shadowRoot.slot:d=!0:(h._$virtual&&(d=!0),p=Pe.findNearestNonVirtual(h));let f=null;const $=(e,o)=>{const r=e||(o?Pe.findNearestNonVirtual(o):null);let l=0,a=null,c=null,h=null;if(t){const e=f||u.document.createDocumentFragment();f=e;const n=t=>{e.appendChild(t._$backendElement),c=e};Pe.forEachNodeInSpecificSlot(t,o,(e=>{h||(h=e),e._$virtual?e.forEachNonVirtualComposedChild(n):n(e)}))}if(r){if((n||d)&&(i&&n?(Pe.forEachSlotContentInSpecificSlot(n,o,(e=>{if(v(e)){const t=Pe.countNonVirtual(e);t&&(a||(a=t[0]),l+=t[1])}else a||(a=e),l+=1;return!0})),0===l&&c&&h&&(a=Pe._$findFirstNonVirtualSibling(void 0===o?t:h,s+1))):c&&h&&(a=Pe._$findFirstNonVirtualSibling(void 0===o?t:h,s))),c)if(a){const e=a._$backendElement;r.insertBefore(c,e);for(let t=1;t<l;t+=1){const t=e.nextSibling;t&&r.removeChild(t)}l>0&&r.removeChild(e)}else r.appendChild(c);else if(l>0){const e=a._$backendElement;for(let t=1;t<l;t+=1){const t=e.nextSibling;t&&r.removeChild(t)}l>0&&r.removeChild(e)}}else f=null};if(void 0!==p)null===p||(d||v(t)&&t._$virtual||v(n)&&n._$virtual?$(p,void 0):i?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||i&&n&&n._$inheritSlots){const e=new Set;i&&n&&Pe.forEachSlotContentInSlot(n,((t,n)=>{e.add(n)})),t&&Pe.forEachSlotContentInSlot(t,((t,n)=>{e.add(n)})),e.forEach((e=>$(null,e)))}else t&&$(null,t.containingSlot),!i||!n||t&&n.containingSlot===t.containingSlot||$(null,n.containingSlot);r.writeExtraInfoToAttr&&(i&&v(n)&&(null===(o=n._$backendElement)||void 0===o||o.removeAttribute("exparser:info-in-slot-of")),v(t)&&(C(e)?null===(l=t._$backendElement)||void 0===l||l.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,i,s){if(!t||!n)return;let o=e,r=null,l=null;const a=(e,t)=>{if(e._$subtreeSlotStart){const n=e.childNodes;let i=t+1,s=n[i];for(;s&&!s._$subtreeSlotStart;)i+=1,s=n[i];return void(s?(l=s._$subtreeSlotStart,r=l.prev):(r=e._$subtreeSlotEnd,r&&(l=r.next)))}let n=e,i=e.parentNode;for(;i&&!i._$subtreeSlotStart;)n=i,i=i.parentNode;i&&a(i,n.parentIndex)};for(a(o,i),r&&(r.next=t,t.prev=r),l&&(l.prev=n,n.next=l);o;){let e=!1;if(o._$subtreeSlotStart?o._$subtreeSlotStart===l?(o._$subtreeSlotStart=t,e=!0):o._$subtreeSlotEnd===r&&(o._$subtreeSlotEnd=n,e=!0):(o._$subtreeSlotStart=t,o._$subtreeSlotEnd=n,e=!0),!e||!o.parentNode)break;o=o.parentNode}const d=o.ownerShadowRoot;(null==d?void 0:d.isConnected(o))&&d._$applySlotsInsertion(t,n,s)}static _$updateSubtreeSlotsRemoval(e,t,n,i){if(!t||!n)return;let s=e;const o=t.prev,r=n.next;for(o&&(o.next=r,t.prev=null),r&&(r.prev=o,n.next=null);s;){let e=!1;if(s._$subtreeSlotStart===t&&s._$subtreeSlotEnd===n&&(s._$subtreeSlotStart=s._$subtreeSlotEnd=null,e=!0),s._$subtreeSlotStart===t?(s._$subtreeSlotStart=r,e=!0):s._$subtreeSlotEnd===n&&(s._$subtreeSlotEnd=o,e=!0),!e||!s.parentNode)break;s=s.parentNode}const l=s.ownerShadowRoot;(null==l?void 0:l.isConnected(s))&&l._$applySlotsRemoval(t,n,i)}static _$updateSubtreeSlotsReplacement(e,t,n,i,s,o,r){if(!t||!n)return void Pe._$updateSubtreeSlotsRemoval(e,i,s,r);if(!i||!s)return void Pe._$updateSubtreeSlotsInsertion(e,t,n,o,r);let l=e;const a=i.prev,d=s.next;for(a&&(a.next=t,t.prev=a,i.prev=null),d&&(d.prev=n,n.next=d,s.next=null);l;){let e=!1;if(l._$subtreeSlotStart===i&&(l._$subtreeSlotStart=t,e=!0),l._$subtreeSlotEnd===s&&(l._$subtreeSlotEnd=n,e=!0),!e||!l.parentNode)break;l=l.parentNode}const c=l.ownerShadowRoot;(null==c?void 0:c.isConnected(l))&&(c._$applySlotsRemoval(i,s,!1),c._$applySlotsInsertion(t,n,r))}static _$updateSubtreeSlotNodes(e,t,n,i,s){if(!n&&!i)return;const o=null==n?void 0:n.getSlotMode(),r=null==i?void 0:i.getSlotMode();if(!(void 0!==o&&0!==o||void 0!==r&&0!==r))return;if(!(void 0!==o&&1!==o||void 0!==r&&1!==r)){let e=-1,o=0,r=-1;const l=[],a=t[0].containingSlot,d=null==n?void 0:n.getContainingSlot(t[0]);for(let n=0;n<t.length;n+=1){const i=t[n];Pe.forEachNodeInSlot(i,(t=>{a&&(o?o+=1:(e=t.slotIndex,o=1)),l.push(t)}))}if(d&&l.length){const e=l[0];r=Pe._$findSlotNodeInsertPosition(d,e,s)}return{updateContainingSlot:()=>{for(let e=l.length-1;e>=0;e-=1){const t=l[e];Pe._$updateContainingSlot(t,d)}},removeSlotNodes:()=>{i&&a&&o&&Pe._$spliceSlotNodes(a,e,o,void 0)},insertSlotNodes:()=>{n&&d&&l.length&&Pe._$spliceSlotNodes(d,r,0,l)}}}const l=new Map,a=new Map,d=[];for(let e=0;e<t.length;e+=1){const i=t[e];Pe.forEachNodeInSlot(i,((e,t)=>{const i=0!==o?null==n?void 0:n.getContainingSlot(e):void 0;if(t){const n=a.get(t);n?n.count+=1:a.set(t,{start:e.slotIndex,count:1})}if(i){const t=l.get(i);t?t.nodes.push(e):l.set(i,{nodes:[e],insertPos:-1})}d.push([e,i])}))}if(n&&l.size){const e=l.entries();for(let t=e.next();!t.done;t=e.next()){const[e,{nodes:n}]=t.value,i=n[0];t.value[1].insertPos=Pe._$findSlotNodeInsertPosition(e,i,s)}}return{updateContainingSlot:()=>{for(let e=d.length-1;e>=0;e-=1){const[t,n]=d[e];Pe._$updateContainingSlot(t,n)}},removeSlotNodes:()=>{if(i&&a.size){const e=a.entries();for(let t=e.next();!t.done;t=e.next()){const[e,{start:n,count:i}]=t.value;Pe._$spliceSlotNodes(e,n,i,void 0)}}},insertSlotNodes:()=>{if(n&&l.size){const e=l.entries();for(let t=e.next();!t.done;t=e.next()){const[e,{nodes:n,insertPos:i}]=t.value;Pe._$spliceSlotNodes(e,i,0,n)}}}}}static insertChildSingleOperation(e,t,n,i){var s,o,r,l;if(t&&e.ownerShadowRoot!==t.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");let a=n;const d=a>=0?e.childNodes[a]:void 0;let c,h;if(c=!!i&&(!!d&&t!==d),!c&&!t)return;if(t){if(h=t.parentNode,h){const n=h.childNodes,i=t.parentIndex;n.splice(i,1);for(let e=i;e<n.length;e+=1)n[e].parentIndex=e;t.parentIndex=-1,h===e&&i<a&&(a-=1);const s=Pe._$updateSubtreeSlotNodes(e,[t],null,Pe._$getParentHostShadowRoot(h),a);null==s||s.removeSlotNodes(),null==s||s.updateContainingSlot()}t.parentNode=e,v(t)&&h!==e&&(h&&(null===(s=h._$mutationObserverTarget)||void 0===s||s.detachChild(t)),null===(o=e._$mutationObserverTarget)||void 0===o||o.attachChild(t))}else h=null;const u=Pe._$getParentHostShadowRoot(e),p=t?Pe._$updateSubtreeSlotNodes(e,[t],u,null,a):null,f=d&&c?Pe._$updateSubtreeSlotNodes(e,[d],null,u,a):null;null==p||p.updateContainingSlot(),null==f||f.removeSlotNodes(),Pe.insertChildComposed(e,t,d,c,a),null==p||p.insertSlotNodes(),null==f||f.updateContainingSlot(),c&&d&&(v(d)&&(null===(r=e._$mutationObserverTarget)||void 0===r||r.detachChild(d)),d.parentNode=null,d.parentIndex=-1);const $=e.childNodes;if(t)if(a<0)$.push(t),t.parentIndex=$.length-1;else if(c)$[a]=t,t.parentIndex=a;else{$.splice(a,0,t);for(let e=a;e<$.length;e+=1)$[e].parentIndex=e}else if(c){$.splice(a,1);for(let e=a;e<$.length;e+=1)$[e].parentIndex=e}const _=t?t._$subtreeSlotStart:null,g=t?t._$subtreeSlotEnd:null,m=d?d._$subtreeSlotStart:null,b=d?d._$subtreeSlotEnd:null;t?(h&&Pe._$updateSubtreeSlotsRemoval(h,_,g,!0),c?Pe._$updateSubtreeSlotsReplacement(e,_,g,m,b,a,!!h):Pe._$updateSubtreeSlotsInsertion(e,_,g,a,!!h)):c&&d&&Pe._$updateSubtreeSlotsRemoval(e,m,b,!1),null===(l=e.ownerShadowRoot)||void 0===l||l._$markIdCacheDirty(),c&&(Pe.checkAndCallDetached(d),Pe.checkChildObservers(e,"remove",d)),t&&((null==h?void 0:h._$attached)?e._$attached?Pe.checkAndCallMoved(t):Pe.checkAndCallDetached(t):e._$attached&&Pe.checkAndCallAttached(t),h===e?Pe.checkChildObservers(e,"move",t):(h&&Pe.checkChildObservers(h,"remove",t),Pe.checkChildObservers(e,"add",t)))}static insertChildBatchRemoval(e,t,n){var i,s;e.childNodes[t];let o=e;for(;null==o?void 0:o._$inheritSlots;)o=o.parentNode;const r=C(o)&&!o._$external?o.shadowRoot:null,l=e.childNodes,a=l.splice(t,n);for(let e=t;e<l.length;e+=1)l[e].parentIndex=e;const d=Pe._$updateSubtreeSlotNodes(e,a,null,r,t);null==d||d.removeSlotNodes();for(let t=n-1;t>=0;t-=1)Pe.insertChildComposed(e,null,a[t],!0,t);for(let t=0;t<n;t+=1){const n=a[t];n.parentNode=null,n.parentIndex=-1,v(n)&&(null===(i=e._$mutationObserverTarget)||void 0===i||i.detachChild(n))}null==d||d.updateContainingSlot();let c=null,h=null;for(let e=0;e<n;e+=1){const t=a[e];c||(c=t._$subtreeSlotStart),t._$subtreeSlotEnd&&(h=t._$subtreeSlotEnd)}Pe._$updateSubtreeSlotsRemoval(e,c,h,!1),null===(s=e.ownerShadowRoot)||void 0===s||s._$markIdCacheDirty();for(let t=0;t<n;t+=1){const n=a[t];Pe.checkAndCallDetached(n),Pe.checkChildObservers(e,"remove",n)}}static insertChildBatchInsertion(e,t,n){var i,s;const o=n>=0?e.childNodes[n]:void 0;let r=e;for(;null==r?void 0:r._$inheritSlots;)r=r.parentNode;const l=C(r)&&!r._$external?r.shadowRoot:null;for(let n=0;n<t.length;n+=1){const s=t[n];if(e.ownerShadowRoot!==s.ownerShadowRoot)throw new Error("Cannot move the node from one shadow tree to another shadow tree.");if(s.parentNode)throw new Error("Cannot batch-insert the node which already has a parent.");s.parentNode=e,v(s)&&(null===(i=e._$mutationObserverTarget)||void 0===i||i.attachChild(s))}const a=Pe._$updateSubtreeSlotNodes(e,t,l,null,n);null==a||a.updateContainingSlot();{const i=n>=0?n:e.childNodes.length;for(let n=0;n<t.length;n+=1){const s=t[n];Pe.insertChildComposed(e,s,o,!1,i)}}null==a||a.insertSlotNodes();const d=e.childNodes;if(o){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 c=null,h=null;for(let e=0;e<t.length;e+=1){const n=t[e],i=n._$subtreeSlotStart,s=n._$subtreeSlotEnd;i&&(h?(i.prev=h,h.next=i,h=s):(c=i,h=s))}Pe._$updateSubtreeSlotsInsertion(e,c,h,n+t.length-1,!1),null===(s=e.ownerShadowRoot)||void 0===s||s._$markIdCacheDirty();for(let n=0;n<t.length;n+=1){const i=t[n];e._$attached&&Pe.checkAndCallAttached(i),Pe.checkChildObservers(e,"add",i)}}static insertChildPlaceholderReplace(e,t,n){var i,s,o,r,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 a=e.childNodes[t];if(!v(a))throw new Error("Cannot replace on text nodes.");if(null!==a._$slotName||null!==n._$slotName)throw new Error("Cannot replace on slot nodes.");if(a===n)return;const d=a.childNodes;for(let t=0;t<d.length;t+=1){const o=d[t];o.parentNode=n,v(o)&&(null===(i=a._$mutationObserverTarget)||void 0===i||i.detachChild(o),null===(s=e._$mutationObserverTarget)||void 0===s||s.attachChild(o))}a.childNodes=[],a.parentNode=null,a.parentIndex=-1,n.parentNode=e;const c=a.containingSlot,h=a.slotIndex;void 0!==c&&(Pe._$updateContainingSlot(n,c),c&&Pe._$spliceSlotNodes(c,h,1,void 0));const u=d.length?Pe._$updateSubtreeSlotNodes(n,d,Pe._$getParentHostShadowRoot(n),Pe._$getParentHostShadowRoot(a),0):null;null==u||u.updateContainingSlot(),null==u||u.removeSlotNodes(),e.childNodes[t]=n,n.parentIndex=t,Pe.insertChildComposed(e,n,a,!0,t);for(let e=0;e<d.length;e+=1){const t=d[e];Pe.insertChildComposed(n,t,void 0,!1,e)}null==u||u.insertSlotNodes(),void 0!==c&&(Pe._$updateContainingSlot(a,void 0),c&&Pe._$spliceSlotNodes(c,h,0,[n])),n._$subtreeSlotStart=a._$subtreeSlotStart,n._$subtreeSlotEnd=a._$subtreeSlotEnd,null===(o=e._$mutationObserverTarget)||void 0===o||o.detachChild(a),null===(r=e._$mutationObserverTarget)||void 0===r||r.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){Pe.checkAndCallDetached(a),Pe.checkChildObservers(e,"remove",a),Pe.checkAndCallAttached(n),Pe.checkChildObservers(e,"add",n);for(let t=0;t<d.length;t+=1){const n=d[t];Pe.checkAndCallMoved(n),Pe.checkChildObservers(e,"move",n)}}}appendChild(e){Pe.insertChildSingleOperation(this,e,this.childNodes.length,!1)}insertChildAt(e,t){Pe.insertChildSingleOperation(this,e,t,!1)}insertBefore(e,t){const n=t?t.parentIndex:-1;Pe.insertChildSingleOperation(this,e,n,!1)}removeChildAt(e){Pe.insertChildSingleOperation(this,null,e,!0)}removeChild(e){const t=e.parentIndex;Pe.insertChildSingleOperation(this,null,t,!0)}replaceChildAt(e,t){Pe.insertChildSingleOperation(this,e,t,!0)}replaceChild(e,t){const n=t.parentIndex;Pe.insertChildSingleOperation(this,e,n,!0)}insertChildren(e,t){Pe.insertChildBatchInsertion(this,e,t)}removeChildren(e,t){Pe.insertChildBatchRemoval(this,e,t)}selfReplaceWith(e){const t=this.parentNode;t&&Pe.insertChildPlaceholderReplace(t,this.parentIndex,e)}static _$generateIdMap(e){const t=Object.create(null);return function e(n){if(v(n)){const i=n._$nodeId;i&&(t[i]||(t[i]=n)),n.childNodes.forEach(e)}}(e),t}triggerEvent(e,t,n){De.triggerEvent(this,e,t,n)}dispatchEvent(e){De.dispatchEvent(this,e)}_$setListenerStats(e,t,n={}){if(!this._$backendElement)return;const i=!!n.capture||!!n.useCapture;let s;switch(t){case 2:s=0;break;case 4:s=1;break;case 3:s=2;break;default:return}this._$nodeTreeContext&&this._$nodeTreeContext.setListenerStats(this._$backendElement,e,i,s)}addListener(e,t,n){const i=this._$eventTarget.addListener(e,t,n);this._$setListenerStats(e,i,n),C(this)&&this._$definition._$options.listenerChangeLifetimes&&this.triggerLifetime("listenerChange",[!0,e,t,n])}removeListener(e,t,n){const i=this._$eventTarget.removeListener(e,t,n);1!==i&&(this._$setListenerStats(e,i,n),C(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 i=this._$backendElement;i&&(!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t||null==t?"":String(t)))}removeAttribute(e){this._$nodeAttributes&&delete this._$nodeAttributes[e];const t=this._$backendElement;t&&t.removeAttribute(e)}setDataset(e,t){this.dataset[e]=t}setMark(e,t){if(this._$marks)this._$marks[e]=t;else{const n={};n[e]=t,this._$marks=n}}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),Pe.checkAndCallAttached(e)}static pretendAttached(e){e._$attached||Pe.checkAndCallAttached(e)}static pretendDetached(e){e._$attached&&Pe.checkAndCallDetached(e)}static isAttached(e){return e._$attached}static setSlotName(e,t){if(e._$inheritSlots)throw new Error("Slot-inherit mode is not usable in slot element");const n=t?String(t):"",i=e._$slotName;if(i===n)return;const s=null===i;e._$slotName=n,s&&(e._$subtreeSlotStart=e._$subtreeSlotEnd={value:e,prev:null,next:null});const o=e.ownerShadowRoot;if(o)if(s){3===o.getSlotMode()&&(e._$slotValues=Object.create(null)),e.slotNodes=[];const t=e.parentNode;t&&Pe._$updateSubtreeSlotsInsertion(t,e._$subtreeSlotStart,e._$subtreeSlotEnd,e.parentIndex,!1)}else o.isConnected(e)&&o._$applySlotRename(e,n,i)}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");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=Pe._$getParentHostShadowRoot(e.parentNode);if(n){const t=Pe._$updateSubtreeSlotNodes(e.parentNode,[e],n,n,e.parentIndex),i=e.containingSlot;null==t||t.updateContainingSlot(),null==t||t.removeSlotNodes();const s=e.containingSlot,o=e=>{if(v(e)&&e._$inheritSlots)for(let t=0;t<e.childNodes.length;t+=1)o(e.childNodes[t]);else Pe.insertChildReassign(e.parentNode,e,i,s,e.parentIndex)};o(e),null==t||t.insertSlotNodes()}}static _$updateContainingSlot(e,t){e.containingSlot=t}static _$spliceSlotNodes(e,t,n,i){const s=e.slotNodes=e.slotNodes||[],o=t>=0&&t<s.length;if(null==i?void 0:i.length)if(o){for(let e=t;e<t+n;e+=1)s[e].slotIndex=void 0;s.splice(t,n,...i);for(let e=t;e<s.length;e+=1)s[e].slotIndex=e}else{const e=s.length;s.push(...i);for(let t=e;t<s.length;t+=1)s[t].slotIndex=t}else if(n){for(let e=t;e<t+n;e+=1)s[e].slotIndex=void 0;s.splice(t,n);for(let e=t;e<s.length;e+=1)s[e].slotIndex=e}}static _$findSlotNodeInsertPosition(e,t,n){const i=e.ownerShadowRoot.getHostNode(),s=e=>{let t=0,n=e;for(;n&&n!==i;)t+=1,n=n.parentNode;return t},o=s(t),r=(e,t,n,i,s,o,l)=>{if(e===i)return 0;if(e.parentNode===i.parentNode)return t-(-1===s?l:s);if(o<n){const t=e.parentNode;return r(t,t.parentIndex,n-1,i,s,o,l)}const a=n<o?e:e.parentNode,d=n<o?n:n-1,c=i.parentNode,h=o-1,u=r(a,a.parentIndex,d,c,c.parentIndex,h,l);return 0===u?-1:u},l=e.slotNodes;let a=l.length-1;for(;a>=0;a-=1){const e=l[a];if(r(e,e.parentIndex,s(e),t,t.parentIndex,o,n>=0?n-.5:l.length)<0)break}return a+1}getComposedParent(){if(y(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(C(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 i=0;i<n.length;i+=1){const s=n[i];if(!1===e(s))return!1;if(s._$inheritSlots&&!t(s.childNodes))return!1}return!0};return t(this.childNodes)}forEachNonVirtualComposedChild(e){if(this._$inheritSlots)return!0;const t=t=>t._$virtual?t.forEachNonVirtualComposedChild(e):!1!==e(t);if(C(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 i=0;i<e.length;i+=1){const s=e[i];if(!t(s))return!1;if(s._$inheritSlots&&!n(s.childNodes))return!1}return!0};return n(this.childNodes)}static parseSelector(e){return new Te(e)}querySelector(e){return(e instanceof Te?e:new Te(e)).query(this,!0)}querySelectorAll(e){return(e instanceof Te?e:new Te(e)).query(this,!1)}static matchSelector(e,t){return(e instanceof Te?e:new Te(e)).testSelector(null,t)}matchSelector(e,t){return(e instanceof Te?e:new Te(e)).testSelector(this,t)}getBoundingClientRect(e){var t;const n=this._$backendElement;if(n){const i=n,s=(null===(t=i.getBoundingClientRect)||void 0===t?void 0:t.call(i))||{left:0,top:0,width:0,height:0};setTimeout((()=>{e(s)}),0)}else setTimeout((()=>{e({left:0,top:0,width:0,height:0})}),0)}getScrollOffset(e){const t=this._$backendElement;if(t){const n=t,i={scrollLeft:n.scrollLeft||0,scrollTop:n.scrollTop||0,scrollWidth:n.scrollWidth||0,scrollHeight:n.scrollHeight||0};setTimeout((()=>{e(i)}),0)}else setTimeout((()=>{e({scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0})}),0)}createIntersectionObserver(e,t,n,i){const s=this._$backendElement;if(s){if(e&&!e._$backendElement)return null;{const o=this._$nodeTreeContext;return o&&o.createIntersectionObserver?o.createIntersectionObserver(s,(null==e?void 0:e._$backendElement)||null,t,n,i):null}}return null}getContext(e){const t=this._$backendElement;if(t){const n=this._$nodeTreeContext;(null==n?void 0:n.getContext)?n.getContext(t,e):e(null)}}}var Be;Pe.isElement=v,Pe._$getParentHostShadowRoot=e=>{let t=e;for(;null==t?void 0:t._$inheritSlots;)t=t.parentNode;return C(t)&&!t._$external?t.shadowRoot:null},Pe.prototype[p]=!0,e.RelationType=void 0,(Be=e.RelationType||(e.RelationType={}))[Be.Ancestor=0]="Ancestor",Be[Be.Descendant=1]="Descendant",Be[Be.ParentNonVirtualNode=2]="ParentNonVirtualNode",Be[Be.ChildNonVirtualNode=3]="ChildNonVirtualNode",Be[Be.ParentComponent=4]="ParentComponent",Be[Be.ChildComponent=5]="ChildComponent";const je=(e,t,n,i)=>{const s=e=>"function"==typeof e?e:(void 0!==e&&L(`the "${n}" relation listener is not a function (when preparing behavior "${t}").`),null);let o;if("parent"===i.type)o=4;else if("child"===i.type)o=5;else if("parent-common-node"===i.type)o=2;else if("child-common-node"===i.type)o=3;else if("ancestor"===i.type)o=0;else{if("descendant"!==i.type){const e=i.type;return L(`the "${n}" relation has an invalid relation type "${e}" (when preparing behavior "${t}").`),null}o=1}let r=null;if(i.target instanceof _t)r=i.target.behavior;else if(i.target instanceof St||i.target instanceof V)r=i.target;else{const s=String(i.target||n),o=e.getComponentByUrlWithoutDefault(s,t);if(o)r=o.behavior;else{const t=e.getGlobalUsingComponent(s);"object"==typeof t&&null!==t&&(r=t.behavior)}}return r?{target:r,type:o,linked:s(i.linked),linkChanged:s(i.linkChanged),unlinked:s(i.unlinked),linkFailed:s(i.linkFailed)}:(L(`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 i=t.definitions[e];if(i){const t=new Array(i.length);for(let e=0;e<i.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,i=this._$group.keyMap,s=e.type;n[s]?(i[t]=[s,n[s].length],n[s].push(e)):(i[t]=[s,0],n[s]=[e]);const o=this._$links;return void 0===o[s]?o[s]=[null]:o[s].push(null),t}triggerLinkEvent(e,t){var n,i;const s=this._$comp,o=this._$links,r=null===(n=this._$group)||void 0===n?void 0:n.definitions[e];if(r)for(let n=0;n<r.length;n+=1){const l=o[e],a=l[n];let d=null;const c=r[n],u=c.target;if(!t){let t=s;for(;;){const n=t.parentNode;if(!n)break;if(t=n,!S(t)){if(C(t)){if(t.hasBehavior(u)){const n=t._$relation;if(n){let s;s=4===e?5:0===e?1:3;const o=null===(i=n._$group)||void 0===i?void 0:i.definitions[s];if(o){for(let e=0;e<o.length;e+=1){const n=o[e];if(n.target&&this._$comp.hasBehavior(n.target)){d={target:t,def:n};break}}if(d)break}}}if(4===e)break}if(2===e)break}}}if(l[n]=d,a){const e=a.target,t=a.def;d&&a.target===d.target&&a.def===d.def?(t.linkChanged&&h("Relation Link Changed Callback",t.linkChanged,e.getMethodCaller(),[s.getMethodCaller()],e),c.linkChanged&&h("Relation Link Changed Callback",c.linkChanged,s.getMethodCaller(),[e.getMethodCaller()],s)):(t.unlinked&&h("Relation Unlinked Callback",t.unlinked,e.getMethodCaller(),[s.getMethodCaller()],e),c.unlinked&&h("Relation Unlinked Callback",c.unlinked,s.getMethodCaller(),[e.getMethodCaller()],s))}if(d){const e=d.target,t=d.def;a&&a.target===d.target&&a.def===d.def||(t.linked&&h("Relation Linked Callback",t.linked,e.getMethodCaller(),[s.getMethodCaller()],e),c.linked&&h("Relation Linked Callback",c.linked,s.getMethodCaller(),[e.getMethodCaller()],s))}t||d||!c.linkFailed||h("Relation Link Failed Callback",c.linkFailed,s.getMethodCaller(),[],s)}}getLinkedTargets(e){var t,n,i,s;const o=null===(t=this._$group)||void 0===t?void 0:t.keyMap[e];if(!o)return L(`no relation "${String(e)}" found.`),[];const[r,l]=o;if(4===r||2===r||0===r){const e=null===(n=this._$links[r])||void 0===n?void 0:n[l];return e?[e.target]:[]}const a=[],d=this._$comp,c=null===(s=null===(i=this._$group)||void 0===i?void 0:i.definitions[r])||void 0===s?void 0:s[l],h=e=>{const t=e.childNodes;for(let e=0;e<t.length;e+=1){const n=t[e];if(v(n))if(S(n))h(n);else if(C(n)){if(n._$relation){let e;if(e=5===r?n._$relation._$links[4]:1===r?n._$relation._$links[0]:n._$relation._$links[2],e)for(let t=0;t<e.length;t+=1){const i=e[t];if(i&&i.target===d&&i.def===c){a.push(n);break}}}1===r&&h(n)}else 5!==r&&1!==r||h(n)}};return h(this._$comp),a}}class Fe extends Pe{constructor(){throw new Error("Element cannot be constructed directly")}static create(e,t,n,i){var s,o;const l=Object.create(Fe.prototype);l.is=e,l.stylingName=null!=n?n:e,l._$placeholderHandlerRemover=i;const a=t.getBackendContext();let d=null;a&&(d=a.document.createElement(e)),l._$initialize(!1,d,t,t._$nodeTreeContext);const c=t.getHostNode(),h=c.getComponentOptions(),u=null!==(s=h.styleScope)&&void 0!==s?s:j.globalScope(),p=null!==(o=h.extraStyleScope)&&void 0!==o?o:void 0,f=c._$behavior.ownerSpace.styleScopeManager;if(l.classList=new U(l,void 0,c.classList,u,p,f),d){if(r.writeExtraInfoToAttr){const e=f.queryName(u);e&&d.setAttribute("exparser:info-class-prefix",`${e}--`)}t.getBackendContext().associateValue(d,l)}return l}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 i=null===(n=this._$modelBindingListeners)||void 0===n?void 0:n[e];i&&i.call(this,t)};this.getBackendContext().setModelBindingStat(t,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 i=null===(n=this._$modelBindingListeners)||void 0===n?void 0:n[t];i&&i.call(this,e)}})),e}}Fe.isNativeNode=b,Fe.prototype[f]=!0;class Ge{constructor(e,t){this._$slotElement=null,this._$destroyOnDetach=!1,this._$subtreeSlotStart=null,this._$subtreeSlotEnd=null,this._$text=String(e);let n=null;const i=t.getBackendContext();i&&(n=i.document.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}asInstanceOf(){return null}destroyBackendElement(){this._$backendElement&&(this._$backendElement=null)}destroyBackendElementOnDetach(){this._$destroyOnDetach=!0}getBackendElement(){return this._$backendElement}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&&(this._$backendElement.textContent=this._$text),de.callTextObservers(this,{type:"characterData",target:this}))}}Ge.isTextNode=m,Ge.prototype[u]=!0;class Ve extends Pe{constructor(){throw new Error("Element cannot be constructed directly")}_$initializeVirtual(e,t,n){this.is=String(e),this._$initialize(!0,null,t,t._$nodeTreeContext)}static create(e,t){const n=Object.create(Ve.prototype);return n._$initializeVirtual(e,t,t.getBackendContext()),n}}var We;Ve.isVirtualNode=S,Ve.prototype[$]=!0,function(e){e[e.Direct=0]="Direct",e[e.Single=1]="Single",e[e.Multiple=2]="Multiple",e[e.Dynamic=3]="Dynamic"}(We||(We={}));class He extends Ve{constructor(){throw new Error("Element cannot be constructed directly")}static createShadowRoot(e){const t=Object.create(He.prototype);t.is="shadow",t._$idMap=null;let n=1;const i=e.getComponentOptions();return i.multipleSlots?n=2:i.dynamicSlots?n=3:i.directSlots&&(n=0),t._$slotMode=n,1===n?t._$singleSlot=null:2===n?(t._$slots=Object.create(null),t._$slotsList=Object.create(null)):3===n&&(t._$dynamicSlotsInserted=!1,t._$dynamicSlots=new Map,t._$requiredSlotValueNames=[],t._$propertyPassingDeepCopy=Ce(i.propertyPassingDeepCopy),t._$insertDynamicSlotHandler=void 0,t._$removeDynamicSlotHandler=void 0,t._$updateDynamicSlotHandler=void 0),t._$backendShadowRoot=null,t._$initialize(!0,null,t,e._$nodeTreeContext),t._$host=e,e.shadowRoot=t,t}getHostNode(){return this._$host}createTextNode(e=""){return new Ge(e,this)}createNativeNode(e){return Fe.create(e,this)}createVirtualNode(e="virtual"){return Ve.create(e,this)}createNativeNodeWithInit(e,t,n,i){const s=Fe.create(e,this,t,n);return null==i||i(s),s}createComponent(e,t,n,i,s){const o=this._$host,r=o._$behavior,l=o._$genericImpls,a=r.ownerSpace,d=void 0===t?e:t,c=[r._$using[d],l&&l[d]];for(let t=0;t<c.length;t+=1){const d=c[t];if(null==d)continue;if("string"==typeof d)return this.createNativeNodeWithInit(d,e,void 0,s);let h,u;if(d.final)h=d.final;else if(null!==d.placeholder){h=$t(d.placeholder,a,d.source,l);const e=d.waiting;i&&e&&(e.add(i),e.hintUsed(o),u=()=>{e.remove(i)})}if("string"==typeof h)return this.createNativeNodeWithInit(h,e,u,s);if(h)return vt._$advancedCreate(e,h,this,null,ft(h,r,o,n),u,s)}let h=a.getGlobalUsingComponent(d);if(null===h&&a._$allowUnusedNativeNode&&""!==d&&(h=d),!h){if(h=a.getDefaultComponent(),!h)throw new D(`Cannot find component "${d}"`,void 0,this._$host);L(`Cannot find component "${d}", using default component.`,this._$host)}return"string"==typeof h?this.createNativeNodeWithInit(h,e,void 0,s):vt._$advancedCreate(e,h,this,null,ft(h,r,o,n),void 0,s)}createComponentByDef(e,t){return vt._$advancedCreate(e,t,this,null,null,void 0)}createComponentOrNativeNode(e,t,n){const i=this._$host,s=i._$behavior,o=s.ownerSpace,r=o.getGlobalUsingComponent(e);if("string"==typeof r)return this.createNativeNodeWithInit(r,e,void 0,n);if(r)return vt._$advancedCreate(e,r,this,null,ft(r,s,i,t),void 0,n);if(o._$allowUnusedNativeNode){const t=Fe.create(e,this);return null==n||n(t),t}throw new D(`Unknown tag name ${e}`,"[render]",i)}checkComponentPlaceholder(e){var t;let n;const i=this._$host._$behavior._$using[e];if(void 0!==i)n=i;else{const i=null===(t=this._$host._$genericImpls)||void 0===t?void 0:t[e];if(!i)return;n=i}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=Pe._$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 i=n.value;(i._$slotName||"")===e&&t.push(i)}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 i=n._$slotElement;if((null==i?void 0:i.ownerShadowRoot)===this)return i}if(2===n){let t;return t=v(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(!Pe.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 i=n[e];if(!1===t(i))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(!Pe.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 i=n[e];if(!i._$inheritSlots&&!1===t(i))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 i=this._$slotsList,s=this._$slots;if(i[t]){const n=i[t];let s={next:n},o=!0;for(let t=this._$subtreeSlotStart;t&&s.next&&t.value!==e;t=t.next)t.value===s.next.value&&(o=!1,s=s.next);if(o)i[t]=n.prev={value:e,prev:null,next:n};else{const t=s.next;s.next={value:e,prev:s,next:t},t&&(t.prev=s.next)}}else i[t]={value:e,prev:null,next:null};const o=s[t],r=i[t].value;o!==r&&(s[t]=r,Pe._$insertChildReassignSlot(this,t,o||null,r))}_$applyMultipleSlotsRemoval(e,t,n){const i=this._$slotsList,s=this._$slots;let o=i[t]||null;for(;o&&o.value!==e;o=o.next);if(!o)return;const r=o.prev,l=o.next;r&&(r.next=l),l&&(l.prev=r);if(!!r)return;const a=l;if(a){const o=a.value;i[t]=a,n||(s[t]=o,Pe._$insertChildReassignSlot(this,t,e,o))}else delete i[t],n||(delete s[t],Pe._$insertChildReassignSlot(this,t,e,null))}_$applySlotRename(e,t,n){const i=this._$slotMode;if(1!==i&&0!==i){if(2===i)return this._$applyMultipleSlotsRemoval(e,n,!1),void this._$applyMultipleSlotInsertion(e,t,!1);if(3===i){if(!this._$dynamicSlotsInserted)return;const n=this._$insertDynamicSlotHandler,i=this._$removeDynamicSlotHandler;this._$dynamicSlots.set(e,{updatePathTree:void 0}),null==i||i([e]),null==n||n([{slot:e,name:t,slotValues:e._$slotValues}])}}}_$applySlotsInsertion(e,t,n){const i=this._$slotMode;if(0!==i){if(1===i){const e=this._$singleSlot,t=this._$subtreeSlotStart.value;if(e===t)return;return this._$singleSlot=t,void Pe._$insertChildReassignSlot(this,null,e||null,t)}if(2!==i){if(3===i){if(n)return;if(!this._$dynamicSlotsInserted)return;const i=this._$insertDynamicSlotHandler,s=[];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}),s.push({slot:e,name:t,slotValues:e._$slotValues})}null==i||i(s)}}else for(let i=e;i&&i!==t.next;i=i.next){const e=i.value,t=e._$slotName;this._$applyMultipleSlotInsertion(e,t,n)}}}_$applySlotsRemoval(e,t,n){var i;const s=this._$slotMode;if(0!==s){if(1===s){if(n)return;const e=this._$singleSlot,t=null===(i=this._$subtreeSlotStart)||void 0===i?void 0:i.value;if(e===t)return;return this._$singleSlot=t,void Pe._$insertChildReassignSlot(this,null,e||null,t||null)}if(2!==s){if(3===s){if(n)return;if(!this._$dynamicSlotsInserted)return;const i=this._$removeDynamicSlotHandler,s=[];for(let n=e;n&&n!==t.next;n=n.next){const e=n.value;this._$dynamicSlots.delete(e),s.push(e)}null==i||i(s)}}else for(let i=e;i&&i!==t.next;i=i.next){const e=i.value,t=e._$slotName;this._$applyMultipleSlotsRemoval(e,t,n)}}}setDynamicSlotHandler(e,t,n,i){if(3===this._$slotMode&&(this._$requiredSlotValueNames=e,this._$insertDynamicSlotHandler=t,this._$removeDynamicSlotHandler=n,this._$updateDynamicSlotHandler=i,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 i;const s=e._$slotValues;if(!s)return;const o=s[t];let r=n;if(0!==this._$propertyPassingDeepCopy&&(r=2===this._$propertyPassingDeepCopy?le(n,!0):re(n)),o===r)return;if(s[t]=r,this._$requiredSlotValueNames.indexOf(t)<0)return;const l=null===(i=this._$dynamicSlots)||void 0===i?void 0:i.get(e);l&&(l.updatePathTree||(l.updatePathTree=Object.create(null)),l.updatePathTree[t]=!0)}applySlotValueUpdates(e){var t,n;const i=null===(t=this._$dynamicSlots)||void 0===t?void 0:t.get(e),s=null==i?void 0:i.updatePathTree;s&&(i.updatePathTree=void 0,null===(n=this._$updateDynamicSlotHandler)||void 0===n||n.call(this,e,e._$slotValues,s))}applySlotUpdates(){var e;if(this._$dynamicSlotsInserted){const t=this._$dynamicSlots.entries();for(let n=t.next();!n.done;n=t.next()){const[t,i]=n.value,s=i.updatePathTree;s&&(i.updatePathTree=void 0,null===(e=this._$updateDynamicSlotHandler)||void 0===e||e.call(this,t,t._$slotValues,s))}}else{this._$dynamicSlotsInserted=!0;const e=this._$insertDynamicSlotHandler,t=[];for(let e=this._$subtreeSlotStart;e;e=e.next){const n=e.value,i=n._$slotName;this._$dynamicSlots.set(n,{updatePathTree:void 0}),t.push({slot:n,name:i,slotValues:n._$slotValues})}null==e||e(t)}}getSlotMode(){return this._$slotMode}}He.isShadowRoot=y,He.prototype[_]=!0;class ze{constructor(e,t,n,i,s){this.ownerShadowRoot=i,this.elem=n,this.keyName=e,this.updateKeys(t);const o=this.items,r=this.indexes,l=[];for(let e=0;e<o.length;e+=1){const t=o[e],n=null===r?e:r[e];l.push(s(t,n))}n.insertChildren(l,-1)}updateKeys(e){let t,n;if(Array.isArray(e))t=e,n=null;else if("object"==typeof e&&null!==e){const i=Object.keys(e);t=new Array(i.length),n=new Array(i.length);for(let s=0;s<i.length;s+=1){const o=i[s],r=e[o];t[s]=r,n[s]=o}}else if("string"==typeof e){L("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){L("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),t=new Array(e),n=null;for(let n=0;n<e;n+=1)t[n]=n}else L(`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 i=this.keyName,s=new Array(t.length),o=Object.create(null);let r;if(null!==i){for(let e=0;e<t.length;e+=1){const n=t[e],l="*this"===i?n:null==n?void 0:n[i],a=null!=l?String(l):"";s[e]=a,void 0!==o[a]?(r||(r=Object.create(null)),r[a]=[o[a],e],delete o[a]):(null==r?void 0:r[a])?r[a].push(e):o[a]=e}if(r){const e=Object.keys(r);L(`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],i=r[n];let l=0;for(let e=0;e<i.length;e+=1){const t=i[e];for(;void 0!==o[`${n}--${l}`];)l+=1;const r=`${n}--${l}`;o[r]=t,s[t]=r}}}}this.rawKeys=s,this.keyMap=o,this.sharedKeyMap=r}diff(e,t,n,i,s){const o=this.rawKeys,r=this.keyMap,l=this.sharedKeyMap,a=this.indexes;this.updateKeys(e);const d=this.rawKeys,c=this.sharedKeyMap,h=this.items,u=this.indexes,p=this.keyName;let f,$;if(!0===t)$=!0,f=null===p;else if(void 0===t)$=t,f=!0;else if(null===p)$=!0,f=!0;else{let e=!1;if(Array.isArray(t))e=!0;else{const n=Object.keys(t);for(let i=0;i<n.length;i+=1){const s=t[n[i]];if(!0===s||("*this"===p?s:null==s?void 0:s[p])){e=!0;break}}}if(e){$=new Array(d.length);for(let e=0;e<d.length;e+=1){const n=d[e];if(void 0!==(null==l?void 0:l[n])||void 0!==(null==c?void 0:c[n]))$[e]=!0;else{const n=t[e];void 0===n||(!0===n||("*this"===p?n:null==n?void 0:n[p])?$[e]=!0:$[e]=n)}}f=!1}else $=t,f=!1}if(f){let e;e=!!Array.isArray(t)||t;let r=0;for(;r<o.length&&r<d.length;){const t=h[r],i=null===u?r:u[r],o=null===a?r:a[r];s(t,i,!0===e||void 0===e?e:e[r],i!==o,n.childNodes[r]),r+=1}if(r<o.length)n.removeChildren(r,o.length-r);else if(r<d.length){const e=[];for(;r<d.length;r+=1){const t=h[r],n=null===u?r:u[r];e.push(i(t,n))}n.insertChildren(e,-1)}return}const _=[],g=[],m=new Array(d.length),v=new Array(d.length);let b=-1,S=-1;for(let e=0;e<d.length;e+=1){const t=d[e];if(o[b+1]===t){b+=1,S+=1,_[S]=b,g[S]=e,m[e]=S>0?g[S-1]:-1,v[e]=b;continue}const n=r[t];if(void 0===n){v[e]=-1;continue}let i=0,s=_.length;for(;i<s;){const e=Math.floor((i+s)/2);n<_[e]?s=e:i=e+1}_[s]=n,g[s]=e,m[e]=s>0?g[s-1]:-1,v[e]=n,b=n,S=s}const y=g.length;if(y===d.length&&y===o.length){let e=0;for(;e<o.length&&e<d.length;){const t=h[e],i=null===u?e:u[e],o=null===a?e:a[e];s(t,i,!0===$||void 0===$?$:$[e],i!==o,n.childNodes[e]),e+=1}return}let C=y>0?g[y-1]:-1,w=y;for(;-1!==C;)w-=1,_[w]=C,C=m[C];const N=_;let E;!function(e){e[e.Stable=0]="Stable",e[e.ForwardMove=1]="ForwardMove",e[e.BackwardMove=2]="BackwardMove"}(E||(E={}));const x=new Array(o.length),O=new Array(d.length);let k=-1;for(let e=0;e<v.length;e+=1){const t=v[e];if(e!==N[w])if(-1!==t)x[t]=t>k?2:1,O[e]=n.childNodes[t];else{const t=h[e],n=null===u?e:u[e];O[e]=i(t,n)}else k=t,w+=1,x[t]=0}let L=0,D=0,A=0;w=0;do{const e=w<N.length?N[w]:O.length,t=w<N.length?v[e]:x.length;for(;D<t;)if(void 0===x[D]){const e=D;D+=1;let i=1;for(;D<t&&void 0===x[D];)D+=1,i+=1;n.removeChildren(e+L,i),L-=i}else 2===x[D]&&(L-=1),D+=1;for(;A<e;){const i=O[A],o=v[A];if(-1===o){const i=A;A+=1;let s=1;for(;A<e&&-1===v[A];)A+=1,s+=1;n.insertChildren(O.slice(i,i+s),t+L),L+=s}else{n.insertChildAt(i,t+L);const e=h[A],r=null===u?A:u[A],l=null===a?o:a[o];s(e,r,!0===$||void 0===$?$:$[A],r!==l,i),2===x[o]&&(L+=1),A+=1}}if(w<N.length){const i=h[e],o=null===u?e:u[e],r=null===a?t:a[t];s(i,o,!0===$||void 0===$?$:$[e],o!==r,n.childNodes[t+L])}D=t+1,A=e+1,w+=1}while(w<=N.length)}}const Ke=e=>e,qe=e=>{const t=e;return t._$wxTmplArgs=t._$wxTmplArgs||{}},Xe=e=>null==e?"":String(e),Ye=e=>e.replace(/-(.|$)/g,(e=>e[1]?e[1].toUpperCase():""));class Ze{constructor(e,t,n,i){this.bindingMapDisabled=!1,this.eventObjectFilter=Ke,this.changePropFilter=Ke,this.eventListenerFilter=Ke,this.r=(e,t,n,i,s)=>{var o;const r=t=>{if(t.startsWith("bind"))this.v(e,t.slice(4),Xe(n),!1,!1,!1,!0,s);else if(t.startsWith("captureBind"))this.v(e,t.slice(11),Xe(n),!1,!1,!0,!0,s);else if(t.startsWith("catch"))this.v(e,t.slice(5),Xe(n),!0,!1,!1,!0,s);else if(t.startsWith("captureCatch"))this.v(e,t.slice(12),Xe(n),!0,!1,!0,!0,s);else{if(!t.startsWith("on"))return!1;this.v(e,t.slice(2),Xe(n),!1,!1,!1,!0,s)}return!0};if(C(e)){const s=vt.getDataProxy(e),l=Ye(t);if(s.replaceProperty(l,n)){void 0!==i&&(null===i?s.setModelBindingListener(l,(()=>{})):s.setModelBindingListener(l,(t=>{const n=e.ownerShadowRoot.getHostNode(),s=vt.getDataProxy(n);s.replaceDataOnPath(i,t),s.applyDataUpdates(!1)})));const r=qe(e);if(null===(o=r.changeProp)||void 0===o?void 0:o[t]){const i=r.changeProp[t],s=i.oldValue;if(s!==n){i.oldValue=n;const t=e.ownerShadowRoot.getHostNode();i.listener.call(t.getMethodCaller(),n,s,t,e)}}}else e.hasExternalClass(t)?e.setExternalClass(t,n):r(l)}else if(b(e)){if(this.fallbackListenerOnNativeNode){r(Ye(t))||e.updateAttribute(t,n)}else e.updateAttribute(t,n);i&&e.setModelBindingListener(t,(t=>{const n=e.ownerShadowRoot.getHostNode(),s=vt.getDataProxy(n);s.replaceDataOnPath(i,t),s.applyDataUpdates(!1)}))}},this.shadowRoot=e,this.procGen=t,this.fallbackListenerOnNativeNode=n,i&&(this.eventObjectFilter=i)}create(e){const{shadowRoot:t,procGen:n}=this,i=n(this,!0,e,void 0);return this.handleChildrenCreationAndInsert(i.C,t,void 0,void 0),i.B}update(e,t){const{shadowRoot:n,procGen:i}=this,s=i(this,!1,e,t);this.handleChildrenUpdate(s.C,n,void 0,void 0)}bindingMapUpdate(e,t,n){if(this.bindingMapDisabled)return!1;const i=n[e];if(!i)return!1;let s=null;for(let e=0;e<i.length;e+=1){(0,i[e])(t,(e=>{if(null!==s&&e!==s&&C(s)&&s.hasPendingChanges()){vt.getDataProxy(s).applyDataUpdates(!0)}s=e}),((e,t)=>{e.textContent=t}))}const o=s;if(null!==o&&C(o)&&o.hasPendingChanges()){vt.getDataProxy(o).applyDataUpdates(!0)}return!0}handleChildrenCreation(e,t,n){const i=[];return e(!0,((e,s)=>{if(t&&""!==n){const e=this.createDynamicPlaceholder(t);return void i.push(e)}const o=this.shadowRoot.createTextNode(e);o.destroyBackendElementOnDetach(),t&&Pe.setSlotElement(o,t),s&&s(o),i.push(o)}),((e,s,o,r,l,a)=>{if(t&&n!==(l||"")){const e=this.createDynamicPlaceholder(t);return void i.push(e)}const d=this.createCommonElement(e,s,o,r,a);if(t){Pe.setSlotElement(d,t);qe(d).dynamicSlotNameMatched=!0}else void 0!==l&&(d.slot=l);i.push(d)}),((e,s)=>{const o=this.shadowRoot.createVirtualNode("wx:if");o.destroyBackendElementOnDetach(),Pe.setInheritSlots(o),t&&Pe.setSlotElement(o,t);qe(o).key=e,this.handleChildrenCreationAndInsert(s,o,t,n),i.push(o)}),((e,s,o,r,l)=>{const a=this.shadowRoot,d=a.createVirtualNode("wx:for");d.destroyBackendElementOnDetach(),Pe.setInheritSlots(d),t&&Pe.setSlotElement(d,t);qe(d).keyList=new ze(s,e,d,a,((e,i)=>{const s=a.createVirtualNode("wx:for-item");return s.destroyBackendElementOnDetach(),Pe.setInheritSlots(s),t&&Pe.setSlotElement(d,t),this.handleChildrenCreationAndInsert(((t,n,s,o,a,d,c)=>{l(!0,e,i,void 0,void 0,r?[...r,i]:null,n,s,o,a,d,c)}),s,t,n),s})),i.push(d)}),((e,n,s)=>{const o=this.shadowRoot.createVirtualNode("slot");o.destroyBackendElementOnDetach(),Pe.setSlotName(o,Xe(e)),t?Pe.setSlotElement(o,t):void 0!==s&&(o.slot=s),n&&n(o),i.push(o)}),((e,s)=>{if(void 0!==s)if(t)if(n===s){const n=this.shadowRoot.createVirtualNode("virtual");n.destroyBackendElementOnDetach(),Pe.setSlotElement(n,t);qe(n).dynamicSlotNameMatched=!0,this.handleChildrenCreationAndInsert(e,n,void 0,void 0),i.push(n)}else{const e=this.createDynamicPlaceholder(t);i.push(e)}else{const t=this.shadowRoot.createVirtualNode("virtual");t.destroyBackendElementOnDetach(),t.slot=s,this.handleChildrenCreationAndInsert(e,t,void 0,void 0),i.push(t)}else{const s=this.shadowRoot.createVirtualNode("virtual");s.destroyBackendElementOnDetach(),Pe.setInheritSlots(s),t&&Pe.setSlotElement(s,t),this.handleChildrenCreationAndInsert(e,s,t,n),i.push(s)}}),void 0,void 0),i}handleChildrenCreationAndInsert(e,t,n,i){const s=this.handleChildrenCreation(e,n,i);s.length&&t.insertChildren(s,-1)}handleChildrenUpdate(e,t,n,i){let s=0;const o=n?n.slotNodes.filter((e=>e.parentNode===t)):t.childNodes;e(!1,(e=>{const t=o[s];if(s+=1,n){if(!qe(t).dynamicSlotNameMatched)return}void 0!==e&&(t.textContent=e)}),((e,r,l,a,d,c)=>{const h=o[s];if(s+=1,n){const s=qe(h);if(i!==(d||"")){if(s.dynamicSlotNameMatched){const e=this.createDynamicPlaceholder(n);t.replaceChild(e,h)}return}if(!s.dynamicSlotNameMatched){const i=this.createCommonElement(e,r,l,a,c);Pe.setSlotElement(i,n);return qe(i).dynamicSlotNameMatched=!0,void t.replaceChild(i,h)}}l(h,!1);let u=!1;if(C(h)){const e=this.dynamicSlotUpdate(h,c,a);if(e&&(u=!0),h.hasPendingChanges()){vt.getDataProxy(h).applyDataUpdates(!0)}null==e||e.applySlotUpdates()}n||void 0!==d&&(h.slot=d),u||this.handleChildrenUpdate(a,h,void 0,void 0)}),((e,r)=>{const l=o[s];s+=1;if(qe(l).key===e)this.handleChildrenUpdate(r,l,n,i);else{const o=this.shadowRoot.createVirtualNode("wx:if");o.destroyBackendElementOnDetach(),Pe.setInheritSlots(o),n&&Pe.setSlotElement(o,n);qe(o).key=e,this.handleChildrenCreationAndInsert(r,o,n,i),n?t.replaceChild(o,l):t.replaceChildAt(o,s-1)}}),((e,t,r,l,a)=>{const d=o[s];s+=1;qe(d).keyList.diff(e,r,d,((e,t)=>{const s=this.shadowRoot.createVirtualNode("wx:for-item");return s.destroyBackendElementOnDetach(),Pe.setInheritSlots(s),n&&Pe.setSlotElement(d,n),this.handleChildrenCreationAndInsert(((n,i,s,o,r,d,c)=>{a(!0,e,t,void 0,void 0,l?[...l,t]:null,i,s,o,r,d,c)}),s,n,i),s}),((e,t,s,o,r)=>{this.handleChildrenUpdate(((n,i,r,d,c,h,u)=>{a(!1,e,t,s,!!o||void 0,l?[...l,t]:null,i,r,d,c,h,u)}),r,n,i)}))}),((e,t,i)=>{const r=o[s];s+=1,void 0!==e&&Pe.setSlotName(r,Xe(e)),n||void 0!==i&&(r.slot=i),t&&t(r),this.shadowRoot.applySlotValueUpdates(r)}),((e,r)=>{const l=o[s];if(s+=1,void 0!==r)if(n){const s=qe(l);if(i===r)if(s.dynamicSlotNameMatched)this.handleChildrenUpdate(e,l,void 0,void 0);else{const i=this.shadowRoot.createVirtualNode("virtual");i.destroyBackendElementOnDetach(),Pe.setSlotElement(i,n);qe(i).dynamicSlotNameMatched=!0,this.handleChildrenCreationAndInsert(e,i,void 0,void 0),t.replaceChild(i,l)}else if(s.dynamicSlotNameMatched){const e=this.createDynamicPlaceholder(n);t.replaceChild(e,l)}}else l.slot=r,this.handleChildrenUpdate(e,l,void 0,void 0);else this.handleChildrenUpdate(e,l,n,i)}),void 0,void 0)}dynamicSlotUpdate(e,t,n){const i=e.getShadowRoot();return 3===(null==i?void 0:i.getSlotMode())?(i.setDynamicSlotHandler(t||[],(t=>{const i=[];for(let e=0;e<t.length;e+=1){const{slot:s,name:o,slotValues:r}=t[e],l=this.handleChildrenCreation(((e,t,i,s,o,l,a)=>{n(!0,t,i,s,o,l,a,r,void 0)}),s,o);i.push(...l)}i.length&&e.insertChildren(i,-1)}),(t=>{if(!t.length||!t[0].slotNodes.length)return;t.sort(((e,t)=>e.slotNodes[0].parentIndex-t.slotNodes[0].parentIndex));let n=-1/0,i=-1/0;for(let s=0;s<t.length;s+=1){const o=t[s].slotNodes,r=o[0].parentIndex;i===r||(n>=0&&e.removeChildren(n,i-n),n=r),i=r+o.length}n>=0&&e.removeChildren(n,i-n)}),((t,i,s)=>{const o=t._$slotName||"";this.handleChildrenUpdate(((e,t,o,r,l,a,d)=>{n(!1,t,o,r,l,a,d,i,s)}),e,t,o)})),i):null}createDynamicPlaceholder(e){const t=this.shadowRoot.createVirtualNode("virtual");t.destroyBackendElementOnDetach(),Pe.setSlotElement(t,e);return qe(t).dynamicSlotNameMatched=!1,t}createCommonElement(e,t,n,i,s){let o=!1;const r=e=>{const t=C(e)?this.dynamicSlotUpdate(e,s,i):null;if(t&&(o=!0),n(e,!0),C(e)){if(e.hasPendingChanges()){vt.getDataProxy(e).applyDataUpdates(!0)}null==t||t.applySlotUpdates()}},l=this.shadowRoot.createComponent(e,e,t,(()=>{var n;const i=this.shadowRoot.createComponent(e,e,t,void 0,r);i.destroyBackendElementOnDetach();const s=i.getShadowRoot(),o=C(l)?l.getShadowRoot():null,a=3===(null==o?void 0:o.getSlotMode()),d=3===(null==s?void 0:s.getSlotMode());d!==a?k(new Error(`The "dynamicSlots" option of component <${i.is}> and its placeholder <${l.is}> should be the same.`),"[render]",C(i)?i:i.is):d?null===(n=l.parentNode)||void 0===n||n.replaceChild(i,l):l.selfReplaceWith(i)}),r);return l.destroyBackendElementOnDetach(),o?this.bindingMapDisabled=!0:this.handleChildrenCreationAndInsert(i,l,void 0,void 0),l}s(e,t){e.slot=t}l(e,t,n){this.shadowRoot.replaceSlotValue(e,t,n)}i(e,t){e.id=t}c(e,t){if(C(e)){e.hasExternalClass("class")&&e.setExternalClass("class",t)}e.setNodeClass(t)}y(e,t){if(C(e)&&vt.hasProperty(e,"style")){const n=vt.getDataProxy(e),i=Ye("style");n.replaceProperty(i,t)}else e.setNodeStyle(Xe(t),0)}d(e,t,n){e.setDataset(t,n)}m(e,t,n){e.setMark(t,n)}v(e,t,n,i,s,o,r,l){const a="function"==typeof n?this.eventListenerFilter(n):Xe(n),d=t=>{const n=e.ownerShadowRoot.getHostNode();let i;const s=n.getMethodCaller(),o="function"==typeof a?a:vt.getMethod(n,a);if("function"==typeof o){const e=this.eventObjectFilter(t);i=o.call(s,e)}return i},c={final:i,mutated:s,capture:o};if(r){const n=qe(e);n.dynEvListeners||(n.dynEvListeners={});const i=n.dynEvListeners;i[t]&&e.removeListener(t,i[t],c),i[t]=d}a&&e.addListener(t,d,c)}wl(e,t,n){C(e)&&e.triggerWorkletChangeLifetime(t,n)}p(e,t,n,i){if(C(e)&&vt.hasProperty(e,t)){const i=qe(e);i.changeProp||(i.changeProp=Object.create(null)),i.changeProp[t]={listener:this.changePropFilter(n),oldValue:e.data[t]}}}setFnFilter(e,t){this.changePropFilter=e,this.eventListenerFilter=t}}var Qe;!function(e){e[e.Data=0]="Data",e[e.Script=1]="Script",e[e.InlineScript=2]="InlineScript"}(Qe||(Qe={}));const Je=()=>{};class et{constructor(e,t){this.shadowRoot=e,this.procGen=t}create(e){const{shadowRoot:t,procGen:n}=this,i=n(this,!0,e,void 0);return this.handleChildrenCreation(i.C,t.shadowRootElement),i.B}bindingMapUpdate(e,t,n){const i=n[e];if(void 0!==i)for(let e=0;e<i.length;e+=1){(0,i[e])(t,(()=>{}),((e,t)=>{e.textContent=t}))}}handleChildrenCreation(e,t){let n=!0,i=!1;const s=()=>{n=!1,i=!1;const e=document.createElement("virtual");t.appendChild(e),this.shadowRoot.slot=e};e(!0,((e,o)=>{i?s():n=!1;const r=document.createTextNode(e||"");o&&o(r),t.appendChild(r)}),((e,o,r,l)=>{i?s():n=!1;const a=document.createElement(e);r(a,!0),this.handleChildrenCreation(l,a),t.appendChild(a)}),Je,Je,(()=>{n?(i=!0,this.shadowRoot.slot=t):s()}),(e=>{i?s():n=!1;const o=document.createElement("virtual");this.handleChildrenCreation(e,o),t.appendChild(o)}))}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,i){this.shadowRoot.setListener(e,t,(e=>{const t=this.shadowRoot.template.methods[n],s=null==t?void 0:t(e);return!i&&s}))}r(e,t,n){"boolean"==typeof n?n?e.setAttribute(t,""):e.removeAttribute(t):e.setAttribute(t,Xe(n))}p(){}setFnFilter(){}}const tt=()=>({C:(e,t,n,i,s,o)=>{o("")},B:Object.create(null)}),nt=()=>tt;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:nt};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 i=e.genObjectGroupEnv.group("")||nt();this.procGenWrapper=new et(this,i),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 i=0;i<t.length;i+=1){const[s]=t[i];this.procGenWrapper.bindingMapUpdate(s[0],e,n)}}setListener(e,t,n){const i=e;i._$wxTmplEv?i._$wxTmplEv[t]=n:i._$wxTmplEv={[t]:n}}handleEvent(e,t){var n;const i=e;let s=i;const o=this.shadowRootElement,r=t.getEventName(),l=t.bubbles;for(;;){const e=t.wrapShadowedEvent(i,null,s),a=null===(n=s._$wxTmplEv)||void 0===n?void 0:n[r];if(a){!1===a.call(s,e)&&(t.preventDefault(),t.stopPropagation())}if(!l||t.propagationStopped())break;if(s===o)break;const d=s.parentNode;if(!d)break;s=d}}}const ot=()=>({C:(e,t,n,i,s,o)=>{o("")},B:Object.create(null)}),rt=()=>ot;var lt;!function(e){e[e.Disabled=0]="Disabled",e[e.Enabled=1]="Enabled",e[e.Forced=2]="Forced"}(lt||(lt={}));class at{create(e,t){return t.externalComponent?new it(e):new dt(e)}}class dt{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:rt};this.genObjectGroupEnv={list:n.groupList||Object.create(null),group:n.content},this.updateMode=n.updateMode||"",this.fallbackListenerOnNativeNode=n.fallbackListenerOnNativeNode||!1,this.eventObjectFilter=n.eventObjectFilter}createInstance(e,t){return new ct(this,e,t(e))}}class ct{constructor(e,t,n){this.comp=t,this.shadowRoot=n,this.shadowRoot.destroyBackendElementOnDetach(),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("")||rt();"bindingMap"===e.updateMode?this.forceBindingMapUpdate=2:"virtualTree"===e.updateMode?this.forceBindingMapUpdate=0:this.forceBindingMapUpdate=1,this.procGenWrapper=new Ze(this.shadowRoot,t,e.fallbackListenerOnNativeNode,e.eventObjectFilter),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[i,s,o,r]=t[e];let l=n;for(let e=0;e<i.length;e+=1){const t=i[e],n=l[t];if(!0===n)break;if(e===i.length-1){if(void 0===r)l[t]=!0;else{const e=o;if(void 0===n)l[t]=new Array(e);else if(!Array.isArray(n)){const i=new Array(e),s=Object.keys(n);for(let e=0;e<s.length;e+=1){const t=s[e],o=n[t],r=Number(t);i.length<r&&(i.length=r),i[t]=o}l[t]=i}const i=l[t];i.length<e&&(i.length=e);const a=new Array(s.length);a.fill(!0),i.splice(o,r,...a)}break}if(void 0===n){const e=Object.create(null);l[t]=e,l=e}else l=n}}this.procGenWrapper.update(e,n)}tryBindingMapUpdate(e,t){if(!t)return!0;const n=this.bindingMapGen;if(!n)return!1;const[i]=t;return 1===i.length&&this.procGenWrapper.bindingMapUpdate(i[0],e,n)}}let ht=null;const ut=()=>{if(ht)return ht;const e=new at;return ht=e,e};var pt=Object.freeze({__proto__:null,DEFAULT_PROC_GEN_GROUP:rt,GlassEaselTemplateEngine:at,getDefaultTemplateEngine:ut});const ft=(e,t,n,i)=>{const s=t.ownerSpace,o=null==n?void 0:n._$behavior._$using,r=null==n?void 0:n._$genericImpls;e._$detail||e.prepare();const l=e.behavior;let a;const d=l._$generics;if(d){const n=l._$genericDefaults;a=Object.create(null);for(let l=0;l<d.length;l+=1){const c=d[l];if(i&&Object.prototype.hasOwnProperty.call(i,c)){const n=i[c];if("string"==typeof n)if(null==o?void 0:o[n])a[c]=o[n];else if(r&&r[n])a[c]=r[n];else{const i=s.getGlobalUsingComponent(n);if("string"==typeof i)a[c]=i;else if(i)a[c]={final:i,source:t,placeholder:null,waiting:null};else{L(`Generic "${c}" value "${n}" is not valid`,e.is);const i=s.getDefaultComponent();if(!i)throw new D(`Cannot find default component for generic "${c}"`,"[prepare]",e.is);a[c]={final:i,source:t,placeholder:null,waiting:null}}}else a[c]=n}else{const i=n[c]||s.getDefaultComponent();if(!i)throw new D(`Cannot find default component for generic "${c}"`,"[prepare]",e.is);a[c]="string"==typeof i?i:{final:i,source:t,placeholder:null,waiting:null}}}}else a=null;return a},$t=(e,t,n,i)=>{const s=n._$using[e]||i&&i[e];let o=null;if(s&&("string"==typeof s?o=s:null===s.placeholder?o=s.final:L("Placeholder on generic implementation is not valid",n.is)),o)return o;let r=t.getGlobalUsingComponent(e);if(null===r&&t._$allowUnusedNativeNode&&""!==e&&(r=e),!r){if(r=t.getDefaultComponent(),!r)throw new D(`Cannot find placeholder target "${e}"`,"[prepare]",n.is);L(`Cannot find placeholder target "${e}", using default component.`,n.is)}return r};class _t{constructor(e){this.behavior=e,this.is=this.behavior.is,this._$detail=null,this._$options=l(e._$options,e.ownerSpace.getComponentOptions());const t=this._$options.templateEngine;this._$templateEngine=null!=t?t:ut()}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 i=t[e];n[i]={enumerable:!0,get(){return this._$dataGroup.data[i]},set(e){const t=this._$dataGroup;t.replaceDataOnPath([i],e),t.applyDataUpdates()}}}const i=Object.keys(e._$methodMap);for(let t=0;t<i.length;t+=1){const s=i[t];n[s]={enumerable:!0,value:e._$methodMap[s]}}}const i=function(){};n.constructor={value:i,writable:!0};const s=i.prototype=Object.create(vt.prototype,n);s._$behavior=e,s._$definition=this,s._$methodMap=e._$methodMap;const o=e._$generateObserverTree();s._$lifetimeFuncs=e._$getAllLifetimeFuncs(),s._$pageLifetimeFuncs=e._$getAllPageLifetimeFuncs();const r=(e=>{if(void 0===e)return null;const t={definitions:new Array(6),keyMap:Object.create(null)},n=t.definitions,i=t.keyMap,s=Object.keys(e);for(let t=0;t<s.length;t+=1){const o=s[t],r=e[o],l=r.type;n[l]?(i[o]=[l,n[l].length],n[l].push(r)):(i[o]=[l,0],n[l]=[r])}return t})(e._$relationMap),l=Ce(t.dataDeepCopy),a=Ce(t.propertyPassingDeepCopy),d=this._$templateEngine.create(e,t);this._$detail={proto:s,template:d,dataGroupObserverTree:o,dataDeepCopy:l,propertyPassingDeepCopy:a,relationDefinitionGroup:r}}}let gt=1,mt=null;class vt extends Pe{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||Y()).defineComponent(e)}static _$tagMethod(e){const t=e;return t[F]=!0,t}static _$isTaggedMethod(e){return"function"==typeof e&&!!e[F]}static _$advancedCreate(e,t,n,i,s,o,l){var d,c;t._$detail||t.prepare();const{proto:u,template:p,dataDeepCopy:f,propertyPassingDeepCopy:$,relationDefinitionGroup:_}=t._$detail;let g=t._$detail.dataGroupObserverTree;const m=t._$options,v=t.behavior,b=n?n.getBackendContext():i||r.backendContext||(()=>{if(mt)return mt;let e;return e=new M,mt=e,e})(),S=m.externalComponent,y=m.propertyEarlyInit,C=r.writeExtraInfoToAttr,w=m.virtualHost,N=Object.create(u);N._$genericImpls=s,N._$placeholderHandlerRemover=o,N._$external=S,N.tagName=e,N._$methodCaller=N,N._$virtual=w;let E=null;b&&(w||(E=b.document.createElement(e))),N._$initialize(w,E,n,n?n._$nodeTreeContext:b);const x=n?n.getHostNode():void 0,O=null==x?void 0:x.getComponentOptions(),L=null!==(d=null==O?void 0:O.styleScope)&&void 0!==d?d:j.globalScope(),A=null!==(c=null==O?void 0:O.extraStyleScope)&&void 0!==c?c:void 0,T=null==x?void 0:x._$behavior.ownerSpace.styleScopeManager;if(N.classList=new U(N,v._$externalClasses,x?x.classList:null,L,A,T),E&&T&&C){const e=T.queryName(L);e&&E.setAttribute("exparser:info-class-prefix",`${e}--`)}const I=p.createInstance(N,He.createShadowRoot);if(E&&b.associateValue(E,N),C&&E){const e=gt;gt+=1,N._$componentInstanceId=e,E.setAttribute("exparser:info-component-id",e)}N._$idPrefix=m.idPrefixGenerator?m.idPrefixGenerator.call(N):"";const R=v._$staticData,P=v._$data;let B;if(void 0===R)if(1===P.length){B=(0,P[0])(N)}else{B={};for(let e=0;e<P.length;e+=1){const t=P[e];Object.assign(B,t(N))}}else{B=re(R);for(let e=0;e<P.length;e+=1){const t=P[e];Object.assign(B,t(N))}}const F=N._$relation=new Ue(N,_);N._$traitGroup=new W;const G=v._$traitBehaviors;if(void 0!==G)for(let e=0;e<G.length;e+=1){const{traitBehavior:t,impl:n}=G[e];N._$traitGroup.implement(t,n)}if(v._$methodCallerInit){const e=v._$methodCallerInit.call(N);N._$methodCaller=e}let H=!1;if(v._$init.length>0){let e=!0,t=!0,n=!0,i=!0;const s=N.getMethodCaller(),o={self:s,data:B,setData:N.setData.bind(N),implement:(e,t)=>{if(H)throw new D("Cannot execute init-time functions after initialization","[implement]",v.is);N._$traitGroup.implement(e,t)},relation:function(e){if(H)throw new D("Cannot execute init-time functions after initialization","[implement]",v.is);const t=e.target,n=je(v.ownerSpace,v.is,"undefined",e);let i;return i=n?F.add(n):Symbol("invalid"),{list:()=>F.getLinkedTargets(i).map((e=>e.getMethodCaller())),listAsTrait:t instanceof V?()=>F.getLinkedTargets(i).map((e=>e.traitBehavior(t))):void 0}},observer:(t,n)=>{if(H)throw new D("Cannot execute init-time functions after initialization","[implement]",v.is);e&&(e=!1,g=g.cloneSub());try{g.addObserver(n,ie(t))}catch(e){k(e,"observer",v.is)}},lifetime:(e,n)=>{if(H)throw new D("Cannot execute init-time functions after initialization","[implement]",v.is);t&&(t=!1,N._$lifetimeFuncs=v._$getAllLifetimeFuncs());const i=N._$lifetimeFuncs;if(i[e])i[e].add(n);else{(i[e]=new a("lifetime")).add(n)}},pageLifetime:(e,t)=>{if(H)throw new D("Cannot execute init-time functions after initialization","[implement]",v.is);n&&(n=!1,N._$pageLifetimeFuncs=v._$getAllPageLifetimeFuncs());const i=N._$pageLifetimeFuncs;if(i[e])i[e].add(t);else{(i[e]=new a("pageLifetime")).add(t)}},method:e=>vt._$tagMethod(e),listener:e=>vt._$tagMethod(e)},r=v._$init;for(let e=0;e<r.length;e+=1){const t=h("Component Init",r[e],s,[o],void 0);if(t){const e=Object.keys(t);for(let n=0;n<e.length;n+=1){const s=e[n],o=t[s];vt._$isTaggedMethod(o)&&(i&&(i=!1,N._$methodMap=Object.create(N._$methodMap)),N._$methodMap[s]=o,m.writeFieldsToNode&&(N[s]=o))}}}}H=!0;const z=I.shadowRoot;N.shadowRoot=z;const K=new we(N,B,m.pureDataPattern||null,f,$,m.reflectToAttributes,g);N._$dataGroup=K,y&&void 0!==l&&l(N),I.initValues(K.innerData||K.data),N._$tmplInst=I,K.setUpdateListener(((e,t)=>{I.updateValues(e,t)}));const q=v._$listeners;if(void 0!==q)for(let e=0;e<q.length;e+=1){const{id:t,ev:n,listener:i}=q[e],s=i;if("this"===t)N.addListener(n,(e=>s.call(N._$methodCaller,e)));else if(S){const e=z,i=t?e.getIdMap()[t]:e.root;i&&e.setListener(i,n,(e=>s.call(N._$methodCaller,e)))}else{const e=z,i=t?e.getElementById(t):e;i&&i.addListener(n,(e=>s.call(N._$methodCaller,e)))}}return N.triggerLifetime("created",[]),y||void 0===l||l(N),N}static createWithGenericsAndContext(e,t,n,i,s){const o=e=>{let t;return n&&(t=Object.create(null),Object.entries(n).forEach((([n,i])=>{t[n]={final:i,source:e.behavior,placeholder:null,waiting:null}}))),ft(e,e.behavior,void 0,t)};if(t)return vt._$advancedCreate(String(e),t,null,i,o(t),void 0,s);if(e instanceof _t)return vt._$advancedCreate(e.is,e,null,i,o(e),void 0);const r=Y().getComponentByUrl(e,"");return vt._$advancedCreate(e,r,null,i,o(r),void 0)}static createWithGenerics(e,t,n,i){return vt.createWithGenericsAndContext(e,t,n,null,i)}static createWithContext(e,t,n,i){return vt.createWithGenericsAndContext(e,t,null,n,i)}static create(e,t,n){return vt.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 D("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){const n=e._$methodCaller[t];return"function"==typeof n?n:void 0}return e._$methodMap[t]}callMethod(e,...t){const n=vt.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 V?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}triggerLifetime(e,t){const n=this._$lifetimeFuncs[e];n&&n.call(this._$methodCaller,t,this)}triggerLifeTime(e,t){return this.triggerLifetime(e,t)}triggerPageLifetime(e,t){const n=i=>{if(C(i)){if(i._$pageLifetimeFuncs){const n=i._$pageLifetimeFuncs[e];n&&n.call(i._$methodCaller,t,this)}i._$external||n(i.shadowRoot)}const s=i.childNodes;for(let e=0;e<s.length;e+=1){const t=s[e];v(t)&&n(t)}};n(this)}triggerPageLifeTime(e,t){return this.triggerPageLifetime(e,t)}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()}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(!v(t))return;const n=t.classList;(null==n?void 0:n._$spreadExternalClassUpdate())&&C(t)&&t.applyExternalClassChanges();const i=t.childNodes;for(let t=0,n=i.length;t<n;t+=1)e(i[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 D("Cannot update data before component created","replaceDataOnPath",this);n.replaceDataOnPath(e,t)}spliceArrayDataOnPath(e,t,n,i){const s=this._$dataGroup;if(void 0===s)throw new D("Cannot update data before component created","spliceArrayDataOnPath",this);s.spliceArrayDataOnPath(e,t,n,i)}hasPendingChanges(){const e=this._$dataGroup;return void 0!==e&&e.getChanges().length>0}applyDataUpdates(){const e=this._$dataGroup;if(void 0===e)throw new D("Cannot update data before component created","applyDataUpdates",this);e.applyDataUpdates()}groupUpdates(e){const t=this._$dataGroup;if(void 0===t)throw new D("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 D("Cannot update data before component created","updateData",this);if("object"==typeof e&&null!==e){const n=Object.keys(e);for(let i=0;i<n.length;i+=1){const s=n[i];try{const n=ne(s);t.replaceDataOnPath(n,e[s])}catch(e){k(e,"updateData",this)}}}}setData(e){const t=this._$dataGroup;if(void 0===t)throw new D("Cannot update data before component created","setData",this);if("object"==typeof e&&null!==e){const n=Object.keys(e);for(let i=0;i<n.length;i+=1){const s=n[i];try{const n=ne(s);t.replaceDataOnPath(n,e[s])}catch(e){k(e,"setData",this)}}}t.applyDataUpdates()}}vt.isComponent=C,vt.prototype[g]=!0;class bt{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((t=>{var n;return null!==(n=h("Data Generator",e,null,[],t))&&void 0!==n?n:{}})),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 i=t[n],s=e[i];this._$methods.push({name:i,func:s})}return this}observer(e,t,n=!1){this._$observers||(this._$observers=[]);try{this._$observers.push({dataPaths:ie(e),func:t,once:n})}catch(e){k(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((e=>{var n;return null!==(n=h("Data Generator",t,null,[],e))&&void 0!==n?n:{}})):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 i=e[t],s=n[i];this._$properties.push({name:i,def:s})}}const i=e.methods;if(void 0!==i){const e=Object.keys(i);for(let t=0;t<e.length;t+=1){const n=e[t],s=i[n];this._$methods.push({name:n,func:s})}}const s=e.observers;if(void 0!==s)if(this._$observers||(this._$observers=[]),Array.isArray(s))for(let e=0;e<s.length;e+=1){const{fields:t,observer:n}=s[e];try{this._$observers.push({dataPaths:ie(null!=t?t:"**"),func:n,once:!1})}catch(e){k(e,"definition",this._$is)}}else{const e=Object.keys(s);for(let t=0;t<e.length;t+=1){const n=e[t],i=s[n];try{this._$observers.push({dataPaths:ie(n),func:i,once:!1})}catch(e){k(e,"definition",this._$is)}}}const o=e.lifetimes;if(void 0===(null==o?void 0:o.created)&&"function"==typeof e.created&&this._$lifetimes.push({name:"created",func:e.created,once:!0}),void 0===(null==o?void 0:o.attached)&&"function"==typeof e.attached&&this._$lifetimes.push({name:"attached",func:e.attached,once:!0}),void 0===(null==o?void 0:o.moved)&&"function"==typeof e.moved&&this._$lifetimes.push({name:"moved",func:e.moved,once:!0}),void 0===(null==o?void 0:o.detached)&&"function"==typeof e.detached&&this._$lifetimes.push({name:"detached",func:e.detached,once:!0}),void 0===(null==o?void 0:o.ready)&&"function"==typeof e.ready&&this._$lifetimes.push({name:"ready",func:e.ready,once:!0}),o){const e=Object.keys(o);for(let t=0;t<e.length;t+=1){const n=e[t],i=o[n];this._$lifetimes.push({name:n,func:i,once:!0})}}const r=e.pageLifetimes;if(r){this._$pageLifetimes||(this._$pageLifetimes=[]);const e=Object.keys(r);for(let t=0;t<e.length;t+=1){const n=e[t],i=r[n];this._$pageLifetimes.push({name:n,func:i,once:!0})}}this._$listeners=e.listeners;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],i=l[n];this._$relations.push({name:n,rel:i})}}return this}registerBehavior(){const e=this._$is,t=new St(this);return void 0!==e&&this._$ownerSpace._$registerBehavior(e,t),t}registerComponent(){const e=this._$is,t=new St(this),n=new _t(t);return void 0!==e&&this._$ownerSpace._$registerComponent(e,n),n}}class St{static create(e,t){return new bt(e.is,t||Y()).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 i=Object.keys(e._$using);for(let s=0;s<i.length;s+=1){const o=i[s],r=e._$using[o];if("string"==typeof r)continue;const l=r.final;l&&!t.has(l)&&(t.add(l),n(l.behavior))}};if(n(this.general()),e){const i=Object.values(e);for(let e=0;e<i.length;e+=1){const s=i[e];"string"!=typeof s&&(t.has(s)||(t.add(s),n(s.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,i=this._$builder,s=this._$flatAncestors;if(Array.isArray(i._$behaviors))for(let e=0;e<i._$behaviors.length;e+=1){const o=i._$behaviors[e];let r=null;if(o instanceof St)r=o;else{const e=String(o);n&&(r=n.getBehaviorByUrl(e,t)),r||k(new Error(`behavior "${e}" is not found.`),"[prepare]",t)}if(!r)continue;r._$unprepared&&St.prepare(r);const l=r._$traitBehaviors;void 0!==l&&(this._$traitBehaviors||(this._$traitBehaviors=[]),this._$traitBehaviors.push(...l));const a=r._$staticData;a&&(this._$staticData||(this._$staticData={}),pe(this._$staticData,a)),Object.assign(this._$methodMap,r._$methodMap),Object.assign(this._$propertyMap,r._$propertyMap),this._$data.push(...r._$data);const d=r._$observers;for(let e=0;e<d.length;e+=1){const t=d[e];t.once&&this._$observers.indexOf(t)>=0||this._$observers.push(t)}const c=r._$lifetimes;for(let e=0;e<c.length;e+=1){const t=c[e];t.once&&this._$lifetimes.indexOf(t)>=0||this._$lifetimes.push(t)}const h=r._$pageLifetimes;if(void 0!==h)if(this._$pageLifetimes)for(let e=0;e<h.length;e+=1){const t=h[e];t.once&&this._$pageLifetimes.indexOf(t)>=0||this._$pageLifetimes.push(t)}else this._$pageLifetimes=h.slice();const u=r._$listeners;void 0!==u&&(this._$listeners||(this._$listeners=[]),this._$listeners.push(...u));const p=r._$relationMap;void 0!==p&&(this._$relationMap||(this._$relationMap=Object.create(null)),Object.assign(this._$relationMap,p)),this._$init.push(...r._$init),r._$flatAncestors.forEach((e=>{s.add(e)}))}const o=i._$traitBehaviors;if(void 0!==o&&(this._$traitBehaviors||(this._$traitBehaviors=[]),this._$traitBehaviors.push(...o)),"object"==typeof i._$using&&null!==i._$using){const s="object"==typeof i._$placeholders&&null!==i._$placeholders,o=Object.keys(i._$using);for(let r=0;r<o.length;r+=1){const l=o[r],a=i._$using[l];let d=null;if(s&&(d=null!==(e=i._$placeholders[l])&&void 0!==e?e:null),a instanceof _t)this._$using[l]={final:a,source:this,placeholder:d,waiting:null};else if(n){const e=String(a),i=n.getComponentByUrlWithoutDefault(e,t);if(i)this._$using[l]={final:i,source:this,placeholder:null,waiting:null};else if(null!==d){const i={final:null,source:this,placeholder:d,waiting:null},s=n._$componentWaitingList(e,t);s&&(s.add((e=>{i.final=e,i.placeholder=null,i.waiting=null})),i.waiting=s),this._$using[l]=i}else{const t=n.getGlobalUsingComponent(e);this._$using[l]="string"==typeof t?t:{final:t,source:this,placeholder:null,waiting:null}}}else k(new Error(`cannot find component "${String(a)}"`),"[prepare]",t)}}if("object"==typeof i._$generics&&null!==i._$generics){const e=this._$generics=[],s=Object.create(null);this._$genericDefaults=s;const o=Object.keys(i._$generics);for(let r=0;r<o.length;r+=1){const l=o[r],a=i._$generics[l];let d=null;const c=!0===a||null==a?void 0:a.default;if(void 0!==c)if(c instanceof _t)d=c;else if(n){const e=String(c);d=n.getComponentByUrlWithoutDefault(e,t)||n.getGlobalUsingComponent(e)}else k(new Error(`cannot define generic "${l}" without a default implementor.`),"[prepare]",t);e.push(l),s[l]=d}}const r=i._$staticData;r&&(this._$staticData?pe(this._$staticData,r):this._$staticData=r);const l=i._$methods;for(let e=0;e<l.length;e+=1){const{name:t,func:n}=l[e];this._$methodMap[t]=n}const a=i._$properties;if(void 0!==a){const e=[];for(let n=0;n<a.length;n+=1){const{name:i,def:s}=a[n],o="string"===(d=s)||d===String?{type:"string",optionalTypes:null,value:"",default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"number"===d||d===Number?{type:"number",optionalTypes:null,value:0,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"boolean"===d||d===Boolean?{type:"boolean",optionalTypes:null,value:!1,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"object"===d||d===Object?{type:"object",optionalTypes:null,value:null,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"array"===d||d===Array?{type:"array",optionalTypes:null,value:[],default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"function"===d||d===Function?{type:"function",optionalTypes:null,value(){},default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:"any"===d||null==d?{type:"any",optionalTypes:null,value:null,default:void 0,observer:null,comparer:null,reflectIdPrefix:!1}:null;let r;if(null!==o)r=o;else{const e=s;let n=fe(e.type),o=null;Array.isArray(e.optionalTypes)&&(o=e.optionalTypes.map(fe),o.length>0&&("invalid"!==n&&"any"!==n||(n=o[0]))),"invalid"===n&&k(new Error(`the type of property "${i}" is illegal`),"[prepare]",t);let l,a,d=e.value;void 0===e.value?d="string"===n?"":"number"===n?0:"boolean"!==n&&("array"===n?[]:null):void 0!==e.default&&L(`the initial value of property "${i}" is not used when its default is provided.`,t),"function"==typeof e.observer?l=e.observer:"string"==typeof e.observer?(l=this._$methodMap[e.observer]||null,l||k(new Error(`Cannot find method "${e.observer}" for observer of property "${i}".`),"[prepare]",t)):(l=null,void 0!==e.observer&&k(new Error(`The observer of property "${i}" is not a function, got "${typeof e.observer}".`),"[prepare]",t)),"function"==typeof e.comparer?a=e.comparer:(a=null,void 0!==e.comparer&&k(new Error(`the comparer of property "${i}" is not a function.`),"[prepare]",t));const c=!!e.reflectIdPrefix;r={type:n,optionalTypes:o,value:d,default:e.default,observer:l,comparer:a,reflectIdPrefix:c}}this._$propertyMap[i]=r,e.push({name:i,func:void 0===r.default?()=>re(r.value):r.default})}this._$data.push((t=>{const n={};for(let i=0;i<e.length;i+=1){const{name:s,func:o}=e[i];n[s]=h(`Property "${s}" Default`,o,null,[],t)}return n}))}var d;this._$data.push(...i._$data);const c=i._$observers;if(void 0!==c)for(let e=0;e<c.length;e+=1){const{dataPaths:n,func:i,once:s}=c[e],o="function"==typeof i?i:this._$methodMap[i];"function"==typeof o?this._$observers.push({dataPaths:n,observer:o,once:s}):k(new Error(`the "${String(o)}" observer is not a function.`),"[prepare]",t)}const u=i._$lifetimes;this._$lifetimes.push(...u);const p=i._$pageLifetimes;p&&(this._$pageLifetimes||(this._$pageLifetimes=[]),this._$pageLifetimes.push(...p));const f=i._$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 i=e[n],s=f[i],o="function"==typeof s?s:this._$methodMap[s];if(o){const e=i.indexOf(".");let t,n;e>=0?(t=i.slice(0,e),n=i.slice(e+1)):(t="",n=i),this._$listeners.push({id:t,ev:n,listener:o})}else k(new Error(`the "${i}" listener is not a function or a method name`),"[prepare]",t)}}}const $=i._$relations;if(void 0!==$){this._$relationMap||(this._$relationMap=Object.create(null));for(let e=0;e<$.length;e+=1){const{name:i,rel:s}=$[e];if(null==s)continue;const o=je(n,t,i,s);o&&(this._$relationMap[i]=o)}}this._$init.push(...i._$init),s.add(this)}getTemplate(){return this._$template}_$updateTemplate(e){this._$template=e}hasBehavior(e){if(this._$unprepared&&this.prepare(),e instanceof St)return this._$flatAncestors.has(e);if(this.ownerSpace){const t=this.ownerSpace.getBehaviorByUrl(e,this.is);return!!t&&this._$flatAncestors.has(t)}return!1}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:i,observer:s}=t[n];e.addObserver(s,i)}return e}_$getAllLifetimeFuncs(){const e=Object.create(null),t=this._$lifetimes;for(let n=0;n<t.length;n+=1){const{name:i,func:s}=t[n];if(e[i])e[i].add(s);else{(e[i]=new a("lifetime")).add(s)}}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:i,func:s}=t[n];if(e[i])e[i].add(s);else{(e[i]=new a("pageLifetime")).add(s)}}return e}}var yt;e.ElementIteratorType=void 0,(yt=e.ElementIteratorType||(e.ElementIteratorType={})).ShadowAncestors="shadow-ancestors",yt.ComposedAncestors="composed-ancestors",yt.ShadowDescendantsRootFirst="shadow-descendants-root-first",yt.ShadowDescendantsRootLast="shadow-descendants-root-last",yt.ComposedDescendantsRootFirst="composed-descendants-root-first",yt.ComposedDescendantsRootLast="composed-descendants-root-last";class Ct{constructor(e,t,n=Pe){if(!v(e)&&!m(e))throw new Error("Element iterators can only be used in elements or text nodes");if(this._$node=e,this._$nodeTypeLimit=n||Pe,"shadow-ancestors"===t||"shadow-descendants-root-first"===t||"shadow-descendants-root-last"===t)this._$composed=!1;else{if("composed-ancestors"!==t&&"composed-descendants-root-first"!==t&&"composed-descendants-root-last"!==t)throw new Error(`Unrecognized iterator type "${String(t)}"`);this._$composed=!0}this._$isAncestor="shadow-ancestors"===t||"composed-ancestors"===t,this._$rootFirst="shadow-descendants-root-first"===t||"composed-descendants-root-first"===t}static create(e,t,n){return new Ct(e,t,n)}forEach(e){const t=this._$nodeTypeLimit,n=this._$composed;if(this._$isAncestor){let i=this._$node;for(;;){if(i instanceof t&&!1===e(i))return;let s;if(s=n?i.getComposedParent():i.parentNode,!s)break;i=s}}else{const i=this._$rootFirst,s=o=>{if(i&&o instanceof t&&!1===e(o))return!1;if(v(o)){let e=!1;const t=t=>!1!==s(t)||(e=!0,!1);if(n?o.forEachComposedChild(t):o.childNodes.forEach(t),e)return!1}return!(!i&&o instanceof t&&!1===e(o))};s(this._$node)}}}var wt=Object.freeze({__proto__:null});const Nt=De.triggerEvent,Et=De.triggerExternalEvent;return e.Behavior=St,e.BehaviorBuilder=bt,e.ClassList=U,e.Component=vt,e.ComponentDefinition=_t,e.ComponentSpace=q,e.CurrentWindowBackendContext=M,e.DataGroup=we,e.Element=Pe,e.ElementIterator=Ct,e.EmptyBackendContext=class{constructor(){this.mode=1,this._$styleSheetIdInc=1,this._$renderCallbacks=null,this._$shadowRoot=new R}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=>{h("Render Callback",e,this,[null])}))}),16)}}getRootNode(){return this._$shadowRoot}createFragment(){return new I(0)}onEvent(e,t){}},e.EmptyComposedBackendContext=class{constructor(){this.mode=2,this._$styleSheetIdInc=1,this._$renderCallbacks=null,this._$rootNode=new P}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=>{h("Render Callback",e,this,[null])}))}),16)}}getRootNode(){return this._$rootNode}createElement(e,t){return new P}createTextNode(e){return new P}createFragment(){return new P}onEvent(e){}createMediaQueryObserver(e,t){return{disconnect:()=>{}}}},e.Event=De,e.FuncArr=a,e.MutationObserver=ce,e.NativeNode=Fe,e.Observer=ce,e.ParsedSelector=Te,e.ShadowRoot=He,e.StyleScopeManager=j,e.TextNode=Ge,e.TraitBehavior=V,e.VirtualNode=Ve,e.addGlobalErrorListener=function(e){x.add(e)},e.addGlobalWarningListener=function(e){O.add(e)},e.backend=i,e.composedBackend=s,e.createElement=function(e,t){return vt.create(e,t||null)},e.dataPath=se,e.dataUtils=ae,e.domlikeBackend=o,e.dumpElement=(e,t)=>{console.log(N(e,t))},e.dumpElementToString=N,e.dumpSingleElementToString=w,e.getDefaultComponentSpace=Y,e.globalOptions=r,e.registerBehavior=e=>Y().defineBehavior(e),e.registerElement=e=>Y().defineComponent(e),e.removeGlobalErrorListener=function(e){x.remove(e)},e.removeGlobalWarningListener=function(e){O.remove(e)},e.safeCallback=h,e.template=pt,e.templateEngine=wt,e.triggerEvent=Nt,e.triggerExternalEvent=Et,e.triggerRender=(e,t)=>{const n=e.getBackendContext();n&&((e,t)=>{e.render((()=>{"function"==typeof t&&h("render",t,e,[null])}))})(n,t||null)},e.typeUtils=G,e}({});
2
+ //# sourceMappingURL=glass_easel.domlike.global.js.map