p-elements-core 2.1.0-rc5 → 2.1.0-rc7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +21 -0
- package/demo/sample.js +1 -0
- package/demo/screen.css +6 -0
- package/demo/theme.css +14 -0
- package/dist/p-elements-core-modern.js +1 -0
- package/dist/p-elements-core.js +1 -5
- package/docs/.eleventy.js +109 -0
- package/docs/package.json +27 -0
- package/docs/src/404.md +8 -0
- package/docs/src/_data/demos/animation/animation.tsx +216 -0
- package/docs/src/_data/demos/animation/index.html +10 -0
- package/docs/src/_data/demos/animation/project.json +7 -0
- package/docs/src/_data/demos/hello-world/hello-world.tsx +35 -0
- package/docs/src/_data/demos/hello-world/index.html +10 -0
- package/docs/src/_data/demos/hello-world/project.json +7 -0
- package/docs/src/_data/demos/timer/demo-timer.tsx +120 -0
- package/docs/src/_data/demos/timer/icons.tsx +62 -0
- package/docs/src/_data/demos/timer/index.html +12 -0
- package/docs/src/_data/demos/timer/project.json +8 -0
- package/docs/src/_data/global.js +14 -0
- package/docs/src/_data/helpers.js +19 -0
- package/docs/src/_includes/layouts/base.njk +31 -0
- package/docs/src/_includes/layouts/playground.njk +40 -0
- package/docs/src/_includes/partials/app-header.njk +9 -0
- package/docs/src/_includes/partials/head.njk +15 -0
- package/docs/src/_includes/partials/nav.njk +20 -0
- package/docs/src/_includes/partials/top-nav.njk +52 -0
- package/docs/src/assets/favicon.png +0 -0
- package/docs/src/assets/logo.svg +9 -0
- package/docs/src/documentation/custom-element-controller.md +294 -0
- package/docs/src/documentation/custom-element.md +221 -0
- package/docs/src/documentation/decorators/bind.md +71 -0
- package/docs/src/documentation/decorators/custom-element-config.md +63 -0
- package/docs/src/documentation/decorators/property.md +83 -0
- package/docs/src/documentation/decorators/query.md +66 -0
- package/docs/src/documentation/decorators/render-property-on-set.md +60 -0
- package/docs/src/documentation/decorators.md +9 -0
- package/docs/src/documentation/getting-started.md +60 -0
- package/docs/src/documentation/index.md +33 -0
- package/docs/src/documentation/reactive-properties.md +54 -0
- package/docs/src/index.d.ts +25 -0
- package/docs/src/index.md +3 -0
- package/docs/src/playground/animation.njk +10 -0
- package/docs/src/playground/index.njk +10 -0
- package/docs/src/playground/timer.njk +10 -0
- package/docs/src/scripts/components/app-drawer/app-drawer.css +92 -0
- package/docs/src/scripts/components/app-drawer/app-drawer.tsx +67 -0
- package/docs/src/scripts/components/app-mobile-menu/app-mobile-menu.css +48 -0
- package/docs/src/scripts/components/app-mobile-menu/app-mobile-menu.tsx +112 -0
- package/docs/src/scripts/components/app-mode-switch/app-mode-switch.css +78 -0
- package/docs/src/scripts/components/app-mode-switch/app-mode-switch.tsx +166 -0
- package/docs/src/scripts/components/app-playground/app-playground.tsx +190 -0
- package/docs/src/scripts/components/app-split-panel/app-split-panel.css +33 -0
- package/docs/src/scripts/components/app-split-panel/app-split-panel.tsx +73 -0
- package/docs/src/scripts/components/app-split-panel/resize-bar.tsx +155 -0
- package/docs/src/scripts/components/lazy-svg/lazy-svg.tsx +94 -0
- package/docs/src/scripts/index.ts +6 -0
- package/docs/src/scripts/playground.ts +1 -0
- package/docs/src/styles/main.css +699 -0
- package/docs/tsconfig.json +22 -0
- package/index.html +20 -12
- package/older-browsers-webpack.config.js +54 -0
- package/p-elements-core.d.ts +330 -0
- package/package.json +30 -19
- package/readme.md +180 -0
- package/src/custom-element.ts +423 -195
- package/src/decorators/property.ts +653 -119
- package/src/maquette/interfaces.ts +0 -1
- package/src/maquette/projection.ts +1 -0
- package/src/p-elements-core-modern.ts +50 -0
- package/src/p-elements-core.ts +15 -71
- package/src/sample/animate.tsx +199 -0
- package/src/sample/mixin/highlight.tsx +1 -0
- package/src/sample/sample.tsx +161 -78
- package/storybook/storybook-demo/.storybook/main.ts +30 -0
- package/storybook/storybook-demo/.storybook/preview-head.html +1 -0
- package/storybook/storybook-demo/.storybook/preview.ts +20 -0
- package/storybook/storybook-demo/package.json +23 -0
- package/storybook/storybook-demo/stories/bar.stories.tsx +27 -0
- package/storybook/storybook-demo/stories/baz.stories.tsx +37 -0
- package/storybook/storybook-demo/stories/foo.mdx +11 -0
- package/storybook/storybook-demo/stories/foo.stories.tsx +27 -0
- package/storybook/storybook-demo/stories/foo.tsx +24 -0
- package/storybook/storybook-demo/tsconfig.json +30 -0
- package/storybook/storybook-p-element-vite/README.md +97 -0
- package/storybook/storybook-p-element-vite/package.json +81 -0
- package/storybook/storybook-p-element-vite/preset.js +2 -0
- package/storybook/storybook-p-element-vite/src/docs/index.ts +8 -0
- package/storybook/storybook-p-element-vite/src/docs/source-decorator.ts +55 -0
- package/storybook/storybook-p-element-vite/src/entry-preview-docs.ts +16 -0
- package/storybook/storybook-p-element-vite/src/entry-preview.ts +8 -0
- package/storybook/storybook-p-element-vite/src/index.ts +9 -0
- package/storybook/storybook-p-element-vite/src/node/index.ts +5 -0
- package/storybook/storybook-p-element-vite/src/portable-stories.ts +35 -0
- package/storybook/storybook-p-element-vite/src/preset.ts +69 -0
- package/storybook/storybook-p-element-vite/src/render.ts +96 -0
- package/storybook/storybook-p-element-vite/src/types.ts +99 -0
- package/storybook/storybook-p-element-vite/tsconfig.json +14 -0
- package/storybook/storybook-p-element-vite/tsdown.config.ts +26 -0
- package/tsconfig.json +2 -3
- package/webpack.config.js +63 -0
- package/build.mjs +0 -48
- package/dist/sample/sample.js +0 -29
- package/src/custom-style-element.ts +0 -31
- package/src/helpers/css.ts +0 -71
- package/types/custom-element-controller.d.ts +0 -17
- package/types/custom-element.d.ts +0 -27
- package/types/custom-style-element.d.ts +0 -4
- package/types/decorators/bind.d.ts +0 -5
- package/types/decorators/custom-element-config.d.ts +0 -7
- package/types/decorators/property.d.ts +0 -17
- package/types/decorators/query.d.ts +0 -1
- package/types/decorators/render-property-on-set.d.ts +0 -1
- package/types/helpers/css.d.ts +0 -3
- package/types/maquette/cache.d.ts +0 -9
- package/types/maquette/dom.d.ts +0 -59
- package/types/maquette/h.d.ts +0 -34
- package/types/maquette/index.d.ts +0 -11
- package/types/maquette/interfaces.d.ts +0 -474
- package/types/maquette/jsx.d.ts +0 -5
- package/types/maquette/mapping.d.ts +0 -13
- package/types/maquette/projection.d.ts +0 -8
- package/types/maquette/projector.d.ts +0 -26
- package/types/p-elements-core.d.ts +0 -61
package/.babelrc
ADDED
package/demo/sample.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! P-ELEMENTS 2.1.0-rc7 - Mon Feb 09 2026 09:56:55 GMT+0100 (Midden-Europese standaardtijd) */var t={};function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,r(o.key),o)}}function r(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,n||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}function o(t,n,r){return n=a(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,i()?Reflect.construct(n,r||[],a(t).constructor):n.apply(t,r))}function i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(i=function(){return!!t})()}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function c(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function l(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}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]})},t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s;function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach(function(e){d(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function d(t,e,n){return(e=v(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function y(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return b(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function m(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function v(t){var e=function(t,e){if("object"!=j(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==j(e)?e:e+""}function g(t,e,n){return e=O(e),function(t,e){if(e&&("object"==j(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,w()?Reflect.construct(e,n||[],O(t).constructor):e.apply(t,n))}function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(w=function(){return!!t})()}function O(t){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},O(t)}function k(t,e){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},k(t,e)}function j(t){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(t)}var S=function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"===("undefined"==typeof Reflect?"undefined":j(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},P=(s=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=g(this,t,arguments)).nextId=1,e.items=[{id:0,text:"Initial item",highlighted:!1}],e.enterAnimation=function(t){var e=t;e.style.opacity="0",e.style.transform="translateY(-20px)",requestAnimationFrame(function(){e.style.transition="opacity 0.3s ease, transform 0.3s ease",e.style.opacity="1",e.style.transform="translateY(0)"})},e.exitAnimation=function(t,e){var n=t;n.style.transition="opacity 0.3s ease, transform 0.3s ease",n.style.opacity="0",n.style.transform="translateX(-100px)",setTimeout(function(){e()},300)},e.updateAnimation=function(t,e,n){var r=t,o="true"===((null==e?void 0:e["data-highlighted"])||"false"),i="true"===((null==n?void 0:n["data-highlighted"])||"false");r.style.animation=!0===o&&!1===i?"pulse 0.5s ease":""},e.addItem=function(){e.items=[].concat(y(e.items),[{id:e.nextId++,text:"Item ".concat(e.nextId),highlighted:!1}])},e.removeItem=function(t){e.items=e.items.filter(function(e){return e.id!==t})},e.toggleHighlight=function(t){var n;e.items=null===(n=e.items)||void 0===n?void 0:n.map(function(e){return e.id===t?p(p({},e),{},{highlighted:!e.highlighted}):e})},e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&k(t,e)}(t,CustomElement),e=t,(n=[{key:"render",value:function(){var t=this;return h("div",{class:"container"},h("h2",null,"Animation Demo"),h("div",{class:"controls"},h("button",{onclick:this.addItem},"Add Item")),h("ul",{class:"item-list"},this.items&&this.items.map(function(e){return h("li",{key:e.id,"data-highlighted":e.highlighted?"true":"false",classes:{"list-item":!0,highlighted:e.highlighted},enterAnimation:t.enterAnimation,exitAnimation:t.exitAnimation,updateAnimation:t.updateAnimation},h("span",{class:"item-text"},e.text),h("div",{class:"item-actions"},h("button",{class:"toggle-btn",onclick:function(){return t.toggleHighlight(e.id)}},"Toggle"),h("button",{class:"remove-btn",onclick:function(){return t.removeItem(e.id)}},"Remove")))})))}}])&&m(e.prototype,n),r&&m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r}(),s.style="\n :host {\n display: block;\n font-family: sans-serif;\n padding: 20px;\n }\n \n .container {\n max-width: 600px;\n }\n \n .controls {\n margin-bottom: 20px;\n display: flex;\n gap: 10px;\n }\n \n button {\n padding: 8px 16px;\n background: #007acc;\n color: white;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 14px;\n }\n \n button:hover {\n background: #005a9e;\n }\n \n .item-list {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n \n .list-item {\n padding: 12px 16px;\n margin: 8px 0;\n background: #f0f0f0;\n border-radius: 4px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n transition: background-color 0.3s ease;\n }\n \n .list-item.highlighted {\n background: #ffd700;\n }\n \n .item-text {\n flex: 1;\n }\n \n .item-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n }\n \n .item-actions button {\n padding: 4px 12px;\n font-size: 12px;\n }\n \n .remove-btn {\n background: #d13438;\n }\n \n .remove-btn:hover {\n background: #a02a2e;\n }\n \n .toggle-btn {\n background: #orange;\n }\n @keyframes pulse {\n 0%, 100% { transform: scale(1); }\n 50% { transform: scale(1.1); }\n }\n \n ",s);S([Property({type:"array"})],P.prototype,"items",void 0),P=S([CustomElementConfig({tagName:"p-animation-demo"})],P);var A=function(t){return function(e){customElements.get(t.tagName)?console.warn("Custom element with tag name ".concat(t.tagName," already exists.")):customElements.define(t.tagName,e,t.options)}};function x(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function C(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?x(Object(n),!0).forEach(function(e){E(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function E(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=R(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=R(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==R(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function R(t){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},R(t)}var N=new WeakSet,_=new WeakMap,T=new WeakMap;function M(t,e,n,r,o){r===Boolean?n?t.setAttribute(e,""):t.removeAttribute(e):r===Object||r===Array?o&&o.toAttribute?t.setAttribute(e,o.toAttribute(n)):t.setAttribute(e,JSON.stringify(n)):null==n?t.removeAttribute(e):t.setAttribute(e,String(n))}function I(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.type,n=t.attribute,r=void 0===n||n,o=t.reflect,i=void 0!==o&&o,a=t.converter,u=t.readonly,c=void 0!==u&&u,l=function(t){if("string"==typeof t)switch(t){case"string":return String;case"number":return Number;case"boolean":return Boolean;case"object":return Object;case"array":return Array;default:return null}return t}(e);return function(e,n){var o=new WeakMap,u=function(t,e){if(!1!==e)return!0===e?t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase():"string"==typeof e?e:void 0}(n,r);Object.defineProperty(e,n,{get:function(){if(!o.has(this)&&u&&this.hasAttribute&&this.hasAttribute(u)){var t,e=this.getAttribute(u);if(null!==e)return t=a&&a.fromAttribute?a.fromAttribute(e):l===Boolean||(l===Number?Number(e):e),o.set(this,t),"function"==typeof this.renderNow&&this.renderNow(),t}return o.has(this)?o.get(this):l!==Boolean&&void 0},set:function(t){if(!c||!o.has(this)){var e,r=o.get(this),s=!1;if(null==l&&t!==r&&(s=!0),!o.has(this)&&u&&this.hasAttribute&&this.hasAttribute(u)){var f=this.getAttribute(u);if(null!==f)return e=a&&a.fromAttribute?a.fromAttribute(f):l===Boolean||(l===Number?Number(f):f),o.set(this,e),void(this.isConnected?("function"==typeof this.renderNow&&this.renderNow(),this.updated&&this.updated(n,r,e)):this.updated&&(T.has(this)||T.set(this,[]),T.get(this).push({propertyKey:n,oldValue:r,newValue:e})))}if(e=s?t:function(t,e,n){if(n&&n.fromAttribute&&"string"==typeof t)return n.fromAttribute(t);if(null==t)return t;switch(e){case String:return String(t);case Number:return Number(t);case Boolean:return Boolean(t);case Object:return"object"===R(t)?t:JSON.parse(String(t));case Array:return Array.isArray(t)?t:JSON.parse(String(t));default:return t}}(t,l,a),r!==e){var p=!this.shouldUpdate||this.shouldUpdate(n,r,e);if(o.set(this,p?e:r),i&&void 0!==u)if(this.isConnected){N.add(this);try{M(this,u,p?e:r,l,a)}finally{N.delete(this)}}else _.has(this)||_.set(this,new Map),_.get(this).set(u,{value:p?e:r,type:l,converter:a});this.isConnected?("function"==typeof this.renderNow&&this.renderNow(),this.updated&&this.updated(n,r,e)):this.updated&&(T.has(this)||T.set(this,[]),T.get(this).push({propertyKey:n,oldValue:r,newValue:e})),s&&"function"==typeof this.renderNow&&this.renderNow()}}},configurable:!0}),e.constructor._propertyInfo||(e.constructor._propertyInfo=new Map),e.constructor._propertyInfo.set(n,C(C({},t),{},{name:n,attribute:u,type:l})),u&&(e.constructor.observedAttributes||(e.constructor.observedAttributes=[]),e.constructor.observedAttributes.includes(u)||e.constructor.observedAttributes.push(u))}}var F=I({});function D(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||V(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(t){return function(t){if(Array.isArray(t))return B(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||V(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(t,e){if(t){if("string"==typeof t)return B(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(t,e):void 0}}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function L(t){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},L(t)}function U(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,q(r.key),r)}}function q(t){var e=function(t,e){if("object"!=L(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=L(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==L(e)?e:e+""}function z(t,e){if(e&&("object"==L(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function H(t){var e="function"==typeof Map?new Map:void 0;return H=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(J())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&Y(o,n.prototype),o}(t,arguments,$(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Y(n,t)},H(t)}function J(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(J=function(){return!!t})()}function Y(t,e){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Y(t,e)}function $(t){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$(t)}function K(t,e,n){X(t,e),e.set(t,n)}function X(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Z(t,e){return t.get(Q(t,e))}function G(t,e,n){return t.set(Q(t,e),n),n}function Q(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var tt=[],et=new WeakMap,nt=new WeakMap,rt=new WeakMap,ot=new WeakMap,it=new WeakMap,at=new WeakMap,ut=new WeakMap,ct=new WeakMap,lt=new WeakMap,st=new WeakMap,ft=new WeakMap,pt=new WeakMap,dt=new WeakMap,ht=new WeakMap,yt=new WeakMap,bt=new WeakMap,mt=new WeakSet,vt=function(){function t(e){var n,r,o,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,o=$(o=t),function(t,e){X(t,e),e.add(t)}(n=z(r,J()?Reflect.construct(o,i||[],$(r).constructor):o.apply(r,i)),mt),K(n,et,void 0),K(n,nt,void 0),K(n,rt,!1),K(n,ot,void 0),K(n,it,void 0),K(n,at,void 0),K(n,ut,!1),K(n,ct,!1),K(n,lt,!1),K(n,st,!0),K(n,ft,!0),K(n,pt,null),K(n,dt,void 0),K(n,ht,[]),K(n,yt,null),K(n,bt,null);var a=function(t){console.warn("ElementInternals.".concat(t," called before element was connected. Call will be ignored."))};return G(dt,n,{setValidity:function(t,e,n){a("setValidity")},reportValidity:function(){return a("reportValidity"),!1},checkValidity:function(){return a("checkValidity"),!0},setFormValue:function(t,e){a("setFormValue")}}),Q(mt,n,kt).call(n),Q(mt,n,gt).call(n),z(n,e)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Y(t,e)}(t,H(HTMLElement)),e=t,n=[{key:"isConnected",get:function(){return Z(rt,this)}},{key:"updateComplete",get:function(){return Z(yt,this)?Z(yt,this):Promise.resolve()}},{key:"internals",get:function(){if(!Z(rt,this)&&"object"===L(Z(dt,this)))return Z(dt,this);var t=this.constructor;if(null===Z(pt,this)&&t.formAssociated){var e=Z(dt,this);for(var n in G(dt,this,null),G(pt,this,this.attachInternals()),e)"function"!=typeof Z(pt,this)[n]&&(Z(pt,this)[n]=e[n])}return Z(pt,this)},set:function(t){G(pt,this,t)}},{key:"requestUpdate",value:function(){var t=this;return Z(yt,this)||(G(yt,this,new Promise(function(e){G(bt,t,e)})),this.scheduleRender()),Z(yt,this)}},{key:"addController",value:function(t){Z(ht,this).push(t),Z(rt,this)&&t.connected&&t.connected()}},{key:"scheduleRender",value:function(){var t;null===(t=Z(et,this))||void 0===t||t.scheduleRender()}},{key:"renderNow",value:function(){var t,e=this;if(this.shadowRoot&&(Z(yt,this)||G(yt,this,new Promise(function(t){G(bt,e,t)})),null===(t=Z(et,this))||void 0===t||t.renderNow(),this.updated("",null,null),Z(bt,this))){var n=Z(bt,this);G(bt,this,null),G(yt,this,null),n()}}},{key:"updated",value:function(t,e,n){}},{key:"shouldUpdate",value:function(t,e,n){return!0}},{key:"addStylesheetToRootNode",value:function(t,e){if(Q(mt,this),Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype){if(Z(it,this)||G(it,this,new CSSStyleSheet),Z(it,this).replaceSync(t),Z(ut,this))return;if(e instanceof Document){var n=Q(mt,this,St).call(this,t);-1===tt.indexOf(n)&&(document.adoptedStyleSheets=[].concat(W(document.adoptedStyleSheets),[Z(it,this)]),G(ut,this,!0),tt.push(n))}else this.shadowRoot.adoptedStyleSheets=[Z(it,this)],G(ut,this,!0)}else if(G(at,this,document.createElement("link")),Z(at,this).rel="stylesheet",Z(at,this).href=URL.createObjectURL(new Blob([t],{type:"text/css"})),e instanceof Document){var r=Q(mt,this,St).call(this,t);-1===tt.indexOf(r)&&(document.head.appendChild(Z(at,this)),tt.push(r))}else this.shadowRoot.appendChild(Z(at,this))}},{key:"templateFromString",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=document.createElement("template");n.innerHTML=t;var r=document.createDocumentFragment();r.appendChild(n.content);var o=r.querySelector("style");return e&&(G(ct,this,!0),this.shadowRoot||this.attachShadow({mode:"open",delegatesFocus:Z(lt,this)})),o&&(Q(mt,this,jt).call(this,o.textContent),o.remove()),r}},{key:"adoptStyle",value:function(t,e){this.addStylesheetToRootNode(e,t)}},{key:"createProjector",value:function(t,e){var n=this;return new Promise(function(r,o){var i,a=Z(nt,n)?Z(nt,n):"append";requestAnimationFrame(function(){(i=window.Maquette.createProjector({performanceLogger:function(t){"renderStart"!==t&&"renderDone"!==t||Q(mt,n,wt).call(n,t)}}))[a](t,e.bind(n)),G(et,n,i),i.renderNow(),r(i),n.dispatchEvent(new CustomEvent("firstRender",{}))})})}},{key:"connectedCallback",value:function(){G(rt,this,!0);for(var t=0,e=Z(ht,this).length;t<e;){var n=Z(ht,this)[t];null!=n&&n.connected&&n.connected(),t+=1}!function(t){var e=_.get(t);if(e){N.add(t);try{e.forEach(function(e,n){M(t,n,e.value,e.type,e.converter)})}finally{N.delete(t)}_.delete(t)}var n=T.get(t);if(n&&t.updated){for(var r=n.length,o=0;o<r;){var i=n[o];t.updated(i.propertyKey,i.oldValue,i.newValue),o+=1}T.delete(t)}}(this),this.renderNow()}},{key:"disconnectedCallback",value:function(){G(rt,this,!1);for(var t=0,e=Z(ht,this).length;t<e;){var n=Z(ht,this)[t];null!=n&&n.disconnected&&n.disconnected(),t+=1}}},{key:"attributeChangedCallback",value:function(t,e,n){if(r=this,!N.has(r)){var r,o=this.constructor;if(null!=o&&o._propertyInfo){var i=Array.from(o._propertyInfo.values()).find(function(e){return e.attribute===t&&"string"==typeof e.attribute});if(i){var a=i.converter,u=n;null!=a&&a.fromAttribute?u=a.fromAttribute(n):i.type===Boolean?u=null!==n:i.type===Number&&(u=null===n?null:Number(n)),this[i.name]=u,this.scheduleRender()}}}}},{key:"render",value:function(){return null}}],n&&U(e.prototype,n),r&&U(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r}();function gt(){"function"==typeof this.init&&(this.init(),Z(ht,this).forEach(function(t){null==t||t.init()}))}function wt(t){var e=this;this[t]&&this[t](Z("renderStart"===t?st:ft,this));var n="host".concat(t.charAt(0).toUpperCase()).concat(t.slice(1));Z(ht,this).forEach(function(r){r[n]&&r[n](Z("renderStart"===t?st:ft,e))}),G("renderStart"===t?st:ft,this,!1)}function Ot(){var t=this.constructor;if(t._propertyInfo)for(var e=Array.from(t._propertyInfo.entries()),n=0,r=e.length;n<r;){var o=D(e[n],1)[0];if(Object.hasOwn(this,o)){var i=this[o];delete this[o],this[o]=i}n+=1}}function kt(){var t=this,e=this.constructor.projectorMode;G(nt,this,e||"append");var n=this.constructor.formAssociated,r=this.constructor.delegatesFocus;G(lt,this,r),n&&G(pt,this,this.attachInternals());var o=this.constructor.style;if(o){G(ct,this,!0),G(nt,this,"replace"),this.shadowRoot||this.attachShadow({mode:"open",delegatesFocus:Z(lt,this)}),Q(mt,this,jt).call(this,o);var i=document.createElement("div");this.shadowRoot.appendChild(i),requestAnimationFrame(function(){t.createProjector(i,t.render).then(function(){Q(mt,t,Ot).call(t)})})}}function jt(t){G(ot,this,t),Z(ct,this)&&this.shadowRoot?this.addStylesheetToRootNode(t,this.shadowRoot):Z(ct,this)||this.addStylesheetToRootNode(t,document)}function St(t){for(var e=0,n=0;e<t.length;e++)n=Math.imul(31,n)+t.charCodeAt(e)|0;return n}function Pt(t){return Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pt(t)}function At(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,xt(r.key),r)}}function xt(t){var e=function(t,e){if("object"!=Pt(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Pt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Pt(e)?e:e+""}function Ct(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function Et(t,e){return t.get(Rt(t,e))}function Rt(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}vt._propertyInfo=new Map;var Nt,_t,Tt,Mt,It,Ft=new WeakMap,Dt=function(){return t=function t(e){var n,r,o;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Ct(this,Ft,void 0),r=this,o=e,(n=Ft).set(Rt(n,r),o),Et(Ft,this).addController(this)},(e=[{key:"hostElement",get:function(){return Et(Ft,this)}},{key:"renderNow",value:function(){var t;null===(t=this.hostElement)||void 0===t||t.renderNow()}},{key:"scheduleRender",value:function(){var t;null===(t=this.hostElement)||void 0===t||t.scheduleRender()}}])&&At(t.prototype,e),n&&At(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();function Wt(t){var e="function"==typeof Map?new Map:void 0;return Wt=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(Kt())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&te(o,n.prototype),o}(t,arguments,Gt(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),te(n,t)},Wt(t)}function Vt(t,e,n){Bt(t,e),e.set(t,n)}function Bt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Lt(t,e){return t.get(qt(t,e))}function Ut(t,e,n){return t.set(qt(t,e),n),n}function qt(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}function zt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ht(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Yt(r.key),r)}}function Jt(t,e,n){return e&&Ht(t.prototype,e),n&&Ht(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Yt(t){var e=function(t,e){if("object"!=ee(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ee(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ee(e)?e:e+""}function $t(t,e,n){return e=Gt(e),function(t,e){if(e&&("object"==ee(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Kt()?Reflect.construct(e,n||[],Gt(t).constructor):e.apply(t,n))}function Kt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Kt=function(){return!!t})()}function Xt(t,e,n,r){var o=Zt(Gt(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function Zt(){return Zt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Gt(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Zt.apply(null,arguments)}function Gt(t){return Gt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gt(t)}function Qt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&te(t,e)}function te(t,e){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},te(t,e)}function ee(t){return ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ee(t)}var ne=function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"===("undefined"==typeof Reflect?"undefined":ee(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},re=(Nt=function(){function t(){var e;return zt(this,t),(e=$t(this,t,arguments)).render=function(){return h("button",{class:"foo"},h("slot",null))},e}return Qt(t,vt),Jt(t,[{key:"connectedCallback",value:function(){Xt(t,"connectedCallback",this,3)([])}}])}(),Nt.style=".foo{background-color: red; color: white; border: 0px;}",Nt.delegatesFocus=!0,Nt);re=ne([A({tagName:"my-button"})],re);var oe,ie,ae=(Tt=new WeakMap,_t=function(t){function e(){var t;return zt(this,e),Vt(t=$t(this,e,arguments),Tt,void 0),t.count=1,t.name="",t.foo="foo",t.onInput=function(e){t.name=e.target.value},t.onPeterClick=function(e){console.log({e,p:t})},t.render=function(){return h("div",null,h("input",{type:"checkbox",checked:"Peter"===t.name}),h("h1",{part:"sample",on:{click:function(e){return console.log(e,t.slotContainer)}},id:"Foo"},"Hallo:"),h("h1",{"data-force-event-handler":"true",onclick:function(){return console.log("click "+t.name)},"data-title":t.name&&t.name.toLocaleUpperCase(),class:"title"},t.foo," ",t.name),h("p",{"data-count":t.count,updateAnimation:t.countUpdateAnimation},t.count),h("div",{id:"SlotContainer"},h("slot",null)),h("p",{eventListeners:[["mouseenter",function(){return console.log("enter")},{once:!0}],["mouseleave",function(){return console.log("leave")},{once:!0}]]},"Please enter your name (hint type"," ",h("em",null,h("strong",null,"Peter")),")",h("br",null),h("input",{type:"text",value:t.name,oninput:t.onInput})),h("p",null,h("a",{is:"super-a"},"Super a")),t.name&&t.name.toLowerCase&&t.name.toLowerCase().indexOf("peter")>-1?h("div",{key:"peter",afterRemoved:t.peterRemoved,afterCreate:t.peterCreate,class:"is-peter",eventListeners:[["click",t.onPeterClick]],enterAnimation:t.enterAnimation,exitAnimation:t.exitAnimation},h("p",null,"Hello Peter"),h("img",{class:"is-peter--image",src:"https://s-media-cache-ak0.pinimg.com/474x/ce/1d/07/ce1d07011c0afb8e0614a0ae42a8c861.jpg",height:"140"})):"")},Ut(Tt,t,!1),t.onFooEvent=function(e){t.foo=e.detail.foo},t}return Qt(e,t),Jt(e,[{key:"enterAnimation",value:function(t,e){t.animate([{transform:"translateY(800px)"},{transform:"translateY(0px)"}],{duration:1e3,iterations:1})}},{key:"exitAnimation",value:function(t,e,n){console.log("exit animation",{domNode:t,properties:n}),t.animate([{opacity:1,scale:1},{opacity:0,scale:0}],{duration:1e3,iterations:1}).finished.then(function(){e(t),console.log("removed")})}},{key:"countUpdateAnimation",value:function(t,e,n){t.animate([{transform:"rotate(0) scale(0)"},{transform:"rotate(360deg) scale(1)"}],{duration:1e3,iterations:1})}},{key:"peterRemoved",value:function(){console.log("removed")}},{key:"peterCreate",value:function(){console.log("create")}},{key:"connectedCallback",value:function(){var t=this;if(!Lt(Tt,this)){Ut(Tt,this,!0);var e=this.templateFromString('\n <style>\n\n :host{\n /* display: none; */\n }\n\n .root {\n display: flex;\n padding: 10px;\n flex-direction: row;\n }\n\n #Foo {\n text-decoration: underline;\n }\n\n #SlotContainer ::slotted(*) {\n font-weight: bold;\n color: green;\n font-size: 1.5em;\n }\n\n </style>\n <div class="root"></div>\n ');this.shadowRoot.appendChild(e),this.createProjector(this.shadowRoot.querySelector(".root"),this.render)}setInterval(function(){t.count++,t.renderNow()},5e3),window.addEventListener("foo",this.onFooEvent)}},{key:"attributeChangedCallback",value:function(t,n,r){Xt(e,"attributeChangedCallback",this,3)([t,n,r]),"name"===t&&(this.name=r)}}],[{key:"observedAttributes",get:function(){return["name"]}}])}((oe=function(){function t(){return zt(this,t),$t(this,t,arguments)}return Qt(t,vt),Jt(t)}(),ie=new WeakMap,function(t){function e(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return c(t=o(this,e,[].concat(r)),ie,!1),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(e,t),r=e,(i=[{key:"highlight",get:function(){return e=this,(t=ie).get(l(t,e));var t,e},set:function(t){var e,n,r;n=this,r=t,(e=ie).set(l(e,n),r);var o="unset";t&&(o="yellow");var i=null==this?void 0:this.shadowRoot.querySelector("div");i&&(i.style.backgroundColor=o)}}])&&n(r.prototype,i),a&&n(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i,a}(oe))),_t.isFormAssociated=!0,_t);ne([F],ae.prototype,"name",void 0),ne([F],ae.prototype,"foo",void 0),ne([function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(n,r){Object.defineProperty(n,r,{get:function(){return e?this.shadowRoot.querySelector(t):this.querySelector(t)}})}}("#SlotContainer")],ae.prototype,"slotContainer",void 0),ae=ne([A({tagName:"my-greetings"})],ae);var ue=new WeakMap,ce=new WeakSet,le=function(){function t(){var e,n,r;return zt(this,t),e=$t(this,t,arguments),Bt(n=e,r=ce),r.add(n),Vt(e,ue,void 0),Ut(ue,e,!1),e.disabled=!1,e}return Qt(t,Dt),Jt(t,[{key:"connected",value:function(){console.log("connected"),Ut(ue,this,!0),qt(ce,this,se).call(this)}},{key:"disconnected",value:function(){console.info("disconnected"),Ut(ue,this,!1)}},{key:"shouldUpdate",value:function(t,e,n){return console.info("shouldUpdate",{property:t,oldValue:e,newValue:n}),!0}},{key:"updated",value:function(t,e,n){console.info("updated",{property:t,oldValue:e,newValue:n}),qt(ce,this,se).call(this)}},{key:"hostRenderStart",value:function(t){console.info("hostRenderStart",{isFirstRender:t,controller:this})}},{key:"hostRenderDone",value:function(t){console.info("hostRenderDone",{isFirstRender:t,controller:this})}}])}();function se(){Lt(ue,this)&&(!0===this.disabled?this.hostElement.setAttribute("disabled","!!"):this.hostElement.removeAttribute("disabled"))}ne([I({type:"boolean"})],le.prototype,"disabled",void 0);var fe=(Mt=function(){function t(){var e;return zt(this,t),(e=$t(this,t,arguments)).disabledController=new le(e),e.items=["foo","bar"],e.nickName="de prutser",e.render=function(){var t;return h("div",{classes:{foo:!0,foo__disabled:e.disabledController.disabled}},h("div",null,"Hello ",e.name," ",e.nickName?h("span",null," (",e.nickName,")"):null),h("div",null,"age ",e.age),e.data?h("pre",null,JSON.stringify(e.data,null,2)):null,null===(t=e.items)||void 0===t?void 0:t.map(function(t,e){return h("div",{key:"item".concat(e)},t)}))},e}return Qt(t,vt),Jt(t,[{key:"init",value:function(){console.info("init!!!!")}},{key:"shouldUpdate",value:function(t,e,n){return"name"!==t||"string"!=typeof n||"adolf"!==n.toLocaleLowerCase()}},{key:"updated",value:function(t,e,n){console.info("PFoo",{name:t,old:e,newValue:n})}},{key:"attributeChangedCallback",value:function(e,n,r){Xt(t,"attributeChangedCallback",this,3)([e,n,r]),"disabled"===e&&(this.disabledController.disabled=null!==r)}},{key:"renderStart",value:function(t){console.info("renderStart",{isFirstRender:t,tag:this.tagName})}},{key:"renderDone",value:function(t){console.info("renderDone",{isFirstRender:t,tag:this.tagName})}}])}(),Mt.style=".foo{color: red} .foo__disabled{opacity: 0.5;}",Mt.observedAttributes=["disabled"],Mt);ne([I({type:"string",attribute:"name",reflect:!0})],fe.prototype,"name",void 0),ne([I({type:"number",attribute:"age",reflect:!0})],fe.prototype,"age",void 0),ne([I({type:"object",attribute:"data",reflect:!0})],fe.prototype,"data",void 0),ne([I({attribute:"items",type:"object",reflect:!0,converter:{fromAttribute:function(t){return t?t.split(",").map(function(t){return t.trim()}):null},toAttribute:function(t){return t.join?t.join(","):null}}})],fe.prototype,"items",void 0),ne([I({type:"string",attribute:"nick-name",readonly:!0})],fe.prototype,"nickName",void 0),fe=ne([A({tagName:"p-foo"})],fe);var pe=function(){function t(){var e;return zt(this,t),(e=$t(this,t)).onclick=function(t){t.preventDefault(),alert("super")},e}return Qt(t,Wt(HTMLAnchorElement)),Jt(t,[{key:"connectedCallback",value:function(){this.classList.add("super"),this.style.color="red"}}])}(),de=(It=function(){function t(){var e;return zt(this,t),(e=$t(this,t,arguments)).hasPFoo=!1,e.render=function(){return h("div",{class:"root"},h("span",null,"Delegate focus. The input should be focused when you click on me."),h("input",{type:"text",placeholder:"I should be focused"}),h("hr",null),h("span",null,"Also p-foo should be rendered below when it is defined."),e.hasPFoo?h("p-foo",{name:"peter","nick-name":"web component freak",age:123,items:["baz","bar"]}):null)},e}return Qt(t,vt),Jt(t,[{key:"connectedCallback",value:function(){var e=this;Xt(t,"connectedCallback",this,3)([]),customElements.whenDefined("p-foo").then(function(){e.hasPFoo=!0})}}])}(),It.style="\n .root {\n display: flex;\n flex-direction: column;\n gap: 10px;\n background-color: #eee;\n padding: 10px;\n }",It.delegatesFocus=!0,It);ne([I({type:"boolean",attribute:"has-p-foo"})],de.prototype,"hasPFoo",void 0),de=ne([A({tagName:"delegate-focus-demo"})],de),window.customElements.define("super-a",pe,{extends:"a"});export{re as MyButton,ae as MyGreetings};
|
package/demo/screen.css
ADDED
package/demo/theme.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! P-ELEMENTS 2.1.0-rc7 - Mon Feb 09 2026 09:56:55 GMT+0100 (Midden-Europese standaardtijd) */var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};(()=>{const{keys:e}=Object,t=!0,r=!1,n="querySelectorAll",o="querySelectorAll",{document:i,Element:a,MutationObserver:s,Set:l,WeakMap:c}=self,u=e=>o in e,{filter:d}=[],f=e=>{const f=new c,p=(t,r)=>{let n;if(r)for(let o,i=(e=>e.matches||e.webkitMatchesSelector||e.msMatchesSelector)(t),a=0,{length:s}=m;a<s;a++)i.call(t,o=m[a])&&(f.has(t)||f.set(t,new l),n=f.get(t),n.has(o)||(n.add(o),e.handle(t,r,o)));else f.has(t)&&(n=f.get(t),f.delete(t),n.forEach(n=>{e.handle(t,r,n)}))},h=(e,t=!0)=>{for(let r=0,{length:n}=e;r<n;r++)p(e[r],t)},{query:m}=e,y=e.root||i,v=((e,o=document,i=MutationObserver,a=["*"])=>{const s=(r,o,i,a,l,c)=>{for(const u of r)(c||n in u)&&(l?i.has(u)||(i.add(u),a.delete(u),e(u,l)):a.has(u)||(a.add(u),i.delete(u),e(u,l)),c||s(u[n](o),o,i,a,l,t))},l=new i(e=>{if(a.length){const n=a.join(","),o=new Set,i=new Set;for(const{addedNodes:a,removedNodes:l}of e)s(l,n,o,i,r,r),s(a,n,o,i,t,r)}}),{observe:c}=l;return(l.observe=e=>c.call(l,e,{subtree:t,childList:t}))(o),l})(p,y,s,m),{attachShadow:b}=a.prototype;return b&&(a.prototype.attachShadow=function(e){const t=b.call(this,e);return v.observe(t),t}),m.length&&h(y[o](m)),{drop:e=>{for(let t=0,{length:r}=e;t<r;t++)f.delete(e[t])},flush:()=>{const e=v.takeRecords();for(let t=0,{length:r}=e;t<r;t++)h(d.call(e[t].removedNodes,u),!1),h(d.call(e[t].addedNodes,u),!0)},observer:v,parse:h}},{customElements:p,document:h,Element:m,MutationObserver:y,Object:v,Promise:b,Map:g,Set:w,WeakMap:S,Reflect:E}=self,{createElement:A}=h,{define:O,get:k,upgrade:N}=p,{construct:M}=E||{construct(e){return e.call(this)}},{defineProperty:C,getOwnPropertyNames:j,setPrototypeOf:x}=v,T=new S,P=new w,I=new g,L=new g,R=new g,F=new g,V=[],W=[],D=e=>F.get(e)||k.call(p,e),{parse:H}=f({query:W,handle:(t,r,n)=>{const o=R.get(n);if(r&&!o.isPrototypeOf(t)){const r=(t=>{const r=e(t),n=[],o=new Set,{length:i}=r;for(let e=0;e<i;e++){n[e]=t[r[e]];try{delete t[r[e]]}catch(t){o.add(e)}}return()=>{for(let e=0;e<i;e++)o.has(e)||(t[r[e]]=n[e])}})(t);U=x(t,o);try{new o.constructor}finally{U=null,r()}}const i=(r?"":"dis")+"connectedCallback";i in o&&t[i]()}}),{parse:q}=f({query:V,handle(e,t){T.has(e)&&(t?P.add(e):P.delete(e),W.length&&z.call(W,e))}}),{attachShadow:$}=m.prototype;$&&(m.prototype.attachShadow=function(e){const t=$.call(this,e);return T.set(this,t),t});const _=e=>{if(!L.has(e)){let t,r=new b(e=>{t=e});L.set(e,{$:r,_:t})}return L.get(e).$},B=((e,t)=>{const r=e=>{for(let t=0,{length:r}=e;t<r;t++)n(e[t])},n=({target:e,attributeName:t,oldValue:r})=>{e.attributeChangedCallback(t,r,e.getAttribute(t))};return(o,i)=>{const{observedAttributes:a}=o.constructor;return a&&e(i).then(()=>{new t(r).observe(o,{attributes:!0,attributeOldValue:!0,attributeFilter:a});for(let e=0,{length:t}=a;e<t;e++)o.hasAttribute(a[e])&&n({target:o,attributeName:a[e],oldValue:null})}),o}})(_,y);let U=null;function z(e){const t=T.get(e);H(t.querySelectorAll(this),e.isConnected)}j(self).filter(e=>/^HTML.*Element$/.test(e)).forEach(e=>{const t=self[e];function r(){const{constructor:e}=this;if(!I.has(e))throw new TypeError("Illegal constructor");const{is:r,tag:n}=I.get(e);if(r){if(U)return B(U,r);const t=A.call(h,n);return t.setAttribute("is",r),B(x(t,e.prototype),r)}return M.call(this,t,[],e)}x(r,t),C(r.prototype=t.prototype,"constructor",{value:r}),C(self,e,{value:r})}),h.createElement=function(e,t){const r=t&&t.is;if(r){const t=F.get(r);if(t&&I.get(t).tag===e)return new t}const n=A.call(h,e);return r&&n.setAttribute("is",r),n},p.get=D,p.whenDefined=_,p.upgrade=function(e){const t=e.getAttribute("is");if(t){const r=F.get(t);if(r)return void B(x(e,r.prototype),t)}N.call(p,e)},p.define=function(e,t,r){if(D(e))throw new Error(`'${e}' has already been defined as a custom element`);let n;const o=r&&r.extends;I.set(t,o?{is:e,tag:o}:{is:"",tag:e}),o?(n=`${o}[is="${e}"]`,R.set(n,t.prototype),F.set(e,t),W.push(n)):(O.apply(p,arguments),V.push(n=e)),_(e).then(()=>{o?(H(h.querySelectorAll(n)),P.forEach(z,[n])):q(h.querySelectorAll(n))}),L.get(e)._(t)}})(),(()=>{const e=new WeakMap,t=new WeakMap,r=new WeakMap,n=new WeakMap,o=new WeakMap,i=new WeakMap,a=new WeakMap,s=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,h=new WeakMap,m=(e,t,r)=>{e.getAttribute(t)!==r&&e.setAttribute(t,r)},y=(e,t)=>{e.toggleAttribute("internals-disabled",t),t?m(e,"aria-disabled","true"):e.removeAttribute("aria-disabled"),e.formDisabledCallback&&e.formDisabledCallback.apply(e,[t])},v=e=>{r.get(e).forEach(e=>{e.remove()}),r.set(e,[])},b=(e,t)=>{const n=document.createElement("input");return n.type="hidden",n.name=e.getAttribute("name"),e.after(n),r.get(t).push(n),n},g=(e,t)=>{if(t.length){const r=Array.from(t);r.forEach(t=>t.addEventListener("click",e.click.bind(e)));const[n]=r;let o=n.id;n.id||(o=`${n.htmlFor}_Label`,n.id=o),m(e,"aria-labelledby",o)}},w=e=>{const t=Array.from(e.elements).filter(e=>!e.tagName.includes("-")&&e.validity).map(e=>e.validity.valid),r=s.get(e)||[],o=[...t,...Array.from(r).filter(e=>e.isConnected).map(e=>n.get(e).validity.valid)].includes(!1);e.toggleAttribute("internals-invalid",o),e.toggleAttribute("internals-valid",!o)},S=e=>{w(k(e.target))},E=e=>{w(k(e.target))},A=e=>{const t=s.get(e.target);t&&t.size&&t.forEach(e=>{e.constructor.formAssociated&&e.formResetCallback&&e.formResetCallback.apply(e)})},O=(e,t,r)=>{if(t){const o=s.get(t);if(o)o.add(e);else{const r=new Set;r.add(e),s.set(t,r),(e=>{const t=["button[type=submit]","input[type=submit]","button:not([type])"].map(e=>`${e}:not([disabled])`).map(t=>`${t}:not([form])${e.id?`,${t}[form='${e.id}']`:""}`).join(",");e.addEventListener("click",r=>{if(r.target.closest(t)){const t=s.get(e);if(e.noValidate)return;t.size&&Array.from(t).reverse().map(e=>n.get(e).reportValidity()).includes(!1)&&r.preventDefault()}})})(t),t.addEventListener("reset",A),t.addEventListener("input",S),t.addEventListener("change",E)}i.set(t,{ref:e,internals:r}),e.constructor.formAssociated&&e.formAssociatedCallback&&setTimeout(()=>{e.formAssociatedCallback.apply(e,[t])},0),w(t)}},k=e=>{let t=e.parentNode;return t&&"FORM"!==t.tagName&&(t=k(t)),t},N=(e,t,r=DOMException)=>{if(!e.constructor.formAssociated)throw new r(t)},M=(e,t,r)=>{const o=s.get(e);return o&&o.size&&o.forEach(e=>{n.get(e)[r]()||(t=!1)}),t},C=e=>{let t=!1;if(e.constructor.formAssociated){let r=n.get(e);void 0===r&&(e.attachInternals(),r=n.get(e),t=!0);const{labels:o,form:i}=r;g(e,o),O(e,i,r)}return t};function j(){return"undefined"!=typeof MutationObserver}const x={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBrailleLabel:"aria-braillelabel",ariaBrailleRoleDescription:"aria-brailleroledescription",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"};function T(e){const t=n.get(e),{form:r}=t;O(e,r,t),g(e,t.labels)}const P=(e,t=!1)=>{const r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>n.has(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let o=r.nextNode();const i=!t||e.disabled;for(;o;)o.formDisabledCallback&&i&&y(o,e.disabled),o=r.nextNode()},I={attributes:!0,attributeFilter:["disabled","name"]},L=j()?new MutationObserver(e=>{for(const t of e){const e=t.target;if("disabled"===t.attributeName&&(e.constructor.formAssociated?y(e,e.hasAttribute("disabled")):"fieldset"===e.localName&&P(e)),"name"===t.attributeName&&e.constructor.formAssociated){const t=n.get(e),r=l.get(e);t.setFormValue(r)}}}):{};function R(e){e.forEach(e=>{const{addedNodes:t,removedNodes:o}=e,i=Array.from(t),l=Array.from(o);i.forEach(e=>{if(n.has(e)&&e.constructor.formAssociated&&T(e),c.has(e)){const t=c.get(e);Object.keys(x).filter(e=>null!==t[e]).forEach(r=>{m(e,x[r],t[r])}),c.delete(e)}if(h.has(e)){const t=h.get(e);m(e,"internals-valid",t.validity.valid.toString()),m(e,"internals-invalid",(!t.validity.valid).toString()),m(e,"aria-invalid",(!t.validity.valid).toString()),h.delete(e)}if("form"===e.localName){const t=s.get(e),r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>!n.has(e)||!e.constructor.formAssociated||t&&t.has(e)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT});let o=r.nextNode();for(;o;)T(o),o=r.nextNode()}"fieldset"===e.localName&&(L.observe?.(e,I),P(e,!0))}),l.forEach(e=>{const t=n.get(e);if(t&&r.get(t)&&v(t),a.has(e)){a.get(e).disconnect()}})})}function F(e){e.forEach(e=>{const{removedNodes:t}=e;t.forEach(t=>{const r=f.get(e.target);n.has(t)&&C(t),r.disconnect()})})}j()&&new MutationObserver(R);const V={childList:!0,subtree:!0};class W{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}}const D=e=>{let t=!0;for(let r in e)"valid"!==r&&!1!==e[r]&&(t=!1);return t},H=new WeakMap;function q(e,t){e.toggleAttribute(t,!0),e.part&&e.part.add(t)}class $ extends Set{static get isPolyfilled(){return!0}constructor(e){if(super(),!e||!e.tagName||-1===e.tagName.indexOf("-"))throw new TypeError("Illegal constructor");H.set(this,e)}add(e){if(!/^--/.test(e)||"string"!=typeof e)throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${e} must start with '--'.`);const t=super.add(e),r=H.get(this),n=`state${e}`;return r.isConnected?q(r,n):setTimeout(()=>{q(r,n)}),t}clear(){for(let[e]of this.entries())this.delete(e);super.clear()}delete(e){const t=super.delete(e),r=H.get(this);return r.isConnected?(r.toggleAttribute(`state${e}`,!1),r.part&&r.part.remove(`state${e}`)):setTimeout(()=>{r.toggleAttribute(`state${e}`,!1),r.part&&r.part.remove(`state${e}`)}),t}}var _,B=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},U=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class z{constructor(e){_.set(this,void 0),B(this,_,e,"f");for(let t=0;t<e.length;t++){let r=e[t];this[t]=r,r.hasAttribute("name")&&(this[r.getAttribute("name")]=r)}Object.freeze(this)}get length(){return U(this,_,"f").length}[(_=new WeakMap,Symbol.iterator)](){return U(this,_,"f")[Symbol.iterator]()}item(e){return null==this[e]?null:this[e]}namedItem(e){return null==this[e]?null:this[e]}}class K{static get isPolyfilled(){return!0}constructor(o){if(!o||!o.tagName||-1===o.tagName.indexOf("-"))throw new TypeError("Illegal constructor");const i=o.getRootNode(),a=new W;this.states=new $(o),e.set(this,o),t.set(this,a),n.set(o,this),((e,t)=>{for(let r in x){t[r]=null;let n=null;const o=x[r];Object.defineProperty(t,r,{get:()=>n,set(r){n=r,e.isConnected?m(e,o,r):c.set(e,t)}})}})(o,this),((e,t)=>{r.set(t,[]),L.observe?.(e,I)})(o,this),Object.seal(this),i instanceof DocumentFragment&&(e=>{const t=new MutationObserver(F);window?.ShadyDOM?.inUse&&e.mode&&e.host&&(e=e.host),t.observe?.(e,{childList:!0}),f.set(e,t)})(i)}checkValidity(){const r=e.get(this);if(N(r,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const n=t.get(this);if(!n.valid){const e=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});r.dispatchEvent(e)}return n.valid}get form(){const t=e.get(this);let r;return N(t,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element."),!0===t.constructor.formAssociated&&(r=k(t)),r}get labels(){const t=e.get(this);N(t,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");const r=t.getAttribute("id"),n=t.getRootNode();return n&&r?n.querySelectorAll(`[for="${r}"]`):[]}reportValidity(){const t=e.get(this);if(N(t,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const r=this.checkValidity(),n=d.get(this);if(n&&!t.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!r&&n&&(t.focus(),n.focus()),r}setFormValue(t){const r=e.get(this);if(N(r,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),v(this),null==t||t instanceof FormData)null!=t&&t instanceof FormData&&Array.from(t).reverse().forEach(([e,t])=>{if("string"==typeof t){const n=b(r,this);n.name=e,n.value=t}});else if(r.getAttribute("name")){b(r,this).value=t}l.set(r,t)}setValidity(r,n,i){const a=e.get(this);if(N(a,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!r)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");d.set(this,i);const s=t.get(this),l={};for(const e in r)l[e]=r[e];var c;0===Object.keys(l).length&&((c=s).badInput=!1,c.customError=!1,c.patternMismatch=!1,c.rangeOverflow=!1,c.rangeUnderflow=!1,c.stepMismatch=!1,c.tooLong=!1,c.tooShort=!1,c.typeMismatch=!1,c.valid=!0,c.valueMissing=!1);const u={...s,...l};delete u.valid;const{valid:f}=((e,t,r)=>(e.valid=D(t),Object.keys(t).forEach(r=>e[r]=t[r]),r&&w(r),e))(s,u,this.form);if(!f&&!n)throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");o.set(this,f?"":n),a.isConnected?(a.toggleAttribute("internals-invalid",!f),a.toggleAttribute("internals-valid",f),m(a,"aria-invalid",`${!f}`)):h.set(a,this)}get shadowRoot(){const t=e.get(this),r=u.get(t);return r||null}get validationMessage(){const t=e.get(this);return N(t,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),o.get(this)}get validity(){const r=e.get(this);N(r,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element.");return t.get(this)}get willValidate(){const t=e.get(this);return N(t,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(t.matches(":disabled")||t.disabled||t.hasAttribute("disabled")||t.hasAttribute("readonly"))}}let Q=!1,J=!1;function Y(e){J||(J=!0,window.CustomStateSet=$,e&&(HTMLElement.prototype.attachInternals=function(...t){const r=e.call(this,t);return r.states=new $(this),r}))}!!customElements.polyfillWrapFlushCallback||(function(){if("undefined"==typeof window||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class e extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}const t=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,"")}`;customElements.define(t,e);const r=new e;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every(e=>e in r.internals)}()?"undefined"==typeof window||window.CustomStateSet||Y(HTMLElement.prototype.attachInternals):function(e=!0){let t=!1;if(!Q){if(Q=!0,"undefined"!=typeof window&&(window.ElementInternals=K),"undefined"!=typeof CustomElementRegistry){const r=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(e,n,o){if(n.formAssociated){const e=n.prototype.connectedCallback;n.prototype.connectedCallback=function(){p.has(this)||(p.set(this,!0),this.hasAttribute("disabled")&&y(this,!0)),null!=e&&e.apply(this),t=C(this)}}r.call(this,e,n,o)}}if("undefined"!=typeof HTMLElement&&(HTMLElement.prototype.attachInternals=function(){if(!this.tagName)return{};if(-1===this.tagName.indexOf("-"))throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.");if(n.has(this)&&!t)throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new K(this)}),"undefined"!=typeof Element){function o(...e){const t=i.apply(this,e);if(u.set(this,t),j()){const e=new MutationObserver(R);window.ShadyDOM?e.observe(this,V):e.observe(t,V),a.set(this,e)}return t}const i=Element.prototype.attachShadow;Element.prototype.attachShadow=o}j()&&"undefined"!=typeof document&&new MutationObserver(R).observe(document.documentElement,V),"undefined"!=typeof HTMLFormElement&&function(){const e=HTMLFormElement.prototype.checkValidity;HTMLFormElement.prototype.checkValidity=function(...t){let r=e.apply(this,t);return M(this,r,"checkValidity")};const t=HTMLFormElement.prototype.reportValidity;HTMLFormElement.prototype.reportValidity=function(...e){let r=t.apply(this,e);return M(this,r,"reportValidity")};const{get:r}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get(...e){const t=r.call(this,...e),n=Array.from(s.get(this)||[]);if(0===n.length)return t;const o=Array.from(t).concat(n).sort((e,t)=>e.compareDocumentPosition?2&e.compareDocumentPosition(t)?1:-1:0);return new z(o)}})}(),(e||"undefined"!=typeof window&&!window.CustomStateSet)&&Y()}}(!1))})(),(()=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}e.d(t,{Y8:()=>n,K9:()=>G,y0:()=>o,Wd:()=>de,zG:()=>Qe,mA:()=>h,dd:()=>m,XK:()=>i,Qf:()=>Ye,h:()=>Je});var n=function(e,t,n){var o=n.value;if("function"!=typeof o)throw new Error("@Bind decorator can only be applied to methods not: ".concat(r(o)));var i=!1;return{configurable:!0,get:function(){if(i||this===e.prototype||this.hasOwnProperty(t)||"function"!=typeof o)return o;var r=o.bind(this);return i=!0,Object.defineProperty(this,t,{configurable:!0,get:function(){return r},set:function(e){o=e,delete this[t]}}),i=!1,r},set:function(e){o=e}}},o=function(e){return function(t){customElements.get(e.tagName)?console.warn("Custom element with tag name ".concat(e.tagName," already exists.")):customElements.define(e.tagName,t,e.options)}},i=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(r,n){Object.defineProperty(r,n,{get:function(){return t?this.shadowRoot.querySelector(e):this.querySelector(e)}})}};function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach(function(t){l(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function l(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}var u=new WeakSet,d=new WeakMap,f=new WeakMap;function p(e,t,r,n,o){n===Boolean?r?e.setAttribute(t,""):e.removeAttribute(t):n===Object||n===Array?o&&o.toAttribute?e.setAttribute(t,o.toAttribute(r)):e.setAttribute(t,JSON.stringify(r)):null==r?e.removeAttribute(t):e.setAttribute(t,String(r))}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.type,r=e.attribute,n=void 0===r||r,o=e.reflect,i=void 0!==o&&o,a=e.converter,l=e.readonly,h=void 0!==l&&l,m=function(e){if("string"==typeof e)switch(e){case"string":return String;case"number":return Number;case"boolean":return Boolean;case"object":return Object;case"array":return Array;default:return null}return e}(t);return function(t,r){var o=new WeakMap,l=function(e,t){if(!1!==t)return!0===t?e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase():"string"==typeof t?t:void 0}(r,n);Object.defineProperty(t,r,{get:function(){if(!o.has(this)&&l&&this.hasAttribute&&this.hasAttribute(l)){var e,t=this.getAttribute(l);if(null!==t)return e=a&&a.fromAttribute?a.fromAttribute(t):m===Boolean||(m===Number?Number(t):t),o.set(this,e),"function"==typeof this.renderNow&&this.renderNow(),e}return o.has(this)?o.get(this):m!==Boolean&&void 0},set:function(e){if(!h||!o.has(this)){var t,n=o.get(this),s=!1;if(null==m&&e!==n&&(s=!0),!o.has(this)&&l&&this.hasAttribute&&this.hasAttribute(l)){var y=this.getAttribute(l);if(null!==y)return t=a&&a.fromAttribute?a.fromAttribute(y):m===Boolean||(m===Number?Number(y):y),o.set(this,t),void(this.isConnected?("function"==typeof this.renderNow&&this.renderNow(),this.updated&&this.updated(r,n,t)):this.updated&&(f.has(this)||f.set(this,[]),f.get(this).push({propertyKey:r,oldValue:n,newValue:t})))}if(t=s?e:function(e,t,r){if(r&&r.fromAttribute&&"string"==typeof e)return r.fromAttribute(e);if(null==e)return e;switch(t){case String:return String(e);case Number:return Number(e);case Boolean:return Boolean(e);case Object:return"object"===c(e)?e:JSON.parse(String(e));case Array:return Array.isArray(e)?e:JSON.parse(String(e));default:return e}}(e,m,a),n!==t){var v=!this.shouldUpdate||this.shouldUpdate(r,n,t);if(o.set(this,v?t:n),i&&void 0!==l)if(this.isConnected){u.add(this);try{p(this,l,v?t:n,m,a)}finally{u.delete(this)}}else d.has(this)||d.set(this,new Map),d.get(this).set(l,{value:v?t:n,type:m,converter:a});this.isConnected?("function"==typeof this.renderNow&&this.renderNow(),this.updated&&this.updated(r,n,t)):this.updated&&(f.has(this)||f.set(this,[]),f.get(this).push({propertyKey:r,oldValue:n,newValue:t})),s&&"function"==typeof this.renderNow&&this.renderNow()}}},configurable:!0}),t.constructor._propertyInfo||(t.constructor._propertyInfo=new Map),t.constructor._propertyInfo.set(r,s(s({},e),{},{name:r,attribute:l,type:m})),l&&(t.constructor.observedAttributes||(t.constructor.observedAttributes=[]),t.constructor.observedAttributes.includes(l)||t.constructor.observedAttributes.push(l))}}var m=h({});function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){if(e){if("string"==typeof e)return g(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E(n.key),n)}}function E(e){var t=function(e,t){if("object"!=w(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==w(t)?t:t+""}function A(e,t){if(t&&("object"==w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function O(e){var t="function"==typeof Map?new Map:void 0;return O=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(k())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&N(o,r.prototype),o}(e,arguments,M(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),N(r,e)},O(e)}function k(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(k=function(){return!!e})()}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}function M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},M(e)}function C(e,t,r){j(e,t),t.set(e,r)}function j(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function x(e,t){return e.get(P(e,t))}function T(e,t,r){return e.set(P(e,t),r),r}function P(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var I=[],L=new WeakMap,R=new WeakMap,F=new WeakMap,V=new WeakMap,W=new WeakMap,D=new WeakMap,H=new WeakMap,q=new WeakMap,$=new WeakMap,_=new WeakMap,B=new WeakMap,U=new WeakMap,z=new WeakMap,K=new WeakMap,Q=new WeakMap,J=new WeakMap,Y=new WeakSet,G=function(e){function t(e){var r,n,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,o=M(o=t),function(e,t){j(e,t),t.add(e)}(r=A(n,k()?Reflect.construct(o,i||[],M(n).constructor):o.apply(n,i)),Y),C(r,L,void 0),C(r,R,void 0),C(r,F,!1),C(r,V,void 0),C(r,W,void 0),C(r,D,void 0),C(r,H,!1),C(r,q,!1),C(r,$,!1),C(r,_,!0),C(r,B,!0),C(r,U,null),C(r,z,void 0),C(r,K,[]),C(r,Q,null),C(r,J,null);var a=function(e){console.warn("ElementInternals.".concat(e," called before element was connected. Call will be ignored."))};return T(z,r,{setValidity:function(e,t,r){a("setValidity")},reportValidity:function(){return a("reportValidity"),!1},checkValidity:function(){return a("checkValidity"),!0},setFormValue:function(e,t){a("setFormValue")}}),P(Y,r,te).call(r),P(Y,r,X).call(r),A(r,e)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}(t,e),r=t,n=[{key:"isConnected",get:function(){return x(F,this)}},{key:"updateComplete",get:function(){return x(Q,this)?x(Q,this):Promise.resolve()}},{key:"internals",get:function(){if(!x(F,this)&&"object"===w(x(z,this)))return x(z,this);var e=this.constructor;if(null===x(U,this)&&e.formAssociated){var t=x(z,this);for(var r in T(z,this,null),T(U,this,this.attachInternals()),t)"function"!=typeof x(U,this)[r]&&(x(U,this)[r]=t[r])}return x(U,this)},set:function(e){T(U,this,e)}},{key:"requestUpdate",value:function(){var e=this;return x(Q,this)||(T(Q,this,new Promise(function(t){T(J,e,t)})),this.scheduleRender()),x(Q,this)}},{key:"addController",value:function(e){x(K,this).push(e),x(F,this)&&e.connected&&e.connected()}},{key:"scheduleRender",value:function(){var e;null===(e=x(L,this))||void 0===e||e.scheduleRender()}},{key:"renderNow",value:function(){var e,t=this;if(this.shadowRoot&&(x(Q,this)||T(Q,this,new Promise(function(e){T(J,t,e)})),null===(e=x(L,this))||void 0===e||e.renderNow(),this.updated("",null,null),x(J,this))){var r=x(J,this);T(J,this,null),T(Q,this,null),r()}}},{key:"updated",value:function(e,t,r){}},{key:"shouldUpdate",value:function(e,t,r){return!0}},{key:"addStylesheetToRootNode",value:function(e,t){if(P(Y,this),Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype){if(x(W,this)||T(W,this,new CSSStyleSheet),x(W,this).replaceSync(e),x(H,this))return;if(t instanceof Document){var r=P(Y,this,ne).call(this,e);-1===I.indexOf(r)&&(document.adoptedStyleSheets=[].concat(v(document.adoptedStyleSheets),[x(W,this)]),T(H,this,!0),I.push(r))}else this.shadowRoot.adoptedStyleSheets=[x(W,this)],T(H,this,!0)}else if(T(D,this,document.createElement("link")),x(D,this).rel="stylesheet",x(D,this).href=URL.createObjectURL(new Blob([e],{type:"text/css"})),t instanceof Document){var n=P(Y,this,ne).call(this,e);-1===I.indexOf(n)&&(document.head.appendChild(x(D,this)),I.push(n))}else this.shadowRoot.appendChild(x(D,this))}},{key:"templateFromString",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=document.createElement("template");r.innerHTML=e;var n=document.createDocumentFragment();n.appendChild(r.content);var o=n.querySelector("style");return t&&(T(q,this,!0),this.shadowRoot||this.attachShadow({mode:"open",delegatesFocus:x($,this)})),o&&(P(Y,this,re).call(this,o.textContent),o.remove()),n}},{key:"adoptStyle",value:function(e,t){this.addStylesheetToRootNode(t,e)}},{key:"createProjector",value:function(e,t){var r=this;return new Promise(function(n,o){var i,a=x(R,r)?x(R,r):"append";requestAnimationFrame(function(){(i=window.Maquette.createProjector({performanceLogger:function(e){"renderStart"!==e&&"renderDone"!==e||P(Y,r,Z).call(r,e)}}))[a](e,t.bind(r)),T(L,r,i),i.renderNow(),n(i),r.dispatchEvent(new CustomEvent("firstRender",{}))})})}},{key:"connectedCallback",value:function(){T(F,this,!0);for(var e=0,t=x(K,this).length;e<t;){var r=x(K,this)[e];null!=r&&r.connected&&r.connected(),e+=1}!function(e){var t=d.get(e);if(t){u.add(e);try{t.forEach(function(t,r){p(e,r,t.value,t.type,t.converter)})}finally{u.delete(e)}d.delete(e)}var r=f.get(e);if(r&&e.updated){for(var n=r.length,o=0;o<n;){var i=r[o];e.updated(i.propertyKey,i.oldValue,i.newValue),o+=1}f.delete(e)}}(this),this.renderNow()}},{key:"disconnectedCallback",value:function(){T(F,this,!1);for(var e=0,t=x(K,this).length;e<t;){var r=x(K,this)[e];null!=r&&r.disconnected&&r.disconnected(),e+=1}}},{key:"attributeChangedCallback",value:function(e,t,r){if(n=this,!u.has(n)){var n,o=this.constructor;if(null!=o&&o._propertyInfo){var i=Array.from(o._propertyInfo.values()).find(function(t){return t.attribute===e&&"string"==typeof t.attribute});if(i){var a=i.converter,s=r;null!=a&&a.fromAttribute?s=a.fromAttribute(r):i.type===Boolean?s=null!==r:i.type===Number&&(s=null===r?null:Number(r)),this[i.name]=s,this.scheduleRender()}}}}},{key:"render",value:function(){return null}}],n&&S(r.prototype,n),o&&S(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(O(HTMLElement));function X(){"function"==typeof this.init&&(this.init(),x(K,this).forEach(function(e){null==e||e.init()}))}function Z(e){var t=this;this[e]&&this[e](x("renderStart"===e?_:B,this));var r="host".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));x(K,this).forEach(function(n){n[r]&&n[r](x("renderStart"===e?_:B,t))}),T("renderStart"===e?_:B,this,!1)}function ee(){var e=this.constructor;if(e._propertyInfo)for(var t=Array.from(e._propertyInfo.entries()),r=0,n=t.length;r<n;){var o=y(t[r],1)[0];if(Object.hasOwn(this,o)){var i=this[o];delete this[o],this[o]=i}r+=1}}function te(){var e=this,t=this.constructor.projectorMode;T(R,this,t||"append");var r=this.constructor.formAssociated,n=this.constructor.delegatesFocus;T($,this,n),r&&T(U,this,this.attachInternals());var o=this.constructor.style;if(o){T(q,this,!0),T(R,this,"replace"),this.shadowRoot||this.attachShadow({mode:"open",delegatesFocus:x($,this)}),P(Y,this,re).call(this,o);var i=document.createElement("div");this.shadowRoot.appendChild(i),requestAnimationFrame(function(){e.createProjector(i,e.render).then(function(){P(Y,e,ee).call(e)})})}}function re(e){T(V,this,e),x(q,this)&&this.shadowRoot?this.addStylesheetToRootNode(e,this.shadowRoot):x(q,this)||this.addStylesheetToRootNode(e,document)}function ne(e){for(var t=0,r=0;t<e.length;t++)r=Math.imul(31,r)+e.charCodeAt(t)|0;return r}function oe(e){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oe(e)}function ie(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ae(n.key),n)}}function ae(e){var t=function(e,t){if("object"!=oe(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=oe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==oe(t)?t:t+""}function se(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}function le(e,t){return e.get(ce(e,t))}function ce(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}G._propertyInfo=new Map;var ue=new WeakMap,de=function(){return e=function e(t){var r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),se(this,ue,void 0),n=this,o=t,(r=ue).set(ce(r,n),o),le(ue,this).addController(this)},(t=[{key:"hostElement",get:function(){return le(ue,this)}},{key:"renderNow",value:function(){var e;null===(e=this.hostElement)||void 0===e||e.renderNow()}},{key:"scheduleRender",value:function(){var e;null===(e=this.hostElement)||void 0===e||e.scheduleRender()}}])&&ie(e.prototype,t),r&&ie(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function fe(e){return fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fe(e)}function pe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||he(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function he(e,t){if(e){if("string"==typeof e)return me(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?me(e,t):void 0}}function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var ye,ve="http://www.w3.org/",be="".concat(ve,"2000/svg"),ge="".concat(ve,"1999/xlink"),we=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","readonly","required","reversed","selected","scoped","seamless","typemustmatch"],Se=[],Ee=function(e,t){var r={};return Object.keys(e).forEach(function(t){r[t]=e[t]}),t&&Object.keys(t).forEach(function(e){r[e]=t[e]}),r},Ae=function(e,t){return e.vnodeSelector===t.vnodeSelector&&(e.properties&&t.properties?e.properties.key===t.properties.key&&e.properties.bind===t.properties.bind:!e.properties&&!t.properties)},Oe=function(e){if("string"!=typeof e)throw new Error("Style values must be strings")},ke=function(e,t,r){if(""!==t.vnodeSelector)for(var n=r;n<e.length;n++)if(Ae(e[n],t))return n;return-1},Ne=function(e,t,r,n){var o=e[t];if(""!==o.vnodeSelector){var i=o.properties;if(!(i?void 0===i.key?i.bind:i.key:void 0))for(var a=0;a<e.length;a++)if(a!==t){var s=e[a];if(Ae(s,o))throw{error:new Error("".concat(r.vnodeSelector," had a ").concat(o.vnodeSelector," child ").concat("added"===n?n:"removed",", but there is now more than one. You must add unique key properties to make them distinguishable.")),parentNode:r,childNode:o}}}},Me=function(e){if(e.properties){var t=e.properties.enterAnimation;t&&t(e.domNode,e.properties)}},Ce=[],je=!1,xe=function(e){(e.children||[]).forEach(xe),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},Te=function(){je=!1,Ce.forEach(xe),Ce.length=0},Pe=function(e){Ce.push(e),je||(je=!0,"undefined"!=typeof window&&"requestIdleCallback"in window?window.requestIdleCallback(Te,{timeout:16}):setTimeout(Te,16))},Ie=function(e){var t=e.domNode;if(e.properties){e.properties.eventListeners&&Array.isArray(e.properties.eventListeners)&&e.properties.eventListeners.forEach(function(e){t.removeEventListener(e[0],e[1])});var r=e.properties.exitAnimation;if(r){t.style.pointerEvents="none";return void r(t,function(){t.parentNode&&(t.parentNode.removeChild(t),Pe(e))},e.properties)}}t.parentNode&&(t.parentNode.removeChild(t),Pe(e))},Le=function(e,t,r){if(t){var n,o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=he(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;Fe(i,e,void 0,r)}}catch(e){o.e(e)}finally{o.f()}}},Re=function(e,t,r){if(Le(e,t.children,r),t.text&&(e.textContent=t.text),function(e,t,r){if(t)for(var n=r.eventHandlerInterceptor,o=Object.keys(t),i=o.length,a=function(){var i,a=o[s],l=t[a];if("className"===a)throw new Error('Property "className" is not supported, use "class".');if("class"===a)Ve(e,l,!0);else if("classes"===a)for(var c=Object.keys(l),u=c.length,d=0;d<u;d++){var f=c[d];l[f]&&e.classList.add(f)}else if("styles"===a)for(var p=Object.keys(l),h=p.length,m=0;m<h;m++){var y=p[m],v=l[y];v&&(Oe(v),r.styleApplyer(e,y,v))}else if("on"===a&&l)for(var b=0,g=Object.entries(t.on);b<g.length;b++){var w=pe(g[b],2),S=w[0],E=w[1],A="function"==typeof E?E:E.listener;n&&(A=n(S,A,e,t)),A&&e.addEventListener(S,A,"function"==typeof E?void 0:E.options)}else if("key"!==a&&null!=l){var O=fe(l);"function"===O?(0===a.lastIndexOf("on",0)&&(n&&(l=n(a,l,e,t)),"oninput"===a&&(i=l,l=function(e){i.apply(this,[e]),e.target["oninput-value"]=e.target.value})),e[a]=l):r.namespace===be?"href"===a?e.setAttributeNS(ge,a,l):e.setAttribute(a,l):"string"===O&&"value"!==a&&"innerHTML"!==a?e.setAttribute(a,l):("string"===O&&"value"===a&&null!=e&&e.tagName.indexOf("-")&&e.setAttribute(a,l),e[a]=l)}},s=0;s<i;s++)a()}(e,t.properties,r),t.properties&&t.properties.afterCreate)t.properties.afterCreate.apply(t.properties.bind||t.properties,[e,r,t.vnodeSelector,t.properties,t.children]);else if(t.properties&&t.properties.eventListeners){if(!Array.isArray(t.properties.eventListeners))throw new Error("eventListeners value must be an array");t.properties.eventListeners.forEach(function(t){e.addEventListener(t[0],t[1],t[2])})}},Fe=function(e,t,r,n){var o,i=0,a=e.vnodeSelector,s=t.ownerDocument;if(""===a)e.domNode?e.domNode.nodeValue=e.text:(o=e.domNode=s.createTextNode(e.text),void 0!==r?t.insertBefore(o,r):t.appendChild(o));else{for(var l=0;l<=a.length;++l){var c=a.charAt(l);if(l===a.length||"."===c||"#"===c){var u=a.charAt(i-1),d=a.slice(i,l);if("."===u)o.classList.add(d);else if("#"===u)o.id=d;else{var f;if("svg"===d&&(n=Ee(n,{namespace:be})),void 0!==n.namespace)o=e.domNode=s.createElementNS(n.namespace,d);else o=e.domNode=e.domNode||(null!==(f=e.properties)&&void 0!==f&&f.is?s.createElement(d,{is:e.properties.is}):s.createElement(d)),"input"===d&&e.properties&&void 0!==e.properties.type&&o.setAttribute("type",e.properties.type);void 0!==r?t.insertBefore(o,r):o.parentNode!==t&&t.appendChild(o)}i=l+1}}Re(o,e,n)}},Ve=function(e,t,r){t&&t.split(" ").forEach(function(t){t&&e.classList.toggle(t,r)})},We=function(e,t,r,n,o){if(r===n)return!1;n=n||Se;for(var i,a=(r=r||Se).length,s=n.length,l=0,c=0,u=!1;c<s;){var d=l<a?r[l]:void 0,f=n[c];if(void 0!==d&&Ae(d,f))u=ye(d,f,o)||u,l++;else{var p=ke(r,f,l+1);if(p>=0){for(i=l;i<p;i++)Ie(r[i]),Ne(r,i,e,"removed");u=ye(r[p],f,o)||u,l=p+1}else Fe(f,t,l<a?r[l].domNode:void 0,o),Me(f),Ne(n,c,e,"added")}c++}if(a>l)for(i=l;i<a;i++)Ie(r[i]),Ne(r,i,e,"removed");return u};ye=function(e,t,r){var n=e.domNode,o=!1;if(e===t)return!1;var i=!1;if(""===t.vnodeSelector){if(t.text!==e.text){var a=n.ownerDocument.createTextNode(t.text);return n.parentNode.replaceChild(a,n),t.domNode=a,o=!0}t.domNode=n}else 0===t.vnodeSelector.lastIndexOf("svg",0)&&(r=Ee(r,{namespace:be})),e.text!==t.text&&(i=!0,void 0===t.text?n.removeChild(n.firstChild):n.textContent=t.text),t.domNode=n,i=We(t,n,e.children,t.children,r)||i,i=function(e,t,r,n){if(r){for(var o=!1,i=Object.keys(r),a=i.length,s=0;s<a;s++){var l=i[s],c=r[l],u=t[l];if("class"===l)u!==c&&(Ve(e,u,!1),Ve(e,c,!0));else if("classes"===l)for(var d=e.classList,f=Object.keys(c),p=f.length,h=0;h<p;h++){var m=f[h],y=!!c[m];y!==!!u[m]&&(o=!0,y?d.add(m):d.remove(m))}else if("styles"===l)for(var v=Object.keys(c),b=v.length,g=0;g<b;g++){var w=v[g],S=c[w];S!==u[w]&&(o=!0,S?(Oe(S),n.styleApplyer(e,w,S)):n.styleApplyer(e,w,""))}else if(c||"string"!=typeof u||we.indexOf(l)<0&&(c=""),"value"===l){var E=e[l];E!==c&&(e["oninput-value"]?E===e["oninput-value"]:c!==u)&&(e[l]=c,e["oninput-value"]=void 0),c!==u&&(o=!0)}else if(we.indexOf(l)>=0)"string"==typeof c||!0===c?(e.setAttribute(l,""),e[l]=!0):(e.removeAttribute(l),e[l]=!1),o=!0;else if(c!==u){var A=fe(c);"function"===A&&n.eventHandlerInterceptor||(n.namespace===be?"href"===l?e.setAttributeNS(ge,l,c):e.setAttribute(l,c):"string"===A&&"innerHTML"!==l?"role"===l&&""===c?e.removeAttribute(l):e.setAttribute(l,c):e[l]!==c&&(e[l]=c),o=!0)}}return o}}(n,e.properties,t.properties,r)||i,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[n,r,t.vnodeSelector,t.properties,t.children]);return i&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(n,t.properties,e.properties),o};var De,He=function(e,t){return{getLastRender:function(){return e},update:function(r){if(e.vnodeSelector!==r.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");var n=e;e=r,ye(n,r,t)},domNode:e.domNode}},qe={namespace:void 0,performanceLogger:function(){},eventHandlerInterceptor:void 0,styleApplyer:function(e,t,r){"-"===t.charAt(0)?e.style.setProperty(t,r):e.style[t]=r}},$e=function(e){return Ee(qe,e)},_e={create:function(e,t){return t=$e(t),Fe(e,document.createElement("div"),void 0,t),He(e,t)},append:function(e,t,r){return r=$e(r),Fe(t,e,void 0,r),He(t,r)},insertBefore:function(e,t,r){return r=$e(r),Fe(t,e.parentNode,e,r),He(t,r)},merge:function(e,t,r){return r=$e(r),t.domNode=e,Re(e,t,r),He(t,r)},replace:function(e,t,r){return r=$e(r),Fe(t,e.parentNode,e,r),e.parentNode.removeChild(e),He(t,r)}};De=Array.prototype.find?function(e,t){return e.find(t)}:function(e,t){return e.filter(t)[0]};var Be=function(e,t,r){return function(n,o,i,a){return function(n){r("domEvent",n);var i=t(),a=function(e,t){for(var r=[];e&&e!==t;)r.push(e),e=e.parentNode;return r}(n.currentTarget,i.domNode);a.reverse();var s,l,c,u=function(e,t){var r=e;return t.forEach(function(e){r=r&&r.children?De(r.children,function(t){return t.domNode===e}):void 0}),r}(i.getLastRender(),a);(e.scheduleRender(),u)&&(s=(null!==(l=null!==(c=u.properties["on".concat(n.type)])&&void 0!==c?c:u.properties.on[n.type].listener)&&void 0!==l?l:u.properties.on[n.type]).apply(u.properties.bind||this,arguments));return void 0===s&&this.hasAttribute("data-force-event-handler")&&(s=o.apply(this,arguments)),r("domEventProcessed",n),s}}},Ue=function(e){return{vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}},ze=function(e,t){for(var r=0,n=e.length;r<n;r++){var o=e[r];Array.isArray(o)?ze(o,t):null!=o&&!1!==o&&(o.hasOwnProperty("vnodeSelector")||(o=Ue(o)),t.push(o))}},Ke=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];if(1===n.length&&"string"==typeof n[0])return{vnodeSelector:e,properties:t||void 0,children:void 0,text:n[0],domNode:null};var i=[];return ze(n,i),{vnodeSelector:e,properties:t||void 0,children:i,text:void 0,domNode:null}},Qe={createCache:function(){var e,t;return{invalidate:function(){t=void 0,e=void 0},result:function(r,n){if(e)for(var o=0;o<r.length;o++)e[o]!==r[o]&&(t=void 0);return t||(t=n(),e=r),t}}},createMapping:function(e,t,r){var n=[],o=[];return{results:o,map:function(i){for(var a=i.map(e),s=o.slice(),l=0,c=0;c<i.length;c++){var u=i[c],d=a[c];if(d===n[l])o[c]=s[l],r(u,s[l],c),l++;else{for(var f=!1,p=1;p<n.length+1;p++){var h=(l+p)%n.length;if(n[h]===d){o[c]=s[h],r(i[c],s[h],c),l=h+1,f=!0;break}}f||(o[c]=t(u,c))}}o.length=i.length,n=a}}},createProjector:function(e){var t,r,n=$e(e),o=n.performanceLogger,i=!0,a=!1,s=[],l=[],c=function(e,r,i){var a;n.eventHandlerInterceptor=Be(t,function(){return a},o),a=e(r,i(),n),s.push(a),l.push(i)},u=function(){if(r=void 0,i){i=!1,o("renderStart",void 0);for(var e=0;e<s.length;e++){var t=l[e]();o("rendered",void 0),s[e].update(t),o("patched",void 0)}o("renderDone",void 0),i=!0}};return t={renderNow:u,scheduleRender:function(){r||a||(r=requestAnimationFrame(u))},stop:function(){r&&(cancelAnimationFrame(r),r=void 0),a=!0},resume:function(){a=!1,i=!0,t.scheduleRender()},append:function(e,t){c(_e.append,e,t)},insertBefore:function(e,t){c(_e.insertBefore,e,t)},merge:function(e,t){c(_e.merge,e,t)},replace:function(e,t){c(_e.replace,e,t)},detach:function(e){for(var t=0;t<l.length;t++)if(l[t]===e)return l.splice(t,1),s.splice(t,1)[0];throw new Error("renderFunction was not found")}}},dom:_e,h:Ke};!function(e){e.Maquette=Qe,e.h=Ke,e.CustomElement=G,e.CustomElementController=de,e.CustomElementConfig=o,e.PropertyRenderOnSet=m,e.RenderOnSet=m,e.Property=h,e.Query=i,e.Bind=n}(window);var Je=Qe.h,Ye=m})();const r=t.Y8,n=t.K9,o=t.y0,i=t.Wd,a=t.zG,s=t.mA,l=t.dd,c=t.XK,u=t.Qf,d=t.h;export{r as Bind,n as CustomElement,o as CustomElementConfig,i as CustomElementController,a as Maquette,s as Property,l as PropertyRenderOnSet,c as Query,u as RenderOnSet,d as h};
|
package/dist/p-elements-core.js
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
// P-ELEMENTS 2.1.0-rc5 - Sat May 17 2025 21:51:42 GMT+0200 (Central European Summer Time)
|
|
2
|
-
|
|
3
|
-
var Fe=Object.defineProperty,$e=Object.defineProperties;var Ue=Object.getOwnPropertyDescriptors;var pe=Object.getOwnPropertySymbols;var Be=Object.prototype.hasOwnProperty,Je=Object.prototype.propertyIsEnumerable;var he=e=>{throw TypeError(e)};var me=(e,r,t)=>r in e?Fe(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,ye=(e,r)=>{for(var t in r||(r={}))Be.call(r,t)&&me(e,t,r[t]);if(pe)for(var t of pe(r))Je.call(r,t)&&me(e,t,r[t]);return e},ge=(e,r)=>$e(e,Ue(r));var Z=(e,r,t)=>r.has(e)||he("Cannot "+t);var p=(e,r,t)=>(Z(e,r,"read from private field"),t?t.call(e):r.get(e)),g=(e,r,t)=>r.has(e)?he("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,t),y=(e,r,t,n)=>(Z(e,r,"write to private field"),n?n.call(e,t):r.set(e,t),t),b=(e,r,t)=>(Z(e,r,"access private method"),t);var We=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,ee=new Map;function Ke(e){return e==null?void 0:e.split(";").map(r=>{let[t,n]=r.split(":",2);return{key:t.trim(),value:n?n.trim():""}}).filter(r=>r.key&&r.key!==""&&r.value!=="")}function Ee(e){let r=0,t=e.replace(We,(n,s,l,d)=>{if(d){r++;let a=Ke(d),i="",o=[];return a.forEach(c=>{o.push(c.key),i+=`${s}_-_${c.key}: ${c.value};
|
|
4
|
-
`}),ee.set(s,o),n.replace(s,`${i}
|
|
5
|
-
${s}`)}return n});return r>0?t:null}function be(e){let r=customElements.get("custom-style").cssApplyVars,t=e,n=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,s;for(;s=n.exec(t);){let l=s[0],d=s[1];if(r.has(d)){let a="@apply"+l.split("@apply",2)[1],i=r.get(d).map(o=>`;${o}: var(${d}_-_${o});`).join("");t=t.replace(a,i)}}return t}var B=class extends HTMLLinkElement{connectedCallback(){let r=this.getAttribute("href");fetch(r).then(t=>{t.text().then(n=>{let s=Ee(n);if(!s)return;let l=document.createElement("link");l.rel="stylesheet",l.href=URL.createObjectURL(new Blob([s],{type:"text/css"})),this.parentElement.replaceWith(l),window.dispatchEvent(new CustomEvent("updatecssapply"))})})}};B.cssApplyVars=ee;customElements.whenDefined("custom-style").then(()=>{document.body.parentElement.classList.add("custom-style-defined")});customElements.define("custom-style",B,{extends:"link"});var Pe=(e,r,t)=>{let n=t.value;if(typeof n!="function")throw new Error(`@Bind decorator can only be applied to methods not: ${typeof n}`);let s=!1;return{configurable:!0,get(){if(s||this===e.prototype||this.hasOwnProperty(r)||typeof n!="function")return n;let l=n.bind(this);return s=!0,Object.defineProperty(this,r,{configurable:!0,get(){return l},set(d){n=d,delete this[r]}}),s=!1,l},set(l){n=l}}};var te=e=>r=>{if(customElements.get(e.tagName)){console.warn(`Custom element with tag name ${e.tagName} already exists.`);return}customElements.define(e.tagName,r,e.options)};var re=(e,r=!0)=>function(t,n){Object.defineProperty(t,n,{get:function(){return r?this.shadowRoot.querySelector(e):this.querySelector(e)}})};var Qe=(e,r)=>{if(r!==void 0){if(r===null)return null;switch(e){case"string":return r.toString();case"number":return r.toString();case"object":return JSON.stringify(r)}}},D=e=>(r,t)=>{let n=r.constructor,s=Symbol(t+"_PropertyDecorator");if(n&&!n.observedAttributes&&(n.observedAttributes=[]),n&&!n.__properties__&&(n.__properties__=[]),n.__properties__.push(t),e.attribute&&!e.readonly&&n.observedAttributes.indexOf(e.attribute)===-1&&n.observedAttributes.push(e.attribute),Object.defineProperty(r,`__property_${t}__`,{configurable:!0,enumerable:!0,get:function(){return e}}),e.readonly===!0){Object.defineProperty(r,t,{get:function(){return this[s]},set:function(l){this[s]=l,this==null||this.scheduleRender(),delete this[t],Object.defineProperty(this,t,{configurable:!0,enumerable:!0,get:function(){return this[s]},set:function(){throw new Error("Cannot set read-only property")}}),Object.seal(this[s])}});return}Object.defineProperty(r,t,{configurable:!0,enumerable:!0,get:function(){return this[s]},set:function(l){let d=this[s],a=(this==null?void 0:this.shouldUpdate)&&!this.shouldUpdate(t,d,l),i=this.isCustomElementController?this.hostElement:this,o=e.converter?e.converter.toAttribute(l):Qe(e.type,l);a?(this[s]=d,requestAnimationFrame(()=>{i.setAttribute(e.attribute,d)})):this[s]=l;let c=()=>{this[s]!==d&&(this!=null&&this.scheduleRender&&this.scheduleRender(),this!=null&&this.updated&&this.updated(t,d,this[s]))};if(e.reflect&&e.attribute&&i._canReflect)if(e.type!=="boolean"){if(l==null){i.removeAttribute(e.attribute),c();return}if(i.getAttribute(e.attribute)===o+""){c();return}o!==null?i.setAttribute(e.attribute,o+""):i.removeAttribute(e.attribute)}else{l&&!i.hasAttribute(e.attribute)?i.setAttribute(e.attribute,""):!l&&i.hasAttribute(e.attribute)&&i.removeAttribute(e.attribute),c();return}c(),this!=null&&this.scheduleRender&&this.scheduleRender()}})};var Xe=D({}),ne=Xe;var J=[],N,w,x,V,S,C,k,T,I,_,A,H,$,m,Ce,Se,Ne,Q,W,F,se,ie,v,M,Ae,K=class extends HTMLElement{constructor(t){super();g(this,m);g(this,N);g(this,w);g(this,x);g(this,V);g(this,S);g(this,C);g(this,k,!1);g(this,T);g(this,I);g(this,_);g(this,A,[]);g(this,H,!1);g(this,$,!1);g(this,Q,()=>{let t=this.constructor.__properties__;y(this,N,[]),t&&y(this,N,t.map(n=>ge(ye({},this[`__property_${n}__`]),{name:n})))});g(this,v,!0);g(this,M,!0);return b(this,m,Se).call(this),b(this,m,Ce).call(this),t}get _canReflect(){return p(this,$)}get properties(){return p(this,N)}addController(t){p(this,A).push(t),p(this,H)&&t.connected&&t.connected()}get internals(){return p(this,_)}set internals(t){y(this,_,t)}addStylesheetToRootNode(t,n){if(p(this,m,W)){if(p(this,S)||y(this,S,new CSSStyleSheet),t=b(this,m,F).call(this),p(this,S).replaceSync(t),p(this,k))return;if(n instanceof Document){let s=b(this,m,ie).call(this,t);J.indexOf(s)===-1&&(document.adoptedStyleSheets=[...document.adoptedStyleSheets,p(this,S)],y(this,k,!0),J.push(s))}else this.shadowRoot.adoptedStyleSheets=[p(this,S)],y(this,k,!0)}else if(y(this,C,document.createElement("link")),p(this,C).rel="stylesheet",t=b(this,m,F).call(this),p(this,C).href=URL.createObjectURL(new Blob([t],{type:"text/css"})),n instanceof Document){let s=b(this,m,ie).call(this,t);J.indexOf(s)===-1&&(document.head.appendChild(p(this,C)),J.push(s))}else this.shadowRoot.appendChild(p(this,C))}templateFromString(t,n=!0){let s=document.createElement("template");s.innerHTML=t;let l=document.createDocumentFragment();l.appendChild(s.content);let d=l.querySelector("style");return n&&(y(this,T,!0),this.shadowRoot||this.attachShadow({mode:"open",delegatesFocus:p(this,I)})),b(this,m,se).call(this,d.textContent),d.remove(),window.addEventListener("updatecssapply",()=>{b(this,m,F).call(this)}),l}adoptStyle(t,n){this.addStylesheetToRootNode(n,t)}createProjector(t,n){return new Promise((s,l)=>{let d,a=p(this,x)?p(this,x):"append";requestAnimationFrame(()=>{d=window.Maquette.createProjector({performanceLogger:i=>{(i==="renderStart"||i==="renderDone")&&b(this,m,Ae).call(this,i)}}),d[a](t,n.bind(this)),y(this,w,d),y(this,$,!0),b(this,m,Ne).call(this),d.renderNow(),s(d),this.dispatchEvent(new CustomEvent("firstRender",{}))})})}scheduleRender(){var t;(t=p(this,w))==null||t.scheduleRender()}renderNow(){var t;(t=p(this,w))==null||t.renderNow()}connectedCallback(){y(this,H,!0),p(this,A).forEach(t=>{t==null||t.connected()})}disconnectedCallback(){y(this,H,!1),p(this,A).forEach(t=>{t==null||t.disconnected()})}attributeChangedCallback(t,n,s){let l=p(this,N).find(a=>a.attribute===t);if(!l)return;if(l.converter){this[l.name]=l.converter.fromAttribute(s);return}let d=l.type;d==="string"?this[l.name]=s:d==="number"?this[l.name]=parseFloat(s):d==="boolean"?this[l.name]=s!==null:d==="object"&&(this[l.name]=JSON.parse(s))}};N=new WeakMap,w=new WeakMap,x=new WeakMap,V=new WeakMap,S=new WeakMap,C=new WeakMap,k=new WeakMap,T=new WeakMap,I=new WeakMap,_=new WeakMap,A=new WeakMap,H=new WeakMap,$=new WeakMap,m=new WeakSet,Ce=function(){typeof this.init=="function"&&(this.init(),p(this,A).forEach(t=>{t==null||t.init()}))},Se=function(){p(this,Q).call(this);let t=this.constructor.projectorMode;y(this,x,t||"append");let n=this.constructor.formAssociated,s=this.constructor.delegatesFocus;y(this,I,s),n&&y(this,_,this.attachInternals());let l=this.constructor.style;if(l){y(this,T,!0),y(this,x,"replace"),this.shadowRoot||this.attachShadow({mode:"open",delegatesFocus:p(this,I)}),b(this,m,se).call(this,l);let d=document.createElement("div");this.shadowRoot.appendChild(d),requestAnimationFrame(()=>{this.createProjector(d,this.render)}),window.addEventListener("updatecssapply",()=>{b(this,m,F).call(this)})}},Ne=function(){p(this,N).filter(t=>t.reflect).forEach(t=>{t.type==="string"&&this[t.name]!==void 0&&this[t.name]!==null?this.setAttribute(t.attribute,this[t.name]):t.type==="number"&&this[t.name]!==void 0&&this[t.name]!==null?this.setAttribute(t.attribute,this[t.name].toString()):t.type==="boolean"&&this[t.name]===!0?this[t.name]===!0&&!this.hasAttribute(t.attribute)&&this.setAttribute(t.attribute,""):t.type==="boolean"&&this[t.name]===!1?this.hasAttribute(t.attribute)&&this.removeAttribute(t.attribute):t.type==="object"&&this[t.name]!==void 0&&this[t.name]!==null&&(t.converter?this.setAttribute(t.attribute,t.converter.toAttribute(this[t.name])):this.setAttribute(t.attribute,JSON.stringify(this[t.name])))})},Q=new WeakMap,W=function(){return Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype},F=function(){let t=be(p(this,V));return p(this,V)!==t&&(y(this,V,t),p(this,m,W)&&p(this,S)?p(this,S).replaceSync(t):p(this,m,W)||(p(this,C)&&URL.revokeObjectURL(p(this,C).href),p(this,C).href=URL.createObjectURL(new Blob([t],{type:"text/css"})))),t},se=function(t){y(this,V,t),p(this,T)&&this.shadowRoot?this.addStylesheetToRootNode(t,this.shadowRoot):p(this,T)||this.addStylesheetToRootNode(t,document)},ie=function(t){for(var n=0,s=0;n<t.length;n++)s=Math.imul(31,s)+t.charCodeAt(n)|0;return s},v=new WeakMap,M=new WeakMap,Ae=function(t){this[t]&&this[t](t==="renderStart"?p(this,v):p(this,M));let n=`host${t.charAt(0).toUpperCase()}${t.slice(1)}`;p(this,A).forEach(s=>{s[n]&&s[n](t==="renderStart"?p(this,v):p(this,M))}),t==="renderStart"?y(this,v,!1):y(this,M,!1)};var O,X=class{constructor(r){g(this,O);y(this,O,r),p(this,O).addController(this)}get hostElement(){return p(this,O)}renderNow(){var r;(r=this.hostElement)==null||r.renderNow()}scheduleRender(){var r;(r=this.hostElement)==null||r.scheduleRender()}};O=new WeakMap;var xe=()=>{let e,r;return{invalidate:()=>{r=void 0,e=void 0},result:(t,n)=>{if(e)for(let s=0;s<t.length;s++)e[s]!==t[s]&&(r=void 0);return r||(r=n(),e=t),r}}};var Ve=(e,r,t)=>{let n=[],s=[];return{results:s,map:l=>{let d=l.map(e),a=s.slice(),i=0;for(let o=0;o<l.length;o++){let c=l[o],u=d[o];if(u===n[i])s[o]=a[i],t(c,a[i],o),i++;else{let f=!1;for(let h=1;h<n.length+1;h++){let E=(i+h)%n.length;if(n[E]===u){s[o]=a[E],t(l[o],a[E],o),i=E+1,f=!0;break}}f||(s[o]=r(c,o))}}s.length=l.length,n=d}}};var ke="http://www.w3.org/",Y=`${ke}2000/svg`,Ie=`${ke}1999/xlink`,Te=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","readonly","required","reversed","selected","scoped","seamless","typemustmatch"],je=[],z=(e,r)=>{let t={};return Object.keys(e).forEach(n=>{t[n]=e[n]}),r&&Object.keys(r).forEach(n=>{t[n]=r[n]}),t},de=(e,r)=>e.vnodeSelector!==r.vnodeSelector?!1:e.properties&&r.properties?e.properties.key!==r.properties.key?!1:e.properties.bind===r.properties.bind:!e.properties&&!r.properties,_e=e=>{if(typeof e!="string")throw new Error("Style values must be strings")},Ge=(e,r,t)=>{if(r.vnodeSelector!==""){for(let n=t;n<e.length;n++)if(de(e[n],r))return n}return-1},oe=(e,r,t,n)=>{let s=e[r];if(s.vnodeSelector==="")return;let l=s.properties;if(!(l?l.key===void 0?l.bind:l.key:void 0)){for(let a=0;a<e.length;a++)if(a!==r){let i=e[a];if(de(i,s))throw{error:new Error(`${t.vnodeSelector} had a ${s.vnodeSelector} child ${n==="added"?n:"removed"}, but there is now more than one. You must add unique key properties to make them distinguishable.`),parentNode:t,childNode:s}}}},Ye=e=>{if(e.properties){let r=e.properties.enterAnimation;r&&r(e.domNode,e.properties)}},le=[],ae=!1,He=e=>{(e.children||[]).forEach(He),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},Re=()=>{ae=!1,le.forEach(He),le.length=0},Le=e=>{le.push(e),ae||(ae=!0,typeof window!="undefined"&&"requestIdleCallback"in window?window.requestIdleCallback(Re,{timeout:16}):setTimeout(Re,16))},we=e=>{let r=e.domNode;if(e.properties){e.properties.eventListeners&&Array.isArray(e.properties.eventListeners)&&e.properties.eventListeners.forEach(n=>{r.removeEventListener(n[0],n[1])});let t=e.properties.exitAnimation;if(t){r.style.pointerEvents="none",t(r,()=>{r.parentNode&&(r.parentNode.removeChild(r),Le(e))},e.properties);return}}r.parentNode&&(r.parentNode.removeChild(r),Le(e))},ze=(e,r,t)=>{if(!r)return;let n=t.eventHandlerInterceptor,s=Object.keys(r),l=s.length;for(let d=0;d<l;d++){let a=s[d],i=r[a];if(a==="className")throw new Error('Property "className" is not supported, use "class".');if(a==="class")ue(e,i,!0);else if(a==="classes"){let o=Object.keys(i),c=o.length;for(let u=0;u<c;u++){let f=o[u];i[f]&&e.classList.add(f)}}else if(a==="styles"){let o=Object.keys(i),c=o.length;for(let u=0;u<c;u++){let f=o[u],h=i[f];h&&(_e(h),t.styleApplyer(e,f,h))}}else if(a==="on"&&i)for(let[o,c]of Object.entries(r.on)){let u=typeof c=="function"?c:c.listener;n&&(u=n(o,u,e,r)),u&&e.addEventListener(o,u,typeof c=="function"?void 0:c.options)}else if(a!=="key"&&i!==null&&i!==void 0){let o=typeof i;o==="function"?(a.lastIndexOf("on",0)===0&&(n&&(i=n(a,i,e,r)),a==="oninput"&&function(){let c=i;i=function(u){c.apply(this,[u]),u.target["oninput-value"]=u.target.value}}()),e[a]=i):t.namespace===Y?a==="href"?e.setAttributeNS(Ie,a,i):e.setAttribute(a,i):o==="string"&&a!=="value"&&a!=="innerHTML"?e.setAttribute(a,i):(o==="string"&&a==="value"&&(e!=null&&e.tagName.indexOf("-"))&&e.setAttribute(a,i),e[a]=i)}}},Ze=(e,r,t)=>{if(r)for(let n of r)j(n,e,void 0,t)},ce=(e,r,t)=>{if(Ze(e,r.children,t),r.text&&(e.textContent=r.text),ze(e,r.properties,t),r.properties&&r.properties.afterCreate)r.properties.afterCreate.apply(r.properties.bind||r.properties,[e,t,r.vnodeSelector,r.properties,r.children]);else if(r.properties&&r.properties.eventListeners)if(Array.isArray(r.properties.eventListeners))r.properties.eventListeners.forEach(n=>{e.addEventListener(n[0],n[1],n[2])});else throw new Error("eventListeners value must be an array")},j=(e,r,t,n)=>{var i;let s,l=0,d=e.vnodeSelector,a=r.ownerDocument;if(d==="")e.domNode?e.domNode.nodeValue=e.text:(s=e.domNode=a.createTextNode(e.text),t!==void 0?r.insertBefore(s,t):r.appendChild(s));else{for(let o=0;o<=d.length;++o){let c=d.charAt(o);if(o===d.length||c==="."||c==="#"){let u=d.charAt(l-1),f=d.slice(l,o);u==="."?s.classList.add(f):u==="#"?s.id=f:(f==="svg"&&(n=z(n,{namespace:Y})),n.namespace!==void 0?s=e.domNode=a.createElementNS(n.namespace,f):(s=e.domNode=e.domNode||((i=e.properties)!=null&&i.is?a.createElement(f,{is:e.properties.is}):a.createElement(f)),f==="input"&&e.properties&&e.properties.type!==void 0&&s.setAttribute("type",e.properties.type)),t!==void 0?r.insertBefore(s,t):s.parentNode!==r&&r.appendChild(s)),l=o+1}}ce(s,e,n)}},G,ue=(e,r,t)=>{r&&r.split(" ").forEach(n=>{n&&e.classList.toggle(n,t)})},et=(e,r,t,n)=>{if(!t)return;let s=!1,l=Object.keys(t),d=l.length;for(let a=0;a<d;a++){let i=l[a],o=t[i],c=r[i];if(i==="class")c!==o&&(ue(e,c,!1),ue(e,o,!0));else if(i==="classes"){let u=e.classList,f=Object.keys(o),h=f.length;for(let E=0;E<h;E++){let P=f[E],U=!!o[P],De=!!c[P];U!==De&&(s=!0,U?u.add(P):u.remove(P))}}else if(i==="styles"){let u=Object.keys(o),f=u.length;for(let h=0;h<f;h++){let E=u[h],P=o[E],U=c[E];P!==U&&(s=!0,P?(_e(P),n.styleApplyer(e,E,P)):n.styleApplyer(e,E,""))}}else if(!o&&typeof c=="string"&&Te.indexOf(i)<0&&(o=""),i==="value"){let u=e[i];u!==o&&(e["oninput-value"]?u===e["oninput-value"]:o!==c)&&(e[i]=o,e["oninput-value"]=void 0),o!==c&&(s=!0)}else if(Te.indexOf(i)>=0)typeof o=="string"||o===!0?(e.setAttribute(i,""),e[i]=!0):(e.removeAttribute(i),e[i]=!1),s=!0;else if(o!==c){let u=typeof o;(u!=="function"||!n.eventHandlerInterceptor)&&(n.namespace===Y?i==="href"?e.setAttributeNS(Ie,i,o):e.setAttribute(i,o):u==="string"&&i!=="innerHTML"?i==="role"&&o===""?e.removeAttribute(i):e.setAttribute(i,o):e[i]!==o&&(e[i]=o),s=!0)}}return s},tt=(e,r,t,n,s)=>{if(t===n)return!1;t=t||je,n=n||je;let l=t.length,d=n.length,a=0,i=0,o,c=!1;for(;i<d;){let u=a<l?t[a]:void 0,f=n[i];if(u!==void 0&&de(u,f))c=G(u,f,s)||c,a++;else{let h=Ge(t,f,a+1);if(h>=0){for(o=a;o<h;o++)we(t[o]),oe(t,o,e,"removed");c=G(t[h],f,s)||c,a=h+1}else j(f,r,a<l?t[a].domNode:void 0,s),Ye(f),oe(n,i,e,"added")}i++}if(l>a)for(o=a;o<l;o++)we(t[o]),oe(t,o,e,"removed");return c};G=(e,r,t)=>{let n=e.domNode,s=!1;if(e===r)return!1;let l=!1;if(r.vnodeSelector===""){if(r.text!==e.text){let d=n.ownerDocument.createTextNode(r.text);return n.parentNode.replaceChild(d,n),r.domNode=d,s=!0,s}r.domNode=n}else r.vnodeSelector.lastIndexOf("svg",0)===0&&(t=z(t,{namespace:Y})),e.text!==r.text&&(l=!0,r.text===void 0?n.removeChild(n.firstChild):n.textContent=r.text),r.domNode=n,l=tt(r,n,e.children,r.children,t)||l,l=et(n,e.properties,r.properties,t)||l,r.properties&&r.properties.afterUpdate&&r.properties.afterUpdate.apply(r.properties.bind||r.properties,[n,t,r.vnodeSelector,r.properties,r.children]);return l&&r.properties&&r.properties.updateAnimation&&r.properties.updateAnimation(n,r.properties,e.properties),s};var q=(e,r)=>({getLastRender:()=>e,update:t=>{if(e.vnodeSelector!==t.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");let n=e;e=t,G(n,t,r)},domNode:e.domNode});var rt={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,r,t)=>{r.charAt(0)==="-"?e.style.setProperty(r,t):e.style[r]=t}},R=e=>z(rt,e),L={create:(e,r)=>(r=R(r),j(e,document.createElement("div"),void 0,r),q(e,r)),append:(e,r,t)=>(t=R(t),j(r,e,void 0,t),q(r,t)),insertBefore:(e,r,t)=>(t=R(t),j(r,e.parentNode,e,t),q(r,t)),merge:(e,r,t)=>(t=R(t),r.domNode=e,ce(e,r,t),q(r,t)),replace:(e,r,t)=>(t=R(t),j(r,e.parentNode,e,t),e.parentNode.removeChild(e),q(r,t))};var nt=(e,r)=>{let t=[];for(;e&&e!==r;)t.push(e),e=e.parentNode;return t},fe;Array.prototype.find?fe=(e,r)=>e.find(r):fe=(e,r)=>e.filter(r)[0];var st=(e,r)=>{let t=e;return r.forEach(n=>{t=t&&t.children?fe(t.children,s=>s.domNode===n):void 0}),t},it=(e,r,t)=>(n,s,l,d)=>function(a){var f,h;t("domEvent",a);let i=r(),o=nt(a.currentTarget,i.domNode);o.reverse();let c=st(i.getLastRender(),o);e.scheduleRender();let u;return c&&(u=((h=(f=c.properties[`on${a.type}`])!=null?f:c.properties.on[a.type].listener)!=null?h:c.properties.on[a.type]).apply(c.properties.bind||this,arguments)),u===void 0&&this.hasAttribute("data-force-event-handler")&&(u=s.apply(this,arguments)),t("domEventProcessed",a),u},ve=e=>{let r,t=R(e),n=t.performanceLogger,s=!0,l,d=!1,a=[],i=[],o=(u,f,h)=>{let E,P=()=>E;t.eventHandlerInterceptor=it(r,P,n),E=u(f,h(),t),a.push(E),i.push(h)},c=()=>{if(l=void 0,!!s){s=!1,n("renderStart",void 0);for(let u=0;u<a.length;u++){let f=i[u]();n("rendered",void 0),a[u].update(f),n("patched",void 0)}n("renderDone",void 0),s=!0}};return r={renderNow:c,scheduleRender:()=>{!l&&!d&&(l=requestAnimationFrame(c))},stop:()=>{l&&(cancelAnimationFrame(l),l=void 0),d=!0},resume:()=>{d=!1,s=!0,r.scheduleRender()},append:(u,f)=>{o(L.append,u,f)},insertBefore:(u,f)=>{o(L.insertBefore,u,f)},merge:(u,f)=>{o(L.merge,u,f)},replace:(u,f)=>{o(L.replace,u,f)},detach:u=>{for(let f=0;f<i.length;f++)if(i[f]===u)return i.splice(f,1),a.splice(f,1)[0];throw new Error("renderFunction was not found")}},r};var ot=e=>({vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}),Me=(e,r)=>{for(let t=0,n=e.length;t<n;t++){let s=e[t];Array.isArray(s)?Me(s,r):s!=null&&s!==!1&&(s.hasOwnProperty("vnodeSelector")||(s=ot(s)),r.push(s))}},Oe=(e,r,...t)=>{if(t.length===1&&typeof t[0]=="string")return{vnodeSelector:e,properties:r||void 0,children:void 0,text:t[0],domNode:null};let n=[];return Me(t,n),{vnodeSelector:e,properties:r||void 0,children:n,text:void 0,domNode:null}};var qe={createCache:xe,createMapping:Ve,createProjector:ve,dom:L,h:Oe};(e=>{e.Maquette=qe,e.h=qe.h,e.CustomElement=K,e.CustomElementController=X,e.CustomElementConfig=te,e.customElementConfig=te,e.PropertyRenderOnSet=ne,e.RenderOnSet=ne,e.Property=D,e.property=D,e.Query=re,e.query=re,e.Bind=Pe})(window);export{K as CustomElement,X as CustomElementController,qe as maquette};
|
|
1
|
+
/*! P-ELEMENTS 2.1.0-rc7 - Mon Feb 09 2026 09:56:59 GMT+0100 (Midden-Europese standaardtijd) */(()=>{"use strict";(()=>{const{keys:e}=Object,t=!0,r=!1,n="querySelectorAll",o="querySelectorAll",{document:i,Element:a,MutationObserver:s,Set:l,WeakMap:c}=self,u=e=>o in e,{filter:d}=[],f=e=>{const f=new c,p=(t,r)=>{let n;if(r)for(let o,i=(e=>e.matches||e.webkitMatchesSelector||e.msMatchesSelector)(t),a=0,{length:s}=m;a<s;a++)i.call(t,o=m[a])&&(f.has(t)||f.set(t,new l),n=f.get(t),n.has(o)||(n.add(o),e.handle(t,r,o)));else f.has(t)&&(n=f.get(t),f.delete(t),n.forEach(n=>{e.handle(t,r,n)}))},h=(e,t=!0)=>{for(let r=0,{length:n}=e;r<n;r++)p(e[r],t)},{query:m}=e,y=e.root||i,v=((e,o=document,i=MutationObserver,a=["*"])=>{const s=(r,o,i,a,l,c)=>{for(const u of r)(c||n in u)&&(l?i.has(u)||(i.add(u),a.delete(u),e(u,l)):a.has(u)||(a.add(u),i.delete(u),e(u,l)),c||s(u[n](o),o,i,a,l,t))},l=new i(e=>{if(a.length){const n=a.join(","),o=new Set,i=new Set;for(const{addedNodes:a,removedNodes:l}of e)s(l,n,o,i,r,r),s(a,n,o,i,t,r)}}),{observe:c}=l;return(l.observe=e=>c.call(l,e,{subtree:t,childList:t}))(o),l})(p,y,s,m),{attachShadow:b}=a.prototype;return b&&(a.prototype.attachShadow=function(e){const t=b.call(this,e);return v.observe(t),t}),m.length&&h(y[o](m)),{drop:e=>{for(let t=0,{length:r}=e;t<r;t++)f.delete(e[t])},flush:()=>{const e=v.takeRecords();for(let t=0,{length:r}=e;t<r;t++)h(d.call(e[t].removedNodes,u),!1),h(d.call(e[t].addedNodes,u),!0)},observer:v,parse:h}},{customElements:p,document:h,Element:m,MutationObserver:y,Object:v,Promise:b,Map:g,Set:w,WeakMap:S,Reflect:E}=self,{createElement:A}=h,{define:k,get:N,upgrade:O}=p,{construct:M}=E||{construct(e){return e.call(this)}},{defineProperty:C,getOwnPropertyNames:j,setPrototypeOf:T}=v,x=new S,I=new w,P=new g,L=new g,R=new g,F=new g,V=[],W=[],D=e=>F.get(e)||N.call(p,e),{parse:H}=f({query:W,handle:(t,r,n)=>{const o=R.get(n);if(r&&!o.isPrototypeOf(t)){const r=(t=>{const r=e(t),n=[],o=new Set,{length:i}=r;for(let e=0;e<i;e++){n[e]=t[r[e]];try{delete t[r[e]]}catch(t){o.add(e)}}return()=>{for(let e=0;e<i;e++)o.has(e)||(t[r[e]]=n[e])}})(t);U=T(t,o);try{new o.constructor}finally{U=null,r()}}const i=(r?"":"dis")+"connectedCallback";i in o&&t[i]()}}),{parse:q}=f({query:V,handle(e,t){x.has(e)&&(t?I.add(e):I.delete(e),W.length&&z.call(W,e))}}),{attachShadow:$}=m.prototype;$&&(m.prototype.attachShadow=function(e){const t=$.call(this,e);return x.set(this,t),t});const _=e=>{if(!L.has(e)){let t,r=new b(e=>{t=e});L.set(e,{$:r,_:t})}return L.get(e).$},B=((e,t)=>{const r=e=>{for(let t=0,{length:r}=e;t<r;t++)n(e[t])},n=({target:e,attributeName:t,oldValue:r})=>{e.attributeChangedCallback(t,r,e.getAttribute(t))};return(o,i)=>{const{observedAttributes:a}=o.constructor;return a&&e(i).then(()=>{new t(r).observe(o,{attributes:!0,attributeOldValue:!0,attributeFilter:a});for(let e=0,{length:t}=a;e<t;e++)o.hasAttribute(a[e])&&n({target:o,attributeName:a[e],oldValue:null})}),o}})(_,y);let U=null;function z(e){const t=x.get(e);H(t.querySelectorAll(this),e.isConnected)}j(self).filter(e=>/^HTML.*Element$/.test(e)).forEach(e=>{const t=self[e];function r(){const{constructor:e}=this;if(!P.has(e))throw new TypeError("Illegal constructor");const{is:r,tag:n}=P.get(e);if(r){if(U)return B(U,r);const t=A.call(h,n);return t.setAttribute("is",r),B(T(t,e.prototype),r)}return M.call(this,t,[],e)}T(r,t),C(r.prototype=t.prototype,"constructor",{value:r}),C(self,e,{value:r})}),h.createElement=function(e,t){const r=t&&t.is;if(r){const t=F.get(r);if(t&&P.get(t).tag===e)return new t}const n=A.call(h,e);return r&&n.setAttribute("is",r),n},p.get=D,p.whenDefined=_,p.upgrade=function(e){const t=e.getAttribute("is");if(t){const r=F.get(t);if(r)return void B(T(e,r.prototype),t)}O.call(p,e)},p.define=function(e,t,r){if(D(e))throw new Error(`'${e}' has already been defined as a custom element`);let n;const o=r&&r.extends;P.set(t,o?{is:e,tag:o}:{is:"",tag:e}),o?(n=`${o}[is="${e}"]`,R.set(n,t.prototype),F.set(e,t),W.push(n)):(k.apply(p,arguments),V.push(n=e)),_(e).then(()=>{o?(H(h.querySelectorAll(n)),I.forEach(z,[n])):q(h.querySelectorAll(n))}),L.get(e)._(t)}})(),(()=>{const e=new WeakMap,t=new WeakMap,r=new WeakMap,n=new WeakMap,o=new WeakMap,i=new WeakMap,a=new WeakMap,s=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,h=new WeakMap,m=(e,t,r)=>{e.getAttribute(t)!==r&&e.setAttribute(t,r)},y=(e,t)=>{e.toggleAttribute("internals-disabled",t),t?m(e,"aria-disabled","true"):e.removeAttribute("aria-disabled"),e.formDisabledCallback&&e.formDisabledCallback.apply(e,[t])},v=e=>{r.get(e).forEach(e=>{e.remove()}),r.set(e,[])},b=(e,t)=>{const n=document.createElement("input");return n.type="hidden",n.name=e.getAttribute("name"),e.after(n),r.get(t).push(n),n},g=(e,t)=>{if(t.length){const r=Array.from(t);r.forEach(t=>t.addEventListener("click",e.click.bind(e)));const[n]=r;let o=n.id;n.id||(o=`${n.htmlFor}_Label`,n.id=o),m(e,"aria-labelledby",o)}},w=e=>{const t=Array.from(e.elements).filter(e=>!e.tagName.includes("-")&&e.validity).map(e=>e.validity.valid),r=s.get(e)||[],o=[...t,...Array.from(r).filter(e=>e.isConnected).map(e=>n.get(e).validity.valid)].includes(!1);e.toggleAttribute("internals-invalid",o),e.toggleAttribute("internals-valid",!o)},S=e=>{w(N(e.target))},E=e=>{w(N(e.target))},A=e=>{const t=s.get(e.target);t&&t.size&&t.forEach(e=>{e.constructor.formAssociated&&e.formResetCallback&&e.formResetCallback.apply(e)})},k=(e,t,r)=>{if(t){const o=s.get(t);if(o)o.add(e);else{const r=new Set;r.add(e),s.set(t,r),(e=>{const t=["button[type=submit]","input[type=submit]","button:not([type])"].map(e=>`${e}:not([disabled])`).map(t=>`${t}:not([form])${e.id?`,${t}[form='${e.id}']`:""}`).join(",");e.addEventListener("click",r=>{if(r.target.closest(t)){const t=s.get(e);if(e.noValidate)return;t.size&&Array.from(t).reverse().map(e=>n.get(e).reportValidity()).includes(!1)&&r.preventDefault()}})})(t),t.addEventListener("reset",A),t.addEventListener("input",S),t.addEventListener("change",E)}i.set(t,{ref:e,internals:r}),e.constructor.formAssociated&&e.formAssociatedCallback&&setTimeout(()=>{e.formAssociatedCallback.apply(e,[t])},0),w(t)}},N=e=>{let t=e.parentNode;return t&&"FORM"!==t.tagName&&(t=N(t)),t},O=(e,t,r=DOMException)=>{if(!e.constructor.formAssociated)throw new r(t)},M=(e,t,r)=>{const o=s.get(e);return o&&o.size&&o.forEach(e=>{n.get(e)[r]()||(t=!1)}),t},C=e=>{let t=!1;if(e.constructor.formAssociated){let r=n.get(e);void 0===r&&(e.attachInternals(),r=n.get(e),t=!0);const{labels:o,form:i}=r;g(e,o),k(e,i,r)}return t};function j(){return"undefined"!=typeof MutationObserver}const T={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBrailleLabel:"aria-braillelabel",ariaBrailleRoleDescription:"aria-brailleroledescription",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"};function x(e){const t=n.get(e),{form:r}=t;k(e,r,t),g(e,t.labels)}const I=(e,t=!1)=>{const r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>n.has(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let o=r.nextNode();const i=!t||e.disabled;for(;o;)o.formDisabledCallback&&i&&y(o,e.disabled),o=r.nextNode()},P={attributes:!0,attributeFilter:["disabled","name"]},L=j()?new MutationObserver(e=>{for(const t of e){const e=t.target;if("disabled"===t.attributeName&&(e.constructor.formAssociated?y(e,e.hasAttribute("disabled")):"fieldset"===e.localName&&I(e)),"name"===t.attributeName&&e.constructor.formAssociated){const t=n.get(e),r=l.get(e);t.setFormValue(r)}}}):{};function R(e){e.forEach(e=>{const{addedNodes:t,removedNodes:o}=e,i=Array.from(t),l=Array.from(o);i.forEach(e=>{if(n.has(e)&&e.constructor.formAssociated&&x(e),c.has(e)){const t=c.get(e);Object.keys(T).filter(e=>null!==t[e]).forEach(r=>{m(e,T[r],t[r])}),c.delete(e)}if(h.has(e)){const t=h.get(e);m(e,"internals-valid",t.validity.valid.toString()),m(e,"internals-invalid",(!t.validity.valid).toString()),m(e,"aria-invalid",(!t.validity.valid).toString()),h.delete(e)}if("form"===e.localName){const t=s.get(e),r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>!n.has(e)||!e.constructor.formAssociated||t&&t.has(e)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT});let o=r.nextNode();for(;o;)x(o),o=r.nextNode()}"fieldset"===e.localName&&(L.observe?.(e,P),I(e,!0))}),l.forEach(e=>{const t=n.get(e);if(t&&r.get(t)&&v(t),a.has(e)){a.get(e).disconnect()}})})}function F(e){e.forEach(e=>{const{removedNodes:t}=e;t.forEach(t=>{const r=f.get(e.target);n.has(t)&&C(t),r.disconnect()})})}j()&&new MutationObserver(R);const V={childList:!0,subtree:!0};class W{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}}const D=e=>{let t=!0;for(let r in e)"valid"!==r&&!1!==e[r]&&(t=!1);return t},H=new WeakMap;function q(e,t){e.toggleAttribute(t,!0),e.part&&e.part.add(t)}class $ extends Set{static get isPolyfilled(){return!0}constructor(e){if(super(),!e||!e.tagName||-1===e.tagName.indexOf("-"))throw new TypeError("Illegal constructor");H.set(this,e)}add(e){if(!/^--/.test(e)||"string"!=typeof e)throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${e} must start with '--'.`);const t=super.add(e),r=H.get(this),n=`state${e}`;return r.isConnected?q(r,n):setTimeout(()=>{q(r,n)}),t}clear(){for(let[e]of this.entries())this.delete(e);super.clear()}delete(e){const t=super.delete(e),r=H.get(this);return r.isConnected?(r.toggleAttribute(`state${e}`,!1),r.part&&r.part.remove(`state${e}`)):setTimeout(()=>{r.toggleAttribute(`state${e}`,!1),r.part&&r.part.remove(`state${e}`)}),t}}var _,B=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},U=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class z{constructor(e){_.set(this,void 0),B(this,_,e,"f");for(let t=0;t<e.length;t++){let r=e[t];this[t]=r,r.hasAttribute("name")&&(this[r.getAttribute("name")]=r)}Object.freeze(this)}get length(){return U(this,_,"f").length}[(_=new WeakMap,Symbol.iterator)](){return U(this,_,"f")[Symbol.iterator]()}item(e){return null==this[e]?null:this[e]}namedItem(e){return null==this[e]?null:this[e]}}class K{static get isPolyfilled(){return!0}constructor(o){if(!o||!o.tagName||-1===o.tagName.indexOf("-"))throw new TypeError("Illegal constructor");const i=o.getRootNode(),a=new W;this.states=new $(o),e.set(this,o),t.set(this,a),n.set(o,this),((e,t)=>{for(let r in T){t[r]=null;let n=null;const o=T[r];Object.defineProperty(t,r,{get:()=>n,set(r){n=r,e.isConnected?m(e,o,r):c.set(e,t)}})}})(o,this),((e,t)=>{r.set(t,[]),L.observe?.(e,P)})(o,this),Object.seal(this),i instanceof DocumentFragment&&(e=>{const t=new MutationObserver(F);window?.ShadyDOM?.inUse&&e.mode&&e.host&&(e=e.host),t.observe?.(e,{childList:!0}),f.set(e,t)})(i)}checkValidity(){const r=e.get(this);if(O(r,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const n=t.get(this);if(!n.valid){const e=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});r.dispatchEvent(e)}return n.valid}get form(){const t=e.get(this);let r;return O(t,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element."),!0===t.constructor.formAssociated&&(r=N(t)),r}get labels(){const t=e.get(this);O(t,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");const r=t.getAttribute("id"),n=t.getRootNode();return n&&r?n.querySelectorAll(`[for="${r}"]`):[]}reportValidity(){const t=e.get(this);if(O(t,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const r=this.checkValidity(),n=d.get(this);if(n&&!t.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!r&&n&&(t.focus(),n.focus()),r}setFormValue(t){const r=e.get(this);if(O(r,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),v(this),null==t||t instanceof FormData)null!=t&&t instanceof FormData&&Array.from(t).reverse().forEach(([e,t])=>{if("string"==typeof t){const n=b(r,this);n.name=e,n.value=t}});else if(r.getAttribute("name")){b(r,this).value=t}l.set(r,t)}setValidity(r,n,i){const a=e.get(this);if(O(a,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!r)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");d.set(this,i);const s=t.get(this),l={};for(const e in r)l[e]=r[e];var c;0===Object.keys(l).length&&((c=s).badInput=!1,c.customError=!1,c.patternMismatch=!1,c.rangeOverflow=!1,c.rangeUnderflow=!1,c.stepMismatch=!1,c.tooLong=!1,c.tooShort=!1,c.typeMismatch=!1,c.valid=!0,c.valueMissing=!1);const u={...s,...l};delete u.valid;const{valid:f}=((e,t,r)=>(e.valid=D(t),Object.keys(t).forEach(r=>e[r]=t[r]),r&&w(r),e))(s,u,this.form);if(!f&&!n)throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");o.set(this,f?"":n),a.isConnected?(a.toggleAttribute("internals-invalid",!f),a.toggleAttribute("internals-valid",f),m(a,"aria-invalid",`${!f}`)):h.set(a,this)}get shadowRoot(){const t=e.get(this),r=u.get(t);return r||null}get validationMessage(){const t=e.get(this);return O(t,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),o.get(this)}get validity(){const r=e.get(this);O(r,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element.");return t.get(this)}get willValidate(){const t=e.get(this);return O(t,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(t.matches(":disabled")||t.disabled||t.hasAttribute("disabled")||t.hasAttribute("readonly"))}}let J=!1,Q=!1;function Y(e){Q||(Q=!0,window.CustomStateSet=$,e&&(HTMLElement.prototype.attachInternals=function(...t){const r=e.call(this,t);return r.states=new $(this),r}))}!!customElements.polyfillWrapFlushCallback||(function(){if("undefined"==typeof window||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class e extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}const t=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,"")}`;customElements.define(t,e);const r=new e;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every(e=>e in r.internals)}()?"undefined"==typeof window||window.CustomStateSet||Y(HTMLElement.prototype.attachInternals):function(e=!0){let t=!1;if(!J){if(J=!0,"undefined"!=typeof window&&(window.ElementInternals=K),"undefined"!=typeof CustomElementRegistry){const r=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(e,n,o){if(n.formAssociated){const e=n.prototype.connectedCallback;n.prototype.connectedCallback=function(){p.has(this)||(p.set(this,!0),this.hasAttribute("disabled")&&y(this,!0)),null!=e&&e.apply(this),t=C(this)}}r.call(this,e,n,o)}}if("undefined"!=typeof HTMLElement&&(HTMLElement.prototype.attachInternals=function(){if(!this.tagName)return{};if(-1===this.tagName.indexOf("-"))throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.");if(n.has(this)&&!t)throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new K(this)}),"undefined"!=typeof Element){function o(...e){const t=i.apply(this,e);if(u.set(this,t),j()){const e=new MutationObserver(R);window.ShadyDOM?e.observe(this,V):e.observe(t,V),a.set(this,e)}return t}const i=Element.prototype.attachShadow;Element.prototype.attachShadow=o}j()&&"undefined"!=typeof document&&new MutationObserver(R).observe(document.documentElement,V),"undefined"!=typeof HTMLFormElement&&function(){const e=HTMLFormElement.prototype.checkValidity;HTMLFormElement.prototype.checkValidity=function(...t){let r=e.apply(this,t);return M(this,r,"checkValidity")};const t=HTMLFormElement.prototype.reportValidity;HTMLFormElement.prototype.reportValidity=function(...e){let r=t.apply(this,e);return M(this,r,"reportValidity")};const{get:r}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get(...e){const t=r.call(this,...e),n=Array.from(s.get(this)||[]);if(0===n.length)return t;const o=Array.from(t).concat(n).sort((e,t)=>e.compareDocumentPosition?2&e.compareDocumentPosition(t)?1:-1:0);return new z(o)}})}(),(e||"undefined"!=typeof window&&!window.CustomStateSet)&&Y()}}(!1))})(),(()=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}var t=function(t,r,n){var o=n.value;if("function"!=typeof o)throw new Error("@Bind decorator can only be applied to methods not: ".concat(e(o)));var i=!1;return{configurable:!0,get:function(){if(i||this===t.prototype||this.hasOwnProperty(r)||"function"!=typeof o)return o;var e=o.bind(this);return i=!0,Object.defineProperty(this,r,{configurable:!0,get:function(){return e},set:function(e){o=e,delete this[r]}}),i=!1,e},set:function(e){o=e}}},r=function(e){return function(t){customElements.get(e.tagName)?console.warn("Custom element with tag name ".concat(e.tagName," already exists.")):customElements.define(e.tagName,t,e.options)}},n=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(r,n){Object.defineProperty(r,n,{get:function(){return t?this.shadowRoot.querySelector(e):this.querySelector(e)}})}};function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}var l=new WeakSet,c=new WeakMap,u=new WeakMap;function d(e,t,r,n,o){n===Boolean?r?e.setAttribute(t,""):e.removeAttribute(t):n===Object||n===Array?o&&o.toAttribute?e.setAttribute(t,o.toAttribute(r)):e.setAttribute(t,JSON.stringify(r)):null==r?e.removeAttribute(t):e.setAttribute(t,String(r))}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.type,r=e.attribute,n=void 0===r||r,o=e.reflect,a=void 0!==o&&o,f=e.converter,p=e.readonly,h=void 0!==p&&p,m=function(e){if("string"==typeof e)switch(e){case"string":return String;case"number":return Number;case"boolean":return Boolean;case"object":return Object;case"array":return Array;default:return null}return e}(t);return function(t,r){var o=new WeakMap,p=function(e,t){if(!1!==t)return!0===t?e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase():"string"==typeof t?t:void 0}(r,n);Object.defineProperty(t,r,{get:function(){if(!o.has(this)&&p&&this.hasAttribute&&this.hasAttribute(p)){var e,t=this.getAttribute(p);if(null!==t)return e=f&&f.fromAttribute?f.fromAttribute(t):m===Boolean||(m===Number?Number(t):t),o.set(this,e),"function"==typeof this.renderNow&&this.renderNow(),e}return o.has(this)?o.get(this):m!==Boolean&&void 0},set:function(e){if(!h||!o.has(this)){var t,n=o.get(this),i=!1;if(null==m&&e!==n&&(i=!0),!o.has(this)&&p&&this.hasAttribute&&this.hasAttribute(p)){var y=this.getAttribute(p);if(null!==y)return t=f&&f.fromAttribute?f.fromAttribute(y):m===Boolean||(m===Number?Number(y):y),o.set(this,t),void(this.isConnected?("function"==typeof this.renderNow&&this.renderNow(),this.updated&&this.updated(r,n,t)):this.updated&&(u.has(this)||u.set(this,[]),u.get(this).push({propertyKey:r,oldValue:n,newValue:t})))}if(t=i?e:function(e,t,r){if(r&&r.fromAttribute&&"string"==typeof e)return r.fromAttribute(e);if(null==e)return e;switch(t){case String:return String(e);case Number:return Number(e);case Boolean:return Boolean(e);case Object:return"object"===s(e)?e:JSON.parse(String(e));case Array:return Array.isArray(e)?e:JSON.parse(String(e));default:return e}}(e,m,f),n!==t){var v=!this.shouldUpdate||this.shouldUpdate(r,n,t);if(o.set(this,v?t:n),a&&void 0!==p)if(this.isConnected){l.add(this);try{d(this,p,v?t:n,m,f)}finally{l.delete(this)}}else c.has(this)||c.set(this,new Map),c.get(this).set(p,{value:v?t:n,type:m,converter:f});this.isConnected?("function"==typeof this.renderNow&&this.renderNow(),this.updated&&this.updated(r,n,t)):this.updated&&(u.has(this)||u.set(this,[]),u.get(this).push({propertyKey:r,oldValue:n,newValue:t})),i&&"function"==typeof this.renderNow&&this.renderNow()}}},configurable:!0}),t.constructor._propertyInfo||(t.constructor._propertyInfo=new Map),t.constructor._propertyInfo.set(r,i(i({},e),{},{name:r,attribute:p,type:m})),p&&(t.constructor.observedAttributes||(t.constructor.observedAttributes=[]),t.constructor.observedAttributes.includes(p)||t.constructor.observedAttributes.push(p))}}var p=f({});function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){if(e){if("string"==typeof e)return v(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,w(n.key),n)}}function w(e){var t=function(e,t){if("object"!=b(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==b(t)?t:t+""}function S(e,t){if(t&&("object"==b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function E(e){var t="function"==typeof Map?new Map:void 0;return E=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(A())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&k(o,r.prototype),o}(e,arguments,N(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),k(r,e)},E(e)}function A(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(A=function(){return!!e})()}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}function O(e,t,r){M(e,t),t.set(e,r)}function M(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function C(e,t){return e.get(T(e,t))}function j(e,t,r){return e.set(T(e,t),r),r}function T(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var x=[],I=new WeakMap,P=new WeakMap,L=new WeakMap,R=new WeakMap,F=new WeakMap,V=new WeakMap,W=new WeakMap,D=new WeakMap,H=new WeakMap,q=new WeakMap,$=new WeakMap,_=new WeakMap,B=new WeakMap,U=new WeakMap,z=new WeakMap,K=new WeakMap,J=new WeakSet,Q=function(e){function t(e){var r,n,o,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,o=N(o=t),function(e,t){M(e,t),t.add(e)}(r=S(n,A()?Reflect.construct(o,i||[],N(n).constructor):o.apply(n,i)),J),O(r,I,void 0),O(r,P,void 0),O(r,L,!1),O(r,R,void 0),O(r,F,void 0),O(r,V,void 0),O(r,W,!1),O(r,D,!1),O(r,H,!1),O(r,q,!0),O(r,$,!0),O(r,_,null),O(r,B,void 0),O(r,U,[]),O(r,z,null),O(r,K,null);var a=function(e){console.warn("ElementInternals.".concat(e," called before element was connected. Call will be ignored."))};return j(B,r,{setValidity:function(e,t,r){a("setValidity")},reportValidity:function(){return a("reportValidity"),!1},checkValidity:function(){return a("checkValidity"),!0},setFormValue:function(e,t){a("setFormValue")}}),T(J,r,X).call(r),T(J,r,Y).call(r),S(r,e)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(t,e),r=t,n=[{key:"isConnected",get:function(){return C(L,this)}},{key:"updateComplete",get:function(){return C(z,this)?C(z,this):Promise.resolve()}},{key:"internals",get:function(){if(!C(L,this)&&"object"===b(C(B,this)))return C(B,this);var e=this.constructor;if(null===C(_,this)&&e.formAssociated){var t=C(B,this);for(var r in j(B,this,null),j(_,this,this.attachInternals()),t)"function"!=typeof C(_,this)[r]&&(C(_,this)[r]=t[r])}return C(_,this)},set:function(e){j(_,this,e)}},{key:"requestUpdate",value:function(){var e=this;return C(z,this)||(j(z,this,new Promise(function(t){j(K,e,t)})),this.scheduleRender()),C(z,this)}},{key:"addController",value:function(e){C(U,this).push(e),C(L,this)&&e.connected&&e.connected()}},{key:"scheduleRender",value:function(){var e;null===(e=C(I,this))||void 0===e||e.scheduleRender()}},{key:"renderNow",value:function(){var e,t=this;if(this.shadowRoot&&(C(z,this)||j(z,this,new Promise(function(e){j(K,t,e)})),null===(e=C(I,this))||void 0===e||e.renderNow(),this.updated("",null,null),C(K,this))){var r=C(K,this);j(K,this,null),j(z,this,null),r()}}},{key:"updated",value:function(e,t,r){}},{key:"shouldUpdate",value:function(e,t,r){return!0}},{key:"addStylesheetToRootNode",value:function(e,t){if(T(J,this),Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype){if(C(F,this)||j(F,this,new CSSStyleSheet),C(F,this).replaceSync(e),C(W,this))return;if(t instanceof Document){var r=T(J,this,te).call(this,e);-1===x.indexOf(r)&&(document.adoptedStyleSheets=[].concat(m(document.adoptedStyleSheets),[C(F,this)]),j(W,this,!0),x.push(r))}else this.shadowRoot.adoptedStyleSheets=[C(F,this)],j(W,this,!0)}else if(j(V,this,document.createElement("link")),C(V,this).rel="stylesheet",C(V,this).href=URL.createObjectURL(new Blob([e],{type:"text/css"})),t instanceof Document){var n=T(J,this,te).call(this,e);-1===x.indexOf(n)&&(document.head.appendChild(C(V,this)),x.push(n))}else this.shadowRoot.appendChild(C(V,this))}},{key:"templateFromString",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=document.createElement("template");r.innerHTML=e;var n=document.createDocumentFragment();n.appendChild(r.content);var o=n.querySelector("style");return t&&(j(D,this,!0),this.shadowRoot||this.attachShadow({mode:"open",delegatesFocus:C(H,this)})),o&&(T(J,this,ee).call(this,o.textContent),o.remove()),n}},{key:"adoptStyle",value:function(e,t){this.addStylesheetToRootNode(t,e)}},{key:"createProjector",value:function(e,t){var r=this;return new Promise(function(n,o){var i,a=C(P,r)?C(P,r):"append";requestAnimationFrame(function(){(i=window.Maquette.createProjector({performanceLogger:function(e){"renderStart"!==e&&"renderDone"!==e||T(J,r,Z).call(r,e)}}))[a](e,t.bind(r)),j(I,r,i),i.renderNow(),n(i),r.dispatchEvent(new CustomEvent("firstRender",{}))})})}},{key:"connectedCallback",value:function(){j(L,this,!0);for(var e=0,t=C(U,this).length;e<t;){var r=C(U,this)[e];null!=r&&r.connected&&r.connected(),e+=1}!function(e){var t=c.get(e);if(t){l.add(e);try{t.forEach(function(t,r){d(e,r,t.value,t.type,t.converter)})}finally{l.delete(e)}c.delete(e)}var r=u.get(e);if(r&&e.updated){for(var n=r.length,o=0;o<n;){var i=r[o];e.updated(i.propertyKey,i.oldValue,i.newValue),o+=1}u.delete(e)}}(this),this.renderNow()}},{key:"disconnectedCallback",value:function(){j(L,this,!1);for(var e=0,t=C(U,this).length;e<t;){var r=C(U,this)[e];null!=r&&r.disconnected&&r.disconnected(),e+=1}}},{key:"attributeChangedCallback",value:function(e,t,r){if(n=this,!l.has(n)){var n,o=this.constructor;if(null!=o&&o._propertyInfo){var i=Array.from(o._propertyInfo.values()).find(function(t){return t.attribute===e&&"string"==typeof t.attribute});if(i){var a=i.converter,s=r;null!=a&&a.fromAttribute?s=a.fromAttribute(r):i.type===Boolean?s=null!==r:i.type===Number&&(s=null===r?null:Number(r)),this[i.name]=s,this.scheduleRender()}}}}},{key:"render",value:function(){return null}}],n&&g(r.prototype,n),o&&g(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(E(HTMLElement));function Y(){"function"==typeof this.init&&(this.init(),C(U,this).forEach(function(e){null==e||e.init()}))}function Z(e){var t=this;this[e]&&this[e](C("renderStart"===e?q:$,this));var r="host".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));C(U,this).forEach(function(n){n[r]&&n[r](C("renderStart"===e?q:$,t))}),j("renderStart"===e?q:$,this,!1)}function G(){var e=this.constructor;if(e._propertyInfo)for(var t=Array.from(e._propertyInfo.entries()),r=0,n=t.length;r<n;){var o=h(t[r],1)[0];if(Object.hasOwn(this,o)){var i=this[o];delete this[o],this[o]=i}r+=1}}function X(){var e=this,t=this.constructor.projectorMode;j(P,this,t||"append");var r=this.constructor.formAssociated,n=this.constructor.delegatesFocus;j(H,this,n),r&&j(_,this,this.attachInternals());var o=this.constructor.style;if(o){j(D,this,!0),j(P,this,"replace"),this.shadowRoot||this.attachShadow({mode:"open",delegatesFocus:C(H,this)}),T(J,this,ee).call(this,o);var i=document.createElement("div");this.shadowRoot.appendChild(i),requestAnimationFrame(function(){e.createProjector(i,e.render).then(function(){T(J,e,G).call(e)})})}}function ee(e){j(R,this,e),C(D,this)&&this.shadowRoot?this.addStylesheetToRootNode(e,this.shadowRoot):C(D,this)||this.addStylesheetToRootNode(e,document)}function te(e){for(var t=0,r=0;t<e.length;t++)r=Math.imul(31,r)+e.charCodeAt(t)|0;return r}function re(e){return re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},re(e)}function ne(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,oe(n.key),n)}}function oe(e){var t=function(e,t){if("object"!=re(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=re(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==re(t)?t:t+""}function ie(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}function ae(e,t){return e.get(se(e,t))}function se(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}Q._propertyInfo=new Map;var le=new WeakMap,ce=function(){return e=function e(t){var r,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ie(this,le,void 0),n=this,o=t,(r=le).set(se(r,n),o),ae(le,this).addController(this)},(t=[{key:"hostElement",get:function(){return ae(le,this)}},{key:"renderNow",value:function(){var e;null===(e=this.hostElement)||void 0===e||e.renderNow()}},{key:"scheduleRender",value:function(){var e;null===(e=this.hostElement)||void 0===e||e.scheduleRender()}}])&&ne(e.prototype,t),r&&ne(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function ue(e){return ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ue(e)}function de(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||fe(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fe(e,t){if(e){if("string"==typeof e)return pe(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pe(e,t):void 0}}function pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var he,me="http://www.w3.org/",ye="".concat(me,"2000/svg"),ve="".concat(me,"1999/xlink"),be=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","readonly","required","reversed","selected","scoped","seamless","typemustmatch"],ge=[],we=function(e,t){var r={};return Object.keys(e).forEach(function(t){r[t]=e[t]}),t&&Object.keys(t).forEach(function(e){r[e]=t[e]}),r},Se=function(e,t){return e.vnodeSelector===t.vnodeSelector&&(e.properties&&t.properties?e.properties.key===t.properties.key&&e.properties.bind===t.properties.bind:!e.properties&&!t.properties)},Ee=function(e){if("string"!=typeof e)throw new Error("Style values must be strings")},Ae=function(e,t,r){if(""!==t.vnodeSelector)for(var n=r;n<e.length;n++)if(Se(e[n],t))return n;return-1},ke=function(e,t,r,n){var o=e[t];if(""!==o.vnodeSelector){var i=o.properties;if(!(i?void 0===i.key?i.bind:i.key:void 0))for(var a=0;a<e.length;a++)if(a!==t){var s=e[a];if(Se(s,o))throw{error:new Error("".concat(r.vnodeSelector," had a ").concat(o.vnodeSelector," child ").concat("added"===n?n:"removed",", but there is now more than one. You must add unique key properties to make them distinguishable.")),parentNode:r,childNode:o}}}},Ne=function(e){if(e.properties){var t=e.properties.enterAnimation;t&&t(e.domNode,e.properties)}},Oe=[],Me=!1,Ce=function(e){(e.children||[]).forEach(Ce),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},je=function(){Me=!1,Oe.forEach(Ce),Oe.length=0},Te=function(e){Oe.push(e),Me||(Me=!0,"undefined"!=typeof window&&"requestIdleCallback"in window?window.requestIdleCallback(je,{timeout:16}):setTimeout(je,16))},xe=function(e){var t=e.domNode;if(e.properties){e.properties.eventListeners&&Array.isArray(e.properties.eventListeners)&&e.properties.eventListeners.forEach(function(e){t.removeEventListener(e[0],e[1])});var r=e.properties.exitAnimation;if(r){t.style.pointerEvents="none";return void r(t,function(){t.parentNode&&(t.parentNode.removeChild(t),Te(e))},e.properties)}}t.parentNode&&(t.parentNode.removeChild(t),Te(e))},Ie=function(e,t,r){if(t){var n,o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=fe(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;Le(i,e,void 0,r)}}catch(e){o.e(e)}finally{o.f()}}},Pe=function(e,t,r){if(Ie(e,t.children,r),t.text&&(e.textContent=t.text),function(e,t,r){if(t)for(var n=r.eventHandlerInterceptor,o=Object.keys(t),i=o.length,a=function(){var i,a=o[s],l=t[a];if("className"===a)throw new Error('Property "className" is not supported, use "class".');if("class"===a)Re(e,l,!0);else if("classes"===a)for(var c=Object.keys(l),u=c.length,d=0;d<u;d++){var f=c[d];l[f]&&e.classList.add(f)}else if("styles"===a)for(var p=Object.keys(l),h=p.length,m=0;m<h;m++){var y=p[m],v=l[y];v&&(Ee(v),r.styleApplyer(e,y,v))}else if("on"===a&&l)for(var b=0,g=Object.entries(t.on);b<g.length;b++){var w=de(g[b],2),S=w[0],E=w[1],A="function"==typeof E?E:E.listener;n&&(A=n(S,A,e,t)),A&&e.addEventListener(S,A,"function"==typeof E?void 0:E.options)}else if("key"!==a&&null!=l){var k=ue(l);"function"===k?(0===a.lastIndexOf("on",0)&&(n&&(l=n(a,l,e,t)),"oninput"===a&&(i=l,l=function(e){i.apply(this,[e]),e.target["oninput-value"]=e.target.value})),e[a]=l):r.namespace===ye?"href"===a?e.setAttributeNS(ve,a,l):e.setAttribute(a,l):"string"===k&&"value"!==a&&"innerHTML"!==a?e.setAttribute(a,l):("string"===k&&"value"===a&&null!=e&&e.tagName.indexOf("-")&&e.setAttribute(a,l),e[a]=l)}},s=0;s<i;s++)a()}(e,t.properties,r),t.properties&&t.properties.afterCreate)t.properties.afterCreate.apply(t.properties.bind||t.properties,[e,r,t.vnodeSelector,t.properties,t.children]);else if(t.properties&&t.properties.eventListeners){if(!Array.isArray(t.properties.eventListeners))throw new Error("eventListeners value must be an array");t.properties.eventListeners.forEach(function(t){e.addEventListener(t[0],t[1],t[2])})}},Le=function(e,t,r,n){var o,i=0,a=e.vnodeSelector,s=t.ownerDocument;if(""===a)e.domNode?e.domNode.nodeValue=e.text:(o=e.domNode=s.createTextNode(e.text),void 0!==r?t.insertBefore(o,r):t.appendChild(o));else{for(var l=0;l<=a.length;++l){var c=a.charAt(l);if(l===a.length||"."===c||"#"===c){var u=a.charAt(i-1),d=a.slice(i,l);if("."===u)o.classList.add(d);else if("#"===u)o.id=d;else{var f;if("svg"===d&&(n=we(n,{namespace:ye})),void 0!==n.namespace)o=e.domNode=s.createElementNS(n.namespace,d);else o=e.domNode=e.domNode||(null!==(f=e.properties)&&void 0!==f&&f.is?s.createElement(d,{is:e.properties.is}):s.createElement(d)),"input"===d&&e.properties&&void 0!==e.properties.type&&o.setAttribute("type",e.properties.type);void 0!==r?t.insertBefore(o,r):o.parentNode!==t&&t.appendChild(o)}i=l+1}}Pe(o,e,n)}},Re=function(e,t,r){t&&t.split(" ").forEach(function(t){t&&e.classList.toggle(t,r)})},Fe=function(e,t,r,n,o){if(r===n)return!1;n=n||ge;for(var i,a=(r=r||ge).length,s=n.length,l=0,c=0,u=!1;c<s;){var d=l<a?r[l]:void 0,f=n[c];if(void 0!==d&&Se(d,f))u=he(d,f,o)||u,l++;else{var p=Ae(r,f,l+1);if(p>=0){for(i=l;i<p;i++)xe(r[i]),ke(r,i,e,"removed");u=he(r[p],f,o)||u,l=p+1}else Le(f,t,l<a?r[l].domNode:void 0,o),Ne(f),ke(n,c,e,"added")}c++}if(a>l)for(i=l;i<a;i++)xe(r[i]),ke(r,i,e,"removed");return u};he=function(e,t,r){var n=e.domNode,o=!1;if(e===t)return!1;var i=!1;if(""===t.vnodeSelector){if(t.text!==e.text){var a=n.ownerDocument.createTextNode(t.text);return n.parentNode.replaceChild(a,n),t.domNode=a,o=!0}t.domNode=n}else 0===t.vnodeSelector.lastIndexOf("svg",0)&&(r=we(r,{namespace:ye})),e.text!==t.text&&(i=!0,void 0===t.text?n.removeChild(n.firstChild):n.textContent=t.text),t.domNode=n,i=Fe(t,n,e.children,t.children,r)||i,i=function(e,t,r,n){if(r){for(var o=!1,i=Object.keys(r),a=i.length,s=0;s<a;s++){var l=i[s],c=r[l],u=t[l];if("class"===l)u!==c&&(Re(e,u,!1),Re(e,c,!0));else if("classes"===l)for(var d=e.classList,f=Object.keys(c),p=f.length,h=0;h<p;h++){var m=f[h],y=!!c[m];y!==!!u[m]&&(o=!0,y?d.add(m):d.remove(m))}else if("styles"===l)for(var v=Object.keys(c),b=v.length,g=0;g<b;g++){var w=v[g],S=c[w];S!==u[w]&&(o=!0,S?(Ee(S),n.styleApplyer(e,w,S)):n.styleApplyer(e,w,""))}else if(c||"string"!=typeof u||be.indexOf(l)<0&&(c=""),"value"===l){var E=e[l];E!==c&&(e["oninput-value"]?E===e["oninput-value"]:c!==u)&&(e[l]=c,e["oninput-value"]=void 0),c!==u&&(o=!0)}else if(be.indexOf(l)>=0)"string"==typeof c||!0===c?(e.setAttribute(l,""),e[l]=!0):(e.removeAttribute(l),e[l]=!1),o=!0;else if(c!==u){var A=ue(c);"function"===A&&n.eventHandlerInterceptor||(n.namespace===ye?"href"===l?e.setAttributeNS(ve,l,c):e.setAttribute(l,c):"string"===A&&"innerHTML"!==l?"role"===l&&""===c?e.removeAttribute(l):e.setAttribute(l,c):e[l]!==c&&(e[l]=c),o=!0)}}return o}}(n,e.properties,t.properties,r)||i,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[n,r,t.vnodeSelector,t.properties,t.children]);return i&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(n,t.properties,e.properties),o};var Ve,We=function(e,t){return{getLastRender:function(){return e},update:function(r){if(e.vnodeSelector!==r.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");var n=e;e=r,he(n,r,t)},domNode:e.domNode}},De={namespace:void 0,performanceLogger:function(){},eventHandlerInterceptor:void 0,styleApplyer:function(e,t,r){"-"===t.charAt(0)?e.style.setProperty(t,r):e.style[t]=r}},He=function(e){return we(De,e)},qe={create:function(e,t){return t=He(t),Le(e,document.createElement("div"),void 0,t),We(e,t)},append:function(e,t,r){return r=He(r),Le(t,e,void 0,r),We(t,r)},insertBefore:function(e,t,r){return r=He(r),Le(t,e.parentNode,e,r),We(t,r)},merge:function(e,t,r){return r=He(r),t.domNode=e,Pe(e,t,r),We(t,r)},replace:function(e,t,r){return r=He(r),Le(t,e.parentNode,e,r),e.parentNode.removeChild(e),We(t,r)}};Ve=Array.prototype.find?function(e,t){return e.find(t)}:function(e,t){return e.filter(t)[0]};var $e=function(e,t,r){return function(n,o,i,a){return function(n){r("domEvent",n);var i=t(),a=function(e,t){for(var r=[];e&&e!==t;)r.push(e),e=e.parentNode;return r}(n.currentTarget,i.domNode);a.reverse();var s,l,c,u=function(e,t){var r=e;return t.forEach(function(e){r=r&&r.children?Ve(r.children,function(t){return t.domNode===e}):void 0}),r}(i.getLastRender(),a);(e.scheduleRender(),u)&&(s=(null!==(l=null!==(c=u.properties["on".concat(n.type)])&&void 0!==c?c:u.properties.on[n.type].listener)&&void 0!==l?l:u.properties.on[n.type]).apply(u.properties.bind||this,arguments));return void 0===s&&this.hasAttribute("data-force-event-handler")&&(s=o.apply(this,arguments)),r("domEventProcessed",n),s}}},_e=function(e){return{vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}},Be=function(e,t){for(var r=0,n=e.length;r<n;r++){var o=e[r];Array.isArray(o)?Be(o,t):null!=o&&!1!==o&&(o.hasOwnProperty("vnodeSelector")||(o=_e(o)),t.push(o))}},Ue=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];if(1===n.length&&"string"==typeof n[0])return{vnodeSelector:e,properties:t||void 0,children:void 0,text:n[0],domNode:null};var i=[];return Be(n,i),{vnodeSelector:e,properties:t||void 0,children:i,text:void 0,domNode:null}},ze={createCache:function(){var e,t;return{invalidate:function(){t=void 0,e=void 0},result:function(r,n){if(e)for(var o=0;o<r.length;o++)e[o]!==r[o]&&(t=void 0);return t||(t=n(),e=r),t}}},createMapping:function(e,t,r){var n=[],o=[];return{results:o,map:function(i){for(var a=i.map(e),s=o.slice(),l=0,c=0;c<i.length;c++){var u=i[c],d=a[c];if(d===n[l])o[c]=s[l],r(u,s[l],c),l++;else{for(var f=!1,p=1;p<n.length+1;p++){var h=(l+p)%n.length;if(n[h]===d){o[c]=s[h],r(i[c],s[h],c),l=h+1,f=!0;break}}f||(o[c]=t(u,c))}}o.length=i.length,n=a}}},createProjector:function(e){var t,r,n=He(e),o=n.performanceLogger,i=!0,a=!1,s=[],l=[],c=function(e,r,i){var a;n.eventHandlerInterceptor=$e(t,function(){return a},o),a=e(r,i(),n),s.push(a),l.push(i)},u=function(){if(r=void 0,i){i=!1,o("renderStart",void 0);for(var e=0;e<s.length;e++){var t=l[e]();o("rendered",void 0),s[e].update(t),o("patched",void 0)}o("renderDone",void 0),i=!0}};return t={renderNow:u,scheduleRender:function(){r||a||(r=requestAnimationFrame(u))},stop:function(){r&&(cancelAnimationFrame(r),r=void 0),a=!0},resume:function(){a=!1,i=!0,t.scheduleRender()},append:function(e,t){c(qe.append,e,t)},insertBefore:function(e,t){c(qe.insertBefore,e,t)},merge:function(e,t){c(qe.merge,e,t)},replace:function(e,t){c(qe.replace,e,t)},detach:function(e){for(var t=0;t<l.length;t++)if(l[t]===e)return l.splice(t,1),s.splice(t,1)[0];throw new Error("renderFunction was not found")}}},dom:qe,h:Ue};!function(e){e.Maquette=ze,e.h=Ue,e.CustomElement=Q,e.CustomElementController=ce,e.CustomElementConfig=r,e.PropertyRenderOnSet=p,e.RenderOnSet=p,e.Property=f,e.Query=n,e.Bind=t}(window)})()})();
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import esbuild from "esbuild";
|
|
2
|
+
import postcss from "postcss";
|
|
3
|
+
import fs from "fs";
|
|
4
|
+
import path from "path";
|
|
5
|
+
import { fileURLToPath } from "url";
|
|
6
|
+
import postcssPresetEnv from "postcss-preset-env";
|
|
7
|
+
import cssnano from "cssnano";
|
|
8
|
+
import postcssImport from "postcss-import";
|
|
9
|
+
import syntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight";
|
|
10
|
+
|
|
11
|
+
import eleventyNavigationPlugin from "@11ty/eleventy-navigation";
|
|
12
|
+
|
|
13
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
14
|
+
const __dirname = path.dirname(__filename);
|
|
15
|
+
|
|
16
|
+
const CSSPlugin = {
|
|
17
|
+
name: "CSSPlugin",
|
|
18
|
+
setup(build) {
|
|
19
|
+
build.onLoad({ filter: /\.css$/ }, async (args) => {
|
|
20
|
+
return new Promise((resolve) => {
|
|
21
|
+
let css = fs.readFileSync(args.path, "utf8");
|
|
22
|
+
const conf = [
|
|
23
|
+
postcssPresetEnv({ grid: true }),
|
|
24
|
+
postcssImport({ path: ["./node_modules"] }),
|
|
25
|
+
cssnano({ preset: "default" }),
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
postcss(conf)
|
|
29
|
+
.process(css, { from: args.path })
|
|
30
|
+
.then((result) => {
|
|
31
|
+
esbuild
|
|
32
|
+
.transform(result.css, {
|
|
33
|
+
loader: "css",
|
|
34
|
+
minify: true,
|
|
35
|
+
})
|
|
36
|
+
.then((result) => {
|
|
37
|
+
resolve({ loader: "text", contents: result.code });
|
|
38
|
+
});
|
|
39
|
+
})
|
|
40
|
+
.catch((e) => {
|
|
41
|
+
if (e.name === "CssSyntaxError") {
|
|
42
|
+
log(e.reason + ` in ${args.path}`, "error");
|
|
43
|
+
} else {
|
|
44
|
+
log(`Error ${e} in ${args.path}`, "error");
|
|
45
|
+
}
|
|
46
|
+
resolve({ loader: "text", contents: "" });
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default function (eleventyConfig) {
|
|
54
|
+
eleventyConfig.addPassthroughCopy({
|
|
55
|
+
"./node_modules/playground-elements/playground-typescript-worker.js":
|
|
56
|
+
"scripts/",
|
|
57
|
+
});
|
|
58
|
+
eleventyConfig.addPassthroughCopy({
|
|
59
|
+
"./node_modules/playground-elements/internal/*.js": "scripts/internal",
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
eleventyConfig.addPassthroughCopy("./src/styles/**/*.css");
|
|
63
|
+
eleventyConfig.addPassthroughCopy("./src/assets");
|
|
64
|
+
eleventyConfig.addPassthroughCopy("./src/scripts/**/*.js");
|
|
65
|
+
eleventyConfig.addPassthroughCopy({ "./src/_data/demos": "demos/" });
|
|
66
|
+
eleventyConfig.addPlugin(eleventyNavigationPlugin);
|
|
67
|
+
eleventyConfig.addPlugin(syntaxHighlight);
|
|
68
|
+
|
|
69
|
+
eleventyConfig.on("eleventy.before", async () => {
|
|
70
|
+
// copy ../dist/*.* to public/scripts/
|
|
71
|
+
const distPath = path.resolve(__dirname, "../dist");
|
|
72
|
+
const outputPath = path.resolve(__dirname, "public/scripts");
|
|
73
|
+
|
|
74
|
+
await fs.promises.cp(distPath, outputPath, {
|
|
75
|
+
recursive: true,
|
|
76
|
+
force: true,
|
|
77
|
+
});
|
|
78
|
+
const files = await fs.promises.readdir(distPath);
|
|
79
|
+
files.forEach((file) => {
|
|
80
|
+
if (file.endsWith(".js")) {
|
|
81
|
+
console.log(`Copied ${file} from ${distPath} to ${outputPath}`);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
await esbuild.build({
|
|
86
|
+
entryPoints: ["src/scripts/index.ts", "src/scripts/playground.ts"],
|
|
87
|
+
allowOverwrite: true,
|
|
88
|
+
bundle: true,
|
|
89
|
+
minify: true,
|
|
90
|
+
sourcemap: false,
|
|
91
|
+
format: "esm",
|
|
92
|
+
plugins: [CSSPlugin],
|
|
93
|
+
outdir: "public/scripts",
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
eleventyConfig.addWatchTarget("./src/scripts/");
|
|
97
|
+
|
|
98
|
+
eleventyConfig.setIncludesDirectory("_includes/partials");
|
|
99
|
+
eleventyConfig.setLayoutsDirectory("_includes/layouts");
|
|
100
|
+
eleventyConfig.setDataDirectory("_data");
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
markdownTemplateEngine: "njk",
|
|
104
|
+
dir: {
|
|
105
|
+
input: "src",
|
|
106
|
+
output: "public",
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "docs",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
7
|
+
"dev": "eleventy --serve",
|
|
8
|
+
"build": "eleventy"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [],
|
|
11
|
+
"author": "",
|
|
12
|
+
"license": "ISC",
|
|
13
|
+
"description": "",
|
|
14
|
+
"type": "module",
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@11ty/eleventy": "^3.1.2",
|
|
17
|
+
"@11ty/eleventy-navigation": "^1.0.4",
|
|
18
|
+
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
|
|
19
|
+
"cssnano": "^7.0.6",
|
|
20
|
+
"esbuild": "^0.27.3",
|
|
21
|
+
"p-elements-core": "2.1.0-rc6",
|
|
22
|
+
"playground-elements": "^0.20.0",
|
|
23
|
+
"postcss": "^8.5.3",
|
|
24
|
+
"postcss-import": "^16.1.0",
|
|
25
|
+
"postcss-preset-env": "^11.1.3"
|
|
26
|
+
}
|
|
27
|
+
}
|