ov-configurator 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e,t){this.v=e,this.k=t}function t(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e){if(Array.isArray(e))return e}function r(e){if(Array.isArray(e))return t(e)}function i(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function a(e,t,n){return t=f(t),S(e,h()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n))}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t,n){if(h())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&C(i,n.prototype),i}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,E(r.key),r)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function u(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=te(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function d(e,t,n){return(t=E(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&C(e,t)}function m(e){try{return Function.toString.call(e).indexOf(`[native code]`)!==-1}catch(t){return typeof e==`function`}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}function g(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function _(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function v(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y(){throw TypeError(`Invalid attempt to spread non-iterable instance.
4
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?b(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function S(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return i(e)}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}function w(e,t){return n(e)||_(e,t)||te(e,t)||v()}function T(e){return r(e)||g(e)||te(e)||y()}function ee(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function E(e){var t=ee(e,`string`);return typeof t==`symbol`?t:t+``}function D(e){"@babel/helpers - typeof";return D=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},D(e)}function te(e,n){if(e){if(typeof e==`string`)return t(e,n);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}function O(t){var n,r;function i(n,r){try{var o=t[n](r),s=o.value,c=s instanceof e;Promise.resolve(c?s.v:s).then(function(e){if(c){var r=n===`return`&&s.k?n:`next`;if(!s.k||e.done)return i(r,e);e=t[r](e).value}a(!!o.done,e)},function(e){i(`throw`,e)})}catch(e){a(2,e)}}function a(e,t){e===2?n.reject(t):n.resolve({value:t,done:e}),(n=n.next)?i(n.key,n.arg):r=null}this._invoke=function(e,t){return new Promise(function(a,o){var s={key:e,arg:t,resolve:a,reject:o,next:null};r?r=r.next=s:(n=r=s,i(e,t))})},typeof t.return!=`function`&&(this.return=void 0)}O.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},O.prototype.next=function(e){return this._invoke(`next`,e)},O.prototype.throw=function(e){return this._invoke(`throw`,e)},O.prototype.return=function(e){return this._invoke(`return`,e)};function ne(e){var t=typeof Map==`function`?new Map:void 0;return ne=function(e){if(e===null||!m(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return s(e,arguments,f(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),C(n,e)},ne(e)}var k,A,re,j,ie,ae,oe,se,M,N,ce,le,ue,de,P={},F=[],fe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,I=Array.isArray;function L(e,t){for(var n in t)e[n]=t[n];return e}function pe(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function me(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?k.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return R(e,o,r,i,null)}function R(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++re:i,__i:-1,__u:0};return i==null&&A.vnode!=null&&A.vnode(a),a}function z(e){return e.children}function B(e,t){this.props=e,this.context=t}function V(e,t){if(t==null)return e.__?V(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?V(e):null}function he(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],i=[],a=L({},t);a.__v=t.__v+1,A.vnode&&A.vnode(a),we(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n==null?V(t):n,!!(32&t.__u),i),a.__v=t.__v,a.__.__k[a.__i]=a,Ee(r,a,i),t.__e=t.__=null,a.__e!=n&&ge(a)}}function ge(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),ge(e)}function _e(e){(!e.__d&&(e.__d=!0)&&j.push(e)&&!H.__r++||ie!=A.debounceRendering)&&((ie=A.debounceRendering)||ae)(H)}function H(){try{for(var e,t=1;j.length;)j.length>t&&j.sort(oe),e=j.shift(),t=j.length,he(e)}finally{j.length=H.__r=0}}function ve(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v=r&&r.__k||F,y=t.length;for(c=ye(n,t,v,c,y),d=0;d<y;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&v[p.__i]||P,p.__i=d,g=we(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&ke(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),(_=!!(4&p.__u))||f.__k===p.__k?(c=be(p,c,e,_),_&&f.__e&&(f.__e=null)):typeof p.type==`function`&&g!==void 0?c=g:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=h,c}function ye(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=R(null,o,null,null,null):I(o)?o=e.__k[a]=R(z,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=R(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=xe(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=V(s)),Ae(s,s));return r}function be(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=be(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=V(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function xe(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function Se(e,t,n){t[0]==`-`?e.setProperty(t,n==null?``:n):e[t]=n==null?``:typeof n!=`number`||fe.test(t)?n:n+`px`}function U(e,t,n,r,i){var a,o;n:if(t==`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||Se(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||Se(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(ce,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n[N]=r[N]:(n[N]=le,e.addEventListener(t,a?de:ue,a)):e.removeEventListener(t,a?de:ue,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n==null?``:n;break n}catch(e){}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function Ce(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[M]==null)t[M]=le++;else if(t[M]<n[N])return;return n(A.event?A.event(t):t)}}}function we(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(u=A.__b)&&u(t);n:if(typeof T==`function`)try{if(_=t.props,v=T.prototype&&T.prototype.render,y=(u=T.contextType)&&r[u.__c],b=u?y?y.props.value:u.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:(v?t.__c=d=new T(_,b):(t.__c=d=new B(_,b),d.constructor=T,d.render=je),y&&y.sub(d),d.state||(d.state={}),d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),v&&d.__s==null&&(d.__s=d.state),v&&T.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=L({},d.__s)),L(d.__s,T.getDerivedStateFromProps(_,d.__s))),p=d.props,m=d.state,d.__v=t,f)v&&T.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),v&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(v&&T.getDerivedStateFromProps==null&&_!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(_,b),t.__v==n.__v||!d.__e&&d.shouldComponentUpdate!=null&&!1===d.shouldComponentUpdate(_,d.__s,b)){t.__v!=n.__v&&(d.props=_,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),F.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&o.push(d);break n}d.componentWillUpdate!=null&&d.componentWillUpdate(_,d.__s,b),v&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,m,h)})}if(d.context=b,d.props=_,d.__P=e,d.__e=!1,x=A.__r,S=0,v)d.state=d.__s,d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),F.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++S<25);d.state=d.__s,d.getChildContext!=null&&(r=L(L({},r),d.getChildContext())),v&&!f&&d.getSnapshotBeforeUpdate!=null&&(h=d.getSnapshotBeforeUpdate(p,m)),C=u!=null&&u.type===z&&u.key==null?De(u.props.children):u,s=ve(e,I(C)?C:[C],t,n,r,i,a,o,s,c,l),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),g&&(d.__E=d.__=null)}catch(e){if(t.__v=null,c||a!=null)if(e.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s}else{for(w=a.length;w--;)pe(a[w]);Te(t)}else t.__e=n.__e,t.__k=n.__k,e.then||Te(t);A.__e(e,t,n)}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=Oe(n.__e,t,n,r,i,a,o,c,l);return(u=A.diffed)&&u(t),128&t.__u?void 0:s}function Te(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Te))}function Ee(e,t,n){for(var r=0;r<n.length;r++)ke(n[r],n[++r],n[++r]);A.__c&&A.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){A.__e(e,t.__v)}})}function De(e){return D(e)!=`object`||e==null||e.__b>0?e:I(e)?e.map(De):L({},e)}function Oe(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g=n.props||P,_=t.props,v=t.type;if(v==`svg`?i=`http://www.w3.org/2000/svg`:v==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||(i=`http://www.w3.org/1999/xhtml`),a!=null){for(l=0;l<a.length;l++)if((p=a[l])&&`setAttribute`in p==!!v&&(v?p.localName==v:p.nodeType==3)){e=p,a[l]=null;break}}if(e==null){if(v==null)return document.createTextNode(_);e=document.createElementNS(i,v,_.is&&_),s&&(A.__m&&A.__m(t,a),s=!1),a=null}if(v==null)g===_||s&&e.data==_||(e.data=_);else{if(a=a&&k.call(e.childNodes),!s&&a!=null)for(g={},l=0;l<e.attributes.length;l++)g[(p=e.attributes[l]).name]=p.value;for(l in g)p=g[l],l==`dangerouslySetInnerHTML`?d=p:l==`children`||l in _||l==`value`&&`defaultValue`in _||l==`checked`&&`defaultChecked`in _||U(e,l,null,p,i);for(l in _)p=_[l],l==`children`?f=p:l==`dangerouslySetInnerHTML`?u=p:l==`value`?m=p:l==`checked`?h=p:s&&typeof p!=`function`||g[l]===p||U(e,l,p,g[l],i);if(u)s||d&&(u.__html==d.__html||u.__html==e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=``),ve(t.type==`template`?e.content:e,I(f)?f:[f],t,n,r,v==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&V(n,0),s,c),a!=null)for(l=a.length;l--;)pe(a[l]);s||(l=`value`,v==`progress`&&m==null?e.removeAttribute(`value`):m!=null&&(m!==e[l]||v==`progress`&&!m||v==`option`&&m!=g[l])&&U(e,l,m,g[l],i),l=`checked`,h!=null&&h!=e[l]&&U(e,l,h,g[l],i))}return e}function ke(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){A.__e(e,n)}}function Ae(e,t,n){var r,i;if(A.unmount&&A.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||ke(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){A.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Ae(r[i],t,n||typeof e.type!=`function`);n||pe(e.__e),e.__c=e.__=e.__e=void 0}function je(e,t,n){return this.constructor(e,n)}function Me(e,t,n){var r,i,a,o;t==document&&(t=document.documentElement),A.__&&A.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],o=[],we(t,e=(!r&&n||t).__k=me(z,null,[e]),i||P,P,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?k.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,o),Ee(a,e,o)}k=F.slice,A={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},re=0,B.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=L({},this.state);typeof e==`function`&&(e=e(L({},n),this.props)),e&&L(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),_e(this))},B.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_e(this))},B.prototype.render=z,j=[],ae=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,oe=function(e,t){return e.__v.__b-t.__v.__b},H.__r=0,se=Math.random().toString(8),M=`__d`+se,N=`__a`+se,ce=/(PointerCapture)$|Capture$/i,le=0,ue=Ce(!1),de=Ce(!0);var Ne,W,Pe,Fe,Ie=0,Le=[],G=A,Re=G.__b,ze=G.__r,Be=G.diffed,Ve=G.__c,He=G.unmount,Ue=G.__;function We(e,t){G.__h&&G.__h(W,e,Ie||t),Ie=0;var n=W.__H||(W.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Ge(e){return Ie=1,Ke(Qe,e)}function Ke(e,t,n){var r=We(Ne++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Qe(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=W,!W.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a&&a.call(this,e,t,n)||o};W.__f=!0;var a=W.shouldComponentUpdate,o=W.componentWillUpdate;W.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},W.shouldComponentUpdate=i}return r.__N||r.__}function qe(){for(var e;e=Le.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Xe),t.__h.some(Ze),t.__h=[]}catch(n){t.__h=[],G.__e(n,e.__v)}}}G.__b=function(e){W=null,Re&&Re(e)},G.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ue&&Ue(e,t)},G.__r=function(e){ze&&ze(e),Ne=0;var t=(W=e.__c).__H;t&&(Pe===W?(t.__h=[],W.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(Xe),t.__h.some(Ze),t.__h=[],Ne=0)),Pe=W},G.diffed=function(e){Be&&Be(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Le.push(t)!==1&&Fe===G.requestAnimationFrame||((Fe=G.requestAnimationFrame)||Ye)(qe)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),Pe=W=null},G.__c=function(e,t){t.some(function(e){try{e.__h.some(Xe),e.__h=e.__h.filter(function(e){return!e.__||Ze(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],G.__e(n,e.__v)}}),Ve&&Ve(e,t)},G.unmount=function(e){He&&He(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{Xe(e)}catch(e){t=e}}),n.__H=void 0,t&&G.__e(t,n.__v))};var Je=typeof requestAnimationFrame==`function`;function Ye(e){var t,n=function(){clearTimeout(r),Je&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Je&&(t=requestAnimationFrame(n))}function Xe(e){var t=W,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),W=t}function Ze(e){var t=W;e.__c=e.__(),W=t}function Qe(e,t){return typeof t==`function`?t(e):t}var $e=0;Array.isArray;function K(e,t,n,r,i,a){t||(t={});var o,s,c=t;if(`ref`in c)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--$e,__i:-1,__u:0,__source:i,__self:a};if(typeof e==`function`&&(o=e.defaultProps))for(s in o)c[s]===void 0&&(c[s]=o[s]);return A.vnode&&A.vnode(l),l}function et(e,t,n){var r,i,a,o,s=n.find(function(e){return!e.disabled}),c=(r=(i=s==null?void 0:s.value)==null?(a=n[0])==null?void 0:a.value:i)==null?``:r,l=(o=t[e])==null?c:o;return n.find(function(e){return e.value===l&&!e.disabled})?l:c}var tt=function(e,t){return typeof e.inputs==`function`?e.inputs(t):e.inputs};function nt(e,t){return e.map(function(e){var n=tt(e,t);return{options:e,inputs:n,checkedValue:et(e.type,t,n)}})}function rt(e,t,n,r){var i=x(x({},t),{},d({},n,r)),a=u(e),o;try{var s=function(){var e,n=o.value;if(!((e=n.dependsOn)!=null&&e.length)||!n.dependsOn.some(function(e){return i[e]!==t[e]}))return 0;var r=tt(n,i),a=t[n.type];if(!r.find(function(e){return e.value===a&&!e.disabled})){var s=r.find(function(e){return!e.disabled});if(s)i=x(x({},i),{},d({},n.type,s.value));else{var c=x({},i);delete c[n.type],i=c}}};for(a.s();!(o=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}var c=nt(e,i);return{values:i,resolvedSections:c}}var it=function(e){return function(t){return`${e}__${t}`}};function at(e){var t=e.options,n=e.inputs,r=e.checkedValue,i=e.stylePrefix,a=e.dataAttributePrefix,o=e.prefix,s=e.id,c=t.title,l=c===void 0?``:c,u=t.type,f=t.className,p=f===void 0?``:f,m=t.checked,h=m===void 0?!0:m,g=t.inputType,_=g===void 0?`radio`:g,v=it(i);return n.length?K(`div`,d(d({class:v(`section`)},`data-${a}-section-type`,u),`children`,[l&&K(`h4`,{class:v(`section-title`),children:[l,`:`]}),K(`div`,{class:v(`section-row`),children:n.map(function(e,t){return K(`div`,{class:v(`section-col ${p}`),children:[K(`input`,{checked:h?r===e.value:!1,name:`${o}-${s}-${u}`,id:`${o}-${s}-${u}-${t}`,type:_,value:e.value,disabled:e.disabled}),K(`label`,{for:`${o}-${s}-${u}-${t}`,dangerouslySetInnerHTML:{__html:e.label},"data-value":e.value,style:{"--option-value":e.value}})]},e.value)})})])):null}function ot(e){var t=e.sections,n=e.initialSections,r=e.initialValues,i=e.stylePrefix,a=e.dataAttributePrefix,o=e.prefix,s=e.id,c=e.onValuesChange,l=w(Ge(n),2),u=l[0],d=l[1],f=w(Ge(r),2),p=f[0],m=f[1];return K(`form`,{action:`/`,class:i,onChange:function(e){var n=e.target;if(n.tagName===`INPUT`){var r=n.name.split(`-`),i=r[r.length-1],a=rt(t,p,i,n.value);d(a.resolvedSections),m(a.values),c(a.values)}},children:u.map(function(e){var t=e.options,n=e.inputs,r=e.checkedValue;return K(at,{options:t,inputs:n,checkedValue:r,stylePrefix:i,dataAttributePrefix:a,prefix:o,id:s},t.type)})})}function st(e,t){Me(K(ot,x({},t)),e)}function ct(e){Me(null,e)}var lt;(function(){var e=Number;e.isNaN||(e.isNaN=function(e){return typeof e==`number`&&isNaN(e)}),Array.prototype.find||(Array.prototype.find=function(e,t){if(this==null)throw TypeError(`Array.prototype.find called on null or undefined`);if(typeof e!=`function`)throw TypeError(`predicate must be a function`);for(var n=Object(this),r=n.length>>>0,i=0;i<r;i++){var a=n[i];if(e.call(t,a,i,n))return a}})})();var ut={DATA_ATTRIBUTE:`data`,CUSTOM:`custom`,DEFAULT:`default`},q={PARENT:`parent`,SELF:`self`,CLOSEST:`closest`},dt=function(){function e(t){o(this,e),this.nodes=[],this.animationIds=[],this.prevValue=void 0;var n=t.selector;this.selector=n,this.options=x({animated:!1,duration:800,dots:0,dataKey:n,calculateFunction:function(){return null},attribute:!1,animation:[`animate__faster`,`animate__pulse`],animatedNode:q.PARENT,animatedNodeSelector:``},t)}return l(e,[{key:`getNode`,value:function(e){var t=e.prefix,n=e.parentNode,r=e.type;if((r===void 0?ut.DEFAULT:r)===ut.CUSTOM)this.nodes=Array.from(n.querySelectorAll(this.options.selector));else{var i=`data-${t}`;this.nodes=Array.from(n.querySelectorAll(`[${i}="${this.options.selector}"]`)),n.getAttribute(i)===this.options.selector&&this.nodes.push(n)}return this.nodes}},{key:`changeValue`,value:function(e){var t=this;if(this.nodes.length){var n=this.options,r=n.prefix,i=n.selector;this.animateBlock(e),this.nodes.forEach(function(n,a){var o=n.dataset.calcAttribute,s=t.options.attribute,c=!t.options.attribute,l=n.getAttribute(`data-${r}-${i}-target`);if(l){var u=w(l.split(`:`),2),d=u[0];o=u[1],s=d===`full`||d===`attr`,c=d===`full`}if(s&&o&&n.setAttribute(o,String(e)),c){var f=Number(e);if(Number.isNaN(f)){n.innerHTML=String(e);return}t.animateNumber(f,n,a)}}),this.prevValue=e}}},{key:`animateBlock`,value:function(e){if(e!==this.prevValue){var t=this.options,n=t.animated,r=t.animation,i=t.animatedNode,a=t.animatedNodeSelector;n&&this.nodes.forEach(function(e){var t,n=null;switch(i){case q.SELF:n=e;break;case q.PARENT:n=e.parentNode;break;case q.CLOSEST:n=(t=e.closest(a))==null?null:t;break}if(n){var o,s=[`animate__animated`].concat(T(r)),c=function(){var e;(e=n.classList).remove.apply(e,T(s))};(o=n.classList).add.apply(o,T(s)),n.addEventListener(`webkitAnimationEnd`,c),n.addEventListener(`mozAnimationEnd`,c),n.addEventListener(`MSAnimationEnd`,c),n.addEventListener(`oanimationend`,c),n.addEventListener(`animationend`,c)}})}}},{key:`animateNumber`,value:function(e,t,n){var r,i=this,a=this.options,o=a.duration,s=o===void 0?800:o,c=a.dots,l=c===void 0?0:c;window.cancelAnimationFrame((r=this.animationIds[n])==null?0:r);var u=Number(t.textContent);u=Number.isNaN(u)?0:u;var d=e-u,f=d>0,p=null,m=function(r){p===null&&(p=r);var a=r-p;t.textContent=h(a).toFixed(l),a<s?i.animationIds[n]=window.requestAnimationFrame(m):(t.textContent=e.toFixed(g(e)),window.cancelAnimationFrame(i.animationIds[n]))};function h(t){var n=u+t*d/s;if(f){if(n>e)return e}else if(n<e)return e;return n}function g(e){var t=String(e);return t.includes(`.`)?t.length-1>l?l:t.length-1:0}this.animationIds[n]=window.requestAnimationFrame(m)}}])}(),ft=function(){function e(t){var n=this;o(this,e),this.savedValues={},this.values={},this.node=null;var r=t.editableFields,i=r===void 0?[]:r,a=t.data,s=a===void 0?null:a;this.options=x({editableFields:[],prefix:`card`,data:null,stylePrefix:`calculator`,dataAttributePrefix:`calc`},t),this.data=s,this.fields=i.map(function(e){return new dt(x(x({},e),{},{prefix:n.options.dataAttributePrefix}))})}return l(e,[{key:`addField`,value:function(e){this.fields.push(new dt(x(x({},e),{},{prefix:this.options.dataAttributePrefix})))}},{key:`addSection`,value:function(e){var t,n=((t=this.options.sectionsOptions)==null?[]:t).concat([e]);this.options.sectionsOptions=n}},{key:`sortSections`,value:function(e){var t=[],n=new Set,r=function(i){var a;if(!n.has(i)){n.add(i);var o=e.find(function(e){return e.type===i});if(o){var s=u((a=o.dependsOn)==null?[]:a),c;try{for(s.s();!(c=s.n()).done;){var l=c.value;r(l)}}catch(e){s.e(e)}finally{s.f()}t.push(o)}}},i=u(e),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;r(o.type)}}catch(e){i.e(e)}finally{i.f()}return t}},{key:`buildInitialSections`,value:function(){var e,t=this.options.initialValues,n=t===void 0?{}:t,r=(e=this.options.sectionsOptions)==null?[]:e,i={},a=u(r),o;try{var s=function(){var e=o.value,t=tt(e,i),r=t.find(function(t){return t.value===n[e.type]&&!t.disabled});if(r)i[e.type]=r.value;else{var a=t.find(function(e){return!e.disabled});a&&(i[e.type]=a.value)}};for(a.s();!(o=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}return{resolvedSections:nt(r,i),values:i}}},{key:`processFields`,value:function(e){var t=this;this.fields.forEach(function(n){try{var r=n.options.calculateFunction(e,t.data);if(r===null)return;t.saveValue(n.selector,r),n.changeValue(r==null?`--`:r)}catch(e){console.warn(e)}}),this.values=e}},{key:`render`,value:function(e){var t=this;if(this.node=e,this.data){this.options.sectionsOptions&&(this.options.sectionsOptions=this.sortSections(this.options.sectionsOptions));var n=this.buildInitialSections(),r=n.resolvedSections,i=n.values;this.values=i;var a=this.options,o=a.parentSelector,s=a.stylePrefix,c=a.prefix,l=a.dataAttributePrefix,u=a.id,d=a.sectionsOptions;st(e,{sections:d===void 0?[]:d,initialSections:r,initialValues:i,dataAttributePrefix:l,stylePrefix:s,prefix:c,id:u,onValuesChange:function(e){return t.processFields(e)}});var f=o?document.querySelector(o):null;f&&this.fields.forEach(function(e){return e.getNode({prefix:l,parentNode:f})}),this.processFields(i)}}},{key:`getValues`,value:function(){return this.values}},{key:`saveValue`,value:function(e,t){this.savedValues[e]=t}},{key:`getValue`,value:function(e){return this.savedValues[e]}},{key:`refresh`,value:function(){this.node&&(ct(this.node),this.values={},this.render(this.node))}}])}();lt=ft,lt.fieldTypes=ut,lt.animatedNodeTypes=q;var pt=function(){function e(){o(this,e)}return l(e,[{key:`add`,value:function(e,t,n){if(typeof arguments[0]!=`string`)for(var r in arguments[0])this.add(r,arguments[0][r],arguments[1]);else (Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][n?`unshift`:`push`](t)},this)}},{key:`run`,value:function(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}}])}(),mt=function(){function e(t){o(this,e),this.jsep=t,this.registered={}}return l(e,[{key:`register`,value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){if(D(t)!==`object`||!t.name||!t.init)throw Error(`Invalid JSEP plugin format`);e.registered[t.name]||(t.init(e.jsep),e.registered[t.name]=t)})}}])}(),J=function(){function e(t){o(this,e),this.expr=t,this.index=0}return l(e,[{key:`char`,get:function(){return this.expr.charAt(this.index)}},{key:`code`,get:function(){return this.expr.charCodeAt(this.index)}},{key:`throwError`,value:function(e){var t=Error(e+` at character `+this.index);throw t.index=this.index,t.description=e,t}},{key:`runHook`,value:function(t,n){if(e.hooks[t]){var r={context:this,node:n};return e.hooks.run(t,r),r.node}return n}},{key:`searchHook`,value:function(t){if(e.hooks[t]){var n={context:this};return e.hooks[t].find(function(e){return e.call(n.context,n),n.node}),n.node}}},{key:`gobbleSpaces`,value:function(){for(var t=this.code;t===e.SPACE_CODE||t===e.TAB_CODE||t===e.LF_CODE||t===e.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook(`gobble-spaces`)}},{key:`parse`,value:function(){this.runHook(`before-all`);var t=this.gobbleExpressions(),n=t.length===1?t[0]:{type:e.COMPOUND,body:t};return this.runHook(`after-all`,n)}},{key:`gobbleExpressions`,value:function(t){for(var n=[],r,i;this.index<this.expr.length;)if(r=this.code,r===e.SEMCOL_CODE||r===e.COMMA_CODE)this.index++;else if(i=this.gobbleExpression())n.push(i);else if(this.index<this.expr.length){if(r===t)break;this.throwError(`Unexpected "`+this.char+`"`)}return n}},{key:`gobbleExpression`,value:function(){var e=this.searchHook(`gobble-expression`)||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook(`after-expression`,e)}},{key:`gobbleBinaryOp`,value:function(){this.gobbleSpaces();for(var t=this.expr.substr(this.index,e.max_binop_len),n=t.length;n>0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=n,t;t=t.substr(0,--n)}return!1}},{key:`gobbleBinaryExpression`,value:function(){var t,n,r,i,a,o=this.gobbleToken(),s,c,l;if(!o||(n=this.gobbleBinaryOp(),!n))return o;for(a={value:n,prec:e.binaryPrecedence(n),right_a:e.right_associative.has(n)},s=this.gobbleToken(),s||this.throwError(`Expected expression after `+n),i=[o,a,s];n=this.gobbleBinaryOp();){if(r=e.binaryPrecedence(n),r===0){this.index-=n.length;break}a={value:n,prec:r,right_a:e.right_associative.has(n)},l=n;for(var u=function(e){return a.right_a&&e.right_a?r>e.prec:r<=e.prec};i.length>2&&u(i[i.length-2]);)s=i.pop(),n=i.pop().value,o=i.pop(),t={type:e.BINARY_EXP,operator:n,left:o,right:s},i.push(t);t=this.gobbleToken(),t||this.throwError(`Expected expression after `+l),i.push(a,t)}for(c=i.length-1,t=i[c];c>1;)t={type:e.BINARY_EXP,operator:i[c-1].value,left:i[c-2],right:t},c-=2;return t}},{key:`gobbleToken`,value:function(){var t,n,r,i;if(this.gobbleSpaces(),i=this.searchHook(`gobble-token`),i)return this.runHook(`after-token`,i);if(t=this.code,e.isDecimalDigit(t)||t===e.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===e.SQUOTE_CODE||t===e.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(t===e.OBRACK_CODE)i=this.gobbleArray();else{for(n=this.expr.substr(this.index,e.max_unop_len),r=n.length;r>0;){if(e.unary_ops.hasOwnProperty(n)&&(!e.isIdentifierStart(this.code)||this.index+n.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+n.length)))){this.index+=r;var a=this.gobbleToken();return a||this.throwError(`missing unaryOp argument`),this.runHook(`after-token`,{type:e.UNARY_EXP,operator:n,argument:a,prefix:!0})}n=n.substr(0,--r)}e.isIdentifierStart(t)?(i=this.gobbleIdentifier(),e.literals.hasOwnProperty(i.name)?i={type:e.LITERAL,value:e.literals[i.name],raw:i.name}:i.name===e.this_str&&(i={type:e.THIS_EXP})):t===e.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook(`after-token`,i)):this.runHook(`after-token`,!1)}},{key:`gobbleTokenProperty`,value:function(t){this.gobbleSpaces();for(var n=this.code;n===e.PERIOD_CODE||n===e.OBRACK_CODE||n===e.OPAREN_CODE||n===e.QUMARK_CODE;){var r=void 0;if(n===e.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==e.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),n=this.code}this.index++,n===e.OBRACK_CODE?(t={type:e.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError(`Unexpected "`+this.char+`"`),this.gobbleSpaces(),n=this.code,n!==e.CBRACK_CODE&&this.throwError(`Unclosed [`),this.index++):n===e.OPAREN_CODE?t={type:e.CALL_EXP,arguments:this.gobbleArguments(e.CPAREN_CODE),callee:t}:(n===e.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),t={type:e.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),r&&(t.optional=!0),this.gobbleSpaces(),n=this.code}return t}},{key:`gobbleNumericLiteral`,value:function(){for(var t=``,n,r;e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===e.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(n=this.char,n===`e`||n===`E`){for(t+=this.expr.charAt(this.index++),n=this.char,(n===`+`||n===`-`)&&(t+=this.expr.charAt(this.index++));e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError(`Expected exponent (`+t+this.char+`)`)}return r=this.code,e.isIdentifierStart(r)?this.throwError(`Variable names cannot start with a number (`+t+this.char+`)`):(r===e.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===e.PERIOD_CODE)&&this.throwError(`Unexpected period`),{type:e.LITERAL,value:parseFloat(t),raw:t}}},{key:`gobbleStringLiteral`,value:function(){for(var t=``,n=this.index,r=this.expr.charAt(this.index++),i=!1;this.index<this.expr.length;){var a=this.expr.charAt(this.index++);if(a===r){i=!0;break}else if(a===`\\`)switch(a=this.expr.charAt(this.index++),a){case`n`:t+=`
4
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?b(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function S(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return i(e)}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}function w(e,t){return n(e)||_(e,t)||te(e,t)||v()}function T(e){return r(e)||g(e)||te(e)||y()}function ee(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function E(e){var t=ee(e,`string`);return typeof t==`symbol`?t:t+``}function D(e){"@babel/helpers - typeof";return D=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},D(e)}function te(e,n){if(e){if(typeof e==`string`)return t(e,n);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}function O(t){var n,r;function i(n,r){try{var o=t[n](r),s=o.value,c=s instanceof e;Promise.resolve(c?s.v:s).then(function(e){if(c){var r=n===`return`&&s.k?n:`next`;if(!s.k||e.done)return i(r,e);e=t[r](e).value}a(!!o.done,e)},function(e){i(`throw`,e)})}catch(e){a(2,e)}}function a(e,t){e===2?n.reject(t):n.resolve({value:t,done:e}),(n=n.next)?i(n.key,n.arg):r=null}this._invoke=function(e,t){return new Promise(function(a,o){var s={key:e,arg:t,resolve:a,reject:o,next:null};r?r=r.next=s:(n=r=s,i(e,t))})},typeof t.return!=`function`&&(this.return=void 0)}O.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},O.prototype.next=function(e){return this._invoke(`next`,e)},O.prototype.throw=function(e){return this._invoke(`throw`,e)},O.prototype.return=function(e){return this._invoke(`return`,e)};function ne(e){var t=typeof Map==`function`?new Map:void 0;return ne=function(e){if(e===null||!m(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return s(e,arguments,f(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),C(n,e)},ne(e)}var k,A,re,j,ie,ae,oe,se,M,N,ce,le,ue,de,P={},F=[],fe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,I=Array.isArray;function L(e,t){for(var n in t)e[n]=t[n];return e}function pe(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function me(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?k.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return R(e,o,r,i,null)}function R(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++re:i,__i:-1,__u:0};return i==null&&A.vnode!=null&&A.vnode(a),a}function z(e){return e.children}function B(e,t){this.props=e,this.context=t}function V(e,t){if(t==null)return e.__?V(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?V(e):null}function he(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],i=[],a=L({},t);a.__v=t.__v+1,A.vnode&&A.vnode(a),we(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n==null?V(t):n,!!(32&t.__u),i),a.__v=t.__v,a.__.__k[a.__i]=a,Ee(r,a,i),t.__e=t.__=null,a.__e!=n&&ge(a)}}function ge(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),ge(e)}function _e(e){(!e.__d&&(e.__d=!0)&&j.push(e)&&!H.__r++||ie!=A.debounceRendering)&&((ie=A.debounceRendering)||ae)(H)}function H(){try{for(var e,t=1;j.length;)j.length>t&&j.sort(oe),e=j.shift(),t=j.length,he(e)}finally{j.length=H.__r=0}}function ve(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v=r&&r.__k||F,y=t.length;for(c=ye(n,t,v,c,y),d=0;d<y;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&v[p.__i]||P,p.__i=d,g=we(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&ke(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),(_=!!(4&p.__u))||f.__k===p.__k?(c=be(p,c,e,_),_&&f.__e&&(f.__e=null)):typeof p.type==`function`&&g!==void 0?c=g:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=h,c}function ye(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=R(null,o,null,null,null):I(o)?o=e.__k[a]=R(z,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=R(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=xe(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=V(s)),Ae(s,s));return r}function be(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=be(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=V(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function xe(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function Se(e,t,n){t[0]==`-`?e.setProperty(t,n==null?``:n):e[t]=n==null?``:typeof n!=`number`||fe.test(t)?n:n+`px`}function U(e,t,n,r,i){var a,o;n:if(t==`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||Se(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||Se(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(ce,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n[N]=r[N]:(n[N]=le,e.addEventListener(t,a?de:ue,a)):e.removeEventListener(t,a?de:ue,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n==null?``:n;break n}catch(e){}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function Ce(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[M]==null)t[M]=le++;else if(t[M]<n[N])return;return n(A.event?A.event(t):t)}}}function we(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(u=A.__b)&&u(t);n:if(typeof T==`function`)try{if(_=t.props,v=T.prototype&&T.prototype.render,y=(u=T.contextType)&&r[u.__c],b=u?y?y.props.value:u.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:(v?t.__c=d=new T(_,b):(t.__c=d=new B(_,b),d.constructor=T,d.render=je),y&&y.sub(d),d.state||(d.state={}),d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),v&&d.__s==null&&(d.__s=d.state),v&&T.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=L({},d.__s)),L(d.__s,T.getDerivedStateFromProps(_,d.__s))),p=d.props,m=d.state,d.__v=t,f)v&&T.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),v&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(v&&T.getDerivedStateFromProps==null&&_!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(_,b),t.__v==n.__v||!d.__e&&d.shouldComponentUpdate!=null&&!1===d.shouldComponentUpdate(_,d.__s,b)){t.__v!=n.__v&&(d.props=_,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),F.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&o.push(d);break n}d.componentWillUpdate!=null&&d.componentWillUpdate(_,d.__s,b),v&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,m,h)})}if(d.context=b,d.props=_,d.__P=e,d.__e=!1,x=A.__r,S=0,v)d.state=d.__s,d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),F.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++S<25);d.state=d.__s,d.getChildContext!=null&&(r=L(L({},r),d.getChildContext())),v&&!f&&d.getSnapshotBeforeUpdate!=null&&(h=d.getSnapshotBeforeUpdate(p,m)),C=u!=null&&u.type===z&&u.key==null?De(u.props.children):u,s=ve(e,I(C)?C:[C],t,n,r,i,a,o,s,c,l),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),g&&(d.__E=d.__=null)}catch(e){if(t.__v=null,c||a!=null)if(e.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s}else{for(w=a.length;w--;)pe(a[w]);Te(t)}else t.__e=n.__e,t.__k=n.__k,e.then||Te(t);A.__e(e,t,n)}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=Oe(n.__e,t,n,r,i,a,o,c,l);return(u=A.diffed)&&u(t),128&t.__u?void 0:s}function Te(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Te))}function Ee(e,t,n){for(var r=0;r<n.length;r++)ke(n[r],n[++r],n[++r]);A.__c&&A.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){A.__e(e,t.__v)}})}function De(e){return D(e)!=`object`||e==null||e.__b>0?e:I(e)?e.map(De):L({},e)}function Oe(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g=n.props||P,_=t.props,v=t.type;if(v==`svg`?i=`http://www.w3.org/2000/svg`:v==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||(i=`http://www.w3.org/1999/xhtml`),a!=null){for(l=0;l<a.length;l++)if((p=a[l])&&`setAttribute`in p==!!v&&(v?p.localName==v:p.nodeType==3)){e=p,a[l]=null;break}}if(e==null){if(v==null)return document.createTextNode(_);e=document.createElementNS(i,v,_.is&&_),s&&(A.__m&&A.__m(t,a),s=!1),a=null}if(v==null)g===_||s&&e.data==_||(e.data=_);else{if(a=a&&k.call(e.childNodes),!s&&a!=null)for(g={},l=0;l<e.attributes.length;l++)g[(p=e.attributes[l]).name]=p.value;for(l in g)p=g[l],l==`dangerouslySetInnerHTML`?d=p:l==`children`||l in _||l==`value`&&`defaultValue`in _||l==`checked`&&`defaultChecked`in _||U(e,l,null,p,i);for(l in _)p=_[l],l==`children`?f=p:l==`dangerouslySetInnerHTML`?u=p:l==`value`?m=p:l==`checked`?h=p:s&&typeof p!=`function`||g[l]===p||U(e,l,p,g[l],i);if(u)s||d&&(u.__html==d.__html||u.__html==e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=``),ve(t.type==`template`?e.content:e,I(f)?f:[f],t,n,r,v==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&V(n,0),s,c),a!=null)for(l=a.length;l--;)pe(a[l]);s||(l=`value`,v==`progress`&&m==null?e.removeAttribute(`value`):m!=null&&(m!==e[l]||v==`progress`&&!m||v==`option`&&m!=g[l])&&U(e,l,m,g[l],i),l=`checked`,h!=null&&h!=e[l]&&U(e,l,h,g[l],i))}return e}function ke(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){A.__e(e,n)}}function Ae(e,t,n){var r,i;if(A.unmount&&A.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||ke(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){A.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Ae(r[i],t,n||typeof e.type!=`function`);n||pe(e.__e),e.__c=e.__=e.__e=void 0}function je(e,t,n){return this.constructor(e,n)}function Me(e,t,n){var r,i,a,o;t==document&&(t=document.documentElement),A.__&&A.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],o=[],we(t,e=(!r&&n||t).__k=me(z,null,[e]),i||P,P,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?k.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,o),Ee(a,e,o)}k=F.slice,A={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},re=0,B.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=L({},this.state);typeof e==`function`&&(e=e(L({},n),this.props)),e&&L(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),_e(this))},B.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_e(this))},B.prototype.render=z,j=[],ae=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,oe=function(e,t){return e.__v.__b-t.__v.__b},H.__r=0,se=Math.random().toString(8),M=`__d`+se,N=`__a`+se,ce=/(PointerCapture)$|Capture$/i,le=0,ue=Ce(!1),de=Ce(!0);var Ne,W,Pe,Fe,Ie=0,Le=[],G=A,Re=G.__b,ze=G.__r,Be=G.diffed,Ve=G.__c,He=G.unmount,Ue=G.__;function We(e,t){G.__h&&G.__h(W,e,Ie||t),Ie=0;var n=W.__H||(W.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Ge(e){return Ie=1,Ke(Qe,e)}function Ke(e,t,n){var r=We(Ne++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Qe(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=W,!W.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a&&a.call(this,e,t,n)||o};W.__f=!0;var a=W.shouldComponentUpdate,o=W.componentWillUpdate;W.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},W.shouldComponentUpdate=i}return r.__N||r.__}function qe(){for(var e;e=Le.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Xe),t.__h.some(Ze),t.__h=[]}catch(n){t.__h=[],G.__e(n,e.__v)}}}G.__b=function(e){W=null,Re&&Re(e)},G.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ue&&Ue(e,t)},G.__r=function(e){ze&&ze(e),Ne=0;var t=(W=e.__c).__H;t&&(Pe===W?(t.__h=[],W.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(Xe),t.__h.some(Ze),t.__h=[],Ne=0)),Pe=W},G.diffed=function(e){Be&&Be(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Le.push(t)!==1&&Fe===G.requestAnimationFrame||((Fe=G.requestAnimationFrame)||Ye)(qe)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),Pe=W=null},G.__c=function(e,t){t.some(function(e){try{e.__h.some(Xe),e.__h=e.__h.filter(function(e){return!e.__||Ze(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],G.__e(n,e.__v)}}),Ve&&Ve(e,t)},G.unmount=function(e){He&&He(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{Xe(e)}catch(e){t=e}}),n.__H=void 0,t&&G.__e(t,n.__v))};var Je=typeof requestAnimationFrame==`function`;function Ye(e){var t,n=function(){clearTimeout(r),Je&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Je&&(t=requestAnimationFrame(n))}function Xe(e){var t=W,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),W=t}function Ze(e){var t=W;e.__c=e.__(),W=t}function Qe(e,t){return typeof t==`function`?t(e):t}var $e=0;Array.isArray;function K(e,t,n,r,i,a){t||(t={});var o,s,c=t;if(`ref`in c)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--$e,__i:-1,__u:0,__source:i,__self:a};if(typeof e==`function`&&(o=e.defaultProps))for(s in o)c[s]===void 0&&(c[s]=o[s]);return A.vnode&&A.vnode(l),l}function et(e,t,n){var r,i,a,o,s=n.find(function(e){return!e.disabled}),c=(r=(i=s==null?void 0:s.value)==null?(a=n[0])==null?void 0:a.value:i)==null?``:r,l=(o=t[e])==null?c:o;return n.find(function(e){return e.value===l&&!e.disabled})?l:c}var tt=function(e,t){return typeof e.inputs==`function`?e.inputs(t):e.inputs};function nt(e,t){return e.map(function(e){var n=tt(e,t);return{options:e,inputs:n,checkedValue:et(e.type,t,n)}})}function rt(e,t,n,r){var i=x(x({},t),{},d({},n,r)),a=u(e),o;try{var s=function(){var e,n=o.value;if(!((e=n.dependsOn)!=null&&e.length)||!n.dependsOn.some(function(e){return i[e]!==t[e]}))return 0;var r=tt(n,i),a=t[n.type];if(!r.find(function(e){return e.value===a&&!e.disabled})){var s=r.find(function(e){return!e.disabled});if(s)i=x(x({},i),{},d({},n.type,s.value));else{var c=x({},i);delete c[n.type],i=c}}};for(a.s();!(o=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}var c=nt(e,i);return{values:i,resolvedSections:c}}var it=function(e){return function(t){return`${e}__${t}`}};function at(e){var t=e.options,n=e.inputs,r=e.checkedValue,i=e.stylePrefix,a=e.dataAttributePrefix,o=e.prefix,s=e.id,c=t.title,l=c===void 0?``:c,u=t.type,f=t.className,p=f===void 0?``:f,m=t.checked,h=m===void 0?!0:m,g=t.inputType,_=g===void 0?`radio`:g,v=it(i);return n.length?K(`div`,d(d({class:v(`section`)},`data-${a}-section-type`,u),`children`,[l&&K(`div`,{class:v(`section-title`),children:[l,`:`]}),K(`div`,{class:v(`section-row`),children:n.map(function(e,t){return K(`div`,{class:v(`section-col ${p}`),children:[K(`input`,{checked:h?r===e.value:!1,name:`${o}-${s}-${u}`,id:`${o}-${s}-${u}-${t}`,type:_,value:e.value,disabled:e.disabled}),K(`label`,{for:`${o}-${s}-${u}-${t}`,dangerouslySetInnerHTML:{__html:e.label},"data-value":e.value,style:{"--option-value":e.value}})]},e.value)})})])):null}function ot(e){var t=e.sections,n=e.initialSections,r=e.initialValues,i=e.stylePrefix,a=e.dataAttributePrefix,o=e.prefix,s=e.id,c=e.onValuesChange,l=w(Ge(n),2),u=l[0],d=l[1],f=w(Ge(r),2),p=f[0],m=f[1];return K(`form`,{action:`/`,class:i,onChange:function(e){var n=e.target;if(n.tagName===`INPUT`){var r=n.name.split(`-`),i=r[r.length-1],a=rt(t,p,i,n.value);d(a.resolvedSections),m(a.values),c(a.values)}},children:u.map(function(e){var t=e.options,n=e.inputs,r=e.checkedValue;return K(at,{options:t,inputs:n,checkedValue:r,stylePrefix:i,dataAttributePrefix:a,prefix:o,id:s},t.type)})})}function st(e,t){Me(K(ot,x({},t)),e)}function ct(e){Me(null,e)}var lt;(function(){var e=Number;e.isNaN||(e.isNaN=function(e){return typeof e==`number`&&isNaN(e)}),Array.prototype.find||(Array.prototype.find=function(e,t){if(this==null)throw TypeError(`Array.prototype.find called on null or undefined`);if(typeof e!=`function`)throw TypeError(`predicate must be a function`);for(var n=Object(this),r=n.length>>>0,i=0;i<r;i++){var a=n[i];if(e.call(t,a,i,n))return a}})})();var ut={DATA_ATTRIBUTE:`data`,CUSTOM:`custom`,DEFAULT:`default`},q={PARENT:`parent`,SELF:`self`,CLOSEST:`closest`},dt=function(){function e(t){o(this,e),this.nodes=[],this.animationIds=[],this.prevValue=void 0;var n=t.selector;this.selector=n,this.options=x({animated:!1,duration:800,dots:0,dataKey:n,calculateFunction:function(){return null},attribute:!1,animation:[`animate__faster`,`animate__pulse`],animatedNode:q.PARENT,animatedNodeSelector:``},t)}return l(e,[{key:`getNode`,value:function(e){var t=e.prefix,n=e.parentNode,r=e.type;if((r===void 0?ut.DEFAULT:r)===ut.CUSTOM)this.nodes=Array.from(n.querySelectorAll(this.options.selector));else{var i=`data-${t}`;this.nodes=Array.from(n.querySelectorAll(`[${i}="${this.options.selector}"]`)),n.getAttribute(i)===this.options.selector&&this.nodes.push(n)}return this.nodes}},{key:`changeValue`,value:function(e){var t=this;if(this.nodes.length){var n=this.options,r=n.prefix,i=n.selector;this.animateBlock(e),this.nodes.forEach(function(n,a){var o=n.dataset.calcAttribute,s=t.options.attribute,c=!t.options.attribute,l=n.getAttribute(`data-${r}-${i}-target`);if(l){var u=w(l.split(`:`),2),d=u[0];o=u[1],s=d===`full`||d===`attr`,c=d===`full`}if(s&&o&&n.setAttribute(o,String(e)),c){var f=Number(e);if(Number.isNaN(f)){n.innerHTML=String(e);return}t.animateNumber(f,n,a)}}),this.prevValue=e}}},{key:`animateBlock`,value:function(e){if(e!==this.prevValue){var t=this.options,n=t.animated,r=t.animation,i=t.animatedNode,a=t.animatedNodeSelector;n&&this.nodes.forEach(function(e){var t,n=null;switch(i){case q.SELF:n=e;break;case q.PARENT:n=e.parentNode;break;case q.CLOSEST:n=(t=e.closest(a))==null?null:t;break}if(n){var o,s=[`animate__animated`].concat(T(r)),c=function(){var e;(e=n.classList).remove.apply(e,T(s))};(o=n.classList).add.apply(o,T(s)),n.addEventListener(`webkitAnimationEnd`,c),n.addEventListener(`mozAnimationEnd`,c),n.addEventListener(`MSAnimationEnd`,c),n.addEventListener(`oanimationend`,c),n.addEventListener(`animationend`,c)}})}}},{key:`animateNumber`,value:function(e,t,n){var r,i=this,a=this.options,o=a.duration,s=o===void 0?800:o,c=a.dots,l=c===void 0?0:c;window.cancelAnimationFrame((r=this.animationIds[n])==null?0:r);var u=Number(t.textContent);u=Number.isNaN(u)?0:u;var d=e-u,f=d>0,p=null,m=function(r){p===null&&(p=r);var a=r-p;t.textContent=h(a).toFixed(l),a<s?i.animationIds[n]=window.requestAnimationFrame(m):(t.textContent=e.toFixed(g(e)),window.cancelAnimationFrame(i.animationIds[n]))};function h(t){var n=u+t*d/s;if(f){if(n>e)return e}else if(n<e)return e;return n}function g(e){var t=String(e);return t.includes(`.`)?t.length-1>l?l:t.length-1:0}this.animationIds[n]=window.requestAnimationFrame(m)}}])}(),ft=function(){function e(t){var n=this;o(this,e),this.savedValues={},this.values={},this.node=null;var r=t.editableFields,i=r===void 0?[]:r,a=t.data,s=a===void 0?null:a;this.options=x({editableFields:[],prefix:`card`,data:null,stylePrefix:`calculator`,dataAttributePrefix:`calc`},t),this.data=s,this.fields=i.map(function(e){return new dt(x(x({},e),{},{prefix:n.options.dataAttributePrefix}))})}return l(e,[{key:`addField`,value:function(e){this.fields.push(new dt(x(x({},e),{},{prefix:this.options.dataAttributePrefix})))}},{key:`addSection`,value:function(e){var t,n=((t=this.options.sectionsOptions)==null?[]:t).concat([e]);this.options.sectionsOptions=n}},{key:`sortSections`,value:function(e){var t=[],n=new Set,r=function(i){var a;if(!n.has(i)){n.add(i);var o=e.find(function(e){return e.type===i});if(o){var s=u((a=o.dependsOn)==null?[]:a),c;try{for(s.s();!(c=s.n()).done;){var l=c.value;r(l)}}catch(e){s.e(e)}finally{s.f()}t.push(o)}}},i=u(e),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;r(o.type)}}catch(e){i.e(e)}finally{i.f()}return t}},{key:`buildInitialSections`,value:function(){var e,t=this.options.initialValues,n=t===void 0?{}:t,r=(e=this.options.sectionsOptions)==null?[]:e,i={},a=u(r),o;try{var s=function(){var e=o.value,t=tt(e,i),r=t.find(function(t){return t.value===n[e.type]&&!t.disabled});if(r)i[e.type]=r.value;else{var a=t.find(function(e){return!e.disabled});a&&(i[e.type]=a.value)}};for(a.s();!(o=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}return{resolvedSections:nt(r,i),values:i}}},{key:`processFields`,value:function(e){var t=this;this.fields.forEach(function(n){try{var r=n.options.calculateFunction(e,t.data);if(r===null)return;t.saveValue(n.selector,r),n.changeValue(r==null?`--`:r)}catch(e){console.warn(e)}}),this.values=e}},{key:`render`,value:function(e){var t=this;if(this.node=e,this.data){this.options.sectionsOptions&&(this.options.sectionsOptions=this.sortSections(this.options.sectionsOptions));var n=this.buildInitialSections(),r=n.resolvedSections,i=n.values;this.values=i;var a=this.options,o=a.parentSelector,s=a.stylePrefix,c=a.prefix,l=a.dataAttributePrefix,u=a.id,d=a.sectionsOptions;st(e,{sections:d===void 0?[]:d,initialSections:r,initialValues:i,dataAttributePrefix:l,stylePrefix:s,prefix:c,id:u,onValuesChange:function(e){return t.processFields(e)}});var f=o?document.querySelector(o):null;f&&this.fields.forEach(function(e){return e.getNode({prefix:l,parentNode:f})}),this.processFields(i)}}},{key:`getValues`,value:function(){return this.values}},{key:`saveValue`,value:function(e,t){this.savedValues[e]=t}},{key:`getValue`,value:function(e){return this.savedValues[e]}},{key:`refresh`,value:function(){this.node&&(ct(this.node),this.values={},this.render(this.node))}}])}();lt=ft,lt.fieldTypes=ut,lt.animatedNodeTypes=q;var pt=function(){function e(){o(this,e)}return l(e,[{key:`add`,value:function(e,t,n){if(typeof arguments[0]!=`string`)for(var r in arguments[0])this.add(r,arguments[0][r],arguments[1]);else (Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][n?`unshift`:`push`](t)},this)}},{key:`run`,value:function(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}}])}(),mt=function(){function e(t){o(this,e),this.jsep=t,this.registered={}}return l(e,[{key:`register`,value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){if(D(t)!==`object`||!t.name||!t.init)throw Error(`Invalid JSEP plugin format`);e.registered[t.name]||(t.init(e.jsep),e.registered[t.name]=t)})}}])}(),J=function(){function e(t){o(this,e),this.expr=t,this.index=0}return l(e,[{key:`char`,get:function(){return this.expr.charAt(this.index)}},{key:`code`,get:function(){return this.expr.charCodeAt(this.index)}},{key:`throwError`,value:function(e){var t=Error(e+` at character `+this.index);throw t.index=this.index,t.description=e,t}},{key:`runHook`,value:function(t,n){if(e.hooks[t]){var r={context:this,node:n};return e.hooks.run(t,r),r.node}return n}},{key:`searchHook`,value:function(t){if(e.hooks[t]){var n={context:this};return e.hooks[t].find(function(e){return e.call(n.context,n),n.node}),n.node}}},{key:`gobbleSpaces`,value:function(){for(var t=this.code;t===e.SPACE_CODE||t===e.TAB_CODE||t===e.LF_CODE||t===e.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook(`gobble-spaces`)}},{key:`parse`,value:function(){this.runHook(`before-all`);var t=this.gobbleExpressions(),n=t.length===1?t[0]:{type:e.COMPOUND,body:t};return this.runHook(`after-all`,n)}},{key:`gobbleExpressions`,value:function(t){for(var n=[],r,i;this.index<this.expr.length;)if(r=this.code,r===e.SEMCOL_CODE||r===e.COMMA_CODE)this.index++;else if(i=this.gobbleExpression())n.push(i);else if(this.index<this.expr.length){if(r===t)break;this.throwError(`Unexpected "`+this.char+`"`)}return n}},{key:`gobbleExpression`,value:function(){var e=this.searchHook(`gobble-expression`)||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook(`after-expression`,e)}},{key:`gobbleBinaryOp`,value:function(){this.gobbleSpaces();for(var t=this.expr.substr(this.index,e.max_binop_len),n=t.length;n>0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=n,t;t=t.substr(0,--n)}return!1}},{key:`gobbleBinaryExpression`,value:function(){var t,n,r,i,a,o=this.gobbleToken(),s,c,l;if(!o||(n=this.gobbleBinaryOp(),!n))return o;for(a={value:n,prec:e.binaryPrecedence(n),right_a:e.right_associative.has(n)},s=this.gobbleToken(),s||this.throwError(`Expected expression after `+n),i=[o,a,s];n=this.gobbleBinaryOp();){if(r=e.binaryPrecedence(n),r===0){this.index-=n.length;break}a={value:n,prec:r,right_a:e.right_associative.has(n)},l=n;for(var u=function(e){return a.right_a&&e.right_a?r>e.prec:r<=e.prec};i.length>2&&u(i[i.length-2]);)s=i.pop(),n=i.pop().value,o=i.pop(),t={type:e.BINARY_EXP,operator:n,left:o,right:s},i.push(t);t=this.gobbleToken(),t||this.throwError(`Expected expression after `+l),i.push(a,t)}for(c=i.length-1,t=i[c];c>1;)t={type:e.BINARY_EXP,operator:i[c-1].value,left:i[c-2],right:t},c-=2;return t}},{key:`gobbleToken`,value:function(){var t,n,r,i;if(this.gobbleSpaces(),i=this.searchHook(`gobble-token`),i)return this.runHook(`after-token`,i);if(t=this.code,e.isDecimalDigit(t)||t===e.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===e.SQUOTE_CODE||t===e.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(t===e.OBRACK_CODE)i=this.gobbleArray();else{for(n=this.expr.substr(this.index,e.max_unop_len),r=n.length;r>0;){if(e.unary_ops.hasOwnProperty(n)&&(!e.isIdentifierStart(this.code)||this.index+n.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+n.length)))){this.index+=r;var a=this.gobbleToken();return a||this.throwError(`missing unaryOp argument`),this.runHook(`after-token`,{type:e.UNARY_EXP,operator:n,argument:a,prefix:!0})}n=n.substr(0,--r)}e.isIdentifierStart(t)?(i=this.gobbleIdentifier(),e.literals.hasOwnProperty(i.name)?i={type:e.LITERAL,value:e.literals[i.name],raw:i.name}:i.name===e.this_str&&(i={type:e.THIS_EXP})):t===e.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook(`after-token`,i)):this.runHook(`after-token`,!1)}},{key:`gobbleTokenProperty`,value:function(t){this.gobbleSpaces();for(var n=this.code;n===e.PERIOD_CODE||n===e.OBRACK_CODE||n===e.OPAREN_CODE||n===e.QUMARK_CODE;){var r=void 0;if(n===e.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==e.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),n=this.code}this.index++,n===e.OBRACK_CODE?(t={type:e.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError(`Unexpected "`+this.char+`"`),this.gobbleSpaces(),n=this.code,n!==e.CBRACK_CODE&&this.throwError(`Unclosed [`),this.index++):n===e.OPAREN_CODE?t={type:e.CALL_EXP,arguments:this.gobbleArguments(e.CPAREN_CODE),callee:t}:(n===e.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),t={type:e.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),r&&(t.optional=!0),this.gobbleSpaces(),n=this.code}return t}},{key:`gobbleNumericLiteral`,value:function(){for(var t=``,n,r;e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===e.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(n=this.char,n===`e`||n===`E`){for(t+=this.expr.charAt(this.index++),n=this.char,(n===`+`||n===`-`)&&(t+=this.expr.charAt(this.index++));e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError(`Expected exponent (`+t+this.char+`)`)}return r=this.code,e.isIdentifierStart(r)?this.throwError(`Variable names cannot start with a number (`+t+this.char+`)`):(r===e.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===e.PERIOD_CODE)&&this.throwError(`Unexpected period`),{type:e.LITERAL,value:parseFloat(t),raw:t}}},{key:`gobbleStringLiteral`,value:function(){for(var t=``,n=this.index,r=this.expr.charAt(this.index++),i=!1;this.index<this.expr.length;){var a=this.expr.charAt(this.index++);if(a===r){i=!0;break}else if(a===`\\`)switch(a=this.expr.charAt(this.index++),a){case`n`:t+=`
5
5
  `;break;case`r`:t+=`\r`;break;case`t`:t+=` `;break;case`b`:t+=`\b`;break;case`f`:t+=`\f`;break;case`v`:t+=`\v`;break;default:t+=a}else t+=a}return i||this.throwError(`Unclosed quote after "`+t+`"`),{type:e.LITERAL,value:t,raw:this.expr.substring(n,this.index)}}},{key:`gobbleIdentifier`,value:function(){var t=this.code,n=this.index;for(e.isIdentifierStart(t)?this.index++:this.throwError(`Unexpected `+this.char);this.index<this.expr.length&&(t=this.code,e.isIdentifierPart(t));)this.index++;return{type:e.IDENTIFIER,name:this.expr.slice(n,this.index)}}},{key:`gobbleArguments`,value:function(t){for(var n=[],r=!1,i=0;this.index<this.expr.length;){this.gobbleSpaces();var a=this.code;if(a===t){r=!0,this.index++,t===e.CPAREN_CODE&&i&&i>=n.length&&this.throwError(`Unexpected token `+String.fromCharCode(t));break}else if(a===e.COMMA_CODE){if(this.index++,i++,i!==n.length){if(t===e.CPAREN_CODE)this.throwError(`Unexpected token ,`);else if(t===e.CBRACK_CODE)for(var o=n.length;o<i;o++)n.push(null)}}else if(n.length!==i&&i!==0)this.throwError(`Expected comma`);else{var s=this.gobbleExpression();(!s||s.type===e.COMPOUND)&&this.throwError(`Expected comma`),n.push(s)}}return r||this.throwError(`Expected `+String.fromCharCode(t)),n}},{key:`gobbleGroup`,value:function(){this.index++;var t=this.gobbleExpressions(e.CPAREN_CODE);if(this.code===e.CPAREN_CODE)return this.index++,t.length===1?t[0]:t.length?{type:e.SEQUENCE_EXP,expressions:t}:!1;this.throwError(`Unclosed (`)}},{key:`gobbleArray`,value:function(){return this.index++,{type:e.ARRAY_EXP,elements:this.gobbleArguments(e.CBRACK_CODE)}}}],[{key:`version`,get:function(){return`1.4.0`}},{key:`toString`,value:function(){return`JavaScript Expression Parser (JSEP) v`+e.version}},{key:`addUnaryOp`,value:function(t){return e.max_unop_len=Math.max(t.length,e.max_unop_len),e.unary_ops[t]=1,e}},{key:`addBinaryOp`,value:function(t,n,r){return e.max_binop_len=Math.max(t.length,e.max_binop_len),e.binary_ops[t]=n,r?e.right_associative.add(t):e.right_associative.delete(t),e}},{key:`addIdentifierChar`,value:function(t){return e.additional_identifier_chars.add(t),e}},{key:`addLiteral`,value:function(t,n){return e.literals[t]=n,e}},{key:`removeUnaryOp`,value:function(t){return delete e.unary_ops[t],t.length===e.max_unop_len&&(e.max_unop_len=e.getMaxKeyLen(e.unary_ops)),e}},{key:`removeAllUnaryOps`,value:function(){return e.unary_ops={},e.max_unop_len=0,e}},{key:`removeIdentifierChar`,value:function(t){return e.additional_identifier_chars.delete(t),e}},{key:`removeBinaryOp`,value:function(t){return delete e.binary_ops[t],t.length===e.max_binop_len&&(e.max_binop_len=e.getMaxKeyLen(e.binary_ops)),e.right_associative.delete(t),e}},{key:`removeAllBinaryOps`,value:function(){return e.binary_ops={},e.max_binop_len=0,e}},{key:`removeLiteral`,value:function(t){return delete e.literals[t],e}},{key:`removeAllLiterals`,value:function(){return e.literals={},e}},{key:`parse`,value:function(t){return new e(t).parse()}},{key:`getMaxKeyLen`,value:function(e){return Math.max.apply(Math,[0].concat(T(Object.keys(e).map(function(e){return e.length}))))}},{key:`isDecimalDigit`,value:function(e){return e>=48&&e<=57}},{key:`binaryPrecedence`,value:function(t){return e.binary_ops[t]||0}},{key:`isIdentifierStart`,value:function(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!e.binary_ops[String.fromCharCode(t)]||e.additional_identifier_chars.has(String.fromCharCode(t))}},{key:`isIdentifierPart`,value:function(t){return e.isIdentifierStart(t)||e.isDecimalDigit(t)}}])}(),ht=new pt;Object.assign(J,{hooks:ht,plugins:new mt(J),COMPOUND:`Compound`,SEQUENCE_EXP:`SequenceExpression`,IDENTIFIER:`Identifier`,MEMBER_EXP:`MemberExpression`,LITERAL:`Literal`,THIS_EXP:`ThisExpression`,CALL_EXP:`CallExpression`,UNARY_EXP:`UnaryExpression`,BINARY_EXP:`BinaryExpression`,ARRAY_EXP:`ArrayExpression`,TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set([`**`]),additional_identifier_chars:new Set([`$`,`_`]),literals:{true:!0,false:!1,null:null},this_str:`this`}),J.max_unop_len=J.getMaxKeyLen(J.unary_ops),J.max_binop_len=J.getMaxKeyLen(J.binary_ops);var Y=function(e){return new J(e).parse()},gt=Object.getOwnPropertyNames(l(function e(){o(this,e)}));Object.getOwnPropertyNames(J).filter(function(e){return!gt.includes(e)&&Y[e]===void 0}).forEach(function(e){Y[e]=J[e]}),Y.Jsep=J;var _t=`ConditionalExpression`;Y.plugins.register({name:`ternary`,init:function(e){e.hooks.add(`after-expression`,function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;var n=t.node,r=this.gobbleExpression();if(r||this.throwError(`Expected expression`),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;var i=this.gobbleExpression();if(i||this.throwError(`Expected expression`),t.node={type:_t,test:n,consequent:r,alternate:i},n.operator&&e.binary_ops[n.operator]<=.9){for(var a=n;a.right.operator&&e.binary_ops[a.right.operator]<=.9;)a=a.right;t.node.test=a.right,a.right=t.node,t.node=n}}else this.throwError(`Expected :`)}})}});var vt=47,yt=92,bt={name:`regex`,init:function(e){e.hooks.add(`gobble-token`,function(t){if(this.code===vt){for(var n=++this.index,r=!1;this.index<this.expr.length;){if(this.code===vt&&!r){for(var i=this.expr.slice(n,this.index),a=``;++this.index<this.expr.length;){var o=this.code;if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57)a+=this.char;else break}var s=void 0;try{s=new RegExp(i,a)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:s,raw:this.expr.slice(n-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?r=!0:r&&this.code===e.CBRACK_CODE&&(r=!1),this.index+=this.code===yt?2:1}this.throwError(`Unclosed Regex`)}})}},xt=43,X={name:`assignment`,assignmentOperators:new Set([`=`,`*=`,`**=`,`/=`,`%=`,`+=`,`-=`,`<<=`,`>>=`,`>>>=`,`&=`,`^=`,`|=`,`||=`,`&&=`,`??=`]),updateOperators:[xt,45],assignmentPrecedence:.9,init:function(e){var t=[e.IDENTIFIER,e.MEMBER_EXP];X.assignmentOperators.forEach(function(t){return e.addBinaryOp(t,X.assignmentPrecedence,!0)}),e.hooks.add(`gobble-token`,function(e){var n=this,r=this.code;X.updateOperators.some(function(e){return e===r&&e===n.expr.charCodeAt(n.index+1)})&&(this.index+=2,e.node={type:`UpdateExpression`,operator:r===xt?`++`:`--`,argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},(!e.node.argument||!t.includes(e.node.argument.type))&&this.throwError(`Unexpected ${e.node.operator}`))}),e.hooks.add(`after-token`,function(e){var n=this;if(e.node){var r=this.code;X.updateOperators.some(function(e){return e===r&&e===n.expr.charCodeAt(n.index+1)})&&(t.includes(e.node.type)||this.throwError(`Unexpected ${e.node.operator}`),this.index+=2,e.node={type:`UpdateExpression`,operator:r===xt?`++`:`--`,argument:e.node,prefix:!1})}}),e.hooks.add(`after-expression`,function(e){e.node&&n(e.node)});function n(e){X.assignmentOperators.has(e.operator)?(e.type=`AssignmentExpression`,n(e.left),n(e.right)):e.operator||Object.values(e).forEach(function(e){e&&D(e)===`object`&&n(e)})}}};Y.plugins.register(bt,X),Y.addUnaryOp(`typeof`),Y.addUnaryOp(`void`),Y.addLiteral(`null`,null),Y.addLiteral(`undefined`,void 0);var St=new Set([`constructor`,`__proto__`,`__defineGetter__`,`__defineSetter__`,`__lookupGetter__`,`__lookupSetter__`]),Z={evalAst:function(e,t){switch(e.type){case`BinaryExpression`:case`LogicalExpression`:return Z.evalBinaryExpression(e,t);case`Compound`:return Z.evalCompound(e,t);case`ConditionalExpression`:return Z.evalConditionalExpression(e,t);case`Identifier`:return Z.evalIdentifier(e,t);case`Literal`:return Z.evalLiteral(e,t);case`MemberExpression`:return Z.evalMemberExpression(e,t);case`UnaryExpression`:return Z.evalUnaryExpression(e,t);case`ArrayExpression`:return Z.evalArrayExpression(e,t);case`CallExpression`:return Z.evalCallExpression(e,t);case`AssignmentExpression`:return Z.evalAssignmentExpression(e,t);default:throw SyntaxError(`Unexpected expression`,e)}},evalBinaryExpression:function(e,t){return{"||":function(e,t){return e||t()},"&&":function(e,t){return e&&t()},"|":function(e,t){return e|t()},"^":function(e,t){return e^t()},"&":function(e,t){return e&t()},"==":function(e,t){return e==t()},"!=":function(e,t){return e!=t()},"===":function(e,t){return e===t()},"!==":function(e,t){return e!==t()},"<":function(e,t){return e<t()},">":function(e,t){return e>t()},"<=":function(e,t){return e<=t()},">=":function(e,t){return e>=t()},"<<":function(e,t){return e<<t()},">>":function(e,t){return e>>t()},">>>":function(e,t){return e>>>t()},"+":function(e,t){return e+t()},"-":function(e,t){return e-t()},"*":function(e,t){return e*t()},"/":function(e,t){return e/t()},"%":function(e,t){return e%t()}}[e.operator](Z.evalAst(e.left,t),function(){return Z.evalAst(e.right,t)})},evalCompound:function(e,t){for(var n,r=0;r<e.body.length;r++){e.body[r].type===`Identifier`&&[`var`,`let`,`const`].includes(e.body[r].name)&&e.body[r+1]&&e.body[r+1].type===`AssignmentExpression`&&(r+=1);var i=e.body[r];n=Z.evalAst(i,t)}return n},evalConditionalExpression:function(e,t){return Z.evalAst(e.test,t)?Z.evalAst(e.consequent,t):Z.evalAst(e.alternate,t)},evalIdentifier:function(e,t){if(Object.hasOwn(t,e.name))return t[e.name];throw ReferenceError(`${e.name} is not defined`)},evalLiteral:function(e){return e.value},evalMemberExpression:function(e,t){var n=String(e.computed?Z.evalAst(e.property):e.property.name),r=Z.evalAst(e.object,t);if(r==null||!Object.hasOwn(r,n)&&St.has(n))throw TypeError(`Cannot read properties of ${r} (reading '${n}')`);var i=r[n];return typeof i==`function`?i.bind(r):i},evalUnaryExpression:function(e,t){return{"-":function(e){return-Z.evalAst(e,t)},"!":function(e){return!Z.evalAst(e,t)},"~":function(e){return~Z.evalAst(e,t)},"+":function(e){return+Z.evalAst(e,t)},typeof:function e(n){return e(Z.evalAst(n,t))},void:function(e){Z.evalAst(e,t)}}[e.operator](e.argument)},evalArrayExpression:function(e,t){return e.elements.map(function(e){return Z.evalAst(e,t)})},evalCallExpression:function(e,t){var n=e.arguments.map(function(e){return Z.evalAst(e,t)}),r=Z.evalAst(e.callee,t);if(r===Function)throw Error(`Function constructor is disabled`);return r.apply(void 0,T(n))},evalAssignmentExpression:function(e,t){if(e.left.type!==`Identifier`)throw SyntaxError(`Invalid left-hand side in assignment`);var n=e.left.name;return t[n]=Z.evalAst(e.right,t),t[n]}},Ct=function(){function e(t){o(this,e),this.code=t,this.ast=Y(this.code)}return l(e,[{key:`runInNewContext`,value:function(e){var t=Object.assign(Object.create(null),e);return Z.evalAst(this.ast,t)}}])}();function Q(e,t){return e=e.slice(),e.push(t),e}function wt(e,t){return t=t.slice(),t.unshift(e),t}var Tt=function(e){function t(e){var n;return o(this,t),n=a(this,t,[`JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)`]),n.avoidNew=!0,n.value=e,n.name=`NewError`,n}return p(t,e),l(t)}(ne(Error));function $(e,t,n,r,i){if(!(this instanceof $))try{return new $(e,t,n,r,i)}catch(e){if(!e.avoidNew)throw e;return e.value}typeof e==`string`&&(i=r,r=n,n=t,t=e,e=null);var a=e&&D(e)===`object`;if(e=e||{},this.json=e.json||n,this.path=e.path||t,this.resultType=e.resultType||`value`,this.flatten=e.flatten||!1,this.wrap=Object.hasOwn(e,`wrap`)?e.wrap:!0,this.sandbox=e.sandbox||{},this.eval=e.eval===void 0?`safe`:e.eval,this.ignoreEvalErrors=e.ignoreEvalErrors===void 0?!1:e.ignoreEvalErrors,this.parent=e.parent||null,this.parentProperty=e.parentProperty||null,this.callback=e.callback||r||null,this.otherTypeCallback=e.otherTypeCallback||i||function(){throw TypeError(`You must supply an otherTypeCallback callback option with the @other() operator.`)},e.autostart!==!1){var o={path:a?e.path:t};a?`json`in e&&(o.json=e.json):o.json=n;var s=this.evaluate(o);if(!s||D(s)!==`object`)throw new Tt(s);return s}}$.prototype.evaluate=function(e,t,n,r){var i=this,a=this.parent,o=this.parentProperty,s=this.flatten,c=this.wrap;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,n=n||this.callback,this.currOtherTypeCallback=r||this.otherTypeCallback,t=t||this.json,e=e||this.path,e&&D(e)===`object`&&!Array.isArray(e)){if(!e.path&&e.path!==``)throw TypeError(`You must supply a "path" property when providing an object argument to JSONPath.evaluate().`);if(!Object.hasOwn(e,`json`))throw TypeError(`You must supply a "json" property when providing an object argument to JSONPath.evaluate().`);t=e.json,s=Object.hasOwn(e,`flatten`)?e.flatten:s,this.currResultType=Object.hasOwn(e,`resultType`)?e.resultType:this.currResultType,this.currSandbox=Object.hasOwn(e,`sandbox`)?e.sandbox:this.currSandbox,c=Object.hasOwn(e,`wrap`)?e.wrap:c,this.currEval=Object.hasOwn(e,`eval`)?e.eval:this.currEval,n=Object.hasOwn(e,`callback`)?e.callback:n,this.currOtherTypeCallback=Object.hasOwn(e,`otherTypeCallback`)?e.otherTypeCallback:this.currOtherTypeCallback,a=Object.hasOwn(e,`parent`)?e.parent:a,o=Object.hasOwn(e,`parentProperty`)?e.parentProperty:o,e=e.path}if(a=a||null,o=o||null,Array.isArray(e)&&(e=$.toPathString(e)),!(!e&&e!==``||!t)){var l=$.toPathArray(e);l[0]===`$`&&l.length>1&&l.shift(),this._hasParentSelector=null;var u=this._trace(l,t,[`$`],a,o,n).filter(function(e){return e&&!e.isParentSelector});return u.length?!c&&u.length===1&&!u[0].hasArrExpr?this._getPreferredOutput(u[0]):u.reduce(function(e,t){var n=i._getPreferredOutput(t);return s&&Array.isArray(n)?e=e.concat(n):e.push(n),e},[]):c?[]:void 0}},$.prototype._getPreferredOutput=function(e){var t=this.currResultType;switch(t){case`all`:var n=Array.isArray(e.path)?e.path:$.toPathArray(e.path);return e.pointer=$.toPointer(n),e.path=typeof e.path==`string`?e.path:$.toPathString(e.path),e;case`value`:case`parent`:case`parentProperty`:return e[t];case`path`:return $.toPathString(e[t]);case`pointer`:return $.toPointer(e.path);default:throw TypeError(`Unknown result type`)}},$.prototype._handleCallback=function(e,t,n){if(t){var r=this._getPreferredOutput(e);e.path=typeof e.path==`string`?e.path:$.toPathString(e.path),t(r,n,e)}},$.prototype._trace=function(e,t,n,r,i,a,o,s){var c=this,l;if(!e.length)return l={path:n,value:t,parent:r,parentProperty:i,hasArrExpr:o},this._handleCallback(l,a,`value`),l;var d=e[0],f=e.slice(1),p=[];function m(e){Array.isArray(e)?e.forEach(function(e){p.push(e)}):p.push(e)}if((typeof d!=`string`||s)&&t&&Object.hasOwn(t,d))m(this._trace(f,t[d],Q(n,d),t,d,a,o));else if(d===`*`)this._walk(t,function(e){m(c._trace(f,t[e],Q(n,e),t,e,a,!0,!0))});else if(d===`..`)m(this._trace(f,t,n,r,i,a,o)),this._walk(t,function(r){D(t[r])===`object`&&m(c._trace(e.slice(),t[r],Q(n,r),t,r,a,!0))});else if(d===`^`)return this._hasParentSelector=!0,{path:n.slice(0,-1),expr:f,isParentSelector:!0};else if(d===`~`)return l={path:Q(n,d),value:i,parent:r,parentProperty:null},this._handleCallback(l,a,`property`),l;else if(d===`$`)m(this._trace(f,t,n,null,null,a,o));else if(/^(-?[0-9]*):(-?[0-9]*):?([0-9]*)$/.test(d))m(this._slice(d,f,t,n,r,i,a));else if(d.indexOf(`?(`)===0){if(this.currEval===!1)throw Error(`Eval [?(expr)] prevented in JSONPath expression.`);var h=d.replace(/^\?\(((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?)\)$/,`$1`),g=/@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])?((?:[\0->@-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)['\[](\??\((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\))(?!(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])\)\])['\]]/g.exec(h);g?this._walk(t,function(e){var o=[g[2]],s=g[1]?t[e][g[1]]:t[e];c._trace(o,s,n,r,i,a,!0).length>0&&m(c._trace(f,t[e],Q(n,e),t,e,a,!0))}):this._walk(t,function(e){c._eval(h,t[e],e,n,r,i)&&m(c._trace(f,t[e],Q(n,e),t,e,a,!0))})}else if(d[0]===`(`){if(this.currEval===!1)throw Error(`Eval [(expr)] prevented in JSONPath expression.`);m(this._trace(wt(this._eval(d,t,n.at(-1),n.slice(0,-1),r,i),f),t,n,r,i,a,o))}else if(d[0]===`@`){var _=!1,v=d.slice(1,-2);switch(v){case`scalar`:(!t||![`object`,`function`].includes(D(t)))&&(_=!0);break;case`boolean`:case`string`:case`undefined`:case`function`:D(t)===v&&(_=!0);break;case`integer`:Number.isFinite(t)&&!(t%1)&&(_=!0);break;case`number`:Number.isFinite(t)&&(_=!0);break;case`nonFinite`:typeof t==`number`&&!Number.isFinite(t)&&(_=!0);break;case`object`:t&&D(t)===v&&(_=!0);break;case`array`:Array.isArray(t)&&(_=!0);break;case`other`:_=this.currOtherTypeCallback(t,n,r,i);break;case`null`:t===null&&(_=!0);break;default:throw TypeError(`Unknown value type `+v)}if(_)return l={path:n,value:t,parent:r,parentProperty:i},this._handleCallback(l,a,`value`),l}else if(d[0]==="`"&&t&&Object.hasOwn(t,d.slice(1))){var y=d.slice(1);m(this._trace(f,t[y],Q(n,y),t,y,a,o,!0))}else if(d.includes(`,`)){var b=u(d.split(`,`)),x;try{for(b.s();!(x=b.n()).done;){var S=x.value;m(this._trace(wt(S,f),t,n,r,i,a,!0))}}catch(e){b.e(e)}finally{b.f()}}else !s&&t&&Object.hasOwn(t,d)&&m(this._trace(f,t[d],Q(n,d),t,d,a,o,!0));if(this._hasParentSelector)for(var C=0;C<p.length;C++){var w=p[C];if(w&&w.isParentSelector){var T=this._trace(w.expr,t,w.path,r,i,a,o);if(Array.isArray(T)){p[C]=T[0];for(var ee=T.length,E=1;E<ee;E++)C++,p.splice(C,0,T[E])}else p[C]=T}}return p},$.prototype._walk=function(e,t){if(Array.isArray(e))for(var n=e.length,r=0;r<n;r++)t(r);else e&&D(e)===`object`&&Object.keys(e).forEach(function(e){t(e)})},$.prototype._slice=function(e,t,n,r,i,a,o){if(Array.isArray(n)){var s=n.length,c=e.split(`:`),l=c[2]&&Number.parseInt(c[2])||1,u=c[0]&&Number.parseInt(c[0])||0,d=c[1]&&Number.parseInt(c[1])||s;u=u<0?Math.max(0,u+s):Math.min(s,u),d=d<0?Math.max(0,d+s):Math.min(s,d);for(var f=[],p=u;p<d;p+=l)this._trace(wt(p,t),n,r,i,a,o,!0).forEach(function(e){f.push(e)});return f}},$.prototype._eval=function(e,t,n,r,i,a){var o=this;this.currSandbox._$_parentProperty=a,this.currSandbox._$_parent=i,this.currSandbox._$_property=n,this.currSandbox._$_root=this.json,this.currSandbox._$_v=t;var s=e.includes(`@path`);s&&(this.currSandbox._$_path=$.toPathString(r.concat([n])));var c=this.currEval+`Script:`+e;if(!$.cache[c]){var l=e.replaceAll(`@parentProperty`,`_$_parentProperty`).replaceAll(`@parent`,`_$_parent`).replaceAll(`@property`,`_$_property`).replaceAll(`@root`,`_$_root`).replaceAll(/@([\t-\r \)\.\[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])/g,`_$_v$1`);if(s&&(l=l.replaceAll(`@path`,`_$_path`)),this.currEval===`safe`||this.currEval===!0||this.currEval===void 0)$.cache[c]=new this.safeVm.Script(l);else if(this.currEval===`native`)$.cache[c]=new this.vm.Script(l);else if(typeof this.currEval==`function`&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,`runInNewContext`)){var u=this.currEval;$.cache[c]=new u(l)}else if(typeof this.currEval==`function`)$.cache[c]={runInNewContext:function(e){return o.currEval(l,e)}};else throw TypeError(`Unknown "eval" property "${this.currEval}"`)}try{return $.cache[c].runInNewContext(this.currSandbox)}catch(t){if(this.ignoreEvalErrors)return!1;throw Error(`jsonPath: `+t.message+`: `+e)}},$.cache={},$.toPathString=function(e){for(var t=e,n=t.length,r=`$`,i=1;i<n;i++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(t[i])||(r+=/^[\*0-9]+$/.test(t[i])?`[`+t[i]+`]`:`['`+t[i]+`']`);return r},$.toPointer=function(e){for(var t=e,n=t.length,r=``,i=1;i<n;i++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(t[i])||(r+=`/`+t[i].toString().replaceAll(`~`,`~0`).replaceAll(`/`,`~1`));return r},$.toPathArray=function(e){var t=$.cache;if(t[e])return t[e].concat();var n=[];return t[e]=e.replaceAll(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/g,`;$&;`).replaceAll(/['\[](\??\((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\))['\]](?!(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])\])/g,function(e,t){return`[#`+(n.push(t)-1)+`]`}).replaceAll(/\[["']((?:[\0-&\(-\\\^-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)["']\]/g,function(e,t){return`['`+t.replaceAll(`.`,`%@%`).replaceAll(`~`,`%%@@%%`)+`']`}).replaceAll(`~`,`;~;`).replaceAll(/["']?\.["']?(?!(?:[\0-Z\\-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*\])|\[["']?/g,`;`).replaceAll(`%@%`,`.`).replaceAll(`%%@@%%`,`~`).replaceAll(/(?:;)?(\^+)(?:;)?/g,function(e,t){return`;`+t.split(``).join(`;`)+`;`}).replaceAll(/;;;|;;/g,`;..;`).replaceAll(/;$|'?\]|'$/g,``).split(`;`).map(function(e){var t=e.match(/#([0-9]+)/);return!t||!t[1]?e:n[t[1]]}),t[e].concat()},$.prototype.safeVm={Script:Ct};var Et=function(e,t,n){for(var r=e.length,i=0;i<r;i++){var a=e[i];n(a)&&t.push(e.splice(i--,1)[0])}},Dt=function(){function e(t){o(this,e),this.code=t}return l(e,[{key:`runInNewContext`,value:function(e){var t=this.code,n=Object.keys(e),r=[];Et(n,r,function(t){return typeof e[t]==`function`});var i=n.map(function(t){return e[t]});t=r.reduce(function(t,n){var r=e[n].toString();return/function/.test(r)||(r=`function `+r),`var `+n+`=`+r+`;`+t},``)+t,!/(["'])use strict\1/.test(t)&&!n.includes(`arguments`)&&(t=`var arguments = undefined;`+t),t=t.replace(/;[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*$/,``);var a=t.lastIndexOf(`;`),o=a===-1?` return `+t:t.slice(0,a+1)+` return `+t.slice(a+1);return s(Function,n.concat([o])).apply(void 0,T(i))}}])}();$.prototype.vm={Script:Dt};function Ot(e){var t,n=e.querySelector(`[data-configurator-options]`),r=(t=n)==null?void 0:t.getAttribute(`data-configurator-options`);if(r&&(n=document.querySelector(r)),!n)return null;try{var i,a,o=(i=(a=n.textContent)==null?void 0:a.trim())==null?``:i;return o.startsWith(`{`)||(o=`{`+o+`}`),Function(`return (${o})`)()}catch(e){return console.warn(e),null}}function kt(e,t,n){var r,i=n.calcIdAttribute,a=i===void 0?`data-calc-id`:i,o=n.calcPlaceSelector,s=t.getAttribute(a);if(!s)return null;var c=typeof o==`function`?o(s):o,l=(r=t.querySelector(c))==null?t:r;return e===void 0||!e[s]?null:{data:e[s],uniqId:s+`-`+Math.random().toString(36).slice(2,7),id:s,placeNode:l}}function At(e,t){var n=x({},arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});function r(t,r){var i=t.replace(/\$get:([a-zA-Z0-9_.-]+)/g,function(e,t){return String(n[t])});if(i.startsWith(`$save:`)){var a=i.replace(`$save:`,``);return n[a]=r,r}switch(i){case`$root`:return e;case`$first`:return r[0];case`$last`:var o=r;return o[o.length-1];default:return $({path:i,json:r})}}var i=t.split(`||`).map(function(e){return e.trim()}),a=null;do{a=e;for(var o=i.shift().split(`>`).map(function(e){return e.trim()});o.length;)if(a=r(o.shift(),a),a==null||Array.isArray(a)&&!a.length){a=null;break}if(a!==null)break}while(i.length);return a}function jt(e,t,n){var r=kt(e,t,n);if(!r)return;var i=r.id,a=r.uniqId,o=r.data,s=r.placeNode,c=Ot(t);if(!c)return;var l=c.oldPricePercent,u=c.getPrice,d=c.sections,f=c.fields;t.setAttribute(`data-calc-id`,a);var p=new ft({id:a,parentSelector:`[data-calc-id="${a}"]`,data:o,editableFields:[],sectionsOptions:[],initialValues:n.initialValues});p.addField({selector:`price`,calculateFunction:function(e,t){return u(e,t,i,p)}}),p.addField({selector:`old-price`,calculateFunction:function(){return p.getValue(`price`)/((100-l)/100)}});function m(e,t){return e.postfix===void 0?``:typeof e.postfix==`function`?e.postfix(t):e.postfix}var h={calculateFunction:function(e){return d.map(function(t){var n=e[t.key];return n===void 0?null:n+m(t,n)}).filter(Boolean).join(` `)}};p.addField(x({selector:`params`},h)),p.addField(x({selector:`params-attr`,attribute:!0},h));var g={calculateFunction:function(e){return d.map(function(t){var n=e[t.key];return n===void 0?null:`${t.title}: ${n}${m(t,n)}`}).filter(Boolean).join(`
6
6
  `)}};p.addField(x({selector:`params-view`},g)),p.addField(x({selector:`params-view-attr`,attribute:!0},g));var _=[`price`,`old-price`];d.forEach(function(e){p.addField({selector:e.key,calculateFunction:function(t){return t[e.key]}}),_.push(e.key),p.addField({selector:`${e.key}-view`,calculateFunction:function(t){var n=t[e.key],r=At(o,e.path,t);return typeof e.selectorDisplay==`function`?e.selectorDisplay(n,r):n}});function t(e,t){var n,r,i=(r=((n=t.labelMapping)==null?{}:n)[e])==null?e:r;return i+m(t,i)}p.addSection({title:e.title,type:e.key,dependsOn:e.dependsOn,inputs:Array.isArray(e.inputs)?e.inputs:function(n){var r=At(o,e.path,n);return r?typeof e.transformInputs==`function`?e.transformInputs(r):r.map(function(n){var r={label:t(n,e),value:n};return typeof e.isDisabled==`function`&&(r.disabled=e.isDisabled(r)),r}):[]}})}),Array.isArray(f)&&f.forEach(function(e){p.addField({selector:e.selector,attribute:!!e.attribute,calculateFunction:function(t,n){return e.get(t,n,i,p)}})}),_.forEach(function(e){p.addField({selector:e,attribute:!0,calculateFunction:function(){return p.getValue(e)}})}),p.render(s)}exports.Calculator=ft,exports.getOptions=kt,exports.initConfigurator=jt,exports.queryByPath=At;
