@webqit/oohtml 1.9.22 → 1.9.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/html-imports.js +3 -2
- package/dist/html-imports.js.map +7 -1
- package/dist/html-modules.js +3 -2
- package/dist/html-modules.js.map +7 -1
- package/dist/main.js +15 -2
- package/dist/main.js.map +7 -1
- package/dist/namespaced-html.js +3 -2
- package/dist/namespaced-html.js.map +7 -1
- package/dist/state-api.js +3 -2
- package/dist/state-api.js.map +7 -1
- package/dist/subscript.js +15 -2
- package/dist/subscript.js.map +7 -1
- package/package.json +5 -7
- package/src/index.js +1 -1
- package/dist/html-imports.js.gz +0 -0
- package/dist/html-imports.js.map.gz +0 -0
- package/dist/html-modules.js.gz +0 -0
- package/dist/html-modules.js.map.gz +0 -0
- package/dist/main.js.gz +0 -0
- package/dist/main.js.map.gz +0 -0
- package/dist/namespaced-html.js.gz +0 -0
- package/dist/namespaced-html.js.map.gz +0 -0
- package/dist/state-api.js.gz +0 -0
- package/dist/state-api.js.map.gz +0 -0
- package/dist/subscript.js.gz +0 -0
- package/dist/subscript.js.map.gz +0 -0
- package/webpack.config.cjs +0 -24
package/dist/html-imports.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
(()=>{"use strict";function t(t,e){return t.reduce(((t,r,n)=>t||e(r,n)),!1)}function e(t){return Array.isArray(t)}function r(t){return t instanceof String||"string"==typeof t&&null!==t}function n(t){return arguments.length&&(void 0===t||void 0===t)}function i(t){return"function"==typeof t}function s(t){return Array.isArray(t)||"object"==typeof t&&t||i(t)}function o(t){return!Array.isArray(t)&&"object"==typeof t&&t}function a(t,i=!0){return e(t)?t:!i&&o(t)?[t]:!1!==t&&0!==t&&function(t){return function(t){return null===t||""===t}(t)||n(t)||!1===t||0===t||s(t)&&!Object.keys(t).length}(t)?[]:function(t){return!r(t)&&!n(t.length)}(t)?Array.prototype.slice.call(t):o(t)?Object.values(t):[t]}function l(t){return t.filter(((t,e,r)=>r.indexOf(t)===e))}function c(t,...e){globalThis.WebQitInternalsRegistry||(globalThis.WebQitInternalsRegistry=new Map);var r,n,i=globalThis.WebQitInternalsRegistry.get(t);if(!i){if(i=new Map,!1===e[0])return i;globalThis.WebQitInternalsRegistry.set(t,i)}for(;r=e.shift();)if((n=i)&&!(i=i.get(r))){if(i=new Map,!1===e[0])return i;n.set(r,i)}return i}function h(t){return!Array.isArray(t)&&"object"==typeof t&&t}function u(){if(!(h(this)&&this.window||"undefined"!=typeof window))throw new Error("A window context is required.");const t=h(this)&&this.window?this.window:window;if(t.WebQit||(t.WebQit={}),!t.WebQit.window){let e,r;Object.defineProperty(t.WebQit,"window",{get:()=>t}),Object.defineProperty(t.WebQit,"vendor",{value:{getName:()=>(e||(e=function(t){if(void 0!==t.InstallTrigger)return"firefox";if(/constructor/i.test(t.HTMLElement)||"[object SafariRemoteNotification]"===(!t.safari||void 0!==t.safari&&t.safari.pushNotification).toString())return"safari";var e=!(!t.chrome||!t.chrome.webstore&&!t.chrome.runtime),r=e&&-1!=t.navigator.userAgent.indexOf("Edg"),n=!!t.opr&&!!t.opr.addons||!!t.opera||t.navigator.userAgent.indexOf(" OPR/")>=0,i=!!t.document.documentMode,s=!i&&!!t.StyleMedia;return(e||n)&&t.CSS,s?"edge":i?"ie":n?"opera":r?"ie-chromium":e?"chrome":"unknown"}(t)),e),getPrefix:()=>(r||(r=function(t){var e=t.getComputedStyle(t.document.documentElement,""),r=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.Olink&&["","o"])[1];return{api:("WebKit|Moz|Ms|O".match(new RegExp("("+r+")","i"))||[])[1],prefix:r,css:"-"+r+"-"}}(t)),r)}})}return t.WebQit}new Map;class m{constructor(t,e=!0){this.window=t,this.async=e,this.readCallbacks=[],this.writeCallbacks=[],this._run()}_run(){this.window.requestAnimationFrame((()=>{this.readCallbacks.forEach(((t,e)=>{t&&!t()&&(this.readCallbacks[e]=null)})),this.writeCallbacks.forEach(((t,e)=>{t&&!t()&&(this.writeCallbacks[e]=null)})),this._run()}))}onread(t,e=!1){if(e)return new Promise(((e,r)=>{!1===this.async?t(e,r):this.readCallbacks.push((()=>{t(e,r)}))}));!1===this.async?t():this.readCallbacks.push(t)}onwrite(t,e=!1){if(e)return new Promise(((e,r)=>{!1===this.async?t(e,r):this.writeCallbacks.push((()=>{t(e,r)}))}));!1===this.async?t():this.writeCallbacks.push(t)}cycle(t,e,r){this.onread((()=>{var n=t(r);if(n){var i=n=>{this.onwrite((()=>{var i=e(n,r);if(i){var s=r=>{this.cycle(t,e,r)};i instanceof Promise?i.then(s):s()}}))};n instanceof Promise?n.then(i):i()}}))}}function d(t){return t instanceof String||"string"==typeof t&&null!==t}function f(t){return Array.isArray(t)}function p(t){return arguments.length&&(void 0===t||void 0===t)}function g(t){return null===t||""===t}function b(t){return"function"==typeof t}function v(t){return Array.isArray(t)||"object"==typeof t&&t||b(t)}function w(t,e=!0){return f(t)?t:!e&&h(t)?[t]:!1!==t&&0!==t&&function(t){return g(t)||p(t)||!1===t||0===t||v(t)&&!Object.keys(t).length}(t)?[]:function(t){return!d(t)&&!p(t.length)}(t)?Array.prototype.slice.call(t):h(t)?Object.values(t):[t]}function y(t){const e=u.call(this);e.DOM.isDOMReady||"complete"===e.window.document.readyState?t(e.window):(e.window.domReadyCallbacks||(e.window.domReadyCallbacks=[],e.window.document.addEventListener("DOMContentLoaded",(()=>{e.DOM.isDOMReady=!0,e.window.domReadyCallbacks.splice(0).forEach((t=>t(e.window)))}),!1)),e.window.domReadyCallbacks.push(t))}class O{constructor(t){this.window=t}onAdded(t,e,r={}){return r.on="added",this.onPresenceChange(t,((t,r,n,i,s)=>{e(t,r,n,i,s)}),r)}onRemoved(t,e,r={}){return r.on="removed",this.onPresenceChange(t,((t,r,n,i,s)=>{e(t,r,n,i,s)}),r)}onPresent(t,e,r={}){y.call(this.window,(()=>{this.window.MutationObserver&&this.onAdded(t,((t,r)=>{t.forEach((t=>e(t,r)))}),r),d(t)?w(this.window.document.querySelectorAll(t)).forEach((t=>e(t,1))):t.parentNode&&e(t,1)}))}onAbsent(t,e,r={}){y.call(this.window,(()=>{this.window.MutationObserver&&onRemoved(t,((t,r)=>{t.forEach((t=>e(t,r)))}),r),d(t)?0===w(this.window.document.querySelectorAll(t)).length&&e(null,0):t.parentNode||e(t,0)}))}onPresenceChange(t,e,r={}){t=w(t,!1);var n=new Set,i=new Set,s=(s,o,a)=>{o&&"removed"===r.on||!o&&"added"===r.on||(s=((t,e)=>(e.$$searchCache||(e.$$searchCache=new Map),t.reduce(((t,n)=>{var i;return e.$$searchCache.has(n)?i=e.$$searchCache.get(n):(i=((t,e)=>{if(e=e.filter((t=>t.matches)),d(t)){var n=e.filter((e=>e.matches(t)));if(!1!==r.observeIndirectMutation&&(n=e.reduce(((e,r)=>e.concat(w(r.querySelectorAll(t)))),n)).length)return n}else{if(e.includes(t))return[t];if(!1!==r.observeIndirectMutation&&e.length)for(var i=t;i=i.parentNode;)if(e.includes(i))return[t]}})(n,e,d(n))||[],e.$$searchCache.set(n,i)),t.concat(i)}),[])))(t,s)).length&&(r.maintainCallState?(s.forEach((t=>{o?(n.add(t),i.delete(t)):(n.delete(t),i.add(t))})),e(s,o,a,n,i)):e(s,o,a))},o=r.context||this.window.document.documentElement;return this._observe(o,((t,e,n,i)=>{r.ignoreTransients||(s(t,0,!0),s(t.concat(e),1,!0),s(e,0,!0)),s(i,0),s(n,1)}))}onAttrChange(t,e,r=[]){var n=new this.window.MutationObserver(e),i={attributes:!0,attributeOldValue:!0};return r&&(i.attributeFilter=r),n.observe(t,i),n}onTreeChange(t,e,r=!1){var n=new this.window.MutationObserver(e),i={childList:!0,subtree:r};return n.observe(t,i),n}onMutation(t,e,r){var n=new this.window.MutationObserver(e);return n.observe(t,r),n}_observe(t,e){if(!k.has(t)){const e=new Set,r=new this.window.MutationObserver((t=>{if(e.size){var r=t.reduce(((t,e)=>t.concat(w(e.addedNodes))),[]),n=t.reduce(((t,e)=>t.concat(w(e.removedNodes))),[]),i=[],s=[];r=new Set(r),n=new Set(n),r.forEach((t=>{n.has(t)&&(n.delete(t),r.delete(t),t.isConnected?i.push(t):s.push(t))})),r=[...r],n=[...n],e.forEach((t=>t(i,s,r,n)))}}));r.observe(t,{childList:!0,subtree:!0}),k.set(t,{callbacks:e,observer:r})}const r=k.get(t);return r.callbacks.add(e),{disconnect(){r.callbacks.delete(e)},reconnect(){r.callbacks.add(e)}}}}const k=new Map;function E(t,e=null,r=!1){const n=u.call(this);if(d(t)){var i;if(t.trim().startsWith("<")){var s=n.window.document.createElement("div");s.innerHTML=t,i=r?w(s.children):s.firstChild}else i=r?w(A.call(this,t,e)):$.call(this,t,e);return i}return t instanceof n.window.Element?r?[t]:t:r?w(t):t}function C(t,e=null){return E.call(this,t,e,!0)}function $(t,e=null,r=!1){const n=u.call(this);e=e||n.window.document;var i,s=r?"querySelectorAll":"querySelector";try{i=e[s](t)}catch(r){try{i=e[s](t.replace(/\:is\(/g,":matches("))}catch(r){try{i=e[s](t.replace(/\:is\(/g,":-webkit-any("))}catch(r){try{i=e[s](t.replace(/\:is\(/g,":-moz-any("))}catch(t){throw t}}}}return i}function A(t,e=null){return $.call(this,t,e,!0)}function M(t){return function(t){return t instanceof Number||"number"==typeof t}(t)||!0!==t&&!1!==t&&null!==t&&""!==t&&!isNaN(1*t)}function x(t){return b(t)||t&&"[object function]"==={}.toString.call(t)}function S(t,e,r={},n={}){e=w(e).slice();for(var i=t;!p(i)&&!g(i)&&e.length;){var s=e.shift();if(!(r.get?r.get(i,s):v(i)?s in i:i[s]))return void(n.exists=!1);i=r.get?r.get(i,s):i[s]}return n.exists=!0,i}function N(t,e,r,n={},i={}){const s=(t,r,n)=>i.set?i.set(t,r,n):(M(e[a])&&f(t)?t.push(n):t[r]=n,!0);e=w(e);for(var o=t,a=0;a<e.length;a++){if(!(a<e.length-1))return s(o,e[a],r);if(!o||!v(o)&&!x(o))return!1;var l=S(o,e[a],i);if(!v(l)){if(!1===i.buildTree)return!1;if(l=x(i.buildTree)?i.buildTree(a):M(e[a+1])?[]:{},!s(o,e[a],l))return!1}o=l}}function j(t,e,r=!1,n={}){e=w(e);var i=!1;do{var s=""===(s=e.pop())?0:s,o=t;e.length&&(o=S(t,e,{},n)),(v(o)||x(o))&&(n.has?n.has(o,s):s in o)&&(n.deleteProperty?i=n.deleteProperty(o,s):n.del?i=n.del(o,s):(delete o[s],i=!0))}while(i&&r&&e.length&&(v(o)||x(o))&&!(n.keys?n.keys(o):Object.keys(o)).length);return i}function D(t,e,r={}){var n={};return S(t,e,r,n),n.exists}function _(t,e=!1){const r=u.call(this);var n={};return!(n.el=r.window.document.head.querySelector('meta[name="oohtml"]'))&&e&&(n.el=r.window.document.createElement("meta"),n.el.setAttribute("name",t),r.window.document.head.append(n.el)),n.el&&(n.vars=(n.el.getAttribute("content")||"").split(";").filter((t=>t)).reduce(((t,e)=>{var r=e.split("=").map((t=>t.trim()));return N(t,r[0].split("."),"true"===r[1]||"false"!==r[1]&&(M(r[1])?parseInt(r[1]):r[1])),t}),{})),n.get=function(t){return S(this.vars,t.split("."))},n.set=function(t,r=null,n=!1){var i=h(t)?t:{[t]:!0===r?"true":r};if(n=arguments.length<3?r:n,Object.keys(i).forEach((t=>{if(!1===i[t])j(this.vars,t.split("."));else if(h(i[t]))Object.keys(i[t]).forEach((e=>{var r=(t+"."+e).split(".");n&&D(this.vars,r)||N(this.vars,r,i[t][e])}));else{var e=t.split(".");n&&D(this.vars,e)||N(this.vars,e,i[t])}})),e){const t=(e,r)=>Object.keys(r).reduce(((n,i)=>{var s=(e?e+".":"")+i;return h(r[i])?n.push(...t(s,r[i])):n.push(s+"="+r[i]),n}),[]);this.el.setAttribute("content",t("",this.vars).join(";"))}return!0},n.defaults=function(t,e=null){return this.set(t,e,!0)},n}function T(){const t=u.call(this);return t.DOM||(t.DOM={},function(t){!function(t){t.CSS||(t.CSS={}),t.CSS.escape||(t.CSS.escape=t=>t.replace(/([\:@\~\$\&])/g,"\\$1"))}(t),function(t){"isConnected"in t.Node.prototype||Object.defineProperty(t.Node.prototype,"isConnected",{get:function(){return!(this.ownerDocument&&this.ownerDocument.compareDocumentPosition(this)&this.DOCUMENT_POSITION_DISCONNECTED)}})}(t),function(t){t.Element.prototype.matches||(t.Element.prototype.matches=t.Element.prototype.matchesSelector||t.Element.prototype.mozMatchesSelector||t.Element.prototype.msMatchesSelector||t.Element.prototype.oMatchesSelector||t.Element.prototype.webkitMatchesSelector||function(t){for(var e=(this.document||this.ownerDocument).querySelectorAll(t),r=e.length;--r>=0&&e.item(r)!==this;);return r>-1})}(t)}(t.window),t.DOM.reflow=new m(t.window),t.DOM.mutations=new O(t.window),t.DOM.meta=_.bind(t.window),t.DOM.query=E.bind(t.window),t.DOM.queryAll=C.bind(t.window),t.DOM.ready=y.bind(t.window)),t}function W(t,e,r){return function(t,e){return function(t,e,r=!1){if(""==e)return t;var n=r?t.lastIndexOf(e):t.indexOf(e);return-1===n?t:t.substr(0,n)}(t,e,!0)}(function(t,e,r=!1){if(""==e)return t;var n=r?t.lastIndexOf(e):t.indexOf(e);return-1===n?"":t.substr(n+e.length)}(t,e),r)}function P(t){return i(t)||t&&"[object function]"==={}.toString.call(t)}function R(t){return t instanceof Number||"number"==typeof t}function I(t){return R(t)||!0!==t&&!1!==t&&null!==t&&""!==t&&!isNaN(1*t)}function q(t,r,n=!1,i=!1,a=!1){var l=0,c=t.shift();if((I(c)||!0===c||!1===c)&&(l=c,c=t.shift()),!t.length)throw new Error("_merge() requires two or more array/objects.");return t.forEach(((t,h)=>{var u,m,d;(s(t)||P(t))&&(n?(u=t,d=[],function(t,r){r=(r=r||Object.prototype)&&!e(r)?[r]:r;var n=[];for(t=t;t&&(!r||r.indexOf(t)<0)&&"default"!==t.name;)n.push(t),t=t?Object.getPrototypeOf(t):null;return n}(u,m).forEach((t=>{!function(t,...e){e.forEach((e=>{t.indexOf(e)<0&&t.push(e)}))}(d,...Object.getOwnPropertyNames(t))})),d):Object.getOwnPropertyNames(t)).forEach((s=>{if(r(s,c,t,h)){var u=c[s],m=t[s];if((e(u)&&e(m)||o(u)&&o(m))&&(!0===l||l>0))c[s]=e(u)&&e(m)?[]:{},q([I(l)?l-1:l,c[s],u,m],r,n,i,a);else if(e(c)&&e(t))i?c[s]=m:c.push(m);else try{a?Object.defineProperty(c,s,Object.getOwnPropertyDescriptor(t,s)):c[s]=t[s]}catch(t){}}}))})),c}function L(...t){return q(t,((t,e,r)=>!0),!1,!1,!1)}const Q=function(t,r=1,n=!0){return!I(r)||r<=0?t:(!e(t)&&o(t)&&n&&(t=Object.values(t)),e(t)?t.reduce(((t,i)=>e(i)||o(i)&&n?t.concat(Q(e(i)?i:Object.values(i),r-1,n)):t.concat(i)),[]):t)},B=Q;function H(t,e=1){var r=0;t.forEach((t=>{r++}));var n=t.slice(t.length-r,e);return arguments.length>1?n:n[0]}function z(t,e=1){return arguments.length>1?H(t.slice().reverse(),e).reverse():H(t.slice().reverse())}function F(t){return o(t)&&Object.getPrototypeOf(t)===Object.prototype}function V(t){return!0===t||!1===t}const U=function(t,r,n=!0,i=1){if(e(t)&&e(r)&&t.length!==r.length)return!n;if(o(t)&&o(r)){var a=Object.keys(t),l=Object.keys(r);if(!a.length&&!l.length)return F(t)&&F(r)?n:t===r===n;if(!U(a,l))return!n}if(i>0&&(e(t)&&e(r)||o(t)&&o(r))){var c=function(t,r,n=!0,i=!0,a=!1,l=!1){if(e(t)&&e(r)){var c=[],h=!0;return t.forEach((t=>{if(h){var u,m,d,f=!1;m=(r,a)=>{(!f||i&&s(t))&&((e(f=n(t,a))&&!f.length||o(f)&&!Object.keys(f).length)&&(f=!1),s(f)&&i&&(t=f))},d=void 0,s(u=r)&&Object.keys(u).forEach(((t,e)=>{!1!==d&&(d=m(I(t)&&parseFloat(t),u[t]))})),s(f)?c.push(i?f:t):V(f)?a&&!f||!a&&f?c.push(t):l&&(h=!1):c.push(f)}})),c}if(o(t)&&o(r))return c={},h=!0,Object.keys(t).forEach((u=>{if(h){var m=n(t[u],r[u]);(e(m)&&!m.length||o(m)&&!Object.keys(m).length)&&(m=!1),s(m)?c[u]=i?m:t[u]:V(m)?a&&!m||!a&&m?c[u]=t[u]:l&&(h=!1):c[u]=m}})),c}(t,r,((t,e)=>U(t,e,n,i-1)),!1,!1,!0);return e(c)?c.length===t.length&&c.length===r.length:o(c)&&o(t)?Object.keys(c).length===Object.keys(t).length&&Object.keys(c).length===Object.keys(r).length:c}return P(n)?n(t,r):R(t)&&R(r)&&isNaN(t)&&isNaN(r)?n:t===r===n},K=U;function G(t,r=[]){return q([{},t],((t,n,i)=>{if(!P(i[t]))return P(r)?r(t):!e(r)||!r.length||r.indexOf(t)>-1}),!1,!1,!1)}class J{static lex(t,e,n={}){if(!r(t+=""))throw new Error("Argument1 must be a string!");var i=t=>({delims:t.delims.slice(),options:G(t.options),nesting:t.nesting.slice(),maxDepth:t.maxDepth,comments:t.comments.slice(),tokens:t.tokens.slice(),matches:t.matches.slice(),matchesi:G(t.matchesi)});if(J.$cache[t]&&!1!==n.cache)for(var s=0;s<J.$cache[t].length;s++){var o=J.$cache[t][s];if(K(o.delims,e))return i(o)}var a=new J(t,n).lex(e);return!1!==n.cache&&(J.$cache[t]=J.$cache[t]||[],J.$cache[t].push(a)),i(a)}static split(t,e,r){return J.lex(t,e,r).tokens}static match(t,e,r){return J.lex(t,e,r).matches}constructor(t,e){if(!r(t))throw new Error("Lexer requires the first argument to be a string.");this.$str=t,this.$options=e||{},this.$options.blocks||(this.$options.blocks=J.$blocks),this.$options.quotes||(this.$options.quotes=J.$quotes),this.$options.comments||(this.$options.comments=J.$comments)}lex(t,e){for(var r={delims:a(t),options:L(!0,{},this.$options,e||{}),nesting:[],maxDepth:0,comments:[],tokens:[],matches:[],matchesi:{}},n=0;"number"==typeof n;)n=this._evalCharsAt(r,n);if(r.nesting.length)throw new Error("Error parsing the string: "+this.$str+". Unterminated blocks: "+B(r.nesting).join(", "));return r}_evalCharsAt(t,e){if(!(e>=this.$str.length)){var r=1,n={},i={},s={};if(t.openComment||(i=this._testQuotes(t,e)),t.openQuote||(n=this._testComments(t,e)),t.openComment||n.ending)t.nesting.length||s.ending?this._push(t,this.$str[e]):(r=(a=n.starting||n.ending||this.$str[e]).length,this._push(t,a,"comments",n.starting));else if(t.openQuote||i.ending)this._push(t,this.$str[e]);else{if(t.options.limit&&t.matches.length===t.options.limit)return this._push(t,this.$str[e]),e+1;s=this._testNesting(t,e),s=this._testNesting(t,e);var o=this._testChars(t.options.stopChars||[],t,e);if(!t.nesting.length&&!1!==o)return t.options.stopChar=o,void(t.options.stopCharForward=this.$str.substr(e));if(t.delims.length)if(t.nesting.length||s.ending){var a;r=(a=s.starting||s.ending||this.$str[e]).length,this._push(t,a)}else{this._push(t,"");var l=this._testChars(t.delims,t,e);if(!1!==l&&(t.matches.push(l),t.matchesi[e]=l,r=l.length||1,!t.options.preserveDelims)){var c=e+(l.length||1);return c===this.$str.length&&this._push(t,""),c}this._push(t,l||this.$str[e])}else 2===t.nesting.length&&s.starting?(t.matches.push(null),this._push(t,s.starting),r=s.starting.length):!t.nesting.length&&s.ending?(this._push(t,s.ending),r=s.ending.length,t.matches.push(null)):this._push(t,this.$str[e])}return e+r}}_testQuotes(t,e){var r={};return(t.options.quotes||[]).forEach((n=>{this.$str.substr(e,1)===n&&(t.openQuote?n===t.openQuote&&(t.openQuote=!1,r.ending=n):(t.openQuote=n,r.starting=n))})),r}_testComments(t,e){var r={};return(t.options.comments||[]).forEach((n=>{if(t.openComment){if(z(n)===z(t.openComment)){var i=z(n);this.$str.substr(e).startsWith(i)&&(t.openComment=!1,r.ending=i)}}else{var s=H(n);this.$str.substr(e).startsWith(s)&&(t.openComment=n,r.starting=s)}})),r}_testNesting(t,e){var r={};return(t.options.blocks||[]).forEach((n=>{var i=H(n);if(this.$str.substr(e).startsWith(i))t.nesting=t.nesting.concat([n]),r.starting=i;else if(t.nesting.length&&z(n)===z(z(t.nesting))){var s=z(n);this.$str.substr(e).startsWith(s)&&(t.nesting=t.nesting.slice(0,-1),r.ending=s)}})),t.maxDepth=Math.max(t.maxDepth,t.nesting.length),r}_testChars(t,e,r){for(var n=0;n<t.length;n++){var i=t[n];if(P(i)){var s=i(this.$str.substr(0,r),this.$str.substr(r),e.tokens.slice());if(!1!==s)return s}if(e.options.useRegex){var o=this.$str.substr(r).match(new RegExp("^"+i,!0!==e.options.useRegex?e.options.useRegex:""));if(o)return o[0]}if(!e.options.ci&&this.$str.substr(r,i.length)===i||e.options.ci&&this.$str.substr(r,i.length).toLowerCase()===i.toLowerCase())return i}return!1}_push(t,e,r="tokens",i=!1){var s=t.matches.length;if(n(t.tokens[s])&&(t.tokens[s]=""),"comments"===r){t.tokens[s].comments||(t.tokens[s]=new String(t.tokens[s]),t.tokens[s].comments=[]);var o=t.tokens[s].comments.length-(!t.tokens[s].comments.length||i?0:1);t.tokens[s].comments[o]=(t.tokens[s].comments[o]||"")+e}else t.tokens[s].comments,t.tokens[s]=t.tokens[s]+e}split(t,e,r){return this.lex(e,r).tokens}match(t,e,r){return this.lex(e,r).matches}regParse(t,e){return this.lex(t,L({useRegex:!0},e||{}))}regSplit(t,e){return this.regParse(t,e).tokens}regMatch(t,e){return this.regParse(t,e).matches}}function X(t,e={}){const r=T.call(this);return r.OOHTML||(r.OOHTML={}),r.OOHTML.meta||(r.OOHTML.meta=r.DOM.meta("oohtml",!0)),r.OOHTML.meta.defaults(L(3,t,e)),r.OOHTML.meta}function Y(t){var e=J.split(t.trim(),[":"]);return[t=e.shift(),e.reduce(((t,e)=>{var[r,n]=J.split(e.trim(),[]);return t[r]=W(n,"(",")"),t}),{})]}J.$blocks=[["(",")"],["[","]"],["{","}"]],J.$quotes=['"',"'","`"],J.$comments=[["/*","*/"],["//","\n"]],J.$cache=Object.create(null);const Z=(t,e)=>J.split(t.trim(),["|","+"],{preserveDelims:!0}).reduce(((t,r)=>{var n;return(r.startsWith("|")||r.startsWith("+"))&&(n=r.substr(0,1),r=r.substr(1).trim()),t.theEnd||"|"===n&&t.length?(t.theEnd=!0,t):t.concat(e(r.trim()))}),[]).filter((t=>t)),tt=(t,e,r)=>{const n=t=>t.reduce(((t,e)=>t.concat(...r(e).values())),[]);return Z(e,(e=>{var[e,i]=Y(e);return t.reduce(((t,s)=>{var o=r(s);"*"===e&&(e="("+o.keys().join("+")+")");var l,c=("(",")",(l=e).startsWith("(")&&l.endsWith(")")?tt([s],W(e,"(",")"),r):a(o.get(e),!1)),h=[];return Object.keys(i).forEach((t=>{if("deep"===t||"deepest"===t)for(var o=[s];("deepest"===t||!c.length)&&(o=n(o)).length;){var a=tt(o,`${e}${h.map((t=>`:${t}(${i[t]})`)).join("")}`,r);a.length&&(c=a)}else"having"!==t&&"not-having"!==t||(c=c.filter((e=>{var n=Z(i[t],(t=>r(e,t)));return"not-having"===t?!n.length:n.length}))),h.push(t)})),t.concat(c)}),[])}))},et=function(t,e,r,n=null,i=0){if(!e.length)return[];var s,o=e.shift();o.endsWith(".")&&(s=!0,o=o.substr(0,o.length-1).trim());var a=tt(t,o,r);if(a.length&&s)return a;if(e.length){var l=et(a,e.slice(),r,n,i+1);return-1===l?n(a,i,!0):l}return n?n(a,i):a},rt=["nocompose"],nt=[],it=[];(function r(n={}){const i=T.call(this);if(n.onDomReady)return void i.DOM.ready((()=>{r.call(this,{...n,onDomReady:!1})}));const s=i.window,o=i.window.document,h=i.DOM.mutations,u=[],m=X.call(this,{element:{import:"import"},attr:{importid:"name",exportsearch:"exportsearch"}},n.params);rt.push(m.get("attr.importid"),m.get("attr.moduleref"));const d="["+s.CSS.escape(m.get("attr.moduleref"))+"]",f="["+s.CSS.escape(m.get("attr.exportgroup"))+"]",p=class{static create(t){return c(this.el,"oohtml").get("instance")||new p(t)}constructor(t){this.el=t,c(this.el,"oohtml").set("instance",this);const[e,r]=Y(t.getAttribute(m.get("attr.importid"))||"default");c(this.el,"oohtml").set("importID",e),c(this.el,"oohtml").set("importModifiers",r)}hydrate(t,e,r){c(this.el,"oohtml").set("anchorNode",t),c(this.el,"oohtml").set("slottedElements",e),c(this.el,"oohtml").set("compositionBlock",r),this._bindSlotted(e),this._connectToCompositionBlock()}connectedCallback(){c(this.el,"oohtml").has("anchorNode")||(c(this.el,"oohtml").set("anchorNode",m.get("isomorphic")?o.createComment(this.el.outerHTML):o.createTextNode("")),c(this.el,"oohtml").set("compositionBlock",this.el.hasAttribute(m.get("attr.moduleref"))?this.el.getAttribute(m.get("attr.moduleref")).trim().startsWith("~")?this.el.parentNode.closest(f):null:this.el.parentNode.closest(d)),this._connectToCompositionBlock()),i.DOM.ready.call(i,(()=>{this.resolve("connected")}))}_connectToCompositionBlock(){this.compositionBlock&&c(this.compositionBlock,"oohtml","imports").set(this.importID,this.el)}_bindSlotted(t){t.forEach((t=>{t.importReference=this.el})),c(this.el,"oohtml").set("slottedObserver",h.onRemoved(t,((e,r,n,i,s)=>{s&&s.size===t.length&&c(this.el,"oohtml").get("slottedObserver").disconnect(),e.forEach((t=>{t.parentNode||function(t,e,r=!1){for(var n=t.indexOf(e);n>-1&&(r||!1===r);)t.splice(n,1),r>0&&r--,n=t.indexOf(e)}(this.slottedElements,t),t.importReference===this.el&&delete t.importReference})),this.slottedElements.length||this.anchorNode.isConnected&&this.anchorNode.replaceWith(this.el)}),{maintainCallState:!0,ignoreTransients:!0}))}resolve(r=null){if(!t(u,(t=>this.el.closest(t)))){var n,i;if(this.el.hasAttribute(m.get("attr.moduleref")))this.compositionBlock&&c(this.compositionBlock,"oohtml","imports").get(this.importID)===this.el&&c(this.compositionBlock,"oohtml","imports").delete(this.importID),n=this.el;else{if(!this.compositionBlock)return void console.warn("Scoped slots must be found within template contexts. ["+this.importID+"]",this.el);n=this.compositionBlock}var s=n.getAttribute(m.get("attr.moduleref")).trim(),a=this.el.getAttribute(m.get("attr.exportsearch"));n&&(i=((t,e,r)=>{var n=this.importID,i=this.importModifiers,[s,o]="search"in i||null!==r?("search"in i?i.search:r).split("-").filter((t=>t)).map((t=>parseInt(t||0))).concat([0,1e3]):[0,0];return function(t,e,r,n=null){var i=e.split("#")[0].split("/").map((t=>t.trim())).filter((t=>t));return et(t,i,r,n)}(t,e,(function(t,e){var r=c(t,"oohtml","templates");return 1===arguments.length?r:e.startsWith(":")?c(t,"oohtml","exports").get(e.substr(1)):r.get(e)}),(function(t,e,r){var i=t.reduce(((t,e)=>t.concat(c(e,"oohtml","exports").get(n)||[])),[]);return!i.length&&e>s&&o?(o--,-1):i}))})([s.startsWith("~")?this.compositionBlock:o],s,a)).length?function(t,r,n=null){return e(r)?t.filter((t=>n?r.filter((e=>n(t,e))).length:-1===r.indexOf(t))):[]}(i,c(this.el,"oohtml").get("originalSlottedElements")||[]).length&&(c(this.el,"oohtml").set("originalSlottedElements",i),this.fill(i)):(c(this.el,"oohtml").set("originalSlottedElements",null),this.empty())}}fill(t){t=a(t,!1).map((t=>t.cloneNode(!0))),this.empty(!0),this.el.isConnected&&this.el.replaceWith(this.anchorNode),t.forEach((t=>{c(t,"oohtml","templates").set("~",this.el),function(t,e,r=[],n=!0){if(r=r.concat(rt),t.hasAttribute("noinherit")&&(r=r.concat((t.getAttribute("noinherit")||"*").split(" ").map((t=>t.trim())))),l(it.concat(["role","class"])).forEach((i=>{var s,o;if(!r.includes(i)&&!r.includes("*")&&(s=e.getAttribute(i))){if(o=t.getAttribute(i))var a=n?[o,s]:[s,o];else a=[s];t.setAttribute(i,l(a.join(" ").split(" ").map((t=>t.trim()))).join(" ")),r.push(i)}})),l(nt.concat("style")).forEach((i=>{var s,o;if(!r.includes(i)&&!r.includes("*")&&(s=e.getAttribute(i))){if(o=t.getAttribute(i))(a=n?[o,s]:[s,o])[0].trim().endsWith(";")||(a[0]=a[0]+";");else var a=[s];t.setAttribute(i,a.join(" ")),r.push(i)}})),!r.includes("*"))for(var i=0;i<e.attributes.length;i++){var s=e.attributes[i];r.includes(s.name)||t.hasAttribute(s.name)&&!n||t.setAttribute(s.name,s.value)}}(t,this.el),t.getAttribute(m.get("attr.exportgroup"))||t.setAttribute(m.get("attr.exportgroup"),this.importID),this.anchorNode.before(t)})),this._bindSlotted(t),this.slottedElements.push(...t)}empty(t=!1){if(this.slottedElements){var e=this.slottedElements;t&&c(this.el,"oohtml").has("slottedObserver")&&(c(this.el,"oohtml").get("slottedObserver").disconnect(),e=this.slottedElements.splice(0)),e.forEach((t=>t.remove()))}}get importID(){return c(this.el,"oohtml").get("importID")}get importModifiers(){return c(this.el,"oohtml").get("importModifiers")}get anchorNode(){return c(this.el,"oohtml").get("anchorNode")}get compositionBlock(){return c(this.el,"oohtml").get("compositionBlock")}get slottedElements(){return c(this.el,"oohtml").has("slottedElements")||c(this.el,"oohtml").set("slottedElements",[]),c(this.el,"oohtml").get("slottedElements")}get exports(){return c(this.el,"oohtml").get("exports")}static get observedAttributes(){return[m.get("attr.importid")]}};h.onPresent(m.get("element.import"),(t=>{p.create(t).connectedCallback()}));const g=(t,e,r=null)=>{const n=(t,r)=>!e||r===e||!0===e&&(t.importModifiers&&"search"in t.importModifiers||t.el.getAttribute(m.get("attr.exportsearch")));if(t.matches(m.get("element.import"))){var i=p.create(t);n(i,i.importID)&&i.resolve(r)}else c(t,"oohtml","imports").forEach(((t,e)=>{var i=p.create(t);n(i,e)&&i.resolve(`Resolution scope: ${r}`)}))};h.onPresent(d,(e=>{t(u,(t=>e.closest(t)))||h.onAttrChange(e,(t=>{t[0].target.getAttribute(t[0].attributeName)!==t[0].oldValue&&g(e,null,`Attr-Change: ${t[0].attributeName}`)}),[m.get("attr.moduleref"),m.get("attr.importid")])})),o.addEventListener("templatemutation",(t=>{t.detail.path&&a(o.querySelectorAll("["+s.CSS.escape(m.get("attr.moduleref"))+"]")).forEach((e=>{(function(t,e){return e=e.split("#")[0].split("/").map((t=>t.trim())).filter((t=>t)),!!(t=t.split("#")[0].split("/").map((t=>t.trim())).filter((t=>t))).length&&t.reduce(((t,r,n)=>!!t&&J.split(r.trim(),["|","+"]).reduce(((t,r)=>{var[r,i]=Y(r),s=(r=r.trim())===e[n];if(!s&&("deep"in i||"deepest"in i)){var o=e.slice(n+1).reduce(((t,e,n)=>t>-1&&"deep"in i?t:e===r?n:t),-1);o>-1&&(e.splice(n,o+1),s=!0)}return t||s}),!1)),!0)})(e.getAttribute(m.get("attr.moduleref")),t.detail.path)&&(g(e,!0,`'templatemutation' event: ${t.detail.path}, search()`),t.detail.addedExports.concat(t.detail.removedExports).forEach((r=>{g(e,r.name,`'templatemutation' event: ${t.detail.path}, ${r.name}`)})))}))})),i.DOM.ready.call(i,(()=>{m.get("isomorphic")&&a(o.querySelectorAll(f)).forEach((t=>{if(!c(t.parentNode,"oohtml").get("importsCan")&&!t.importReference){var e=[];t.parentNode.childNodes.forEach((t=>{var r;if(1===t.nodeType&&t.matches(f))e.push(t);else if(8===t.nodeType&&(r=t.nodeValue.trim())&&r.startsWith("<"+m.get("element.import"))&&r.endsWith("</"+m.get("element.import")+">")){var n,i=o.createElement("div");if(i.innerHTML=r,(n=i.firstChild).matches(m.get("element.import"))){var s=n.hasAttribute(m.get("attr.moduleref"))?n.getAttribute(m.get("attr.moduleref")).trim().startsWith("~")?t.parentNode.closest(f):null:t.parentNode.closest(d);p.create(n).hydrate(t,e,s),e=[]}}})),c(t.parentNode,"oohtml").set("importsCan",!0)}}))}))}).call(window)})();
|
|
2
|
-
|
|
1
|
+
(()=>{function ot(t,e,r=!1){if(e=="")return t;var o=r?t.lastIndexOf(e):t.indexOf(e);return o===-1?"":t.substr(o+e.length)}function it(t,e){return t.reduce((r,o,i)=>r||e(o,i),!1)}function vt(t,e,r=!1){if(e=="")return t;var o=r?t.lastIndexOf(e):t.indexOf(e);return o===-1?t:t.substr(0,o)}function F(t){return arguments.length&&(t===void 0||typeof t>"u")}function z(t){return typeof t=="function"}function v(t){return z(t)||t&&{}.toString.call(t)==="[object function]"}function nt(t,...e){return e.forEach(r=>{t.indexOf(r)<0&&t.push(r)}),t}function h(t){return Array.isArray(t)}function Q(t){return t instanceof String||typeof t=="string"&&t!==null}function Ot(t){return!Q(t)&&!F(t.length)}function st(t){return t===null||t===""}function w(t){return Array.isArray(t)||typeof t=="object"&&t||z(t)}function wt(t){return st(t)||F(t)||t===!1||t===0||w(t)&&!Object.keys(t).length}function x(t){return!Array.isArray(t)&&typeof t=="object"&&t}function S(t,e=!0){return h(t)?t:!e&&x(t)?[t]:t!==!1&&t!==0&&wt(t)?[]:Ot(t)?Array.prototype.slice.call(t):x(t)?Object.values(t):[t]}function bt(t,e,r=null){return h(e)?t.filter(o=>r?e.filter(i=>r(o,i)).length:e.indexOf(o)===-1):[]}function ft(t,e,r=!1){for(var o=t.indexOf(e);o>-1&&(r||r===!1);)t.splice(o,1),r>0&&r--,o=t.indexOf(e);return t}function I(t,e=1){var r=0;t.forEach(i=>{r++});var o=t.slice(t.length-r,e);return arguments.length>1?o:o[0]}function U(t){return t instanceof Number||typeof t=="number"}function W(t){return U(t)||t!==!0&&t!==!1&&t!==null&&t!==""&&!isNaN(t*1)}var Ut=function(t,e=1,r=!0){return!W(e)||e<=0||(!h(t)&&x(t)&&r&&(t=Object.values(t)),!h(t))?t:t.reduce((o,i)=>h(i)||x(i)&&r?o.concat(Ut(h(i)?i:Object.values(i),e-1,r)):o.concat(i),[])},At=Ut;function G(t){return t===!0||t===!1}function T(t,e=1){return arguments.length>1?I(t.slice().reverse(),e).reverse():I(t.slice().reverse())}function J(t,e){var r=void 0;return w(t)&&Object.keys(t).forEach((o,i)=>{r!==!1&&(r=e(W(o)?parseFloat(o):o,t[o],i))}),r}function K(t){let e=(r,o,i)=>i.indexOf(r)===o;return t.filter(e)}function _(t,...e){globalThis.WebQitInternalsRegistry||(globalThis.WebQitInternalsRegistry=new Map);var r=globalThis.WebQitInternalsRegistry.get(t);if(!r){if(r=new Map,e[0]===!1)return r;globalThis.WebQitInternalsRegistry.set(t,r)}for(var o,i;o=e.shift();)if((i=r)&&!(r=r.get(o))){if(r=new Map,e[0]===!1)return r;i.set(o,r)}return r}function ut(t){return x(t)&&Object.getPrototypeOf(t)===Object.prototype}function Ct(o,e){e=e||Object.prototype,e=e&&!h(e)?[e]:e;for(var r=[],o=o;o&&(!e||e.indexOf(o)<0)&&o.name!=="default";)r.push(o),o=o?Object.getPrototypeOf(o):null;return r}function St(t,e){var r=[];return Ct(t,e).forEach(o=>{nt(r,...Object.getOwnPropertyNames(o))}),r}function M(t,e,r=!1,o=!1,i=!1){var s=0,n=t.shift();if((W(n)||n===!0||n===!1)&&(s=n,n=t.shift()),!t.length)throw new Error("_merge() requires two or more array/objects.");return t.forEach((f,u)=>{!w(f)&&!v(f)||(r?St(f):Object.getOwnPropertyNames(f)).forEach(m=>{if(!!e(m,n,f,u)){var p=n[m],a=f[m];if((h(p)&&h(a)||x(p)&&x(a))&&(s===!0||s>0))n[m]=h(p)&&h(a)?[]:{},M([W(s)?s-1:s,n[m],p,a],e,r,o,i);else if(h(n)&&h(f))o?n[m]=a:n.push(a);else try{i?Object.defineProperty(n,m,Object.getOwnPropertyDescriptor(f,m)):n[m]=f[m]}catch{}}})}),n}function R(...t){return M(t,(e,r,o)=>!0,!1,!1,!1)}function Z(t,e,r=!0,o=!0,i=!1,s=!1){if(h(t)&&h(e)){var n=[],f=!0;return t.forEach(u=>{if(!!f){var m=!1;J(e,(p,a)=>{(!m||o&&w(u))&&(m=r(u,a),(h(m)&&!m.length||x(m)&&!Object.keys(m).length)&&(m=!1),w(m)&&o&&(u=m))}),w(m)?n.push(o?m:u):G(m)?i&&!m||!i&&m?n.push(u):s&&(f=!1):n.push(m)}}),n}if(x(t)&&x(e)){var n={},f=!0;return Object.keys(t).forEach(p=>{if(!!f){var a=r(t[p],e[p]);(h(a)&&!a.length||x(a)&&!Object.keys(a).length)&&(a=!1),w(a)?n[p]=o?a:t[p]:G(a)?i&&!a||!i&&a?n[p]=t[p]:s&&(f=!1):n[p]=a}}),n}}function mt(t,e=[]){return M([{},t],(r,o,i)=>{if(!v(i[r]))return v(e)?e(r):h(e)&&e.length?e.indexOf(r)>-1:!0},!1,!1,!1)}var Et=function(t,e,r=!0,o=1){if(h(t)&&h(e)&&t.length!==e.length)return!r;if(x(t)&&x(e)){var i=Object.keys(t),s=Object.keys(e);if(!i.length&&!s.length)return ut(t)&&ut(e)?r:t===e===r;if(!Et(i,s))return!r}if(o>0&&(h(t)&&h(e)||x(t)&&x(e))){var n=Z(t,e,(f,u)=>Et(f,u,r,o-1),!1,!1,!0);return h(n)?n.length===t.length&&n.length===e.length:x(n)&&x(t)?Object.keys(n).length===Object.keys(t).length&&Object.keys(n).length===Object.keys(e).length:n}return v(r)?r(t,e):U(t)&&U(e)&&isNaN(t)&&isNaN(e)?r:t===e===r},Nt=Et;function P(t){return!Array.isArray(t)&&typeof t=="object"&&t}function Ht(t){var e=typeof t.InstallTrigger<"u";if(e)return"firefox";var r=/constructor/i.test(t.HTMLElement)||function(m){return m.toString()==="[object SafariRemoteNotification]"}(!t.safari||typeof t.safari<"u"&&t.safari.pushNotification);if(r)return"safari";var o=!!t.chrome&&(!!t.chrome.webstore||!!t.chrome.runtime),i=o&&t.navigator.userAgent.indexOf("Edg")!=-1,s=!!t.opr&&!!t.opr.addons||!!t.opera||t.navigator.userAgent.indexOf(" OPR/")>=0,n=!!t.document.documentMode,f=!n&&!!t.StyleMedia,u=(o||s)&&!!t.CSS;return f?"edge":n?"ie":s?"opera":i?"ie-chromium":o?"chrome":"unknown"}function Vt(t){var e=t.getComputedStyle(t.document.documentElement,""),r=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||e.Olink===""&&["","o"])[1],o=("WebKit|Moz|Ms|O".match(new RegExp("("+r+")","i"))||[])[1];return{api:o,prefix:r,css:"-"+r+"-"}}function D(){if(!(P(this)&&this.window)&&typeof window>"u")throw new Error("A window context is required.");let t=P(this)&&this.window?this.window:window;if(t.WebQit||(t.WebQit={}),!t.WebQit.window){let e,r;Object.defineProperty(t.WebQit,"window",{get:()=>t}),Object.defineProperty(t.WebQit,"vendor",{value:{getName:()=>(e||(e=Ht(t)),e),getPrefix:()=>(r||(r=Vt(t)),r)}})}return t.WebQit}function at(t){return typeof t=="function"}function N(t){return Array.isArray(t)||typeof t=="object"&&t||at(t)}function jt(t){return t instanceof Number||typeof t=="number"}function L(t){return jt(t)||t!==!0&&t!==!1&&t!==null&&t!==""&&!isNaN(t*1)}var tt=class{constructor(e,r=!0){this.window=e,this.async=r,this.readCallbacks=[],this.writeCallbacks=[],this._run()}_run(){this.window.requestAnimationFrame(()=>{this.readCallbacks.forEach((e,r)=>{e&&!e()&&(this.readCallbacks[r]=null)}),this.writeCallbacks.forEach((e,r)=>{e&&!e()&&(this.writeCallbacks[r]=null)}),this._run()})}onread(e,r=!1){if(r)return new Promise((o,i)=>{this.async===!1?e(o,i):this.readCallbacks.push(()=>{e(o,i)})});this.async===!1?e():this.readCallbacks.push(e)}onwrite(e,r=!1){if(r)return new Promise((o,i)=>{this.async===!1?e(o,i):this.writeCallbacks.push(()=>{e(o,i)})});this.async===!1?e():this.writeCallbacks.push(e)}cycle(e,r,o){this.onread(()=>{var i=e(o);if(i){var s=n=>{this.onwrite(()=>{var f=r(n,o);if(f){var u=m=>{this.cycle(e,r,m)};f instanceof Promise?f.then(u):u()}})};i instanceof Promise?i.then(s):s()}})}};function q(t){return t instanceof String||typeof t=="string"&&t!==null}function H(t){return Array.isArray(t)}function X(t){return arguments.length&&(t===void 0||typeof t>"u")}function zt(t){return!q(t)&&!X(t.length)}function lt(t){return t===null||t===""}function Jt(t){return lt(t)||X(t)||t===!1||t===0||N(t)&&!Object.keys(t).length}function b(t,e=!0){return H(t)?t:!e&&P(t)?[t]:t!==!1&&t!==0&&Jt(t)?[]:zt(t)?Array.prototype.slice.call(t):P(t)?Object.values(t):[t]}function et(t){let e=D.call(this);e.DOM.isDOMReady||e.window.document.readyState==="complete"?t(e.window):(e.window.domReadyCallbacks||(e.window.domReadyCallbacks=[],e.window.document.addEventListener("DOMContentLoaded",()=>{e.DOM.isDOMReady=!0,e.window.domReadyCallbacks.splice(0).forEach(r=>r(e.window))},!1)),e.window.domReadyCallbacks.push(t))}var rt=class{constructor(e){this.window=e}onAdded(e,r,o={}){return o.on="added",this.onPresenceChange(e,(i,s,n,f,u)=>{r(i,s,n,f,u)},o)}onRemoved(e,r,o={}){return o.on="removed",this.onPresenceChange(e,(i,s,n,f,u)=>{r(i,s,n,f,u)},o)}onPresent(e,r,o={}){et.call(this.window,()=>{this.window.MutationObserver&&this.onAdded(e,(i,s)=>{i.forEach(n=>r(n,s))},o),q(e)?b(this.window.document.querySelectorAll(e)).forEach(i=>r(i,1)):e.parentNode&&r(e,1)})}onAbsent(e,r,o={}){et.call(this.window,()=>{this.window.MutationObserver&&onRemoved(e,(i,s)=>{i.forEach(n=>r(n,s))},o),q(e)?b(this.window.document.querySelectorAll(e)).length===0&&r(null,0):e.parentNode||r(e,0)})}onPresenceChange(e,r,o={}){e=b(e,!1);var i=(a,d)=>{if(d=d.filter(g=>g.matches),q(a)){var l=d.filter(g=>g.matches(a));if(o.observeIndirectMutation!==!1&&(l=d.reduce((g,O)=>g.concat(b(O.querySelectorAll(a))),l),l.length))return l}else{if(d.includes(a))return[a];if(o.observeIndirectMutation!==!1&&d.length){for(var c=a;c=c.parentNode;)if(d.includes(c))return[a]}}},s=(a,d)=>(d.$$searchCache||(d.$$searchCache=new Map),a.reduce((l,c)=>{var g;return d.$$searchCache.has(c)?g=d.$$searchCache.get(c):(g=i(c,d,q(c))||[],d.$$searchCache.set(c,g)),l.concat(g)},[])),n=new Set,f=new Set,u=(a,d,l)=>{d&&o.on==="removed"||!d&&o.on==="added"||(a=s(e,a)).length&&(o.maintainCallState?(a.forEach(c=>{d?(n.add(c),f.delete(c)):(n.delete(c),f.add(c))}),r(a,d,l,n,f)):r(a,d,l))},m=o.context||this.window.document.documentElement,p=this._observe(m,(a,d,l,c)=>{o.ignoreTransients||(u(a,0,!0),u(a.concat(d),1,!0),u(d,0,!0)),u(c,0),u(l,1)});return p}onAttrChange(e,r,o=[]){var i=new this.window.MutationObserver(r),s={attributes:!0,attributeOldValue:!0};return o&&(s.attributeFilter=o),i.observe(e,s),i}onTreeChange(e,r,o=!1){var i=new this.window.MutationObserver(r),s={childList:!0,subtree:o};return i.observe(e,s),i}onMutation(e,r,o){var i=new this.window.MutationObserver(r);return i.observe(e,o),i}_observe(e,r){if(!Mt.has(e)){let i=new Set,s=new this.window.MutationObserver(n=>{if(!!i.size){var f=n.reduce((a,d)=>a.concat(b(d.addedNodes)),[]),u=n.reduce((a,d)=>a.concat(b(d.removedNodes)),[]),m=[],p=[];f=new Set(f),u=new Set(u),f.forEach(a=>{u.has(a)&&(u.delete(a),f.delete(a),a.isConnected?m.push(a):p.push(a))}),f=[...f],u=[...u],i.forEach(a=>a(m,p,f,u))}});s.observe(e,{childList:!0,subtree:!0}),Mt.set(e,{callbacks:i,observer:s})}let o=Mt.get(e);return o.callbacks.add(r),{disconnect(){o.callbacks.delete(r)},reconnect(){o.callbacks.add(r)}}}},Mt=new Map;function Zt(t){ve(t),Oe(t),we(t)}function ve(t){t.CSS||(t.CSS={}),t.CSS.escape||(t.CSS.escape=e=>e.replace(/([\:@\~\$\&])/g,"\\$1"))}function Oe(t){"isConnected"in t.Node.prototype||Object.defineProperty(t.Node.prototype,"isConnected",{get:function(){return!this.ownerDocument||!(this.ownerDocument.compareDocumentPosition(this)&this.DOCUMENT_POSITION_DISCONNECTED)}})}function we(t){t.Element.prototype.matches||(t.Element.prototype.matches=t.Element.prototype.matchesSelector||t.Element.prototype.mozMatchesSelector||t.Element.prototype.msMatchesSelector||t.Element.prototype.oMatchesSelector||t.Element.prototype.webkitMatchesSelector||function(e){for(var r=(this.document||this.ownerDocument).querySelectorAll(e),o=r.length;--o>=0&&r.item(o)!==this;);return o>-1})}function ct(t,e=null,r=!1){let o=D.call(this);if(q(t)){var i;if(t.trim().startsWith("<")){var s=o.window.document.createElement("div");s.innerHTML=t,i=r?b(s.children):s.firstChild}else i=r?b(Yt.call(this,t,e)):Pt.call(this,t,e);return i}return t instanceof o.window.Element?r?[t]:t:r?b(t):t}function Xt(t,e=null){return ct.call(this,t,e,!0)}function Pt(t,e=null,r=!1){let o=D.call(this);e=e||o.window.document;var i,s=r?"querySelectorAll":"querySelector";try{i=e[s](t)}catch{try{i=e[s](t.replace(/\:is\(/g,":matches("))}catch{try{i=e[s](t.replace(/\:is\(/g,":-webkit-any("))}catch{try{i=e[s](t.replace(/\:is\(/g,":-moz-any("))}catch(m){throw m}}}}return i}function Yt(t,e=null){return Pt.call(this,t,e,!0)}function V(t){return at(t)||t&&{}.toString.call(t)==="[object function]"}function B(t,e,r={},o={}){e=b(e).slice();for(var i=t;!X(i)&&!lt(i)&&e.length;){var s=e.shift();if(!(r.get?r.get(i,s):N(i)?s in i:i[s])){o.exists=!1;return}i=r.get?r.get(i,s):i[s]}return o.exists=!0,i}function pt(t,e,r,o={},i={}){let s=(p,a,d)=>i.set?i.set(p,a,d):(L(e[f])&&H(p)?p.push(d):p[a]=d,!0);e=b(e);for(var n=t,f=0;f<e.length;f++)if(f<e.length-1){if(!n||!N(n)&&!V(n))return!1;var u=B(n,e[f],i);if(!N(u)){if(i.buildTree===!1)return!1;u=V(i.buildTree)?i.buildTree(f):L(e[f+1])?[]:{};var m=s(n,e[f],u);if(!m)return!1}n=u}else return s(n,e[f],r)}function Gt(t,e,r=!1,o={}){e=b(e);var i=!1;do{var s=e.pop(),s=s===""?0:s,n=t;e.length&&(n=B(t,e,{},o)),(N(n)||V(n))&&(o.has?o.has(n,s):s in n)&&(o.deleteProperty?i=o.deleteProperty(n,s):o.del?i=o.del(n,s):(delete n[s],i=!0))}while(i&&r&&e.length&&(N(n)||V(n))&&!(o.keys?o.keys(n):Object.keys(n)).length);return i}function $t(t,e,r={}){var o={};return B(t,e,r,o),o.exists}function Ft(t,e=!1){let r=D.call(this);var o={};return!(o.el=r.window.document.head.querySelector('meta[name="oohtml"]'))&&e&&(o.el=r.window.document.createElement("meta"),o.el.setAttribute("name",t),r.window.document.head.append(o.el)),o.el&&(o.vars=(o.el.getAttribute("content")||"").split(";").filter(i=>i).reduce((i,s)=>{var n=s.split("=").map(f=>f.trim());return pt(i,n[0].split("."),n[1]==="true"?!0:n[1]==="false"?!1:L(n[1])?parseInt(n[1]):n[1]),i},{})),o.get=function(i){return B(this.vars,i.split("."))},o.set=function(i,s=null,n=!1){var f=P(i)?i:{[i]:s===!0?"true":s};if(n=arguments.length<3?s:n,Object.keys(f).forEach(u=>{if(f[u]===!1)Gt(this.vars,u.split("."));else if(P(f[u]))Object.keys(f[u]).forEach(p=>{var a=(u+"."+p).split(".");(!n||!$t(this.vars,a))&&pt(this.vars,a,f[u][p])});else{var m=u.split(".");(!n||!$t(this.vars,m))&&pt(this.vars,m,f[u])}}),e){let u=(m,p)=>Object.keys(p).reduce((a,d)=>{var l=(m?m+".":"")+d;return P(p[d])?a.push(...u(l,p[d])):a.push(l+"="+p[d]),a},[]);this.el.setAttribute("content",u("",this.vars).join(";"))}return!0},o.defaults=function(i,s=null){return this.set(i,s,!0)},o}function ht(){let t=D.call(this);return t.DOM||(t.DOM={},Zt(t.window),t.DOM.reflow=new tt(t.window),t.DOM.mutations=new rt(t.window),t.DOM.meta=Ft.bind(t.window),t.DOM.query=ct.bind(t.window),t.DOM.queryAll=Xt.bind(t.window),t.DOM.ready=et.bind(t.window)),t}function Wt(t,e){return vt(t,e,!0)}function dt(t,e,r){return Wt(ot(t,e),r)}function Dt(t,e,r){return t.startsWith(e)&&t.endsWith(r)}var y=class{static lex(e,r,o={}){if(!Q(e=e+""))throw new Error("Argument1 must be a string!");var i=m=>({delims:m.delims.slice(),options:mt(m.options),nesting:m.nesting.slice(),maxDepth:m.maxDepth,comments:m.comments.slice(),tokens:m.tokens.slice(),matches:m.matches.slice(),matchesi:mt(m.matchesi)});if(y.$cache[e]&&o.cache!==!1)for(var s=0;s<y.$cache[e].length;s++){var n=y.$cache[e][s];if(Nt(n.delims,r))return i(n)}var f=new y(e,o),u=f.lex(r);return o.cache!==!1&&(y.$cache[e]=y.$cache[e]||[],y.$cache[e].push(u)),i(u)}static split(e,r,o){return y.lex(e,r,o).tokens}static match(e,r,o){return y.lex(e,r,o).matches}constructor(e,r){if(!Q(e))throw new Error("Lexer requires the first argument to be a string.");this.$str=e,this.$options=r||{},this.$options.blocks||(this.$options.blocks=y.$blocks),this.$options.quotes||(this.$options.quotes=y.$quotes),this.$options.comments||(this.$options.comments=y.$comments)}lex(e,r){for(var o={delims:S(e),options:R(!0,{},this.$options,r||{}),nesting:[],maxDepth:0,comments:[],tokens:[],matches:[],matchesi:{}},i=0;typeof i=="number";)i=this._evalCharsAt(o,i);if(o.nesting.length)throw new Error("Error parsing the string: "+this.$str+". Unterminated blocks: "+At(o.nesting).join(", "));return o}_evalCharsAt(e,r){if(!(r>=this.$str.length)){var o=1,i={},s={},n={};if(e.openComment||(s=this._testQuotes(e,r)),e.openQuote||(i=this._testComments(e,r)),e.openComment||i.ending)if(!e.nesting.length&&!n.ending){var f=i.starting||i.ending||this.$str[r];o=f.length,this._push(e,f,"comments",i.starting)}else this._push(e,this.$str[r]);else if(e.openQuote||s.ending)this._push(e,this.$str[r]);else{if(e.options.limit&&e.matches.length===e.options.limit)return this._push(e,this.$str[r]),r+1;n=this._testNesting(e,r);var n=this._testNesting(e,r),u=this._testChars(e.options.stopChars||[],e,r);if(!e.nesting.length&&u!==!1){e.options.stopChar=u,e.options.stopCharForward=this.$str.substr(r);return}if(!e.delims.length)e.nesting.length===2&&n.starting?(e.matches.push(null),this._push(e,n.starting),o=n.starting.length):!e.nesting.length&&n.ending?(this._push(e,n.ending),o=n.ending.length,e.matches.push(null)):this._push(e,this.$str[r]);else if(!e.nesting.length&&!n.ending){this._push(e,"");var m=this._testChars(e.delims,e,r);if(m!==!1&&(e.matches.push(m),e.matchesi[r]=m,o=m.length||1,!e.options.preserveDelims)){var p=r+(m.length||1);return p===this.$str.length&&this._push(e,""),p}this._push(e,m||this.$str[r])}else{var f=n.starting||n.ending||this.$str[r];o=f.length,this._push(e,f)}}return r+o}}_testQuotes(e,r){var o={};return(e.options.quotes||[]).forEach(i=>{this.$str.substr(r,1)===i&&(e.openQuote?i===e.openQuote&&(e.openQuote=!1,o.ending=i):(e.openQuote=i,o.starting=i))}),o}_testComments(e,r){var o={};return(e.options.comments||[]).forEach(i=>{if(e.openComment){if(T(i)===T(e.openComment)){var n=T(i);this.$str.substr(r).startsWith(n)&&(e.openComment=!1,o.ending=n)}}else{var s=I(i);this.$str.substr(r).startsWith(s)&&(e.openComment=i,o.starting=s)}}),o}_testNesting(e,r){var o={};return(e.options.blocks||[]).forEach(i=>{var s=I(i);if(this.$str.substr(r).startsWith(s))e.nesting=e.nesting.concat([i]),o.starting=s;else if(e.nesting.length&&T(i)===T(T(e.nesting))){var n=T(i);this.$str.substr(r).startsWith(n)&&(e.nesting=e.nesting.slice(0,-1),o.ending=n)}}),e.maxDepth=Math.max(e.maxDepth,e.nesting.length),o}_testChars(e,r,o){for(var i=0;i<e.length;i++){var s=e[i];if(v(s)){var n=s(this.$str.substr(0,o),this.$str.substr(o),r.tokens.slice());if(n!==!1)return n}if(r.options.useRegex){var f=this.$str.substr(o).match(new RegExp("^"+s,r.options.useRegex!==!0?r.options.useRegex:""));if(f)return f[0]}if(!r.options.ci&&this.$str.substr(o,s.length)===s||r.options.ci&&this.$str.substr(o,s.length).toLowerCase()===s.toLowerCase())return s}return!1}_push(e,r,o="tokens",i=!1){var s=e.matches.length;if(F(e.tokens[s])&&(e.tokens[s]=""),o==="comments"){e.tokens[s].comments||(e.tokens[s]=new String(e.tokens[s]),e.tokens[s].comments=[]);var n=e.tokens[s].comments.length-(!e.tokens[s].comments.length||i?0:1);e.tokens[s].comments[n]=(e.tokens[s].comments[n]||"")+r}else{var f=e.tokens[s].comments;e.tokens[s]=e.tokens[s]+r}}split(e,r,o){return this.lex(r,o).tokens}match(e,r,o){return this.lex(r,o).matches}regParse(e,r){return this.lex(e,R({useRegex:!0},r||{}))}regSplit(e,r){return this.regParse(e,r).tokens}regMatch(e,r){return this.regParse(e,r).matches}};y.$blocks=[["(",")"],["[","]"],["{","}"]];y.$quotes=['"',"'","`"];y.$comments=[["/*","*/"],["//",`
|
|
2
|
+
`]];y.$cache=Object.create(null);function te(t,e={}){let r=ht.call(this);return r.OOHTML||(r.OOHTML={}),r.OOHTML.meta||(r.OOHTML.meta=r.DOM.meta("oohtml",!0)),r.OOHTML.meta.defaults(R(3,t,e)),r.OOHTML.meta}function ee(t,e,r,o=null){var i=e.split("#")[0].split("/").map(s=>s.trim()).filter(s=>s);return oe(t,i,r,o)}function gt(t){var e=y.split(t.trim(),[":"]);t=e.shift();var r=e.reduce((o,i)=>{var[s,n]=y.split(i.trim(),[]);return o[s]=dt(n,"(",")"),o},{});return[t,r]}function re(t,e){return e=e.split("#")[0].split("/").map(r=>r.trim()).filter(r=>r),t=t.split("#")[0].split("/").map(r=>r.trim()).filter(r=>r),t.length?t.reduce((r,o,i)=>r?y.split(o.trim(),["|","+"]).reduce((s,f)=>{var[f,u]=gt(f);f=f.trim();var m=f===e[i];if(!m&&("deep"in u||"deepest"in u)){var p=e.slice(i+1).reduce((d,l,c)=>d>-1&&"deep"in u?d:l===f?c:d,-1);if(p>-1){var a=e.splice(i,p+1);m=!0}}return s||m},!1):!1,!0):!1}var Kt=(t,e)=>y.split(t.trim(),["|","+"],{preserveDelims:!0}).reduce((r,o)=>{var i;return(o.startsWith("|")||o.startsWith("+"))&&(i=o.substr(0,1),o=o.substr(1).trim()),r.theEnd||i==="|"&&r.length?(r.theEnd=!0,r):r.concat(e(o.trim()))},[]).filter(r=>r),qt=(t,e,r)=>{let o=i=>i.reduce((s,n)=>s.concat(...r(n).values()),[]);return Kt(e,s=>{var[s,n]=gt(s);return t.reduce((f,u)=>{var m=r(u);s==="*"&&(s="("+m.keys().join("+")+")");var p=Dt(s,"(",")")?qt([u],dt(s,"(",")"),r):S(m.get(s),!1),a=[],d=l=>`${l}${a.map(c=>`:${c}(${n[c]})`).join("")}`;return Object.keys(n).forEach(l=>{if(l==="deep"||l==="deepest")for(var c=[u];(l==="deepest"||!p.length)&&(c=o(c)).length;){var g=qt(c,d(s),r);g.length&&(p=g)}else(l==="having"||l==="not-having")&&(p=p.filter(O=>{var A=Kt(n[l],C=>r(O,C));return l==="not-having"?!A.length:A.length})),a.push(l)}),f.concat(p)},[])})},oe=function(t,e,r,o=null,i=0){if(!e.length)return[];var s=e.shift(),n;s.endsWith(".")&&(n=!0,s=s.substr(0,s.length-1).trim());var f=qt(t,s,r);if(f.length&&n)return f;if(e.length){var u=oe(f,e.slice(),r,o,i+1);return u===-1?o(f,i,!0):u}return o?o(f,i):f};function _t(t={}){let e=ht.call(this);if(t.onDomReady){e.DOM.ready(()=>{_t.call(this,{...t,onDomReady:!1})});return}let r=e.window,o=e.window.document,i=e.DOM.mutations,s=[],n=te.call(this,{element:{import:"import"},attr:{importid:"name",exportsearch:"exportsearch"}},t.params);ie.push(n.get("attr.importid"),n.get("attr.moduleref"));let f="["+r.CSS.escape(n.get("attr.moduleref"))+"]",u="["+r.CSS.escape(n.get("attr.exportgroup"))+"]",m,p=class{static create(l){return _(this.el,"oohtml").get("instance")||new p(l)}constructor(l){this.el=l,_(this.el,"oohtml").set("instance",this);let[c,g]=gt(l.getAttribute(n.get("attr.importid"))||"default");_(this.el,"oohtml").set("importID",c),_(this.el,"oohtml").set("importModifiers",g)}hydrate(l,c,g){_(this.el,"oohtml").set("anchorNode",l),_(this.el,"oohtml").set("slottedElements",c),_(this.el,"oohtml").set("compositionBlock",g),this._bindSlotted(c),this._connectToCompositionBlock()}connectedCallback(){_(this.el,"oohtml").has("anchorNode")||(_(this.el,"oohtml").set("anchorNode",n.get("isomorphic")?o.createComment(this.el.outerHTML):o.createTextNode("")),_(this.el,"oohtml").set("compositionBlock",this.el.hasAttribute(n.get("attr.moduleref"))?this.el.getAttribute(n.get("attr.moduleref")).trim().startsWith("~")?this.el.parentNode.closest(u):null:this.el.parentNode.closest(f)),this._connectToCompositionBlock()),e.DOM.ready.call(e,()=>{this.resolve("connected")})}_connectToCompositionBlock(){this.compositionBlock&&_(this.compositionBlock,"oohtml","imports").set(this.importID,this.el)}_bindSlotted(l){l.forEach(c=>{c.importReference=this.el}),_(this.el,"oohtml").set("slottedObserver",i.onRemoved(l,(c,g,O,A,C)=>{C&&C.size===l.length&&_(this.el,"oohtml").get("slottedObserver").disconnect(),c.forEach(E=>{E.parentNode||ft(this.slottedElements,E),E.importReference===this.el&&delete E.importReference}),this.slottedElements.length||this.anchorNode.isConnected&&this.anchorNode.replaceWith(this.el)},{maintainCallState:!0,ignoreTransients:!0}))}resolve(l=null){if(!it(s,E=>this.el.closest(E))){var c=(E,j,It)=>{var ne=this.importID,xt=this.importModifiers,[se,Rt]="search"in xt||It!==null?("search"in xt?xt.search:It).split("-").filter($=>$).map($=>parseInt($||0)).concat([0,1e3]):[0,0];let fe=$=>$.reduce((k,Y)=>k.concat(_(Y,"oohtml","exports").get(ne)||[]),[]);return ee(E,j,function($,k){var Y=_($,"oohtml","templates");return arguments.length===1?Y:k.startsWith(":")?_($,"oohtml","exports").get(k.substr(1)):Y.get(k)},function($,k,Y){var Bt=fe($);return!Bt.length&&k>se&&Rt?(Rt--,-1):Bt})},g,O;if(this.el.hasAttribute(n.get("attr.moduleref")))this.compositionBlock&&_(this.compositionBlock,"oohtml","imports").get(this.importID)===this.el&&_(this.compositionBlock,"oohtml","imports").delete(this.importID),g=this.el;else{if(!this.compositionBlock){console.warn("Scoped slots must be found within template contexts. ["+this.importID+"]",this.el);return}g=this.compositionBlock}var A=g.getAttribute(n.get("attr.moduleref")).trim(),C=this.el.getAttribute(n.get("attr.exportsearch"));g&&(O=c([A.startsWith("~")?this.compositionBlock:o],A,C)).length?bt(O,_(this.el,"oohtml").get("originalSlottedElements")||[]).length&&(_(this.el,"oohtml").set("originalSlottedElements",O),this.fill(O)):(_(this.el,"oohtml").set("originalSlottedElements",null),this.empty())}}fill(l){l=S(l,!1).map(c=>c.cloneNode(!0)),this.empty(!0),this.el.isConnected&&this.el.replaceWith(this.anchorNode),l.forEach(c=>{_(c,"oohtml","templates").set("~",this.el),Ae(c,this.el),c.getAttribute(n.get("attr.exportgroup"))||c.setAttribute(n.get("attr.exportgroup"),this.importID),this.anchorNode.before(c)}),this._bindSlotted(l),this.slottedElements.push(...l)}empty(l=!1){if(this.slottedElements){var c=this.slottedElements;l&&_(this.el,"oohtml").has("slottedObserver")&&(_(this.el,"oohtml").get("slottedObserver").disconnect(),c=this.slottedElements.splice(0)),c.forEach(g=>g.remove())}}get importID(){return _(this.el,"oohtml").get("importID")}get importModifiers(){return _(this.el,"oohtml").get("importModifiers")}get anchorNode(){return _(this.el,"oohtml").get("anchorNode")}get compositionBlock(){return _(this.el,"oohtml").get("compositionBlock")}get slottedElements(){return _(this.el,"oohtml").has("slottedElements")||_(this.el,"oohtml").set("slottedElements",[]),_(this.el,"oohtml").get("slottedElements")}get exports(){return _(this.el,"oohtml").get("exports")}static get observedAttributes(){return[n.get("attr.importid")]}};i.onPresent(n.get("element.import"),l=>{var c=p.create(l);c.connectedCallback()});let a=(l,c,g=null)=>{let O=(C,E)=>!c||E===c||c===!0&&(C.importModifiers&&"search"in C.importModifiers||C.el.getAttribute(n.get("attr.exportsearch")));if(l.matches(n.get("element.import"))){var A=p.create(l);O(A,A.importID)&&A.resolve(g)}else _(l,"oohtml","imports").forEach((C,E)=>{var j=p.create(C);O(j,E)&&j.resolve(`Resolution scope: ${g}`)})};i.onPresent(f,l=>{it(s,c=>l.closest(c))||i.onAttrChange(l,c=>{c[0].target.getAttribute(c[0].attributeName)!==c[0].oldValue&&a(l,null,`Attr-Change: ${c[0].attributeName}`)},[n.get("attr.moduleref"),n.get("attr.importid")])}),o.addEventListener("templatemutation",l=>{!l.detail.path||S(o.querySelectorAll("["+r.CSS.escape(n.get("attr.moduleref"))+"]")).forEach(c=>{re(c.getAttribute(n.get("attr.moduleref")),l.detail.path)&&(a(c,!0,`'templatemutation' event: ${l.detail.path}, search()`),l.detail.addedExports.concat(l.detail.removedExports).forEach(g=>{a(c,g.name,`'templatemutation' event: ${l.detail.path}, ${g.name}`)}))})});let d=()=>{S(o.querySelectorAll(u)).forEach(l=>{if(!_(l.parentNode,"oohtml").get("importsCan")&&!l.importReference){var c=[];l.parentNode.childNodes.forEach(g=>{var O;if(g.nodeType===1&&g.matches(u))c.push(g);else if(g.nodeType===8&&(O=g.nodeValue.trim())&&O.startsWith("<"+n.get("element.import"))&&O.endsWith("</"+n.get("element.import")+">")){var A,C=o.createElement("div");if(C.innerHTML=O,(A=C.firstChild).matches(n.get("element.import"))){var E=A.hasAttribute(n.get("attr.moduleref"))?A.getAttribute(n.get("attr.moduleref")).trim().startsWith("~")?g.parentNode.closest(u):null:g.parentNode.closest(f),j=p.create(A);j.hydrate(g,c,E),c=[]}}}),_(l.parentNode,"oohtml").set("importsCan",!0)}})};e.DOM.ready.call(e,()=>{n.get("isomorphic")&&d()})}function Ae(t,e,r=[],o=!0){r=r.concat(ie),t.hasAttribute("noinherit")&&(r=r.concat((t.getAttribute("noinherit")||"*").split(" ").map(f=>f.trim())));var i=Se.concat(["role","class"]);if(K(i).forEach(f=>{var u,m;if(!r.includes(f)&&!r.includes("*")&&(u=e.getAttribute(f))){if(m=t.getAttribute(f))var p=o?[m,u]:[u,m];else var p=[u];t.setAttribute(f,K(p.join(" ").split(" ").map(a=>a.trim())).join(" ")),r.push(f)}}),K(Ce.concat("style")).forEach(f=>{var u,m;if(!r.includes(f)&&!r.includes("*")&&(u=e.getAttribute(f))){if(m=t.getAttribute(f)){var p=o?[m,u]:[u,m];p[0].trim().endsWith(";")||(p[0]=p[0]+";")}else var p=[u];t.setAttribute(f,p.join(" ")),r.push(f)}}),!r.includes("*"))for(var s=0;s<e.attributes.length;s++){var n=e.attributes[s];!r.includes(n.name)&&(!t.hasAttribute(n.name)||o)&&t.setAttribute(n.name,n.value)}return t}var ie=["nocompose"],Ce=[],Se=[];_t.call(window);})();
|
|
3
|
+
//# sourceMappingURL=html-imports.js.map
|