UNPKG

@bigcommerce/stencil-utils

Version:

Utility library used by BigCommerce Stencil Framework themes

1 lines 41.3 kB
var stencilUtils;!function(){"use strict";var t={954:function(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}function u(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}r.r(e),r.d(e,{api:function(){return Bt},default:function(){return Ut},hooks:function(){return R},tools:function(){return qt}});var l=r(729);var p=function(t){s(i,t);var e,r,n=(e=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=f(e);if(r){var o=f(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return u(this,t)});function i(){return o(this,i),n.apply(this,arguments)}return c(i,[{key:"subscribe",value:function(t,e,r){document.addEventListener(t,(function(t){for(var n=t.target;n&&n!==this;n=n.parentNode)if(n.matches(e)){r.call(n,t,n);break}}),!1)}}]),i}(r.n(l)());var h=function(t){s(i,t);var e,r,n=(e=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=f(e);if(r){var o=f(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return u(this,t)});function i(){var t;return o(this,i),(t=n.call(this)).itemAdd(),t}return c(i,[{key:"itemAdd",value:function(){var t=this;this.subscribe("submit","[data-cart-item-add]",(function(e,r){t.emit("cart-item-add",e,r)}))}}]),i}(p);var y=function(t){s(i,t);var e,r,n=(e=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=f(e);if(r){var o=f(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return u(this,t)});function i(){return o(this,i),n.apply(this,arguments)}return c(i)}(p);var d=function(t){s(i,t);var e,r,n=(e=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=f(e);if(r){var o=f(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return u(this,t)});function i(){var t;return o(this,i),(t=n.call(this)).currencySelector(),t}return c(i,[{key:"currencySelector",value:function(){var t=this;this.subscribe("input","[data-currency-selector-toggle]",(function(e){t.emit("currencySelector-toggle",e)}))}}]),i}(p);var v=function(t){s(i,t);var e,r,n=(e=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=f(e);if(r){var o=f(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return u(this,t)});function i(){var t;return o(this,i),(t=n.call(this)).optionsChange(),t}return c(i,[{key:"optionsChange",value:function(){var t=this;this.subscribe("change","[data-product-option-change]",(function(e,r){t.emit("product-option-change",e,r)}))}}]),i}(p);var m=function(t){s(i,t);var e,r,n=(e=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=f(e);if(r){var o=f(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return u(this,t)});function i(){var t;return o(this,i),(t=n.call(this)).quickSearch(),t}return c(i,[{key:"quickSearch",value:function(){var t=this;this.subscribe("input","[data-search-quick]",(function(e,r){t.emit("search-quick",e,r)}))}}]),i}(p);var b=function(t){s(i,t);var e,r,n=(e=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=f(e);if(r){var o=f(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return u(this,t)});function i(){var t;return o(this,i),(t=n.call(this)).searchEvents(),t}return c(i,[{key:"searchEvents",value:function(){var t=this;this.subscribe("click","[data-faceted-search-facet]",(function(e,r){t.emit("facetedSearch-facet-clicked",e,r)})),this.subscribe("submit","[data-faceted-search-range]",(function(e,r){t.emit("facetedSearch-range-submitted",e,r)}))}}]),i}(p);Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(t){var e=this;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null});var g=function(t){s(i,t);var e,r,n=(e=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=f(e);if(r){var o=f(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return u(this,t)});function i(){var t;return o(this,i),(t=n.call(this)).sortByEvents(),t}return c(i,[{key:"sortByEvents",value:function(){var t=this;this.subscribe("submit","[data-sort-by]",(function(e,r){t.emit("sortBy-submitted",e,r)})),this.subscribe("change","[data-sort-by] select",(function(e,r){t.emit("sortBy-select-changed",e,r),e.defaultPrevented||t.emit("sortBy-submitted",e,r)}))}}]),i}(p),O={};O.classes={cart:new h,cookie:new y,currencySelector:new d,product:new v,search:new m,facetedSearch:new b,sortBy:new g},O.parseHooks=function(t){var e=t.split("-")[0];if(void 0===O.classes[e])throw new Error("".concat(e," is not a valid hookType"));return O.classes[e]};var w=function(){function t(){o(this,t)}return c(t,[{key:"on",value:function(t,e){return O.parseHooks(t).on(t,e)}},{key:"off",value:function(t,e){return O.parseHooks(t).off(t,e)}},{key:"emit",value:function(t){var e=O.parseHooks(t);return e.emit.apply(e,arguments)}}]),t}(),R=new w;function E(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var j="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==j&&j,_="URLSearchParams"in j,P="Symbol"in j&&"iterator"in Symbol,k="FileReader"in j&&"Blob"in j&&function(){try{return new Blob,!0}catch(t){return!1}}(),A="FormData"in j,T="ArrayBuffer"in j;if(T)var x=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],B=ArrayBuffer.isView||function(t){return t&&x.indexOf(Object.prototype.toString.call(t))>-1};function S(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function C(t){return"string"!=typeof t&&(t=String(t)),t}function I(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return P&&(e[Symbol.iterator]=function(){return e}),e}function q(t){this.map={},t instanceof q?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function D(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function U(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function G(t){var e=new FileReader,r=U(e);return e.readAsArrayBuffer(t),r}function L(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function F(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:k&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:A&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:_&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():T&&k&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=L(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):T&&(ArrayBuffer.prototype.isPrototypeOf(t)||B(t))?this._bodyArrayBuffer=L(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):_&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},k&&(this.blob=function(){var t=D(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?D(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(G)}),this.text=function(){var t,e,r,n=D(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,r=U(e=new FileReader),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},A&&(this.formData=function(){return this.text().then(M)}),this.json=function(){return this.text().then(JSON.parse)},this}q.prototype.append=function(t,e){t=S(t),e=C(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},q.prototype.delete=function(t){delete this.map[S(t)]},q.prototype.get=function(t){return t=S(t),this.has(t)?this.map[t]:null},q.prototype.has=function(t){return this.map.hasOwnProperty(S(t))},q.prototype.set=function(t,e){this.map[S(t)]=C(e)},q.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},q.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),I(t)},q.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),I(t)},q.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),I(t)},P&&(q.prototype[Symbol.iterator]=q.prototype.entries);var H=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function N(t,e){if(!(this instanceof N))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,n,o=(e=e||{}).body;if(t instanceof N){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new q(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new q(e.headers)),this.method=(n=(r=e.method||this.method||"GET").toUpperCase(),H.indexOf(n)>-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var i=/([?&])_=[^&]*/;i.test(this.url)?this.url=this.url.replace(i,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function M(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}})),e}function V(t,e){if(!(this instanceof V))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new q(e.headers),this.url=e.url||"",this._initBody(t)}N.prototype.clone=function(){return new N(this,{body:this._bodyInit})},F.call(N.prototype),F.call(V.prototype),V.prototype.clone=function(){return new V(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new q(this.headers),url:this.url})},V.error=function(){var t=new V(null,{status:0,statusText:""});return t.type="error",t};var $=[301,302,303,307,308];V.redirect=function(t,e){if(-1===$.indexOf(e))throw new RangeError("Invalid status code");return new V(null,{status:e,headers:{location:t}})};var Q=j.DOMException;try{new Q}catch(t){(Q=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack}).prototype=Object.create(Error.prototype),Q.prototype.constructor=Q}function z(t,e){return new Promise((function(r,n){var o=new N(t,e);if(o.signal&&o.signal.aborted)return n(new Q("Aborted","AbortError"));var i=new XMLHttpRequest;function c(){i.abort()}i.onload=function(){var t,e,n={status:i.status,statusText:i.statusText,headers:(t=i.getAllResponseHeaders()||"",e=new q,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}})),e)};n.url="responseURL"in i?i.responseURL:n.headers.get("X-Request-URL");var o="response"in i?i.response:i.responseText;setTimeout((function(){r(new V(o,n))}),0)},i.onerror=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},i.ontimeout=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},i.onabort=function(){setTimeout((function(){n(new Q("Aborted","AbortError"))}),0)},i.open(o.method,function(t){try{return""===t&&j.location.href?j.location.href:t}catch(e){return t}}(o.url),!0),"include"===o.credentials?i.withCredentials=!0:"omit"===o.credentials&&(i.withCredentials=!1),"responseType"in i&&(k?i.responseType="blob":T&&o.headers.get("Content-Type")&&-1!==o.headers.get("Content-Type").indexOf("application/octet-stream")&&(i.responseType="arraybuffer")),!e||"object"!=typeof e.headers||e.headers instanceof q?o.headers.forEach((function(t,e){i.setRequestHeader(e,t)})):Object.getOwnPropertyNames(e.headers).forEach((function(t){i.setRequestHeader(t,C(e.headers[t]))})),o.signal&&(o.signal.addEventListener("abort",c),i.onreadystatechange=function(){4===i.readyState&&o.signal.removeEventListener("abort",c)}),i.send(void 0===o._bodyInit?null:o._bodyInit)}))}function J(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function X(t,e){if(t){if("string"==typeof t)return J(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?J(t,e):void 0}}function W(t){return function(t){if(Array.isArray(t))return J(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||X(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}z.polyfill=!0,j.fetch||(j.fetch=z,j.Headers=q,j.Request=N,j.Response=V);var K=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,(function(t){return"%".concat(t.charCodeAt(0).toString(16).toUpperCase())}))},Y=function t(e){return Array.isArray(e)?e.sort():"object"===n(e)?t(Object.keys(e)).sort((function(t,e){return Number(t)-Number(e)})).map((function(t){return e[t]})):e},Z=function(t){return function(e){return function(r,o){if(void 0===o)return r;if(null===o)return[].concat(W(r),[K(e)]);if(t.includeArrayIndex){if("object"===n(o)){var i=r.length/Object.keys(o).length;return r.concat(Object.keys(o).map((function(t){return[K(e),"[",K(i),"]","[",K(t),"]=",K(o[t])].join("")})))}var c=r.length;return[].concat(W(r),[[K(e),"[",K(c),"]=",K(o)].join("")])}return[].concat(W(r),[[K(e),"=",K(o)].join("")])}}};function tt(t){var e=Object.create(null);if("string"!=typeof t)return e;var r=t.trim().replace(/^[?#&]/,"");return r?(r.split("&").forEach((function(t){var r,n,o,i,c=(r=t.replace(/\+/g," "),"=",o=-1===(n=r.indexOf("="))?[r]:[r.slice(0,n),r.slice(n+"=".length)],i=2,function(t){if(Array.isArray(t))return t}(o)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],c=!0,a=!1;try{for(r=r.call(t);!(c=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);c=!0);}catch(t){a=!0,o=t}finally{try{c||null==r.return||r.return()}finally{if(a)throw o}}return i}}(o,i)||X(o,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=c[0],s=c[1];a=decodeURIComponent(a),s=void 0===s?null:decodeURIComponent(s),e[a]=function(t,e,r){return void 0===r[t]?e:[].concat(r[t],e)}(a,s,e)})),Object.keys(e).sort().reduce((function(t,r){var o=e[r];return Boolean(o)&&"object"===n(o)&&!Array.isArray(o)?t[r]=Y(o):t[r]=o,t}),Object.create(null))):e}function et(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{filterValues:!1,arrayIndex:!1};if(!t)return"";var r={},n=function(r){return e.filterValues&&(""===t[r]||void 0===t[r])};Object.keys(t).forEach((function(e){n(e)||(r[e]=t[e])}));var o=Object.keys(r);return o.sort(),o.map((function(r){var n=t[r];return void 0===n?"":null===n?K(r):Array.isArray(n)?n.reduce(Z(e)(r),[]).join("&"):"".concat(K(r),"=").concat(K(n))})).filter((function(t){return t.length>0})).join("&")}function rt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function nt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?rt(Object(r),!0).forEach((function(e){E(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var ot=function(t){return null!==t&&"object"===n(t)&&!Array.isArray(t)};function it(t,e,r){var o,i=nt(nt({},{method:"GET",remote:!1,requestOptions:{baseUrl:null,formData:null,params:{},config:{},template:[]}}),e),c=i.requestOptions.formData?i.requestOptions.formData:i.requestOptions.params,a={"stencil-config":i.requestOptions.config?JSON.stringify(i.requestOptions.config):"{}","stencil-options":"{}","x-xsrf-token":window.BCData&&window.BCData.csrf_token?window.BCData.csrf_token:"","x-requested-with":"stencil-utils"},s=i.requestOptions.abortSignal||null;if(o=i.method,-1===["GET","POST","PUT","DELETE"].indexOf(o))return r(new Error("Not a valid HTTP method"));var u=function(t){var e=[];return ot(t)?e=Object.values(t):"string"==typeof t?e=[t]:Array.isArray(t)&&t.length>0&&(e=t),e}(i.requestOptions.template),f=ot(i.requestOptions.template),l=u.length>0;i.requestOptions.formData||(a["content-type"]="application/x-www-form-urlencoded; charset=UTF-8"),l&&(a["stencil-options"]=JSON.stringify({render_with:u.join(",")}));var p={method:i.method,headers:a,credentials:"include",signal:s},h=i.requestOptions.baseUrl?"".concat(i.requestOptions.baseUrl).concat(t):t;if(-1===["GET","HEAD"].indexOf(p.method))p.body=i.requestOptions.formData?c:et(c,{includeArrayIndex:!0});else if(c){var y=h.includes("?")?"&":"?";h+="".concat(y).concat(et(c))}return fetch(h,p).then((function(t){var e=null;return 401===t.status&&-1!==t.headers.get("X-BC-Preview-Mode").indexOf("true")?window.location.reload():e=-1!==t.headers.get("content-type").indexOf("application/json")?t.json():t.text(),e})).then((function(t){var e=i.remote?t.content:t,o=t;if(l){if("object"===n(e)&&Object.keys(e).forEach((function(t){var r=t.replace(/^components\//,"");e[r]=e[t],delete e[t]})),f){var c=i.requestOptions.template;Object.keys(c).forEach((function(t){e[t]=e[c[t]],delete e[c[t]]}))}i.remote||(o=e)}r(null,o)})).catch((function(t){return r(t)}))}var ct=function(){function t(e){o(this,t),this.remoteVersion=e||"v1",this.remoteBaseEndpoint="/remote/"}return c(t,[{key:"makeRequest",value:function(t,e,r,n,o){it(t,{method:e,remote:n,requestOptions:r},o)}},{key:"remoteRequest",value:function(t,e,r,n){var o=this.remoteBaseEndpoint+this.remoteVersion+t;this.makeRequest(o,e,r,!0,n)}}]),t}();var at=function(t){s(i,t);var e,r,n=(e=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=f(e);if(r){var o=f(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return u(this,t)});function i(t){var e;return o(this,i),(e=n.call(this,t)).endpoint="/country-states/",e}return c(i,[{key:"getById",value:function(t,e){var r=this.endpoint+t;this.remoteRequest(r,"GET",{},e)}},{key:"getByName",value:function(t,e,r){var n=e||{},o=r;"function"==typeof n&&(o=n,n={});var i=this.endpoint+t;this.remoteRequest(i,"GET",n,o)}}]),i}(ct);var st=function(t){s(i,t);var e,r,n=(e=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=f(e);if(r){var o=f(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return u(this,t)});function i(t){var e;return o(this,i),(e=n.call(this,t)).endpoint="/products.php?productId=",e}return c(i,[{key:"getById",value:function(t,e,r){var n=this.endpoint+t,o=e,i=r;"function"==typeof o&&(i=o,o={}),this.makeRequest(n,"GET",o,!1,i)}}]),i}(ct);function ut(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ft(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ut(Object(r),!0).forEach((function(e){E(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var lt=function(t){s(i,t);var e,r,n=(e=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=f(e);if(r){var o=f(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return u(this,t)});function i(t){var e;return o(this,i),(e=n.call(this,t)).endpoint="/product-attributes/",e.inCartEndpoint="/configure-options/",e}return c(i,[{key:"optionChange",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=r,c=n,a=o;"function"==typeof i&&(a=c||{},c=i,i=null),this.remoteRequest(this.endpoint+t,"POST",ft(ft({},a),{},{params:tt(e),template:i}),(function(t,e){var r={err:t,response:e};R.emit("product-options-change-remote",r),c(t,e)}))}},{key:"configureInCart",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.remoteRequest(this.inCartEndpoint+t,"GET",ft(ft({},e),n),(function(t,e){r(t,e)}))}}]),i}(ct);var pt=function(t){s(i,t);var e,r,n=(e=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=f(e);if(r){var o=f(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return u(this,t)});function i(t){var e;return o(this,i),(e=n.call(this,t)).endpoint="/search.php?search_query=",e}return c(i,[{key:"search",value:function(t,e,r){this.abortController&&this.abortController.abort();var n=this.endpoint+encodeURIComponent(t),o=e,i=r;"function"==typeof o&&(i=o,o={}),R.emit("search-quick-remote",t),this.abortController=new AbortController,o.abortSignal=this.abortController.signal,this.makeRequest(n,"GET",o,!1,i)}}]),i}(ct),ht={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let yt;const dt=new Uint8Array(16);function vt(){if(!yt&&(yt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!yt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return yt(dt)}const mt=[];for(let t=0;t<256;++t)mt.push((t+256).toString(16).slice(1));var bt=function(t,e,r){if(ht.randomUUID&&!e&&!t)return ht.randomUUID();const n=(t=t||{}).random||(t.rng||vt)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=n[t];return e}return function(t,e=0){return(mt[t[e+0]]+mt[t[e+1]]+mt[t[e+2]]+mt[t[e+3]]+"-"+mt[t[e+4]]+mt[t[e+5]]+"-"+mt[t[e+6]]+mt[t[e+7]]+"-"+mt[t[e+8]]+mt[t[e+9]]+"-"+mt[t[e+10]]+mt[t[e+11]]+mt[t[e+12]]+mt[t[e+13]]+mt[t[e+14]]+mt[t[e+15]]).toLowerCase()}(n)},gt=function(){return void 0!==window.bodlEvents},Ot={cart:{addItem:function(){},removeItem:function(){},emit:function(){}},AddCartItemEvent:{CREATE:"create_add_cart_item"},RemoveCartItemEvent:{CREATE:"create_remove_cart_item"}},wt=c((function t(){o(this,t),this.bodlEvents=gt()?window.bodlEvents:Ot}));function Rt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Et(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Rt(Object(r),!0).forEach((function(e){E(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var jt=function(t){s(i,t);var e,r,n=(e=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=f(e);if(r){var o=f(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return u(this,t)});function i(){return o(this,i),n.apply(this,arguments)}return c(i,[{key:"emitAddItem",value:function(t){this.emit(this.bodlEvents.AddCartItemEvent.CREATE,t)}},{key:"emitRemoveItem",value:function(t){this.shouldEmitRemoveItem(t)&&this.emit(this.bodlEvents.RemoveCartItemEvent.CREATE,t)}},{key:"shouldEmitRemoveItem",value:function(t){var e;return(null===(e=t.data.line_items)||void 0===e?void 0:e.length)>0}},{key:"emit",value:function(t,e){var r=this.preparePayload(e);this.bodlEvents.cart.emit(t,r)}},{key:"preparePayload",value:function(t){return gt()&&!t.data.error?{event_id:bt(),channel_id:t.data.channel_id,currency:t.data.currency,product_value:t.data.product_value,line_items:t.data.line_items.map((function(t){return Et(Et({},t),{},{product_id:String(t.product_id)})}))}:{}}}]),i}(wt),_t=jt;function Pt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function kt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Pt(Object(r),!0).forEach((function(e){E(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var At=function(t){s(i,t);var e,r,n=(e=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=f(e);if(r){var o=f(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return u(this,t)});function i(t){var e;return o(this,i),(e=n.call(this,t)).bodlEventsCart=null,e}return c(i,[{key:"getBodlEventsCart",value:function(){return this.bodlEventsCart||(this.bodlEventsCart=new _t),this.bodlEventsCart}},{key:"getCarts",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,r="/api/storefront/carts";t.includeOptions&&(r=this.includeOptions(r)),this.makeRequest(r,"GET",t,!0,(function(t,r){e(t,r)}))}},{key:"getCart",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;if(!t.cartId)return this.getCarts(t,(function(t,r){return e(t,r[0])}));var r="/api/storefront/carts/".concat(t.cartId);t.includeOptions&&(r=this.includeOptions(r)),this.makeRequest(r,"GET",t,!0,(function(t,r){e(t,r)}))}},{key:"getCartSummary",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,r="/api/storefront/cart-summary";this.makeRequest(r,"GET",t,!0,(function(t,r){e(t,r)}))}},{key:"includeOptions",value:function(t){return"".concat(t,"?include=lineItems.physicalItems.options,lineItems.digitalItems.options")}},{key:"getCartQuantity",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;this.getCartSummary(t,(function(t,r){if(t)return e(t);var n=0;r&&204!==r.status&&r.total_quantity&&(n=r.total_quantity),e(null,n)}))}},{key:"itemAdd",value:function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.handleItemAdd(t,(function(t,n){t||r.getBodlEventsCart().emitAddItem(n),e(t,n)}),n)}},{key:"handleItemAdd",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.baseUrl;this.remoteRequest("/cart/add","POST",{formData:t,baseUrl:n},(function(t,r){var n={err:t,response:r};R.emit("cart-item-add-remote",n),e(t,r)}))}},{key:"itemUpdate",value:function(t,e,r){var n,o=this,i=r;Array.isArray(t)&&"function"==typeof e?(i=e,n=t):n=[{id:t,quantity:e}],this.update(n,(function(t,r){var c={items:n,err:t,response:r};0!==e||t||o.getBodlEventsCart().emitRemoveItem(r),R.emit("cart-item-update-remote",c),i(t,r)}))}},{key:"itemRemove",value:function(t,e){var r=this;this.handleItemRemove(t,(function(t,n){t||r.getBodlEventsCart().emitRemoveItem(n),e(t,n)}))}},{key:"handleItemRemove",value:function(t,e){var r=[{id:t,quantity:0}];this.update(r,(function(t,n){var o={items:r,err:t,response:n};R.emit("cart-item-remove-remote",o),e(t,n)}))}},{key:"getItemGiftWrappingOptions",value:function(t,e,r){var n=e||{},o=r;"function"==typeof n&&(o=n,n={}),this.remoteRequest("/gift-wrapping/".concat(t),"GET",n,o)}},{key:"submitItemGiftWrappingOption",value:function(t,e,r){this.remoteRequest("/gift-wrapping/".concat(t),"POST",{params:e},r)}},{key:"update",value:function(t,e){var r={items:t};this.remoteRequest("/cart/update","POST",{params:r},e)}},{key:"postFormData",value:function(t,e){this.makeRequest("/cart.php","POST",{formData:t},!1,e)}},{key:"getContent",value:function(t,e){var r=t||{},n=e;"function"==typeof r&&(n=r,r={}),this.makeRequest("/cart.php","GET",r,!1,n)}},{key:"getShippingQuotes",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r,i=e,c=n;"function"!=typeof o&&(c=o||{},o=i,i=null);var a=kt(kt({},c),{},{params:t});i&&(a.template=i),this.remoteRequest("/shipping-quote","GET",a,o)}},{key:"submitShippingQuote",value:function(t,e){var r={params:{shipping_method:t}};this.remoteRequest("/shipping-quote","POST",r,e)}},{key:"applyCode",value:function(t,e){var r={params:{code:t}};this.remoteRequest("/apply-code","POST",r,e)}},{key:"applyGiftCertificate",value:function(t,e){var r={params:{code:t}};this.remoteRequest("/gift-certificates","POST",r,e)}}]),i}(ct);var Tt=function(t){s(i,t);var e,r,n=(e=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=f(e);if(r){var o=f(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return u(this,t)});function i(){return o(this,i),n.apply(this,arguments)}return c(i,[{key:"itemAdd",value:function(t,e,r,n){var o="/wishlist.php?action=add&wishlistid=".concat(t,"&product_id=").concat(e),i=r,c=n;"function"==typeof i&&(c=i,i={}),this.makeRequest(o,"POST",i,!1,c)}}]),i}(ct),xt={getPage:function(t,e,r){it(t,{method:"GET",requestOptions:e},r)},getPageByGQL:function(t,e){it("/graphql-render",{method:"GET",requestOptions:{params:{template_name:t}}},e)}},Bt={country:new at,productAttributes:new lt,product:new st,search:new pt,cart:new At,wishlist:new Tt,getPage:xt.getPage,getPageByGQL:xt.getPageByGQL},St=function(){function t(){o(this,t)}return c(t,[{key:"getSrc",value:function(t,e){var r;if("object"===n(e)){var o=e.width||100,i=e.height||100;r="".concat(o,"x").concat(i)}else r="string"==typeof e&&/(^\d+w$)|(^(\d+?)x(\d+?)$)/g.test(e)?e:"original";return t.replace("{:size}",r)}}]),t}(),Ct=function(){function t(){o(this,t)}return c(t,[{key:"getSrcset",value:function(t,e){var r=/(^\d+w$)|(^(\d+?)x(\d+?)$)/,n=/(^\d+w$)|(^([0-9](\.[0-9]+)?)x)$/,o={};if(e){if(e!==Object(e)||Object.keys(e).some((function(t){return!(n.test(t)&&r.test(e[t]))})))throw new Error("Invalid srcset descriptor or size");if(o=e,1===Object.keys(o).length)return t.replace("{:size}",o[Object.keys(o)[0]])}else o={"80w":"80w","160w":"160w","320w":"320w","640w":"640w","960w":"960w","1280w":"1280w","1920w":"1920w","2560w":"2560w"};return Object.keys(o).map((function(e){return[t.replace("{:size}",o[e]),e].join(" ")})).join(", ")}}]),t}(),It=function(){function t(){o(this,t)}return c(t,[{key:"storageAvailable",value:function(t){var e=window[t];try{var r="__storage_test__";return e.setItem(r,r),e.removeItem(r),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==e.length}}},{key:"localStorageAvailable",value:function(){return this.storageAvailable("localStorage")}}]),t}(),qt={image:new St,imageSrcset:new Ct,storage:new It};t=r.hmd(t);var Dt={hooks:R,api:Bt,tools:qt},Ut=Dt;"function"==typeof define&&r.amdO,"object"===n(t)&&t.exports?t.exports=Dt:window.stencilUtils=Dt},729:function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}function o(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function i(t,e,n,i,c){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new o(n,i||t,c),s=r?r+e:e;return t._events[s]?t._events[s].fn?t._events[s]=[t._events[s],a]:t._events[s].push(a):(t._events[s]=a,t._eventsCount++),t}function c(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.prototype.eventNames=function(){var t,n,o=[];if(0===this._eventsCount)return o;for(n in t=this._events)e.call(t,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o},a.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,c=new Array(i);o<i;o++)c[o]=n[o].fn;return c},a.prototype.listenerCount=function(t){var e=r?r+t:t,n=this._events[e];return n?n.fn?1:n.length:0},a.prototype.emit=function(t,e,n,o,i,c){var a=r?r+t:t;if(!this._events[a])return!1;var s,u,f=this._events[a],l=arguments.length;if(f.fn){switch(f.once&&this.removeListener(t,f.fn,void 0,!0),l){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,e),!0;case 3:return f.fn.call(f.context,e,n),!0;case 4:return f.fn.call(f.context,e,n,o),!0;case 5:return f.fn.call(f.context,e,n,o,i),!0;case 6:return f.fn.call(f.context,e,n,o,i,c),!0}for(u=1,s=new Array(l-1);u<l;u++)s[u-1]=arguments[u];f.fn.apply(f.context,s)}else{var p,h=f.length;for(u=0;u<h;u++)switch(f[u].once&&this.removeListener(t,f[u].fn,void 0,!0),l){case 1:f[u].fn.call(f[u].context);break;case 2:f[u].fn.call(f[u].context,e);break;case 3:f[u].fn.call(f[u].context,e,n);break;case 4:f[u].fn.call(f[u].context,e,n,o);break;default:if(!s)for(p=1,s=new Array(l-1);p<l;p++)s[p-1]=arguments[p];f[u].fn.apply(f[u].context,s)}}return!0},a.prototype.on=function(t,e,r){return i(this,t,e,r,!1)},a.prototype.once=function(t,e,r){return i(this,t,e,r,!0)},a.prototype.removeListener=function(t,e,n,o){var i=r?r+t:t;if(!this._events[i])return this;if(!e)return c(this,i),this;var a=this._events[i];if(a.fn)a.fn!==e||o&&!a.once||n&&a.context!==n||c(this,i);else{for(var s=0,u=[],f=a.length;s<f;s++)(a[s].fn!==e||o&&!a[s].once||n&&a[s].context!==n)&&u.push(a[s]);u.length?this._events[i]=1===u.length?u[0]:u:c(this,i)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&c(this,e)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,t.exports=a}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={id:n,loaded:!1,exports:{}};return t[n](i,i.exports,r),i.loaded=!0,i.exports}r.amdO={},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.hmd=function(t){return(t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n=r(954);stencilUtils=n}();