@@ -1,6 +1,6 @@
1
1
  var OvConfigurator=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){this.v=e,this.k=t}function n(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function r(e){if(Array.isArray(e))return e}function i(e){if(Array.isArray(e))return n(e)}function a(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function o(e,t,n){return t=p(t),C(e,g()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}function s(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function c(e,t,n){if(g())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&w(i,n.prototype),i}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,ee(r.key),r)}}function u(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function d(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=te(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function f(e,t,n){return(t=ee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function m(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&w(e,t)}function h(e){try{return Function.toString.call(e).indexOf(`[native code]`)!==-1}catch(t){return typeof e==`function`}}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}function _(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function v(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function y(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b(){throw TypeError(`Invalid attempt to spread non-iterable instance.
4
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?x(Object(n),!0).forEach(function(t){f(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function C(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return a(e)}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}function T(e,t){return r(e)||v(e,t)||te(e,t)||y()}function E(e){return i(e)||_(e)||te(e)||b()}function D(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ee(e){var t=D(e,`string`);return typeof t==`symbol`?t:t+``}function O(e){"@babel/helpers - typeof";return O=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},O(e)}function te(e,t){if(e){if(typeof e==`string`)return n(e,t);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}function k(e){var n,r;function i(n,r){try{var o=e[n](r),s=o.value,c=s instanceof t;Promise.resolve(c?s.v:s).then(function(t){if(c){var r=n===`return`&&s.k?n:`next`;if(!s.k||t.done)return i(r,t);t=e[r](t).value}a(!!o.done,t)},function(e){i(`throw`,e)})}catch(e){a(2,e)}}function a(e,t){e===2?n.reject(t):n.resolve({value:t,done:e}),(n=n.next)?i(n.key,n.arg):r=null}this._invoke=function(e,t){return new Promise(function(a,o){var s={key:e,arg:t,resolve:a,reject:o,next:null};r?r=r.next=s:(n=r=s,i(e,t))})},typeof e.return!=`function`&&(this.return=void 0)}k.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},k.prototype.next=function(e){return this._invoke(`next`,e)},k.prototype.throw=function(e){return this._invoke(`throw`,e)},k.prototype.return=function(e){return this._invoke(`return`,e)};function ne(e){var t=typeof Map==`function`?new Map:void 0;return ne=function(e){if(e===null||!h(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return c(e,arguments,p(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),w(n,e)},ne(e)}var A,j,re,M,ie,ae,oe,se,N,P,ce,le,ue,de,fe={},F=[],pe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,me=Array.isArray;function I(e,t){for(var n in t)e[n]=t[n];return e}function he(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ge(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?A.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return L(e,o,r,i,null)}function L(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++re:i,__i:-1,__u:0};return i==null&&j.vnode!=null&&j.vnode(a),a}function R(e){return e.children}function z(e,t){this.props=e,this.context=t}function B(e,t){if(t==null)return e.__?B(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?B(e):null}function _e(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],i=[],a=I({},t);a.__v=t.__v+1,j.vnode&&j.vnode(a),Ee(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n==null?B(t):n,!!(32&t.__u),i),a.__v=t.__v,a.__.__k[a.__i]=a,Oe(r,a,i),t.__e=t.__=null,a.__e!=n&&ve(a)}}function ve(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),ve(e)}function ye(e){(!e.__d&&(e.__d=!0)&&M.push(e)&&!V.__r++||ie!=j.debounceRendering)&&((ie=j.debounceRendering)||ae)(V)}function V(){try{for(var e,t=1;M.length;)M.length>t&&M.sort(oe),e=M.shift(),t=M.length,_e(e)}finally{M.length=V.__r=0}}function be(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v=r&&r.__k||F,y=t.length;for(c=xe(n,t,v,c,y),d=0;d<y;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&v[p.__i]||fe,p.__i=d,g=Ee(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&je(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),(_=!!(4&p.__u))||f.__k===p.__k?(c=Se(p,c,e,_),_&&f.__e&&(f.__e=null)):typeof p.type==`function`&&g!==void 0?c=g:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=h,c}function xe(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=L(null,o,null,null,null):me(o)?o=e.__k[a]=L(R,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=L(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=Ce(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=B(s)),Me(s,s));return r}function Se(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=Se(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=B(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Ce(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function we(e,t,n){t[0]==`-`?e.setProperty(t,n==null?``:n):e[t]=n==null?``:typeof n!=`number`||pe.test(t)?n:n+`px`}function H(e,t,n,r,i){var a,o;n:if(t==`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||we(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||we(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(ce,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n[P]=r[P]:(n[P]=le,e.addEventListener(t,a?de:ue,a)):e.removeEventListener(t,a?de:ue,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n==null?``:n;break n}catch(e){}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function Te(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[N]==null)t[N]=le++;else if(t[N]<n[P])return;return n(j.event?j.event(t):t)}}}function Ee(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(u=j.__b)&&u(t);n:if(typeof T==`function`)try{if(_=t.props,v=T.prototype&&T.prototype.render,y=(u=T.contextType)&&r[u.__c],b=u?y?y.props.value:u.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:(v?t.__c=d=new T(_,b):(t.__c=d=new z(_,b),d.constructor=T,d.render=Ne),y&&y.sub(d),d.state||(d.state={}),d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),v&&d.__s==null&&(d.__s=d.state),v&&T.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=I({},d.__s)),I(d.__s,T.getDerivedStateFromProps(_,d.__s))),p=d.props,m=d.state,d.__v=t,f)v&&T.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),v&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(v&&T.getDerivedStateFromProps==null&&_!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(_,b),t.__v==n.__v||!d.__e&&d.shouldComponentUpdate!=null&&!1===d.shouldComponentUpdate(_,d.__s,b)){t.__v!=n.__v&&(d.props=_,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),F.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&o.push(d);break n}d.componentWillUpdate!=null&&d.componentWillUpdate(_,d.__s,b),v&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,m,h)})}if(d.context=b,d.props=_,d.__P=e,d.__e=!1,x=j.__r,S=0,v)d.state=d.__s,d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),F.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++S<25);d.state=d.__s,d.getChildContext!=null&&(r=I(I({},r),d.getChildContext())),v&&!f&&d.getSnapshotBeforeUpdate!=null&&(h=d.getSnapshotBeforeUpdate(p,m)),C=u!=null&&u.type===R&&u.key==null?ke(u.props.children):u,s=be(e,me(C)?C:[C],t,n,r,i,a,o,s,c,l),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),g&&(d.__E=d.__=null)}catch(e){if(t.__v=null,c||a!=null)if(e.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s}else{for(w=a.length;w--;)he(a[w]);De(t)}else t.__e=n.__e,t.__k=n.__k,e.then||De(t);j.__e(e,t,n)}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=Ae(n.__e,t,n,r,i,a,o,c,l);return(u=j.diffed)&&u(t),128&t.__u?void 0:s}function De(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(De))}function Oe(e,t,n){for(var r=0;r<n.length;r++)je(n[r],n[++r],n[++r]);j.__c&&j.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){j.__e(e,t.__v)}})}function ke(e){return O(e)!=`object`||e==null||e.__b>0?e:me(e)?e.map(ke):I({},e)}function Ae(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g=n.props||fe,_=t.props,v=t.type;if(v==`svg`?i=`http://www.w3.org/2000/svg`:v==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||(i=`http://www.w3.org/1999/xhtml`),a!=null){for(l=0;l<a.length;l++)if((p=a[l])&&`setAttribute`in p==!!v&&(v?p.localName==v:p.nodeType==3)){e=p,a[l]=null;break}}if(e==null){if(v==null)return document.createTextNode(_);e=document.createElementNS(i,v,_.is&&_),s&&(j.__m&&j.__m(t,a),s=!1),a=null}if(v==null)g===_||s&&e.data==_||(e.data=_);else{if(a=a&&A.call(e.childNodes),!s&&a!=null)for(g={},l=0;l<e.attributes.length;l++)g[(p=e.attributes[l]).name]=p.value;for(l in g)p=g[l],l==`dangerouslySetInnerHTML`?d=p:l==`children`||l in _||l==`value`&&`defaultValue`in _||l==`checked`&&`defaultChecked`in _||H(e,l,null,p,i);for(l in _)p=_[l],l==`children`?f=p:l==`dangerouslySetInnerHTML`?u=p:l==`value`?m=p:l==`checked`?h=p:s&&typeof p!=`function`||g[l]===p||H(e,l,p,g[l],i);if(u)s||d&&(u.__html==d.__html||u.__html==e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=``),be(t.type==`template`?e.content:e,me(f)?f:[f],t,n,r,v==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&B(n,0),s,c),a!=null)for(l=a.length;l--;)he(a[l]);s||(l=`value`,v==`progress`&&m==null?e.removeAttribute(`value`):m!=null&&(m!==e[l]||v==`progress`&&!m||v==`option`&&m!=g[l])&&H(e,l,m,g[l],i),l=`checked`,h!=null&&h!=e[l]&&H(e,l,h,g[l],i))}return e}function je(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){j.__e(e,n)}}function Me(e,t,n){var r,i;if(j.unmount&&j.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||je(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){j.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Me(r[i],t,n||typeof e.type!=`function`);n||he(e.__e),e.__c=e.__=e.__e=void 0}function Ne(e,t,n){return this.constructor(e,n)}function Pe(e,t,n){var r,i,a,o;t==document&&(t=document.documentElement),j.__&&j.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],o=[],Ee(t,e=(!r&&n||t).__k=ge(R,null,[e]),i||fe,fe,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?A.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,o),Oe(a,e,o)}A=F.slice,j={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},re=0,z.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=I({},this.state);typeof e==`function`&&(e=e(I({},n),this.props)),e&&I(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),ye(this))},z.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ye(this))},z.prototype.render=R,M=[],ae=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,oe=function(e,t){return e.__v.__b-t.__v.__b},V.__r=0,se=Math.random().toString(8),N=`__d`+se,P=`__a`+se,ce=/(PointerCapture)$|Capture$/i,le=0,ue=Te(!1),de=Te(!0);var Fe,U,Ie,Le,Re=0,ze=[],W=j,Be=W.__b,Ve=W.__r,He=W.diffed,Ue=W.__c,We=W.unmount,Ge=W.__;function Ke(e,t){W.__h&&W.__h(U,e,Re||t),Re=0;var n=U.__H||(U.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function qe(e){return Re=1,Je($e,e)}function Je(e,t,n){var r=Ke(Fe++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):$e(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=U,!U.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a&&a.call(this,e,t,n)||o};U.__f=!0;var a=U.shouldComponentUpdate,o=U.componentWillUpdate;U.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},U.shouldComponentUpdate=i}return r.__N||r.__}function Ye(){for(var e;e=ze.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(G),t.__h.some(Qe),t.__h=[]}catch(n){t.__h=[],W.__e(n,e.__v)}}}W.__b=function(e){U=null,Be&&Be(e)},W.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ge&&Ge(e,t)},W.__r=function(e){Ve&&Ve(e),Fe=0;var t=(U=e.__c).__H;t&&(Ie===U?(t.__h=[],U.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(G),t.__h.some(Qe),t.__h=[],Fe=0)),Ie=U},W.diffed=function(e){He&&He(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ze.push(t)!==1&&Le===W.requestAnimationFrame||((Le=W.requestAnimationFrame)||Ze)(Ye)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),Ie=U=null},W.__c=function(e,t){t.some(function(e){try{e.__h.some(G),e.__h=e.__h.filter(function(e){return!e.__||Qe(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],W.__e(n,e.__v)}}),Ue&&Ue(e,t)},W.unmount=function(e){We&&We(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{G(e)}catch(e){t=e}}),n.__H=void 0,t&&W.__e(t,n.__v))};var Xe=typeof requestAnimationFrame==`function`;function Ze(e){var t,n=function(){clearTimeout(r),Xe&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Xe&&(t=requestAnimationFrame(n))}function G(e){var t=U,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),U=t}function Qe(e){var t=U;e.__c=e.__(),U=t}function $e(e,t){return typeof t==`function`?t(e):t}var et=0;Array.isArray;function K(e,t,n,r,i,a){t||(t={});var o,s,c=t;if(`ref`in c)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--et,__i:-1,__u:0,__source:i,__self:a};if(typeof e==`function`&&(o=e.defaultProps))for(s in o)c[s]===void 0&&(c[s]=o[s]);return j.vnode&&j.vnode(l),l}function tt(e,t,n){var r,i,a,o,s=n.find(function(e){return!e.disabled}),c=(r=(i=s==null?void 0:s.value)==null?(a=n[0])==null?void 0:a.value:i)==null?``:r,l=(o=t[e])==null?c:o;return n.find(function(e){return e.value===l&&!e.disabled})?l:c}var nt=function(e,t){return typeof e.inputs==`function`?e.inputs(t):e.inputs};function rt(e,t){return e.map(function(e){var n=nt(e,t);return{options:e,inputs:n,checkedValue:tt(e.type,t,n)}})}function it(e,t,n,r){var i=S(S({},t),{},f({},n,r)),a=d(e),o;try{var s=function(){var e,n=o.value;if(!((e=n.dependsOn)!=null&&e.length)||!n.dependsOn.some(function(e){return i[e]!==t[e]}))return 0;var r=nt(n,i),a=t[n.type];if(!r.find(function(e){return e.value===a&&!e.disabled})){var s=r.find(function(e){return!e.disabled});if(s)i=S(S({},i),{},f({},n.type,s.value));else{var c=S({},i);delete c[n.type],i=c}}};for(a.s();!(o=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}var c=rt(e,i);return{values:i,resolvedSections:c}}var at=function(e){return function(t){return`${e}__${t}`}};function ot(e){var t=e.options,n=e.inputs,r=e.checkedValue,i=e.stylePrefix,a=e.dataAttributePrefix,o=e.prefix,s=e.id,c=t.title,l=c===void 0?``:c,u=t.type,d=t.className,p=d===void 0?``:d,m=t.checked,h=m===void 0?!0:m,g=t.inputType,_=g===void 0?`radio`:g,v=at(i);return n.length?K(`div`,f(f({class:v(`section`)},`data-${a}-section-type`,u),`children`,[l&&K(`h4`,{class:v(`section-title`),children:[l,`:`]}),K(`div`,{class:v(`section-row`),children:n.map(function(e,t){return K(`div`,{class:v(`section-col ${p}`),children:[K(`input`,{checked:h?r===e.value:!1,name:`${o}-${s}-${u}`,id:`${o}-${s}-${u}-${t}`,type:_,value:e.value,disabled:e.disabled}),K(`label`,{for:`${o}-${s}-${u}-${t}`,dangerouslySetInnerHTML:{__html:e.label},"data-value":e.value,style:{"--option-value":e.value}})]},e.value)})})])):null}function st(e){var t=e.sections,n=e.initialSections,r=e.initialValues,i=e.stylePrefix,a=e.dataAttributePrefix,o=e.prefix,s=e.id,c=e.onValuesChange,l=T(qe(n),2),u=l[0],d=l[1],f=T(qe(r),2),p=f[0],m=f[1];return K(`form`,{action:`/`,class:i,onChange:function(e){var n=e.target;if(n.tagName===`INPUT`){var r=n.name.split(`-`),i=r[r.length-1],a=it(t,p,i,n.value);d(a.resolvedSections),m(a.values),c(a.values)}},children:u.map(function(e){var t=e.options,n=e.inputs,r=e.checkedValue;return K(ot,{options:t,inputs:n,checkedValue:r,stylePrefix:i,dataAttributePrefix:a,prefix:o,id:s},t.type)})})}function ct(e,t){Pe(K(st,S({},t)),e)}function lt(e){Pe(null,e)}var ut;(function(){var e=Number;e.isNaN||(e.isNaN=function(e){return typeof e==`number`&&isNaN(e)}),Array.prototype.find||(Array.prototype.find=function(e,t){if(this==null)throw TypeError(`Array.prototype.find called on null or undefined`);if(typeof e!=`function`)throw TypeError(`predicate must be a function`);for(var n=Object(this),r=n.length>>>0,i=0;i<r;i++){var a=n[i];if(e.call(t,a,i,n))return a}})})();var dt={DATA_ATTRIBUTE:`data`,CUSTOM:`custom`,DEFAULT:`default`},q={PARENT:`parent`,SELF:`self`,CLOSEST:`closest`},ft=function(){function e(t){s(this,e),this.nodes=[],this.animationIds=[],this.prevValue=void 0;var n=t.selector;this.selector=n,this.options=S({animated:!1,duration:800,dots:0,dataKey:n,calculateFunction:function(){return null},attribute:!1,animation:[`animate__faster`,`animate__pulse`],animatedNode:q.PARENT,animatedNodeSelector:``},t)}return u(e,[{key:`getNode`,value:function(e){var t=e.prefix,n=e.parentNode,r=e.type;if((r===void 0?dt.DEFAULT:r)===dt.CUSTOM)this.nodes=Array.from(n.querySelectorAll(this.options.selector));else{var i=`data-${t}`;this.nodes=Array.from(n.querySelectorAll(`[${i}="${this.options.selector}"]`)),n.getAttribute(i)===this.options.selector&&this.nodes.push(n)}return this.nodes}},{key:`changeValue`,value:function(e){var t=this;if(this.nodes.length){var n=this.options,r=n.prefix,i=n.selector;this.animateBlock(e),this.nodes.forEach(function(n,a){var o=n.dataset.calcAttribute,s=t.options.attribute,c=!t.options.attribute,l=n.getAttribute(`data-${r}-${i}-target`);if(l){var u=T(l.split(`:`),2),d=u[0];o=u[1],s=d===`full`||d===`attr`,c=d===`full`}if(s&&o&&n.setAttribute(o,String(e)),c){var f=Number(e);if(Number.isNaN(f)){n.innerHTML=String(e);return}t.animateNumber(f,n,a)}}),this.prevValue=e}}},{key:`animateBlock`,value:function(e){if(e!==this.prevValue){var t=this.options,n=t.animated,r=t.animation,i=t.animatedNode,a=t.animatedNodeSelector;n&&this.nodes.forEach(function(e){var t,n=null;switch(i){case q.SELF:n=e;break;case q.PARENT:n=e.parentNode;break;case q.CLOSEST:n=(t=e.closest(a))==null?null:t;break}if(n){var o,s=[`animate__animated`].concat(E(r)),c=function(){var e;(e=n.classList).remove.apply(e,E(s))};(o=n.classList).add.apply(o,E(s)),n.addEventListener(`webkitAnimationEnd`,c),n.addEventListener(`mozAnimationEnd`,c),n.addEventListener(`MSAnimationEnd`,c),n.addEventListener(`oanimationend`,c),n.addEventListener(`animationend`,c)}})}}},{key:`animateNumber`,value:function(e,t,n){var r,i=this,a=this.options,o=a.duration,s=o===void 0?800:o,c=a.dots,l=c===void 0?0:c;window.cancelAnimationFrame((r=this.animationIds[n])==null?0:r);var u=Number(t.textContent);u=Number.isNaN(u)?0:u;var d=e-u,f=d>0,p=null,m=function(r){p===null&&(p=r);var a=r-p;t.textContent=h(a).toFixed(l),a<s?i.animationIds[n]=window.requestAnimationFrame(m):(t.textContent=e.toFixed(g(e)),window.cancelAnimationFrame(i.animationIds[n]))};function h(t){var n=u+t*d/s;if(f){if(n>e)return e}else if(n<e)return e;return n}function g(e){var t=String(e);return t.includes(`.`)?t.length-1>l?l:t.length-1:0}this.animationIds[n]=window.requestAnimationFrame(m)}}])}(),pt=function(){function e(t){var n=this;s(this,e),this.savedValues={},this.values={},this.node=null;var r=t.editableFields,i=r===void 0?[]:r,a=t.data,o=a===void 0?null:a;this.options=S({editableFields:[],prefix:`card`,data:null,stylePrefix:`calculator`,dataAttributePrefix:`calc`},t),this.data=o,this.fields=i.map(function(e){return new ft(S(S({},e),{},{prefix:n.options.dataAttributePrefix}))})}return u(e,[{key:`addField`,value:function(e){this.fields.push(new ft(S(S({},e),{},{prefix:this.options.dataAttributePrefix})))}},{key:`addSection`,value:function(e){var t,n=((t=this.options.sectionsOptions)==null?[]:t).concat([e]);this.options.sectionsOptions=n}},{key:`sortSections`,value:function(e){var t=[],n=new Set,r=function(i){var a;if(!n.has(i)){n.add(i);var o=e.find(function(e){return e.type===i});if(o){var s=d((a=o.dependsOn)==null?[]:a),c;try{for(s.s();!(c=s.n()).done;){var l=c.value;r(l)}}catch(e){s.e(e)}finally{s.f()}t.push(o)}}},i=d(e),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;r(o.type)}}catch(e){i.e(e)}finally{i.f()}return t}},{key:`buildInitialSections`,value:function(){var e,t=this.options.initialValues,n=t===void 0?{}:t,r=(e=this.options.sectionsOptions)==null?[]:e,i={},a=d(r),o;try{var s=function(){var e=o.value,t=nt(e,i),r=t.find(function(t){return t.value===n[e.type]&&!t.disabled});if(r)i[e.type]=r.value;else{var a=t.find(function(e){return!e.disabled});a&&(i[e.type]=a.value)}};for(a.s();!(o=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}return{resolvedSections:rt(r,i),values:i}}},{key:`processFields`,value:function(e){var t=this;this.fields.forEach(function(n){try{var r=n.options.calculateFunction(e,t.data);if(r===null)return;t.saveValue(n.selector,r),n.changeValue(r==null?`--`:r)}catch(e){console.warn(e)}}),this.values=e}},{key:`render`,value:function(e){var t=this;if(this.node=e,this.data){this.options.sectionsOptions&&(this.options.sectionsOptions=this.sortSections(this.options.sectionsOptions));var n=this.buildInitialSections(),r=n.resolvedSections,i=n.values;this.values=i;var a=this.options,o=a.parentSelector,s=a.stylePrefix,c=a.prefix,l=a.dataAttributePrefix,u=a.id,d=a.sectionsOptions;ct(e,{sections:d===void 0?[]:d,initialSections:r,initialValues:i,dataAttributePrefix:l,stylePrefix:s,prefix:c,id:u,onValuesChange:function(e){return t.processFields(e)}});var f=o?document.querySelector(o):null;f&&this.fields.forEach(function(e){return e.getNode({prefix:l,parentNode:f})}),this.processFields(i)}}},{key:`getValues`,value:function(){return this.values}},{key:`saveValue`,value:function(e,t){this.savedValues[e]=t}},{key:`getValue`,value:function(e){return this.savedValues[e]}},{key:`refresh`,value:function(){this.node&&(lt(this.node),this.values={},this.render(this.node))}}])}();ut=pt,ut.fieldTypes=dt,ut.animatedNodeTypes=q;var mt=function(){function e(){s(this,e)}return u(e,[{key:`add`,value:function(e,t,n){if(typeof arguments[0]!=`string`)for(var r in arguments[0])this.add(r,arguments[0][r],arguments[1]);else (Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][n?`unshift`:`push`](t)},this)}},{key:`run`,value:function(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}}])}(),ht=function(){function e(t){s(this,e),this.jsep=t,this.registered={}}return u(e,[{key:`register`,value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){if(O(t)!==`object`||!t.name||!t.init)throw Error(`Invalid JSEP plugin format`);e.registered[t.name]||(t.init(e.jsep),e.registered[t.name]=t)})}}])}(),J=function(){function e(t){s(this,e),this.expr=t,this.index=0}return u(e,[{key:`char`,get:function(){return this.expr.charAt(this.index)}},{key:`code`,get:function(){return this.expr.charCodeAt(this.index)}},{key:`throwError`,value:function(e){var t=Error(e+` at character `+this.index);throw t.index=this.index,t.description=e,t}},{key:`runHook`,value:function(t,n){if(e.hooks[t]){var r={context:this,node:n};return e.hooks.run(t,r),r.node}return n}},{key:`searchHook`,value:function(t){if(e.hooks[t]){var n={context:this};return e.hooks[t].find(function(e){return e.call(n.context,n),n.node}),n.node}}},{key:`gobbleSpaces`,value:function(){for(var t=this.code;t===e.SPACE_CODE||t===e.TAB_CODE||t===e.LF_CODE||t===e.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook(`gobble-spaces`)}},{key:`parse`,value:function(){this.runHook(`before-all`);var t=this.gobbleExpressions(),n=t.length===1?t[0]:{type:e.COMPOUND,body:t};return this.runHook(`after-all`,n)}},{key:`gobbleExpressions`,value:function(t){for(var n=[],r,i;this.index<this.expr.length;)if(r=this.code,r===e.SEMCOL_CODE||r===e.COMMA_CODE)this.index++;else if(i=this.gobbleExpression())n.push(i);else if(this.index<this.expr.length){if(r===t)break;this.throwError(`Unexpected "`+this.char+`"`)}return n}},{key:`gobbleExpression`,value:function(){var e=this.searchHook(`gobble-expression`)||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook(`after-expression`,e)}},{key:`gobbleBinaryOp`,value:function(){this.gobbleSpaces();for(var t=this.expr.substr(this.index,e.max_binop_len),n=t.length;n>0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=n,t;t=t.substr(0,--n)}return!1}},{key:`gobbleBinaryExpression`,value:function(){var t,n,r,i,a,o=this.gobbleToken(),s,c,l;if(!o||(n=this.gobbleBinaryOp(),!n))return o;for(a={value:n,prec:e.binaryPrecedence(n),right_a:e.right_associative.has(n)},s=this.gobbleToken(),s||this.throwError(`Expected expression after `+n),i=[o,a,s];n=this.gobbleBinaryOp();){if(r=e.binaryPrecedence(n),r===0){this.index-=n.length;break}a={value:n,prec:r,right_a:e.right_associative.has(n)},l=n;for(var u=function(e){return a.right_a&&e.right_a?r>e.prec:r<=e.prec};i.length>2&&u(i[i.length-2]);)s=i.pop(),n=i.pop().value,o=i.pop(),t={type:e.BINARY_EXP,operator:n,left:o,right:s},i.push(t);t=this.gobbleToken(),t||this.throwError(`Expected expression after `+l),i.push(a,t)}for(c=i.length-1,t=i[c];c>1;)t={type:e.BINARY_EXP,operator:i[c-1].value,left:i[c-2],right:t},c-=2;return t}},{key:`gobbleToken`,value:function(){var t,n,r,i;if(this.gobbleSpaces(),i=this.searchHook(`gobble-token`),i)return this.runHook(`after-token`,i);if(t=this.code,e.isDecimalDigit(t)||t===e.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===e.SQUOTE_CODE||t===e.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(t===e.OBRACK_CODE)i=this.gobbleArray();else{for(n=this.expr.substr(this.index,e.max_unop_len),r=n.length;r>0;){if(e.unary_ops.hasOwnProperty(n)&&(!e.isIdentifierStart(this.code)||this.index+n.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+n.length)))){this.index+=r;var a=this.gobbleToken();return a||this.throwError(`missing unaryOp argument`),this.runHook(`after-token`,{type:e.UNARY_EXP,operator:n,argument:a,prefix:!0})}n=n.substr(0,--r)}e.isIdentifierStart(t)?(i=this.gobbleIdentifier(),e.literals.hasOwnProperty(i.name)?i={type:e.LITERAL,value:e.literals[i.name],raw:i.name}:i.name===e.this_str&&(i={type:e.THIS_EXP})):t===e.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook(`after-token`,i)):this.runHook(`after-token`,!1)}},{key:`gobbleTokenProperty`,value:function(t){this.gobbleSpaces();for(var n=this.code;n===e.PERIOD_CODE||n===e.OBRACK_CODE||n===e.OPAREN_CODE||n===e.QUMARK_CODE;){var r=void 0;if(n===e.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==e.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),n=this.code}this.index++,n===e.OBRACK_CODE?(t={type:e.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError(`Unexpected "`+this.char+`"`),this.gobbleSpaces(),n=this.code,n!==e.CBRACK_CODE&&this.throwError(`Unclosed [`),this.index++):n===e.OPAREN_CODE?t={type:e.CALL_EXP,arguments:this.gobbleArguments(e.CPAREN_CODE),callee:t}:(n===e.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),t={type:e.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),r&&(t.optional=!0),this.gobbleSpaces(),n=this.code}return t}},{key:`gobbleNumericLiteral`,value:function(){for(var t=``,n,r;e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===e.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(n=this.char,n===`e`||n===`E`){for(t+=this.expr.charAt(this.index++),n=this.char,(n===`+`||n===`-`)&&(t+=this.expr.charAt(this.index++));e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError(`Expected exponent (`+t+this.char+`)`)}return r=this.code,e.isIdentifierStart(r)?this.throwError(`Variable names cannot start with a number (`+t+this.char+`)`):(r===e.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===e.PERIOD_CODE)&&this.throwError(`Unexpected period`),{type:e.LITERAL,value:parseFloat(t),raw:t}}},{key:`gobbleStringLiteral`,value:function(){for(var t=``,n=this.index,r=this.expr.charAt(this.index++),i=!1;this.index<this.expr.length;){var a=this.expr.charAt(this.index++);if(a===r){i=!0;break}else if(a===`\\`)switch(a=this.expr.charAt(this.index++),a){case`n`:t+=`
4
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?x(Object(n),!0).forEach(function(t){f(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function C(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return a(e)}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}function T(e,t){return r(e)||v(e,t)||te(e,t)||y()}function E(e){return i(e)||_(e)||te(e)||b()}function D(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ee(e){var t=D(e,`string`);return typeof t==`symbol`?t:t+``}function O(e){"@babel/helpers - typeof";return O=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},O(e)}function te(e,t){if(e){if(typeof e==`string`)return n(e,t);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}function k(e){var n,r;function i(n,r){try{var o=e[n](r),s=o.value,c=s instanceof t;Promise.resolve(c?s.v:s).then(function(t){if(c){var r=n===`return`&&s.k?n:`next`;if(!s.k||t.done)return i(r,t);t=e[r](t).value}a(!!o.done,t)},function(e){i(`throw`,e)})}catch(e){a(2,e)}}function a(e,t){e===2?n.reject(t):n.resolve({value:t,done:e}),(n=n.next)?i(n.key,n.arg):r=null}this._invoke=function(e,t){return new Promise(function(a,o){var s={key:e,arg:t,resolve:a,reject:o,next:null};r?r=r.next=s:(n=r=s,i(e,t))})},typeof e.return!=`function`&&(this.return=void 0)}k.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},k.prototype.next=function(e){return this._invoke(`next`,e)},k.prototype.throw=function(e){return this._invoke(`throw`,e)},k.prototype.return=function(e){return this._invoke(`return`,e)};function ne(e){var t=typeof Map==`function`?new Map:void 0;return ne=function(e){if(e===null||!h(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return c(e,arguments,p(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),w(n,e)},ne(e)}var A,j,re,M,ie,ae,oe,se,N,P,ce,le,ue,de,fe={},F=[],pe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,me=Array.isArray;function I(e,t){for(var n in t)e[n]=t[n];return e}function he(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ge(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?A.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return L(e,o,r,i,null)}function L(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++re:i,__i:-1,__u:0};return i==null&&j.vnode!=null&&j.vnode(a),a}function R(e){return e.children}function z(e,t){this.props=e,this.context=t}function B(e,t){if(t==null)return e.__?B(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?B(e):null}function _e(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],i=[],a=I({},t);a.__v=t.__v+1,j.vnode&&j.vnode(a),Ee(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n==null?B(t):n,!!(32&t.__u),i),a.__v=t.__v,a.__.__k[a.__i]=a,Oe(r,a,i),t.__e=t.__=null,a.__e!=n&&ve(a)}}function ve(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),ve(e)}function ye(e){(!e.__d&&(e.__d=!0)&&M.push(e)&&!V.__r++||ie!=j.debounceRendering)&&((ie=j.debounceRendering)||ae)(V)}function V(){try{for(var e,t=1;M.length;)M.length>t&&M.sort(oe),e=M.shift(),t=M.length,_e(e)}finally{M.length=V.__r=0}}function be(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v=r&&r.__k||F,y=t.length;for(c=xe(n,t,v,c,y),d=0;d<y;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&v[p.__i]||fe,p.__i=d,g=Ee(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&je(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),(_=!!(4&p.__u))||f.__k===p.__k?(c=Se(p,c,e,_),_&&f.__e&&(f.__e=null)):typeof p.type==`function`&&g!==void 0?c=g:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=h,c}function xe(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=L(null,o,null,null,null):me(o)?o=e.__k[a]=L(R,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=L(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=Ce(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=B(s)),Me(s,s));return r}function Se(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=Se(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=B(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Ce(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function we(e,t,n){t[0]==`-`?e.setProperty(t,n==null?``:n):e[t]=n==null?``:typeof n!=`number`||pe.test(t)?n:n+`px`}function H(e,t,n,r,i){var a,o;n:if(t==`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||we(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||we(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(ce,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n[P]=r[P]:(n[P]=le,e.addEventListener(t,a?de:ue,a)):e.removeEventListener(t,a?de:ue,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n==null?``:n;break n}catch(e){}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function Te(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[N]==null)t[N]=le++;else if(t[N]<n[P])return;return n(j.event?j.event(t):t)}}}function Ee(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(u=j.__b)&&u(t);n:if(typeof T==`function`)try{if(_=t.props,v=T.prototype&&T.prototype.render,y=(u=T.contextType)&&r[u.__c],b=u?y?y.props.value:u.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:(v?t.__c=d=new T(_,b):(t.__c=d=new z(_,b),d.constructor=T,d.render=Ne),y&&y.sub(d),d.state||(d.state={}),d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),v&&d.__s==null&&(d.__s=d.state),v&&T.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=I({},d.__s)),I(d.__s,T.getDerivedStateFromProps(_,d.__s))),p=d.props,m=d.state,d.__v=t,f)v&&T.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),v&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(v&&T.getDerivedStateFromProps==null&&_!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(_,b),t.__v==n.__v||!d.__e&&d.shouldComponentUpdate!=null&&!1===d.shouldComponentUpdate(_,d.__s,b)){t.__v!=n.__v&&(d.props=_,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),F.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&o.push(d);break n}d.componentWillUpdate!=null&&d.componentWillUpdate(_,d.__s,b),v&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,m,h)})}if(d.context=b,d.props=_,d.__P=e,d.__e=!1,x=j.__r,S=0,v)d.state=d.__s,d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),F.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++S<25);d.state=d.__s,d.getChildContext!=null&&(r=I(I({},r),d.getChildContext())),v&&!f&&d.getSnapshotBeforeUpdate!=null&&(h=d.getSnapshotBeforeUpdate(p,m)),C=u!=null&&u.type===R&&u.key==null?ke(u.props.children):u,s=be(e,me(C)?C:[C],t,n,r,i,a,o,s,c,l),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),g&&(d.__E=d.__=null)}catch(e){if(t.__v=null,c||a!=null)if(e.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s}else{for(w=a.length;w--;)he(a[w]);De(t)}else t.__e=n.__e,t.__k=n.__k,e.then||De(t);j.__e(e,t,n)}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=Ae(n.__e,t,n,r,i,a,o,c,l);return(u=j.diffed)&&u(t),128&t.__u?void 0:s}function De(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(De))}function Oe(e,t,n){for(var r=0;r<n.length;r++)je(n[r],n[++r],n[++r]);j.__c&&j.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){j.__e(e,t.__v)}})}function ke(e){return O(e)!=`object`||e==null||e.__b>0?e:me(e)?e.map(ke):I({},e)}function Ae(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g=n.props||fe,_=t.props,v=t.type;if(v==`svg`?i=`http://www.w3.org/2000/svg`:v==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||(i=`http://www.w3.org/1999/xhtml`),a!=null){for(l=0;l<a.length;l++)if((p=a[l])&&`setAttribute`in p==!!v&&(v?p.localName==v:p.nodeType==3)){e=p,a[l]=null;break}}if(e==null){if(v==null)return document.createTextNode(_);e=document.createElementNS(i,v,_.is&&_),s&&(j.__m&&j.__m(t,a),s=!1),a=null}if(v==null)g===_||s&&e.data==_||(e.data=_);else{if(a=a&&A.call(e.childNodes),!s&&a!=null)for(g={},l=0;l<e.attributes.length;l++)g[(p=e.attributes[l]).name]=p.value;for(l in g)p=g[l],l==`dangerouslySetInnerHTML`?d=p:l==`children`||l in _||l==`value`&&`defaultValue`in _||l==`checked`&&`defaultChecked`in _||H(e,l,null,p,i);for(l in _)p=_[l],l==`children`?f=p:l==`dangerouslySetInnerHTML`?u=p:l==`value`?m=p:l==`checked`?h=p:s&&typeof p!=`function`||g[l]===p||H(e,l,p,g[l],i);if(u)s||d&&(u.__html==d.__html||u.__html==e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=``),be(t.type==`template`?e.content:e,me(f)?f:[f],t,n,r,v==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&B(n,0),s,c),a!=null)for(l=a.length;l--;)he(a[l]);s||(l=`value`,v==`progress`&&m==null?e.removeAttribute(`value`):m!=null&&(m!==e[l]||v==`progress`&&!m||v==`option`&&m!=g[l])&&H(e,l,m,g[l],i),l=`checked`,h!=null&&h!=e[l]&&H(e,l,h,g[l],i))}return e}function je(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){j.__e(e,n)}}function Me(e,t,n){var r,i;if(j.unmount&&j.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||je(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){j.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Me(r[i],t,n||typeof e.type!=`function`);n||he(e.__e),e.__c=e.__=e.__e=void 0}function Ne(e,t,n){return this.constructor(e,n)}function Pe(e,t,n){var r,i,a,o;t==document&&(t=document.documentElement),j.__&&j.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],o=[],Ee(t,e=(!r&&n||t).__k=ge(R,null,[e]),i||fe,fe,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?A.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,o),Oe(a,e,o)}A=F.slice,j={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},re=0,z.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=I({},this.state);typeof e==`function`&&(e=e(I({},n),this.props)),e&&I(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),ye(this))},z.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ye(this))},z.prototype.render=R,M=[],ae=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,oe=function(e,t){return e.__v.__b-t.__v.__b},V.__r=0,se=Math.random().toString(8),N=`__d`+se,P=`__a`+se,ce=/(PointerCapture)$|Capture$/i,le=0,ue=Te(!1),de=Te(!0);var Fe,U,Ie,Le,Re=0,ze=[],W=j,Be=W.__b,Ve=W.__r,He=W.diffed,Ue=W.__c,We=W.unmount,Ge=W.__;function Ke(e,t){W.__h&&W.__h(U,e,Re||t),Re=0;var n=U.__H||(U.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function qe(e){return Re=1,Je($e,e)}function Je(e,t,n){var r=Ke(Fe++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):$e(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=U,!U.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a&&a.call(this,e,t,n)||o};U.__f=!0;var a=U.shouldComponentUpdate,o=U.componentWillUpdate;U.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},U.shouldComponentUpdate=i}return r.__N||r.__}function Ye(){for(var e;e=ze.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(G),t.__h.some(Qe),t.__h=[]}catch(n){t.__h=[],W.__e(n,e.__v)}}}W.__b=function(e){U=null,Be&&Be(e)},W.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ge&&Ge(e,t)},W.__r=function(e){Ve&&Ve(e),Fe=0;var t=(U=e.__c).__H;t&&(Ie===U?(t.__h=[],U.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(G),t.__h.some(Qe),t.__h=[],Fe=0)),Ie=U},W.diffed=function(e){He&&He(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ze.push(t)!==1&&Le===W.requestAnimationFrame||((Le=W.requestAnimationFrame)||Ze)(Ye)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),Ie=U=null},W.__c=function(e,t){t.some(function(e){try{e.__h.some(G),e.__h=e.__h.filter(function(e){return!e.__||Qe(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],W.__e(n,e.__v)}}),Ue&&Ue(e,t)},W.unmount=function(e){We&&We(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{G(e)}catch(e){t=e}}),n.__H=void 0,t&&W.__e(t,n.__v))};var Xe=typeof requestAnimationFrame==`function`;function Ze(e){var t,n=function(){clearTimeout(r),Xe&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Xe&&(t=requestAnimationFrame(n))}function G(e){var t=U,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),U=t}function Qe(e){var t=U;e.__c=e.__(),U=t}function $e(e,t){return typeof t==`function`?t(e):t}var et=0;Array.isArray;function K(e,t,n,r,i,a){t||(t={});var o,s,c=t;if(`ref`in c)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--et,__i:-1,__u:0,__source:i,__self:a};if(typeof e==`function`&&(o=e.defaultProps))for(s in o)c[s]===void 0&&(c[s]=o[s]);return j.vnode&&j.vnode(l),l}function tt(e,t,n){var r,i,a,o,s=n.find(function(e){return!e.disabled}),c=(r=(i=s==null?void 0:s.value)==null?(a=n[0])==null?void 0:a.value:i)==null?``:r,l=(o=t[e])==null?c:o;return n.find(function(e){return e.value===l&&!e.disabled})?l:c}var nt=function(e,t){return typeof e.inputs==`function`?e.inputs(t):e.inputs};function rt(e,t){return e.map(function(e){var n=nt(e,t);return{options:e,inputs:n,checkedValue:tt(e.type,t,n)}})}function it(e,t,n,r){var i=S(S({},t),{},f({},n,r)),a=d(e),o;try{var s=function(){var e,n=o.value;if(!((e=n.dependsOn)!=null&&e.length)||!n.dependsOn.some(function(e){return i[e]!==t[e]}))return 0;var r=nt(n,i),a=t[n.type];if(!r.find(function(e){return e.value===a&&!e.disabled})){var s=r.find(function(e){return!e.disabled});if(s)i=S(S({},i),{},f({},n.type,s.value));else{var c=S({},i);delete c[n.type],i=c}}};for(a.s();!(o=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}var c=rt(e,i);return{values:i,resolvedSections:c}}var at=function(e){return function(t){return`${e}__${t}`}};function ot(e){var t=e.options,n=e.inputs,r=e.checkedValue,i=e.stylePrefix,a=e.dataAttributePrefix,o=e.prefix,s=e.id,c=t.title,l=c===void 0?``:c,u=t.type,d=t.className,p=d===void 0?``:d,m=t.checked,h=m===void 0?!0:m,g=t.inputType,_=g===void 0?`radio`:g,v=at(i);return n.length?K(`div`,f(f({class:v(`section`)},`data-${a}-section-type`,u),`children`,[l&&K(`div`,{class:v(`section-title`),children:[l,`:`]}),K(`div`,{class:v(`section-row`),children:n.map(function(e,t){return K(`div`,{class:v(`section-col ${p}`),children:[K(`input`,{checked:h?r===e.value:!1,name:`${o}-${s}-${u}`,id:`${o}-${s}-${u}-${t}`,type:_,value:e.value,disabled:e.disabled}),K(`label`,{for:`${o}-${s}-${u}-${t}`,dangerouslySetInnerHTML:{__html:e.label},"data-value":e.value,style:{"--option-value":e.value}})]},e.value)})})])):null}function st(e){var t=e.sections,n=e.initialSections,r=e.initialValues,i=e.stylePrefix,a=e.dataAttributePrefix,o=e.prefix,s=e.id,c=e.onValuesChange,l=T(qe(n),2),u=l[0],d=l[1],f=T(qe(r),2),p=f[0],m=f[1];return K(`form`,{action:`/`,class:i,onChange:function(e){var n=e.target;if(n.tagName===`INPUT`){var r=n.name.split(`-`),i=r[r.length-1],a=it(t,p,i,n.value);d(a.resolvedSections),m(a.values),c(a.values)}},children:u.map(function(e){var t=e.options,n=e.inputs,r=e.checkedValue;return K(ot,{options:t,inputs:n,checkedValue:r,stylePrefix:i,dataAttributePrefix:a,prefix:o,id:s},t.type)})})}function ct(e,t){Pe(K(st,S({},t)),e)}function lt(e){Pe(null,e)}var ut;(function(){var e=Number;e.isNaN||(e.isNaN=function(e){return typeof e==`number`&&isNaN(e)}),Array.prototype.find||(Array.prototype.find=function(e,t){if(this==null)throw TypeError(`Array.prototype.find called on null or undefined`);if(typeof e!=`function`)throw TypeError(`predicate must be a function`);for(var n=Object(this),r=n.length>>>0,i=0;i<r;i++){var a=n[i];if(e.call(t,a,i,n))return a}})})();var dt={DATA_ATTRIBUTE:`data`,CUSTOM:`custom`,DEFAULT:`default`},q={PARENT:`parent`,SELF:`self`,CLOSEST:`closest`},ft=function(){function e(t){s(this,e),this.nodes=[],this.animationIds=[],this.prevValue=void 0;var n=t.selector;this.selector=n,this.options=S({animated:!1,duration:800,dots:0,dataKey:n,calculateFunction:function(){return null},attribute:!1,animation:[`animate__faster`,`animate__pulse`],animatedNode:q.PARENT,animatedNodeSelector:``},t)}return u(e,[{key:`getNode`,value:function(e){var t=e.prefix,n=e.parentNode,r=e.type;if((r===void 0?dt.DEFAULT:r)===dt.CUSTOM)this.nodes=Array.from(n.querySelectorAll(this.options.selector));else{var i=`data-${t}`;this.nodes=Array.from(n.querySelectorAll(`[${i}="${this.options.selector}"]`)),n.getAttribute(i)===this.options.selector&&this.nodes.push(n)}return this.nodes}},{key:`changeValue`,value:function(e){var t=this;if(this.nodes.length){var n=this.options,r=n.prefix,i=n.selector;this.animateBlock(e),this.nodes.forEach(function(n,a){var o=n.dataset.calcAttribute,s=t.options.attribute,c=!t.options.attribute,l=n.getAttribute(`data-${r}-${i}-target`);if(l){var u=T(l.split(`:`),2),d=u[0];o=u[1],s=d===`full`||d===`attr`,c=d===`full`}if(s&&o&&n.setAttribute(o,String(e)),c){var f=Number(e);if(Number.isNaN(f)){n.innerHTML=String(e);return}t.animateNumber(f,n,a)}}),this.prevValue=e}}},{key:`animateBlock`,value:function(e){if(e!==this.prevValue){var t=this.options,n=t.animated,r=t.animation,i=t.animatedNode,a=t.animatedNodeSelector;n&&this.nodes.forEach(function(e){var t,n=null;switch(i){case q.SELF:n=e;break;case q.PARENT:n=e.parentNode;break;case q.CLOSEST:n=(t=e.closest(a))==null?null:t;break}if(n){var o,s=[`animate__animated`].concat(E(r)),c=function(){var e;(e=n.classList).remove.apply(e,E(s))};(o=n.classList).add.apply(o,E(s)),n.addEventListener(`webkitAnimationEnd`,c),n.addEventListener(`mozAnimationEnd`,c),n.addEventListener(`MSAnimationEnd`,c),n.addEventListener(`oanimationend`,c),n.addEventListener(`animationend`,c)}})}}},{key:`animateNumber`,value:function(e,t,n){var r,i=this,a=this.options,o=a.duration,s=o===void 0?800:o,c=a.dots,l=c===void 0?0:c;window.cancelAnimationFrame((r=this.animationIds[n])==null?0:r);var u=Number(t.textContent);u=Number.isNaN(u)?0:u;var d=e-u,f=d>0,p=null,m=function(r){p===null&&(p=r);var a=r-p;t.textContent=h(a).toFixed(l),a<s?i.animationIds[n]=window.requestAnimationFrame(m):(t.textContent=e.toFixed(g(e)),window.cancelAnimationFrame(i.animationIds[n]))};function h(t){var n=u+t*d/s;if(f){if(n>e)return e}else if(n<e)return e;return n}function g(e){var t=String(e);return t.includes(`.`)?t.length-1>l?l:t.length-1:0}this.animationIds[n]=window.requestAnimationFrame(m)}}])}(),pt=function(){function e(t){var n=this;s(this,e),this.savedValues={},this.values={},this.node=null;var r=t.editableFields,i=r===void 0?[]:r,a=t.data,o=a===void 0?null:a;this.options=S({editableFields:[],prefix:`card`,data:null,stylePrefix:`calculator`,dataAttributePrefix:`calc`},t),this.data=o,this.fields=i.map(function(e){return new ft(S(S({},e),{},{prefix:n.options.dataAttributePrefix}))})}return u(e,[{key:`addField`,value:function(e){this.fields.push(new ft(S(S({},e),{},{prefix:this.options.dataAttributePrefix})))}},{key:`addSection`,value:function(e){var t,n=((t=this.options.sectionsOptions)==null?[]:t).concat([e]);this.options.sectionsOptions=n}},{key:`sortSections`,value:function(e){var t=[],n=new Set,r=function(i){var a;if(!n.has(i)){n.add(i);var o=e.find(function(e){return e.type===i});if(o){var s=d((a=o.dependsOn)==null?[]:a),c;try{for(s.s();!(c=s.n()).done;){var l=c.value;r(l)}}catch(e){s.e(e)}finally{s.f()}t.push(o)}}},i=d(e),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;r(o.type)}}catch(e){i.e(e)}finally{i.f()}return t}},{key:`buildInitialSections`,value:function(){var e,t=this.options.initialValues,n=t===void 0?{}:t,r=(e=this.options.sectionsOptions)==null?[]:e,i={},a=d(r),o;try{var s=function(){var e=o.value,t=nt(e,i),r=t.find(function(t){return t.value===n[e.type]&&!t.disabled});if(r)i[e.type]=r.value;else{var a=t.find(function(e){return!e.disabled});a&&(i[e.type]=a.value)}};for(a.s();!(o=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}return{resolvedSections:rt(r,i),values:i}}},{key:`processFields`,value:function(e){var t=this;this.fields.forEach(function(n){try{var r=n.options.calculateFunction(e,t.data);if(r===null)return;t.saveValue(n.selector,r),n.changeValue(r==null?`--`:r)}catch(e){console.warn(e)}}),this.values=e}},{key:`render`,value:function(e){var t=this;if(this.node=e,this.data){this.options.sectionsOptions&&(this.options.sectionsOptions=this.sortSections(this.options.sectionsOptions));var n=this.buildInitialSections(),r=n.resolvedSections,i=n.values;this.values=i;var a=this.options,o=a.parentSelector,s=a.stylePrefix,c=a.prefix,l=a.dataAttributePrefix,u=a.id,d=a.sectionsOptions;ct(e,{sections:d===void 0?[]:d,initialSections:r,initialValues:i,dataAttributePrefix:l,stylePrefix:s,prefix:c,id:u,onValuesChange:function(e){return t.processFields(e)}});var f=o?document.querySelector(o):null;f&&this.fields.forEach(function(e){return e.getNode({prefix:l,parentNode:f})}),this.processFields(i)}}},{key:`getValues`,value:function(){return this.values}},{key:`saveValue`,value:function(e,t){this.savedValues[e]=t}},{key:`getValue`,value:function(e){return this.savedValues[e]}},{key:`refresh`,value:function(){this.node&&(lt(this.node),this.values={},this.render(this.node))}}])}();ut=pt,ut.fieldTypes=dt,ut.animatedNodeTypes=q;var mt=function(){function e(){s(this,e)}return u(e,[{key:`add`,value:function(e,t,n){if(typeof arguments[0]!=`string`)for(var r in arguments[0])this.add(r,arguments[0][r],arguments[1]);else (Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][n?`unshift`:`push`](t)},this)}},{key:`run`,value:function(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}}])}(),ht=function(){function e(t){s(this,e),this.jsep=t,this.registered={}}return u(e,[{key:`register`,value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){if(O(t)!==`object`||!t.name||!t.init)throw Error(`Invalid JSEP plugin format`);e.registered[t.name]||(t.init(e.jsep),e.registered[t.name]=t)})}}])}(),J=function(){function e(t){s(this,e),this.expr=t,this.index=0}return u(e,[{key:`char`,get:function(){return this.expr.charAt(this.index)}},{key:`code`,get:function(){return this.expr.charCodeAt(this.index)}},{key:`throwError`,value:function(e){var t=Error(e+` at character `+this.index);throw t.index=this.index,t.description=e,t}},{key:`runHook`,value:function(t,n){if(e.hooks[t]){var r={context:this,node:n};return e.hooks.run(t,r),r.node}return n}},{key:`searchHook`,value:function(t){if(e.hooks[t]){var n={context:this};return e.hooks[t].find(function(e){return e.call(n.context,n),n.node}),n.node}}},{key:`gobbleSpaces`,value:function(){for(var t=this.code;t===e.SPACE_CODE||t===e.TAB_CODE||t===e.LF_CODE||t===e.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook(`gobble-spaces`)}},{key:`parse`,value:function(){this.runHook(`before-all`);var t=this.gobbleExpressions(),n=t.length===1?t[0]:{type:e.COMPOUND,body:t};return this.runHook(`after-all`,n)}},{key:`gobbleExpressions`,value:function(t){for(var n=[],r,i;this.index<this.expr.length;)if(r=this.code,r===e.SEMCOL_CODE||r===e.COMMA_CODE)this.index++;else if(i=this.gobbleExpression())n.push(i);else if(this.index<this.expr.length){if(r===t)break;this.throwError(`Unexpected "`+this.char+`"`)}return n}},{key:`gobbleExpression`,value:function(){var e=this.searchHook(`gobble-expression`)||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook(`after-expression`,e)}},{key:`gobbleBinaryOp`,value:function(){this.gobbleSpaces();for(var t=this.expr.substr(this.index,e.max_binop_len),n=t.length;n>0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=n,t;t=t.substr(0,--n)}return!1}},{key:`gobbleBinaryExpression`,value:function(){var t,n,r,i,a,o=this.gobbleToken(),s,c,l;if(!o||(n=this.gobbleBinaryOp(),!n))return o;for(a={value:n,prec:e.binaryPrecedence(n),right_a:e.right_associative.has(n)},s=this.gobbleToken(),s||this.throwError(`Expected expression after `+n),i=[o,a,s];n=this.gobbleBinaryOp();){if(r=e.binaryPrecedence(n),r===0){this.index-=n.length;break}a={value:n,prec:r,right_a:e.right_associative.has(n)},l=n;for(var u=function(e){return a.right_a&&e.right_a?r>e.prec:r<=e.prec};i.length>2&&u(i[i.length-2]);)s=i.pop(),n=i.pop().value,o=i.pop(),t={type:e.BINARY_EXP,operator:n,left:o,right:s},i.push(t);t=this.gobbleToken(),t||this.throwError(`Expected expression after `+l),i.push(a,t)}for(c=i.length-1,t=i[c];c>1;)t={type:e.BINARY_EXP,operator:i[c-1].value,left:i[c-2],right:t},c-=2;return t}},{key:`gobbleToken`,value:function(){var t,n,r,i;if(this.gobbleSpaces(),i=this.searchHook(`gobble-token`),i)return this.runHook(`after-token`,i);if(t=this.code,e.isDecimalDigit(t)||t===e.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===e.SQUOTE_CODE||t===e.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(t===e.OBRACK_CODE)i=this.gobbleArray();else{for(n=this.expr.substr(this.index,e.max_unop_len),r=n.length;r>0;){if(e.unary_ops.hasOwnProperty(n)&&(!e.isIdentifierStart(this.code)||this.index+n.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+n.length)))){this.index+=r;var a=this.gobbleToken();return a||this.throwError(`missing unaryOp argument`),this.runHook(`after-token`,{type:e.UNARY_EXP,operator:n,argument:a,prefix:!0})}n=n.substr(0,--r)}e.isIdentifierStart(t)?(i=this.gobbleIdentifier(),e.literals.hasOwnProperty(i.name)?i={type:e.LITERAL,value:e.literals[i.name],raw:i.name}:i.name===e.this_str&&(i={type:e.THIS_EXP})):t===e.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook(`after-token`,i)):this.runHook(`after-token`,!1)}},{key:`gobbleTokenProperty`,value:function(t){this.gobbleSpaces();for(var n=this.code;n===e.PERIOD_CODE||n===e.OBRACK_CODE||n===e.OPAREN_CODE||n===e.QUMARK_CODE;){var r=void 0;if(n===e.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==e.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),n=this.code}this.index++,n===e.OBRACK_CODE?(t={type:e.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError(`Unexpected "`+this.char+`"`),this.gobbleSpaces(),n=this.code,n!==e.CBRACK_CODE&&this.throwError(`Unclosed [`),this.index++):n===e.OPAREN_CODE?t={type:e.CALL_EXP,arguments:this.gobbleArguments(e.CPAREN_CODE),callee:t}:(n===e.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),t={type:e.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),r&&(t.optional=!0),this.gobbleSpaces(),n=this.code}return t}},{key:`gobbleNumericLiteral`,value:function(){for(var t=``,n,r;e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===e.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(n=this.char,n===`e`||n===`E`){for(t+=this.expr.charAt(this.index++),n=this.char,(n===`+`||n===`-`)&&(t+=this.expr.charAt(this.index++));e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError(`Expected exponent (`+t+this.char+`)`)}return r=this.code,e.isIdentifierStart(r)?this.throwError(`Variable names cannot start with a number (`+t+this.char+`)`):(r===e.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===e.PERIOD_CODE)&&this.throwError(`Unexpected period`),{type:e.LITERAL,value:parseFloat(t),raw:t}}},{key:`gobbleStringLiteral`,value:function(){for(var t=``,n=this.index,r=this.expr.charAt(this.index++),i=!1;this.index<this.expr.length;){var a=this.expr.charAt(this.index++);if(a===r){i=!0;break}else if(a===`\\`)switch(a=this.expr.charAt(this.index++),a){case`n`:t+=`
5
5
  `;break;case`r`:t+=`\r`;break;case`t`:t+=` `;break;case`b`:t+=`\b`;break;case`f`:t+=`\f`;break;case`v`:t+=`\v`;break;default:t+=a}else t+=a}return i||this.throwError(`Unclosed quote after "`+t+`"`),{type:e.LITERAL,value:t,raw:this.expr.substring(n,this.index)}}},{key:`gobbleIdentifier`,value:function(){var t=this.code,n=this.index;for(e.isIdentifierStart(t)?this.index++:this.throwError(`Unexpected `+this.char);this.index<this.expr.length&&(t=this.code,e.isIdentifierPart(t));)this.index++;return{type:e.IDENTIFIER,name:this.expr.slice(n,this.index)}}},{key:`gobbleArguments`,value:function(t){for(var n=[],r=!1,i=0;this.index<this.expr.length;){this.gobbleSpaces();var a=this.code;if(a===t){r=!0,this.index++,t===e.CPAREN_CODE&&i&&i>=n.length&&this.throwError(`Unexpected token `+String.fromCharCode(t));break}else if(a===e.COMMA_CODE){if(this.index++,i++,i!==n.length){if(t===e.CPAREN_CODE)this.throwError(`Unexpected token ,`);else if(t===e.CBRACK_CODE)for(var o=n.length;o<i;o++)n.push(null)}}else if(n.length!==i&&i!==0)this.throwError(`Expected comma`);else{var s=this.gobbleExpression();(!s||s.type===e.COMPOUND)&&this.throwError(`Expected comma`),n.push(s)}}return r||this.throwError(`Expected `+String.fromCharCode(t)),n}},{key:`gobbleGroup`,value:function(){this.index++;var t=this.gobbleExpressions(e.CPAREN_CODE);if(this.code===e.CPAREN_CODE)return this.index++,t.length===1?t[0]:t.length?{type:e.SEQUENCE_EXP,expressions:t}:!1;this.throwError(`Unclosed (`)}},{key:`gobbleArray`,value:function(){return this.index++,{type:e.ARRAY_EXP,elements:this.gobbleArguments(e.CBRACK_CODE)}}}],[{key:`version`,get:function(){return`1.4.0`}},{key:`toString`,value:function(){return`JavaScript Expression Parser (JSEP) v`+e.version}},{key:`addUnaryOp`,value:function(t){return e.max_unop_len=Math.max(t.length,e.max_unop_len),e.unary_ops[t]=1,e}},{key:`addBinaryOp`,value:function(t,n,r){return e.max_binop_len=Math.max(t.length,e.max_binop_len),e.binary_ops[t]=n,r?e.right_associative.add(t):e.right_associative.delete(t),e}},{key:`addIdentifierChar`,value:function(t){return e.additional_identifier_chars.add(t),e}},{key:`addLiteral`,value:function(t,n){return e.literals[t]=n,e}},{key:`removeUnaryOp`,value:function(t){return delete e.unary_ops[t],t.length===e.max_unop_len&&(e.max_unop_len=e.getMaxKeyLen(e.unary_ops)),e}},{key:`removeAllUnaryOps`,value:function(){return e.unary_ops={},e.max_unop_len=0,e}},{key:`removeIdentifierChar`,value:function(t){return e.additional_identifier_chars.delete(t),e}},{key:`removeBinaryOp`,value:function(t){return delete e.binary_ops[t],t.length===e.max_binop_len&&(e.max_binop_len=e.getMaxKeyLen(e.binary_ops)),e.right_associative.delete(t),e}},{key:`removeAllBinaryOps`,value:function(){return e.binary_ops={},e.max_binop_len=0,e}},{key:`removeLiteral`,value:function(t){return delete e.literals[t],e}},{key:`removeAllLiterals`,value:function(){return e.literals={},e}},{key:`parse`,value:function(t){return new e(t).parse()}},{key:`getMaxKeyLen`,value:function(e){return Math.max.apply(Math,[0].concat(E(Object.keys(e).map(function(e){return e.length}))))}},{key:`isDecimalDigit`,value:function(e){return e>=48&&e<=57}},{key:`binaryPrecedence`,value:function(t){return e.binary_ops[t]||0}},{key:`isIdentifierStart`,value:function(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!e.binary_ops[String.fromCharCode(t)]||e.additional_identifier_chars.has(String.fromCharCode(t))}},{key:`isIdentifierPart`,value:function(t){return e.isIdentifierStart(t)||e.isDecimalDigit(t)}}])}(),gt=new mt;Object.assign(J,{hooks:gt,plugins:new ht(J),COMPOUND:`Compound`,SEQUENCE_EXP:`SequenceExpression`,IDENTIFIER:`Identifier`,MEMBER_EXP:`MemberExpression`,LITERAL:`Literal`,THIS_EXP:`ThisExpression`,CALL_EXP:`CallExpression`,UNARY_EXP:`UnaryExpression`,BINARY_EXP:`BinaryExpression`,ARRAY_EXP:`ArrayExpression`,TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set([`**`]),additional_identifier_chars:new Set([`$`,`_`]),literals:{true:!0,false:!1,null:null},this_str:`this`}),J.max_unop_len=J.getMaxKeyLen(J.unary_ops),J.max_binop_len=J.getMaxKeyLen(J.binary_ops);var Y=function(e){return new J(e).parse()},_t=Object.getOwnPropertyNames(u(function e(){s(this,e)}));Object.getOwnPropertyNames(J).filter(function(e){return!_t.includes(e)&&Y[e]===void 0}).forEach(function(e){Y[e]=J[e]}),Y.Jsep=J;var vt=`ConditionalExpression`;Y.plugins.register({name:`ternary`,init:function(e){e.hooks.add(`after-expression`,function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;var n=t.node,r=this.gobbleExpression();if(r||this.throwError(`Expected expression`),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;var i=this.gobbleExpression();if(i||this.throwError(`Expected expression`),t.node={type:vt,test:n,consequent:r,alternate:i},n.operator&&e.binary_ops[n.operator]<=.9){for(var a=n;a.right.operator&&e.binary_ops[a.right.operator]<=.9;)a=a.right;t.node.test=a.right,a.right=t.node,t.node=n}}else this.throwError(`Expected :`)}})}});var yt=47,bt=92,xt={name:`regex`,init:function(e){e.hooks.add(`gobble-token`,function(t){if(this.code===yt){for(var n=++this.index,r=!1;this.index<this.expr.length;){if(this.code===yt&&!r){for(var i=this.expr.slice(n,this.index),a=``;++this.index<this.expr.length;){var o=this.code;if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57)a+=this.char;else break}var s=void 0;try{s=new RegExp(i,a)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:s,raw:this.expr.slice(n-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?r=!0:r&&this.code===e.CBRACK_CODE&&(r=!1),this.index+=this.code===bt?2:1}this.throwError(`Unclosed Regex`)}})}},St=43,X={name:`assignment`,assignmentOperators:new Set([`=`,`*=`,`**=`,`/=`,`%=`,`+=`,`-=`,`<<=`,`>>=`,`>>>=`,`&=`,`^=`,`|=`,`||=`,`&&=`,`??=`]),updateOperators:[St,45],assignmentPrecedence:.9,init:function(e){var t=[e.IDENTIFIER,e.MEMBER_EXP];X.assignmentOperators.forEach(function(t){return e.addBinaryOp(t,X.assignmentPrecedence,!0)}),e.hooks.add(`gobble-token`,function(e){var n=this,r=this.code;X.updateOperators.some(function(e){return e===r&&e===n.expr.charCodeAt(n.index+1)})&&(this.index+=2,e.node={type:`UpdateExpression`,operator:r===St?`++`:`--`,argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},(!e.node.argument||!t.includes(e.node.argument.type))&&this.throwError(`Unexpected ${e.node.operator}`))}),e.hooks.add(`after-token`,function(e){var n=this;if(e.node){var r=this.code;X.updateOperators.some(function(e){return e===r&&e===n.expr.charCodeAt(n.index+1)})&&(t.includes(e.node.type)||this.throwError(`Unexpected ${e.node.operator}`),this.index+=2,e.node={type:`UpdateExpression`,operator:r===St?`++`:`--`,argument:e.node,prefix:!1})}}),e.hooks.add(`after-expression`,function(e){e.node&&n(e.node)});function n(e){X.assignmentOperators.has(e.operator)?(e.type=`AssignmentExpression`,n(e.left),n(e.right)):e.operator||Object.values(e).forEach(function(e){e&&O(e)===`object`&&n(e)})}}};Y.plugins.register(xt,X),Y.addUnaryOp(`typeof`),Y.addUnaryOp(`void`),Y.addLiteral(`null`,null),Y.addLiteral(`undefined`,void 0);var Ct=new Set([`constructor`,`__proto__`,`__defineGetter__`,`__defineSetter__`,`__lookupGetter__`,`__lookupSetter__`]),Z={evalAst:function(e,t){switch(e.type){case`BinaryExpression`:case`LogicalExpression`:return Z.evalBinaryExpression(e,t);case`Compound`:return Z.evalCompound(e,t);case`ConditionalExpression`:return Z.evalConditionalExpression(e,t);case`Identifier`:return Z.evalIdentifier(e,t);case`Literal`:return Z.evalLiteral(e,t);case`MemberExpression`:return Z.evalMemberExpression(e,t);case`UnaryExpression`:return Z.evalUnaryExpression(e,t);case`ArrayExpression`:return Z.evalArrayExpression(e,t);case`CallExpression`:return Z.evalCallExpression(e,t);case`AssignmentExpression`:return Z.evalAssignmentExpression(e,t);default:throw SyntaxError(`Unexpected expression`,e)}},evalBinaryExpression:function(e,t){return{"||":function(e,t){return e||t()},"&&":function(e,t){return e&&t()},"|":function(e,t){return e|t()},"^":function(e,t){return e^t()},"&":function(e,t){return e&t()},"==":function(e,t){return e==t()},"!=":function(e,t){return e!=t()},"===":function(e,t){return e===t()},"!==":function(e,t){return e!==t()},"<":function(e,t){return e<t()},">":function(e,t){return e>t()},"<=":function(e,t){return e<=t()},">=":function(e,t){return e>=t()},"<<":function(e,t){return e<<t()},">>":function(e,t){return e>>t()},">>>":function(e,t){return e>>>t()},"+":function(e,t){return e+t()},"-":function(e,t){return e-t()},"*":function(e,t){return e*t()},"/":function(e,t){return e/t()},"%":function(e,t){return e%t()}}[e.operator](Z.evalAst(e.left,t),function(){return Z.evalAst(e.right,t)})},evalCompound:function(e,t){for(var n,r=0;r<e.body.length;r++){e.body[r].type===`Identifier`&&[`var`,`let`,`const`].includes(e.body[r].name)&&e.body[r+1]&&e.body[r+1].type===`AssignmentExpression`&&(r+=1);var i=e.body[r];n=Z.evalAst(i,t)}return n},evalConditionalExpression:function(e,t){return Z.evalAst(e.test,t)?Z.evalAst(e.consequent,t):Z.evalAst(e.alternate,t)},evalIdentifier:function(e,t){if(Object.hasOwn(t,e.name))return t[e.name];throw ReferenceError(`${e.name} is not defined`)},evalLiteral:function(e){return e.value},evalMemberExpression:function(e,t){var n=String(e.computed?Z.evalAst(e.property):e.property.name),r=Z.evalAst(e.object,t);if(r==null||!Object.hasOwn(r,n)&&Ct.has(n))throw TypeError(`Cannot read properties of ${r} (reading '${n}')`);var i=r[n];return typeof i==`function`?i.bind(r):i},evalUnaryExpression:function(e,t){return{"-":function(e){return-Z.evalAst(e,t)},"!":function(e){return!Z.evalAst(e,t)},"~":function(e){return~Z.evalAst(e,t)},"+":function(e){return+Z.evalAst(e,t)},typeof:function e(n){return e(Z.evalAst(n,t))},void:function(e){Z.evalAst(e,t)}}[e.operator](e.argument)},evalArrayExpression:function(e,t){return e.elements.map(function(e){return Z.evalAst(e,t)})},evalCallExpression:function(e,t){var n=e.arguments.map(function(e){return Z.evalAst(e,t)}),r=Z.evalAst(e.callee,t);if(r===Function)throw Error(`Function constructor is disabled`);return r.apply(void 0,E(n))},evalAssignmentExpression:function(e,t){if(e.left.type!==`Identifier`)throw SyntaxError(`Invalid left-hand side in assignment`);var n=e.left.name;return t[n]=Z.evalAst(e.right,t),t[n]}},wt=function(){function e(t){s(this,e),this.code=t,this.ast=Y(this.code)}return u(e,[{key:`runInNewContext`,value:function(e){var t=Object.assign(Object.create(null),e);return Z.evalAst(this.ast,t)}}])}();function Q(e,t){return e=e.slice(),e.push(t),e}function Tt(e,t){return t=t.slice(),t.unshift(e),t}var Et=function(e){function t(e){var n;return s(this,t),n=o(this,t,[`JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)`]),n.avoidNew=!0,n.value=e,n.name=`NewError`,n}return m(t,e),u(t)}(ne(Error));function $(e,t,n,r,i){if(!(this instanceof $))try{return new $(e,t,n,r,i)}catch(e){if(!e.avoidNew)throw e;return e.value}typeof e==`string`&&(i=r,r=n,n=t,t=e,e=null);var a=e&&O(e)===`object`;if(e=e||{},this.json=e.json||n,this.path=e.path||t,this.resultType=e.resultType||`value`,this.flatten=e.flatten||!1,this.wrap=Object.hasOwn(e,`wrap`)?e.wrap:!0,this.sandbox=e.sandbox||{},this.eval=e.eval===void 0?`safe`:e.eval,this.ignoreEvalErrors=e.ignoreEvalErrors===void 0?!1:e.ignoreEvalErrors,this.parent=e.parent||null,this.parentProperty=e.parentProperty||null,this.callback=e.callback||r||null,this.otherTypeCallback=e.otherTypeCallback||i||function(){throw TypeError(`You must supply an otherTypeCallback callback option with the @other() operator.`)},e.autostart!==!1){var o={path:a?e.path:t};a?`json`in e&&(o.json=e.json):o.json=n;var s=this.evaluate(o);if(!s||O(s)!==`object`)throw new Et(s);return s}}$.prototype.evaluate=function(e,t,n,r){var i=this,a=this.parent,o=this.parentProperty,s=this.flatten,c=this.wrap;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,n=n||this.callback,this.currOtherTypeCallback=r||this.otherTypeCallback,t=t||this.json,e=e||this.path,e&&O(e)===`object`&&!Array.isArray(e)){if(!e.path&&e.path!==``)throw TypeError(`You must supply a "path" property when providing an object argument to JSONPath.evaluate().`);if(!Object.hasOwn(e,`json`))throw TypeError(`You must supply a "json" property when providing an object argument to JSONPath.evaluate().`);t=e.json,s=Object.hasOwn(e,`flatten`)?e.flatten:s,this.currResultType=Object.hasOwn(e,`resultType`)?e.resultType:this.currResultType,this.currSandbox=Object.hasOwn(e,`sandbox`)?e.sandbox:this.currSandbox,c=Object.hasOwn(e,`wrap`)?e.wrap:c,this.currEval=Object.hasOwn(e,`eval`)?e.eval:this.currEval,n=Object.hasOwn(e,`callback`)?e.callback:n,this.currOtherTypeCallback=Object.hasOwn(e,`otherTypeCallback`)?e.otherTypeCallback:this.currOtherTypeCallback,a=Object.hasOwn(e,`parent`)?e.parent:a,o=Object.hasOwn(e,`parentProperty`)?e.parentProperty:o,e=e.path}if(a=a||null,o=o||null,Array.isArray(e)&&(e=$.toPathString(e)),!(!e&&e!==``||!t)){var l=$.toPathArray(e);l[0]===`$`&&l.length>1&&l.shift(),this._hasParentSelector=null;var u=this._trace(l,t,[`$`],a,o,n).filter(function(e){return e&&!e.isParentSelector});return u.length?!c&&u.length===1&&!u[0].hasArrExpr?this._getPreferredOutput(u[0]):u.reduce(function(e,t){var n=i._getPreferredOutput(t);return s&&Array.isArray(n)?e=e.concat(n):e.push(n),e},[]):c?[]:void 0}},$.prototype._getPreferredOutput=function(e){var t=this.currResultType;switch(t){case`all`:var n=Array.isArray(e.path)?e.path:$.toPathArray(e.path);return e.pointer=$.toPointer(n),e.path=typeof e.path==`string`?e.path:$.toPathString(e.path),e;case`value`:case`parent`:case`parentProperty`:return e[t];case`path`:return $.toPathString(e[t]);case`pointer`:return $.toPointer(e.path);default:throw TypeError(`Unknown result type`)}},$.prototype._handleCallback=function(e,t,n){if(t){var r=this._getPreferredOutput(e);e.path=typeof e.path==`string`?e.path:$.toPathString(e.path),t(r,n,e)}},$.prototype._trace=function(e,t,n,r,i,a,o,s){var c=this,l;if(!e.length)return l={path:n,value:t,parent:r,parentProperty:i,hasArrExpr:o},this._handleCallback(l,a,`value`),l;var u=e[0],f=e.slice(1),p=[];function m(e){Array.isArray(e)?e.forEach(function(e){p.push(e)}):p.push(e)}if((typeof u!=`string`||s)&&t&&Object.hasOwn(t,u))m(this._trace(f,t[u],Q(n,u),t,u,a,o));else if(u===`*`)this._walk(t,function(e){m(c._trace(f,t[e],Q(n,e),t,e,a,!0,!0))});else if(u===`..`)m(this._trace(f,t,n,r,i,a,o)),this._walk(t,function(r){O(t[r])===`object`&&m(c._trace(e.slice(),t[r],Q(n,r),t,r,a,!0))});else if(u===`^`)return this._hasParentSelector=!0,{path:n.slice(0,-1),expr:f,isParentSelector:!0};else if(u===`~`)return l={path:Q(n,u),value:i,parent:r,parentProperty:null},this._handleCallback(l,a,`property`),l;else if(u===`$`)m(this._trace(f,t,n,null,null,a,o));else if(/^(-?[0-9]*):(-?[0-9]*):?([0-9]*)$/.test(u))m(this._slice(u,f,t,n,r,i,a));else if(u.indexOf(`?(`)===0){if(this.currEval===!1)throw Error(`Eval [?(expr)] prevented in JSONPath expression.`);var h=u.replace(/^\?\(((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?)\)$/,`$1`),g=/@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])?((?:[\0->@-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)['\[](\??\((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\))(?!(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])\)\])['\]]/g.exec(h);g?this._walk(t,function(e){var o=[g[2]],s=g[1]?t[e][g[1]]:t[e];c._trace(o,s,n,r,i,a,!0).length>0&&m(c._trace(f,t[e],Q(n,e),t,e,a,!0))}):this._walk(t,function(e){c._eval(h,t[e],e,n,r,i)&&m(c._trace(f,t[e],Q(n,e),t,e,a,!0))})}else if(u[0]===`(`){if(this.currEval===!1)throw Error(`Eval [(expr)] prevented in JSONPath expression.`);m(this._trace(Tt(this._eval(u,t,n.at(-1),n.slice(0,-1),r,i),f),t,n,r,i,a,o))}else if(u[0]===`@`){var _=!1,v=u.slice(1,-2);switch(v){case`scalar`:(!t||![`object`,`function`].includes(O(t)))&&(_=!0);break;case`boolean`:case`string`:case`undefined`:case`function`:O(t)===v&&(_=!0);break;case`integer`:Number.isFinite(t)&&!(t%1)&&(_=!0);break;case`number`:Number.isFinite(t)&&(_=!0);break;case`nonFinite`:typeof t==`number`&&!Number.isFinite(t)&&(_=!0);break;case`object`:t&&O(t)===v&&(_=!0);break;case`array`:Array.isArray(t)&&(_=!0);break;case`other`:_=this.currOtherTypeCallback(t,n,r,i);break;case`null`:t===null&&(_=!0);break;default:throw TypeError(`Unknown value type `+v)}if(_)return l={path:n,value:t,parent:r,parentProperty:i},this._handleCallback(l,a,`value`),l}else if(u[0]==="`"&&t&&Object.hasOwn(t,u.slice(1))){var y=u.slice(1);m(this._trace(f,t[y],Q(n,y),t,y,a,o,!0))}else if(u.includes(`,`)){var b=d(u.split(`,`)),x;try{for(b.s();!(x=b.n()).done;){var S=x.value;m(this._trace(Tt(S,f),t,n,r,i,a,!0))}}catch(e){b.e(e)}finally{b.f()}}else !s&&t&&Object.hasOwn(t,u)&&m(this._trace(f,t[u],Q(n,u),t,u,a,o,!0));if(this._hasParentSelector)for(var C=0;C<p.length;C++){var w=p[C];if(w&&w.isParentSelector){var T=this._trace(w.expr,t,w.path,r,i,a,o);if(Array.isArray(T)){p[C]=T[0];for(var E=T.length,D=1;D<E;D++)C++,p.splice(C,0,T[D])}else p[C]=T}}return p},$.prototype._walk=function(e,t){if(Array.isArray(e))for(var n=e.length,r=0;r<n;r++)t(r);else e&&O(e)===`object`&&Object.keys(e).forEach(function(e){t(e)})},$.prototype._slice=function(e,t,n,r,i,a,o){if(Array.isArray(n)){var s=n.length,c=e.split(`:`),l=c[2]&&Number.parseInt(c[2])||1,u=c[0]&&Number.parseInt(c[0])||0,d=c[1]&&Number.parseInt(c[1])||s;u=u<0?Math.max(0,u+s):Math.min(s,u),d=d<0?Math.max(0,d+s):Math.min(s,d);for(var f=[],p=u;p<d;p+=l)this._trace(Tt(p,t),n,r,i,a,o,!0).forEach(function(e){f.push(e)});return f}},$.prototype._eval=function(e,t,n,r,i,a){var o=this;this.currSandbox._$_parentProperty=a,this.currSandbox._$_parent=i,this.currSandbox._$_property=n,this.currSandbox._$_root=this.json,this.currSandbox._$_v=t;var s=e.includes(`@path`);s&&(this.currSandbox._$_path=$.toPathString(r.concat([n])));var c=this.currEval+`Script:`+e;if(!$.cache[c]){var l=e.replaceAll(`@parentProperty`,`_$_parentProperty`).replaceAll(`@parent`,`_$_parent`).replaceAll(`@property`,`_$_property`).replaceAll(`@root`,`_$_root`).replaceAll(/@([\t-\r \)\.\[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])/g,`_$_v$1`);if(s&&(l=l.replaceAll(`@path`,`_$_path`)),this.currEval===`safe`||this.currEval===!0||this.currEval===void 0)$.cache[c]=new this.safeVm.Script(l);else if(this.currEval===`native`)$.cache[c]=new this.vm.Script(l);else if(typeof this.currEval==`function`&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,`runInNewContext`)){var u=this.currEval;$.cache[c]=new u(l)}else if(typeof this.currEval==`function`)$.cache[c]={runInNewContext:function(e){return o.currEval(l,e)}};else throw TypeError(`Unknown "eval" property "${this.currEval}"`)}try{return $.cache[c].runInNewContext(this.currSandbox)}catch(t){if(this.ignoreEvalErrors)return!1;throw Error(`jsonPath: `+t.message+`: `+e)}},$.cache={},$.toPathString=function(e){for(var t=e,n=t.length,r=`$`,i=1;i<n;i++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(t[i])||(r+=/^[\*0-9]+$/.test(t[i])?`[`+t[i]+`]`:`['`+t[i]+`']`);return r},$.toPointer=function(e){for(var t=e,n=t.length,r=``,i=1;i<n;i++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(t[i])||(r+=`/`+t[i].toString().replaceAll(`~`,`~0`).replaceAll(`/`,`~1`));return r},$.toPathArray=function(e){var t=$.cache;if(t[e])return t[e].concat();var n=[];return t[e]=e.replaceAll(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/g,`;$&;`).replaceAll(/['\[](\??\((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\))['\]](?!(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])\])/g,function(e,t){return`[#`+(n.push(t)-1)+`]`}).replaceAll(/\[["']((?:[\0-&\(-\\\^-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)["']\]/g,function(e,t){return`['`+t.replaceAll(`.`,`%@%`).replaceAll(`~`,`%%@@%%`)+`']`}).replaceAll(`~`,`;~;`).replaceAll(/["']?\.["']?(?!(?:[\0-Z\\-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*\])|\[["']?/g,`;`).replaceAll(`%@%`,`.`).replaceAll(`%%@@%%`,`~`).replaceAll(/(?:;)?(\^+)(?:;)?/g,function(e,t){return`;`+t.split(``).join(`;`)+`;`}).replaceAll(/;;;|;;/g,`;..;`).replaceAll(/;$|'?\]|'$/g,``).split(`;`).map(function(e){var t=e.match(/#([0-9]+)/);return!t||!t[1]?e:n[t[1]]}),t[e].concat()},$.prototype.safeVm={Script:wt};var Dt=function(e,t,n){for(var r=e.length,i=0;i<r;i++){var a=e[i];n(a)&&t.push(e.splice(i--,1)[0])}},Ot=function(){function e(t){s(this,e),this.code=t}return u(e,[{key:`runInNewContext`,value:function(e){var t=this.code,n=Object.keys(e),r=[];Dt(n,r,function(t){return typeof e[t]==`function`});var i=n.map(function(t){return e[t]});t=r.reduce(function(t,n){var r=e[n].toString();return/function/.test(r)||(r=`function `+r),`var `+n+`=`+r+`;`+t},``)+t,!/(["'])use strict\1/.test(t)&&!n.includes(`arguments`)&&(t=`var arguments = undefined;`+t),t=t.replace(/;[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*$/,``);var a=t.lastIndexOf(`;`),o=a===-1?` return `+t:t.slice(0,a+1)+` return `+t.slice(a+1);return c(Function,n.concat([o])).apply(void 0,E(i))}}])}();$.prototype.vm={Script:Ot};function kt(e){var t,n=e.querySelector(`[data-configurator-options]`),r=(t=n)==null?void 0:t.getAttribute(`data-configurator-options`);if(r&&(n=document.querySelector(r)),!n)return null;try{var i,a,o=(i=(a=n.textContent)==null?void 0:a.trim())==null?``:i;return o.startsWith(`{`)||(o=`{`+o+`}`),Function(`return (${o})`)()}catch(e){return console.warn(e),null}}function At(e,t,n){var r,i=n.calcIdAttribute,a=i===void 0?`data-calc-id`:i,o=n.calcPlaceSelector,s=t.getAttribute(a);if(!s)return null;var c=typeof o==`function`?o(s):o,l=(r=t.querySelector(c))==null?t:r;return e===void 0||!e[s]?null:{data:e[s],uniqId:s+`-`+Math.random().toString(36).slice(2,7),id:s,placeNode:l}}function jt(e,t){var n=S({},arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});function r(t,r){var i=t.replace(/\$get:([a-zA-Z0-9_.-]+)/g,function(e,t){return String(n[t])});if(i.startsWith(`$save:`)){var a=i.replace(`$save:`,``);return n[a]=r,r}switch(i){case`$root`:return e;case`$first`:return r[0];case`$last`:var o=r;return o[o.length-1];default:return $({path:i,json:r})}}var i=t.split(`||`).map(function(e){return e.trim()}),a=null;do{a=e;for(var o=i.shift().split(`>`).map(function(e){return e.trim()});o.length;)if(a=r(o.shift(),a),a==null||Array.isArray(a)&&!a.length){a=null;break}if(a!==null)break}while(i.length);return a}function Mt(e,t,n){var r=At(e,t,n);if(!r)return;var i=r.id,a=r.uniqId,o=r.data,s=r.placeNode,c=kt(t);if(!c)return;var l=c.oldPricePercent,u=c.getPrice,d=c.sections,f=c.fields;t.setAttribute(`data-calc-id`,a);var p=new pt({id:a,parentSelector:`[data-calc-id="${a}"]`,data:o,editableFields:[],sectionsOptions:[],initialValues:n.initialValues});p.addField({selector:`price`,calculateFunction:function(e,t){return u(e,t,i,p)}}),p.addField({selector:`old-price`,calculateFunction:function(){return p.getValue(`price`)/((100-l)/100)}});function m(e,t){return e.postfix===void 0?``:typeof e.postfix==`function`?e.postfix(t):e.postfix}var h={calculateFunction:function(e){return d.map(function(t){var n=e[t.key];return n===void 0?null:n+m(t,n)}).filter(Boolean).join(` `)}};p.addField(S({selector:`params`},h)),p.addField(S({selector:`params-attr`,attribute:!0},h));var g={calculateFunction:function(e){return d.map(function(t){var n=e[t.key];return n===void 0?null:`${t.title}: ${n}${m(t,n)}`}).filter(Boolean).join(`
6
6
  `)}};p.addField(S({selector:`params-view`},g)),p.addField(S({selector:`params-view-attr`,attribute:!0},g));var _=[`price`,`old-price`];d.forEach(function(e){p.addField({selector:e.key,calculateFunction:function(t){return t[e.key]}}),_.push(e.key),p.addField({selector:`${e.key}-view`,calculateFunction:function(t){var n=t[e.key],r=jt(o,e.path,t);return typeof e.selectorDisplay==`function`?e.selectorDisplay(n,r):n}});function t(e,t){var n,r,i=(r=((n=t.labelMapping)==null?{}:n)[e])==null?e:r;return i+m(t,i)}p.addSection({title:e.title,type:e.key,dependsOn:e.dependsOn,inputs:Array.isArray(e.inputs)?e.inputs:function(n){var r=jt(o,e.path,n);return r?typeof e.transformInputs==`function`?e.transformInputs(r):r.map(function(n){var r={label:t(n,e),value:n};return typeof e.isDisabled==`function`&&(r.disabled=e.isDisabled(r)),r}):[]}})}),Array.isArray(f)&&f.forEach(function(e){p.addField({selector:e.selector,attribute:!!e.attribute,calculateFunction:function(t,n){return e.get(t,n,i,p)}})}),_.forEach(function(e){p.addField({selector:e,attribute:!0,calculateFunction:function(){return p.getValue(e)}})}),p.render(s)}return e.Calculator=pt,e.getOptions=At,e.initConfigurator=Mt,e.queryByPath=jt,e})({});
@@ -737,7 +737,7 @@ var it = function(e) {
737
737
  };
738
738
  function at(e) {
739
739
  var t = e.options, n = e.inputs, r = e.checkedValue, i = e.stylePrefix, a = e.dataAttributePrefix, o = e.prefix, s = e.id, c = t.title, l = c === void 0 ? "" : c, u = t.type, f = t.className, p = f === void 0 ? "" : f, m = t.checked, h = m === void 0 ? !0 : m, g = t.inputType, _ = g === void 0 ? "radio" : g, v = it(i);
740
- return n.length ? /* @__PURE__ */ K("div", d(d({ class: v("section") }, `data-${a}-section-type`, u), "children", [l && /* @__PURE__ */ K("h4", {
740
+ return n.length ? /* @__PURE__ */ K("div", d(d({ class: v("section") }, `data-${a}-section-type`, u), "children", [l && /* @__PURE__ */ K("div", {
741
741
  class: v("section-title"),
742
742
  children: [l, ":"]
743
743
  }), /* @__PURE__ */ K("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ov-configurator",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Universal frontend product configurator module",
5
5
  "type": "module",
6
6
  "main": "./dist/ov-configurator.cjs",