New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sproutjs-core

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sproutjs-core - npm Package Compare versions

Comparing version 1.4.0 to 2.0.0

2

package.json
{
"name": "sproutjs-core",
"version": "1.4.0",
"version": "2.0.0",
"keywords": [],

@@ -5,0 +5,0 @@ "author": "",

@@ -1,2 +0,2 @@

(()=>{"use strict";var t=["hidden","checked"],e=["hidden","value","checked"],n=["value","checked"],r=["text","color","date","datetime-local","email","month","number","password","range","search","tel","time","url","week"],o=["_global","_gettingDependenciesFor","_localStateManager","_stateManager","_binding","_populate"],i="getGlobalState",a=function(t){return"State set hook, must include a dependencies array! None was found for ".concat(t)},l=[{class:HTMLAnchorElement,element:"a"},{class:HTMLAreaElement,element:"area"},{class:HTMLAudioElement,element:"audio"},{class:HTMLBaseElement,element:"base"},{class:HTMLBodyElement,element:"body"},{class:HTMLBRElement,element:"br"},{class:HTMLButtonElement,element:"button"},{class:HTMLCanvasElement,element:"canvas"},{class:HTMLDataElement,element:"data"},{class:HTMLDataListElement,element:"datalist"},{class:HTMLDetailsElement,element:"details"},{class:HTMLDialogElement,element:"dialog"},{class:HTMLDivElement,element:"div"},{class:HTMLDListElement,element:"dl"},{class:HTMLEmbedElement,element:"embed"},{class:HTMLFieldSetElement,element:"fieldset"},{class:HTMLFormElement,element:"form"},{class:HTMLHeadingElement,element:"h1"},{class:HTMLHeadingElement,element:"h2"},{class:HTMLHeadingElement,element:"h3"},{class:HTMLHeadingElement,element:"h4"},{class:HTMLHeadingElement,element:"h5"},{class:HTMLHeadingElement,element:"h6"},{class:HTMLHRElement,element:"hr"},{class:HTMLHtmlElement,element:"html"},{class:HTMLIFrameElement,element:"iframe"},{class:HTMLImageElement,element:"img"},{class:HTMLInputElement,element:"input"},{class:HTMLLabelElement,element:"label"},{class:HTMLLegendElement,element:"legend"},{class:HTMLLIElement,element:"li"},{class:HTMLLinkElement,element:"link"},{class:HTMLMapElement,element:"map"},{class:HTMLMetaElement,element:"meta"},{class:HTMLMeterElement,element:"meter"},{class:HTMLObjectElement,element:"object"},{class:HTMLOListElement,element:"ol"},{class:HTMLOptGroupElement,element:"optgroup"},{class:HTMLOptionElement,element:"option"},{class:HTMLOutputElement,element:"output"},{class:HTMLParagraphElement,element:"p"},{class:HTMLParamElement,element:"param"},{class:HTMLPictureElement,element:"picture"},{class:HTMLPreElement,element:"pre"},{class:HTMLProgressElement,element:"progress"},{class:HTMLQuoteElement,element:"blockquote"},{class:HTMLQuoteElement,element:"q"},{class:HTMLScriptElement,element:"script"},{class:HTMLSelectElement,element:"select"},{class:HTMLSourceElement,element:"source"},{class:HTMLSpanElement,element:"span"},{class:HTMLStyleElement,element:"style"},{class:HTMLTableElement,element:"table"},{class:HTMLTableCellElement,element:"td"},{class:HTMLTableCellElement,element:"th"},{class:HTMLTableRowElement,element:"tr"},{class:HTMLTableSectionElement,element:"thead"},{class:HTMLTableSectionElement,element:"tbody"},{class:HTMLTableSectionElement,element:"tfoot"},{class:HTMLTextAreaElement,element:"textarea"},{class:HTMLTimeElement,element:"time"},{class:HTMLTitleElement,element:"title"},{class:HTMLTrackElement,element:"track"},{class:HTMLUListElement,element:"ul"},{class:HTMLVideoElement,element:"video"}],c=!1,u=document.createElement("div"),s={nodeActionsMap:new Map,eventBindingFunctions:new Map,conditionalRenders:new Map,paintRafId:null,eventBindRafId:null,conditionalRenderRafId:null};function f(t){return"OL"===t.tagName||"UL"===t.tagName}var p=s.paintRafId,h=s.eventBindingFunctions,d=s.eventBindRafId,y=s.conditionalRenderRafId,v=s.conditionalRenders;function m(t,e){d&&cancelAnimationFrame(d),h.set(t,e),d=requestAnimationFrame((function(){d=null,h.forEach((function(t){return t()})),h=new Map}))}function b(){p&&cancelAnimationFrame(p),p=requestAnimationFrame((function(){p=null,function(){var t=s.nodeActionsMap;if(t.size){var e=function(){var t=[],e=s.nodeActionsMap;return e.forEach((function(e,n){if(e.hasOwnProperty("setAttribute")){var r=e.setAttribute;"boolean"==typeof r?(n.hasOwnProperty("originalOwnerElement"),!1===r?n.originalOwnerElement.hasAttribute(n.name)&&t.push((function(){n.originalOwnerElement.removeAttributeNode(n)})):n.originalOwnerElement.hasAttribute(n.name)||t.push((function(){n.originalOwnerElement.setAttributeNode(n)}))):"string"==typeof r&&n.nodeValue!==r&&t.push((function(){return n.nodeValue=r}))}else if(e.hasOwnProperty("textContent")){var o=String(e.textContent);if(n.nodeValue===o)return;t.push((function(){return n.nodeValue=o}))}else e.replace.forEach((function(e,r){t.push((function(){return n.replaceChild(e,r)}))})),e.remove.values().forEach((function(e){e.forEach((function(e){e.parentNode&&e.parentNode===n&&t.push((function(){return n.removeChild(e)}))}))})),e.append.values().forEach((function(e){e.forEach((function(e){t.push((function(){return n.appendChild(e)}))}))}))})),t}();e.forEach((function(t){return t()})),s.nodeActionsMap=new Map}}()}))}function g(t,e,n){t.nodeType===Node.ATTRIBUTE_NODE?e.setAttribute=n:t.nodeType===Node.TEXT_NODE&&(e.textContent=n)}function w(t,e,n){t.append.has(n)||t.append.set(n,new Set),t.append.get(n).add(e)}function S(){return{append:new Map,replace:new Map,after:new Map,remove:new Map,get hasPendingActions(){return this.append.size||this.replace.size||this.after.size||this.remove.size}}}function E(t,e){var n=this,r=s.nodeActionsMap,o=t.state[e],i=t.stateNodes[e],a=t.stateArrayMaps[e],l=t.conditionallyRenderingElements[e];if(i&&i.forEach((function(t){r.has(t)||r.set(t,{}),g(t,r.get(t),o)})),a){var c=o;a.forEach((function(t){var e=t.customElementName,n=t.parentElement,o=S(),i=-1,a=f(n);n.children.length&&Array.prototype.forEach.call(n.children,(function(t,r){var l,u=t;a&&(u=t.firstElementChild);var s,p,h,d=c[r];if(null!==(l=d)&&void 0!==l&&l.hasOwnProperty("state")&&(d=d.state),d){if(u.state!==d){var y=H(d,e,f(n)?"li":void 0);!function(t,e,n){t.replace.set(e,n)}(o,t,y)}}else p=t,(s=o).remove.has(h)||s.remove.set(h,new Set),s.remove.get(h).add(p);i=r}));for(var l=++i,u=c.length;l<u;l++){var s=c[l];if(s){var p=H(s,e,f(n)?"li":void 0);w(o,p,s)}}o.hasPendingActions&&r.set(n,o)}))}l&&l.forEach((function(t){!function(t,e){y&&cancelAnimationFrame(y),v.set(t,e),y=requestAnimationFrame((function(){y=null,v.forEach((function(t){return t()})),v=new Map}))}(n,(function(){return t.renderSlot(e)}))}))}function O(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Object.defineProperty(t,e,{value:n,configurable:!1,writable:!1,enumerable:r})}function M(t){return M="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},M(t)}function P(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,l=[],c=!0,u=!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)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return T(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)?T(t,e):void 0}}(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 T(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}var A=s.nodeActionsMap;"undefined"==typeof HTMLElement||Object.defineProperty(globalThis,"elementSetAttribute",{value:HTMLElement.prototype.setAttribute,writable:!1,configurable:!1});var j=function(e,n){t.includes(e)?"false"===n?this.removeAttribute(e):elementSetAttribute.call(this,e,""):elementSetAttribute.call(this,e,n)},L=function(t,e){var n=null;if(-1!==e.indexOf(":")&&0===e.indexOf("is_")){var r=e.indexOf(":");if(-1===r)throw Error("When using conditional equality state attribute, you must include a colon character followed by an equality value!");n=e.substring(r+1),e=e.substring(3,r)}var o=P(this.getState(e,!0),2),i=o[0],a=o[1];if(void 0!==i&&a){if(n){var l="is_"+e+n,c=e;Object.defineProperty(a,l,{get:function(){return this[c]===n},enumerable:!1}),a._stateManager.addStateDependency(e,l),i=a[l],e=l}var u=i;this.removeAttribute(t);var s=document.createAttribute(t);s.nodeValue=u,O(s,"isStateAttribute",!0),O(s,"originalOwnerElement",this),"boolean"==typeof u&&(s.nodeValue=""),!1!==u&&this.setAttributeNode(s),a._stateManager.addStateNode(e,s,"boolean"==typeof u)}},_=function(t){var e=P(this.getState(t,!0),2),n=e[0],r=e[1];if(null!=n&&r){var o=n,i=document.createTextNode(o);O(i,"isStateAttribute",!0),this.appendChild(i),r._stateManager.addStateNode(t,i)}};function H(t,e,n){var r,o=document.createElement(e);return o.setInitialState(t),n?(r=document.createElement(n)).appendChild(o):r=o,r}function k(t,e){if(!o.includes(e)){E(t,e);var n=t.state;n.hasOwnProperty("on_".concat(e,"Change"))&&"function"==typeof n["on_".concat(e,"Change")]&&n["on_".concat(e,"Change")].call(n);var r=t.stateDependencies[e];if(r&&r.forEach((function(e){if(0===e.indexOf("set_")){var r=e.substring(4),o=n[e][0];if(o&&"function"==typeof o)return void(n[r]=o.call(n))}E(t,e),n.hasOwnProperty("on".concat(e,"Change"))&&"function"==typeof n["on".concat(e,"Change")]&&n["on".concat(e,"Change")].call(n)})),!n._global){var i=t.globalStateDependencies[e];null==i||i.forEach((function(t,e){var r=e.state;t.forEach((function(t){if(0===t.indexOf("set_")){var o=t.substring(4),i=n[t][0];if(i&&"function"==typeof i)return void(r[o]=i.call(r))}E(e,t),n.hasOwnProperty("on".concat(t,"Change"))&&"function"==typeof n["on".concat(t,"Change")]&&r["on".concat(t,"Change")].call(r)}))}))}A.size&&b()}}function N(t){return function(t){if(Array.isArray(t))return C(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||R(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 x(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,l=[],c=!0,u=!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)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||R(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 R(t,e){if(t){if("string"==typeof t)return C(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)?C(t,e):void 0}}function C(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 D(t,e,n){var r=x(n.getState(t,!0),2),o=r[0],i=r[1];if(!o||!Array.isArray(o))return null;var a=function(t,e,n){return t.map((function(t){return t.hasOwnProperty("state")&&(t=t.state),"object"!==M(t)?{}:H(t,e,n)}))}(o,e,f(n)?"li":void 0);return n.innerHTML="",a.length&&n.append.apply(n,N(a)),i}var $={map:function(t){var e=x(t.split(":"),2),n=e[0],r=e[1],o=D(n,r,this);o&&o._stateManager.addStateMap(n,r,this)},text:function(t){var e=t;this.initialSetText(e)},bind:function(t){var o=this,i=x(t.split(":"),2),a=i[0],l=i[1];a&&l&&(!a in e||(this.bindAttributeToState(a,l),n.includes(a)&&("value"===a&&"INPUT"===this.tagName&&r.includes(this.getAttribute("type"))?this.addEventListener("input",(function(){return o.updateStateFromProperty("value")})):"checked"===a&&"INPUT"===this.tagName&&"checkbox"===this.getAttribute("type")&&this.addEventListener("change",(function(){return o.updateStateFromProperty("checked")})))))},condition:function(t){var e;if("SLOT"!==this.tagName)throw Error("condition command can only be used on a slot element!");var n=t,r=x(this.getState(n,!0),2),o=r[0],i=r[1];if(void 0===o)throw Error("State property ".concat(n," not defined for _condition command!"));this.slotChildren=N(this.children),(e=this.host).append.apply(e,N(this.slotChildren)),this.innerHTML="",this.renderSlot(n),i._stateManager.addConditionallyRenderingElements(n,this)}};function I(t){return function(t){if(Array.isArray(t))return F(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 F(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)?F(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 F(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 B(t){return B="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},B(t)}function G(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,Y(r.key),r)}}function W(t,e){if(e&&("object"==B(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 q(){return q="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Q(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}},q.apply(null,arguments)}function U(t){var e="function"==typeof Map?new Map:void 0;return U=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(z())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&V(o,n.prototype),o}(t,arguments,Q(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),V(n,t)},U(t)}function z(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(z=function(){return!!t})()}function V(t,e){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},V(t,e)}function Q(t){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Q(t)}function Y(t){var e=function(t,e){if("object"!=B(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=B(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==B(e)?e:e+""}var X=function(t){function e(t,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),!Array.isArray(t))throw Error("Argument for StateFulArray constructor must be an array!");var l,c,u,s,f=t;return i||(l=f.map((function(t,e){return null!=t&&t.hasOwnProperty("state")||Array.isArray(t)?t:"object"===B(t)?new it(t,r,n._stateManager,!1,a):t}))),c=this,u=e,s=I(l),u=Q(u),function(t,e,n){(e=Y(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(o=W(c,z()?Reflect.construct(u,s||[],Q(c).constructor):u.apply(c,s)),"dependencyProps",new Map),o.parentStateObject=n,o.arrayStateProp=r,o.rawArray=f,W(o,l=new Proxy(o,Z(null==n?void 0:n._stateManager,r,a)))}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&&V(t,e)}(e,t),n=e,r=[{key:"splice",value:function(){var t;this.$$operation="splice";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=q(Q(e.prototype),"splice",this)).call.apply(t,[this].concat(r));return delete this.$$operation,i}},{key:"shift",value:function(){var t;this.$$operation="shift";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=q(Q(e.prototype),"shift",this)).call.apply(t,[this].concat(r));return delete this.$$operation,i}},{key:"unshift",value:function(){var t;this.$$operation="splice";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=q(Q(e.prototype),"unshift",this)).call.apply(t,[this].concat(r));return delete this.$$operation,i}},{key:"sort",value:function(){var t;this.$$operation="sort";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=q(Q(e.prototype),"sort",this)).call.apply(t,[this].concat(r));return delete this.$$operation,k(this.parentStateObject._stateManager,this.arrayStateProp),i}},{key:"reverse",value:function(){var t;this.$$operation="reverse";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=q(Q(e.prototype),"reverse",this)).call.apply(t,[this].concat(r));return delete this.$$operation,k(this.parentStateObject._stateManager,this.arrayStateProp),i}},{key:"fill",value:function(){var t;this.$$operation="fill";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=q(Q(e.prototype),"fill",this)).call.apply(t,[this].concat(r));return delete this.$$operation,k(this.parentStateObject._stateManager,this.arrayStateProp),i}},{key:"copyWithin",value:function(){var t;this.$$operation="copyWithin";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=q(Q(e.prototype),"sort",this)).call.apply(t,[this].concat(r));return delete this.$$operation,k(this.parentStateObject._stateManager,this.arrayStateProp),i}},{key:"slice",value:function(){var t;this.$$operation="slice";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=q(Q(e.prototype),"slice",this)).call.apply(t,[this].concat(r));return delete this.$$operation,i}},{key:"toArray",value:function(){this.$$operation="toArray";var t=this.rawArray;return delete this.$$operation,t}}],o=[{key:Symbol.species,get:function(){return Array}}],r&&G(n.prototype,r),o&&G(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(U(Array));const J=X;function K(t){return K="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},K(t)}var Z=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;return{set:function(r,o,i){if("length"===o){var a=Reflect.set(r,o,i);return k(t,e),a}if(r[o]===i)return!0;var l=Number(o);if(!isNaN(l)&&("object"!==K(i)||i.hasOwnProperty("_stateManager")||i.hasOwnProperty("state")||(i=new it(i,e,t,!1,n)),i.hasOwnProperty("_stateManager")&&(i=i._stateManager),!r.hasOwnProperty("$$operation"))){var c=!1;l<r.length&&(c=!0);var u=Reflect.set(r,o,i);return c&&k(t,e),u}return Reflect.set(r,o,i)},get:function(t,e,n){if("symbol"===K(e))return Reflect.get.apply(Reflect,arguments);if("hasOwnProperty"===e)return Reflect.get.apply(Reflect,arguments);var r=Number(e);if(!isNaN(r)){if(!t[r])return;return t[r].hasOwnProperty("state")?t[r].state:t[r]}return Reflect.get.apply(Reflect,arguments)}}};function tt(t){return tt="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},tt(t)}function et(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,rt(r.key),r)}}function nt(t,e,n){return(e=rt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rt(t){var e=function(t,e){if("object"!=tt(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=tt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tt(e)?e:e+""}var ot=function(){return t=function t(e,n,r){var l=this,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3],u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),nt(this,"privateState",{}),nt(this,"state",{}),nt(this,"stateArrayMaps",{}),nt(this,"stateDependencies",{}),nt(this,"conditionallyRenderingElements",{}),nt(this,"stateNodes",{}),nt(this,"parentStateProp",void 0),nt(this,"parentStateManager",void 0),this.parentStateProp=n,this.parentStateManager=r,O(this.state,"_stateManager",this,!0),this.state=new Proxy(this.state,function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return{defineProperty:function(n,r,i){var l;if(o.includes(r)||null!==(l=n)&&void 0!==l&&l._binding)return Reflect.defineProperty.apply(Reflect,arguments);var c,u=n,s=new Set;if(n=new Proxy(n,{get:function(t,e,n){return"_global"===e&&(t._global._gettingDependenciesFor=r,t._global._localStateManager=t._stateManager),o.includes(e)||(Array.isArray(t[e])&&(t[e]._gettingDependenciesFor=r),s.add(e)),Reflect.get.apply(Reflect,arguments)}}),void 0!==(null==i?void 0:i.value)){var f,p=i.value;if(Array.isArray(p))if(0===r.indexOf("set_")){if(!(null==p?void 0:p[1]))throw Error(a(r));if(null==p||p[1].forEach((function(t){s.add(t)})),!0===(null==p?void 0:p[2])){c=r.substring(4);var h=null==p?void 0:p[0];h&&"function"==typeof h&&(t[c]=h.call(t))}else null!=p&&p[3]&&(t[c]=p[3])}else null!=p&&null!==(f=p[0])&&void 0!==f&&f._stateManager||(i.value=new J(i.value,t,r,!1,e))}else"function"==typeof(null==i?void 0:i.get)&&i.get.call(n);s.size&&s.forEach((function(e){return t._stateManager.addStateDependency(e,r)}));var d=Reflect.defineProperty(u,r,i),y=t._stateManager;return c&&(r=c),u.hasOwnProperty("_populate")||k(y,r),d},get:function(t,e,n){if("hasOwnProperty"===e)return Reflect.get.apply(Reflect,arguments);if(!t.hasOwnProperty("_global")&&t.hasOwnProperty("_gettingDependenciesFor"))return t._stateManager.addGlobalStateDependency(e,t._gettingDependenciesFor,t._localStateManager),delete t._gettingDependenciesFor,delete t._localStateManager,Reflect.get.apply(Reflect,arguments);if("function"==typeof(null==e?void 0:e.indexOf)&&0===(null==e?void 0:e.indexOf("!"))){var r=e.substring(1);if(t.hasOwnProperty(r))return!t[r]}return Reflect.get.apply(Reflect,arguments)}}}(this.state,u)),c?(this.globalStateDependencies={},this.addGlobalStateDependency=function(t,e,n){l.globalStateDependencies.hasOwnProperty(t)||(l.globalStateDependencies[t]=new Map),l.globalStateDependencies[t].has(n)||l.globalStateDependencies[t].set(n,new Set),l.globalStateDependencies[t].get(n).add(e)}):O(this.state,"_global",u[i](),!0),e&&function(t,e){t._populate=!0;var n,r=Object.getOwnPropertyDescriptors(e);for(var i in r)if(o.includes(i))delete r[i];else if((n=r[i]).hasOwnProperty("get")&&"function"==typeof n.get&&n.get.bind(t),n.hasOwnProperty("value")){var a=n.value;if("function"==typeof a)n.value.bind(t);else if(Array.isArray(a)&&0===i.indexOf("set_")){var l=null==a?void 0:a[0];l&&"function"==typeof l&&l.bind(t)}}Object.defineProperties(t,r),delete t._populate}(this.state,e)},e=[{key:"addStateDependency",value:function(t,e){this.stateDependencies.hasOwnProperty(t)||(this.stateDependencies[t]=new Set),this.stateDependencies[t].add(e)}},{key:"addStateMap",value:function(t,e,n){this.stateArrayMaps.hasOwnProperty(t)||(this.stateArrayMaps[t]=[]),this.stateArrayMaps[t].push({customElementName:e,parentElement:n})}},{key:"addConditionallyRenderingElements",value:function(t,e){var n;this.conditionallyRenderingElements.hasOwnProperty(t)||(this.conditionallyRenderingElements[t]=new Set),e.originalParentElement=e.parentElement||(null===(n=e.host)||void 0===n?void 0:n.shadowRoot),this.conditionallyRenderingElements[t].add(e)}},{key:"addStateNode",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.stateNodes.hasOwnProperty(t)||(this.stateNodes[t]=new Set,this.setAndBindStateProperty(t,n)),this.stateNodes[t].add(e)}},{key:"setAndBindStateProperty",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.state;if(0!==t.indexOf("!")){var r=Object.getOwnPropertyDescriptor(n,t);if(!(r||(n=n._global,r=Object.getOwnPropertyDescriptor(n,t))))throw Error("Could not bind state prop ".concat(t,". State prop not defined!"));var o=r.hasOwnProperty("value"),i=n._stateManager;if(o&&(i.privateState.hasOwnProperty(t)||(i.privateState[t]=n[t]),n._binding=!0,Object.defineProperty(n,t,{set:function(e){e!==i.privateState[t]&&(i.privateState[t]=e,k(i,t),i.parentStateManager&&k(i.parentStateManager,i.parentStateProp))},get:function(){return i.privateState[t]}})),e&&0!==t.indexOf("!")){var a="!".concat(t);o?i.privateState.hasOwnProperty(a)||(Object.defineProperty(n,a,{get:function(){return!i.privateState[t]},set:function(){throw Error("Cannot directly set a negation State property!")},enumerable:!0}),i.addStateDependency(t,a)):i.state.hasOwnProperty(a)||(Object.defineProperty(n,a,{get:function(){return!i.state[t]},set:function(){throw Error("Cannot directly set a negation State property!")},enumerable:!0}),i.addStateDependency(t,a))}delete this.state._binding}else{var l=t.substring(1),c=Object.getOwnPropertyDescriptor(n,l);if(!(c||(n=n._global,c=Object.getOwnPropertyDescriptor(n,l))))throw Error("Could not bind state prop ".concat(t,". State prop ").concat(l," not defined!"))}}}],e&&et(t.prototype,e),n&&et(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();const it=ot;function at(t){return at="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},at(t)}function lt(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,l=[],c=!0,u=!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)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||ct(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 ct(t,e){if(t){if("string"==typeof t)return ut(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)?ut(t,e):void 0}}function ut(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 st(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,bt(r.key),r)}}function ft(t,e,n){return e=ht(e),function(t,e){if(e&&("object"==at(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,pt()?Reflect.construct(e,n||[],ht(t).constructor):e.apply(t,n))}function pt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(pt=function(){return!!t})()}function ht(t){return ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ht(t)}function dt(t,e){return dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},dt(t,e)}function yt(t,e,n){vt(t,e),e.set(t,n)}function vt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function mt(t,e,n){return(e=bt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function bt(t){var e=function(t,e){if("object"!=at(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=at(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==at(e)?e:e+""}function gt(t,e){return t.get(St(t,e))}function wt(t,e,n){return t.set(St(t,e),n),n}function St(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 Et(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=new WeakMap,l=new WeakMap,c=new WeakMap,s=new WeakMap,f=new WeakMap,p=new WeakMap,h=new WeakMap,d=new WeakMap,y=new WeakMap,v=new WeakMap,b=new WeakSet,g=function(t){function e(){var t,n,r,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1?arguments[1]:void 0,m=arguments.length>2?arguments[2]:void 0,g=arguments.length>3?arguments[3]:void 0;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=ft(this,e),vt(n=t,r=b),r.add(n),mt(t,"host",null),yt(t,a,void 0),yt(t,l,!1),yt(t,c,{}),yt(t,s,void 0),yt(t,f,void 0),yt(t,p,void 0),yt(t,h,void 0),yt(t,d,[]),yt(t,y,void 0),yt(t,v,void 0),t.isReactiveElement=!0,t.isNativeElement=t.hasAttribute("is"),!t.isNativeElement){if(i){var S=new Function(i.textContent)();St(b,t,w).call(t,S)}if(wt(s,t,o?o.cloneNode(!0):u.cloneNode()),m){var E=new CSSStyleSheet;E.replaceSync(m),wt(f,t,E)}g&&wt(p,t,g),t.ref={}}return 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&&dt(t,e)}(e,t),n=e,g=[{key:"setInitialState",value:function(t){this.initialState?Object.assign(this.initialState,t):this.initialState=t}},{key:"bindAttributeToState",value:function(t,e){gt(c,this)[t]=e}},{key:"unbindAttributeToState",value:function(t){delete gt(c,this)[t]}},{key:"updateStateFromProperty",value:function(t){var e=this[t],n=gt(c,this)[t],r=lt(this.getState(n,!0),2),o=r[0],i=r[1];o!==e&&(i[n]=e)}},{key:"disconnectedCallback",value:function(){var t,e=null!==(t=this.host)&&void 0!==t?t:this;if(e.ref){var n=this.getAttribute("ref");n&&delete e.ref[n]}wt(c,this,{}),St(b,this,O).call(this)}},{key:"connectedCallback",value:function(){var t=this;if(!gt(l,this)){this.isNativeElement||St(b,this,S).call(this),this.host=this.getRootNode().host,"INPUT"===(null==this?void 0:this.tagName)&&(wt(v,this,(function(){var t=new Event("inputChange",{bubbles:!0,composed:!0});this.dispatchEvent(t)})),this.addEventListener("change",gt(v,this),!1)),this.isNativeElement||o||St(b,this,E).call(this);var e,n=[],c=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=ct(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(this.getAttributeNames());try{for(c.s();!(e=c.n()).done;){var u=e.value,s=this.getAttribute(u);if(this.initialSetAttribute(u,s),0===u.indexOf("_")){var f=u.substring(1);n.push({command:f,args:s})}}}catch(t){c.e(t)}finally{c.f()}n.forEach((function(e){var n,r=e.command,o=e.args;null===(n=$[r])||void 0===n||n.call(t,o)})),this.isNativeElement||(m(this,(function(){return St(b,t,M).call(t)})),gt(a,this)&&queueMicrotask((function(){return gt(a,t).call(t,r[i]())}))),wt(l,this,!0)}}},{key:"attributeChangedCallback",value:function(t,e,n){if(e!==n&&this.isConnected){if("ref"===t){var r=n;(this.isNativeElement?this.host:this).ref[r]=this}t in gt(c,this)&&St(b,this,P).call(this,t)}}},{key:"getState",value:function(t){var e,n,o,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=this.isNativeElement&&this.host?this.host:this;l&&l.state&&(n=null===(o=l.state)||void 0===o?void 0:o[t]);for(var c,u=!1;void 0===n&&void 0!==l.host&&null!==l.host;){var s;n=null===(s=(l=l.host).state)||void 0===s?void 0:s[t]}return void 0!==n?e=l.state:void 0!==(n=null===(c=u=r[i]())||void 0===c?void 0:c[t])&&(e=u),a?[n,e]:n}},{key:"findElement",value:function(t){var e=this.isNativeElement?this.host:this,n=e;return r.SPROUT_CONFIG.useShadow&&(n=e.shadowRoot),e.ref.hasOwnProperty(t)?e.ref[t]:n.querySelector('[ref="'.concat(t,'"]'))}}],g&&st(n.prototype,g),T&&st(n,T),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,g,T}(n);function w(t){var e=this;t.events&&(wt(h,this,t.events),this.isConnected&&m(this,(function(){return St(b,e,M).call(e)}))),t.state&&(this.setInitialState(t.state),this.isConnected&&St(b,this,S).call(this)),t.onMount&&wt(a,this,t.onMount)}function S(){if(this.initialState){var t=this.initialState;t._stateManager?this.state=t._stateManager.state:this.state=new it(t,void 0,void 0,!1,r).state,delete this.initialState}}function E(){if(r.SPROUT_CONFIG.useShadow){var t=this.attachShadow({mode:"open",slotAssignment:"manual"});this.shadowRoot.adoptedStyleSheets=[],gt(p,this)&&this.shadowRoot.adoptedStyleSheets.push(gt(p,this)),gt(f,this)&&this.shadowRoot.adoptedStyleSheets.push(gt(f,this)),t.appendChild(gt(s,this))}else{var e=new DocumentFragment;e.appendChild(gt(s,this)),this.appendChild(e)}}function O(){var t=this;if(gt(v,this)&&this.removeEventListener("change",gt(v,this)),gt(d,this).length){var e=this;gt(d,this).forEach((function(n){e.removeEventListener(n,gt(y,t),!1)}))}}function M(){var t,e=this;if(gt(h,this)){var n=Object.keys(gt(h,this)),o={},a={};n.forEach((function(t){var n=gt(h,e)[t];if("function"==typeof n)o[t]=n;else if("object"===at(n)){Object.keys(n).forEach((function(e){"click"===e?o[t]=n[e]:(a[e]||(a[e]={}),a[e][t]=n[e])}))}}));var l=r[i]();wt(y,this,(function(t,e){var n,r=t.composedPath();if(n=r?r.find((function(t){return t.hasAttribute&&t.hasAttribute("ref")&&t.getAttribute("ref")in e})):t.target.hasAttribute&&t.target.hasAttribute("ref")&&t.target.getAttribute("ref")in e?t.target:null){var o,i=n.getAttribute("ref");null===(o=e[i])||void 0===o||o.call(n,t,t.target,l)}}));var c=this;Object.keys(o).length&&(c.addEventListener("click",(function(t){gt(y,e).call(e,t,o)}),!1),gt(d,this).push("click"));for(var u=Object.keys(a),s=function(){var t=p[f];c.addEventListener(t,(function(n){gt(y,e).call(e,n,a[t])}),!1)},f=0,p=u;f<p.length;f++)s();(t=gt(d,this)).push.apply(t,u)}}function P(e){var n=this.getAttribute(e);t.includes(e)&&(n=null!==n);var r=gt(c,this)[e],o=lt(this.getState(r,!0),2),i=o[0],a=o[1];i!==n&&(a[r]=n)}return mt(g,"observedAttributes",["ref"].concat(e).concat(Object.keys($).map((function(t){return"_"+t.toLowerCase()})))),g.prototype.initialSetText=function(t){_.call(this,t)},g.prototype.initialSetAttribute=function(t,e){var n=e=String(e);if(0===e.indexOf("$")&&0!==t.indexOf("_")&&this.isConnected){var r=e.substring(1);L.call(this,t,r)}else j.call(this,t,n)},g}function Ot(t){return Ot="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},Ot(t)}function Mt(){Mt=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),l=new _(r||[]);return o(a,"_invoke",{value:T(t,n,l)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(H([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=m.prototype=Object.create(w);function M(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,i,a,l){var c=f(t[o],t,i);if("throw"!==c.type){var u=c.arg,s=u.value;return s&&"object"==Ot(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,l)}),(function(t){n("throw",t,a,l)})):e.resolve(s).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,l)}))}l(c.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function T(e,n,r){var o=p;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var l=r.delegate;if(l){var c=A(l,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function A(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,A(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function H(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Ot(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,c,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},M(P.prototype),u(P.prototype,l,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},M(O),u(O,c,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=H,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return l.type="throw",l.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:H(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function Pt(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,Tt(r.key),r)}}function Tt(t){var e=function(t,e){if("object"!=Ot(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Ot(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ot(e)?e:e+""}function At(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jt(t,e,n){return e=_t(e),function(t,e){if(e&&("object"==Ot(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,Lt()?Reflect.construct(e,n||[],_t(t).constructor):e.apply(t,n))}function Lt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Lt=function(){return!!t})()}function _t(t){return _t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_t(t)}function Ht(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&&kt(t,e)}function kt(t,e){return kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},kt(t,e)}function Nt(t,e,n,r,o,i,a){try{var l=t[i](a),c=l.value}catch(t){return void n(t)}l.done?e(c):Promise.resolve(c).then(r,o)}function xt(t,e){function n(){var e;return e=Mt().mark((function e(n,r,o){var i,a,l;return Mt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=document.importNode(n.content,!0),(a=i.querySelector("style"))&&i.removeChild(a),(l=i.querySelector("script"))&&i.removeChild(l),customElements.define(r,function(t){function e(){return At(this,e),jt(this,e,[i,l,null==a?void 0:a.textContent,o])}return Ht(e,t),n=e,r&&Pt(n.prototype,r),c&&Pt(n,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,c}(t.ReactiveElement));case 6:case"end":return e.stop()}}),e)})),n=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(t){Nt(i,r,o,a,l,"next",t)}function l(t){Nt(i,r,o,a,l,"throw",t)}a(void 0)}))},n.apply(this,arguments)}var r,o;(o=document.querySelector('head > style[app="'.concat(e,'"]')))&&(r=new CSSStyleSheet).replaceSync(o.textContent),Array.prototype.forEach.call(document.querySelectorAll('template[app="'.concat(e,'"]')),(function(t){!function(t,e,r){n.apply(this,arguments)}(t,t.getAttribute("for"),r)})),"function"==typeof globalThis["".concat(e,"_runtime")]&&globalThis["".concat(e,"_runtime")].call(t)}function Rt(t){return Rt="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},Rt(t)}function Ct(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,Dt(r.key),r)}}function Dt(t){var e=function(t,e){if("object"!=Rt(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Rt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Rt(e)?e:e+""}function $t(t,e,n){return e=Ft(e),function(t,e){if(e&&("object"==Rt(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,It()?Reflect.construct(e,n||[],Ft(t).constructor):e.apply(t,n))}function It(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(It=function(){return!!t})()}function Ft(t){return Ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ft(t)}function Bt(t,e){return Bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bt(t,e)}function Gt(t){var e=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),$t(this,e,arguments)}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&&Bt(t,e)}(e,t),n=e,(r=[{key:"renderSlot",value:function(t){if("SLOT"===this.tagName){var e=this.getState(t);if(void 0===e)throw Error("State property ".concat(t," not defined for conditional slot rendering!"));var n=null==this?void 0:this.slotChildren;if(n){var r=[];n.forEach((function(t){var n,o=t.getAttribute("_if");o&&(n="true"===o?Boolean("true"===o):"false"===o?Boolean("false"===o):isNaN(Number(o))?o:Number(o),e===n&&r.push(t))})),r.length&&this.assign.apply(this,r)}}}}])&&Ct(n.prototype,r),o&&Ct(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(t);return e}var Wt=document.currentScript.hasAttribute("allowappscopeaccess");globalThis.SproutInitApp=function(t){var e,n=(window,{window,document:null===(e=window)||void 0===e?void 0:e.document}),r={useShadow:!0,allowAppScopeAccess:Wt};r.allowAppScopeAccess&&(Object.defineProperty(globalThis,"sproutApps",{value:{},writable:!1}),Object.defineProperty(globalThis.sproutApps,t,{value:n,writable:!1})),n.SPROUT_CONFIG=Object.seal(r);var o=Object.prototype.hasOwnProperty;O(Object.prototype,"hasOwnProperty",o),n[i]=function(){return{}},n.setGlobalState=function(){var t=new it(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},void 0,void 0,!0,n).state,e="SproutGlobalState";Object.defineProperty(n,e,{value:t,writable:!1,configurable:!1}),Object.defineProperty(n,i,{value:function(){return n[e]}})},n.ReactiveElement=Et(HTMLElement,n),l.forEach((function(t){return customElements.define("reactive-".concat(t.element),Et(t.class,n,!0),{extends:t.element})}));var a=Gt(Et(HTMLSlotElement,n,!0));return customElements.define("reactive-slot",a,{extends:"slot"}),function(){xt(n,t)}.bind(n)}})();
(()=>{"use strict";function t(e){return t="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},t(e)}function e(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,n(o.key),o)}}function n(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}function r(e,n,r){return n=l(n),function(e,n){if(n&&("object"==t(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}(e)}(e,i()?Reflect.construct(n,r||[],l(e).constructor):n.apply(e,r))}function o(t){var e="function"==typeof Map?new Map:void 0;return o=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(i())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&a(o,n.prototype),o}(t,arguments,l(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),a(n,t)},o(t)}function i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(i=function(){return!!t})()}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}var c=["hidden","checked"],u=["hidden","value","checked"],s=["value","checked"],f=[null,"text","color","date","datetime-local","email","month","number","password","range","search","tel","time","url","week"],p=["_global","_gettingDependenciesFor","_localStateManager","_stateManager","_binding","_populate"],h="getGlobalState",d=function(t){return"State set hook, must include a dependencies array! None was found for ".concat(t)},y=[{class:HTMLAnchorElement,element:"a"},{class:HTMLAreaElement,element:"area"},{class:HTMLAudioElement,element:"audio"},{class:HTMLBaseElement,element:"base"},{class:HTMLBodyElement,element:"body"},{class:HTMLBRElement,element:"br"},{class:HTMLButtonElement,element:"button"},{class:HTMLCanvasElement,element:"canvas"},{class:HTMLDataElement,element:"data"},{class:HTMLDataListElement,element:"datalist"},{class:HTMLDetailsElement,element:"details"},{class:HTMLDialogElement,element:"dialog"},{class:HTMLDivElement,element:"div"},{class:HTMLDListElement,element:"dl"},{class:HTMLEmbedElement,element:"embed"},{class:HTMLFieldSetElement,element:"fieldset"},{class:HTMLFormElement,element:"form"},{class:HTMLHeadingElement,element:"h1"},{class:HTMLHeadingElement,element:"h2"},{class:HTMLHeadingElement,element:"h3"},{class:HTMLHeadingElement,element:"h4"},{class:HTMLHeadingElement,element:"h5"},{class:HTMLHeadingElement,element:"h6"},{class:HTMLHRElement,element:"hr"},{class:HTMLHtmlElement,element:"html"},{class:HTMLIFrameElement,element:"iframe"},{class:HTMLImageElement,element:"img"},{class:HTMLInputElement,element:"input"},{class:HTMLLabelElement,element:"label"},{class:HTMLLegendElement,element:"legend"},{class:HTMLLIElement,element:"li"},{class:HTMLLinkElement,element:"link"},{class:HTMLMapElement,element:"map"},{class:HTMLMetaElement,element:"meta"},{class:HTMLMeterElement,element:"meter"},{class:HTMLObjectElement,element:"object"},{class:HTMLOListElement,element:"ol"},{class:HTMLOptGroupElement,element:"optgroup"},{class:HTMLOptionElement,element:"option"},{class:HTMLOutputElement,element:"output"},{class:HTMLParagraphElement,element:"p"},{class:HTMLParamElement,element:"param"},{class:HTMLPictureElement,element:"picture"},{class:HTMLPreElement,element:"pre"},{class:HTMLProgressElement,element:"progress"},{class:HTMLQuoteElement,element:"blockquote"},{class:HTMLQuoteElement,element:"q"},{class:HTMLScriptElement,element:"script"},{class:HTMLSelectElement,element:"select"},{class:HTMLSourceElement,element:"source"},{class:HTMLSpanElement,element:"span"},{class:HTMLStyleElement,element:"style"},{class:HTMLTableElement,element:"table"},{class:HTMLTableCellElement,element:"td"},{class:HTMLTableCellElement,element:"th"},{class:HTMLTableRowElement,element:"tr"},{class:HTMLTableSectionElement,element:"thead"},{class:HTMLTableSectionElement,element:"tbody"},{class:HTMLTableSectionElement,element:"tfoot"},{class:HTMLTextAreaElement,element:"textarea"},{class:HTMLTimeElement,element:"time"},{class:HTMLTitleElement,element:"title"},{class:HTMLTrackElement,element:"track"},{class:HTMLUListElement,element:"ul"},{class:HTMLVideoElement,element:"video"},{class:HTMLSlotElement,element:"slot"},{class:function(t){function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),r(this,n,arguments)}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&&a(t,e)}(n,t),o=n,i&&e(o.prototype,i),l&&e(o,l),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,i,l}(o(HTMLElement)),element:"code"}],v=!1,m=document.createElement("div"),b={nodeActionsMap:new Map,eventBindingFunctions:new Map,conditionalRenders:new Map,paintRafId:null,eventBindRafId:null,conditionalRenderRafId:null},g=["=","==","!=","!==","<","<=",">",">="],w=100;function S(t){return"OL"===t.tagName||"UL"===t.tagName}var E=b.paintRafId,O=b.eventBindingFunctions,M=b.eventBindRafId,T=b.conditionalRenderRafId,A=b.conditionalRenders,P=b.nodeActionsMap;function j(t,e){O.set(t,e),O.size+1>=w||(M&&cancelAnimationFrame(M),M=requestAnimationFrame((function(){M=null,O.forEach((function(t){return t()})),O=new Map})))}function _(){P.size+1>=w||(E&&cancelAnimationFrame(E),E=requestAnimationFrame((function(){E=null,function(){var t=b.nodeActionsMap;if(t.size){var e=function(){var t=[],e=b.nodeActionsMap;return e.forEach((function(e,n){if(e.hasOwnProperty("setAttribute")){var r=e.setAttribute;"boolean"==typeof r?(n.hasOwnProperty("originalOwnerElement"),!1===r?n.originalOwnerElement.hasAttribute(n.name)&&t.push((function(){n.originalOwnerElement.removeAttributeNode(n)})):n.originalOwnerElement.hasAttribute(n.name)||t.push((function(){n.originalOwnerElement.setAttributeNode(n)}))):"string"==typeof r&&n.nodeValue!==r&&t.push((function(){return n.nodeValue=r}))}else if(e.hasOwnProperty("textContent")){var o=String(e.textContent);if(n.nodeValue===o)return;t.push((function(){return n.nodeValue=o}))}else e.replace.forEach((function(e,r){t.push((function(){return n.replaceChild(e,r)}))})),e.remove.values().forEach((function(e){e.forEach((function(e){e.parentNode&&e.parentNode===n&&t.push((function(){return n.removeChild(e)}))}))})),e.append.values().forEach((function(e){e.forEach((function(e){t.push((function(){return n.appendChild(e)}))}))}))})),t}();e.forEach((function(t){return t()})),b.nodeActionsMap=new Map}}()})))}function L(t,e){A.set(t,e),A.size>=w||(T&&cancelAnimationFrame(T),T=requestAnimationFrame((function(){T=null,A.forEach((function(t){return t()})),A=new Map})))}function k(t,e,n){t.nodeType===Node.ATTRIBUTE_NODE?e.setAttribute=n:t.nodeType===Node.TEXT_NODE&&(e.textContent=n)}function H(t,e,n){t.append.has(n)||t.append.set(n,new Set),t.append.get(n).add(e)}function x(){return{append:new Map,replace:new Map,after:new Map,remove:new Map,get hasPendingActions(){return this.append.size||this.replace.size||this.after.size||this.remove.size}}}function R(t,e){var n=this,r=b.nodeActionsMap,o=t.state[e],i=t.stateNodes[e],a=t.stateArrayMaps[e],l=t.conditionallyRenderingElements[e];if(i&&i.forEach((function(t){r.has(t)||r.set(t,{}),k(t,r.get(t),o)})),a){var c=o;a.forEach((function(t){var e=t.customElementName,n=t.parentElement,o=x(),i=-1,a=S(n);n.children.length&&Array.prototype.forEach.call(n.children,(function(t,r){var l,u=t;a&&(u=t.firstElementChild);var s,f,p,h=c[r];if(null!==(l=h)&&void 0!==l&&l.hasOwnProperty("state")&&(h=h.state),h){if(u.state!==h){var d=W(h,e,S(n)?"li":void 0);!function(t,e,n){t.replace.set(e,n)}(o,t,d)}}else f=t,(s=o).remove.has(p)||s.remove.set(p,new Set),s.remove.get(p).add(f);i=r}));for(var l=++i,u=c.length;l<u;l++){var s=c[l];if(s){var f=W(s,e,S(n)?"li":void 0);H(o,f,s)}}o.hasPendingActions&&r.set(n,o)}))}l&&l.forEach((function(t){L(n,(function(){return t.render()}))}))}function C(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Object.defineProperty(t,e,{value:n,configurable:!1,writable:!1,enumerable:r})}function N(t){return N="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},N(t)}function I(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,l=[],c=!0,u=!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)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return D(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)?D(t,e):void 0}}(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 D(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}var $=b.nodeActionsMap;"undefined"==typeof HTMLElement||Object.defineProperty(globalThis,"elementSetAttribute",{value:HTMLElement.prototype.setAttribute,writable:!1,configurable:!1});var F=function(t,e){c.includes(t)?"false"===e?this.removeAttribute(t):elementSetAttribute.call(this,t,""):elementSetAttribute.call(this,t,e)},B=function(t,e){var n=null;if(-1!==e.indexOf(":")&&0===e.indexOf("is_")){var r=e.indexOf(":");if(-1===r)throw Error("When using conditional equality state attribute, you must include a colon character followed by an equality value!");n=e.substring(r+1),e=e.substring(3,r)}var o=I(this.getState(e,!0),2),i=o[0],a=o[1];if(void 0!==i&&a){if(n){var l="is_"+e+n,c=e;Object.defineProperty(a,l,{get:function(){return this[c]===n},enumerable:!1}),a._stateManager.addStateDependency(e,l),i=a[l],e=l}var u=i;this.removeAttribute(t);var s=document.createAttribute(t);s.nodeValue=u,C(s,"isStateAttribute",!0),C(s,"originalOwnerElement",this),"boolean"==typeof u&&(s.nodeValue=""),!1!==u&&this.setAttributeNode(s),a._stateManager.addStateNode(e,s,"boolean"==typeof u)}},G=function(t){var e=I(this.getState(t,!0),2),n=e[0],r=e[1];if(null!=n&&r){var o=n,i=document.createTextNode(o);C(i,"isStateAttribute",!0),this.appendChild(i),r._stateManager.addStateNode(t,i)}};function W(t,e,n){var r,o=document.createElement(e);return o.setInitialState(t),n?(r=document.createElement(n)).appendChild(o):r=o,r}function q(t,e){if(!p.includes(e)){R(t,e);var n=t.state;n.hasOwnProperty("on_".concat(e,"Change"))&&"function"==typeof n["on_".concat(e,"Change")]&&n["on_".concat(e,"Change")].call(n);var r=t.stateDependencies[e];if(r&&r.forEach((function(e){if(0===e.indexOf("set_")){var r=e.substring(4),o=n[e][0];if(o&&"function"==typeof o)return void(n[r]=o.call(n))}R(t,e),n.hasOwnProperty("on".concat(e,"Change"))&&"function"==typeof n["on".concat(e,"Change")]&&n["on".concat(e,"Change")].call(n)})),!n._global){var o=t.globalStateDependencies[e];null==o||o.forEach((function(t,e){var r=e.state;t.forEach((function(t){if(0===t.indexOf("set_")){var o=t.substring(4),i=n[t][0];if(i&&"function"==typeof i)return void(r[o]=i.call(r))}R(e,t),n.hasOwnProperty("on".concat(t,"Change"))&&"function"==typeof n["on".concat(t,"Change")]&&r["on".concat(t,"Change")].call(r)}))}))}$.size&&_()}}function U(t){var e=t;return"true"===t||"false"===t?e=Boolean("true"===t):isNaN(Number(t))||(e=Number(t)),e}function z(t){return function(t){if(Array.isArray(t))return Y(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Q(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){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,l=[],c=!0,u=!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)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||Q(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 Q(t,e){if(t){if("string"==typeof t)return Y(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)?Y(t,e):void 0}}function Y(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 X(t,e,n){var r=V(n.getState(t,!0),2),o=r[0],i=r[1];if(!o||!Array.isArray(o))return null;var a=function(t,e,n){return t.map((function(t){return t.hasOwnProperty("state")&&(t=t.state),"object"!==N(t)?{}:W(t,e,n)}))}(o,e,S(n)?"li":void 0);return n.innerHTML="",a.length&&n.append.apply(n,z(a)),i}var J={map:function(t){var e=V(t.split(":"),2),n=e[0],r=e[1],o=X(n,r,this);o&&o._stateManager.addStateMap(n,r,this)},text:function(t){var e=t;this.initialSetText(e)},bind:function(t){var e=this,n=V(t.split(":"),2),r=n[0],o=n[1];r&&o&&(!r in u||(this.bindAttributeToState(r,o),s.includes(r)&&("value"===r&&"INPUT"===this.tagName&&f.includes(this.getAttribute("type"))?this.addEventListener("input",(function(){return e.updateStateFromProperty("value")})):"checked"===r&&"INPUT"===this.tagName&&"checkbox"===this.getAttribute("type")&&this.addEventListener("change",(function(){return e.updateStateFromProperty("checked")})))))},condition:function(t){var e=this;if("SLOT"!==this.tagName)throw Error("_condition command can only be used on a slot element!");if(!this.children||!this.children.length)throw Error("Conditional rendering slot (a reactive-slot with a _condition command) must have children! For slot: ",this);var n=t,r=V(this.getState(n,!0),2),o=r[0],i=r[1];if(void 0===o)throw Error("State property ".concat(n," not defined for _condition command!"));var a=this.host,l=z(this.children),c=[];l.forEach((function(t){var e=t.getAttribute("_if");if(e){t.host=a,t.conditionalSlotChild=!0,t.querySelectorAll("*").forEach((function(t){t.host=a}));var n=U(e);o===n&&c.push(t)}})),requestAnimationFrame((function(){a.append.apply(a,z(l)),c.length&&e.assign.apply(e,c)})),i._stateManager.addConditionallyRenderingElements(n,this)}};function K(t){return function(t){if(Array.isArray(t))return Z(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 Z(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)?Z(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 Z(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 tt(t){return tt="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},tt(t)}function et(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,ct(r.key),r)}}function nt(t,e){if(e&&("object"==tt(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 rt(){return rt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=lt(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}},rt.apply(null,arguments)}function ot(t){var e="function"==typeof Map?new Map:void 0;return ot=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(it())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&at(o,n.prototype),o}(t,arguments,lt(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),at(n,t)},ot(t)}function it(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(it=function(){return!!t})()}function at(t,e){return at=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},at(t,e)}function lt(t){return lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lt(t)}function ct(t){var e=function(t,e){if("object"!=tt(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=tt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tt(e)?e:e+""}var ut=function(t){function e(t,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),!Array.isArray(t))throw Error("Argument for StateFulArray constructor must be an array!");var l,c,u,s,f=t;return i||(l=f.map((function(t,e){return null!=t&&t.hasOwnProperty("state")||Array.isArray(t)?t:"object"===tt(t)?new bt(t,r,n._stateManager,!1,a):t}))),c=this,u=e,s=K(l),u=lt(u),function(t,e,n){(e=ct(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(o=nt(c,it()?Reflect.construct(u,s||[],lt(c).constructor):u.apply(c,s)),"dependencyProps",new Map),o.parentStateObject=n,o.arrayStateProp=r,o.rawArray=f,nt(o,l=new Proxy(o,pt(null==n?void 0:n._stateManager,r,a)))}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&&at(t,e)}(e,t),n=e,r=[{key:"splice",value:function(){var t;this.$$operation="splice";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=rt(lt(e.prototype),"splice",this)).call.apply(t,[this].concat(r));return delete this.$$operation,i}},{key:"shift",value:function(){var t;this.$$operation="shift";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=rt(lt(e.prototype),"shift",this)).call.apply(t,[this].concat(r));return delete this.$$operation,i}},{key:"unshift",value:function(){var t;this.$$operation="splice";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=rt(lt(e.prototype),"unshift",this)).call.apply(t,[this].concat(r));return delete this.$$operation,i}},{key:"sort",value:function(){var t;this.$$operation="sort";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=rt(lt(e.prototype),"sort",this)).call.apply(t,[this].concat(r));return delete this.$$operation,q(this.parentStateObject._stateManager,this.arrayStateProp),i}},{key:"reverse",value:function(){var t;this.$$operation="reverse";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=rt(lt(e.prototype),"reverse",this)).call.apply(t,[this].concat(r));return delete this.$$operation,q(this.parentStateObject._stateManager,this.arrayStateProp),i}},{key:"fill",value:function(){var t;this.$$operation="fill";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=rt(lt(e.prototype),"fill",this)).call.apply(t,[this].concat(r));return delete this.$$operation,q(this.parentStateObject._stateManager,this.arrayStateProp),i}},{key:"copyWithin",value:function(){var t;this.$$operation="copyWithin";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=rt(lt(e.prototype),"sort",this)).call.apply(t,[this].concat(r));return delete this.$$operation,q(this.parentStateObject._stateManager,this.arrayStateProp),i}},{key:"slice",value:function(){var t;this.$$operation="slice";for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=(t=rt(lt(e.prototype),"slice",this)).call.apply(t,[this].concat(r));return delete this.$$operation,i}},{key:"toArray",value:function(){this.$$operation="toArray";var t=this.rawArray;return delete this.$$operation,t}}],o=[{key:Symbol.species,get:function(){return Array}}],r&&et(n.prototype,r),o&&et(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(ot(Array));const st=ut;function ft(t){return ft="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},ft(t)}var pt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;return{set:function(r,o,i){if("length"===o){var a=Reflect.set(r,o,i);return q(t,e),a}if(r[o]===i)return!0;var l=Number(o);if(!isNaN(l)&&("object"!==ft(i)||i.hasOwnProperty("_stateManager")||i.hasOwnProperty("state")||(i=new bt(i,e,t,!1,n)),i.hasOwnProperty("_stateManager")&&(i=i._stateManager),!r.hasOwnProperty("$$operation"))){var c=!1;l<r.length&&(c=!0);var u=Reflect.set(r,o,i);return c&&q(t,e),u}return Reflect.set(r,o,i)},get:function(t,e,n){if("symbol"===ft(e))return Reflect.get.apply(Reflect,arguments);if("hasOwnProperty"===e)return Reflect.get.apply(Reflect,arguments);var r=Number(e);if(!isNaN(r)){if(!t[r])return;return t[r].hasOwnProperty("state")?t[r].state:t[r]}return Reflect.get.apply(Reflect,arguments)}}};function ht(t){return ht="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},ht(t)}function dt(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,vt(r.key),r)}}function yt(t,e,n){return(e=vt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vt(t){var e=function(t,e){if("object"!=ht(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ht(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ht(e)?e:e+""}var mt=function(){return t=function t(e,n,r){var o=this,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),yt(this,"privateState",{}),yt(this,"state",{}),yt(this,"stateArrayMaps",{}),yt(this,"stateDependencies",{}),yt(this,"conditionallyRenderingElements",{}),yt(this,"stateNodes",{}),yt(this,"parentStateProp",void 0),yt(this,"parentStateManager",void 0),this.parentStateProp=n,this.parentStateManager=r,C(this.state,"_stateManager",this,!0),this.state=new Proxy(this.state,function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return{defineProperty:function(n,r,o){var i;if(p.includes(r)||null!==(i=n)&&void 0!==i&&i._binding)return Reflect.defineProperty.apply(Reflect,arguments);var a,l=n,c=new Set;if(n=new Proxy(n,{get:function(t,e,n){return"_global"===e&&(t._global._gettingDependenciesFor=r,t._global._localStateManager=t._stateManager),p.includes(e)||(Array.isArray(t[e])&&(t[e]._gettingDependenciesFor=r),c.add(e)),Reflect.get.apply(Reflect,arguments)}}),void 0!==(null==o?void 0:o.value)){var u,s=o.value;if(Array.isArray(s))if(0===r.indexOf("set_")){if(!(null==s?void 0:s[1]))throw Error(d(r));if(null==s||s[1].forEach((function(t){c.add(t)})),!0===(null==s?void 0:s[2])){a=r.substring(4);var f=null==s?void 0:s[0];f&&"function"==typeof f&&(t[a]=f.call(t))}else null!=s&&s[3]&&(t[a]=s[3])}else null!=s&&null!==(u=s[0])&&void 0!==u&&u._stateManager||(o.value=new st(o.value,t,r,!1,e))}else"function"==typeof(null==o?void 0:o.get)&&o.get.call(n);c.size&&c.forEach((function(e){return t._stateManager.addStateDependency(e,r)}));var h=Reflect.defineProperty(l,r,o),y=t._stateManager;return a&&(r=a),l.hasOwnProperty("_populate")||q(y,r),h},get:function(t,e,n){if("hasOwnProperty"===e)return Reflect.get.apply(Reflect,arguments);if(!t.hasOwnProperty("_global")&&t.hasOwnProperty("_gettingDependenciesFor"))return t._stateManager.addGlobalStateDependency(e,t._gettingDependenciesFor,t._localStateManager),delete t._gettingDependenciesFor,delete t._localStateManager,Reflect.get.apply(Reflect,arguments);if("function"==typeof(null==e?void 0:e.indexOf)&&0===(null==e?void 0:e.indexOf("!"))){var r=e.substring(1);if(t.hasOwnProperty(r))return!t[r]}return Reflect.get.apply(Reflect,arguments)}}}(this.state,a)),i?(this.globalStateDependencies={},this.addGlobalStateDependency=function(t,e,n){o.globalStateDependencies.hasOwnProperty(t)||(o.globalStateDependencies[t]=new Map),o.globalStateDependencies[t].has(n)||o.globalStateDependencies[t].set(n,new Set),o.globalStateDependencies[t].get(n).add(e)}):C(this.state,"_global",a[h](),!0),e&&function(t,e){t._populate=!0;var n,r=Object.getOwnPropertyDescriptors(e);for(var o in r)if(p.includes(o))delete r[o];else if((n=r[o]).hasOwnProperty("get")&&"function"==typeof n.get&&n.get.bind(t),n.hasOwnProperty("value")){var i=n.value;if("function"==typeof i)n.value.bind(t);else if(Array.isArray(i)&&0===o.indexOf("set_")){var a=null==i?void 0:i[0];a&&"function"==typeof a&&a.bind(t)}}Object.defineProperties(t,r),delete t._populate}(this.state,e)},e=[{key:"addStateDependency",value:function(t,e){this.stateDependencies.hasOwnProperty(t)||(this.stateDependencies[t]=new Set),this.stateDependencies[t].add(e)}},{key:"addStateMap",value:function(t,e,n){this.stateArrayMaps.hasOwnProperty(t)||(this.stateArrayMaps[t]=[]),this.stateArrayMaps[t].push({customElementName:e,parentElement:n})}},{key:"addConditionallyRenderingElements",value:function(t,e){var n;this.conditionallyRenderingElements.hasOwnProperty(t)||(this.conditionallyRenderingElements[t]=new Set),e.originalParentElement=e.parentElement||(null===(n=e.host)||void 0===n?void 0:n.shadowRoot),this.conditionallyRenderingElements[t].add(e)}},{key:"addStateNode",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.stateNodes.hasOwnProperty(t)||(this.stateNodes[t]=new Set,this.setAndBindStateProperty(t,n)),this.stateNodes[t].add(e)}},{key:"setAndBindStateProperty",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.state;if(0!==t.indexOf("!")){var r=Object.getOwnPropertyDescriptor(n,t);if(!(r||(n=n._global,r=Object.getOwnPropertyDescriptor(n,t))))throw Error("Could not bind state prop ".concat(t,". State prop not defined!"));var o=r.hasOwnProperty("value"),i=n._stateManager;if(o&&(i.privateState.hasOwnProperty(t)||(i.privateState[t]=n[t]),n._binding=!0,Object.defineProperty(n,t,{set:function(e){e!==i.privateState[t]&&(i.privateState[t]=e,q(i,t),i.parentStateManager&&q(i.parentStateManager,i.parentStateProp))},get:function(){return i.privateState[t]}})),e&&0!==t.indexOf("!")){var a="!".concat(t);o?i.privateState.hasOwnProperty(a)||(Object.defineProperty(n,a,{get:function(){return!i.privateState[t]},set:function(){throw Error("Cannot directly set a negation State property!")},enumerable:!0}),i.addStateDependency(t,a)):i.state.hasOwnProperty(a)||(Object.defineProperty(n,a,{get:function(){return!i.state[t]},set:function(){throw Error("Cannot directly set a negation State property!")},enumerable:!0}),i.addStateDependency(t,a))}delete this.state._binding}else{var l=t.substring(1),c=Object.getOwnPropertyDescriptor(n,l);if(!(c||(n=n._global,c=Object.getOwnPropertyDescriptor(n,l))))throw Error("Could not bind state prop ".concat(t,". State prop ").concat(l," not defined!"))}}}],e&&dt(t.prototype,e),n&&dt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();const bt=mt;function gt(t){return gt="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},gt(t)}function wt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Et(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function St(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,l=[],c=!0,u=!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)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||Et(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 Et(t,e){if(t){if("string"==typeof t)return Ot(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)?Ot(t,e):void 0}}function Ot(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 Mt(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,Ht(r.key),r)}}function Tt(t,e,n){return e=Pt(e),function(t,e){if(e&&("object"==gt(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,At()?Reflect.construct(e,n||[],Pt(t).constructor):e.apply(t,n))}function At(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(At=function(){return!!t})()}function Pt(t){return Pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pt(t)}function jt(t,e){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jt(t,e)}function _t(t,e,n){Lt(t,e),e.set(t,n)}function Lt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function kt(t,e,n){return(e=Ht(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ht(t){var e=function(t,e){if("object"!=gt(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=gt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==gt(e)?e:e+""}function xt(t,e){return t.get(Ct(t,e))}function Rt(t,e,n){return t.set(Ct(t,e),n),n}function Ct(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 Nt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new WeakMap,o=new WeakMap,i=new WeakMap,a=new WeakMap,l=new WeakMap,s=new WeakMap,f=new WeakMap,p=new WeakMap,d=new WeakMap,y=new WeakMap,v=new WeakSet,b=function(t){function c(){var t,e,n,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,h=arguments.length>1?arguments[1]:void 0,b=arguments.length>2?arguments[2]:void 0,w=arguments.length>3?arguments[3]:void 0;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),t=Tt(this,c),Lt(e=t,n=v),n.add(e),kt(t,"host",null),_t(t,r,void 0),kt(t,"_onRender",void 0),_t(t,o,!1),_t(t,i,{}),_t(t,a,void 0),_t(t,l,void 0),_t(t,s,void 0),_t(t,f,void 0),_t(t,p,[]),_t(t,d,void 0),_t(t,y,void 0),t.isReactiveElement=!0,t.isSpecialElement="CONDITIONAL-ELEMENT"===t.tagName,t.isNativeElement=t.hasAttribute("is")&&!t.isSpecialElement,!t.isNativeElement){if(h){var S=new Function(h.textContent)();Ct(v,t,g).call(t,S)}if(Rt(a,t,u?u.cloneNode(!0):m.cloneNode()),b){var E=new CSSStyleSheet;E.replaceSync(b),Rt(l,t,E)}w&&Rt(s,t,w),t.ref={}}return 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&&jt(t,e)}(c,t),u=c,b=[{key:"setInitialState",value:function(t){this.initialState?Object.assign(this.initialState,t):this.initialState=t}},{key:"bindAttributeToState",value:function(t,e){xt(i,this)[t]=e}},{key:"unbindAttributeToState",value:function(t){delete xt(i,this)[t]}},{key:"updateStateFromProperty",value:function(t){var e=this[t],n=xt(i,this)[t],r=St(this.getState(n,!0),2),o=r[0],a=r[1];o!==e&&(a[n]=e)}},{key:"resolveTextContentTemplateStringTag",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.reduce((function(t,n,o){var i,a=!!r[o]&&r[o].replaceAll(/\s/g,"");return t+n+(a?null===(i=e.host)||void 0===i?void 0:i.getAttribute(a):"")}),"")}},{key:"disconnectedCallback",value:function(){var t,e=null!==(t=this.host)&&void 0!==t?t:this;if(e.ref){var n=this.getAttribute("ref");n&&delete e.ref[n]}Rt(i,this,{}),Ct(v,this,E).call(this)}},{key:"connectedCallback",value:function(){var t=this;if(!xt(o,this)){if(this.host=this.getRootNode().host,!this.isNativeElement){var i,a,l=wt(this.getAttributeNames());try{for(l.s();!(a=l.n()).done;){var c,u=a.value;0===(i=this.getAttribute(u)).indexOf("@")&&(null!==(c=this.initialState)&&void 0!==c||(this.initialState={}),this.initialState[u]=U(i.substring(1)))}}catch(t){l.e(t)}finally{l.f()}Ct(v,this,w).call(this)}"INPUT"===(null==this?void 0:this.tagName)&&(Rt(y,this,(function(){var t=new Event("inputChange",{bubbles:!0,composed:!0});this.dispatchEvent(t)})),this.addEventListener("change",xt(y,this),!1)),this.isNativeElement||n||Ct(v,this,S).call(this);var s,f=[],p=wt(this.getAttributeNames());try{for(p.s();!(s=p.n()).done;){var d=s.value,m=this.getAttribute(d);if(this.initialSetAttribute(d,m),0===d.indexOf("_")){var b=d.substring(1);f.push({command:b,args:m})}}}catch(t){p.e(t)}finally{p.f()}f.forEach((function(e){var n,r=e.command,o=e.args;null===(n=J[r])||void 0===n||n.call(t,o)})),this.isNativeElement?-1!==this.textContent.indexOf("${")&&(this.textContent=Ct(v,this,T).call(this)):(j(this,(function(){return Ct(v,t,O).call(t)})),xt(r,this)&&queueMicrotask((function(){return xt(r,t).call(t,e[h]())})),this._onRender&&this._onRender.call(this)),Rt(o,this,!0)}}},{key:"attributeChangedCallback",value:function(t,e,n){if(e!==n&&this.isConnected){if("ref"===t){var r=n;(this.isNativeElement?this.host:this).ref[r]=this}t in xt(i,this)&&Ct(v,this,M).call(this,t)}}},{key:"getState",value:function(t){var n,r,o,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=this.isNativeElement&&this.host?this.host:this;a&&a.state&&(r=null===(o=a.state)||void 0===o?void 0:o[t]);for(var l,c=!1;void 0===r&&void 0!==a.host&&null!==a.host;){var u;r=null===(u=(a=a.host).state)||void 0===u?void 0:u[t]}return void 0!==r?n=a.state:void 0!==(r=null===(l=c=e[h]())||void 0===l?void 0:l[t])&&(n=c),i?[r,n]:r}},{key:"findElement",value:function(t){var n=this.isNativeElement?this.host:this,r=n;return e.SPROUT_CONFIG.useShadow&&(r=n.shadowRoot),n.ref.hasOwnProperty(t)?n.ref[t]:r.querySelector('[ref="'.concat(t,'"]'))}}],b&&Mt(u.prototype,b),A&&Mt(u,A),Object.defineProperty(u,"prototype",{writable:!1}),u;var u,b,A}(t);function g(t){var e=this;t.events&&(Rt(f,this,t.events),this.isConnected&&j(this,(function(){return Ct(v,e,O).call(e)}))),t.state&&(this.setInitialState(t.state),this.isConnected&&Ct(v,this,w).call(this)),t.onMount&&Rt(r,this,t.onMount)}function w(){if(this.initialState){var t=this.initialState;t._stateManager?this.state=t._stateManager.state:this.state=new bt(t,void 0,void 0,!1,e).state,delete this.initialState}}function S(){if(e.SPROUT_CONFIG.useShadow){var t=this.attachShadow({mode:"open"});this.shadowRoot.adoptedStyleSheets=[],xt(s,this)&&this.shadowRoot.adoptedStyleSheets.push(xt(s,this)),xt(l,this)&&this.shadowRoot.adoptedStyleSheets.push(xt(l,this)),t.appendChild(xt(a,this))}else{var n=new DocumentFragment;n.appendChild(xt(a,this)),this.appendChild(n)}}function E(){var t=this;if(xt(y,this)&&this.removeEventListener("change",xt(y,this)),xt(p,this).length){var e=this;xt(p,this).forEach((function(n){e.removeEventListener(n,xt(d,t),!1)}))}}function O(){var t,n=this;if(xt(f,this)){var r=Object.keys(xt(f,this)),o={},i={};r.forEach((function(t){var e=xt(f,n)[t];if("function"==typeof e)o[t]=e;else if("object"===gt(e)){Object.keys(e).forEach((function(n){"click"===n?o[t]=e[n]:(i[n]||(i[n]={}),i[n][t]=e[n])}))}}));var a=e[h]();Rt(d,this,(function(t,e){var n,r=t.composedPath();if(n=r?r.find((function(t){return t.hasAttribute&&t.hasAttribute("ref")&&t.getAttribute("ref")in e})):t.target.hasAttribute&&t.target.hasAttribute("ref")&&t.target.getAttribute("ref")in e?t.target:null){var o,i=n.getAttribute("ref");null===(o=e[i])||void 0===o||o.call(n,t,t.target,a)}}));var l=this;Object.keys(o).length&&(l.addEventListener("click",(function(t){xt(d,n).call(n,t,o)}),!1),xt(p,this).push("click"));for(var c=Object.keys(i),u=function(){var t=y[s];l.addEventListener(t,(function(e){xt(d,n).call(n,e,i[t])}),!1)},s=0,y=c;s<y.length;s++)u();(t=xt(p,this)).push.apply(t,c)}}function M(t){var e=this.getAttribute(t);c.includes(t)&&(e=null!==e);var n=xt(i,this)[t],r=St(this.getState(n,!0),2),o=r[0],a=r[1];o!==e&&(a[n]=e)}function T(){return new Function("return this.resolveTextContentTemplateStringTag`"+this.textContent+"`;").bind(this)()}return kt(b,"observedAttributes",["ref"].concat(u).concat(Object.keys(J).map((function(t){return"_"+t.toLowerCase()})))),b.prototype.initialSetText=function(t){G.call(this,t)},b.prototype.initialSetAttribute=function(t,e){var n=e=String(e);if(0===e.indexOf("@")&&this.host&&this.isConnected&&(n=this.host.getAttribute(e.substring(1))),0===e.indexOf("$")&&this.isConnected){var r=e.substring(1);B.call(this,t,r)}else F.call(this,t,n)},b}function It(t){return It="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},It(t)}function Dt(){Dt=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),l=new L(r||[]);return o(a,"_invoke",{value:A(t,n,l)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};u(w,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(k([])));E&&E!==n&&r.call(E,a)&&(w=E);var O=g.prototype=m.prototype=Object.create(w);function M(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function n(o,i,a,l){var c=f(t[o],t,i);if("throw"!==c.type){var u=c.arg,s=u.value;return s&&"object"==It(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,l)}),(function(t){n("throw",t,a,l)})):e.resolve(s).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,l)}))}l(c.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function A(e,n,r){var o=p;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var l=r.delegate;if(l){var c=P(l,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var u=f(e,n,r);if("normal"===u.type){if(o=r.done?y:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=y,r.method="throw",r.arg=u.arg)}}}function P(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,P(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function k(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(It(e)+" is not iterable")}return b.prototype=g,o(O,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=u(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,c,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},M(T.prototype),u(T.prototype,l,(function(){return this})),e.AsyncIterator=T,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new T(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},M(O),u(O,c,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=k,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return l.type="throw",l.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),_(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:k(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function $t(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,Ft(r.key),r)}}function Ft(t){var e=function(t,e){if("object"!=It(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=It(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==It(e)?e:e+""}function Bt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gt(t,e,n){return e=qt(e),function(t,e){if(e&&("object"==It(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,Wt()?Reflect.construct(e,n||[],qt(t).constructor):e.apply(t,n))}function Wt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Wt=function(){return!!t})()}function qt(t){return qt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qt(t)}function Ut(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&&zt(t,e)}function zt(t,e){return zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zt(t,e)}function Vt(t,e,n,r,o,i,a){try{var l=t[i](a),c=l.value}catch(t){return void n(t)}l.done?e(c):Promise.resolve(c).then(r,o)}function Qt(t,e){function n(){var e;return e=Dt().mark((function e(n,r,o){var i,a,l;return Dt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=document.importNode(n.content,!0),(a=i.querySelector("style"))&&i.removeChild(a),(l=i.querySelector("script"))&&i.removeChild(l),customElements.define(r,function(t){function e(){return Bt(this,e),Gt(this,e,[i,l,null==a?void 0:a.textContent,o])}return Ut(e,t),n=e,r&&$t(n.prototype,r),c&&$t(n,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,c}(t.ReactiveElement));case 6:case"end":return e.stop()}}),e)})),n=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(t){Vt(i,r,o,a,l,"next",t)}function l(t){Vt(i,r,o,a,l,"throw",t)}a(void 0)}))},n.apply(this,arguments)}var r,o;(o=document.querySelector('head > style[app="'.concat(e,'"]')))&&(r=new CSSStyleSheet).replaceSync(o.textContent),Array.prototype.forEach.call(document.querySelectorAll('template[app="'.concat(e,'"]')),(function(t){!function(t,e,r){n.apply(this,arguments)}(t,t.getAttribute("for"),r)})),"function"==typeof globalThis["".concat(e,"_runtime")]&&globalThis["".concat(e,"_runtime")].call(t)}function Yt(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,l=[],c=!0,u=!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)&&(l.push(r.value),l.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,e)||Jt(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 Xt(t){return function(t){if(Array.isArray(t))return Kt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Jt(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 Jt(t,e){if(t){if("string"==typeof t)return Kt(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)?Kt(t,e):void 0}}function Kt(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 Zt(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,te(r.key),r)}}function te(t){var e=function(t,e){if("object"!=ue(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ue(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ue(e)?e:e+""}function ee(t,e,n){return e=re(e),function(t,e){if(e&&("object"==ue(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,ne()?Reflect.construct(e,n||[],re(t).constructor):e.apply(t,n))}function ne(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ne=function(){return!!t})()}function re(t){return re=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},re(t)}function oe(t,e){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},oe(t,e)}function ie(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 ae(t,e,n){return t.set(ce(t,e),n),n}function le(t,e){return t.get(ce(t,e))}function ce(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 ue(t){return ue="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},ue(t)}function se(t){var e=new WeakMap,n=new WeakMap,r=new WeakMap,o=function(t){function o(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return ie(t=ee(this,o,[].concat(a)),e,void 0),ie(t,n,void 0),ie(t,r,!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&&oe(t,e)}(o,t),i=o,a=[{key:"render",value:function(){var t,r=this,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(void 0===(t=0===le(e,this).indexOf("@")?this.host.getAttribute(le(e,this).substring(1)):this.getState(le(e,this))))throw Error("State value for ".concat(le(e,this)," not found while rendering conditional-render element:"),this);var i=[];le(n,this).forEach((function(e,n){(function(t,e){return"string"!==ue(t)?e===t:"always"===t||(g.includes(t[0])?new Function("return ".concat(e).concat(t))():e===t)})(n,t)&&i.push.apply(i,Xt(e))})),o?(this.innerHTML="",this.append.apply(this,i)):i.length&&L(this,(function(){r.innerHTML="",r.append.apply(r,i)}))}},{key:"connectedCallback",value:function(){if(this.host=this.getRootNode().host,!this.host)throw Error("<conditional-render> must be used as part of a custom element template! Cannot be used outside of a custom element.");if(!le(r,this)){var t=this.getAttribute("_condition");if(!t)throw Error("conditional-render elements must have a _condition command attribute");if(!this.children||!this.children.length)throw Error("Conditional element must have children!");var o=t;ae(e,this,o);var i,a,l=0===le(e,this).indexOf("@");if(!l){var c=Yt(this.getState(o,!0),2);if(i=c[0],a=c[1],void 0===i)throw Error("State property ".concat(o," not defined for _condition command!"))}var u=new Map;u.set("always",[]),Xt(this.children).forEach((function(t){var e=t.getAttribute("_if");if(e){var n=U(e);u.has(n)||u.set(n,[]),u.get(n).push(t)}else u.get("always").push(t)})),ae(n,this,u),l||a._stateManager.addConditionallyRenderingElements(o,this),this.render(!0),ae(r,this,!0)}}}],a&&Zt(i.prototype,a),l&&Zt(i,l),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,a,l}(t);return o}var fe=document.currentScript.hasAttribute("allowappscopeaccess");globalThis.SproutInitApp=function(t){var e,n=(window,{window,document:null===(e=window)||void 0===e?void 0:e.document}),r={useShadow:!0,allowAppScopeAccess:fe};r.allowAppScopeAccess&&(Object.defineProperty(globalThis,"sproutApps",{value:{},writable:!1}),Object.defineProperty(globalThis.sproutApps,t,{value:n,writable:!1})),n.SPROUT_CONFIG=Object.seal(r);var o=Object.prototype.hasOwnProperty;C(Object.prototype,"hasOwnProperty",o),n[h]=function(){return{}},n.setGlobalState=function(){var t=new bt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},void 0,void 0,!0,n).state,e="SproutGlobalState";Object.defineProperty(n,e,{value:t,writable:!1,configurable:!1}),Object.defineProperty(n,h,{value:function(){return n[e]}})},n.ReactiveElement=Nt(HTMLElement,n),y.forEach((function(t){return customElements.define("reactive-".concat(t.element),Nt(t.class,n,!0),{extends:t.element})}));var i=se(Nt(HTMLElement,n,!0));return customElements.define("conditional-render",i),function(){Qt(n,t)}.bind(n)}})();
//# sourceMappingURL=sprout-core.min.js.map

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc