/*! Built with http://stenciljs.com */
const{h:e}=window.webcomponents;var t="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},n=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})};class r{static arrayRemoveValue(e,t){return e.filter(function(e){return e!=t})}static arraySetUnique(e){let t={};for(let n=0;n<e.length;n++)t[e[n]]=!0;let n=[];for(let e in t)n.push(e);return n}static castToType(e){let t=e;return Number(t)&&"true"!==t&&"false"!==t&&(t=Number(t)),"0"===t&&(t=0),"true"===t&&(t=!0),"false"===t&&(t=!1),t}static copy(e){return JSON.parse(JSON.stringify(e))}static deepAssign(e,...t){if(!t.length)return e;const n=t.shift();return void 0===n?e:(r.isMergebleObject(e)&&r.isMergebleObject(n)&&Object.keys(n).forEach(function(t){r.isMergebleObject(n[t])?(e[t]||(e[t]={}),r.deepAssign(e[t],n[t])):e[t]=n[t]}),r.deepAssign(e,...t))}static fetchJson(e){return n(this,void 0,void 0,function*(){return yield(yield fetch(e).catch(e=>{console.error(e)})).json()})}static getGlobal(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==t)return t;throw new Error("unable to locate global object")}static getTimeStamp(e=null){return e?"string"==typeof e?Math.round(+new Date(e)/1e3):Math.round(+e/1e3):Math.round(+new Date/1e3)}static getUUID(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:7&n|8).toString(16)})}static isBrowser(){return"undefined"!=typeof window}static isOnline(){return!("undefined"==typeof window||!window.navigator.onLine)}static isMergebleObject(e){return r.isObject(e)&&!Array.isArray(e)}static isObject(e){return null!==e&&"object"==typeof e}}export{r as a,t as b};