indigitall-web-sdk 4.2.2 → 4.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/sdk.min.js +1 -1
package/sdk.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see sdk.min.js.LICENSE.txt */
|
|
2
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(this,(()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.2.2","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>M});var t={};r.r(t),r.d(t,{BaseClient:()=>_,BaseRequest:()=>b});var e={};r.r(e),r.d(e,{Channel:()=>O,Device:()=>S,DeviceStatus:()=>w,ErrorDictionary:()=>I,ErrorModel:()=>g,EventType:()=>P});var i={};r.r(i),r.d(i,{CommonUtils:()=>R,CorePermissions:()=>T,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>C,Log:()=>E,LogLevel:()=>p,Validations:()=>x});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,d=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getDeviceJson(){return c.getItem(this.DEVICE_JSON)}async setDeviceJson(t){c.setItem(this.DEVICE_JSON,t)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}},p=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=p;class v{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new d).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const E=v,g=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new g(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new g(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},_=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new E("[IND]BaseClient: ");let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+e.status+"\nResponse Message: "+e.statusText+"\n").writeLog(),new g(e.status,e.statusText))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},b=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new d).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},O=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),S=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new d).getBrowserPublicKey(),this.browserPrivateKey=(new d).getBrowserPrivateKey(),this.platform=(new d).getPlatform(),this.version=(new d).getVersion(),this.browserName=(new d).getBrowserName(),this.browserVersion=(new d).getBrowserVersion(),this.osName=(new d).getOsName(),this.osVersion=(new d).getOsVersion(),this.deviceType=(new d).getDeviceType(),(new d).getEnabled()&&(this.enabled="true"===(new d).getEnabled()),(new d).getExternalId()&&(this.externalCode=(new d).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new d).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new d).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}static setDeviceJson(t){(new d).setDeviceJson(JSON.stringify(t.toJSON()))}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},w=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),P=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=class{static isServiceTimestampExceed(){return!(new d).getServiceTimestamp()||(new d).getServiceSyncTime()<=(Date.now()-(new d).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},T=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new E("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},A=new E("[IND]Crypto"),N=new TextEncoder("utf-8"),L="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",N.encode(t),{name:L,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(L,n,N.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return A.d("hmac: ",s).writeLog(),s}catch(t){return void A.e("error:",t).writeLog()}}},C=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},x=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M={Repository:d,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}i.default=t,r&&r.set(t,i);return i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(545)),i=a(r(358)),o=a(r(568)),s=a(r(801));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return A()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=n.key,o=void 0,o=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===u(o)?o:String(o)),n)}var i,o}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,a,u,l,d,p,y,v;return e=t,r=[{key:"getURL",value:(v=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return v.apply(this,arguments)})},{key:"call",value:(y=f(c().mark((function t(e,r,a,u){var l,f,h,d,p;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=new n.default("[IND]BaseClient: "),t.next=3,this.getURL();case 3:return t.t0=t.sent,t.t1=a.getPath(r),t.t2=t.t0+t.t1,t.t3=a.getParams(),f=t.t2+t.t3,a.isJourneyRequest()&&(f=f.replace("v1","v2")),h={method:e,headers:a.addHeaders()},e!==this.GET&&(h.body=JSON.stringify(a.getBody())),u&&(h.credentials=u),t.prev=12,t.next=15,fetch(f,h);case 15:return d=t.sent,t.next=18,d.json();case 18:if(p=t.sent,!d.ok){t.next=22;break}return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.statusCode+"\nResponse Message: "+p.message+"\nResponse Body:",JSON.stringify(p.data,null,"\t")).writeLog(),t.abrupt("return",p);case 22:return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+d.status+"\nResponse Message: "+d.statusText+"\n").writeLog(),t.abrupt("return",new i.default(d.status,d.statusText));case 26:return t.prev=26,t.t4=t.catch(12),l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 30:case"end":return t.stop()}}),t,this,[[12,26]])}))),function(t,e,r,n){return y.apply(this,arguments)})},{key:"get",value:(p=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return p.apply(this,arguments)})},{key:"post",value:(d=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return d.apply(this,arguments)})},{key:"put",value:(l=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return l.apply(this,arguments)})},{key:"delete",value:(u=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return u.apply(this,arguments)})}],r&&h(e.prototype,r),a&&h(e,a),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r,n;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version;var o=n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}});e.default=o},106:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}var h={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u};e.default=h},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.Channel=r;var n=r;e.default=n},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r,n;return e=t,n=[{key:"setDeviceJson",value:function(t){(new i.default).setDeviceJson(JSON.stringify(t.toJSON()))}}],(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410};var n={ErrorCode:r,ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=n},358:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}function i(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=o},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}});var n=r(901),i=c(r(354)),o=c(r(202)),s=c(r(801)),a=c(r(358)),u=c(r(22));function c(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(){n=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof p?e:p,s=Object.create(i.prototype),a=new R(n||[]);return o(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&i.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(o,s,a,u){var c=h(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var s;o(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return s=s?s.then(i,i):i()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return A()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,o(I,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l,f;return e=t,r=[{key:"getDB",value:(f=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return f.apply(this,arguments)})},{key:"get",value:(l=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return l.apply(this,arguments)})},{key:"put",value:(c=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return c.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(u=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return u.apply(this,arguments)})},{key:"getItem",value:(a=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return a.apply(this,arguments)})}],r&&s(e.prototype,r),i&&s(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},795:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r,o;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),o&&n(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return A()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=n.key,o=void 0,o=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===u(o)?o:String(o)),n)}var i,o}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}var e,r,a,u,l,d,p,y,v,E,g,m,I,_;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(_=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.APP_KEY,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return _.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){var t=i.default.getItem(this.SERVICE_SYNC_TIME);return t||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){var t=i.default.getItem(this.LOCATION_UPDATE_MINUTES);return t||30}},{key:"setRequestLocation",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(E=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getExternalIdRequest",value:(y=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return y.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getDeviceJson",value:(p=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.DEVICE_JSON));case 1:case"end":return t.stop()}}),t,this)}))),function(){return p.apply(this,arguments)})},{key:"setDeviceJson",value:(d=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.DEVICE_JSON,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"getRegisteredByCookie",value:(l=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(u=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}}],r&&h(e.prototype,r),a&&h(e,a),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},636:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r,o;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),o&&n(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,n=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],(r=null)&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(){s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,u)}),(function(t){i("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return A()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(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,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l,f;return e=t,r=null,n=[{key:"getPermissions",value:(f=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"getPermission",value:(l=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return l.apply(this,arguments)})},{key:"setPermissionsCallback",value:(a=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"setCallback",value:(o=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return o.apply(this,arguments)})}],r&&c(e.prototype,r),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="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},i(t)}function o(){o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return A()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(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,(o=n.key,s=void 0,s=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===i(s)?s:String(s)),n)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i,f;return e=t,r=null,n=[{key:"createHmac",value:(i=o().mark((function t(e,r){var n,i,s,a,f,h,d;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,s=null===(n=window)||void 0===n||null===(i=n.crypto)||void 0===i?void 0:i.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,s.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return a=t.sent,t.next=9,s.sign(l,a,c.encode(r));case 9:return f=t.sent,h=new Uint8Array(f),d=Array.prototype.map.call(h,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",d).writeLog(),t.abrupt("return",d);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),f=function(){var t=this,e=arguments;return new Promise((function(r,n){var o=i.apply(t,e);function a(t){s(o,r,n,a,u,"next",t)}function u(t){s(o,r,n,a,u,"throw",t)}a(void 0)}))},function(t,e){return f.apply(this,arguments)})}],r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.CryptoUtils=f;var h=f;e.default=h},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},970:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i,o;return e=t,o=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],(i=null)&&n(e.prototype,i),o&&n(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="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},s(t)}function a(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,(i=n.key,o=void 0,o=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===s(o)?o:String(o)),n)}var i,o}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.LogLevel=r;var n=r;e.default=n},506:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,i;return e=t,i=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],(r=null)&&n(e.prototype,r),i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(306)),i=f(r(897)),o=f(r(95)),s=f(r(568)),a=f(r(970)),u=f(r(545)),c=r(136),l=f(r(506));function f(t){return t&&t.__esModule?t:{default:t}}},117:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.2.2","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>M});var t={};r.r(t),r.d(t,{BaseClient:()=>_,BaseRequest:()=>b});var e={};r.r(e),r.d(e,{Channel:()=>O,Device:()=>S,DeviceStatus:()=>w,ErrorDictionary:()=>I,ErrorModel:()=>g,EventType:()=>P});var i={};r.r(i),r.d(i,{CommonUtils:()=>R,CorePermissions:()=>T,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>C,Log:()=>E,LogLevel:()=>p,Validations:()=>x});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,d=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getDeviceJson(){return c.getItem(this.DEVICE_JSON)}async setDeviceJson(t){c.setItem(this.DEVICE_JSON,t)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}},p=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=p;class v{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new d).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const E=v,g=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new g(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new g(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},_=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new E("[IND]BaseClient: ");let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+e.status+"\nResponse Message: "+e.statusText+"\n").writeLog(),new g(e.status,e.statusText))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},b=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new d).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},O=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),S=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new d).getBrowserPublicKey(),this.browserPrivateKey=(new d).getBrowserPrivateKey(),this.platform=(new d).getPlatform(),this.version=(new d).getVersion(),this.browserName=(new d).getBrowserName(),this.browserVersion=(new d).getBrowserVersion(),this.osName=(new d).getOsName(),this.osVersion=(new d).getOsVersion(),this.deviceType=(new d).getDeviceType(),(new d).getEnabled()&&(this.enabled="true"===(new d).getEnabled()),(new d).getExternalId()&&(this.externalCode=(new d).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new d).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new d).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}static setDeviceJson(t){(new d).setDeviceJson(JSON.stringify(t.toJSON()))}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},w=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),P=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=class{static isServiceTimestampExceed(){return!(new d).getServiceTimestamp()||(new d).getServiceSyncTime()<=(Date.now()-(new d).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},T=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new E("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},A=new E("[IND]Crypto"),N=new TextEncoder("utf-8"),L="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",N.encode(t),{name:L,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(L,n,N.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return A.d("hmac: ",s).writeLog(),s}catch(t){return void A.e("error:",t).writeLog()}}},C=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},x=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M={Repository:d,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(545)),i=a(r(358)),o=a(r(568)),s=a(r(801));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,a,u,l,d,p,y;return e=t,r=[{key:"getURL",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"call",value:(p=f(c().mark((function t(e,r,a,u){var l,f,h,d,p;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=new n.default("[IND]BaseClient: "),t.next=3,this.getURL();case 3:return t.t0=t.sent,t.t1=a.getPath(r),t.t2=t.t0+t.t1,t.t3=a.getParams(),f=t.t2+t.t3,a.isJourneyRequest()&&(f=f.replace("v1","v2")),h={method:e,headers:a.addHeaders()},e!==this.GET&&(h.body=JSON.stringify(a.getBody())),u&&(h.credentials=u),t.prev=12,t.next=15,fetch(f,h);case 15:return d=t.sent,t.next=18,d.json();case 18:if(p=t.sent,!d.ok){t.next=22;break}return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.statusCode+"\nResponse Message: "+p.message+"\nResponse Body:",JSON.stringify(p.data,null,"\t")).writeLog(),t.abrupt("return",p);case 22:return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+d.status+"\nResponse Message: "+d.statusText+"\n").writeLog(),t.abrupt("return",new i.default(d.status,d.statusText));case 26:return t.prev=26,t.t4=t.catch(12),l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 30:case"end":return t.stop()}}),t,this,[[12,26]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(d=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(l=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return l.apply(this,arguments)})},{key:"put",value:(u=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"delete",value:(a=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return a.apply(this,arguments)})}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version;var o=n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}});e.default=o},106:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}var h={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u};e.default=h},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.Channel=r;var n=r;e.default=n},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r,n;return e=t,n=[{key:"setDeviceJson",value:function(t){(new i.default).setDeviceJson(JSON.stringify(t.toJSON()))}}],(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=r},358:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=i},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}});var n=r(901),i=c(r(354)),o=c(r(202)),s=c(r(801)),a=c(r(358)),u=c(r(22));function c(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(){n=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof p?e:p,s=Object.create(i.prototype),a=new R(n||[]);return o(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&i.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(o,s,a,u){var c=h(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var s;o(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return s=s?s.then(i,i):i()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,o(I,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},795:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}var e,r,a,u,l,d,p,y,v,E,g,m,I;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.APP_KEY,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(E=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(y=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},{key:"getExternalIdRequest",value:(p=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return p.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getDeviceJson",value:(d=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.DEVICE_JSON));case 1:case"end":return t.stop()}}),t,this)}))),function(){return d.apply(this,arguments)})},{key:"setDeviceJson",value:(l=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.DEVICE_JSON,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getRegisteredByCookie",value:(u=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(a=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},636:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(){s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,u)}),(function(t){i("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="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},i(t)}function o(){o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(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,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h,d;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,s=null===(n=window)||void 0===n||null===(i=n.crypto)||void 0===i?void 0:i.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,s.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return a=t.sent,t.next=9,s.sign(l,a,c.encode(r));case 9:return f=t.sent,h=new Uint8Array(f),d=Array.prototype.map.call(h,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",d).writeLog(),t.abrupt("return",d);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.CryptoUtils=f;var h=f;e.default=h},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},970:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i;return e=t,i=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="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},s(t)}function a(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,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.LogLevel=r;var n=r;e.default=n},506:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(306)),i=f(r(897)),o=f(r(95)),s=f(r(568)),a=f(r(970)),u=f(r(545)),c=r(136),l=f(r(506));function f(t){return t&&t.__esModule?t:{default:t}}},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.2.2","_id":"indigitall-web-core@4.2.2","_inBundle":false,"_integrity":"sha512-ur4Fqa70ZTqQGwLTFr2nOmjbOlvqm1riStW08NDSficeGpdIKnHhxLzzYffKVfAOpPXLP/kSlbVqTr797m5KdA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.2.2","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.2.2","saveSpec":null,"fetchSpec":"4.2.2"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.2.2.tgz","_shasum":"4fcb6bb28a04b7c1c2b636df371cb2cf9702aaba","_spec":"indigitall-web-core@4.2.2","_where":"/home/circleci/webpush/customer","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.2.2"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{default:()=>O});const{Repository:t}=r(872).Core,e=new class extends t{constructor(){super(),this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID"}async setDeviceId(t){this.setStorage(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}},{Validations:i,Log:o}=r(872).Core.Utils,s=class extends i{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new o("[IND]CustomerValidations: "),r=e.getDeviceId();let n=!0;return this.isAppKeyFormat()||(n=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(r)||(n=!1,t.w("deviceId is null or empty").writeLog()),n}},a=class{constructor(t,e){this.customerFieldKey=t,this.customerFieldValue=e}getCustomerFieldKey(){return this.customerFieldKey}getCustomerFieldValue(){return this.customerFieldValue}toJSON(){return JSON.parse(`"${this.customerFieldKey}":"${this.customerFieldValue}"`)}},{ErrorDictionary:u}=r(872).Core.Models,c=u.ErrorCode;Object.assign(c,{CUSTOMER_GET_ERROR:4001,CUSTOMER_PARAMS_ERROR:4011,CUSTOMER_GENERAL_ERROR:4600,CUSTOMER_NO_EXTERNAL_CODE:4601});const l=u.ErrorMessage;Object.assign(l,{CUSTOMER_GET_ERROR:"customer get error",CUSTOMER_PARAMS_ERROR:"Params are not correct",CUSTOMER_GENERAL_ERROR:"general error",CUSTOMER_NO_EXTERNAL_CODE:"no external code registered"});const f={ErrorCode:c,ErrorMessage:l},{Config:h}=r(872).Core,{BaseClient:d}=r(872).Core.Api,{ErrorModel:p}=r(872).Core.Models,{CommonUtils:y,ErrorUtils:v}=r(872).Core.Utils,E=new class extends d{constructor(){super(),this.URL_BASE=h.client.CUSTOMER_URL_BASE,this.ENDPOINT_CUSTOMER="/customer",this.ENDPOINT_CUSTOMER_FIELD=this.ENDPOINT_CUSTOMER+"/field",this.ENDPOINT_CUSTOMER_LINK=this.ENDPOINT_CUSTOMER+"/link",this.ENDPOINT_EVENT="/event",this.ENDPOINT_EVENT_JOURNEY=this.ENDPOINT_EVENT+"/custom",this.ENDPOINT_EVENT_JOURNEY_BEACON=this.ENDPOINT_EVENT_JOURNEY+"/beacon"}async getCustomer(t,r,n){if(s.isAppKeyFormat()&&s.isValidFormat(e.getExternalId)){const e=await this.get(this.ENDPOINT_CUSTOMER,t.getCustomerRequest());e&&!(e instanceof p)&&e.statusCode>=200&&e.statusCode<300?y.isFunction(r)&&r(new class{constructor(t){t.id&&(this.id=t.id),t.customerId&&(this.customerId=t.customerId),t.applicationId&&(this.applicationId=t.applicationId),t.createdAt&&(this.createdAt=t.createdAt),t.updatedAt&&(this.updatedAt=t.updatedAt)}getCustomerId(){return this.customerId}getApplicationId(){return this.applicationId}getId(){return this.id}getCreatedAt(){return this.createdAt}getUpdatedAt(){return this.updatedAt}toJSON(){return{id:this.id,customerId:this.customerId,applicationId:this.applicationId,createdAt:this.createdAt,updatedAt:this.updatedAt}}}(e.data)):e?y.isFunction(n)&&n(e):y.isFunction(n)&&n()}else y.isFunction(n)&&n(v.showError(f,f.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async getCustomerField(t,r,n){if(s.isAppKeyFormat()&&s.isValidFormat(e.getExternalId)){const e=await this.get(this.ENDPOINT_CUSTOMER_FIELD,t.getCustomerFieldRequest()),i=[];for(const t in e.data)e.data.hasOwnProperty(t)&&i.push(new a(t,e.data[t]));e&&i.length>0&&!(e instanceof p)&&e.statusCode>=200&&e.statusCode<300?y.isFunction(r)&&r(i):e?y.isFunction(n)&&n(e):y.isFunction(n)&&n()}else y.isFunction(n)&&n(v.showError(f,f.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async putCustomerField(t,r,n){if(s.isAppKeyFormat()&&s.isValidFormat(e.getExternalId)){const e=await this.put(this.ENDPOINT_CUSTOMER_FIELD,t.putCustomerFieldRequest());this.getCustomerResponse(e,r,n)}else y.isFunction(n)&&n(v.showError(f,f.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async deleteCustomerField(t,r,n){if(s.isAppKeyFormat()&&s.isValidFormat(e.getExternalId)){const e=await this.delete(this.ENDPOINT_CUSTOMER_FIELD,t.deleteCustomerFieldRequest());this.getCustomerResponse(e,r,n)}else y.isFunction(n)&&n(v.showError(f,f.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async postCustomerLink(t,r,n){if(s.isValidFormatRequest()&&s.isValidFormat(e.getExternalId)){const e=await this.post(this.ENDPOINT_CUSTOMER_LINK,t.postAndDeleteCustomerLinkRequest());this.getCustomerResponse(e,r,n)}else y.isFunction(n)&&n(v.showError(f,f.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async deleteCustomerLink(t,r,n){if(s.isValidFormatRequest()&&s.isValidFormat(e.getExternalId)){const e=await this.delete(this.ENDPOINT_CUSTOMER_LINK,t.postAndDeleteCustomerLinkRequest());this.getCustomerResponse(e,r,n)}else y.isFunction(n)&&n(v.showError(f,f.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async getCustomerResponse(t,e,r){t&&!(t instanceof p)&&t.statusCode>=200&&t.statusCode<300?y.isFunction(e)&&(""!=t.data?e(t.data):e()):t?y.isFunction(r)&&r(t):y.isFunction(r)&&r()}},{BaseRequest:g}=r(872).Core.Api,{Device:m}=r(872).Core.Models,I=class extends g{constructor(){super(),this.device=new m,null!=e.getExternalId()&&(this.customerId=e.getExternalId()),this.fieldNames,this.link,this.fields}getCustomerRequest(){return this.params=this.createQueryStringCustomerId(),this}getCustomerFieldRequest(){return this.params=this.createQueryString(),this}putCustomerFieldRequest(){return this.params=this.createQueryStringCustomerId(),this.body=this.createBodyJson(),this}deleteCustomerFieldRequest(){return this.params=this.createQueryStringCustomerId(),this.body=this.createDeleteBodyJson(),this}postAndDeleteCustomerLinkRequest(){return this.params="",this.body=this.createBodyJson(),this}createQueryString(){let t="";return t+=this.createQueryStringCustomerId(),this.fieldNames&&(t+=`&${this.PARAM_CUSTOMER_FIELD_NAMES}=${this.fieldNames}`),this.fields&&(t+=`&${this.PARAM_CUSTOMER_FIELDS}=${this.fields}`),this.link&&(t+=`&${this.PARAM_CUSTOMER_LINK}=${this.link}`),t}createQueryStringCustomerId(){return this.PARAM_CUSTOMER_ID+"="+this.customerId}createBodyJson(){let t={};try{this.channel&&(t.channel=this.channel,this.device&&(t.deviceId=this.device.deviceId),this.customerId&&(t.customerId=this.customerId)),this.link&&(t.link=this.link),this.fields&&(t=this.fields)}catch(t){console.log("Error fieldNames request :"+t)}return t}createDeleteBodyJson(){const t={},e=[];try{if(this.fieldNames){for(let t=0;t<this.fieldNames.length;t++)e.push(this.fieldNames[t]);t.fields=e}}catch(t){console.log("Error fieldNames request :"+t)}return t}setFields(t){this.fields=t}setFieldNames(t){this.fieldNames=t}setLink(t){this.link=t}setChannel(t){this.channel=t}},{CommonUtils:_,ErrorUtils:b}=r(872).Core.Utils,O=class{static async getCustomer(t,e){const r=new I;await E.getCustomer(r,t,e)}static async getCustomerInformation(t,e,r){const n=new I;null!=t&&(Array.isArray(t)?n.setFieldNames(t):_.isFunction(r)&&r(b.customerError(4011,b.CUSTOMER_ERROR_PARAMS))),await E.getCustomerField(n,e,r)}static async assignOrUpdateValueToCustomerFields(t,e,r){let n;try{"string"==typeof t?n=JSON.parse(n):"object"==typeof t&&(n=t)}catch(t){_.isFunction(r)&&r(b.customerError(4011,b.CUSTOMER_ERROR_PARAMS))}if(n){const t=new I;t.setFields(n),await E.putCustomerField(t,e,r)}else _.isFunction(r)&&r(b.customerError(4900,b.CUSTOMER_ERROR_PARAMS))}static async deleteValuesFromCustomerFields(t,e,r){if(Array.isArray(t)){const n=new I;n.setFieldNames(t),await E.deleteCustomerField(n,e,r)}else _.isFunction(r)&&r(b.customerError(4011,b.CUSTOMER_ERROR_PARAMS))}static async link(t,e,r){const n=new I;n.setChannel(t),await E.postCustomerLink(n,e,r)}static async unlink(t,e,r){const n=new I;n.setChannel(t),await E.deleteCustomerLink(n,e,r)}}})(),n})(),t.exports=e()},413:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}i.default=t,r&&r.set(t,i);return i}(r(117));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},899:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.2.2","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>M});var t={};r.r(t),r.d(t,{BaseClient:()=>_,BaseRequest:()=>b});var e={};r.r(e),r.d(e,{Channel:()=>O,Device:()=>S,DeviceStatus:()=>w,ErrorDictionary:()=>I,ErrorModel:()=>g,EventType:()=>P});var i={};r.r(i),r.d(i,{CommonUtils:()=>R,CorePermissions:()=>T,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>C,Log:()=>E,LogLevel:()=>p,Validations:()=>x});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,d=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getDeviceJson(){return c.getItem(this.DEVICE_JSON)}async setDeviceJson(t){c.setItem(this.DEVICE_JSON,t)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}},p=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=p;class v{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new d).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const E=v,g=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new g(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new g(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},_=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new E("[IND]BaseClient: ");let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+e.status+"\nResponse Message: "+e.statusText+"\n").writeLog(),new g(e.status,e.statusText))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},b=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new d).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},O=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),S=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new d).getBrowserPublicKey(),this.browserPrivateKey=(new d).getBrowserPrivateKey(),this.platform=(new d).getPlatform(),this.version=(new d).getVersion(),this.browserName=(new d).getBrowserName(),this.browserVersion=(new d).getBrowserVersion(),this.osName=(new d).getOsName(),this.osVersion=(new d).getOsVersion(),this.deviceType=(new d).getDeviceType(),(new d).getEnabled()&&(this.enabled="true"===(new d).getEnabled()),(new d).getExternalId()&&(this.externalCode=(new d).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new d).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new d).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}static setDeviceJson(t){(new d).setDeviceJson(JSON.stringify(t.toJSON()))}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},w=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),P=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=class{static isServiceTimestampExceed(){return!(new d).getServiceTimestamp()||(new d).getServiceSyncTime()<=(Date.now()-(new d).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},T=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new E("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},A=new E("[IND]Crypto"),N=new TextEncoder("utf-8"),L="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",N.encode(t),{name:L,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(L,n,N.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return A.d("hmac: ",s).writeLog(),s}catch(t){return void A.e("error:",t).writeLog()}}},C=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},x=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M={Repository:d,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(545)),i=a(r(358)),o=a(r(568)),s=a(r(801));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,a,u,l,d,p,y;return e=t,r=[{key:"getURL",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"call",value:(p=f(c().mark((function t(e,r,a,u){var l,f,h,d,p;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=new n.default("[IND]BaseClient: "),t.next=3,this.getURL();case 3:return t.t0=t.sent,t.t1=a.getPath(r),t.t2=t.t0+t.t1,t.t3=a.getParams(),f=t.t2+t.t3,a.isJourneyRequest()&&(f=f.replace("v1","v2")),h={method:e,headers:a.addHeaders()},e!==this.GET&&(h.body=JSON.stringify(a.getBody())),u&&(h.credentials=u),t.prev=12,t.next=15,fetch(f,h);case 15:return d=t.sent,t.next=18,d.json();case 18:if(p=t.sent,!d.ok){t.next=22;break}return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.statusCode+"\nResponse Message: "+p.message+"\nResponse Body:",JSON.stringify(p.data,null,"\t")).writeLog(),t.abrupt("return",p);case 22:return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+d.status+"\nResponse Message: "+d.statusText+"\n").writeLog(),t.abrupt("return",new i.default(d.status,d.statusText));case 26:return t.prev=26,t.t4=t.catch(12),l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 30:case"end":return t.stop()}}),t,this,[[12,26]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(d=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(l=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return l.apply(this,arguments)})},{key:"put",value:(u=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"delete",value:(a=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return a.apply(this,arguments)})}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version;var o=n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}});e.default=o},106:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}var h={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u};e.default=h},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.Channel=r;var n=r;e.default=n},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r,n;return e=t,n=[{key:"setDeviceJson",value:function(t){(new i.default).setDeviceJson(JSON.stringify(t.toJSON()))}}],(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=r},358:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=i},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}});var n=r(901),i=c(r(354)),o=c(r(202)),s=c(r(801)),a=c(r(358)),u=c(r(22));function c(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(){n=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof p?e:p,s=Object.create(i.prototype),a=new R(n||[]);return o(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&i.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(o,s,a,u){var c=h(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var s;o(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return s=s?s.then(i,i):i()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,o(I,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},795:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}var e,r,a,u,l,d,p,y,v,E,g,m,I;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.APP_KEY,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(E=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(y=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},{key:"getExternalIdRequest",value:(p=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return p.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getDeviceJson",value:(d=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.DEVICE_JSON));case 1:case"end":return t.stop()}}),t,this)}))),function(){return d.apply(this,arguments)})},{key:"setDeviceJson",value:(l=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.DEVICE_JSON,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getRegisteredByCookie",value:(u=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(a=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},636:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(){s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,u)}),(function(t){i("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="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},i(t)}function o(){o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(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,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h,d;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,s=null===(n=window)||void 0===n||null===(i=n.crypto)||void 0===i?void 0:i.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,s.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return a=t.sent,t.next=9,s.sign(l,a,c.encode(r));case 9:return f=t.sent,h=new Uint8Array(f),d=Array.prototype.map.call(h,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",d).writeLog(),t.abrupt("return",d);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.CryptoUtils=f;var h=f;e.default=h},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},970:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i;return e=t,i=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="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},s(t)}function a(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,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.LogLevel=r;var n=r;e.default=n},506:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(306)),i=f(r(897)),o=f(r(95)),s=f(r(568)),a=f(r(970)),u=f(r(545)),c=r(136),l=f(r(506));function f(t){return t&&t.__esModule?t:{default:t}}},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.2.2","_id":"indigitall-web-core@4.2.2","_inBundle":false,"_integrity":"sha512-ur4Fqa70ZTqQGwLTFr2nOmjbOlvqm1riStW08NDSficeGpdIKnHhxLzzYffKVfAOpPXLP/kSlbVqTr797m5KdA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.2.2","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.2.2","saveSpec":null,"fetchSpec":"4.2.2"},"_requiredBy":["#USER","/","/indigitall-web-customer"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.2.2.tgz","_shasum":"4fcb6bb28a04b7c1c2b636df371cb2cf9702aaba","_spec":"indigitall-web-core@4.2.2","_where":"/home/circleci/webpush/inapp","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.2.2"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{default:()=>nt});const{Repository:t}=r(872).Core,e=new class extends t{constructor(){super(),this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_SHOW_ONCE=this.REPOSITORY+".INAPP_SHOW_ONCE",this.INAPP_TIMES_CLICKED=this.REPOSITORY+".INAPP_TIMES_CLICKED",this.INAPP_DISMISS_FOREVER=this.REPOSITORY+".INAPP_DISMISS_FOREVER",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API"}setItemStorage(t){this.setItemSessionStorage(this.REPOSITORY,t)}getItemStorage(){return this.getItemSessionStorage(this.REPOSITORY)}setDeviceId(t){this.setStorage(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}getInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}getInAppShowOnce(){return this.getStorage(this.INAPP_SHOW_ONCE)}setInAppShowOnce(t){this.setStorage(this.INAPP_SHOW_ONCE,t)}getInAppTimesClicked(){return this.getStorage(this.INAPP_TIMES_CLICKED)}setInAppTimesClicked(t){this.setStorage(this.INAPP_TIMES_CLICKED,t)}getInAppDismissForever(){return this.getStorage(this.INAPP_DISMISS_FOREVER)}setInAppDismissForever(t){this.setStorage(this.INAPP_DISMISS_FOREVER,t)}getInAppTopics(){return this.getStorage(this.INAPP_TOPICS)}setInAppTopics(t){this.setStorage(this.INAPP_TOPICS,t)}async getUrlDeviceApi(){let t;try{this.storage&&this.storage.isLocalStorageAvailable()?t=this.getStorage(this.URL_DEVICE_API):this.db&&this.db.IDB&&(t=await this.db.getItem(this.URL_DEVICE_API))}catch(t){}return t}},{Validations:i,Log:o}=r(872).Core.Utils,s=class extends i{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new o("[IND]InAppValidations: "),r=e.getDeviceId();let n=!0;return this.isAppKeyFormat()||(n=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(r)||(n=!1,t.w("deviceId is null or empty").writeLog()),n}},{ErrorDictionary:a}=r(872).Core.Models,u=a.ErrorCode;Object.assign(u,{INAPP_ERROR:2e3,INAPP_SHOW_INAPP_ERROR:2100,INAPP_WAS_EXPIRED:2101,INAPP_WAS_SHOWN_MANY_TIMES:2102,INAPP_WAS_CLICKED_MANY_TIMES:2103,INAPP_FORM_TYPE_NOT_CORRECT:2120,INAPP_FORM_FIELD_IS_EMPTY:2121,INAPP_POPUP_ERROR:2300,INAPP_WAS_DISMISSED_FOREVER:2304,INAPP_ERROR_CONTENT_MESSAGE:2305,INAPP_INSTANCE_TOPICS_ERROR:2306,INAPP_GENERAL_ERROR:2600});const c=a.ErrorMessage;Object.assign(c,{INAPP_ERROR:"inApp error",INAPP_SHOW_INAPP_ERROR:"error on show inApp",INAPP_WAS_EXPIRED:"InApp was expired",INAPP_WAS_SHOWN_MANY_TIMES:"InApp was shown more than $x times",INAPP_WAS_CLICKED_MANY_TIMES:"InApp was clicked more than $x times",NAPP_FORM_TYPE_NOT_CORRECT:"Input type is not correct",INAPP_FORM_FIELD_IS_EMPTY:"Field is empty",INAPP_POPUP_ERROR:"error on popup",INAPP_WAS_DISMISSED_FOREVER:"InApp was dismissed forever",INAPP_ERROR_CONTENT_MESSAGE:"InApp error with content",INAPP_INSTANCE_TOPICS_ERROR:"topics instance is not correct, only string[] is valid types",INAPP_GENERAL_ERROR:"inApp general error"});const l={ErrorCode:u,ErrorMessage:c},f=class{static searchInApp(t){const e=this.getListInApp();return null==e?null:this.findInAppFromInAppList(e,t)}static searchInAppWithInAppId(t){const e=this.getListInApp();return null==e?null:this.findInAppFromInAppListWithInAppId(e,t)}static addInApp(t){let r=this.getListInApp();null!=r?r.push(t):r=[t],e.setItemStorage(JSON.stringify(r))}static getListInApp(){let t=null;try{e.getItemStorage()&&(t=JSON.parse(e.getItemStorage()))}catch(t){console.error(t.message)}return t}static addInAppNewClick(t){this.updateInAppField(t.inAppId,!0,null,null)}static addInAppNewShow(t){this.updateInAppField(t.inAppId,null,!0,null)}static addInAppDismissForever(t){this.updateInAppField(t.inAppId,null,null,!0)}static updateInAppField(t,r,n,i){const o=this.getListInApp(),s=[];if(null!=o)for(let e=0;e<o.length;e++)o[e].inAppId==t&&(null!=r&&(o[e].inAppShow.timesClicked+=1),null!=n&&(o[e].inAppShow.timesShowed+=1),null!=i&&(o[e].inAppShow.wasDismissed=!0)),s.push(o[e]);e.setItemStorage(JSON.stringify(s))}static deleteInApp(t){const r=this.getListInApp(),n=[];if(null!=r)for(let e=0;e<r.length;e++)r[e].inAppId!=t.inAppId&&n.push(r[e]);e.setItemStorage(JSON.stringify(n))}static findInAppFromInAppListWithInAppId(t,e){if(null!=t)for(let r=0;r<t.length;r++)if(t[r].inAppId&&t[r].inAppId==e)return t[r];return null}static findInAppFromInAppList(t,e){if(null!=t)for(let r=0;r<t.length;r++)if(t[r].schema&&t[r].schema.code&&t[r].schema.code==e)return t[r];return null}static findInAppFromInAppListWithInAppId(t,e){if(null!=t)for(let r=0;r<t.length;r++)if(t[r].inAppId&&t[r].inAppId==e)return t[r];return null}},h=class{constructor(t){this.URL="url",t.actionId&&(this.actionId=t.actionId),t.destroy&&(this.destroy=t.destroy),t.topics&&(this.topics=t.topics),t.type&&(this.type=t.type),t.url&&(this.url=t.url),t.no_action&&(this.no_action=t.no_action)}},d=class{constructor(t){if(t.cacheTtl&&(this.cacheTtl=t.cacheTtl),t.inAppId&&(this.inAppId=t.inAppId),t.showOnce&&(this.showOnce=t.showOnce),t.version&&(this.version=t.version),t.customData&&(this.customData=t.customData),t.creationDate?this.creationDate=t.creationDate:this.creationDate=x.getDate((new Date).getTime()),t.expiredDate)this.expiredDate=t.expiredDate;else{let t=36e5;this.cacheTtl&&(t=1e3*this.cacheTtl),this.expiredDate=x.getDate((new Date).getTime()+t)}t.schema&&(this.schema=new class{constructor(t){t.code&&(this.code=t.code),t.width&&(this.width=t.width),t.height&&(this.height=t.height)}}(t.schema)),t.properties&&(this.properties=new class{constructor(t){t.contentUrl&&(this.contentUrl=t.contentUrl),t.showTime&&(this.showTime=t.showTime),t.numberOfShows&&(this.numberOfShows=t.numberOfShows),t.numberOfClicks&&(this.numberOfClicks=t.numberOfClicks),t.dismissForever&&(this.dismissForever=t.dismissForever),t.layout&&(this.layout=new class{constructor(t){t.borderRadius&&(this.borderRadius=t.borderRadius)}}(t.layout)),t.action&&(this.action=new h(t.action))}setAction(t){this.action=t}}(t.properties)),this.inAppShow=new class{constructor(t){this.timesShowed=0,this.timesClicked=0,this.wasDismissed=!1,t&&(t.timesShowed&&(this.timesShowed=t.timesShowed),t.timesClicked&&(this.timesClicked=t.timesClicked),t.wasDismissed&&(this.wasDismissed=t.wasDismissed))}}(t.inAppShow)}},{BaseRequest:p}=r(872).Core.Api,{Config:y}=r(872).Core,v=class extends p{constructor(){super(),e.getDeviceId()?this.deviceId=e.getDeviceId():this.deviceId=x.generateDeviceId()}setEventType(t){this.eventType=t}setInAppId(t){this.inAppId=t}setActionId(t){this.actionId=t}setClickedButton(t){this.clickedButton=t}setLastVersionId(t){this.lastVersionId=t}setVersion(t){this.version=t}setDeviceId(t){this.deviceId=t}setPlatform(t){this.platform=t}postEventPrintRequest(){const t=this.fillJsonEventRequest();return this.body=t,this}postEventClickRequest(){const t=this.fillJsonEventRequest();return t.actionId=this.actionId,this.body=t,this}fillJsonEventRequest(){const t={};return t.deviceId=this.deviceId,e.getExternalId()&&(t.externalId=e.getExternalId()),t.inAppId=this.inAppId,t.platform=y.platform,t.version=this.version,t}postEventInAppRequest(){const t={};return t.inAppId=this.inAppId,t.lastVersionId=this.lastVersionId,t.deviceId=this.deviceId,this.eventType&&(t.eventType=this.eventType),t.platform=this.platform,t.clickedButton=this.clickedButton,this.body=t,this}},{BaseRequest:E}=r(872).Core.Api,g=class extends E{constructor(){super(),null!=e.getExternalId()&&(this.customerId=e.getExternalId()),null!=e.getDeviceId()&&(this.deviceId=e.getDeviceId())}setFields(t){this.fields=t}putCustomerFieldRequest(){return this.params=this.createQueryStringCustomerId(),this.body=this.createBodyJson(),this}createQueryStringCustomerId(){return this.PARAM_CUSTOMER_ID+"="+this.customerId}createBodyJson(){let t={};try{t.channel="inapp",this.device&&(t.deviceId=this.device.deviceId),this.customerId&&(t.customerId=this.customerId),this.fields&&(t=this.fields)}catch(t){console.log("Error fieldNames request :"+t)}return t}},{BaseRequest:m}=r(872).Core.Api,{Config:I}=r(872).Core,_=class extends m{constructor(){super()}setInAppId(t){this.inAppId=t}setVersion(t){this.version=t}setJsonForm(t){this.jsonForm=t}postForm(){return this.body=this.createBody(),this}createBody(){const t={};return e.getDeviceId()&&(t.deviceId=e.getDeviceId()),e.getExternalId()&&(t.externalCode=e.getExternalId()),this.jsonForm&&(t.form=this.jsonForm),t.inAppId=this.inAppId,t.platform=I.platform,t.version=this.version,t}},b=class{static sendEventPrint(t){const e=new v;e.setInAppId(t.inAppId),e.setVersion(t.version),V.postEventPrint(e)}static sendEventClick(t){const e=new v;e.setActionId(t.properties.action.actionId),e.setInAppId(t.inAppId),e.setVersion(t.version),V.postEventClick(e)}static sendEventForm(t,e,r){const n=new _;n.setVersion(e),n.setInAppId(t),n.setJsonForm(r),V.postEventForm(n)}static sendEventFormToCustomer(t){const e=new g;e.setFields(t),V.putCustomerField(e)}},{DeviceStatus:O,Device:S}=r(872).Core.Models,{BaseRequest:w}=r(872).Core.Api,P=class extends w{constructor(){super(),this.device=new S}postDeviceRequest(){return this.body=this.createDeviceJson(),this.status!==O.DEFAULT&&(this.body.enabled=1===this.status),this}createDeviceJson(){let t={};try{t=this.device.toJSON()}catch(t){console.log(t)}return t}},{Log:R,CryptoUtils:T,ErrorUtils:A,CorePermissions:N,CommonUtils:L}=r(872).Core.Utils,{EventType:D}=r(872).Core.Models,C="[IND]InAppUtils: ",x=class{constructor(){this.MONTH=24192e5}static async inAppWasShown(t,e,r,n,i){const o=new R(C);t.schema.code&&this.inAppWasGot(t.schema.code,e,(t=>{L.isFunction(i)&&i(t)}),(()=>{L.isFunction(i)&&i(t)}),((t,e)=>{o.d("inAppWasShown: "+t.inAppId+" with error: "+e.errorMessage).writeLog()}),r,n)}static async inAppWasGot(t,e,r,n,i,o,s){const a=f.searchInApp(t),u=(new Date).getTime();if(null!=a){const t=new d(a);if(u<new Date(t.expiredDate).getTime()){if(t.properties.dismissForever&&t.inAppShow.wasDismissed)return void(L.isFunction(i)&&i(t,A.showError(l,l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER)));{const e=t.properties.numberOfShows,r=t.inAppShow?t.inAppShow.timesShowed:null,n=t.properties.numberOfClicks,i=t.inAppShow?t.inAppShow.timesClicked:null;if(e>0){if(!(null!=r&&r<e))return void(L.isFunction(o)&&o(t,A.showError(l,l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES)));f.addInAppNewShow(t)}if(n>0&&null!=i&&i>=n)return void(L.isFunction(s)&&s(t,A.showError(l,l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES)))}return void(L.isFunction(r)&&r(t))}L.isFunction(e)&&e(t,A.showError(l,l.ErrorCode.INAPP_WAS_EXPIRED))}else L.isFunction(n)&&n()}static addNewInApp(t){f.addInApp(t)}static addNewInAppClick(t){t.properties.numberOfClicks&&t.properties.numberOfClicks>0&&f.addInAppNewClick(t),b.sendEventClick(t)}static addNewInApptoDismissForever(t){f.addInAppDismissForever(t)}static isInAppDismissForever(t){const e=f.searchInAppWithInAppId(t.inAppId);return!(null==e||!new d(e).inAppShow.wasDismissed)}static async registerLocation(){const t=new R(C);try{navigator.geolocation&&"prompt"===(await N.getPermissions()).location&&navigator.geolocation.getCurrentPosition((t=>{e.setLatitude(t.coords.latitude),e.setLongitude(t.coords.longitude)}),(r=>{t.e("error "+r).writeLog(),e.getPermissionLocation()||e.getPermissionLocation()==D.EVENT_TYPE_REJECT||e.setPermissionLocation(D.EVENT_TYPE_REJECT)}))}catch(e){t.e(e).writeLog()}}static generateDeviceId(){V.postDevice(new P,(t=>t),(t=>(console.log(t),null)))}static async setExternalCode(t){const r=e.getAppKey(),n=await T.createHmac(r,t);return e.setExternalId(n),n}static async convertToJSONArray(t){if(t&&""!=t)return await Promise.resolve(t).then((t=>JSON.parse(t)))}static getDate(t){const e=new Date(t);let r=""+(e.getMonth()+1),n=""+e.getDate();const i=e.getFullYear();let o=e.getHours(),s=e.getMinutes(),a=e.getSeconds();return r.length<2&&(r="0"+r),n.length<2&&(n="0"+n),o.length<2&&(o="0"+o),s.length<2&&(s="0"+s),a.length<2&&(a="0"+a),`${i}-${r}-${n} ${o}:${s}:${a}`}},{BaseClient:M}=r(872).Core.Api,{Config:k}=r(872).Core,{ErrorModel:B}=r(872).Core.Models,{CommonUtils:U,ErrorUtils:j}=r(872).Core.Utils,V=new class extends M{constructor(){super(),this.ENDPOINT_INAPP="/inapp",this.URL_BASE=k.client.URL_DEVICE_V2+this.ENDPOINT_INAPP,this.ENDPOINT_CAMPAIGN="/campaign",this.ENDPOINT_CAMPAIGN_TAG=this.ENDPOINT_CAMPAIGN+"/{tag}",this.ENDPOINT_DEVICE="/device",this.ENDPOINT_EVENT_INAPP="/event",this.ENDPOINT_EVENT_INAPP_PRINT=this.ENDPOINT_EVENT_INAPP+"/print",this.ENDPOINT_EVENT_INAPP_CLICK=this.ENDPOINT_EVENT_INAPP+"/click",this.ENDPOINT_EVENT_INAPP_FORM=this.ENDPOINT_EVENT_INAPP+"/form",this.ENDPOINT_DEVICE="/device",this.ENDPOINT_DEVICE_TOPICS=this.ENDPOINT_DEVICE+"/topics",this.ENDPOINT_CUSTOMER="/customer",this.ENDPOINT_CUSTOMER_FIELD=this.ENDPOINT_CUSTOMER+"/field",this.isCustomerRequest=!1,this.isDeviceRequest=!1}async getURL(){if(this.isCustomerRequest){this.isCustomerRequest=!1;const t=await e.getUrlInappApi(),r=t?.replaceAll("v2","v1");return r||k.client.CUSTOMER_URL_BASE}if(this.isDeviceRequest){this.isDeviceRequest=!1;const t=await e.getUrlInappApi(),r=t?.replaceAll("v2","v1");return r||k.client.URL_BASE}const t=await e.getUrlInappApi();return t?t+this.ENDPOINT_INAPP:this.URL_BASE}async getCampaignTag(t,e,r){const n=await this.get(this.ENDPOINT_CAMPAIGN_TAG,t.getCampaignTagRequest());if(n&&!(n instanceof B)&&n.data&&Object.keys(n.data).length>0){if(U.isFunction(e)){const t=new d(n.data);x.addNewInApp(t),e(t)}}else n?U.isFunction(r)&&r(n):U.isFunction(r)&&r(j.showError(l,l.ErrorCode.INAPP_ERROR_CONTENT_MESSAGE));return null}async getInAppTopics(t,e,r){if(s.isAppKeyFormat()){const n=await this.get(this.ENDPOINT_DEVICE_TOPICS,t.getDeviceTopicsRequest());if(!n||n instanceof B)n?U.isFunction(r)&&r(n):U.isFunction(r)&&r();else{const t=n.data.topics;U.isFunction(e)&&e(t)}}else U.isFunction(r)&&r(j.showError(l,l.ErrorCode.INAPP_GENERAL_ERROR));return!0}postEventClick(t){s.isAppKeyFormat()&&this.post(this.ENDPOINT_EVENT_INAPP_CLICK,t.postEventClickRequest())}postEventPrint(t){s.isAppKeyFormat()&&this.post(this.ENDPOINT_EVENT_INAPP_PRINT,t.postEventClickRequest())}postEventForm(t){s.isAppKeyFormat()&&this.post(this.ENDPOINT_EVENT_INAPP_FORM,t.postForm())}putCustomerField(t){s.isAppKeyFormat()&&(this.isCustomerRequest=!0,this.put(this.ENDPOINT_CUSTOMER_FIELD,t.putCustomerFieldRequest()))}async postDevice(t,r,n){if(s.isAppKeyFormat()){this.isDeviceRequest=!0;const i=await this.post(this.ENDPOINT_DEVICE,t.postDeviceRequest(),"include");!i||i instanceof B?i?U.isFunction(n)&&n(i):U.isFunction(n)&&n():(i.data.deviceId&&e.setDeviceId(i.data.deviceId),U.isFunction(r)&&r(i.data.deviceId))}else U.isFunction(n)&&n(j.showError(l,l.ErrorCode.INAPP_ERROR));return!0}},{BaseRequest:F}=r(872).Core.Api,Y=class extends F{constructor(){super(),this.PARAM_DEVICE_TYPE="deviceType",this.PARAM_EXTERNAL_CODE="externalCode",this.PARAM_BROWSER_NAME="browerName"}setTag(t){this.tag=t}getCampaignTagRequest(){return this.params=this.createQueryString(),this.pathParams["{tag}"]=this.tag,this}createQueryString(){let t="";return null!=e.getDeviceId()?t+=`${this.PARAM_DEVICE_ID}=${e.getDeviceId()}&`:x.generateDeviceId(),null!=e.getExternalId()&&(t+=`${this.PARAM_EXTERNAL_CODE}=${e.getExternalId()}&`),null!=e.getDeviceType()&&(t+=`${this.PARAM_DEVICE_TYPE}=${e.getDeviceType()}&`),null!=e.getBrowserName()&&(t+=`${this.PARAM_BROWSER_NAME}=${e.getBrowserName()}&`),null!=e.getLatitude()&&(t+=`${this.PARAM_LATITUDE}=${e.getLatitude()}&`),null!=e.getLongitude()&&(t+=`${this.PARAM_LONGITUDE}=${e.getLongitude()}&`),null!=e.getInAppTopics()&&0!==e.getInAppTopics().length&&(t+=`${this.PARAM_TOPICS}=${e.getInAppTopics()}&`),t+=`${this.PARAM_PLATFORM}=webpush`,t}},{BaseRequest:G}=r(872).Core.Api,K=class extends G{constructor(){super()}getDeviceTopicsRequest(){return this.PARAM_DEVICE_ID+"="+e.getDeviceId()}},{CommonUtils:q,ErrorUtils:W}=r(872).Core.Utils,X=class{static saveTopics(t,r,n){if(t instanceof Array){let n=[];if(null!=e.getInAppTopics()&&(n=e.getInAppTopics()),0!==n.length){const e=t.filter((t=>!n.includes(t)));0!==e.length&&n.push(e)}else for(let e=0;e<t.length;e++)n.push(t[e]);e.setInAppTopics(n),q.isFunction(r)&&r(n)}else q.isFunction(n)&&n(W.showError(l,l.ErrorCode.INAPP_INSTANCE_TOPICS_ERROR))}static deleteTopics(t,r,n){if(t instanceof Array){let n=[];if(null!=e.getInAppTopics()&&(n=e.getInAppTopics()),0!==n.length){const r=t.filter((t=>!n.includes(t)));0!==r.length&&e.setInAppTopics(r)}q.isFunction(r)&&r(n)}else q.isFunction(n)&&n(W.showError(l,l.ErrorCode.INAPP_INSTANCE_TOPICS_ERROR))}},J=Object.freeze({TEXT:"text",NUMBER:"number",RADIO:"radio",CHECKBOX:"checkbox",SELECT:"select"}),H=class{constructor(t){if(t.id&&(this.id=t.id),t.name&&(this.name=t.name),t.type)switch(t.type){case"text":this.type=J.TEXT;break;case"checkbox":this.type=J.CHECKBOX;break;case"number":this.type=J.NUMBER;break;case"radio":this.type=J.RADIO;break;case"select":this.type=J.SELECT}t.required&&(this.required=t.required),t.sendToCustomer&&(this.sendToCustomer=t.sendToCustomer)}},{ErrorUtils:Q}=r(872).Core.Utils,z=class{static checkFieldsForm(t,e,r){const n=[];if(e&&t.inputs&&t.inputs.length>0)for(let r=0;r<t.inputs.length;r++){const i=this.checkInputType(t.inputs[r],e);null!=i&&n.push(i)}if(n.length>0)return n;e&&0!==Object.keys(e).length&&b.sendEventForm(t.inAppId,t.inappVersion,e),r&&0!==Object.keys(r).length&&b.sendEventFormToCustomer(r)}static checkInputType(t,e){if(null!=t.id)switch(t.type){case J.TEXT:if(t.required){if(!e[t.id])return Q.showError(l,2121,t.id);if(!e[t.id]instanceof String)return Q.showError(l,2120,`The field ${t.id} is not text`)}break;case J.NUMBER:if(t.required){if(!e[t.id])return Q.showError(l,2121,t.id);if(!e[t.id]instanceof String){if(!parseInt(e[t.id]))return Q.showError(l,2120,`The field ${t.id} is not number`)}else if(!e[t.id]instanceof int)return Q.showError(l,2120,`The field ${t.id} is not number`)}break;default:if(t.required&&e[t.id]&&""==e[t.id])return Q.showError(l,2121,t.id)}return null}static editingFormHtml(t,e){return t.replaceAll("InAppIndigitall.onClick",`inAppIndigitallOnClick_${e}`).replaceAll("InAppIndigitall.submit","inAppIndigitallSubmit").replaceAll("plusSlides",`plusSlides_${e}`).replaceAll("currentSlide",`currentSlide_${e}`).replaceAll("setNewInterval",`setNewInterval_${e}`).replaceAll("newSlide",`newSlide_${e}`).replaceAll("showSlides",`showSlides_${e}`)}},$=class{static onClick(t){if(t){const e=JSON.parse(t);let r;e.inAppId&&(r=e.inAppId),e.inappId&&(r=e.inappId);const n=f.searchInAppWithInAppId(r);if(n&&e.action){const t=new d(n),r=new h(e.action);if(t.properties.setAction(r),r.type==r.URL&&window.open(r.url),t){x.addNewInAppClick(t);const e=new CustomEvent("didClicked",{detail:{action:r},bubbles:!0,cancelable:!0,composed:!1});self.dispatchEvent(e)}}else console.log(`InApp ${e.schema} not found`)}else console.log("InApp action is empty")}static submit(t,e,r){if(t){const n=new class{constructor(t){if(t.inAppId&&(this.inAppId=t.inAppId),t.formId&&(this.formId=t.formId),t.inappVersion&&(this.inappVersion=t.inappVersion),t.inputs&&Array.isArray(t.inputs)){this.inputs=[];for(let e=0;e<t.inputs.length;e++)this.inputs.push(new H(t.inputs[e]))}}}(JSON.parse(t));if(e){const t=z.checkFieldsForm(n,JSON.parse(e),JSON.parse(r));if(t&&t.length>0){const e=new CustomEvent("didFormError",{detail:{errorList:t},bubbles:!0,cancelable:!0,composed:!1});self.dispatchEvent(e)}else{const t=new CustomEvent("didFormSubmit",{detail:{},bubbles:!0,cancelable:!0,composed:!1});self.dispatchEvent(t)}}}}},{ErrorUtils:Z,CommonUtils:tt,LogLevel:et}=r(872).Core.Utils;class rt{constructor(){this.LogLevel=et,this.inAppIndigitallInterface=$}static async init(t){null!=t.appKey&&e.setAppKey(t.appKey),t.urlInAppApi&&e.setUrlInappApi(t.urlInAppApi),t.logLevel&&e.setLogLevel(t.logLevel),!0===t.requestLocation&&x.registerLocation()}static async showInApp(t,r,n,i){const o={appKey:e.getAppKey(),urlInAppApi:"https://device-api.indigitall.com/v2",requestLocation:!0,logLevel:et.DEBUG,inAppCode:t,viewId:r};this.showInAppWithConfig(o,null,null,null,null,null,null,n,i,null,null)}static async showInAppWithConfig(t,e,r,n,i,o,a,u,c,f,h){await this.init(t),s.isAppKeyFormat()?x.inAppWasGot(t.inAppCode,r,(async r=>{r&&r.properties&&this.createInApp(r,t.viewId,a,u,c,e,f,h)}),(()=>{this.drawInApp(t.inAppCode,t.viewId,e,a,u,c,f,h)}),o,n,i):tt.isFunction(c)&&c(Z.showError(l,l.ErrorCode.BAD_REQUEST_SERVER_ERROR))}static showMultipleInApp(t,r,n,i){const o={appKey:e.getAppKey(),urlInAppApi:"https://device-api.indigitall.com/v2",requestLocation:!0,logLevel:et.DEBUG,inAppCodeList:t,divList:r};this.showMultipleInAppWithConfig(o,null,null,null,null,null,null,n,i,null,null)}static async showMultipleInAppWithConfig(t,e,r,n,i,o,a,u,c,f,h){if(await this.init(t),s.isAppKeyFormat()){if(t.inAppCodeList.length==t.divList.length&&t.inAppCodeList.length>0)for(var d=0;d<t.inAppCodeList.length;d++)x.inAppWasGot(t.inAppCodeList[d],r,(async r=>{r&&r.properties&&this.createInApp(r,t.divList[d],a,u,c,e,f,h)}),(()=>{rt.drawInApp(t.inAppCodeList[d],t.divList[d],e,a,u,c,f,h)}),o,n,i)}else tt.isFunction(c)&&c(Z.showError(l,l.ErrorCode.BAD_REQUEST_SERVER_ERROR))}static async drawInApp(t,e,r,n,i,o,s,a){this.getInApp(t,(async t=>{t&&t.properties&&this.createInApp(t,e,n,i,o,r,s,a)}),o)}static async createInApp(t,e,r,n,i,o,s,a){if(t&&t.properties&&t.properties.contentUrl)try{const i=document.getElementById(e);if(i){i.style.position="relative",i.style.overflow="hidden";const u=await fetch(t.properties.contentUrl),c=await u.text();let l=c;null!=t.customData&&Object.keys(t.customData).forEach((function(e){l=c.replaceAll(e,t.customData[e])})),t.version&&(l=l.replaceAll("'inappVersion':'{{version}}'","'inappVersion':"+t.version));const f=e.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,""),h=z.editingFormHtml(l,f);if(i.innerHTML=h,"undefined"===document.getElementById(`script_${f}`)||null===document.getElementById(`script_${f}`)){const t=document.createElement("script");t.id=`script_${f}`,t.type="text/javascript",t.innerHTML=new class{constructor(t,e){this.script=` \n var slideIndex_${e} = 1;\n var delta_${e} = 6;\n var startMove_${e} = null;\n var startMoveY_${e} = null; \n var diffX_${e};\n var diffY_${e};\n var timeSlide_${e} = 10000;\n\n var slider_${e} = document.getElementById("${t}").querySelector('.slider-container-actions');\n var sliderTotal_${e} = document.getElementById("${t}").getElementsByClassName("slideshow-item").length;\n\n showSlides_${e}(slideIndex_${e});\n\n var interval_${e} = setInterval(() => {\n newSlide_${e}();\n }, timeSlide_${e});\n\n if (slider_${e}){\n slider_${e}.addEventListener('touchstart', handleStart_${e}, false);\n slider_${e}.addEventListener('touchend', handleEnd_${e}, false);\n slider_${e}.addEventListener('mousedown', mouseStart_${e});\n slider_${e}.addEventListener('mouseup', mouseEnd_${e}); \n }\n\n\n function mouseStart_${e}(evt) {\n evt.preventDefault();\n startMove_${e} = evt.clientX;\n startMoveY_${e} = evt.clientY;\n }\n\n function mouseEnd_${e}(evt) {\n evt.preventDefault();\n var endMove = evt.clientX;\n var endMoveY = evt.clientY;\n setEndMove_${e}(endMove, endMoveY);\n }\n\n function handleStart_${e}(evt) {\n evt.preventDefault();\n startMove_${e} = evt.touches[0].clientX;\n startMoveY_${e} = evt.touches[0].clientY;\n }\n function handleEnd_${e}(evt) {\n evt.preventDefault();\n var endMove = evt.changedTouches[0].pageX;\n var endMoveY = evt.changedTouches[0].pageY;\n setEndMove_${e}(endMove, endMoveY);\n }\n\n function setEndMove_${e}(endMove, endMoveY) {\n diffX_${e} = Math.abs(endMove - startMove_${e});\n diffY_${e} = Math.abs(endMoveY - startMoveY_${e});\n if (startMove_${e} != null) {\n if (startMove_${e} > endMove) {\n slideIndex_${e}++;\n if (slideIndex_${e} > sliderTotal_${e}) {\n slideIndex_${e} = 1;\n }\n } else {\n if (slideIndex_${e} == 0) {\n slideIndex_${e} = sliderTotal_${e};\n } else {\n slideIndex_${e}--;\n }\n }\n showSlides_${e}(slideIndex_${e});\n setNewInterval_${e}();\n }\n }\n\n function plusSlides_${e}(n) {\n showSlides_${e}(slideIndex_${e} += n);\n setNewInterval_${e}();\n }\n\n function currentSlide_${e}(n) {\n showSlides_${e}(slideIndex_${e} = n);\n }\n\n function setNewInterval_${e}() {\n clearInterval(interval_${e});\n interval_${e} = setInterval(() => {\n newSlide_${e}();\n }, timeSlide_${e});\n }\n\n function newSlide_${e}(){\n slideIndex_${e}++;\n if (slideIndex_${e} > sliderTotal_${e}) {\n slideIndex_${e} = 1;\n }\n showSlides_${e}(slideIndex_${e});\n }\n\n function showSlides_${e}(n) {\n let view = document.getElementById("${t}");\n if (view) {\n let slides = view.getElementsByClassName("slideshow-item");\n let i;\n let dots = view.getElementsByClassName("dot");\n if (n > slides.length) {slideIndex_${e} = 1;}\n if (n < 1) {slideIndex_${e} = slides.length;}\n for (i = 0; i < slides.length; i++) {\n slides[i].style.display = "none";\n }\n for (i = 0; i < dots.length; i++) {\n dots[i].className = dots[i].className.replace(" active", "");\n }\n if (slides[slideIndex_${e}-1]) {\n slides[slideIndex_${e}-1].style.display = "block";\n }\n if (dots[slideIndex_${e}-1]) dots[slideIndex_${e}-1].className += " active";\n }\n }\n\n\n function inAppIndigitallOnClick_${e}(action) {\n if (diffX_${e} && diffY_${e}) {\n if (diffX_${e} < delta_${e} && diffY_${e} < delta_${e}) {\n indigitall.InApp.inAppOnClick(action);\n }\n } else {\n indigitall.InApp.inAppOnClick(action);\n }\n }\n\n function inAppIndigitallSubmit(formOptions) {\n const jsonForm = {}\n const jsonCustomer = {}\n const form = document.querySelector('[id="'+formOptions.formId+'"]');\n if (form) {\n formOptions.inputs.forEach((el) => {\n if (el.id !== 'undefined') {\n let value;\n if (el.type === 'text' || el.type === 'number') {\n if (form && form.querySelector('input[id^="'+el.id+'"]') && form.querySelector('input[id^="'+el.id+'"]').value !== 'undefined') {\n value = form.querySelector('input[id^="'+el.id+'"]').value;\n }\n }\n if (el.type === 'checkbox') {\n if (form && form.querySelectorAll('input[id^="'+el.id +'"]')) {\n let values = form.querySelectorAll('input[id^="'+el.id +'"]');\n var valuesChecked = [];\n for (var i = 0; i < values.length; i++) {\n if (values[i].checked && values[i].value !== 'undefined') {\n valuesChecked.push(values[i].value);\n }\n }\n value = valuesChecked;\n }\n }\n if (el.type === 'radio') {\n if (form && form.querySelectorAll('input[id^="'+el.id +'"]')) {\n let values = form.querySelectorAll('input[id^="'+el.id +'"]');\n var valuesChecked;\n for (var i = 0; i < values.length; i++) {\n if (values[i].checked && values[i].value !== 'undefined') {\n valuesChecked = values[i].value;\n }\n }\n value = valuesChecked;\n }\n }\n if (el.type === 'select') {\n if (form && form.querySelector('select[id^="'+el.id+'"]') && form.querySelector('select[id^="'+el.id+'"]').value !== 'undefined') {\n value = form.querySelector('select[id^="'+el.id+'"]').value;\n }\n }\n if (value) jsonForm[el.id] = value;\n if (el.sendToCustomer) jsonCustomer[el.id] = value;\n }\n });\n }\n indigitall.InApp.inAppSubmit(JSON.stringify(formOptions), JSON.stringify(jsonForm), JSON.stringify(jsonCustomer));\n }\n `,this.htmlTest="\n <!DOCTYPE html>\n <html lang=\"en\" dir=\"ltr\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width\" />\n <title>guille test</title>\n <style>\n html,\n body {\n margin: 0;\n padding: 0;\n height: 100%;\n width: 100%;\n }\n body p:first-child {\n margin: 0;\n }\n </style>\n </head>\n <body>\n \n <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n <html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n \x3c!--[if !mso]>\x3c!--\x3e\n \x3c!--[if (gte mso 9)|(IE)]>\x3c!--\x3e\n <link href=\"https://fonts.googleapis.com/css2?family=EB+Garamond&family=Merriweather&family=Montserrat&family=Open+Sans&family=Oswald&family=Playfair+Display&family=Raleway&family=Roboto&family=Roboto+Slab&family=Source+Sans+Pro&display=swap\" rel=\"stylesheet\">\n \x3c!--<![endif]--\x3e\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n \x3c!--<![endif]--\x3e\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <link href=\"http://fonts.cdnfonts.com/css/arial\" rel=\"stylesheet\">\n <link href=\"http://fonts.cdnfonts.com/css/courier-new\" rel=\"stylesheet\">\n <link href=\"http://fonts.cdnfonts.com/css/georgia-2\" rel=\"stylesheet\">\n <link href=\"http://fonts.cdnfonts.com/css/trebuchet-ms-2\" rel=\"stylesheet\">\n <link href=\"http://fonts.cdnfonts.com/css/verdana-pro-cond\" rel=\"stylesheet\">\n \n <link href=\"https://fonts.googleapis.com/css2?family=EB+Garamond&family=Merriweather&family=Montserrat&family=Open+Sans&family=Oswald&family=Playfair+Display&family=Raleway&family=Roboto&family=Roboto+Slab&family=Source+Sans+Pro&display=swap\" rel=\"stylesheet\">\n <title>InApp Sample</title>\n \n <style type=\"text/css\">\n html {\n width: 100%;\n height: 100%;\n }\n @font-face {\n font-family: 'Merriweather';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/merriweather/v28/u-440qyriQwlOrhSvowK_l5OeA.woff) format('woff');\n }\n @font-face {\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/montserrat/v23/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Ew9.woff) format('woff');\n }\n @font-face {\n font-family: 'Open Sans';\n font-style: normal;\n font-weight: 400;\n font-stretch: normal;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/opensans/v28/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0C4k.woff) format('woff');\n }\n @font-face {\n font-family: 'Oswald';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/oswald/v47/TK3_WkUHHAIjg75cFRf3bXL8LICs1_FvgUI.woff) format('woff');\n }\n @font-face {\n font-family: 'Playfair Display';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/playfairdisplay/v28/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvUDT.woff) format('woff');\n }\n @font-face {\n font-family: 'Raleway';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/raleway/v26/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaooCM.woff) format('woff');\n }\n @font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Me5g.woff) format('woff');\n }\n @font-face {\n font-family: 'Roboto Slab';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/robotoslab/v22/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISWaw.woff) format('woff');\n }\n @font-face {\n font-family: 'Source Sans Pro';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xK3dSBYKcSV-LCoeQqfX1RYOo3aPA.woff) format('woff');\n }\n @font-face {\n font-family: 'EB Garamond';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/ebgaramond/v24/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-6_RUAA.woff) format('woff');\n }\n /* latin-ext */\n @font-face {\n font-family: 'Merriweather';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/merriweather/v28/u-440qyriQwlOrhSvowK_l5-ciZMZ-Y.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Merriweather';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/merriweather/v28/u-440qyriQwlOrhSvowK_l5-fCZM.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/montserrat/v23/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw3aXpsog.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/montserrat/v23/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw5aXo.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Open Sans';\n font-style: normal;\n font-weight: 400;\n font-stretch: 100%;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/opensans/v28/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4uaVIGxA.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Open Sans';\n font-style: normal;\n font-weight: 400;\n font-stretch: 100%;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/opensans/v28/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Oswald';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/oswald/v47/TK3_WkUHHAIjg75cFRf3bXL8LICs1_FvsUhiZTaR.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Oswald';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/oswald/v47/TK3_WkUHHAIjg75cFRf3bXL8LICs1_FvsUZiZQ.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Playfair Display';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/playfairdisplay/v28/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvXDZbtPY_Q.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Playfair Display';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/playfairdisplay/v28/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvXDXbtM.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Raleway';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/raleway/v26/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCGPrEHJA.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Raleway';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/raleway/v26/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCIPrE.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Mu7GxKOzY.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Mu4mxK.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Roboto Slab';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/robotoslab/v22/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmYWRjRdE.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Roboto Slab';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/robotoslab/v22/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmb2Rj.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Source Sans Pro';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNq7lqDY.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Source Sans Pro';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7l.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'EB Garamond';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/ebgaramond/v24/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-6_RkCo9_S6w.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'EB Garamond';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/ebgaramond/v24/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-6_RkBI9_.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n \n </style>\n <style>\n .slideshow-item {\n cursor: grabbing;\n scroll-snap-align: start;\n display: none; \n scroll-snap-type: x mandatory;\n scroll-behavior: smooth;\n -webkit-overflow-scrolling: touch; /* For mobile */\n -ms-overflow-style: none; /* For hide scrollbar */\n scrollbar-width: none; /* For hide scrollbar */\n }\n .slideshow-item-preview {\n cursor: grabbing;\n scroll-snap-align: start;\n display: block; \n scroll-snap-type: x mandatory;\n scroll-behavior: smooth;\n -webkit-overflow-scrolling: touch; /* For mobile */\n -ms-overflow-style: none; /* For hide scrollbar */\n scrollbar-width: none; /* For hide scrollbar */\n }\n img {vertical-align: middle;}\n \n /* Slideshow container */\n .slideshow-container {\n /* max-width: 1000px; */\n position: relative;\n margin: auto;\n -webkit-overflow-scrolling: touch; /* For mobile */\n }\n \n /* Next & previous buttons */\n .prev, .next {\n cursor: pointer;\n position: absolute;\n top: 50%;\n width: auto;\n padding: 16px;\n margin-top: -22px;\n color: white;\n font-weight: bold;\n font-size: 18px;\n transition: 0.6s ease;\n border-radius: 0 3px 3px 0;\n user-select: none;\n }\n \n /* Position the \"next button\" to the right */\n .next {\n right: 0;\n border-radius: 3px 0 0 3px;\n }\n \n /* On hover, add a black background color with a little bit see-through */\n .prev:hover, .next:hover {\n background-color: rgba(0,0,0,0.8);\n }\n \n .points {\n padding: 8px 12px;\n position: absolute;\n bottom: 8px;\n text-align: center;\n width:100%;\n }\n \n /* The dots/bullets/indicators */\n .dot {\n cursor: pointer;\n height: 15px;\n width: 15px;\n margin: 0 2px;\n background-color: #bbb;\n border-radius: 50%;\n display: inline-block;\n transition: background-color 0.6s ease;\n }\n \n .active, .dot:hover {\n background-color: #717171;\n }\n \n /* On smaller screens, decrease text size */\n @media only screen and (max-width: 300px) {\n .prev, .next,.text {font-size: 11px}\n }\n </style>\n \n </head>\n <body style=\"margin:0; height: 100%; width: 100%;\">\n <div style=\"\n background-color: rgba(244, 244, 244, 1);\n width: 100%;\n height: 100%;\n margin: 0 auto;\n \">\n \n <div style=\"\n display: flex;\n flexDirection: row;\n box-sizing: border-box;\n padding: 0px 0px 0px 0px ;\n margin: 0px 0px 0px 0px ;\n background-color: rgba(244, 244, 244, 0);\n border: 0px solid rgba(244, 244, 244, 0);\n width: 100%;\">\n \n <div style=\"\n width: 100%;\n \">\n \n <div style=\"\n margin: 0px 0px 0px 0px ;\n padding: 15px 15px 15px 15px ;\n background-color: rgba(244, 244, 244, 0);\n text-align: left;\n font-family: 'Roboto';\n \">\n \n <form id=\"5kZSrg6xbKyX\" class=\"form-style-1\">\n \n <style type=\"text/css\">\n .form-style-1 {\n }\n .form-style-1 li {\n padding: 0;\n display: block;\n list-style: none;\n margin: 10px 0 0 0;\n }\n .form-style-1 label{\n margin:0 0 3px 0;\n padding:0px;\n display:block;\n font-weight: bold;\n }\n .form-style-1 input[type=text], \n .form-style-1 input[type=date],\n .form-style-1 input[type=datetime],\n .form-style-1 input[type=number],\n .form-style-1 input[type=search],\n .form-style-1 input[type=time],\n .form-style-1 input[type=url],\n .form-style-1 input[type=email],\n textarea, \n select{\n box-sizing: border-box;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n border:1px solid #BEBEBE;\n padding: 7px;\n margin:0px;\n -webkit-transition: all 0.30s ease-in-out;\n -moz-transition: all 0.30s ease-in-out;\n -ms-transition: all 0.30s ease-in-out;\n -o-transition: all 0.30s ease-in-out;\n outline: none;\n }\n .form-style-1 input[type=text]:focus, \n .form-style-1 input[type=date]:focus,\n .form-style-1 input[type=datetime]:focus,\n .form-style-1 input[type=number]:focus,\n .form-style-1 input[type=search]:focus,\n .form-style-1 input[type=time]:focus,\n .form-style-1 input[type=url]:focus,\n .form-style-1 input[type=email]:focus,\n .form-style-1 textarea:focus, \n .form-style-1 select:focus{\n -moz-box-shadow: 0 0 8px #88D5E9;\n -webkit-box-shadow: 0 0 8px #88D5E9;\n box-shadow: 0 0 8px #88D5E9;\n border: 1px solid #88D5E9;\n }\n .form-style-1 .field-divided{\n width: 49%;\n }\n \n .form-style-1 .field-long{\n width: 100%;\n }\n .form-style-1 .field-select{\n width: 100%;\n }\n .form-style-1 .field-textarea{\n height: 100px;\n }\n \n .form-style-1 input[type=submit]:hover, .form-style-1 input[type=button]:hover{\n background: #4691A4;\n box-shadow:none;\n -moz-box-shadow:none;\n -webkit-box-shadow:none;\n }\n .form-style-1 input[type=radio]{\n transform: scale(1.2);\n }\n .form-style-1 input[type=checkbox]{\n transform: scale(1.2);\n }\n .form-style-1 .required{\n color:red;\n }\n </style>\n \n \n <div style=\"margin-top: 10px;\">\n <label>\n Escribe algo\n <span class=\"required\">*</span>\n </label>\n <input type=\"text\" name=\"algo\" id=\"algo\" required=\"true\" sendToCustomer=\"true\" style=\"width: 100%;\n padding: 12px 20px;\n margin: 8px 0;\n display: inline-block;\n border: 1px solid #ccc;\n border-radius: 4px;\n box-sizing: border-box;\">\n </div><div style=\"margin-top: 10px;\">\n <label style=\"\n margin:0 0 3px 0;\n padding:0px;\n display:block;\n \">\n Selecciona algo\n \n </label>\n <select style=\"width: 100%;\n padding: 12px 20px;\n margin: 8px 0;\n display: inline-block;\n border: 1px solid #ccc;\n border-radius: 4px;\n box-sizing: border-box;\" id=\"selector\" required=\"undefined\" sendToCustomer=\"true\">\n <option value=\"algo\">Algo</option><option value=\"masalgo\">Mas algo</option><option value=\"variosalgos\">Varios algos</option>\n </select>\n </div>\n <div style=\"\n margin-top: 10px;\n \">\n <label style=\"\n margin-bottom: 10px;\n \">\n ¿Cuál de las dos opciones te gusta más?\n \n </label>\n \n <div style=\"margin-bottom: 5px; display: flex; flex-direction: row; align-items: baseline; gap:0px;\">\n <input style=\"margin-right: 10px;\" type=\"radio\" id=\"radio0\" name=\"radio\" value=\"opcion1\"><label style=\"font-weight: 100; margin-right: 10px;\" for=\"radio0\">Opcion 1</label>\n </div>\n \n <div style=\"margin-bottom: 5px; display: flex; flex-direction: row; align-items: baseline; gap:0px;\">\n <input style=\"margin-right: 10px;\" type=\"radio\" id=\"radio1\" name=\"radio\" value=\"opcion2\"><label style=\"font-weight: 100; margin-right: 10px;\" for=\"radio1\">Opcion 2</label>\n </div>\n \n </div>\n \n <div style=\"margin-top: 10px;\">\n <label style=\"\n margin-bottom: 10px;\n \">\n Marca las casillas que quieras\n \n </label>\n \n <div style=\"display: flex; flex-direction: row; margin-bottom: 5px; align-items: flex-start;\">\n <input style=\"margin-right: 10px;\" type=\"checkbox\" id=\"casilla0\" name=\"casilla\" value=\"casilla1\"><label style=\"font-weight: 100; margin-right: 10px;\" for=\"casilla0\">Casilla 1</label>\n </div>\n \n <div style=\"display: flex; flex-direction: row; margin-bottom: 5px; align-items: flex-start;\">\n <input style=\"margin-right: 10px;\" type=\"checkbox\" id=\"casilla1\" name=\"casilla\" value=\"casilla2\"><label style=\"font-weight: 100; margin-right: 10px;\" for=\"casilla1\">Casilla 2</label>\n </div>\n \n </div>\n \n <tr style=\"\n display: block;\n text-align: left; \">\n <td style=\"\n display: inline-block;\n width: auto;\n padding: 15px 15px 15px 15px ;\n margin: 0px 0px 0px 0px ;\n background-color: rgba(244, 244, 244, 0);\">\n <div target=\"_blank\" rel=\"noreferrer\" onclick=\"InAppIndigitall.submit({'schemaId':217,'inAppId':22,'inputs':[{'type':'text','label':'Escribe algo','name':'algo','subtype':'text','required':true,'sendToCustomer':true,'id':'algo'},{'type':'select','label':'Selecciona algo','name':'selector','options':[{'name':'Algo','value':'algo'},{'name':'Mas algo','value':'masalgo'},{'name':'Varios algos','value':'variosalgos'}],'sendToCustomer':true,'id':'selector'},{'type':'radio','label':'¿Cuál de las dos opciones te gusta más?','name':'radio','options':[{'name':'Opcion 1','value':'opcion1'},{'name':'Opcion 2','value':'opcion2'}],'labelPosition':'right','id':'radio'},{'type':'checkbox','label':'Marca las casillas que quieras','options':[{'name':'Casilla 1','value':'casilla1'},{'name':'Casilla 2','value':'casilla2'}],'subtype':'right','name':'casilla','id':'casilla'}],'formId':'5kZSrg6xbKyX'})\" style=\"text-decoration: none; width: auto; cursor: pointer;\">\n <div style=\"\n padding: 8px 16px 8px 16px;\n width: auto;\n display: inline-block;\n text-align: left;\n background-color: rgba(200, 200, 200, 1);\n border-radius: 3px 3px 3px 3px;\n border: 0px solid transparent;\n box-sizing: border-box;\n margin-top: 15px;\">\n <span style=\"text-align: center; \"><span style=\"font-size: 16px\"><span style=\"font-family: Roboto, sans-serif !important\"><span style=\"color: #555555\"><span style=\"background-color: transparent\"><span style=\"letter-spacing: 0px;\">Botón</span></span></span></span></span></span>\n </div>\n </div>\n </td>\n </tr>\n \n </form>\n \n </div>\n \n </div>\n </div>\n </div>\n </body>\n </html>\n <script>\n // Created event\n var event = document.createEvent('Event');\n \n /* defined event 'click'.*/\n event.initEvent('click', true, true);\n \n // to assign event click.\n document.addEventListener('click', function (e) {\n window.parent.document.dispatchEvent(new CustomEvent('indigitall_on_click_inapp', {detail: {\n inAppId: 217,\n lastVersionId: 431,\n clickedButton: 'content',\n action: {\n type: 'url',\n url: 'https://indigitall.com'\n }\n }}));\n }, false);\n <\/script>\n </body>\n </html>\n \n "}}(e,f).script,i.appendChild(t)}if(self.addEventListener("didClicked",(function e(n){r&&r(t,n.detail.action),self.removeEventListener("didClicked",e)})),self.addEventListener("didFormError",(function e(r){s&&s(t,r.detail.errorList),self.removeEventListener("didFormError",e)})),self.addEventListener("didFormSubmit",(function e(r){a&&a(t),self.removeEventListener("didFormSubmit",e)})),t.properties.showTime){let e=0;const r=setInterval((function(){e++,e==parseInt(t.properties.showTime)&&(i.style.display="none",clearInterval(r),tt.isFunction(o)&&o(t,i,1e3*t.properties.showTime))}),1e3)}if(t.properties.layout&&t.properties.layout.borderRadius){const e=`${parseInt(t.properties.layout.borderRadius)}px`;i.style.borderRadius=e}tt.isFunction(n)&&n(t,i),b.sendEventPrint(t)}}catch(r){let n=null;t&&t.schema&&t.schema.code&&(n=t.schema.code),tt.isFunction(i)&&i(r,e,n)}}static topicsList(t,e){return V.getInAppTopics(new K,t,e),!0}static async topicsSubscribe(t,e,r){X.saveTopics(t,e,r)}static async topicsUnsubscribe(t,e,r){X.deleteTopics(t,e,r)}static inAppGet(t,e,r){this.getInApp(t,e,r)}static getInApp(t,e,r){if(s.isAppKeyFormat()){const n=new Y;n.setTag(t),V.getCampaignTag(n,e,r)}else tt.isFunction(r)&&r(Z.showError(l,l.ErrorCode.BAD_REQUEST_SERVER_ERROR))}static addNewInAppToDismissForever(t){x.addNewInApptoDismissForever(t)}static async isInAppDismissForever(t){x.isInAppDismissForever(t)}static async inAppOnClick(t){$.onClick(t)}static async inAppSubmit(t,e,r){$.submit(t,e,r)}static async inAppWasShown(t,e,r,n,i){x.inAppWasShown(t,e,r,n,i)}static async downloadHTML(t){const e=await fetch(t,{method:"GET"});console.log(e)}static async setExternalCode(t){return await x.setExternalCode(t)}}const nt=rt;window.indigitall||(window.indigitall={}),window.indigitall.InApp=rt,window.indigitall.InApp.Utils=x,window.indigitall.LogLevel=et})(),n})(),t.exports=e()},396:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}i.default=t,r&&r.set(t,i);return i}(r(899));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},301:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.2.2","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>M});var t={};r.r(t),r.d(t,{BaseClient:()=>_,BaseRequest:()=>b});var e={};r.r(e),r.d(e,{Channel:()=>O,Device:()=>S,DeviceStatus:()=>w,ErrorDictionary:()=>I,ErrorModel:()=>g,EventType:()=>P});var i={};r.r(i),r.d(i,{CommonUtils:()=>R,CorePermissions:()=>T,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>C,Log:()=>E,LogLevel:()=>p,Validations:()=>x});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,d=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getDeviceJson(){return c.getItem(this.DEVICE_JSON)}async setDeviceJson(t){c.setItem(this.DEVICE_JSON,t)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}},p=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=p;class v{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new d).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const E=v,g=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new g(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new g(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},_=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new E("[IND]BaseClient: ");let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+e.status+"\nResponse Message: "+e.statusText+"\n").writeLog(),new g(e.status,e.statusText))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},b=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new d).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},O=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),S=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new d).getBrowserPublicKey(),this.browserPrivateKey=(new d).getBrowserPrivateKey(),this.platform=(new d).getPlatform(),this.version=(new d).getVersion(),this.browserName=(new d).getBrowserName(),this.browserVersion=(new d).getBrowserVersion(),this.osName=(new d).getOsName(),this.osVersion=(new d).getOsVersion(),this.deviceType=(new d).getDeviceType(),(new d).getEnabled()&&(this.enabled="true"===(new d).getEnabled()),(new d).getExternalId()&&(this.externalCode=(new d).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new d).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new d).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}static setDeviceJson(t){(new d).setDeviceJson(JSON.stringify(t.toJSON()))}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},w=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),P=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=class{static isServiceTimestampExceed(){return!(new d).getServiceTimestamp()||(new d).getServiceSyncTime()<=(Date.now()-(new d).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},T=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new E("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},A=new E("[IND]Crypto"),N=new TextEncoder("utf-8"),L="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",N.encode(t),{name:L,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(L,n,N.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return A.d("hmac: ",s).writeLog(),s}catch(t){return void A.e("error:",t).writeLog()}}},C=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},x=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M={Repository:d,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(545)),i=a(r(358)),o=a(r(568)),s=a(r(801));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,a,u,l,d,p,y;return e=t,r=[{key:"getURL",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"call",value:(p=f(c().mark((function t(e,r,a,u){var l,f,h,d,p;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=new n.default("[IND]BaseClient: "),t.next=3,this.getURL();case 3:return t.t0=t.sent,t.t1=a.getPath(r),t.t2=t.t0+t.t1,t.t3=a.getParams(),f=t.t2+t.t3,a.isJourneyRequest()&&(f=f.replace("v1","v2")),h={method:e,headers:a.addHeaders()},e!==this.GET&&(h.body=JSON.stringify(a.getBody())),u&&(h.credentials=u),t.prev=12,t.next=15,fetch(f,h);case 15:return d=t.sent,t.next=18,d.json();case 18:if(p=t.sent,!d.ok){t.next=22;break}return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.statusCode+"\nResponse Message: "+p.message+"\nResponse Body:",JSON.stringify(p.data,null,"\t")).writeLog(),t.abrupt("return",p);case 22:return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+d.status+"\nResponse Message: "+d.statusText+"\n").writeLog(),t.abrupt("return",new i.default(d.status,d.statusText));case 26:return t.prev=26,t.t4=t.catch(12),l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 30:case"end":return t.stop()}}),t,this,[[12,26]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(d=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(l=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return l.apply(this,arguments)})},{key:"put",value:(u=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"delete",value:(a=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return a.apply(this,arguments)})}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version;var o=n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}});e.default=o},106:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}var h={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u};e.default=h},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.Channel=r;var n=r;e.default=n},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r,n;return e=t,n=[{key:"setDeviceJson",value:function(t){(new i.default).setDeviceJson(JSON.stringify(t.toJSON()))}}],(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=r},358:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=i},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}});var n=r(901),i=c(r(354)),o=c(r(202)),s=c(r(801)),a=c(r(358)),u=c(r(22));function c(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(){n=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof p?e:p,s=Object.create(i.prototype),a=new R(n||[]);return o(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&i.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(o,s,a,u){var c=h(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var s;o(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return s=s?s.then(i,i):i()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,o(I,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},795:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}var e,r,a,u,l,d,p,y,v,E,g,m,I;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.APP_KEY,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(E=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(y=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},{key:"getExternalIdRequest",value:(p=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return p.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getDeviceJson",value:(d=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.DEVICE_JSON));case 1:case"end":return t.stop()}}),t,this)}))),function(){return d.apply(this,arguments)})},{key:"setDeviceJson",value:(l=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.DEVICE_JSON,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getRegisteredByCookie",value:(u=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(a=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},636:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(){s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,u)}),(function(t){i("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="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},i(t)}function o(){o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(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,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h,d;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,s=null===(n=window)||void 0===n||null===(i=n.crypto)||void 0===i?void 0:i.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,s.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return a=t.sent,t.next=9,s.sign(l,a,c.encode(r));case 9:return f=t.sent,h=new Uint8Array(f),d=Array.prototype.map.call(h,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",d).writeLog(),t.abrupt("return",d);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.CryptoUtils=f;var h=f;e.default=h},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},970:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i;return e=t,i=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="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},s(t)}function a(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,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.LogLevel=r;var n=r;e.default=n},506:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(306)),i=f(r(897)),o=f(r(95)),s=f(r(568)),a=f(r(970)),u=f(r(545)),c=r(136),l=f(r(506));function f(t){return t&&t.__esModule?t:{default:t}}},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.2.2","_id":"indigitall-web-core@4.2.2","_inBundle":false,"_integrity":"sha512-ur4Fqa70ZTqQGwLTFr2nOmjbOlvqm1riStW08NDSficeGpdIKnHhxLzzYffKVfAOpPXLP/kSlbVqTr797m5KdA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.2.2","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.2.2","saveSpec":null,"fetchSpec":"4.2.2"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.2.2.tgz","_shasum":"4fcb6bb28a04b7c1c2b636df371cb2cf9702aaba","_spec":"indigitall-web-core@4.2.2","_where":"/home/circleci/webpush/inbox","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.2.2"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{default:()=>D});const{Repository:t}=r(872).Core,e=new class extends t{constructor(){super(),this.AUTH_TOKEN=this.REPOSITORY+".AUTH_TOKEN",this.INBOX_AUTH_MODE=this.REPOSITORY+".INBOX_AUTH_MODE",this.URL_INBOX_API=this.REPOSITORY+".URL_INBOX_API"}async setDeviceId(t){this.setStorage(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}setAuthToken(t){this.setStorage(this.AUTH_TOKEN,t)}getAuthToken(){return this.getStorage(this.AUTH_TOKEN)}setInboxAuthMode(t){this.setStorage(this.INBOX_AUTH_MODE,t)}getInboxAuthMode(){return this.getStorage(this.INBOX_AUTH_MODE)}async getUrlInboxApi(){return this.getStorage(this.URL_INBOX_API)}async setUrlInboxApi(t){this.setStorage(this.URL_INBOX_API,t)}},{BaseClient:o}=r(872).Core.Api,{Config:s}=r(872).Core,{ErrorModel:a}=r(872).Core.Models,{CommonUtils:u}=r(872).Core.Utils,c=new class extends o{constructor(){super(),this.URL_BASE=s.client.INBOX_URL_BASE,this.ENDPOINT_INBOX_NOTIFICATIONS="/notification",this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID=this.ENDPOINT_INBOX_NOTIFICATIONS+"/{sendingId}",this.ENDPOINT_INBOX_COUNTER="/counters",this.ENDPOINT_INBOX_AUTH="/auth/webhook"}async getURL(){return await e.getUrlInboxApi()||this.URL_BASE}async postInboxAuth(t,r,n){const i=await this.post(this.ENDPOINT_INBOX_AUTH,t.postInboxAuth());if(!i||i instanceof a||!i.data)i?u.isFunction(n)&&n(i):u.isFunction(n)&&n();else{const t=i.data.token;e.setAuthToken(t),u.isFunction(r)&&r(i)}return!0}async getInbox(t,e,r){const n=await this.get(this.ENDPOINT_INBOX_NOTIFICATIONS,t.getInboxPushRequest());return this.getInboxResponseStatus(n,e,r),!0}async putInboxPush(t,e,r){const n=await this.put(this.ENDPOINT_INBOX_NOTIFICATIONS,t.putInboxPushRequest());return this.getInboxResponseEdit(n,e,r),!0}async getInboxPushWithSendingId(t,e,r,n){const i=await this.get(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,t.getInboxPushRequestWithSendingId());return this.getNotificationResponseStatus(i,e,r,n),!0}async putInboxPushWithSendingId(t,e,r,n){const i=await this.put(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,t.putInboxWithSendingId());return this.getNotificationResponseStatus(i,e,r,n),!0}async getInboxCounter(t,e,r){const n=await this.get(this.ENDPOINT_INBOX_COUNTER,t.getCounter());this.getCounterStatus(n,e,r)}async getInboxResponseStatus(t,e,r){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const r=new D(t.data);u.isFunction(e)&&e(r)}else t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}async getInboxResponseEdit(t,e,r){t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300?u.isFunction(e)&&e():t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}getNotifications(t,e){const r=[];for(let n=0;n<t.length;n++){null!=t[n].sentAt&&null!=e&&t[n].sentAt<e&&(read=!0);const i=new InboxNotification(t[n],e);r.push(i)}return r}async getNotificationResponseStatus(t,e,r,n){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const t=new InboxNotification(notifications[i],e);u.isFunction(r)&&r(t)}else t?u.isFunction(n)&&n(t):u.isFunction(n)&&n()}async getCounterStatus(t,e,r){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const r={click:t.data.click,sent:t.data.sent,deleted:t.data.deleted,unread:this.getUnreadCounters(t.data.unread)};u.isFunction(e)&&e(r)}else t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}getUnreadCounters(t){return{count:t.count,lastAccess:t.lastAccess}}},{BaseRequest:l}=r(872).Core.Api,f=class extends l{constructor(){super()}postInboxAuth(){return this.body=this.json,this}setJson(t){this.json=t}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}},h=Object.freeze({SENT:"sent",CLICK:"click",DELETED:"deleted"});window.inboxStatus=h;const d=h,p=Object.freeze({NONE:"none",DEFAULT:"default",WEBHOOK:"webhook"}),{BaseRequest:y}=r(872).Core.Api,v=class extends y{constructor(){super(),null!=e.getExternalId()&&(this.externalId=e.getExternalId()),null!=e.getAuthToken()&&e.getInboxAuthMode()==p.WEBHOOK&&(this.headers.Authorization="Bearer "+e.getAuthToken()),this.sendingId="",this.sendingIds=null,this.page=0,this.pageSize=0,this.dateFrom="",this.dateTo="",this.status=d.INBOXSTATUS_SENT,this.statusList=null}getInboxPushRequest(){return this.params=this.createQueryString(),this}putInboxPushRequest(){return this.params=this.createQueryStringExternalId(),this.body=this.createBodyJson(),this}getInboxPushRequestWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this}putInboxWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this.body=this.createBodyStatusJson(),this}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}createQueryString(){let t="";if(this.page&&(t+=this.PARAM_INBOX_PAGE+"="+this.page+"&"),this.pageSize&&(t+=this.PARAM_INBOX_PAGE_SIZE+"="+this.pageSize+"&"),this.dateFrom&&(t+=this.PARAM_INBOX_DATE_FROM+"="+this.dateFrom+"&"),this.dateTo&&(t+=this.PARAM_INBOX_DATE_TO+"="+this.dateTo+"&"),this.statusList){let e="";for(let t=0;t<this.statusList.length;t++)e+=this.statusList[t],t!=this.statusList.length-1&&(e+=",");t+=this.PARAM_INBOX_STATUS+"="+e+"&"}return t+this.createQueryStringExternalId()}createQueryStringExternalId(){return this.PARAM_INBOX_EXTERNALID+"="+this.externalId}createBodyJson(){let t={};const e=[];try{if(t=this.createBodyStatusJson(),this.sendingIds)for(let t=0;t<this.sendingIds.length;t++)e.push(this.sendingIds[t]);t.sendingIds=e}catch(t){console.log("Error Inbox request :"+t)}return t}createBodyStatusJson(){const t={};return this.status&&(t.status=this.status),t}setSendingId(t){this.sendingId=t}setSendingIds(t){this.sendingIds=t}setPage(t){this.page=t}setPageSize(t){this.pageSize=t}setDateFrom(t){this.dateFrom=t}setDateTo(t){this.dateTo=t}setStatus(t){this.status=t}setStatusList(t){this.statusList=t}},{BaseRequest:E}=r(872).Core.Api,g=class extends E{constructor(){super(),null!=e.getExternalId()&&(this.externalId=e.getExternalId()),null!=e.getAuthToken()&&e.getInboxAuthMode()==p.WEBHOOK&&(this.headers.Authorization="Bearer "+e.getAuthToken())}getCounter(){return this.params=this.createQueryStringExternalId(),this}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}createQueryStringExternalId(){return this.PARAM_INBOX_EXTERNALID+"="+this.externalId}};class m{constructor(t,e){t&&(t.id&&(this.id=t.id),t.externalId&&(this.externalId=t.externalId),t.sentAt&&(this.sentAt=t.sentAt),t.status&&(this.status=t.status),t.sendingId&&(this.sendingId=t.sendingId),t.message&&(this.message=t.message),t.campaignId&&(this.campaignId=t.campaignId),this.read=!1,this.sentAt&&e&&this.sentAt<e&&(this.read=!0))}}window.inboxNotification=m;const I=m,{ErrorDictionary:_}=r(872).Core.Models,b=_.ErrorCode;Object.assign(b,{INBOX_GET_ERROR:3001,INBOX_GET_PAGE_ERROR:3011,INBOX_EXTERNAL_ID_NO_REGISTERED:3012,INBOX_NO_MESSAGES:3013,INBOX_IS_REQUESTING_PAGE:3014,INBOX_EMPTY:3015,INBOX_GENERAL_ERROR:3600});const O=_.ErrorMessage;Object.assign(O,{INBOX_GET_ERROR:"inbox GET request error",INBOX_GET_PAGE_ERROR:"error inbox get page",INBOX_EXTERNAL_ID_NO_REGISTERED:"external Id is not registered",INBOX_NO_MESSAGES:"There are no more messages on Inbox",INBOX_IS_REQUESTING_PAGE:"Wait. Is Requesting new page",INBOX_EMPTY:"There are no messages on Inbox",INBOX_GENERAL_ERROR:"general error"});const S={ErrorCode:b,ErrorMessage:O},{Validations:w,Log:P}=r(872).Core.Utils,R=class extends w{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new P("[IND]InboxValidations: "),r=e.getDeviceId();let n=!0;return this.isAppKeyFormat()||(n=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(r)||(n=!1,t.w("deviceId is null or empty").writeLog()),n}},{CommonUtils:T,ErrorUtils:A,Log:N}=r(872).Core.Utils;class L{constructor(t){if(t){if(t.lastAccess&&(this.lastAccess=t.lastAccess),t.numPage?this.page=t.numPage:this.page=0,t.pageSize&&(this.pageSize=t.pageSize),t.count&&(this.count=t.count),t.notifications){this.notifications=[];const e=t.notifications;for(let t=0;t<e.length;t++){const r=new I(e[t],this.lastAccess);this.notifications.push(r)}}this.totalPages=Math.trunc(this.count/this.pageSize)}this.dateFrom=null,this.dateTo=null,this.statusList=null,this.newNotifications=[I],this.isRequestingPage=!1}static generateAuthToken(t,e){let r={};navigator.indigitallGetAuthConfig&&T.isFunction(navigator.indigitallGetAuthConfig)&&(r=navigator.indigitallGetAuthConfig());const n=new f;n.setJson(r),c.postInboxAuth(n,t,e)}static getInboxMessagesCount(t,e,r){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getMessagesCount(e,r)}static setUrlInboxApi(t){e.setUrlInboxApi(t)}static setInboxAuthMode(t){e.setInboxAuthMode(t)}static getMessagesCount(t,r){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new g;c.getInboxCounter(e,t,(r=>{401===r.errorCode?this.generateAuthToken((()=>{c.getInboxCounter(e,t,r)}),r):T.isFunction(r)&&r(r)}))}else T.isFunction(r)&&r(A.showError(S,S.ErrorCode.INBOX_GET_ERROR));else T.isFunction(r)&&r(A.showError(S,S.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}static getInbox(t,e,r){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getInbox(e,r)}static getInbox(t,e){L.getInboxWithPage(null,null,null,null,null,t,e)}static getInboxWithPage(t,e,r,n,i,o,s,a){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getInboxWithPage(e,r,n,i,o,s,a)}static getInboxWithPage(t,r,n,i,o,s,a){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new v;t&&e.setPage(t),r&&e.setPageSize(r),n&&(e.setDateFrom(n),this.dateFrom=n),i&&(e.setDateTo(i),this.dateTo=i),o&&(e.setStatusList(o),this.statusList=o),c.getInbox(e,(t=>{this.totalPages=t.totalPages,0!=t.count?T.isFunction(s)&&s(t):T.isFunction(a)&&a(A.showError(S,S.ErrorCode.INBOX_GET_PAGE_ERROR))}),(t=>{401==t.errorCode?this.generateAuthToken((()=>{c.getInbox(e,(t=>{this.totalPages=t.totalPages,T.isFunction(s)&&s(t)}),t)}),t):T.isFunction(t)&&t(t)}))}else T.isFunction(a)&&a(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(a)&&a(A.showError(S,S.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}getNextPage(t,r){const n=new N("[IND]Inbox: ");if(this.isRequestingPage)n.w(S.ErrorMessage.INBOX_IS_REQUESTING_PAGE).writeLog();else if(this.isRequestingPage=!0,this.page+1<this.totalPages)if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new v;(this.page||0==this.page)&&e.setPage(this.page+1),this.pageSize&&e.setPageSize(this.pageSize),this.dateFrom&&e.setDateFrom(this.dateFrom),this.dateTo&&e.setDateTo(this.dateTo),this.statusList&&e.setStatusList(this.statusList),c.getInbox(e,(e=>{this.notifications=this.notifications.concat(e.notifications),this.newNotifications=e.notifications,this.lastAccess=e.lastAccess,this.count=e.count,this.page=e.page,this.pageSize=e.pageSize,this.totalPages=e.totalPages,this.isRequestingPage=!1,T.isFunction(t)&&t(this,this.newNotifications)}),(r=>{401===r.errorCode?this.generateAuthToken((()=>{c.getInbox(e,(e=>{this.notifications=this.notifications.concat(e.notifications),this.newNotifications=e.notifications,this.lastAccess=e.lastAccess,this.count=e.count,this.page=e.page,this.pageSize=e.pageSize,this.totalPages=e.totalPages,this.isRequestingPage=!1,T.isFunction(t)&&t(this,this.newNotifications)}),r)}),r):(this.isRequestingPage=!1,T.isFunction(r)&&r())}))}else this.isRequestingPage=!1,T.isFunction(r)&&r(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(r)&&r(A.showError(S,S.ErrorCode.GENERAL_ERROR_BAD_REQUEST));else this.isRequestingPage=!1,T.isFunction(r)&&r(A.showError(S,S.ErrorCode.INBOX_NO_MESSAGES))}massiveEditNotifications(t,r,n,i){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t&&r){const e=new v;e.setSendingIds(t),e.setStatus(r),c.putInboxPush(e,n,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPush(e,n,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(i)&&i(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(i)&&i(A.showError(S,S.ErrorCode.BAD_REQUEST_SERVER_ERROR))}getInfoFromNotification(t,r,n){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t){const e=new v;e.setSendingId(t),c.getInboxPushWithSendingId(e,this.lastAccess,r,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.getInboxPushWithSendingId(e,this.lastAccess,r,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(n)&&n(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(n)&&n(A.showError(S,S.ErrorCode.BAD_REQUEST_SERVER_ERROR))}modifyStatusFromNotification(t,r,n,i){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t&&r){const e=new v;e.setSendingId(t),e.setStatus(r),c.putInboxPushWithSendingId(e,this.lastAccess,n,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPushWithSendingId(e,this.lastAccess,n,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(i)&&i(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(i)&&i(A.showError(S,S.ErrorCode.BAD_REQUEST_SERVER_ERROR))}}const D=L})(),n})(),t.exports=e()},277:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}i.default=t,r&&r.set(t,i);return i}(r(301));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},735:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}i.default=t,r&&r.set(t,i);return i}(r(794));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},794:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.2.2","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>M});var t={};r.r(t),r.d(t,{BaseClient:()=>_,BaseRequest:()=>b});var e={};r.r(e),r.d(e,{Channel:()=>O,Device:()=>S,DeviceStatus:()=>w,ErrorDictionary:()=>I,ErrorModel:()=>g,EventType:()=>P});var i={};r.r(i),r.d(i,{CommonUtils:()=>R,CorePermissions:()=>T,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>C,Log:()=>E,LogLevel:()=>p,Validations:()=>x});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,d=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getDeviceJson(){return c.getItem(this.DEVICE_JSON)}async setDeviceJson(t){c.setItem(this.DEVICE_JSON,t)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}},p=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=p;class v{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new d).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const E=v,g=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new g(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new g(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},_=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new E("[IND]BaseClient: ");let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+e.status+"\nResponse Message: "+e.statusText+"\n").writeLog(),new g(e.status,e.statusText))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},b=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new d).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},O=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),S=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new d).getBrowserPublicKey(),this.browserPrivateKey=(new d).getBrowserPrivateKey(),this.platform=(new d).getPlatform(),this.version=(new d).getVersion(),this.browserName=(new d).getBrowserName(),this.browserVersion=(new d).getBrowserVersion(),this.osName=(new d).getOsName(),this.osVersion=(new d).getOsVersion(),this.deviceType=(new d).getDeviceType(),(new d).getEnabled()&&(this.enabled="true"===(new d).getEnabled()),(new d).getExternalId()&&(this.externalCode=(new d).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new d).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new d).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}static setDeviceJson(t){(new d).setDeviceJson(JSON.stringify(t.toJSON()))}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},w=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),P=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=class{static isServiceTimestampExceed(){return!(new d).getServiceTimestamp()||(new d).getServiceSyncTime()<=(Date.now()-(new d).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},T=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new E("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},A=new E("[IND]Crypto"),N=new TextEncoder("utf-8"),L="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",N.encode(t),{name:L,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(L,n,N.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return A.d("hmac: ",s).writeLog(),s}catch(t){return void A.e("error:",t).writeLog()}}},C=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},x=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M={Repository:d,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(545)),i=a(r(358)),o=a(r(568)),s=a(r(801));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,a,u,l,d,p,y;return e=t,r=[{key:"getURL",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"call",value:(p=f(c().mark((function t(e,r,a,u){var l,f,h,d,p;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=new n.default("[IND]BaseClient: "),t.next=3,this.getURL();case 3:return t.t0=t.sent,t.t1=a.getPath(r),t.t2=t.t0+t.t1,t.t3=a.getParams(),f=t.t2+t.t3,a.isJourneyRequest()&&(f=f.replace("v1","v2")),h={method:e,headers:a.addHeaders()},e!==this.GET&&(h.body=JSON.stringify(a.getBody())),u&&(h.credentials=u),t.prev=12,t.next=15,fetch(f,h);case 15:return d=t.sent,t.next=18,d.json();case 18:if(p=t.sent,!d.ok){t.next=22;break}return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.statusCode+"\nResponse Message: "+p.message+"\nResponse Body:",JSON.stringify(p.data,null,"\t")).writeLog(),t.abrupt("return",p);case 22:return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+d.status+"\nResponse Message: "+d.statusText+"\n").writeLog(),t.abrupt("return",new i.default(d.status,d.statusText));case 26:return t.prev=26,t.t4=t.catch(12),l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 30:case"end":return t.stop()}}),t,this,[[12,26]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(d=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(l=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return l.apply(this,arguments)})},{key:"put",value:(u=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"delete",value:(a=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return a.apply(this,arguments)})}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version;var o=n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}});e.default=o},106:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}var h={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u};e.default=h},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.Channel=r;var n=r;e.default=n},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r,n;return e=t,n=[{key:"setDeviceJson",value:function(t){(new i.default).setDeviceJson(JSON.stringify(t.toJSON()))}}],(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=r},358:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=i},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}});var n=r(901),i=c(r(354)),o=c(r(202)),s=c(r(801)),a=c(r(358)),u=c(r(22));function c(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(){n=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof p?e:p,s=Object.create(i.prototype),a=new R(n||[]);return o(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&i.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(o,s,a,u){var c=h(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var s;o(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return s=s?s.then(i,i):i()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,o(I,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},795:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}var e,r,a,u,l,d,p,y,v,E,g,m,I;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.APP_KEY,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(E=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(y=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},{key:"getExternalIdRequest",value:(p=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return p.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getDeviceJson",value:(d=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.DEVICE_JSON));case 1:case"end":return t.stop()}}),t,this)}))),function(){return d.apply(this,arguments)})},{key:"setDeviceJson",value:(l=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.DEVICE_JSON,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getRegisteredByCookie",value:(u=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(a=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},636:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(){s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,u)}),(function(t){i("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="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},i(t)}function o(){o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(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,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h,d;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,s=null===(n=window)||void 0===n||null===(i=n.crypto)||void 0===i?void 0:i.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,s.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return a=t.sent,t.next=9,s.sign(l,a,c.encode(r));case 9:return f=t.sent,h=new Uint8Array(f),d=Array.prototype.map.call(h,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",d).writeLog(),t.abrupt("return",d);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.CryptoUtils=f;var h=f;e.default=h},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},970:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i;return e=t,i=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="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},s(t)}function a(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,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.LogLevel=r;var n=r;e.default=n},506:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(306)),i=f(r(897)),o=f(r(95)),s=f(r(568)),a=f(r(970)),u=f(r(545)),c=r(136),l=f(r(506));function f(t){return t&&t.__esModule?t:{default:t}}},301:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.2.2","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>M});var t={};r.r(t),r.d(t,{BaseClient:()=>_,BaseRequest:()=>b});var e={};r.r(e),r.d(e,{Channel:()=>O,Device:()=>S,DeviceStatus:()=>w,ErrorDictionary:()=>I,ErrorModel:()=>g,EventType:()=>P});var i={};r.r(i),r.d(i,{CommonUtils:()=>R,CorePermissions:()=>T,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>C,Log:()=>E,LogLevel:()=>p,Validations:()=>x});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,d=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getDeviceJson(){return c.getItem(this.DEVICE_JSON)}async setDeviceJson(t){c.setItem(this.DEVICE_JSON,t)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}},p=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=p;class v{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new d).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const E=v,g=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new g(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new g(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},_=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new E("[IND]BaseClient: ");let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+e.status+"\nResponse Message: "+e.statusText+"\n").writeLog(),new g(e.status,e.statusText))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},b=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new d).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},O=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),S=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new d).getBrowserPublicKey(),this.browserPrivateKey=(new d).getBrowserPrivateKey(),this.platform=(new d).getPlatform(),this.version=(new d).getVersion(),this.browserName=(new d).getBrowserName(),this.browserVersion=(new d).getBrowserVersion(),this.osName=(new d).getOsName(),this.osVersion=(new d).getOsVersion(),this.deviceType=(new d).getDeviceType(),(new d).getEnabled()&&(this.enabled="true"===(new d).getEnabled()),(new d).getExternalId()&&(this.externalCode=(new d).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new d).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new d).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}static setDeviceJson(t){(new d).setDeviceJson(JSON.stringify(t.toJSON()))}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},w=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),P=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=class{static isServiceTimestampExceed(){return!(new d).getServiceTimestamp()||(new d).getServiceSyncTime()<=(Date.now()-(new d).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},T=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new E("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},A=new E("[IND]Crypto"),N=new TextEncoder("utf-8"),L="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",N.encode(t),{name:L,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(L,n,N.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return A.d("hmac: ",s).writeLog(),s}catch(t){return void A.e("error:",t).writeLog()}}},C=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},x=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M={Repository:d,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=u(void 0);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(545)),i=a(r(358)),o=a(r(568)),s=a(r(801));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,a,u,l,d,p,y;return e=t,r=[{key:"getURL",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"call",value:(p=f(c().mark((function t(e,r,a,u){var l,f,h,d,p;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=new n.default("[IND]BaseClient: "),t.next=3,this.getURL();case 3:return t.t0=t.sent,t.t1=a.getPath(r),t.t2=t.t0+t.t1,t.t3=a.getParams(),f=t.t2+t.t3,a.isJourneyRequest()&&(f=f.replace("v1","v2")),h={method:e,headers:a.addHeaders()},e!==this.GET&&(h.body=JSON.stringify(a.getBody())),u&&(h.credentials=u),t.prev=12,t.next=15,fetch(f,h);case 15:return d=t.sent,t.next=18,d.json();case 18:if(p=t.sent,!d.ok){t.next=22;break}return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.statusCode+"\nResponse Message: "+p.message+"\nResponse Body:",JSON.stringify(p.data,null,"\t")).writeLog(),t.abrupt("return",p);case 22:return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+d.status+"\nResponse Message: "+d.statusText+"\n").writeLog(),t.abrupt("return",new i.default(d.status,d.statusText));case 26:return t.prev=26,t.t4=t.catch(12),l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 30:case"end":return t.stop()}}),t,this,[[12,26]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(d=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(l=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return l.apply(this,arguments)})},{key:"put",value:(u=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"delete",value:(a=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return a.apply(this,arguments)})}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&function(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=s},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version;var o=n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}});e.default=o},106:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}var h={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u};e.default=h},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.Channel=r;var n=r;e.default=n},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r,n;return e=t,n=[{key:"setDeviceJson",value:function(t){(new i.default).setDeviceJson(JSON.stringify(t.toJSON()))}}],(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}}},358:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=function(t,e,r){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=r},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}});var n=r(901),i=c(r(354)),o=c(r(202)),s=c(r(801)),a=c(r(358)),u=c(r(22));function c(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(){n=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof p?e:p,s=Object.create(i.prototype),a=new R(n||[]);return o(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&i.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(o,s,a,u){var c=h(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var s;o(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return s=s?s.then(i,i):i()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,o(I,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},795:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}var e,r,a,u,l,d,p,y,v,E,g,m,I;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.APP_KEY,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(E=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(y=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},{key:"getExternalIdRequest",value:(p=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return p.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getDeviceJson",value:(d=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.DEVICE_JSON));case 1:case"end":return t.stop()}}),t,this)}))),function(){return d.apply(this,arguments)})},{key:"setDeviceJson",value:(l=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.DEVICE_JSON,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getRegisteredByCookie",value:(u=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(a=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},636:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&function(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=s},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(){s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,u)}),(function(t){i("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="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},i(t)}function o(){o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(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,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h,d;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,s=null===(n=window)||void 0===n||null===(i=n.crypto)||void 0===i?void 0:i.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,s.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return a=t.sent,t.next=9,s.sign(l,a,c.encode(r));case 9:return f=t.sent,h=new Uint8Array(f),d=Array.prototype.map.call(h,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",d).writeLog(),t.abrupt("return",d);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.CryptoUtils=f;var h=f;e.default=h},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}var s=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&function(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=s},970:(t,e)=>{"use strict";function r(t){return r="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},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],n&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=n},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="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},s(t)}function a(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,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.LogLevel=r;var n=r;e.default=n},506:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(306)),i=f(r(897)),o=f(r(95)),s=f(r(568)),a=f(r(970)),u=f(r(545)),c=r(136),l=f(r(506));function f(t){return t&&t.__esModule?t:{default:t}}},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.2.2","_id":"indigitall-web-core@4.2.2","_inBundle":false,"_integrity":"sha512-ur4Fqa70ZTqQGwLTFr2nOmjbOlvqm1riStW08NDSficeGpdIKnHhxLzzYffKVfAOpPXLP/kSlbVqTr797m5KdA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.2.2","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.2.2","saveSpec":null,"fetchSpec":"4.2.2"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.2.2.tgz","_shasum":"4fcb6bb28a04b7c1c2b636df371cb2cf9702aaba","_spec":"indigitall-web-core@4.2.2","_where":"/home/circleci/webpush/inbox","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.2.2"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{default:()=>D});const{Repository:t}=r(872).Core,e=new class extends t{constructor(){super(),this.AUTH_TOKEN=this.REPOSITORY+".AUTH_TOKEN",this.INBOX_AUTH_MODE=this.REPOSITORY+".INBOX_AUTH_MODE",this.URL_INBOX_API=this.REPOSITORY+".URL_INBOX_API"}async setDeviceId(t){this.setStorage(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}setAuthToken(t){this.setStorage(this.AUTH_TOKEN,t)}getAuthToken(){return this.getStorage(this.AUTH_TOKEN)}setInboxAuthMode(t){this.setStorage(this.INBOX_AUTH_MODE,t)}getInboxAuthMode(){return this.getStorage(this.INBOX_AUTH_MODE)}async getUrlInboxApi(){return this.getStorage(this.URL_INBOX_API)}async setUrlInboxApi(t){this.setStorage(this.URL_INBOX_API,t)}},{BaseClient:o}=r(872).Core.Api,{Config:s}=r(872).Core,{ErrorModel:a}=r(872).Core.Models,{CommonUtils:u}=r(872).Core.Utils,c=new class extends o{constructor(){super(),this.URL_BASE=s.client.INBOX_URL_BASE,this.ENDPOINT_INBOX_NOTIFICATIONS="/notification",this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID=this.ENDPOINT_INBOX_NOTIFICATIONS+"/{sendingId}",this.ENDPOINT_INBOX_COUNTER="/counters",this.ENDPOINT_INBOX_AUTH="/auth/webhook"}async getURL(){return await e.getUrlInboxApi()||this.URL_BASE}async postInboxAuth(t,r,n){const i=await this.post(this.ENDPOINT_INBOX_AUTH,t.postInboxAuth());if(!i||i instanceof a||!i.data)i?u.isFunction(n)&&n(i):u.isFunction(n)&&n();else{const t=i.data.token;e.setAuthToken(t),u.isFunction(r)&&r(i)}return!0}async getInbox(t,e,r){const n=await this.get(this.ENDPOINT_INBOX_NOTIFICATIONS,t.getInboxPushRequest());return this.getInboxResponseStatus(n,e,r),!0}async putInboxPush(t,e,r){const n=await this.put(this.ENDPOINT_INBOX_NOTIFICATIONS,t.putInboxPushRequest());return this.getInboxResponseEdit(n,e,r),!0}async getInboxPushWithSendingId(t,e,r,n){const i=await this.get(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,t.getInboxPushRequestWithSendingId());return this.getNotificationResponseStatus(i,e,r,n),!0}async putInboxPushWithSendingId(t,e,r,n){const i=await this.put(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,t.putInboxWithSendingId());return this.getNotificationResponseStatus(i,e,r,n),!0}async getInboxCounter(t,e,r){const n=await this.get(this.ENDPOINT_INBOX_COUNTER,t.getCounter());this.getCounterStatus(n,e,r)}async getInboxResponseStatus(t,e,r){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const r=new D(t.data);u.isFunction(e)&&e(r)}else t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}async getInboxResponseEdit(t,e,r){t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300?u.isFunction(e)&&e():t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}getNotifications(t,e){const r=[];for(let n=0;n<t.length;n++){null!=t[n].sentAt&&null!=e&&t[n].sentAt<e&&(read=!0);const i=new InboxNotification(t[n],e);r.push(i)}return r}async getNotificationResponseStatus(t,e,r,n){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const t=new InboxNotification(notifications[i],e);u.isFunction(r)&&r(t)}else t?u.isFunction(n)&&n(t):u.isFunction(n)&&n()}async getCounterStatus(t,e,r){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const r={click:t.data.click,sent:t.data.sent,deleted:t.data.deleted,unread:this.getUnreadCounters(t.data.unread)};u.isFunction(e)&&e(r)}else t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}getUnreadCounters(t){return{count:t.count,lastAccess:t.lastAccess}}},{BaseRequest:l}=r(872).Core.Api,f=class extends l{constructor(){super()}postInboxAuth(){return this.body=this.json,this}setJson(t){this.json=t}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}},h=Object.freeze({SENT:"sent",CLICK:"click",DELETED:"deleted"});window.inboxStatus=h;const d=h,p=Object.freeze({NONE:"none",DEFAULT:"default",WEBHOOK:"webhook"}),{BaseRequest:y}=r(872).Core.Api,v=class extends y{constructor(){super(),null!=e.getExternalId()&&(this.externalId=e.getExternalId()),null!=e.getAuthToken()&&e.getInboxAuthMode()==p.WEBHOOK&&(this.headers.Authorization="Bearer "+e.getAuthToken()),this.sendingId="",this.sendingIds=null,this.page=0,this.pageSize=0,this.dateFrom="",this.dateTo="",this.status=d.INBOXSTATUS_SENT,this.statusList=null}getInboxPushRequest(){return this.params=this.createQueryString(),this}putInboxPushRequest(){return this.params=this.createQueryStringExternalId(),this.body=this.createBodyJson(),this}getInboxPushRequestWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this}putInboxWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this.body=this.createBodyStatusJson(),this}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}createQueryString(){let t="";if(this.page&&(t+=this.PARAM_INBOX_PAGE+"="+this.page+"&"),this.pageSize&&(t+=this.PARAM_INBOX_PAGE_SIZE+"="+this.pageSize+"&"),this.dateFrom&&(t+=this.PARAM_INBOX_DATE_FROM+"="+this.dateFrom+"&"),this.dateTo&&(t+=this.PARAM_INBOX_DATE_TO+"="+this.dateTo+"&"),this.statusList){let e="";for(let t=0;t<this.statusList.length;t++)e+=this.statusList[t],t!=this.statusList.length-1&&(e+=",");t+=this.PARAM_INBOX_STATUS+"="+e+"&"}return t+this.createQueryStringExternalId()}createQueryStringExternalId(){return this.PARAM_INBOX_EXTERNALID+"="+this.externalId}createBodyJson(){let t={};const e=[];try{if(t=this.createBodyStatusJson(),this.sendingIds)for(let t=0;t<this.sendingIds.length;t++)e.push(this.sendingIds[t]);t.sendingIds=e}catch(t){console.log("Error Inbox request :"+t)}return t}createBodyStatusJson(){const t={};return this.status&&(t.status=this.status),t}setSendingId(t){this.sendingId=t}setSendingIds(t){this.sendingIds=t}setPage(t){this.page=t}setPageSize(t){this.pageSize=t}setDateFrom(t){this.dateFrom=t}setDateTo(t){this.dateTo=t}setStatus(t){this.status=t}setStatusList(t){this.statusList=t}},{BaseRequest:E}=r(872).Core.Api,g=class extends E{constructor(){super(),null!=e.getExternalId()&&(this.externalId=e.getExternalId()),null!=e.getAuthToken()&&e.getInboxAuthMode()==p.WEBHOOK&&(this.headers.Authorization="Bearer "+e.getAuthToken())}getCounter(){return this.params=this.createQueryStringExternalId(),this}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}createQueryStringExternalId(){return this.PARAM_INBOX_EXTERNALID+"="+this.externalId}};class m{constructor(t,e){t&&(t.id&&(this.id=t.id),t.externalId&&(this.externalId=t.externalId),t.sentAt&&(this.sentAt=t.sentAt),t.status&&(this.status=t.status),t.sendingId&&(this.sendingId=t.sendingId),t.message&&(this.message=t.message),t.campaignId&&(this.campaignId=t.campaignId),this.read=!1,this.sentAt&&e&&this.sentAt<e&&(this.read=!0))}}window.inboxNotification=m;const I=m,{ErrorDictionary:_}=r(872).Core.Models,b=_.ErrorCode;Object.assign(b,{INBOX_GET_ERROR:3001,INBOX_GET_PAGE_ERROR:3011,INBOX_EXTERNAL_ID_NO_REGISTERED:3012,INBOX_NO_MESSAGES:3013,INBOX_IS_REQUESTING_PAGE:3014,INBOX_EMPTY:3015,INBOX_GENERAL_ERROR:3600});const O=_.ErrorMessage;Object.assign(O,{INBOX_GET_ERROR:"inbox GET request error",INBOX_GET_PAGE_ERROR:"error inbox get page",INBOX_EXTERNAL_ID_NO_REGISTERED:"external Id is not registered",INBOX_NO_MESSAGES:"There are no more messages on Inbox",INBOX_IS_REQUESTING_PAGE:"Wait. Is Requesting new page",INBOX_EMPTY:"There are no messages on Inbox",INBOX_GENERAL_ERROR:"general error"});const S={ErrorCode:b,ErrorMessage:O},{Validations:w,Log:P}=r(872).Core.Utils,R=class extends w{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new P("[IND]InboxValidations: "),r=e.getDeviceId();let n=!0;return this.isAppKeyFormat()||(n=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(r)||(n=!1,t.w("deviceId is null or empty").writeLog()),n}},{CommonUtils:T,ErrorUtils:A,Log:N}=r(872).Core.Utils;class L{constructor(t){if(t){if(t.lastAccess&&(this.lastAccess=t.lastAccess),t.numPage?this.page=t.numPage:this.page=0,t.pageSize&&(this.pageSize=t.pageSize),t.count&&(this.count=t.count),t.notifications){this.notifications=[];const e=t.notifications;for(let t=0;t<e.length;t++){const r=new I(e[t],this.lastAccess);this.notifications.push(r)}}this.totalPages=Math.trunc(this.count/this.pageSize)}this.dateFrom=null,this.dateTo=null,this.statusList=null,this.newNotifications=[I],this.isRequestingPage=!1}static generateAuthToken(t,e){let r={};navigator.indigitallGetAuthConfig&&T.isFunction(navigator.indigitallGetAuthConfig)&&(r=navigator.indigitallGetAuthConfig());const n=new f;n.setJson(r),c.postInboxAuth(n,t,e)}static getInboxMessagesCount(t,e,r){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getMessagesCount(e,r)}static setUrlInboxApi(t){e.setUrlInboxApi(t)}static setInboxAuthMode(t){e.setInboxAuthMode(t)}static getMessagesCount(t,r){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new g;c.getInboxCounter(e,t,(r=>{401===r.errorCode?this.generateAuthToken((()=>{c.getInboxCounter(e,t,r)}),r):T.isFunction(r)&&r(r)}))}else T.isFunction(r)&&r(A.showError(S,S.ErrorCode.INBOX_GET_ERROR));else T.isFunction(r)&&r(A.showError(S,S.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}static getInbox(t,e,r){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getInbox(e,r)}static getInbox(t,e){L.getInboxWithPage(null,null,null,null,null,t,e)}static getInboxWithPage(t,e,r,n,i,o,s,a){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getInboxWithPage(e,r,n,i,o,s,a)}static getInboxWithPage(t,r,n,i,o,s,a){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new v;t&&e.setPage(t),r&&e.setPageSize(r),n&&(e.setDateFrom(n),this.dateFrom=n),i&&(e.setDateTo(i),this.dateTo=i),o&&(e.setStatusList(o),this.statusList=o),c.getInbox(e,(t=>{this.totalPages=t.totalPages,0!=t.count?T.isFunction(s)&&s(t):T.isFunction(a)&&a(A.showError(S,S.ErrorCode.INBOX_GET_PAGE_ERROR))}),(t=>{401==t.errorCode?this.generateAuthToken((()=>{c.getInbox(e,(t=>{this.totalPages=t.totalPages,T.isFunction(s)&&s(t)}),t)}),t):T.isFunction(t)&&t(t)}))}else T.isFunction(a)&&a(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(a)&&a(A.showError(S,S.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}getNextPage(t,r){const n=new N("[IND]Inbox: ");if(this.isRequestingPage)n.w(S.ErrorMessage.INBOX_IS_REQUESTING_PAGE).writeLog();else if(this.isRequestingPage=!0,this.page+1<this.totalPages)if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new v;(this.page||0==this.page)&&e.setPage(this.page+1),this.pageSize&&e.setPageSize(this.pageSize),this.dateFrom&&e.setDateFrom(this.dateFrom),this.dateTo&&e.setDateTo(this.dateTo),this.statusList&&e.setStatusList(this.statusList),c.getInbox(e,(e=>{this.notifications=this.notifications.concat(e.notifications),this.newNotifications=e.notifications,this.lastAccess=e.lastAccess,this.count=e.count,this.page=e.page,this.pageSize=e.pageSize,this.totalPages=e.totalPages,this.isRequestingPage=!1,T.isFunction(t)&&t(this,this.newNotifications)}),(r=>{401===r.errorCode?this.generateAuthToken((()=>{c.getInbox(e,(e=>{this.notifications=this.notifications.concat(e.notifications),this.newNotifications=e.notifications,this.lastAccess=e.lastAccess,this.count=e.count,this.page=e.page,this.pageSize=e.pageSize,this.totalPages=e.totalPages,this.isRequestingPage=!1,T.isFunction(t)&&t(this,this.newNotifications)}),r)}),r):(this.isRequestingPage=!1,T.isFunction(r)&&r())}))}else this.isRequestingPage=!1,T.isFunction(r)&&r(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(r)&&r(A.showError(S,S.ErrorCode.GENERAL_ERROR_BAD_REQUEST));else this.isRequestingPage=!1,T.isFunction(r)&&r(A.showError(S,S.ErrorCode.INBOX_NO_MESSAGES))}massiveEditNotifications(t,r,n,i){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t&&r){const e=new v;e.setSendingIds(t),e.setStatus(r),c.putInboxPush(e,n,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPush(e,n,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(i)&&i(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(i)&&i(A.showError(S,S.ErrorCode.BAD_REQUEST_SERVER_ERROR))}getInfoFromNotification(t,r,n){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t){const e=new v;e.setSendingId(t),c.getInboxPushWithSendingId(e,this.lastAccess,r,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.getInboxPushWithSendingId(e,this.lastAccess,r,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(n)&&n(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(n)&&n(A.showError(S,S.ErrorCode.BAD_REQUEST_SERVER_ERROR))}modifyStatusFromNotification(t,r,n,i){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t&&r){const e=new v;e.setSendingId(t),e.setStatus(r),c.putInboxPushWithSendingId(e,this.lastAccess,n,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPushWithSendingId(e,this.lastAccess,n,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(i)&&i(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(i)&&i(A.showError(S,S.ErrorCode.BAD_REQUEST_SERVER_ERROR))}}const D=L})(),n})(),t.exports=e()},277:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}return i.default=t,r&&r.set(t,i),i}(r(301));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.2.2","_id":"indigitall-web-core@4.2.2","_inBundle":false,"_integrity":"sha512-ur4Fqa70ZTqQGwLTFr2nOmjbOlvqm1riStW08NDSficeGpdIKnHhxLzzYffKVfAOpPXLP/kSlbVqTr797m5KdA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.2.2","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.2.2","saveSpec":null,"fetchSpec":"4.2.2"},"_requiredBy":["#USER","/","/indigitall-web-inbox"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.2.2.tgz","_shasum":"4fcb6bb28a04b7c1c2b636df371cb2cf9702aaba","_spec":"indigitall-web-core@4.2.2","_where":"/home/circleci/webpush/push","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.2.2"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{default:()=>Q});var t=r(277),e=r.n(t);const{Repository:i}=r(872).Core,o=new class extends i{constructor(){super(),this.SAFARI_WEBSITE_PUSH_ID=this.REPOSITORY+".SAFARI_WEBSITE_PUSH_ID",this.PUSH_TOKEN=this.REPOSITORY+".PUSH_TOKEN",this.PERMISSION_PUSH=this.REPOSITORY+".PERMISSION_PUSH",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.DEVICE_JSON=this.REPOSITORY+".DEVICE_JSON",this.PUT_REQUEST_TIMESTAMP=this.REPOSITORY+".PUT_REQUEST_TIMESTAMP",this.WORKER_PATH=this.REPOSITORY+".WORKER_PATH",this.TEST=this.REPOSITORY+".TEST",this.SAFARI_GESTURE_REQUEST_PERMISSION=this.SAFARI_GESTURE_REQUEST_PERMISSION+".SAFARI_GESTURE_REQUEST_PERMISSION"}async setDeviceId(t){this.setStorage(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}setPushToken(t){this.setStorage(this.PUSH_TOKEN,t)}getPushToken(){return this.getStorage(this.PUSH_TOKEN)}setSafariWebsitePushId(t){this.setStorage(this.SAFARI_WEBSITE_PUSH_ID,t)}getSafariWebsitePushId(){return this.getStorage(this.SAFARI_WEBSITE_PUSH_ID)}setPermissionPush(t){this.setStorage(this.PERMISSION_PUSH,t)}getPermissionPush(){return this.getStorage(this.PERMISSION_PUSH)}async getUrlDeviceApi(){let t;try{this.storage&&this.storage.isLocalStorageAvailable()?t=this.getStorage(this.URL_DEVICE_API):this.db&&this.db.IDB&&(t=await this.db.getItem(this.URL_DEVICE_API))}catch(t){}return t}async setUrlDeviceApi(t){this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,t),this.db&&this.db.IDB&&await this.db.setItem(this.URL_DEVICE_API,t)}async getDeviceJson(){return this.getStorage(this.DEVICE_JSON)}async setDeviceJson(t){this.setStorage(this.DEVICE_JSON,t)}async getPutRequestTimestamp(){return this.getStorage(this.PUT_REQUEST_TIMESTAMP)}async setPutRequestTimestamp(t){this.setStorage(this.PUT_REQUEST_TIMESTAMP,t)}setWorkerPath(t){this.setStorage(this.WORKER_PATH,t)}getWorkerPath(){return this.getStorage(this.WORKER_PATH)}setTestValue(t){this.setStorage(this.TEST,t)}getTestValue(){return this.getStorage(this.TEST)}setSafariGestureRequestPermission(t){this.setStorage(this.SAFARI_GESTURE_REQUEST_PERMISSION,t)}getSafariGestureRequestPermission(){return this.getStorage(this.SAFARI_GESTURE_REQUEST_PERMISSION)}},{ErrorDictionary:s}=r(872).Core.Models,a=s.ErrorCode;Object.assign(a,{GENERAL_ERROR_BAD_REQUEST:601,GENERAL_ERROR_APPKEY_BAD_REQUEST:602,PUSH_INITIALIZATION_ERROR:1e3,PUSH_RECEPTION_ERROR:1200,PUSH_TOPICS_ERROR:1400,PUSH_DEVICE_ERROR:1500,PUSH_EVENT_ERROR:1600,API_APPKEY_NOT_VALID:1601});const u=s.ErrorMessage;Object.assign(u,{GENERAL_ERROR_BAD_REQUEST:"AppKey or DeviceId are null or empty",GENERAL_ERROR_APPKEY_BAD_REQUEST:"AppKey is null or empty",PUSH_INITIALIZATION_ERROR:"initialization error",PUSH_RECEPTION_ERROR:"push reception error",PUSH_TOPICS_ERROR:"push topics error",PUSH_DEVICE_ERROR:"device error",PUSH_EVENT_ERROR:"event error",API_APPKEY_NOT_VALID:"appKey is missing'"});const c={ErrorCode:a,ErrorMessage:u},{BaseRequest:l}=r(872).Core.Api,{EventType:f}=r(872).Core.Models,h=class extends l{constructor(){super()}setEventType(t){this.eventType=t}setPushId(t){this.pushId=t}setClickedButton(t){this.clickedButton=t}setSendingId(t){this.sendingId=t}setPermissionType(t){this.permissionType=t}setLocation(t,e){this.latitude=t,this.longitude=e}setDeviceId(t){this.deviceId=t}setPlatform(t){this.platform=t}setAppKey(t){this.appKey=t}setCustomData(t){this.customData=t}async setExternalCodeRequest(){this.externalCode=await o.getExternalIdRequest()}setExternalCode(t){this.externalCode=t}setCampaingId(t){this.campaignId=t}setJourneyStateId(t){this.journeyStateId=t}setJourneyExecution(t){this.journeyExecution=t}setCjCurrentStateId(t){this.cjCurrentStateId=t}postEventPushRequest(){const t={};return t.deviceId=this.deviceId,t.platform=this.platform,this.eventType&&(t.eventType=this.eventType),this.pushId&&(t.pushId=this.pushId),t.clickedButton=this.clickedButton,null!=this.externalCode&&(t.externalCode=this.externalCode),this.sendingId&&"undefined"!=this.sendingId&&(t.sendingId=this.sendingId),this.journeyStateId&&(t.journeyStateId=this.journeyStateId),this.campaignId&&(t.campaignId=this.campaignId),this.body=t,this}postEventVisitRequest(){const t={};return t.deviceId=o.getDeviceId(),t.eventType=f.EVENT_TYPE_UPDATE,this.body=t,this}postEventPermissionRequest(){const t={};return t.deviceId=o.getDeviceId(),this.eventType&&(t.eventType=this.eventType),this.permissionType&&(t.permissionType=this.permissionType),this.body=t,this}postEventLocationRequest(){const t={};return t.deviceId=o.getDeviceId(),t.eventType=f.EVENT_TYPE_UPDATE,this.latitude&&(t.latitude=this.latitude),this.longitude&&(t.longitude=this.longitude),this.body=t,this}postEventCustomRequest(){const t={};return this.deviceId&&(t.deviceId=this.deviceId),this.eventType&&(t.eventType=this.eventType),this.customData&&(t.customData=this.customData),this.externalCode&&(t.externalCode=this.externalCode),this.body=t,this}},d=class{static urlBase64ToUint8Array(t){const e=(t+"=".repeat((4-t.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),r=window.atob(e),n=new Uint8Array(r.length);for(let t=0;t<r.length;++t)n[t]=r.charCodeAt(t);return n}static callEventPermission(t,e){const r=new h;r.setAppKey(o.getAppKey()),r.setDeviceId(o.getDeviceId()),r.setPermissionType(t),r.setEventType(e),w.postEventPermission(r)}static async getPutRequestTimestamp(){return await o.getPutRequestTimestamp()?o.getPutRequestTimestamp():Date.now()+6048e5}},{Validations:p,Log:y}=r(872).Core.Utils,v=class extends p{static isAppKeyFormat(){const t=o.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new y("[IND]PushValidations: "),e=o.getDeviceId();let r=!0;return this.isAppKeyFormat()||(r=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(e)||(r=!1,t.w("deviceId is null or empty").writeLog()),r}static async isPutRequestExceed(){return await d.getPutRequestTimestamp()<=Date.now()}static isSafariBrowserDevice(){const t=window.navigator.userAgent,e=!!t.match(/iPad/i)||!!t.match(/iPhone/i),r=!!t.match(/WebKit/i);return e&&r&&!t.match(/CriOS/i)&&!t.match(/OPiOS/i)}},{Device:E}=r(872).Core.Models,g=class extends E{constructor(t=null,e){super(t,e),null==t?(null!=o.getDeviceId()&&(this.deviceId=o.getDeviceId()),null!=o.getPushToken()&&(this.pushToken=o.getPushToken())):e?t.deviceId&&(this.deviceId=t.deviceId,o.setDeviceId(this.deviceId)):(t.deviceId&&(this.deviceId=t.deviceId),t.pushToken&&(this.pushToken=t.pushToken))}getDeviceId(){return this.deviceId}getPushToken(){return this.pushToken}toJSON(){const t=super.toJSON();return this.deviceId&&(t.deviceId=this.deviceId),this.pushToken&&(t.pushToken=this.pushToken),t}},{Config:m}=r(872).Core,{BaseClient:I}=r(872).Core.Api,{ErrorModel:_}=r(872).Core.Models,{Log:b,CommonUtils:O,ErrorUtils:S}=r(872).Core.Utils,w=new class extends I{constructor(){super(),this.URL_BASE=m.client.URL_BASE,this.ENDPOINT_APPLICATION="/application",this.ENDPOINT_APPLICATION_ALL=this.ENDPOINT_APPLICATION+"/all",this.ENDPOINT_DEVICE="/device",this.ENDPOINT_DEVICE_TOPICS=this.ENDPOINT_DEVICE+"/topics",this.ENDPOINT_PUSH="/push",this.ENDPOINT_EVENT="/event",this.ENDPOINT_EVENT_PUSH=this.ENDPOINT_EVENT+"/push",this.ENDPOINT_EVENT_VISIT=this.ENDPOINT_EVENT+"/visit",this.ENDPOINT_EVENT_PERMISSION=this.ENDPOINT_EVENT+"/permission",this.ENDPOINT_EVENT_LOCATION=this.ENDPOINT_EVENT+"/location",this.ENDPOINT_EVENT_CUSTOM=this.ENDPOINT_EVENT+"/custom",this.ENDPOINT_EVENT_CUSTOM_BEACON=this.ENDPOINT_EVENT_CUSTOM+"/beacon",this.ENDPOINT_BROWSER="/browser",this.log=new b("[IND]Client: ")}async getURL(){return await o.getUrlDeviceApi()||this.URL_BASE}async getApplicationAll(t,e,r){if(v.isAppKeyFormat()){const n=await this.get(this.ENDPOINT_APPLICATION_ALL,t.getApplicationRequest());!n||n instanceof _?n?O.isFunction(r)&&r(n):O.isFunction(r)&&r():O.isFunction(e)&&e(n)}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.BAD_REQUEST_SERVER_ERROR));return!0}async postDevice(t,e,r){if(v.isAppKeyFormat()){const n=await this.post(this.ENDPOINT_DEVICE,t.postDeviceRequest(),"include");if(!n||n instanceof _)n?O.isFunction(r)&&r(n):O.isFunction(r)&&r();else{const t={enabled:n.data.enabled,deviceId:n.data.deviceId,registeredByCookie:n.data.registeredByCookie};await o.setDeviceId(t.deviceId),O.isFunction(e)&&e(new g(t,!0))}}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_APPKEY_BAD_REQUEST));return!0}async putDevice(t,e,r){const n=new g,i=await v.isPutRequestExceed();if(t.deviceUpdate||null==await o.getPutRequestTimestamp()||i)if(v.isValidFormatRequest()){o.setPutRequestTimestamp(await d.getPutRequestTimestamp());const i=await this.put(this.ENDPOINT_DEVICE,t.putDeviceRequest(n),"include");if(!i||i instanceof _)i?O.isFunction(r)&&r(i):O.isFunction(r)&&r();else{const t={enabled:i.data.enabled,deviceId:i.data.deviceId,registeredByCookie:i.data.registeredByCookie};O.isFunction(e)&&e(new g(t,!0))}}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));else O.isFunction(e)&&e(n)}async getDevice(t,e,r){if(v.isValidFormatRequest()){const n=await this.get(this.ENDPOINT_DEVICE,t.getDeviceRequest());if(!n||n instanceof _)n?O.isFunction(r)&&r(n):O.isFunction(r)&&r();else{const t={enabled:n.data.enabled,deviceId:n.data.deviceId};O.isFunction(e)&&e(new g(t,!0))}}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async getDeviceTopics(t,e,r){if(v.isValidFormatRequest()){const n=await this.get(this.ENDPOINT_DEVICE_TOPICS,t.getDeviceTopicsRequest());if(!n||n instanceof _)n?O.isFunction(r)&&r(n):O.isFunction(r)&&r();else{const t=n.data.topics;O.isFunction(e)&&e(t)}}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postDeviceTopics(t,e,r){if(v.isValidFormatRequest()){const n=await this.post(this.ENDPOINT_DEVICE_TOPICS,t.postDeviceTopicsRequest());if(!n||n instanceof _)n?O.isFunction(r)&&r(n):O.isFunction(r)&&r();else{const t=n.data.topics;O.isFunction(e)&&e(t)}}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async deleteDeviceTopics(t,e,r){if(v.isValidFormatRequest()){const n=await this.delete(this.ENDPOINT_DEVICE_TOPICS,t.deleteDeviceTopicsRequest());if(!n||n instanceof _)n?O.isFunction(r)&&r(n):O.isFunction(r)&&r();else{const t=n.data.topics;O.isFunction(e)&&e(t)}}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventPush(t){v.isValidFormatRequest()&&await this.post(this.ENDPOINT_EVENT_PUSH,t.postEventPushRequest())}postEventVisit(t){v.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_VISIT,t.postEventVisitRequest())}postEventPermission(t){v.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_PERMISSION,t.postEventPermissionRequest())}postEventLocation(t){v.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_LOCATION,t.postEventLocationRequest())}async getBrowser(t,e,r){if(v.isAppKeyFormat()){const n=await this.get(this.ENDPOINT_BROWSER,t);if(!n||n instanceof _)n?O.isFunction(r)&&r(n):O.isFunction(r)&&r();else{const t={browserName:n.data.browserName,browserVersion:n.data.browserVersion,deviceType:n.data.deviceType,osName:n.data.osName,osVersion:n.data.osVersion,supported:n.data.supported,platform:n.data.platform};await o.setBrowserName(t.browserName),o.setBrowserVersion(t.browserVersion),await o.setOsName(t.osName),o.setOsVersion(t.osVersion),o.setDeviceType(t.deviceType),o.setSupported(t.supported),v.isSafariBrowserDevice()?await o.setPlatform("webpush"):await o.setPlatform(t.platform),O.isFunction(e)&&e(t)}}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventCustom(t,e,r){if(v.isValidFormatRequest()){const n=await this.post(this.ENDPOINT_EVENT_CUSTOM,t.postEventCustomRequest());!n||n instanceof _?n?O.isFunction(r)&&r(n):O.isFunction(r)&&r():O.isFunction(e)&&e(n)}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventCustomSync(t,e,r){if(v.isValidFormatRequest()){t=t.postEventCustomRequest();try{if(navigator&&"sendBeacon"in navigator){const r=await this.getURL()+this.ENDPOINT_EVENT_CUSTOM_BEACON+t.getParams();navigator.sendBeacon(r,JSON.stringify(t.getBody())),O.isFunction(e)&&e()}else{const n=await this.getURL()+this.ENDPOINT_EVENT_CUSTOM+t.getParams(),i=new XMLHttpRequest;i.open("POST",n,!1),i.setRequestHeader("Content-Type","application/json"),i.onreadystatechange=()=>{i.readyState===XMLHttpRequest.DONE&&(i.status>=200||i.status<300)?O.isFunction(e)&&e():O.isFunction(r)&&r()},i.send(JSON.stringify(t.getBody()))}}catch(t){O.isFunction(r)&&r(S.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventJourney(t,e,r){if(v.isValidFormatRequest()){const n=await this.post(this.ENDPOINT_PUSH+this.ENDPOINT_EVENT_CUSTOM,t.postEventCustomRequest());!n||n instanceof _?n?O.isFunction(r)&&r(n):O.isFunction(r)&&r():O.isFunction(e)&&e(n)}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventJourneySync(t,e,r){if(v.isValidFormatRequest()){t=t.postEventCustomRequest();try{let n=await this.getURL();if(n=n.replace("v1","v2"),navigator&&"sendBeacon"in navigator){const r=n+this.ENDPOINT_PUSH+this.ENDPOINT_EVENT_CUSTOM+t.getParams();navigator.sendBeacon(r,JSON.stringify(t.getBody())),O.isFunction(e)&&e()}else{const n=await this.getURL().replace("v1","v2")+this.ENDPOINT_PUSH+this.ENDPOINT_EVENT_CUSTOM+t.getParams(),i=new XMLHttpRequest;i.open("POST",n,!1),i.setRequestHeader("Content-Type","application/json"),i.onreadystatechange=()=>{i.readyState===XMLHttpRequest.DONE&&(i.status>=200||i.status<300)?O.isFunction(e)&&e():O.isFunction(r)&&r()},i.send(JSON.stringify(t.getBody()))}}catch(t){O.isFunction(r)&&r(S.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}},{Config:P}=r(872).Core,{BaseRequest:R}=r(872).Core.Api,T=class extends R{getApplicationRequest(){return this.params=this.PARAM_PLATFORM+"="+P.platform,this}},{DeviceStatus:A}=r(872).Core.Models,{BaseRequest:N}=r(872).Core.Api,L=class extends N{constructor(t=A.DEFAULT){super(),this.device=new g,this.status=t,this.notToUpdate=!1,this.deviceUpdate=!1}isDeviceUpdated(t){this.deviceUpdate=t}setDeviceId(t){this.device&&(this.device.deviceId=t)}setAppKey(t){this.appKey=t}getDeviceRequest(){return this.params=this.createQueryString(),this}postDeviceRequest(){return this.body=this.createDeviceJson(),this.status!==A.DEFAULT&&(this.body.enabled=1===this.status),this}putDeviceRequest(t){return this.params=this.createQueryString(),this.body=this.createPUTDeviceJson(t),this.status!==A.DEFAULT&&(this.body.enabled=1===this.status),this}getDeviceTopicsRequest(){return this.params=this.createQueryString(),this}postDeviceTopicsRequest(){return this.params=this.createQueryString(),this.body=this.createTopicsJson(),this}deleteDeviceTopicsRequest(){return this.params=this.createQueryString(),this.body=this.createTopicsJson(),this}createQueryString(){return this.PARAM_DEVICE_ID+"="+this.device.deviceId}createDeviceJson(){let t={};try{t=this.device.toJSON()}catch(t){}return t}createPUTDeviceJson(t){let e={};try{g.setDeviceJson(t),e=t.toJSON()}catch(t){}return e}createTopicsJson(){const t={};return this.topics&&(t.topics=this.topics),t}getDeviceId(){return this.device.getDeviceId()}setTopics(t){this.topics=t}setExternalCode(t){this.device.setExternalCode(t)}},D=Object.freeze({PERMISSION_TYPE_PUSH:"push",PERMISSION_TYPE_LOCATION:"location"}),{CorePermissions:C}=r(872).Core.Utils,x=class{static async getPermissions(){const t=await C.getPermissions(),e=await C.getPermission("push");return e&&(t.push=e.state),null===e&&window.Notification&&window.Notification.permission&&(t.push=window.Notification.permission),t}static async setPermissionsCallback(){C.setPermissionsCallback(),await C.setCallback("push",navigator.indigitallRequestPushPermission)}},{Log:M,CommonUtils:k,ErrorUtils:B}=r(872).Core.Utils,{EventType:U}=r(872).Core.Models,j="[IND]IndigitallSafari: ",V=class{static isSafariPushNotificationSupported(){return!!v.isSafariBrowserDevice()||"safari"in window&&"pushNotification"in window.safari}static async launchNotificationPermissionForSafari(){const t=new M(j);if(o.getSafariGestureRequestPermission()===U.EVENT_TYPE_ASK)if(o.getSafariWebsitePushId()&&o.getDeviceId())if(v.isSafariBrowserDevice()&&o.getWorkerPath()){const t=await navigator.serviceWorker.register(o.getWorkerPath());"granted"===await window.Notification.requestPermission()&&(o.setPermissionPush(U.EVENT_TYPE_ACCEPT),Q.subscribeForPushNotification(t))}else{const t=window.safari.pushNotification.permission(o.getSafariWebsitePushId());this.checkRemotePermission(t)}else o.getSafariWebsitePushId()?t.w("error Device Id is not found").writeLog():t.w("error Safari Website Push Id is not found").writeLog();else t.w("there was not user gesture to request safari permissions").writeLog()}static async checkRemotePermission(t){const e=new M(j);try{if("default"===t.permission){const t={deviceCode:o.getDeviceId()};e.d("permission default: ",t).writeLog(),o.getPermissionPush()||d.callEventPermission(D.PERMISSION_TYPE_PUSH,U.EVENT_TYPE_ASK),window.safari.pushNotification.requestPermission(await w.getURL()+"/safari",o.getSafariWebsitePushId(),t,window.indigitall.Push.checkRemotePermission)}else"denied"===t.permission?(e.w("permission denied: ",t).writeLog(),o.getPermissionPush()&&o.getPermissionPush()!=U.EVENT_TYPE_REJECT&&(d.callEventPermission(D.PERMISSION_TYPE_PUSH,U.EVENT_TYPE_REJECT),o.setPermissionPush(U.EVENT_TYPE_REJECT))):"granted"===t.permission&&(e.d("permission granted: ",t).writeLog(),o.getPermissionPush()&&o.getPermissionPush()!=U.EVENT_TYPE_ACCEPT&&(d.callEventPermission(D.PERMISSION_TYPE_PUSH,U.EVENT_TYPE_ACCEPT),o.setPermissionPush(U.EVENT_TYPE_ACCEPT)),t.deviceToken&&t.deviceToken!==o.getPushToken()&&(o.setPushToken(t.deviceToken),w.putDevice(new L,(t=>{if(k.isFunction(navigator.indigitallOnInitialized)){const t={};t.push=o.getPermissionPush(),t.location=o.getPermissionLocation(),navigator.indigitallOnInitialized(t,new g)}k.isFunction(navigator.indigitallOnNewUserRegistered)&&!o.getNewUserTimestamp()&&(o.setNewUserTimestamp(Date.now()),navigator.indigitallOnNewUserRegistered(t)),Q.registerLocation()}),navigator.indigitallOnError),o.setServiceTimestamp(Date.now())))}catch(t){k.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(B.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}},{EventType:F,DeviceStatus:Y}=r(872).Core.Models,{LogLevel:G,Log:K,CommonUtils:q,ErrorUtils:W,CryptoUtils:X}=r(872).Core.Utils,J="[IND]IndigitallPush: ";class H{constructor(){this.config=null}static async init(t){try{let r=new K(J);if(!t)return void r.w("config is not defined").writeLog();t.onPushPermissionChanged&&(t.requestPushPermission=t.onPushPermissionChanged),t.onLocationPermissionChanged&&(t.requestLocationPermission=t.onLocationPermissionChanged),this.config=t,this.config.logLevel?(o.setLogLevel(this.config.logLevel),r=new K(J)):this.config.setDebugLog&&(o.setLogLevel(G.WARNING),r=new K(J));let n="https://device-api.indigitall.com/v1",i="https://inbox-api.indigitall.com/v1";this.config.urlDeviceApi&&(n=this.config.urlDeviceApi),this.config.urlInboxApi&&(i=this.config.urlInboxApi),await o.setUrlDeviceApi(n),e()&&e().setUrlInboxApi(i),q.isFunction(this.config.requestPushPermission)&&(navigator.indigitallRequestPushPermission=this.config.requestPushPermission),q.isFunction(this.config.requestLocationPermission)&&(navigator.indigitallRequestLocationPermission=this.config.requestLocationPermission),q.isFunction(this.config.onNewUserRegistered)&&(navigator.indigitallOnNewUserRegistered=this.config.onNewUserRegistered),q.isFunction(this.config.onInitialized)&&(navigator.indigitallOnInitialized=this.config.onInitialized),q.isFunction(this.config.onError)&&(navigator.indigitallOnError=this.config.onError),q.isFunction(this.config.onLocationUpdated)&&(navigator.indigitallOnLocationUpdated=this.config.onLocationUpdated);const s=await x.getPermissions();if(x.setPermissionsCallback(),s&&"denied"===s.push)return r.i("Push permission denied").writeLog(),q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError("Push permission denied"),!1;if(!q.isServiceTimestampExceed())return this.device=new g,x.getPermissions().then((t=>{q.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(t,new g)})),r.d("Device enabled").writeLog(),!0;{let t="",n=null;if(!this.config||!this.config.appKey)return r.w("config.appKey is not defined").writeLog(),!1;if(t=this.config.appKey,this.config.requestLocation&&await o.setRequestLocation(this.config.requestLocation),this.config.workerPath&&(n=this.config.workerPath),t){if(await o.setAppKey(t),H.isServiceWorkerSupported()||V.isSafariPushNotificationSupported()){const t=new T;return w.getBrowser(t,(t=>{if(t.supported||this.isSafariBrowserDevice()){r.d("browser supported for webpush").writeLog();const t=new T;w.getApplicationAll(t,(async t=>{if(r.d("application ",t).writeLog(),t&&t.data&&t.data.configuration){const n=t.data.configuration;r.d("configuration ",n).writeLog(),n.vapidPublic&&o.setVAPID(n.vapidPublic),n.safariWebsitePushId&&o.setSafariWebsitePushId(n.safariWebsitePushId),n.enabled&&o.setEnabled(n.enabled),n.serviceSyncTime&&o.setServiceSyncTime(n.serviceSyncTime),n.locationEnabled&&o.setLocationEnabled(n.locationEnabled),n.locationUpdateMinutes&&o.setLocationUpdateMinutes(n.locationUpdateMinutes),n.inboxAuthMode&&e()&&e().setInboxAuthMode(n.inboxAuthMode),n.inAppEnabled}const i=new L;o.getDeviceId()&&o.getPushToken()?w.putDevice(i,(t=>{try{if(q.isServiceTimestampExceed()){const t=new h;t.setAppKey(o.getAppKey()),t.setDeviceId(o.getDeviceId()),w.postEventVisit(t)}t.registeredByCookie?(o.setServiceTimestamp(Date.now()),x.getPermissions().then((t=>{const e=new g;e.deviceId&&r.i("deviceId:",e.deviceId).writeLog(),e.pushToken&&r.i("pushToken:",e.pushToken).writeLog(),this.config&&q.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(t,e)}))):H.registerForPush(n)}catch(t){q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(W.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}),navigator.indigitallOnError):w.postDevice(i,(t=>{try{const e=new h;e.setAppKey(o.getAppKey()),e.setDeviceId(o.getDeviceId()),w.postEventVisit(e),t.registeredByCookie?o.setServiceTimestamp(Date.now()):H.registerForPush(n)}catch(t){q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(W.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}),(t=>{404===t.errorCode&&o.clearStorage(),q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(t)}))}),navigator.indigitallOnError)}else r.w("Browser not Supported").writeLog()}),navigator.indigitallOnError),!0}r.w("ServiceWorker and SafariPushNotification not supported").writeLog()}else r.w("appKey is not found").writeLog()}}catch(t){q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(W.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}return!1}static deviceGet(t,e){return w.getDevice(new L,t,e),!0}static deviceEnable(t,e){const r=new L(Y.ENABLE);return r.isDeviceUpdated(!0),w.putDevice(r,t,e),!0}static deviceDisable(t,e){const r=new L(Y.DISABLE);return r.isDeviceUpdated(!0),w.putDevice(r,t,e),!0}static topicsList(t,e){return w.getDeviceTopics(new L,t,e),!0}static topicsSubscribe(t,e,r){const n=new L;return n.setTopics(t),w.postDeviceTopics(n,e,r),!0}static topicsUnsubscribe(t,e,r){const n=new L;return n.setTopics(t),w.deleteDeviceTopics(n,e,r),!0}static registerForPush(t){o.setWorkerPath(t),V.isSafariPushNotificationSupported()?V.launchNotificationPermissionForSafari():H.isServiceWorkerSupported()&&H.launchNotificationPermission(t)}static isSafariPushNotificationSupported(){return V.isSafariPushNotificationSupported()}static isSafariBrowserDevice(){return v.isSafariBrowserDevice()}static isServiceWorkerSupported(){return"serviceWorker"in navigator}static registerServiceWorker(t){const e=new K(J);let r="/service-worker.js";return t&&(r=t),navigator.serviceWorker.register(r).then((t=>(e.d("ServiceWorker registration successful with scope: "+t.scope).writeLog(),t))).catch((t=>(e.e("ServiceWorker registration failed: ",t).writeLog(),t)))}static launchNotificationPermission(t){const e=new K(J);this.registerServiceWorker(t).then((t=>{try{let r;t.installing?r=t.installing:t.waiting?r=t.waiting:t.active&&(r=t.active),r&&(e.d("sw current state "+r.state).writeLog(),"activated"==r.state?H.subscribeForPushNotification(t):("installed"==r.state&&o.getPushToken()&&t.update(),r.addEventListener("statechange",(function(r){e.d("sw statechange : "+r.target.state).writeLog(),"activated"==r.target.state&&H.subscribeForPushNotification(t)}))))}catch(t){q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(W.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}))}static async subscribeForPushNotification(t){const e=new K(J);try{const r=await new Promise(((r,n)=>{const i={userVisibleOnly:!0,applicationServerKey:d.urlBase64ToUint8Array(o.getVAPID())};return e.d("Registration: ",t).writeLog(),o.getPermissionPush()||d.callEventPermission(D.PERMISSION_TYPE_PUSH,F.EVENT_TYPE_ASK),r(t.pushManager.subscribe(i))}));e.d("Received PushSubscription: ",r).writeLog(),o.getPermissionPush()&&o.getPermissionPush()===F.EVENT_TYPE_ACCEPT||(d.callEventPermission(D.PERMISSION_TYPE_PUSH,F.EVENT_TYPE_ACCEPT),o.setPermissionPush(F.EVENT_TYPE_ACCEPT));const n=r.toJSON();o.setBrowserPublicKey(n.keys.p256dh),o.setBrowserPrivateKey(n.keys.auth),o.setPushToken(n.endpoint),w.putDevice(new L,(t=>{x.getPermissions().then((t=>{q.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(t,new g)})),q.isFunction(navigator.indigitallOnNewUserRegistered)&&!o.getNewUserTimestamp()&&(o.setNewUserTimestamp(Date.now()),navigator.indigitallOnNewUserRegistered(t)),H.registerLocation()}),navigator.indigitallOnError),o.setServiceTimestamp(Date.now())}catch(t){e.e("No Registration: "+t).writeLog(),o.getPermissionPush()&&o.getPermissionPush()===F.EVENT_TYPE_REJECT||(d.callEventPermission(D.PERMISSION_TYPE_PUSH,F.EVENT_TYPE_REJECT),o.setPermissionPush(F.EVENT_TYPE_REJECT)),q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(t)}}static async launchNotificationPermissionForSafari(){o.setSafariGestureRequestPermission(F.EVENT_TYPE_ASK),V.launchNotificationPermissionForSafari()}static async checkRemotePermission(t){V.checkRemotePermission(t)}static registerLocation(){const t=new K(J);try{navigator.geolocation&&o.getRequestLocation()&&o.getLocationEnabled()&&(!o.getLocationTimestamp()||o.getLocationUpdateMinutes()<=(Date.now()-o.getLocationTimestamp())/6e4)&&(o.getPermissionLocation()||d.callEventPermission(D.PERMISSION_TYPE_LOCATION,F.EVENT_TYPE_ASK),navigator.geolocation.getCurrentPosition((t=>{o.getPermissionLocation()||o.getPermissionLocation()==F.EVENT_TYPE_ACCEPT||(d.callEventPermission(D.PERMISSION_TYPE_LOCATION,F.EVENT_TYPE_ACCEPT),o.setPermissionLocation(F.EVENT_TYPE_ACCEPT));const e=new h;e.setLocation(t.coords.latitude,t.coords.longitude),w.postEventLocation(e),q.isFunction(navigator.indigitallOnLocationUpdated)&&navigator.indigitallOnLocationUpdated(t),o.setLocationTimestamp(Date.now())}),(e=>{t.e("error "+e).writeLog(),o.getPermissionLocation()||o.getPermissionLocation()==F.EVENT_TYPE_REJECT||(d.callEventPermission(D.PERMISSION_TYPE_LOCATION,F.EVENT_TYPE_REJECT),o.setPermissionLocation(F.EVENT_TYPE_REJECT))})))}catch(t){q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(W.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}static requestPushPermission(t){x.getPushPermission().then((e=>{q.isFunction(t)&&t(e)}))}static onPermissionChange(){x.setPermissionCallback()}static requestLocationPermission(t){x.getLocationPermission().then((e=>{q.isFunction(t)&&t(e)}))}static logIn(t,e,r){H.setExternalId(t,e,r)}static logout(t,e){H.setExternalId(null,t,e)}static setExternalCode(t,e,r){H.setExternalId(t,e,r)}static async setExternalId(t,e,r){try{const n=o.getAppKey();if(!n)return void(q.isFunction(r)&&r(W.showError(c,c.ErrorCode.API_APPKEY_NOT_VALID)));if(null!=t){const i=await X.createHmac(n,t);i&&this.setExternalIdRequest(i,e,r)}else this.setExternalIdRequest(null,e,r)}catch(t){q.isFunction(r)&&r(W.showError(c,c.ErrorCode.PUSH_DEVICE_ERROR,t))}}static async setExternalIdRequest(t,e,r){const n=new L;o.setExternalId(t),await o.setExternalIdRequest(t),n.setExternalCode(t),n.isDeviceUpdated(!0),w.putDevice(n,(t=>{q.isFunction(e)&&e(new g(t))}),r)}static sendCustomEvent(t,e,r){try{let n="",i={},s=!0;"string"==typeof t?n=t:"object"==typeof t&&(n=t.eventType,t.customData&&(i=t.customData),!1===t.async&&(s=t.async));const a=new h;a.setDeviceId(o.getDeviceId()),a.setEventType(n),a.setCustomData(i),null!=o.getExternalId()&&"null"!=o.getExternalId()?(a.setExternalCode(o.getExternalId()),a.setJourneyRequest(!0),!1===s?w.postEventJourneySync(a,e,r):w.postEventJourney(a,e,r)):!1===s?w.postEventCustomSync(a,e,r):w.postEventCustom(a,e,r)}catch(t){q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(W.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}static sendJourneyEvent(t,e,r){try{let n="",i={},s=!0;"string"==typeof t?n=t:"object"==typeof t&&(n=t.eventType,t.customData&&(i=t.customData),!1===t.async&&(s=t.async));const a=new h;a.setDeviceId(o.getDeviceId()),a.setExternalCodeRequest(),a.setEventType(n),a.setCustomData(i),a.setJourneyRequest(!0),!1===s?w.postEventJourneySync(a,e,r):w.postEventJourney(a,e,r)}catch(t){q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(W.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}}const Q=H;window.indigitall||(window.indigitall={}),window.indigitall.Push=H,window.indigitall.LogLevel=G,window.indigitall.version=o.getVersion()})(),n})(),t.exports=e()},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.2.2","_id":"indigitall-web-core@4.2.2","_inBundle":false,"_integrity":"sha512-ur4Fqa70ZTqQGwLTFr2nOmjbOlvqm1riStW08NDSficeGpdIKnHhxLzzYffKVfAOpPXLP/kSlbVqTr797m5KdA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.2.2","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.2.2","saveSpec":null,"fetchSpec":"4.2.2"},"_requiredBy":["#USER","/","/indigitall-web-notification"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.2.2.tgz","_shasum":"4fcb6bb28a04b7c1c2b636df371cb2cf9702aaba","_spec":"indigitall-web-core@4.2.2","_where":"/home/circleci/webpush/sdk","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.2.2"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n);var t=r(396),e=r.n(t),i=r(277),o=r.n(i),s=r(413),a=r.n(s),u=r(735),c=r.n(u);const{Channel:l}=r(872).Core.Models,{LogLevel:f,CommonUtils:h}=r(872).Core.Utils,{Repository:d}=r(872).Core;class p{constructor(){this.config=null}static async init(t){return c().init(t)}static deviceGet(t,e){return c().devideGet(t,e)}static deviceEnable(t,e){return c().deviceEnable(t,e)}static deviceDisable(t,e){return c().deviceDisable(t,e)}static topicsList(t,e){return c().topicsList(t,e)}static topicsSubscribe(t,r,n){return e().topicsSubscribe(t),c().topicsSubscribe(t,r,n)}static topicsUnsubscribe(t,r,n){return e().topicsUnsubscribe(t),topicsUnsubscribe(t,r,n)}static async setExternalId(t,e,r){c().setExternalId(t,e,r)}static logIn(t,e,r){p.setExternalId(t,e,r)}static logout(t,e){p.setExternalId(null,t,e)}static sendCustomEvent(t,e,r){c().sendCustomEvent(t,e,r)}static sendJourneyEvent(t,e,r){c().sendJourneyEvent(t,e,r)}static isServiceWorkerSupported(){return c().isServiceWorkerSupported()}static isSafariPushNotificationSupported(){return c().isSafariPushNotificationSupported()}static isSafariPermissionAsked(){return c().isSafariPermissionAsked()}static isSafariBrowserDevice(){return c().isSafariBrowserDevice()}static launchNotificationPermissionForSafari(){c().launchNotificationPermissionForSafari()}static async showInApp(t,r,n,i){e().showInApp(t,r,n,i)}static async showInAppWithConfig(t,r,n,i,o,s,a,u,c,l,f){e().showInAppWithConfig(t,r,n,i,o,s,a,u,c,l,f)}static showMultipleInApp(t,r,n,i){e().showMultipleInApp(t,r,n,i)}static async showMultipleInAppWithConfig(t,r,n,i,o,s,a,u,c,l,f){e().showMultipleInAppWithConfig(t,r,n,i,o,s,a,u,c,l,f)}static getInboxMessagesCount(t,e,r){o().getMessagesCount(t,e,r)}static getInbox(t,e,r){o().getInbox(t,e,r)}static getInboxWithPage(t,e,r,n,i,s,a,u){o().getInboxWithPage(t,e,r,n,i,s,a,u)}static getCustomer(t,e){a().getCustomer(t,e)}static getCustomerInformation(t,e){this.getCustomerInformationWithFields(null,t,e)}static getCustomerInformationWithFields(t,e,r){a().getCustomerInformation(t,e,r)}static assignOrUpdateValueToCustomerFields(t,e,r){a().assignOrUpdateValueToCustomerFields(t,e,r)}static deleteValuesFromCustomerFields(t,e,r){a().deleteValuesFromCustomerFields(t,e,r)}static link(t,e,r,n){p.logIn(t,(t=>{a().link(e,r,n)}),(t=>{h.isFunction(n)&&n(t)}))}static unlink(t,e,r){p.logout((n=>{a().unlink(t,e,r)}),(t=>{h.isFunction(r)&&r(t)}))}}window.indigitall=p,window.indigitall.InApp=e(),window.indigitall.Inbox=o(),window.indigitall.Customer=a(),window.indigitall.Push=c(),window.indigitall.InApp.Utils=e().Utils,window.indigitall.Channel=l,window.indigitall.LogLevel=f})(),n})()));
|
|
2
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(this,(()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.2.4","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>M});var t={};r.r(t),r.d(t,{BaseClient:()=>_,BaseRequest:()=>b});var e={};r.r(e),r.d(e,{Channel:()=>O,Device:()=>S,DeviceStatus:()=>w,ErrorDictionary:()=>I,ErrorModel:()=>g,EventType:()=>P});var i={};r.r(i),r.d(i,{CommonUtils:()=>R,CorePermissions:()=>T,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>C,Log:()=>E,LogLevel:()=>p,Validations:()=>x});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,d=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getDeviceJson(){return c.getItem(this.DEVICE_JSON)}async setDeviceJson(t){c.setItem(this.DEVICE_JSON,t)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}},p=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=p;class v{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new d).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const E=v,g=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new g(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new g(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},_=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new E("[IND]BaseClient: ");let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\n").writeLog(),new g(n.statusCode,n.message))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},b=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new d).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},O=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),S=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new d).getBrowserPublicKey(),this.browserPrivateKey=(new d).getBrowserPrivateKey(),this.platform=(new d).getPlatform(),this.version=(new d).getVersion(),this.browserName=(new d).getBrowserName(),this.browserVersion=(new d).getBrowserVersion(),this.osName=(new d).getOsName(),this.osVersion=(new d).getOsVersion(),this.deviceType=(new d).getDeviceType(),(new d).getEnabled()&&(this.enabled="true"===(new d).getEnabled()),(new d).getExternalId()&&(this.externalCode=(new d).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new d).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new d).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}static setDeviceJson(t){(new d).setDeviceJson(JSON.stringify(t.toJSON()))}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},w=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),P=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=class{static isServiceTimestampExceed(){return!(new d).getServiceTimestamp()||(new d).getServiceSyncTime()<=(Date.now()-(new d).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},T=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new E("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},A=new E("[IND]Crypto"),N=new TextEncoder("utf-8"),L="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",N.encode(t),{name:L,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(L,n,N.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return A.d("hmac: ",s).writeLog(),s}catch(t){return void A.e("error:",t).writeLog()}}},C=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},x=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M={Repository:d,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}i.default=t,r&&r.set(t,i);return i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(545)),i=a(r(358)),o=a(r(568)),s=a(r(801));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return A()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=n.key,o=void 0,o=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===u(o)?o:String(o)),n)}var i,o}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,a,u,l,d,p,y,v;return e=t,r=[{key:"getURL",value:(v=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return v.apply(this,arguments)})},{key:"call",value:(y=f(c().mark((function t(e,r,a,u){var l,f,h,d,p;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=new n.default("[IND]BaseClient: "),t.next=3,this.getURL();case 3:return t.t0=t.sent,t.t1=a.getPath(r),t.t2=t.t0+t.t1,t.t3=a.getParams(),f=t.t2+t.t3,a.isJourneyRequest()&&(f=f.replace("v1","v2")),h={method:e,headers:a.addHeaders()},e!==this.GET&&(h.body=JSON.stringify(a.getBody())),u&&(h.credentials=u),t.prev=12,t.next=15,fetch(f,h);case 15:return d=t.sent,t.next=18,d.json();case 18:if(p=t.sent,!d.ok){t.next=22;break}return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.statusCode+"\nResponse Message: "+p.message+"\nResponse Body:",JSON.stringify(p.data,null,"\t")).writeLog(),t.abrupt("return",p);case 22:return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.statusCode+"\nResponse Message: "+p.message+"\n").writeLog(),t.abrupt("return",new i.default(p.statusCode,p.message));case 26:return t.prev=26,t.t4=t.catch(12),l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 30:case"end":return t.stop()}}),t,this,[[12,26]])}))),function(t,e,r,n){return y.apply(this,arguments)})},{key:"get",value:(p=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return p.apply(this,arguments)})},{key:"post",value:(d=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return d.apply(this,arguments)})},{key:"put",value:(l=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return l.apply(this,arguments)})},{key:"delete",value:(u=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return u.apply(this,arguments)})}],r&&h(e.prototype,r),a&&h(e,a),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r,n;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version;var o=n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}});e.default=o},106:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}var h={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u};e.default=h},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.Channel=r;var n=r;e.default=n},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r,n;return e=t,n=[{key:"setDeviceJson",value:function(t){(new i.default).setDeviceJson(JSON.stringify(t.toJSON()))}}],(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410};var n={ErrorCode:r,ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=n},358:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}function i(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=o},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}});var n=r(901),i=c(r(354)),o=c(r(202)),s=c(r(801)),a=c(r(358)),u=c(r(22));function c(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(){n=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof p?e:p,s=Object.create(i.prototype),a=new R(n||[]);return o(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&i.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(o,s,a,u){var c=h(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var s;o(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return s=s?s.then(i,i):i()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return A()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,o(I,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l,f;return e=t,r=[{key:"getDB",value:(f=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return f.apply(this,arguments)})},{key:"get",value:(l=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return l.apply(this,arguments)})},{key:"put",value:(c=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return c.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(u=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return u.apply(this,arguments)})},{key:"getItem",value:(a=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return a.apply(this,arguments)})}],r&&s(e.prototype,r),i&&s(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},795:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r,o;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),o&&n(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return A()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=n.key,o=void 0,o=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===u(o)?o:String(o)),n)}var i,o}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}var e,r,a,u,l,d,p,y,v,E,g,m,I,_;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(_=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.APP_KEY,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return _.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){var t=i.default.getItem(this.SERVICE_SYNC_TIME);return t||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){var t=i.default.getItem(this.LOCATION_UPDATE_MINUTES);return t||30}},{key:"setRequestLocation",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(E=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getExternalIdRequest",value:(y=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return y.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getDeviceJson",value:(p=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.DEVICE_JSON));case 1:case"end":return t.stop()}}),t,this)}))),function(){return p.apply(this,arguments)})},{key:"setDeviceJson",value:(d=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.DEVICE_JSON,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"getRegisteredByCookie",value:(l=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(u=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}}],r&&h(e.prototype,r),a&&h(e,a),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},636:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r,o;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),o&&n(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,n=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],(r=null)&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(){s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,u)}),(function(t){i("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return A()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(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,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l,f;return e=t,r=null,n=[{key:"getPermissions",value:(f=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"getPermission",value:(l=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return l.apply(this,arguments)})},{key:"setPermissionsCallback",value:(a=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"setCallback",value:(o=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return o.apply(this,arguments)})}],r&&c(e.prototype,r),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="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},i(t)}function o(){o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return A()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(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,(o=n.key,s=void 0,s=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===i(s)?s:String(s)),n)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i,f;return e=t,r=null,n=[{key:"createHmac",value:(i=o().mark((function t(e,r){var n,i,s,a,f,h,d;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,s=null===(n=window)||void 0===n||null===(i=n.crypto)||void 0===i?void 0:i.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,s.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return a=t.sent,t.next=9,s.sign(l,a,c.encode(r));case 9:return f=t.sent,h=new Uint8Array(f),d=Array.prototype.map.call(h,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",d).writeLog(),t.abrupt("return",d);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),f=function(){var t=this,e=arguments;return new Promise((function(r,n){var o=i.apply(t,e);function a(t){s(o,r,n,a,u,"next",t)}function u(t){s(o,r,n,a,u,"throw",t)}a(void 0)}))},function(t,e){return f.apply(this,arguments)})}],r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.CryptoUtils=f;var h=f;e.default=h},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=n.key,s=void 0,s=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(s)?s:String(s)),n)}var i,s}var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},970:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i,o;return e=t,o=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],(i=null)&&n(e.prototype,i),o&&n(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="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},s(t)}function a(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,(i=n.key,o=void 0,o=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===s(o)?o:String(o)),n)}var i,o}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.LogLevel=r;var n=r;e.default=n},506:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,s=void 0,s=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(s)?s:String(s)),i)}var o,s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,i;return e=t,i=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],(r=null)&&n(e.prototype,r),i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(306)),i=f(r(897)),o=f(r(95)),s=f(r(568)),a=f(r(970)),u=f(r(545)),c=r(136),l=f(r(506));function f(t){return t&&t.__esModule?t:{default:t}}},117:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.2.4","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>M});var t={};r.r(t),r.d(t,{BaseClient:()=>_,BaseRequest:()=>b});var e={};r.r(e),r.d(e,{Channel:()=>O,Device:()=>S,DeviceStatus:()=>w,ErrorDictionary:()=>I,ErrorModel:()=>g,EventType:()=>P});var i={};r.r(i),r.d(i,{CommonUtils:()=>R,CorePermissions:()=>T,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>C,Log:()=>E,LogLevel:()=>p,Validations:()=>x});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,d=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getDeviceJson(){return c.getItem(this.DEVICE_JSON)}async setDeviceJson(t){c.setItem(this.DEVICE_JSON,t)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}},p=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=p;class v{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new d).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const E=v,g=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new g(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new g(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},_=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new E("[IND]BaseClient: ");let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\n").writeLog(),new g(n.statusCode,n.message))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},b=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new d).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},O=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),S=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new d).getBrowserPublicKey(),this.browserPrivateKey=(new d).getBrowserPrivateKey(),this.platform=(new d).getPlatform(),this.version=(new d).getVersion(),this.browserName=(new d).getBrowserName(),this.browserVersion=(new d).getBrowserVersion(),this.osName=(new d).getOsName(),this.osVersion=(new d).getOsVersion(),this.deviceType=(new d).getDeviceType(),(new d).getEnabled()&&(this.enabled="true"===(new d).getEnabled()),(new d).getExternalId()&&(this.externalCode=(new d).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new d).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new d).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}static setDeviceJson(t){(new d).setDeviceJson(JSON.stringify(t.toJSON()))}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},w=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),P=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=class{static isServiceTimestampExceed(){return!(new d).getServiceTimestamp()||(new d).getServiceSyncTime()<=(Date.now()-(new d).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},T=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new E("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},A=new E("[IND]Crypto"),N=new TextEncoder("utf-8"),L="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",N.encode(t),{name:L,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(L,n,N.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return A.d("hmac: ",s).writeLog(),s}catch(t){return void A.e("error:",t).writeLog()}}},C=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},x=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M={Repository:d,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(545)),i=a(r(358)),o=a(r(568)),s=a(r(801));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,a,u,l,d,p,y;return e=t,r=[{key:"getURL",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"call",value:(p=f(c().mark((function t(e,r,a,u){var l,f,h,d,p;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=new n.default("[IND]BaseClient: "),t.next=3,this.getURL();case 3:return t.t0=t.sent,t.t1=a.getPath(r),t.t2=t.t0+t.t1,t.t3=a.getParams(),f=t.t2+t.t3,a.isJourneyRequest()&&(f=f.replace("v1","v2")),h={method:e,headers:a.addHeaders()},e!==this.GET&&(h.body=JSON.stringify(a.getBody())),u&&(h.credentials=u),t.prev=12,t.next=15,fetch(f,h);case 15:return d=t.sent,t.next=18,d.json();case 18:if(p=t.sent,!d.ok){t.next=22;break}return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.statusCode+"\nResponse Message: "+p.message+"\nResponse Body:",JSON.stringify(p.data,null,"\t")).writeLog(),t.abrupt("return",p);case 22:return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.statusCode+"\nResponse Message: "+p.message+"\n").writeLog(),t.abrupt("return",new i.default(p.statusCode,p.message));case 26:return t.prev=26,t.t4=t.catch(12),l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 30:case"end":return t.stop()}}),t,this,[[12,26]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(d=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(l=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return l.apply(this,arguments)})},{key:"put",value:(u=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"delete",value:(a=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return a.apply(this,arguments)})}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version;var o=n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}});e.default=o},106:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}var h={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u};e.default=h},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.Channel=r;var n=r;e.default=n},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r,n;return e=t,n=[{key:"setDeviceJson",value:function(t){(new i.default).setDeviceJson(JSON.stringify(t.toJSON()))}}],(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=r},358:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=i},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}});var n=r(901),i=c(r(354)),o=c(r(202)),s=c(r(801)),a=c(r(358)),u=c(r(22));function c(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(){n=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof p?e:p,s=Object.create(i.prototype),a=new R(n||[]);return o(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&i.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(o,s,a,u){var c=h(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var s;o(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return s=s?s.then(i,i):i()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,o(I,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},795:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}var e,r,a,u,l,d,p,y,v,E,g,m,I;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.APP_KEY,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(E=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(y=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},{key:"getExternalIdRequest",value:(p=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return p.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getDeviceJson",value:(d=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.DEVICE_JSON));case 1:case"end":return t.stop()}}),t,this)}))),function(){return d.apply(this,arguments)})},{key:"setDeviceJson",value:(l=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.DEVICE_JSON,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getRegisteredByCookie",value:(u=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(a=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},636:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(){s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,u)}),(function(t){i("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="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},i(t)}function o(){o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(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,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h,d;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,s=null===(n=window)||void 0===n||null===(i=n.crypto)||void 0===i?void 0:i.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,s.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return a=t.sent,t.next=9,s.sign(l,a,c.encode(r));case 9:return f=t.sent,h=new Uint8Array(f),d=Array.prototype.map.call(h,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",d).writeLog(),t.abrupt("return",d);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.CryptoUtils=f;var h=f;e.default=h},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},970:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i;return e=t,i=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="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},s(t)}function a(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,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.LogLevel=r;var n=r;e.default=n},506:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(306)),i=f(r(897)),o=f(r(95)),s=f(r(568)),a=f(r(970)),u=f(r(545)),c=r(136),l=f(r(506));function f(t){return t&&t.__esModule?t:{default:t}}},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.2.4","_id":"indigitall-web-core@4.2.4","_inBundle":false,"_integrity":"sha512-XBgYKfMnDxWIfvgYuxJj4nZ9vJiZms1a2Hwe4CCuH06FnePS0wTbOBSP9QMLOOTj75PWrYEYlJECY5+/Yl5TgA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.2.4","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.2.4","saveSpec":null,"fetchSpec":"4.2.4"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.2.4.tgz","_shasum":"652eee30d5ee8be997152afce6b411c6c83946d3","_spec":"indigitall-web-core@4.2.4","_where":"/home/circleci/webpush/customer","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.2.4"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{default:()=>O});const{Repository:t}=r(872).Core,e=new class extends t{constructor(){super(),this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID"}async setDeviceId(t){this.setStorage(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}},{Validations:i,Log:o}=r(872).Core.Utils,s=class extends i{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new o("[IND]CustomerValidations: "),r=e.getDeviceId();let n=!0;return this.isAppKeyFormat()||(n=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(r)||(n=!1,t.w("deviceId is null or empty").writeLog()),n}},a=class{constructor(t,e){this.customerFieldKey=t,this.customerFieldValue=e}getCustomerFieldKey(){return this.customerFieldKey}getCustomerFieldValue(){return this.customerFieldValue}toJSON(){return JSON.parse(`"${this.customerFieldKey}":"${this.customerFieldValue}"`)}},{ErrorDictionary:u}=r(872).Core.Models,c=u.ErrorCode;Object.assign(c,{CUSTOMER_GET_ERROR:4001,CUSTOMER_PARAMS_ERROR:4011,CUSTOMER_GENERAL_ERROR:4600,CUSTOMER_NO_EXTERNAL_CODE:4601});const l=u.ErrorMessage;Object.assign(l,{CUSTOMER_GET_ERROR:"customer get error",CUSTOMER_PARAMS_ERROR:"Params are not correct",CUSTOMER_GENERAL_ERROR:"general error",CUSTOMER_NO_EXTERNAL_CODE:"no external code registered"});const f={ErrorCode:c,ErrorMessage:l},{Config:h}=r(872).Core,{BaseClient:d}=r(872).Core.Api,{ErrorModel:p}=r(872).Core.Models,{CommonUtils:y,ErrorUtils:v}=r(872).Core.Utils,E=new class extends d{constructor(){super(),this.URL_BASE=h.client.CUSTOMER_URL_BASE,this.ENDPOINT_CUSTOMER="/customer",this.ENDPOINT_CUSTOMER_FIELD=this.ENDPOINT_CUSTOMER+"/field",this.ENDPOINT_CUSTOMER_LINK=this.ENDPOINT_CUSTOMER+"/link",this.ENDPOINT_EVENT="/event",this.ENDPOINT_EVENT_JOURNEY=this.ENDPOINT_EVENT+"/custom",this.ENDPOINT_EVENT_JOURNEY_BEACON=this.ENDPOINT_EVENT_JOURNEY+"/beacon"}async getCustomer(t,r,n){if(s.isAppKeyFormat()&&s.isValidFormat(e.getExternalId)){const e=await this.get(this.ENDPOINT_CUSTOMER,t.getCustomerRequest());e&&!(e instanceof p)&&e.statusCode>=200&&e.statusCode<300?y.isFunction(r)&&r(new class{constructor(t){t.id&&(this.id=t.id),t.customerId&&(this.customerId=t.customerId),t.applicationId&&(this.applicationId=t.applicationId),t.createdAt&&(this.createdAt=t.createdAt),t.updatedAt&&(this.updatedAt=t.updatedAt)}getCustomerId(){return this.customerId}getApplicationId(){return this.applicationId}getId(){return this.id}getCreatedAt(){return this.createdAt}getUpdatedAt(){return this.updatedAt}toJSON(){return{id:this.id,customerId:this.customerId,applicationId:this.applicationId,createdAt:this.createdAt,updatedAt:this.updatedAt}}}(e.data)):e?y.isFunction(n)&&n(e):y.isFunction(n)&&n()}else y.isFunction(n)&&n(v.showError(f,f.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async getCustomerField(t,r,n){if(s.isAppKeyFormat()&&s.isValidFormat(e.getExternalId)){const e=await this.get(this.ENDPOINT_CUSTOMER_FIELD,t.getCustomerFieldRequest()),i=[];for(const t in e.data)e.data.hasOwnProperty(t)&&i.push(new a(t,e.data[t]));e&&i.length>0&&!(e instanceof p)&&e.statusCode>=200&&e.statusCode<300?y.isFunction(r)&&r(i):e?y.isFunction(n)&&n(e):y.isFunction(n)&&n()}else y.isFunction(n)&&n(v.showError(f,f.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async putCustomerField(t,r,n){if(s.isAppKeyFormat()&&s.isValidFormat(e.getExternalId)){const e=await this.put(this.ENDPOINT_CUSTOMER_FIELD,t.putCustomerFieldRequest());this.getCustomerResponse(e,r,n)}else y.isFunction(n)&&n(v.showError(f,f.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async deleteCustomerField(t,r,n){if(s.isAppKeyFormat()&&s.isValidFormat(e.getExternalId)){const e=await this.delete(this.ENDPOINT_CUSTOMER_FIELD,t.deleteCustomerFieldRequest());this.getCustomerResponse(e,r,n)}else y.isFunction(n)&&n(v.showError(f,f.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async postCustomerLink(t,r,n){if(s.isValidFormatRequest()&&s.isValidFormat(e.getExternalId)){const e=await this.post(this.ENDPOINT_CUSTOMER_LINK,t.postAndDeleteCustomerLinkRequest());this.getCustomerResponse(e,r,n)}else y.isFunction(n)&&n(v.showError(f,f.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async deleteCustomerLink(t,r,n){if(s.isValidFormatRequest()&&s.isValidFormat(e.getExternalId)){const e=await this.delete(this.ENDPOINT_CUSTOMER_LINK,t.postAndDeleteCustomerLinkRequest());this.getCustomerResponse(e,r,n)}else y.isFunction(n)&&n(v.showError(f,f.ErrorCode.BAD_REQUEST_SERVER_ERROR))}async getCustomerResponse(t,e,r){t&&!(t instanceof p)&&t.statusCode>=200&&t.statusCode<300?y.isFunction(e)&&(""!=t.data?e(t.data):e()):t?y.isFunction(r)&&r(t):y.isFunction(r)&&r()}},{BaseRequest:g}=r(872).Core.Api,{Device:m}=r(872).Core.Models,I=class extends g{constructor(){super(),this.device=new m,null!=e.getExternalId()&&(this.customerId=e.getExternalId()),this.fieldNames,this.link,this.fields}getCustomerRequest(){return this.params=this.createQueryStringCustomerId(),this}getCustomerFieldRequest(){return this.params=this.createQueryString(),this}putCustomerFieldRequest(){return this.params=this.createQueryStringCustomerId(),this.body=this.createBodyJson(),this}deleteCustomerFieldRequest(){return this.params=this.createQueryStringCustomerId(),this.body=this.createDeleteBodyJson(),this}postAndDeleteCustomerLinkRequest(){return this.params="",this.body=this.createBodyJson(),this}createQueryString(){let t="";return t+=this.createQueryStringCustomerId(),this.fieldNames&&(t+=`&${this.PARAM_CUSTOMER_FIELD_NAMES}=${this.fieldNames}`),this.fields&&(t+=`&${this.PARAM_CUSTOMER_FIELDS}=${this.fields}`),this.link&&(t+=`&${this.PARAM_CUSTOMER_LINK}=${this.link}`),t}createQueryStringCustomerId(){return this.PARAM_CUSTOMER_ID+"="+this.customerId}createBodyJson(){let t={};try{this.channel&&(t.channel=this.channel,this.device&&(t.deviceId=this.device.deviceId),this.customerId&&(t.customerId=this.customerId)),this.link&&(t.link=this.link),this.fields&&(t=this.fields)}catch(t){console.log("Error fieldNames request :"+t)}return t}createDeleteBodyJson(){const t={},e=[];try{if(this.fieldNames){for(let t=0;t<this.fieldNames.length;t++)e.push(this.fieldNames[t]);t.fields=e}}catch(t){console.log("Error fieldNames request :"+t)}return t}setFields(t){this.fields=t}setFieldNames(t){this.fieldNames=t}setLink(t){this.link=t}setChannel(t){this.channel=t}},{CommonUtils:_,ErrorUtils:b}=r(872).Core.Utils,O=class{static async getCustomer(t,e){const r=new I;await E.getCustomer(r,t,e)}static async getCustomerInformation(t,e,r){const n=new I;null!=t&&(Array.isArray(t)?n.setFieldNames(t):_.isFunction(r)&&r(b.customerError(4011,b.CUSTOMER_ERROR_PARAMS))),await E.getCustomerField(n,e,r)}static async assignOrUpdateValueToCustomerFields(t,e,r){let n;try{"string"==typeof t?n=JSON.parse(n):"object"==typeof t&&(n=t)}catch(t){_.isFunction(r)&&r(b.customerError(4011,b.CUSTOMER_ERROR_PARAMS))}if(n){const t=new I;t.setFields(n),await E.putCustomerField(t,e,r)}else _.isFunction(r)&&r(b.customerError(4900,b.CUSTOMER_ERROR_PARAMS))}static async deleteValuesFromCustomerFields(t,e,r){if(Array.isArray(t)){const n=new I;n.setFieldNames(t),await E.deleteCustomerField(n,e,r)}else _.isFunction(r)&&r(b.customerError(4011,b.CUSTOMER_ERROR_PARAMS))}static async link(t,e,r){const n=new I;n.setChannel(t),await E.postCustomerLink(n,e,r)}static async unlink(t,e,r){const n=new I;n.setChannel(t),await E.deleteCustomerLink(n,e,r)}}})(),n})(),t.exports=e()},413:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}i.default=t,r&&r.set(t,i);return i}(r(117));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},899:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.2.4","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>M});var t={};r.r(t),r.d(t,{BaseClient:()=>_,BaseRequest:()=>b});var e={};r.r(e),r.d(e,{Channel:()=>O,Device:()=>S,DeviceStatus:()=>w,ErrorDictionary:()=>I,ErrorModel:()=>g,EventType:()=>P});var i={};r.r(i),r.d(i,{CommonUtils:()=>R,CorePermissions:()=>T,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>C,Log:()=>E,LogLevel:()=>p,Validations:()=>x});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,d=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getDeviceJson(){return c.getItem(this.DEVICE_JSON)}async setDeviceJson(t){c.setItem(this.DEVICE_JSON,t)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}},p=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=p;class v{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new d).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const E=v,g=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new g(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new g(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},_=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new E("[IND]BaseClient: ");let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\n").writeLog(),new g(n.statusCode,n.message))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},b=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new d).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},O=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),S=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new d).getBrowserPublicKey(),this.browserPrivateKey=(new d).getBrowserPrivateKey(),this.platform=(new d).getPlatform(),this.version=(new d).getVersion(),this.browserName=(new d).getBrowserName(),this.browserVersion=(new d).getBrowserVersion(),this.osName=(new d).getOsName(),this.osVersion=(new d).getOsVersion(),this.deviceType=(new d).getDeviceType(),(new d).getEnabled()&&(this.enabled="true"===(new d).getEnabled()),(new d).getExternalId()&&(this.externalCode=(new d).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new d).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new d).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}static setDeviceJson(t){(new d).setDeviceJson(JSON.stringify(t.toJSON()))}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},w=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),P=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=class{static isServiceTimestampExceed(){return!(new d).getServiceTimestamp()||(new d).getServiceSyncTime()<=(Date.now()-(new d).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},T=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new E("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},A=new E("[IND]Crypto"),N=new TextEncoder("utf-8"),L="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",N.encode(t),{name:L,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(L,n,N.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return A.d("hmac: ",s).writeLog(),s}catch(t){return void A.e("error:",t).writeLog()}}},C=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},x=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M={Repository:d,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(545)),i=a(r(358)),o=a(r(568)),s=a(r(801));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,a,u,l,d,p,y;return e=t,r=[{key:"getURL",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"call",value:(p=f(c().mark((function t(e,r,a,u){var l,f,h,d,p;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=new n.default("[IND]BaseClient: "),t.next=3,this.getURL();case 3:return t.t0=t.sent,t.t1=a.getPath(r),t.t2=t.t0+t.t1,t.t3=a.getParams(),f=t.t2+t.t3,a.isJourneyRequest()&&(f=f.replace("v1","v2")),h={method:e,headers:a.addHeaders()},e!==this.GET&&(h.body=JSON.stringify(a.getBody())),u&&(h.credentials=u),t.prev=12,t.next=15,fetch(f,h);case 15:return d=t.sent,t.next=18,d.json();case 18:if(p=t.sent,!d.ok){t.next=22;break}return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.statusCode+"\nResponse Message: "+p.message+"\nResponse Body:",JSON.stringify(p.data,null,"\t")).writeLog(),t.abrupt("return",p);case 22:return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.statusCode+"\nResponse Message: "+p.message+"\n").writeLog(),t.abrupt("return",new i.default(p.statusCode,p.message));case 26:return t.prev=26,t.t4=t.catch(12),l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 30:case"end":return t.stop()}}),t,this,[[12,26]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(d=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(l=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return l.apply(this,arguments)})},{key:"put",value:(u=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"delete",value:(a=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return a.apply(this,arguments)})}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version;var o=n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}});e.default=o},106:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}var h={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u};e.default=h},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.Channel=r;var n=r;e.default=n},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r,n;return e=t,n=[{key:"setDeviceJson",value:function(t){(new i.default).setDeviceJson(JSON.stringify(t.toJSON()))}}],(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=r},358:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=i},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}});var n=r(901),i=c(r(354)),o=c(r(202)),s=c(r(801)),a=c(r(358)),u=c(r(22));function c(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(){n=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof p?e:p,s=Object.create(i.prototype),a=new R(n||[]);return o(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&i.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(o,s,a,u){var c=h(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var s;o(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return s=s?s.then(i,i):i()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,o(I,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},795:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}var e,r,a,u,l,d,p,y,v,E,g,m,I;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.APP_KEY,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(E=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(y=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},{key:"getExternalIdRequest",value:(p=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return p.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getDeviceJson",value:(d=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.DEVICE_JSON));case 1:case"end":return t.stop()}}),t,this)}))),function(){return d.apply(this,arguments)})},{key:"setDeviceJson",value:(l=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.DEVICE_JSON,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getRegisteredByCookie",value:(u=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(a=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},636:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(){s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,u)}),(function(t){i("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="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},i(t)}function o(){o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(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,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h,d;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,s=null===(n=window)||void 0===n||null===(i=n.crypto)||void 0===i?void 0:i.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,s.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return a=t.sent,t.next=9,s.sign(l,a,c.encode(r));case 9:return f=t.sent,h=new Uint8Array(f),d=Array.prototype.map.call(h,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",d).writeLog(),t.abrupt("return",d);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.CryptoUtils=f;var h=f;e.default=h},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},970:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i;return e=t,i=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="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},s(t)}function a(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,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.LogLevel=r;var n=r;e.default=n},506:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(306)),i=f(r(897)),o=f(r(95)),s=f(r(568)),a=f(r(970)),u=f(r(545)),c=r(136),l=f(r(506));function f(t){return t&&t.__esModule?t:{default:t}}},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.2.4","_id":"indigitall-web-core@4.2.4","_inBundle":false,"_integrity":"sha512-XBgYKfMnDxWIfvgYuxJj4nZ9vJiZms1a2Hwe4CCuH06FnePS0wTbOBSP9QMLOOTj75PWrYEYlJECY5+/Yl5TgA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.2.4","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.2.4","saveSpec":null,"fetchSpec":"4.2.4"},"_requiredBy":["#USER","/","/indigitall-web-customer"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.2.4.tgz","_shasum":"652eee30d5ee8be997152afce6b411c6c83946d3","_spec":"indigitall-web-core@4.2.4","_where":"/home/circleci/webpush/inapp","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.2.4"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{default:()=>nt});const{Repository:t}=r(872).Core,e=new class extends t{constructor(){super(),this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_SHOW_ONCE=this.REPOSITORY+".INAPP_SHOW_ONCE",this.INAPP_TIMES_CLICKED=this.REPOSITORY+".INAPP_TIMES_CLICKED",this.INAPP_DISMISS_FOREVER=this.REPOSITORY+".INAPP_DISMISS_FOREVER",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API"}setItemStorage(t){this.setItemSessionStorage(this.REPOSITORY,t)}getItemStorage(){return this.getItemSessionStorage(this.REPOSITORY)}setDeviceId(t){this.setStorage(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}getInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}getInAppShowOnce(){return this.getStorage(this.INAPP_SHOW_ONCE)}setInAppShowOnce(t){this.setStorage(this.INAPP_SHOW_ONCE,t)}getInAppTimesClicked(){return this.getStorage(this.INAPP_TIMES_CLICKED)}setInAppTimesClicked(t){this.setStorage(this.INAPP_TIMES_CLICKED,t)}getInAppDismissForever(){return this.getStorage(this.INAPP_DISMISS_FOREVER)}setInAppDismissForever(t){this.setStorage(this.INAPP_DISMISS_FOREVER,t)}getInAppTopics(){return this.getStorage(this.INAPP_TOPICS)}setInAppTopics(t){this.setStorage(this.INAPP_TOPICS,t)}async getUrlDeviceApi(){let t;try{this.storage&&this.storage.isLocalStorageAvailable()?t=this.getStorage(this.URL_DEVICE_API):this.db&&this.db.IDB&&(t=await this.db.getItem(this.URL_DEVICE_API))}catch(t){}return t}},{Validations:i,Log:o}=r(872).Core.Utils,s=class extends i{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new o("[IND]InAppValidations: "),r=e.getDeviceId();let n=!0;return this.isAppKeyFormat()||(n=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(r)||(n=!1,t.w("deviceId is null or empty").writeLog()),n}},{ErrorDictionary:a}=r(872).Core.Models,u=a.ErrorCode;Object.assign(u,{INAPP_ERROR:2e3,INAPP_SHOW_INAPP_ERROR:2100,INAPP_WAS_EXPIRED:2101,INAPP_WAS_SHOWN_MANY_TIMES:2102,INAPP_WAS_CLICKED_MANY_TIMES:2103,INAPP_FORM_TYPE_NOT_CORRECT:2120,INAPP_FORM_FIELD_IS_EMPTY:2121,INAPP_POPUP_ERROR:2300,INAPP_WAS_DISMISSED_FOREVER:2304,INAPP_ERROR_CONTENT_MESSAGE:2305,INAPP_INSTANCE_TOPICS_ERROR:2306,INAPP_GENERAL_ERROR:2600});const c=a.ErrorMessage;Object.assign(c,{INAPP_ERROR:"inApp error",INAPP_SHOW_INAPP_ERROR:"error on show inApp",INAPP_WAS_EXPIRED:"InApp was expired",INAPP_WAS_SHOWN_MANY_TIMES:"InApp was shown more than $x times",INAPP_WAS_CLICKED_MANY_TIMES:"InApp was clicked more than $x times",NAPP_FORM_TYPE_NOT_CORRECT:"Input type is not correct",INAPP_FORM_FIELD_IS_EMPTY:"Field is empty",INAPP_POPUP_ERROR:"error on popup",INAPP_WAS_DISMISSED_FOREVER:"InApp was dismissed forever",INAPP_ERROR_CONTENT_MESSAGE:"InApp error with content",INAPP_INSTANCE_TOPICS_ERROR:"topics instance is not correct, only string[] is valid types",INAPP_GENERAL_ERROR:"inApp general error"});const l={ErrorCode:u,ErrorMessage:c},f=class{static searchInApp(t){const e=this.getListInApp();return null==e?null:this.findInAppFromInAppList(e,t)}static searchInAppWithInAppId(t){const e=this.getListInApp();return null==e?null:this.findInAppFromInAppListWithInAppId(e,t)}static addInApp(t){let r=this.getListInApp();null!=r?r.push(t):r=[t],e.setItemStorage(JSON.stringify(r))}static getListInApp(){let t=null;try{e.getItemStorage()&&(t=JSON.parse(e.getItemStorage()))}catch(t){console.error(t.message)}return t}static addInAppNewClick(t){this.updateInAppField(t.inAppId,!0,null,null)}static addInAppNewShow(t){this.updateInAppField(t.inAppId,null,!0,null)}static addInAppDismissForever(t){this.updateInAppField(t.inAppId,null,null,!0)}static updateInAppField(t,r,n,i){const o=this.getListInApp(),s=[];if(null!=o)for(let e=0;e<o.length;e++)o[e].inAppId==t&&(null!=r&&(o[e].inAppShow.timesClicked+=1),null!=n&&(o[e].inAppShow.timesShowed+=1),null!=i&&(o[e].inAppShow.wasDismissed=!0)),s.push(o[e]);e.setItemStorage(JSON.stringify(s))}static deleteInApp(t){const r=this.getListInApp(),n=[];if(null!=r)for(let e=0;e<r.length;e++)r[e].inAppId!=t.inAppId&&n.push(r[e]);e.setItemStorage(JSON.stringify(n))}static findInAppFromInAppListWithInAppId(t,e){if(null!=t)for(let r=0;r<t.length;r++)if(t[r].inAppId&&t[r].inAppId==e)return t[r];return null}static findInAppFromInAppList(t,e){if(null!=t)for(let r=0;r<t.length;r++)if(t[r].schema&&t[r].schema.code&&t[r].schema.code==e)return t[r];return null}static findInAppFromInAppListWithInAppId(t,e){if(null!=t)for(let r=0;r<t.length;r++)if(t[r].inAppId&&t[r].inAppId==e)return t[r];return null}},h=class{constructor(t){this.URL="url",t.actionId&&(this.actionId=t.actionId),t.destroy&&(this.destroy=t.destroy),t.topics&&(this.topics=t.topics),t.type&&(this.type=t.type),t.url&&(this.url=t.url),t.no_action&&(this.no_action=t.no_action)}},d=class{constructor(t){if(t.cacheTtl&&(this.cacheTtl=t.cacheTtl),t.inAppId&&(this.inAppId=t.inAppId),t.showOnce&&(this.showOnce=t.showOnce),t.version&&(this.version=t.version),t.customData&&(this.customData=t.customData),t.creationDate?this.creationDate=t.creationDate:this.creationDate=x.getDate((new Date).getTime()),t.expiredDate)this.expiredDate=t.expiredDate;else{let t=36e5;this.cacheTtl&&(t=1e3*this.cacheTtl),this.expiredDate=x.getDate((new Date).getTime()+t)}t.schema&&(this.schema=new class{constructor(t){t.code&&(this.code=t.code),t.width&&(this.width=t.width),t.height&&(this.height=t.height)}}(t.schema)),t.properties&&(this.properties=new class{constructor(t){t.contentUrl&&(this.contentUrl=t.contentUrl),t.showTime&&(this.showTime=t.showTime),t.numberOfShows&&(this.numberOfShows=t.numberOfShows),t.numberOfClicks&&(this.numberOfClicks=t.numberOfClicks),t.dismissForever&&(this.dismissForever=t.dismissForever),t.layout&&(this.layout=new class{constructor(t){t.borderRadius&&(this.borderRadius=t.borderRadius)}}(t.layout)),t.action&&(this.action=new h(t.action))}setAction(t){this.action=t}}(t.properties)),this.inAppShow=new class{constructor(t){this.timesShowed=0,this.timesClicked=0,this.wasDismissed=!1,t&&(t.timesShowed&&(this.timesShowed=t.timesShowed),t.timesClicked&&(this.timesClicked=t.timesClicked),t.wasDismissed&&(this.wasDismissed=t.wasDismissed))}}(t.inAppShow)}},{BaseRequest:p}=r(872).Core.Api,{Config:y}=r(872).Core,v=class extends p{constructor(){super(),e.getDeviceId()?this.deviceId=e.getDeviceId():this.deviceId=x.generateDeviceId()}setEventType(t){this.eventType=t}setInAppId(t){this.inAppId=t}setActionId(t){this.actionId=t}setClickedButton(t){this.clickedButton=t}setLastVersionId(t){this.lastVersionId=t}setVersion(t){this.version=t}setDeviceId(t){this.deviceId=t}setPlatform(t){this.platform=t}postEventPrintRequest(){const t=this.fillJsonEventRequest();return this.body=t,this}postEventClickRequest(){const t=this.fillJsonEventRequest();return t.actionId=this.actionId,this.body=t,this}fillJsonEventRequest(){const t={};return t.deviceId=this.deviceId,e.getExternalId()&&(t.externalId=e.getExternalId()),t.inAppId=this.inAppId,t.platform=y.platform,t.version=this.version,t}postEventInAppRequest(){const t={};return t.inAppId=this.inAppId,t.lastVersionId=this.lastVersionId,t.deviceId=this.deviceId,this.eventType&&(t.eventType=this.eventType),t.platform=this.platform,t.clickedButton=this.clickedButton,this.body=t,this}},{BaseRequest:E}=r(872).Core.Api,g=class extends E{constructor(){super(),null!=e.getExternalId()&&(this.customerId=e.getExternalId()),null!=e.getDeviceId()&&(this.deviceId=e.getDeviceId())}setFields(t){this.fields=t}putCustomerFieldRequest(){return this.params=this.createQueryStringCustomerId(),this.body=this.createBodyJson(),this}createQueryStringCustomerId(){return this.PARAM_CUSTOMER_ID+"="+this.customerId}createBodyJson(){let t={};try{t.channel="inapp",this.device&&(t.deviceId=this.device.deviceId),this.customerId&&(t.customerId=this.customerId),this.fields&&(t=this.fields)}catch(t){console.log("Error fieldNames request :"+t)}return t}},{BaseRequest:m}=r(872).Core.Api,{Config:I}=r(872).Core,_=class extends m{constructor(){super()}setInAppId(t){this.inAppId=t}setVersion(t){this.version=t}setJsonForm(t){this.jsonForm=t}postForm(){return this.body=this.createBody(),this}createBody(){const t={};return e.getDeviceId()&&(t.deviceId=e.getDeviceId()),e.getExternalId()&&(t.externalCode=e.getExternalId()),this.jsonForm&&(t.form=this.jsonForm),t.inAppId=this.inAppId,t.platform=I.platform,t.version=this.version,t}},b=class{static sendEventPrint(t){const e=new v;e.setInAppId(t.inAppId),e.setVersion(t.version),V.postEventPrint(e)}static sendEventClick(t){const e=new v;e.setActionId(t.properties.action.actionId),e.setInAppId(t.inAppId),e.setVersion(t.version),V.postEventClick(e)}static sendEventForm(t,e,r){const n=new _;n.setVersion(e),n.setInAppId(t),n.setJsonForm(r),V.postEventForm(n)}static sendEventFormToCustomer(t){const e=new g;e.setFields(t),V.putCustomerField(e)}},{DeviceStatus:O,Device:S}=r(872).Core.Models,{BaseRequest:w}=r(872).Core.Api,P=class extends w{constructor(){super(),this.device=new S}postDeviceRequest(){return this.body=this.createDeviceJson(),this.status!==O.DEFAULT&&(this.body.enabled=1===this.status),this}createDeviceJson(){let t={};try{t=this.device.toJSON()}catch(t){console.log(t)}return t}},{Log:R,CryptoUtils:T,ErrorUtils:A,CorePermissions:N,CommonUtils:L}=r(872).Core.Utils,{EventType:D}=r(872).Core.Models,C="[IND]InAppUtils: ",x=class{constructor(){this.MONTH=24192e5}static async inAppWasShown(t,e,r,n,i){const o=new R(C);t.schema.code&&this.inAppWasGot(t.schema.code,e,(t=>{L.isFunction(i)&&i(t)}),(()=>{L.isFunction(i)&&i(t)}),((t,e)=>{o.d("inAppWasShown: "+t.inAppId+" with error: "+e.errorMessage).writeLog()}),r,n)}static async inAppWasGot(t,e,r,n,i,o,s){const a=f.searchInApp(t),u=(new Date).getTime();if(null!=a){const t=new d(a);if(u<new Date(t.expiredDate).getTime()){if(t.properties.dismissForever&&t.inAppShow.wasDismissed)return void(L.isFunction(i)&&i(t,A.showError(l,l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER)));{const e=t.properties.numberOfShows,r=t.inAppShow?t.inAppShow.timesShowed:null,n=t.properties.numberOfClicks,i=t.inAppShow?t.inAppShow.timesClicked:null;if(e>0){if(!(null!=r&&r<e))return void(L.isFunction(o)&&o(t,A.showError(l,l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES)));f.addInAppNewShow(t)}if(n>0&&null!=i&&i>=n)return void(L.isFunction(s)&&s(t,A.showError(l,l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES)))}return void(L.isFunction(r)&&r(t))}L.isFunction(e)&&e(t,A.showError(l,l.ErrorCode.INAPP_WAS_EXPIRED))}else L.isFunction(n)&&n()}static addNewInApp(t){f.addInApp(t)}static addNewInAppClick(t){t.properties.numberOfClicks&&t.properties.numberOfClicks>0&&f.addInAppNewClick(t),b.sendEventClick(t)}static addNewInApptoDismissForever(t){f.addInAppDismissForever(t)}static isInAppDismissForever(t){const e=f.searchInAppWithInAppId(t.inAppId);return!(null==e||!new d(e).inAppShow.wasDismissed)}static async registerLocation(){const t=new R(C);try{navigator.geolocation&&"prompt"===(await N.getPermissions()).location&&navigator.geolocation.getCurrentPosition((t=>{e.setLatitude(t.coords.latitude),e.setLongitude(t.coords.longitude)}),(r=>{t.e("error "+r).writeLog(),e.getPermissionLocation()||e.getPermissionLocation()==D.EVENT_TYPE_REJECT||e.setPermissionLocation(D.EVENT_TYPE_REJECT)}))}catch(e){t.e(e).writeLog()}}static generateDeviceId(){V.postDevice(new P,(t=>t),(t=>(console.log(t),null)))}static async setExternalCode(t){const r=e.getAppKey(),n=await T.createHmac(r,t);return e.setExternalId(n),n}static async convertToJSONArray(t){if(t&&""!=t)return await Promise.resolve(t).then((t=>JSON.parse(t)))}static getDate(t){const e=new Date(t);let r=""+(e.getMonth()+1),n=""+e.getDate();const i=e.getFullYear();let o=e.getHours(),s=e.getMinutes(),a=e.getSeconds();return r.length<2&&(r="0"+r),n.length<2&&(n="0"+n),o.length<2&&(o="0"+o),s.length<2&&(s="0"+s),a.length<2&&(a="0"+a),`${i}-${r}-${n} ${o}:${s}:${a}`}},{BaseClient:M}=r(872).Core.Api,{Config:k}=r(872).Core,{ErrorModel:B}=r(872).Core.Models,{CommonUtils:U,ErrorUtils:j}=r(872).Core.Utils,V=new class extends M{constructor(){super(),this.ENDPOINT_INAPP="/inapp",this.URL_BASE=k.client.URL_DEVICE_V2+this.ENDPOINT_INAPP,this.ENDPOINT_CAMPAIGN="/campaign",this.ENDPOINT_CAMPAIGN_TAG=this.ENDPOINT_CAMPAIGN+"/{tag}",this.ENDPOINT_DEVICE="/device",this.ENDPOINT_EVENT_INAPP="/event",this.ENDPOINT_EVENT_INAPP_PRINT=this.ENDPOINT_EVENT_INAPP+"/print",this.ENDPOINT_EVENT_INAPP_CLICK=this.ENDPOINT_EVENT_INAPP+"/click",this.ENDPOINT_EVENT_INAPP_FORM=this.ENDPOINT_EVENT_INAPP+"/form",this.ENDPOINT_DEVICE="/device",this.ENDPOINT_DEVICE_TOPICS=this.ENDPOINT_DEVICE+"/topics",this.ENDPOINT_CUSTOMER="/customer",this.ENDPOINT_CUSTOMER_FIELD=this.ENDPOINT_CUSTOMER+"/field",this.isCustomerRequest=!1,this.isDeviceRequest=!1}async getURL(){if(this.isCustomerRequest){this.isCustomerRequest=!1;const t=await e.getUrlInappApi(),r=t?.replaceAll("v2","v1");return r||k.client.CUSTOMER_URL_BASE}if(this.isDeviceRequest){this.isDeviceRequest=!1;const t=await e.getUrlInappApi(),r=t?.replaceAll("v2","v1");return r||k.client.URL_BASE}const t=await e.getUrlInappApi();return t?t+this.ENDPOINT_INAPP:this.URL_BASE}async getCampaignTag(t,e,r){const n=await this.get(this.ENDPOINT_CAMPAIGN_TAG,t.getCampaignTagRequest());if(n&&!(n instanceof B)&&n.data&&Object.keys(n.data).length>0){if(U.isFunction(e)){const t=new d(n.data);x.addNewInApp(t),e(t)}}else n?U.isFunction(r)&&r(n):U.isFunction(r)&&r(j.showError(l,l.ErrorCode.INAPP_ERROR_CONTENT_MESSAGE));return null}async getInAppTopics(t,e,r){if(s.isAppKeyFormat()){const n=await this.get(this.ENDPOINT_DEVICE_TOPICS,t.getDeviceTopicsRequest());if(!n||n instanceof B)n?U.isFunction(r)&&r(n):U.isFunction(r)&&r();else{const t=n.data.topics;U.isFunction(e)&&e(t)}}else U.isFunction(r)&&r(j.showError(l,l.ErrorCode.INAPP_GENERAL_ERROR));return!0}postEventClick(t){s.isAppKeyFormat()&&this.post(this.ENDPOINT_EVENT_INAPP_CLICK,t.postEventClickRequest())}postEventPrint(t){s.isAppKeyFormat()&&this.post(this.ENDPOINT_EVENT_INAPP_PRINT,t.postEventClickRequest())}postEventForm(t){s.isAppKeyFormat()&&this.post(this.ENDPOINT_EVENT_INAPP_FORM,t.postForm())}putCustomerField(t){s.isAppKeyFormat()&&(this.isCustomerRequest=!0,this.put(this.ENDPOINT_CUSTOMER_FIELD,t.putCustomerFieldRequest()))}async postDevice(t,r,n){if(s.isAppKeyFormat()){this.isDeviceRequest=!0;const i=await this.post(this.ENDPOINT_DEVICE,t.postDeviceRequest(),"include");!i||i instanceof B?i?U.isFunction(n)&&n(i):U.isFunction(n)&&n():(i.data.deviceId&&e.setDeviceId(i.data.deviceId),U.isFunction(r)&&r(i.data.deviceId))}else U.isFunction(n)&&n(j.showError(l,l.ErrorCode.INAPP_ERROR));return!0}},{BaseRequest:F}=r(872).Core.Api,Y=class extends F{constructor(){super(),this.PARAM_DEVICE_TYPE="deviceType",this.PARAM_EXTERNAL_CODE="externalCode",this.PARAM_BROWSER_NAME="browerName"}setTag(t){this.tag=t}getCampaignTagRequest(){return this.params=this.createQueryString(),this.pathParams["{tag}"]=this.tag,this}createQueryString(){let t="";return null!=e.getDeviceId()?t+=`${this.PARAM_DEVICE_ID}=${e.getDeviceId()}&`:x.generateDeviceId(),null!=e.getExternalId()&&(t+=`${this.PARAM_EXTERNAL_CODE}=${e.getExternalId()}&`),null!=e.getDeviceType()&&(t+=`${this.PARAM_DEVICE_TYPE}=${e.getDeviceType()}&`),null!=e.getBrowserName()&&(t+=`${this.PARAM_BROWSER_NAME}=${e.getBrowserName()}&`),null!=e.getLatitude()&&(t+=`${this.PARAM_LATITUDE}=${e.getLatitude()}&`),null!=e.getLongitude()&&(t+=`${this.PARAM_LONGITUDE}=${e.getLongitude()}&`),null!=e.getInAppTopics()&&0!==e.getInAppTopics().length&&(t+=`${this.PARAM_TOPICS}=${encodeURIComponent(e.getInAppTopics())}&`),t+=`${this.PARAM_PLATFORM}=webpush`,t}},{BaseRequest:G}=r(872).Core.Api,K=class extends G{constructor(){super()}getDeviceTopicsRequest(){return this.PARAM_DEVICE_ID+"="+e.getDeviceId()}},{CommonUtils:q,ErrorUtils:W}=r(872).Core.Utils,J=class{static saveTopics(t,r,n){if(t instanceof Array){let n=[];if(null!=e.getInAppTopics()&&(n=e.getInAppTopics()),0!==n.length){const e=t.filter((t=>!n.includes(t)));0!==e.length&&n.push(e)}else for(let e=0;e<t.length;e++)n.push(t[e]);e.setInAppTopics(n),q.isFunction(r)&&r(n)}else q.isFunction(n)&&n(W.showError(l,l.ErrorCode.INAPP_INSTANCE_TOPICS_ERROR))}static deleteTopics(t,r,n){if(t instanceof Array){let n=[];if(null!=e.getInAppTopics()&&(n=e.getInAppTopics()),0!==n.length){const r=t.filter((t=>!n.includes(t)));0!==r.length&&e.setInAppTopics(r)}q.isFunction(r)&&r(n)}else q.isFunction(n)&&n(W.showError(l,l.ErrorCode.INAPP_INSTANCE_TOPICS_ERROR))}},X=Object.freeze({TEXT:"text",NUMBER:"number",RADIO:"radio",CHECKBOX:"checkbox",SELECT:"select"}),H=class{constructor(t){if(t.id&&(this.id=t.id),t.name&&(this.name=t.name),t.type)switch(t.type){case"text":this.type=X.TEXT;break;case"checkbox":this.type=X.CHECKBOX;break;case"number":this.type=X.NUMBER;break;case"radio":this.type=X.RADIO;break;case"select":this.type=X.SELECT}t.required&&(this.required=t.required),t.sendToCustomer&&(this.sendToCustomer=t.sendToCustomer)}},{ErrorUtils:Q}=r(872).Core.Utils,z=class{static checkFieldsForm(t,e,r){const n=[];if(e&&t.inputs&&t.inputs.length>0)for(let r=0;r<t.inputs.length;r++){const i=this.checkInputType(t.inputs[r],e);null!=i&&n.push(i)}if(n.length>0)return n;e&&0!==Object.keys(e).length&&b.sendEventForm(t.inAppId,t.inappVersion,e),r&&0!==Object.keys(r).length&&b.sendEventFormToCustomer(r)}static checkInputType(t,e){if(null!=t.id)switch(t.type){case X.TEXT:if(t.required){if(!e[t.id])return Q.showError(l,2121,t.id);if(!e[t.id]instanceof String)return Q.showError(l,2120,`The field ${t.id} is not text`)}break;case X.NUMBER:if(t.required){if(!e[t.id])return Q.showError(l,2121,t.id);if(!e[t.id]instanceof String){if(!parseInt(e[t.id]))return Q.showError(l,2120,`The field ${t.id} is not number`)}else if(!e[t.id]instanceof int)return Q.showError(l,2120,`The field ${t.id} is not number`)}break;default:if(t.required&&e[t.id]&&""==e[t.id])return Q.showError(l,2121,t.id)}return null}static editingFormHtml(t,e){return t.replaceAll("InAppIndigitall.onClick",`inAppIndigitallOnClick_${e}`).replaceAll("InAppIndigitall.submit","inAppIndigitallSubmit").replaceAll("plusSlides",`plusSlides_${e}`).replaceAll("currentSlide",`currentSlide_${e}`).replaceAll("setNewInterval",`setNewInterval_${e}`).replaceAll("newSlide",`newSlide_${e}`).replaceAll("showSlides",`showSlides_${e}`)}},$=class{static onClick(t){if(t){const e=JSON.parse(t);let r;e.inAppId&&(r=e.inAppId),e.inappId&&(r=e.inappId);const n=f.searchInAppWithInAppId(r);if(n&&e.action){const t=new d(n),r=new h(e.action);if(t.properties.setAction(r),r.type==r.URL&&window.open(r.url),t){x.addNewInAppClick(t);const e=new CustomEvent("didClicked",{detail:{action:r},bubbles:!0,cancelable:!0,composed:!1});self.dispatchEvent(e)}}else console.log(`InApp ${e.schema} not found`)}else console.log("InApp action is empty")}static submit(t,e,r){if(t){const n=new class{constructor(t){if(t.inAppId&&(this.inAppId=t.inAppId),t.formId&&(this.formId=t.formId),t.inappVersion&&(this.inappVersion=t.inappVersion),t.inputs&&Array.isArray(t.inputs)){this.inputs=[];for(let e=0;e<t.inputs.length;e++)this.inputs.push(new H(t.inputs[e]))}}}(JSON.parse(t));if(e){const t=z.checkFieldsForm(n,JSON.parse(e),JSON.parse(r));if(t&&t.length>0){const e=new CustomEvent("didFormError",{detail:{errorList:t},bubbles:!0,cancelable:!0,composed:!1});self.dispatchEvent(e)}else{const t=new CustomEvent("didFormSubmit",{detail:{},bubbles:!0,cancelable:!0,composed:!1});self.dispatchEvent(t)}}}}},{ErrorUtils:Z,CommonUtils:tt,LogLevel:et}=r(872).Core.Utils;class rt{constructor(){this.LogLevel=et,this.inAppIndigitallInterface=$}static async init(t){null!=t.appKey&&e.setAppKey(t.appKey),t.urlInAppApi&&e.setUrlInappApi(t.urlInAppApi),t.logLevel&&e.setLogLevel(t.logLevel),!0===t.requestLocation&&x.registerLocation()}static async showInApp(t,r,n,i){const o={appKey:e.getAppKey(),urlInAppApi:"https://device-api.indigitall.com/v2",requestLocation:!0,logLevel:et.DEBUG,inAppCode:t,viewId:r};this.showInAppWithConfig(o,null,null,null,null,null,null,n,i,null,null)}static async showInAppWithConfig(t,e,r,n,i,o,a,u,c,f,h){await this.init(t),s.isAppKeyFormat()?x.inAppWasGot(t.inAppCode,r,(async r=>{r&&r.properties&&this.createInApp(r,t.viewId,a,u,c,e,f,h)}),(()=>{this.drawInApp(t.inAppCode,t.viewId,e,a,u,c,f,h)}),o,n,i):tt.isFunction(c)&&c(Z.showError(l,l.ErrorCode.BAD_REQUEST_SERVER_ERROR))}static showMultipleInApp(t,r,n,i){const o={appKey:e.getAppKey(),urlInAppApi:"https://device-api.indigitall.com/v2",requestLocation:!0,logLevel:et.DEBUG,inAppCodeList:t,divList:r};this.showMultipleInAppWithConfig(o,null,null,null,null,null,null,n,i,null,null)}static async showMultipleInAppWithConfig(t,e,r,n,i,o,a,u,c,f,h){if(await this.init(t),s.isAppKeyFormat()){if(t.inAppCodeList.length==t.divList.length&&t.inAppCodeList.length>0)for(var d=0;d<t.inAppCodeList.length;d++)x.inAppWasGot(t.inAppCodeList[d],r,(async r=>{r&&r.properties&&this.createInApp(r,t.divList[d],a,u,c,e,f,h)}),(()=>{rt.drawInApp(t.inAppCodeList[d],t.divList[d],e,a,u,c,f,h)}),o,n,i)}else tt.isFunction(c)&&c(Z.showError(l,l.ErrorCode.BAD_REQUEST_SERVER_ERROR))}static async drawInApp(t,e,r,n,i,o,s,a){this.getInApp(t,(async t=>{t&&t.properties&&this.createInApp(t,e,n,i,o,r,s,a)}),o)}static async createInApp(t,e,r,n,i,o,s,a){if(t&&t.properties&&t.properties.contentUrl)try{const i=document.getElementById(e);if(i){i.style.position="relative",i.style.overflow="hidden";const u=await fetch(t.properties.contentUrl),c=await u.text();let l=c;null!=t.customData&&Object.keys(t.customData).forEach((function(e){l=c.replaceAll(e,t.customData[e])})),t.version&&(l=l.replaceAll("'inappVersion':'{{version}}'","'inappVersion':"+t.version));const f=e.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,""),h=z.editingFormHtml(l,f);if(i.innerHTML=h,"undefined"===document.getElementById(`script_${f}`)||null===document.getElementById(`script_${f}`)){const t=document.createElement("script");t.id=`script_${f}`,t.type="text/javascript",t.innerHTML=new class{constructor(t,e){this.script=` \n var slideIndex_${e} = 1;\n var delta_${e} = 6;\n var startMove_${e} = null;\n var startMoveY_${e} = null; \n var diffX_${e};\n var diffY_${e};\n var timeSlide_${e} = 10000;\n\n var slider_${e} = document.getElementById("${t}").querySelector('.ind_slider-container-actions');\n var sliderTotal_${e} = document.getElementById("${t}").getElementsByClassName("ind_slideshow-item").length;\n\n showSlides_${e}(slideIndex_${e});\n\n var interval_${e} = setInterval(() => {\n newSlide_${e}();\n }, timeSlide_${e});\n\n if (slider_${e}){\n slider_${e}.addEventListener('touchstart', handleStart_${e}, false);\n slider_${e}.addEventListener('touchend', handleEnd_${e}, false);\n slider_${e}.addEventListener('mousedown', mouseStart_${e});\n slider_${e}.addEventListener('mouseup', mouseEnd_${e}); \n }\n\n\n function mouseStart_${e}(evt) {\n evt.preventDefault();\n startMove_${e} = evt.clientX;\n startMoveY_${e} = evt.clientY;\n }\n\n function mouseEnd_${e}(evt) {\n evt.preventDefault();\n var endMove = evt.clientX;\n var endMoveY = evt.clientY;\n setEndMove_${e}(endMove, endMoveY);\n }\n\n function handleStart_${e}(evt) {\n evt.preventDefault();\n startMove_${e} = evt.touches[0].clientX;\n startMoveY_${e} = evt.touches[0].clientY;\n }\n function handleEnd_${e}(evt) {\n evt.preventDefault();\n var endMove = evt.changedTouches[0].pageX;\n var endMoveY = evt.changedTouches[0].pageY;\n setEndMove_${e}(endMove, endMoveY);\n }\n\n function setEndMove_${e}(endMove, endMoveY) {\n diffX_${e} = Math.abs(endMove - startMove_${e});\n diffY_${e} = Math.abs(endMoveY - startMoveY_${e});\n if (startMove_${e} != null) {\n if (startMove_${e} > endMove) {\n slideIndex_${e}++;\n if (slideIndex_${e} > sliderTotal_${e}) {\n slideIndex_${e} = 1;\n }\n } else {\n if (slideIndex_${e} == 0) {\n slideIndex_${e} = sliderTotal_${e};\n } else {\n slideIndex_${e}--;\n }\n }\n showSlides_${e}(slideIndex_${e});\n setNewInterval_${e}();\n }\n }\n\n function plusSlides_${e}(n) {\n showSlides_${e}(slideIndex_${e} += n);\n setNewInterval_${e}();\n }\n\n function currentSlide_${e}(n) {\n showSlides_${e}(slideIndex_${e} = n);\n }\n\n function setNewInterval_${e}() {\n clearInterval(interval_${e});\n interval_${e} = setInterval(() => {\n newSlide_${e}();\n }, timeSlide_${e});\n }\n\n function newSlide_${e}(){\n slideIndex_${e}++;\n if (slideIndex_${e} > sliderTotal_${e}) {\n slideIndex_${e} = 1;\n }\n showSlides_${e}(slideIndex_${e});\n }\n\n function showSlides_${e}(n) {\n let view = document.getElementById("${t}");\n if (view) {\n let slides = view.getElementsByClassName("ind_slideshow-item");\n let i;\n let dots = view.getElementsByClassName("ind_dot");\n if (n > slides.length) {slideIndex_${e} = 1;}\n if (n < 1) {slideIndex_${e} = slides.length;}\n for (i = 0; i < slides.length; i++) {\n slides[i].style.display = "none";\n }\n for (i = 0; i < dots.length; i++) {\n dots[i].className = dots[i].className.replace(" active", "");\n }\n if (slides[slideIndex_${e}-1]) {\n slides[slideIndex_${e}-1].style.display = "block";\n }\n if (dots[slideIndex_${e}-1]) dots[slideIndex_${e}-1].className += " active";\n }\n }\n\n\n function inAppIndigitallOnClick_${e}(action) {\n if (diffX_${e} && diffY_${e}) {\n if (diffX_${e} < delta_${e} && diffY_${e} < delta_${e}) {\n indigitall.InApp.inAppOnClick(action);\n }\n } else {\n indigitall.InApp.inAppOnClick(action);\n }\n }\n\n function inAppIndigitallSubmit(formOptions) {\n const jsonForm = {}\n const jsonCustomer = {}\n const form = document.querySelector('[id="'+formOptions.formId+'"]');\n if (form) {\n formOptions.inputs.forEach((el) => {\n if (el.id !== 'undefined') {\n let value;\n if (el.type === 'text' || el.type === 'number') {\n if (form && form.querySelector('input[id^="'+el.id+'"]') && form.querySelector('input[id^="'+el.id+'"]').value !== 'undefined') {\n value = form.querySelector('input[id^="'+el.id+'"]').value;\n }\n }\n if (el.type === 'checkbox') {\n if (form && form.querySelectorAll('input[id^="'+el.id +'"]')) {\n let values = form.querySelectorAll('input[id^="'+el.id +'"]');\n var valuesChecked = [];\n for (var i = 0; i < values.length; i++) {\n if (values[i].checked && values[i].value !== 'undefined') {\n valuesChecked.push(values[i].value);\n }\n }\n value = valuesChecked;\n }\n }\n if (el.type === 'radio') {\n if (form && form.querySelectorAll('input[id^="'+el.id +'"]')) {\n let values = form.querySelectorAll('input[id^="'+el.id +'"]');\n var valuesChecked;\n for (var i = 0; i < values.length; i++) {\n if (values[i].checked && values[i].value !== 'undefined') {\n valuesChecked = values[i].value;\n }\n }\n value = valuesChecked;\n }\n }\n if (el.type === 'select') {\n if (form && form.querySelector('select[id^="'+el.id+'"]') && form.querySelector('select[id^="'+el.id+'"]').value !== 'undefined') {\n value = form.querySelector('select[id^="'+el.id+'"]').value;\n }\n }\n if (value) jsonForm[el.id] = value;\n if (el.sendToCustomer) jsonCustomer[el.id] = value;\n }\n });\n }\n indigitall.InApp.inAppSubmit(JSON.stringify(formOptions), JSON.stringify(jsonForm), JSON.stringify(jsonCustomer));\n }\n `,this.htmlTest="\n <!DOCTYPE html>\n <html lang=\"en\" dir=\"ltr\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width\" />\n <title>guille test</title>\n <style>\n html,\n body {\n margin: 0;\n padding: 0;\n height: 100%;\n width: 100%;\n }\n body p:first-child {\n margin: 0;\n }\n </style>\n </head>\n <body>\n \n <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n <html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n \x3c!--[if !mso]>\x3c!--\x3e\n \x3c!--[if (gte mso 9)|(IE)]>\x3c!--\x3e\n <link href=\"https://fonts.googleapis.com/css2?family=EB+Garamond&family=Merriweather&family=Montserrat&family=Open+Sans&family=Oswald&family=Playfair+Display&family=Raleway&family=Roboto&family=Roboto+Slab&family=Source+Sans+Pro&display=swap\" rel=\"stylesheet\">\n \x3c!--<![endif]--\x3e\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n \x3c!--<![endif]--\x3e\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <link href=\"http://fonts.cdnfonts.com/css/arial\" rel=\"stylesheet\">\n <link href=\"http://fonts.cdnfonts.com/css/courier-new\" rel=\"stylesheet\">\n <link href=\"http://fonts.cdnfonts.com/css/georgia-2\" rel=\"stylesheet\">\n <link href=\"http://fonts.cdnfonts.com/css/trebuchet-ms-2\" rel=\"stylesheet\">\n <link href=\"http://fonts.cdnfonts.com/css/verdana-pro-cond\" rel=\"stylesheet\">\n \n <link href=\"https://fonts.googleapis.com/css2?family=EB+Garamond&family=Merriweather&family=Montserrat&family=Open+Sans&family=Oswald&family=Playfair+Display&family=Raleway&family=Roboto&family=Roboto+Slab&family=Source+Sans+Pro&display=swap\" rel=\"stylesheet\">\n <title>InApp Sample</title>\n \n <style type=\"text/css\">\n html {\n width: 100%;\n height: 100%;\n }\n @font-face {\n font-family: 'Merriweather';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/merriweather/v28/u-440qyriQwlOrhSvowK_l5OeA.woff) format('woff');\n }\n @font-face {\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/montserrat/v23/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Ew9.woff) format('woff');\n }\n @font-face {\n font-family: 'Open Sans';\n font-style: normal;\n font-weight: 400;\n font-stretch: normal;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/opensans/v28/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0C4k.woff) format('woff');\n }\n @font-face {\n font-family: 'Oswald';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/oswald/v47/TK3_WkUHHAIjg75cFRf3bXL8LICs1_FvgUI.woff) format('woff');\n }\n @font-face {\n font-family: 'Playfair Display';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/playfairdisplay/v28/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvUDT.woff) format('woff');\n }\n @font-face {\n font-family: 'Raleway';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/raleway/v26/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaooCM.woff) format('woff');\n }\n @font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Me5g.woff) format('woff');\n }\n @font-face {\n font-family: 'Roboto Slab';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/robotoslab/v22/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISWaw.woff) format('woff');\n }\n @font-face {\n font-family: 'Source Sans Pro';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xK3dSBYKcSV-LCoeQqfX1RYOo3aPA.woff) format('woff');\n }\n @font-face {\n font-family: 'EB Garamond';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/ebgaramond/v24/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-6_RUAA.woff) format('woff');\n }\n /* latin-ext */\n @font-face {\n font-family: 'Merriweather';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/merriweather/v28/u-440qyriQwlOrhSvowK_l5-ciZMZ-Y.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Merriweather';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/merriweather/v28/u-440qyriQwlOrhSvowK_l5-fCZM.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/montserrat/v23/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw3aXpsog.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/montserrat/v23/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw5aXo.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Open Sans';\n font-style: normal;\n font-weight: 400;\n font-stretch: 100%;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/opensans/v28/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4uaVIGxA.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Open Sans';\n font-style: normal;\n font-weight: 400;\n font-stretch: 100%;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/opensans/v28/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Oswald';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/oswald/v47/TK3_WkUHHAIjg75cFRf3bXL8LICs1_FvsUhiZTaR.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Oswald';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/oswald/v47/TK3_WkUHHAIjg75cFRf3bXL8LICs1_FvsUZiZQ.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Playfair Display';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/playfairdisplay/v28/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvXDZbtPY_Q.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Playfair Display';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/playfairdisplay/v28/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvXDXbtM.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Raleway';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/raleway/v26/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCGPrEHJA.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Raleway';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/raleway/v26/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCIPrE.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Mu7GxKOzY.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Roboto';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Mu4mxK.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Roboto Slab';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/robotoslab/v22/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmYWRjRdE.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Roboto Slab';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/robotoslab/v22/BngbUXZYTXPIvIBgJJSb6s3BzlRRfKOFbvjojISmb2Rj.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'Source Sans Pro';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNq7lqDY.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'Source Sans Pro';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7l.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n /* latin-ext */\n @font-face {\n font-family: 'EB Garamond';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/ebgaramond/v24/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-6_RkCo9_S6w.woff2) format('woff2');\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin */\n @font-face {\n font-family: 'EB Garamond';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(https://fonts.gstatic.com/s/ebgaramond/v24/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-6_RkBI9_.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n }\n \n </style>\n <style>\n .slideshow-item {\n cursor: grabbing;\n scroll-snap-align: start;\n display: none; \n scroll-snap-type: x mandatory;\n scroll-behavior: smooth;\n -webkit-overflow-scrolling: touch; /* For mobile */\n -ms-overflow-style: none; /* For hide scrollbar */\n scrollbar-width: none; /* For hide scrollbar */\n }\n .slideshow-item-preview {\n cursor: grabbing;\n scroll-snap-align: start;\n display: block; \n scroll-snap-type: x mandatory;\n scroll-behavior: smooth;\n -webkit-overflow-scrolling: touch; /* For mobile */\n -ms-overflow-style: none; /* For hide scrollbar */\n scrollbar-width: none; /* For hide scrollbar */\n }\n img {vertical-align: middle;}\n \n /* Slideshow container */\n .slideshow-container {\n /* max-width: 1000px; */\n position: relative;\n margin: auto;\n -webkit-overflow-scrolling: touch; /* For mobile */\n }\n \n /* Next & previous buttons */\n .prev, .next {\n cursor: pointer;\n position: absolute;\n top: 50%;\n width: auto;\n padding: 16px;\n margin-top: -22px;\n color: white;\n font-weight: bold;\n font-size: 18px;\n transition: 0.6s ease;\n border-radius: 0 3px 3px 0;\n user-select: none;\n }\n \n /* Position the \"next button\" to the right */\n .next {\n right: 0;\n border-radius: 3px 0 0 3px;\n }\n \n /* On hover, add a black background color with a little bit see-through */\n .prev:hover, .next:hover {\n background-color: rgba(0,0,0,0.8);\n }\n \n .points {\n padding: 8px 12px;\n position: absolute;\n bottom: 8px;\n text-align: center;\n width:100%;\n }\n \n /* The dots/bullets/indicators */\n .dot {\n cursor: pointer;\n height: 15px;\n width: 15px;\n margin: 0 2px;\n background-color: #bbb;\n border-radius: 50%;\n display: inline-block;\n transition: background-color 0.6s ease;\n }\n \n .active, .dot:hover {\n background-color: #717171;\n }\n \n /* On smaller screens, decrease text size */\n @media only screen and (max-width: 300px) {\n .prev, .next,.text {font-size: 11px}\n }\n </style>\n \n </head>\n <body style=\"margin:0; height: 100%; width: 100%;\">\n <div style=\"\n background-color: rgba(244, 244, 244, 1);\n width: 100%;\n height: 100%;\n margin: 0 auto;\n \">\n \n <div style=\"\n display: flex;\n flexDirection: row;\n box-sizing: border-box;\n padding: 0px 0px 0px 0px ;\n margin: 0px 0px 0px 0px ;\n background-color: rgba(244, 244, 244, 0);\n border: 0px solid rgba(244, 244, 244, 0);\n width: 100%;\">\n \n <div style=\"\n width: 100%;\n \">\n \n <div style=\"\n margin: 0px 0px 0px 0px ;\n padding: 15px 15px 15px 15px ;\n background-color: rgba(244, 244, 244, 0);\n text-align: left;\n font-family: 'Roboto';\n \">\n \n <form id=\"5kZSrg6xbKyX\" class=\"form-style-1\">\n \n <style type=\"text/css\">\n .form-style-1 {\n }\n .form-style-1 li {\n padding: 0;\n display: block;\n list-style: none;\n margin: 10px 0 0 0;\n }\n .form-style-1 label{\n margin:0 0 3px 0;\n padding:0px;\n display:block;\n font-weight: bold;\n }\n .form-style-1 input[type=text], \n .form-style-1 input[type=date],\n .form-style-1 input[type=datetime],\n .form-style-1 input[type=number],\n .form-style-1 input[type=search],\n .form-style-1 input[type=time],\n .form-style-1 input[type=url],\n .form-style-1 input[type=email],\n textarea, \n select{\n box-sizing: border-box;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n border:1px solid #BEBEBE;\n padding: 7px;\n margin:0px;\n -webkit-transition: all 0.30s ease-in-out;\n -moz-transition: all 0.30s ease-in-out;\n -ms-transition: all 0.30s ease-in-out;\n -o-transition: all 0.30s ease-in-out;\n outline: none;\n }\n .form-style-1 input[type=text]:focus, \n .form-style-1 input[type=date]:focus,\n .form-style-1 input[type=datetime]:focus,\n .form-style-1 input[type=number]:focus,\n .form-style-1 input[type=search]:focus,\n .form-style-1 input[type=time]:focus,\n .form-style-1 input[type=url]:focus,\n .form-style-1 input[type=email]:focus,\n .form-style-1 textarea:focus, \n .form-style-1 select:focus{\n -moz-box-shadow: 0 0 8px #88D5E9;\n -webkit-box-shadow: 0 0 8px #88D5E9;\n box-shadow: 0 0 8px #88D5E9;\n border: 1px solid #88D5E9;\n }\n .form-style-1 .field-divided{\n width: 49%;\n }\n \n .form-style-1 .field-long{\n width: 100%;\n }\n .form-style-1 .field-select{\n width: 100%;\n }\n .form-style-1 .field-textarea{\n height: 100px;\n }\n \n .form-style-1 input[type=submit]:hover, .form-style-1 input[type=button]:hover{\n background: #4691A4;\n box-shadow:none;\n -moz-box-shadow:none;\n -webkit-box-shadow:none;\n }\n .form-style-1 input[type=radio]{\n transform: scale(1.2);\n }\n .form-style-1 input[type=checkbox]{\n transform: scale(1.2);\n }\n .form-style-1 .required{\n color:red;\n }\n </style>\n \n \n <div style=\"margin-top: 10px;\">\n <label>\n Escribe algo\n <span class=\"required\">*</span>\n </label>\n <input type=\"text\" name=\"algo\" id=\"algo\" required=\"true\" sendToCustomer=\"true\" style=\"width: 100%;\n padding: 12px 20px;\n margin: 8px 0;\n display: inline-block;\n border: 1px solid #ccc;\n border-radius: 4px;\n box-sizing: border-box;\">\n </div><div style=\"margin-top: 10px;\">\n <label style=\"\n margin:0 0 3px 0;\n padding:0px;\n display:block;\n \">\n Selecciona algo\n \n </label>\n <select style=\"width: 100%;\n padding: 12px 20px;\n margin: 8px 0;\n display: inline-block;\n border: 1px solid #ccc;\n border-radius: 4px;\n box-sizing: border-box;\" id=\"selector\" required=\"undefined\" sendToCustomer=\"true\">\n <option value=\"algo\">Algo</option><option value=\"masalgo\">Mas algo</option><option value=\"variosalgos\">Varios algos</option>\n </select>\n </div>\n <div style=\"\n margin-top: 10px;\n \">\n <label style=\"\n margin-bottom: 10px;\n \">\n ¿Cuál de las dos opciones te gusta más?\n \n </label>\n \n <div style=\"margin-bottom: 5px; display: flex; flex-direction: row; align-items: baseline; gap:0px;\">\n <input style=\"margin-right: 10px;\" type=\"radio\" id=\"radio0\" name=\"radio\" value=\"opcion1\"><label style=\"font-weight: 100; margin-right: 10px;\" for=\"radio0\">Opcion 1</label>\n </div>\n \n <div style=\"margin-bottom: 5px; display: flex; flex-direction: row; align-items: baseline; gap:0px;\">\n <input style=\"margin-right: 10px;\" type=\"radio\" id=\"radio1\" name=\"radio\" value=\"opcion2\"><label style=\"font-weight: 100; margin-right: 10px;\" for=\"radio1\">Opcion 2</label>\n </div>\n \n </div>\n \n <div style=\"margin-top: 10px;\">\n <label style=\"\n margin-bottom: 10px;\n \">\n Marca las casillas que quieras\n \n </label>\n \n <div style=\"display: flex; flex-direction: row; margin-bottom: 5px; align-items: flex-start;\">\n <input style=\"margin-right: 10px;\" type=\"checkbox\" id=\"casilla0\" name=\"casilla\" value=\"casilla1\"><label style=\"font-weight: 100; margin-right: 10px;\" for=\"casilla0\">Casilla 1</label>\n </div>\n \n <div style=\"display: flex; flex-direction: row; margin-bottom: 5px; align-items: flex-start;\">\n <input style=\"margin-right: 10px;\" type=\"checkbox\" id=\"casilla1\" name=\"casilla\" value=\"casilla2\"><label style=\"font-weight: 100; margin-right: 10px;\" for=\"casilla1\">Casilla 2</label>\n </div>\n \n </div>\n \n <tr style=\"\n display: block;\n text-align: left; \">\n <td style=\"\n display: inline-block;\n width: auto;\n padding: 15px 15px 15px 15px ;\n margin: 0px 0px 0px 0px ;\n background-color: rgba(244, 244, 244, 0);\">\n <div target=\"_blank\" rel=\"noreferrer\" onclick=\"InAppIndigitall.submit({'schemaId':217,'inAppId':22,'inputs':[{'type':'text','label':'Escribe algo','name':'algo','subtype':'text','required':true,'sendToCustomer':true,'id':'algo'},{'type':'select','label':'Selecciona algo','name':'selector','options':[{'name':'Algo','value':'algo'},{'name':'Mas algo','value':'masalgo'},{'name':'Varios algos','value':'variosalgos'}],'sendToCustomer':true,'id':'selector'},{'type':'radio','label':'¿Cuál de las dos opciones te gusta más?','name':'radio','options':[{'name':'Opcion 1','value':'opcion1'},{'name':'Opcion 2','value':'opcion2'}],'labelPosition':'right','id':'radio'},{'type':'checkbox','label':'Marca las casillas que quieras','options':[{'name':'Casilla 1','value':'casilla1'},{'name':'Casilla 2','value':'casilla2'}],'subtype':'right','name':'casilla','id':'casilla'}],'formId':'5kZSrg6xbKyX'})\" style=\"text-decoration: none; width: auto; cursor: pointer;\">\n <div style=\"\n padding: 8px 16px 8px 16px;\n width: auto;\n display: inline-block;\n text-align: left;\n background-color: rgba(200, 200, 200, 1);\n border-radius: 3px 3px 3px 3px;\n border: 0px solid transparent;\n box-sizing: border-box;\n margin-top: 15px;\">\n <span style=\"text-align: center; \"><span style=\"font-size: 16px\"><span style=\"font-family: Roboto, sans-serif !important\"><span style=\"color: #555555\"><span style=\"background-color: transparent\"><span style=\"letter-spacing: 0px;\">Botón</span></span></span></span></span></span>\n </div>\n </div>\n </td>\n </tr>\n \n </form>\n \n </div>\n \n </div>\n </div>\n </div>\n </body>\n </html>\n <script>\n // Created event\n var event = document.createEvent('Event');\n \n /* defined event 'click'.*/\n event.initEvent('click', true, true);\n \n // to assign event click.\n document.addEventListener('click', function (e) {\n window.parent.document.dispatchEvent(new CustomEvent('indigitall_on_click_inapp', {detail: {\n inAppId: 217,\n lastVersionId: 431,\n clickedButton: 'content',\n action: {\n type: 'url',\n url: 'https://indigitall.com'\n }\n }}));\n }, false);\n <\/script>\n </body>\n </html>\n \n "}}(e,f).script,i.appendChild(t)}if(self.addEventListener("didClicked",(function e(n){r&&r(t,n.detail.action),self.removeEventListener("didClicked",e)})),self.addEventListener("didFormError",(function e(r){s&&s(t,r.detail.errorList),self.removeEventListener("didFormError",e)})),self.addEventListener("didFormSubmit",(function e(r){a&&a(t),self.removeEventListener("didFormSubmit",e)})),t.properties.showTime){let e=0;const r=setInterval((function(){e++,e==parseInt(t.properties.showTime)&&(i.style.display="none",clearInterval(r),tt.isFunction(o)&&o(t,i,1e3*t.properties.showTime))}),1e3)}if(t.properties.layout&&t.properties.layout.borderRadius){const e=`${parseInt(t.properties.layout.borderRadius)}px`;i.style.borderRadius=e}tt.isFunction(n)&&n(t,i),b.sendEventPrint(t)}}catch(r){let n=null;t&&t.schema&&t.schema.code&&(n=t.schema.code),tt.isFunction(i)&&i(r,e,n)}}static topicsList(t,e){return V.getInAppTopics(new K,t,e),!0}static async topicsSubscribe(t,e,r){J.saveTopics(t,e,r)}static async topicsUnsubscribe(t,e,r){J.deleteTopics(t,e,r)}static inAppGet(t,e,r){this.getInApp(t,e,r)}static getInApp(t,e,r){if(s.isAppKeyFormat()){const n=new Y;n.setTag(t),V.getCampaignTag(n,e,r)}else tt.isFunction(r)&&r(Z.showError(l,l.ErrorCode.BAD_REQUEST_SERVER_ERROR))}static addNewInAppToDismissForever(t){x.addNewInApptoDismissForever(t)}static async isInAppDismissForever(t){x.isInAppDismissForever(t)}static async inAppOnClick(t){$.onClick(t)}static async inAppSubmit(t,e,r){$.submit(t,e,r)}static async inAppWasShown(t,e,r,n,i){x.inAppWasShown(t,e,r,n,i)}static async downloadHTML(t){const e=await fetch(t,{method:"GET"});console.log(e)}static async setExternalCode(t){return await x.setExternalCode(t)}}const nt=rt;window.indigitall||(window.indigitall={}),window.indigitall.InApp=rt,window.indigitall.InApp.Utils=x,window.indigitall.LogLevel=et})(),n})(),t.exports=e()},396:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}i.default=t,r&&r.set(t,i);return i}(r(899));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},301:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.2.4","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>M});var t={};r.r(t),r.d(t,{BaseClient:()=>_,BaseRequest:()=>b});var e={};r.r(e),r.d(e,{Channel:()=>O,Device:()=>S,DeviceStatus:()=>w,ErrorDictionary:()=>I,ErrorModel:()=>g,EventType:()=>P});var i={};r.r(i),r.d(i,{CommonUtils:()=>R,CorePermissions:()=>T,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>C,Log:()=>E,LogLevel:()=>p,Validations:()=>x});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,d=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getDeviceJson(){return c.getItem(this.DEVICE_JSON)}async setDeviceJson(t){c.setItem(this.DEVICE_JSON,t)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}},p=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=p;class v{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new d).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const E=v,g=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new g(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new g(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},_=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new E("[IND]BaseClient: ");let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\n").writeLog(),new g(n.statusCode,n.message))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},b=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new d).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},O=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),S=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new d).getBrowserPublicKey(),this.browserPrivateKey=(new d).getBrowserPrivateKey(),this.platform=(new d).getPlatform(),this.version=(new d).getVersion(),this.browserName=(new d).getBrowserName(),this.browserVersion=(new d).getBrowserVersion(),this.osName=(new d).getOsName(),this.osVersion=(new d).getOsVersion(),this.deviceType=(new d).getDeviceType(),(new d).getEnabled()&&(this.enabled="true"===(new d).getEnabled()),(new d).getExternalId()&&(this.externalCode=(new d).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new d).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new d).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}static setDeviceJson(t){(new d).setDeviceJson(JSON.stringify(t.toJSON()))}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},w=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),P=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=class{static isServiceTimestampExceed(){return!(new d).getServiceTimestamp()||(new d).getServiceSyncTime()<=(Date.now()-(new d).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},T=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new E("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},A=new E("[IND]Crypto"),N=new TextEncoder("utf-8"),L="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",N.encode(t),{name:L,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(L,n,N.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return A.d("hmac: ",s).writeLog(),s}catch(t){return void A.e("error:",t).writeLog()}}},C=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},x=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M={Repository:d,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(545)),i=a(r(358)),o=a(r(568)),s=a(r(801));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,a,u,l,d,p,y;return e=t,r=[{key:"getURL",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"call",value:(p=f(c().mark((function t(e,r,a,u){var l,f,h,d,p;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=new n.default("[IND]BaseClient: "),t.next=3,this.getURL();case 3:return t.t0=t.sent,t.t1=a.getPath(r),t.t2=t.t0+t.t1,t.t3=a.getParams(),f=t.t2+t.t3,a.isJourneyRequest()&&(f=f.replace("v1","v2")),h={method:e,headers:a.addHeaders()},e!==this.GET&&(h.body=JSON.stringify(a.getBody())),u&&(h.credentials=u),t.prev=12,t.next=15,fetch(f,h);case 15:return d=t.sent,t.next=18,d.json();case 18:if(p=t.sent,!d.ok){t.next=22;break}return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.statusCode+"\nResponse Message: "+p.message+"\nResponse Body:",JSON.stringify(p.data,null,"\t")).writeLog(),t.abrupt("return",p);case 22:return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.statusCode+"\nResponse Message: "+p.message+"\n").writeLog(),t.abrupt("return",new i.default(p.statusCode,p.message));case 26:return t.prev=26,t.t4=t.catch(12),l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 30:case"end":return t.stop()}}),t,this,[[12,26]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(d=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(l=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return l.apply(this,arguments)})},{key:"put",value:(u=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"delete",value:(a=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return a.apply(this,arguments)})}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version;var o=n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}});e.default=o},106:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}var h={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u};e.default=h},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.Channel=r;var n=r;e.default=n},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r,n;return e=t,n=[{key:"setDeviceJson",value:function(t){(new i.default).setDeviceJson(JSON.stringify(t.toJSON()))}}],(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=r},358:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=i},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}});var n=r(901),i=c(r(354)),o=c(r(202)),s=c(r(801)),a=c(r(358)),u=c(r(22));function c(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(){n=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof p?e:p,s=Object.create(i.prototype),a=new R(n||[]);return o(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&i.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(o,s,a,u){var c=h(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var s;o(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return s=s?s.then(i,i):i()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,o(I,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},795:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}var e,r,a,u,l,d,p,y,v,E,g,m,I;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.APP_KEY,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(E=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(y=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},{key:"getExternalIdRequest",value:(p=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return p.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getDeviceJson",value:(d=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.DEVICE_JSON));case 1:case"end":return t.stop()}}),t,this)}))),function(){return d.apply(this,arguments)})},{key:"setDeviceJson",value:(l=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.DEVICE_JSON,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getRegisteredByCookie",value:(u=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(a=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},636:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(){s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,u)}),(function(t){i("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="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},i(t)}function o(){o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(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,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h,d;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,s=null===(n=window)||void 0===n||null===(i=n.crypto)||void 0===i?void 0:i.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,s.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return a=t.sent,t.next=9,s.sign(l,a,c.encode(r));case 9:return f=t.sent,h=new Uint8Array(f),d=Array.prototype.map.call(h,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",d).writeLog(),t.abrupt("return",d);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.CryptoUtils=f;var h=f;e.default=h},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},970:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i;return e=t,i=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="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},s(t)}function a(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,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.LogLevel=r;var n=r;e.default=n},506:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(306)),i=f(r(897)),o=f(r(95)),s=f(r(568)),a=f(r(970)),u=f(r(545)),c=r(136),l=f(r(506));function f(t){return t&&t.__esModule?t:{default:t}}},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.2.4","_id":"indigitall-web-core@4.2.4","_inBundle":false,"_integrity":"sha512-XBgYKfMnDxWIfvgYuxJj4nZ9vJiZms1a2Hwe4CCuH06FnePS0wTbOBSP9QMLOOTj75PWrYEYlJECY5+/Yl5TgA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.2.4","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.2.4","saveSpec":null,"fetchSpec":"4.2.4"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.2.4.tgz","_shasum":"652eee30d5ee8be997152afce6b411c6c83946d3","_spec":"indigitall-web-core@4.2.4","_where":"/home/circleci/webpush/inbox","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.2.4"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{default:()=>D});const{Repository:t}=r(872).Core,e=new class extends t{constructor(){super(),this.AUTH_TOKEN=this.REPOSITORY+".AUTH_TOKEN",this.INBOX_AUTH_MODE=this.REPOSITORY+".INBOX_AUTH_MODE",this.URL_INBOX_API=this.REPOSITORY+".URL_INBOX_API"}async setDeviceId(t){this.setStorage(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}setAuthToken(t){this.setStorage(this.AUTH_TOKEN,t)}getAuthToken(){return this.getStorage(this.AUTH_TOKEN)}setInboxAuthMode(t){this.setStorage(this.INBOX_AUTH_MODE,t)}getInboxAuthMode(){return this.getStorage(this.INBOX_AUTH_MODE)}async getUrlInboxApi(){return this.getStorage(this.URL_INBOX_API)}async setUrlInboxApi(t){this.setStorage(this.URL_INBOX_API,t)}},{BaseClient:o}=r(872).Core.Api,{Config:s}=r(872).Core,{ErrorModel:a}=r(872).Core.Models,{CommonUtils:u}=r(872).Core.Utils,c=new class extends o{constructor(){super(),this.URL_BASE=s.client.INBOX_URL_BASE,this.ENDPOINT_INBOX_NOTIFICATIONS="/notification",this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID=this.ENDPOINT_INBOX_NOTIFICATIONS+"/{sendingId}",this.ENDPOINT_INBOX_COUNTER="/counters",this.ENDPOINT_INBOX_AUTH="/auth/webhook"}async getURL(){return await e.getUrlInboxApi()||this.URL_BASE}async postInboxAuth(t,r,n){const i=await this.post(this.ENDPOINT_INBOX_AUTH,t.postInboxAuth());if(!i||i instanceof a||!i.data)i?u.isFunction(n)&&n(i):u.isFunction(n)&&n();else{const t=i.data.token;e.setAuthToken(t),u.isFunction(r)&&r(i)}return!0}async getInbox(t,e,r){const n=await this.get(this.ENDPOINT_INBOX_NOTIFICATIONS,t.getInboxPushRequest());return this.getInboxResponseStatus(n,e,r),!0}async putInboxPush(t,e,r){const n=await this.put(this.ENDPOINT_INBOX_NOTIFICATIONS,t.putInboxPushRequest());return this.getInboxResponseEdit(n,e,r),!0}async getInboxPushWithSendingId(t,e,r,n){const i=await this.get(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,t.getInboxPushRequestWithSendingId());return this.getNotificationResponseStatus(i,e,r,n),!0}async putInboxPushWithSendingId(t,e,r,n){const i=await this.put(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,t.putInboxWithSendingId());return this.getNotificationResponseStatus(i,e,r,n),!0}async getInboxCounter(t,e,r){const n=await this.get(this.ENDPOINT_INBOX_COUNTER,t.getCounter());this.getCounterStatus(n,e,r)}async getInboxResponseStatus(t,e,r){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const r=new D(t.data);u.isFunction(e)&&e(r)}else t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}async getInboxResponseEdit(t,e,r){t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300?u.isFunction(e)&&e():t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}getNotifications(t,e){const r=[];for(let n=0;n<t.length;n++){null!=t[n].sentAt&&null!=e&&t[n].sentAt<e&&(read=!0);const i=new InboxNotification(t[n],e);r.push(i)}return r}async getNotificationResponseStatus(t,e,r,n){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const t=new InboxNotification(notifications[i],e);u.isFunction(r)&&r(t)}else t?u.isFunction(n)&&n(t):u.isFunction(n)&&n()}async getCounterStatus(t,e,r){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const r={click:t.data.click,sent:t.data.sent,deleted:t.data.deleted,unread:this.getUnreadCounters(t.data.unread)};u.isFunction(e)&&e(r)}else t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}getUnreadCounters(t){return{count:t.count,lastAccess:t.lastAccess}}},{BaseRequest:l}=r(872).Core.Api,f=class extends l{constructor(){super()}postInboxAuth(){return this.body=this.json,this}setJson(t){this.json=t}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}},h=Object.freeze({SENT:"sent",CLICK:"click",DELETED:"deleted"});window.inboxStatus=h;const d=h,p=Object.freeze({NONE:"none",DEFAULT:"default",WEBHOOK:"webhook"}),{BaseRequest:y}=r(872).Core.Api,v=class extends y{constructor(){super(),null!=e.getExternalId()&&(this.externalId=e.getExternalId()),null!=e.getAuthToken()&&e.getInboxAuthMode()==p.WEBHOOK&&(this.headers.Authorization="Bearer "+e.getAuthToken()),this.sendingId="",this.sendingIds=null,this.page=0,this.pageSize=0,this.dateFrom="",this.dateTo="",this.status=d.INBOXSTATUS_SENT,this.statusList=null}getInboxPushRequest(){return this.params=this.createQueryString(),this}putInboxPushRequest(){return this.params=this.createQueryStringExternalId(),this.body=this.createBodyJson(),this}getInboxPushRequestWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this}putInboxWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this.body=this.createBodyStatusJson(),this}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}createQueryString(){let t="";if(this.page&&(t+=this.PARAM_INBOX_PAGE+"="+this.page+"&"),this.pageSize&&(t+=this.PARAM_INBOX_PAGE_SIZE+"="+this.pageSize+"&"),this.dateFrom&&(t+=this.PARAM_INBOX_DATE_FROM+"="+this.dateFrom+"&"),this.dateTo&&(t+=this.PARAM_INBOX_DATE_TO+"="+this.dateTo+"&"),this.statusList){let e="";for(let t=0;t<this.statusList.length;t++)e+=this.statusList[t],t!=this.statusList.length-1&&(e+=",");t+=this.PARAM_INBOX_STATUS+"="+e+"&"}return t+this.createQueryStringExternalId()}createQueryStringExternalId(){return this.PARAM_INBOX_EXTERNALID+"="+this.externalId}createBodyJson(){let t={};const e=[];try{if(t=this.createBodyStatusJson(),this.sendingIds)for(let t=0;t<this.sendingIds.length;t++)e.push(this.sendingIds[t]);t.sendingIds=e}catch(t){console.log("Error Inbox request :"+t)}return t}createBodyStatusJson(){const t={};return this.status&&(t.status=this.status),t}setSendingId(t){this.sendingId=t}setSendingIds(t){this.sendingIds=t}setPage(t){this.page=t}setPageSize(t){this.pageSize=t}setDateFrom(t){this.dateFrom=t}setDateTo(t){this.dateTo=t}setStatus(t){this.status=t}setStatusList(t){this.statusList=t}},{BaseRequest:E}=r(872).Core.Api,g=class extends E{constructor(){super(),null!=e.getExternalId()&&(this.externalId=e.getExternalId()),null!=e.getAuthToken()&&e.getInboxAuthMode()==p.WEBHOOK&&(this.headers.Authorization="Bearer "+e.getAuthToken())}getCounter(){return this.params=this.createQueryStringExternalId(),this}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}createQueryStringExternalId(){return this.PARAM_INBOX_EXTERNALID+"="+this.externalId}};class m{constructor(t,e){t&&(t.id&&(this.id=t.id),t.externalId&&(this.externalId=t.externalId),t.sentAt&&(this.sentAt=t.sentAt),t.status&&(this.status=t.status),t.sendingId&&(this.sendingId=t.sendingId),t.message&&(this.message=t.message),t.campaignId&&(this.campaignId=t.campaignId),this.read=!1,this.sentAt&&e&&this.sentAt<e&&(this.read=!0))}}window.inboxNotification=m;const I=m,{ErrorDictionary:_}=r(872).Core.Models,b=_.ErrorCode;Object.assign(b,{INBOX_GET_ERROR:3001,INBOX_GET_PAGE_ERROR:3011,INBOX_EXTERNAL_ID_NO_REGISTERED:3012,INBOX_NO_MESSAGES:3013,INBOX_IS_REQUESTING_PAGE:3014,INBOX_EMPTY:3015,INBOX_GENERAL_ERROR:3600});const O=_.ErrorMessage;Object.assign(O,{INBOX_GET_ERROR:"inbox GET request error",INBOX_GET_PAGE_ERROR:"error inbox get page",INBOX_EXTERNAL_ID_NO_REGISTERED:"external Id is not registered",INBOX_NO_MESSAGES:"There are no more messages on Inbox",INBOX_IS_REQUESTING_PAGE:"Wait. Is Requesting new page",INBOX_EMPTY:"There are no messages on Inbox",INBOX_GENERAL_ERROR:"general error"});const S={ErrorCode:b,ErrorMessage:O},{Validations:w,Log:P}=r(872).Core.Utils,R=class extends w{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new P("[IND]InboxValidations: "),r=e.getDeviceId();let n=!0;return this.isAppKeyFormat()||(n=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(r)||(n=!1,t.w("deviceId is null or empty").writeLog()),n}},{CommonUtils:T,ErrorUtils:A,Log:N}=r(872).Core.Utils;class L{constructor(t){if(t){if(t.lastAccess&&(this.lastAccess=t.lastAccess),t.numPage?this.page=t.numPage:this.page=0,t.pageSize&&(this.pageSize=t.pageSize),t.count&&(this.count=t.count),t.notifications){this.notifications=[];const e=t.notifications;for(let t=0;t<e.length;t++){const r=new I(e[t],this.lastAccess);this.notifications.push(r)}}this.totalPages=Math.trunc(this.count/this.pageSize)}this.dateFrom=null,this.dateTo=null,this.statusList=null,this.newNotifications=[I],this.isRequestingPage=!1}static generateAuthToken(t,e){let r={};navigator.indigitallGetAuthConfig&&T.isFunction(navigator.indigitallGetAuthConfig)&&(r=navigator.indigitallGetAuthConfig());const n=new f;n.setJson(r),c.postInboxAuth(n,t,e)}static getInboxMessagesCount(t,e,r){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getMessagesCount(e,r)}static setUrlInboxApi(t){e.setUrlInboxApi(t)}static setInboxAuthMode(t){e.setInboxAuthMode(t)}static getMessagesCount(t,r){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new g;c.getInboxCounter(e,t,(r=>{401===r.errorCode?this.generateAuthToken((()=>{c.getInboxCounter(e,t,r)}),r):T.isFunction(r)&&r(r)}))}else T.isFunction(r)&&r(A.showError(S,S.ErrorCode.INBOX_GET_ERROR));else T.isFunction(r)&&r(A.showError(S,S.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}static getInbox(t,e,r){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getInbox(e,r)}static getInbox(t,e){L.getInboxWithPage(null,null,null,null,null,t,e)}static getInboxWithPage(t,e,r,n,i,o,s,a){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getInboxWithPage(e,r,n,i,o,s,a)}static getInboxWithPage(t,r,n,i,o,s,a){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new v;t&&e.setPage(t),r&&e.setPageSize(r),n&&(e.setDateFrom(n),this.dateFrom=n),i&&(e.setDateTo(i),this.dateTo=i),o&&(e.setStatusList(o),this.statusList=o),c.getInbox(e,(t=>{this.totalPages=t.totalPages,0!=t.count?T.isFunction(s)&&s(t):T.isFunction(a)&&a(A.showError(S,S.ErrorCode.INBOX_GET_PAGE_ERROR))}),(t=>{401==t.errorCode?this.generateAuthToken((()=>{c.getInbox(e,(t=>{this.totalPages=t.totalPages,T.isFunction(s)&&s(t)}),t)}),t):T.isFunction(t)&&t(t)}))}else T.isFunction(a)&&a(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(a)&&a(A.showError(S,S.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}getNextPage(t,r){const n=new N("[IND]Inbox: ");if(this.isRequestingPage)n.w(S.ErrorMessage.INBOX_IS_REQUESTING_PAGE).writeLog();else if(this.isRequestingPage=!0,this.page+1<this.totalPages)if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new v;(this.page||0==this.page)&&e.setPage(this.page+1),this.pageSize&&e.setPageSize(this.pageSize),this.dateFrom&&e.setDateFrom(this.dateFrom),this.dateTo&&e.setDateTo(this.dateTo),this.statusList&&e.setStatusList(this.statusList),c.getInbox(e,(e=>{this.notifications=this.notifications.concat(e.notifications),this.newNotifications=e.notifications,this.lastAccess=e.lastAccess,this.count=e.count,this.page=e.page,this.pageSize=e.pageSize,this.totalPages=e.totalPages,this.isRequestingPage=!1,T.isFunction(t)&&t(this,this.newNotifications)}),(r=>{401===r.errorCode?this.generateAuthToken((()=>{c.getInbox(e,(e=>{this.notifications=this.notifications.concat(e.notifications),this.newNotifications=e.notifications,this.lastAccess=e.lastAccess,this.count=e.count,this.page=e.page,this.pageSize=e.pageSize,this.totalPages=e.totalPages,this.isRequestingPage=!1,T.isFunction(t)&&t(this,this.newNotifications)}),r)}),r):(this.isRequestingPage=!1,T.isFunction(r)&&r())}))}else this.isRequestingPage=!1,T.isFunction(r)&&r(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(r)&&r(A.showError(S,S.ErrorCode.GENERAL_ERROR_BAD_REQUEST));else this.isRequestingPage=!1,T.isFunction(r)&&r(A.showError(S,S.ErrorCode.INBOX_NO_MESSAGES))}massiveEditNotifications(t,r,n,i){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t&&r){const e=new v;e.setSendingIds(t),e.setStatus(r),c.putInboxPush(e,n,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPush(e,n,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(i)&&i(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(i)&&i(A.showError(S,S.ErrorCode.BAD_REQUEST_SERVER_ERROR))}getInfoFromNotification(t,r,n){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t){const e=new v;e.setSendingId(t),c.getInboxPushWithSendingId(e,this.lastAccess,r,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.getInboxPushWithSendingId(e,this.lastAccess,r,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(n)&&n(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(n)&&n(A.showError(S,S.ErrorCode.BAD_REQUEST_SERVER_ERROR))}modifyStatusFromNotification(t,r,n,i){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t&&r){const e=new v;e.setSendingId(t),e.setStatus(r),c.putInboxPushWithSendingId(e,this.lastAccess,n,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPushWithSendingId(e,this.lastAccess,n,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(i)&&i(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(i)&&i(A.showError(S,S.ErrorCode.BAD_REQUEST_SERVER_ERROR))}}const D=L})(),n})(),t.exports=e()},277:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}i.default=t,r&&r.set(t,i);return i}(r(301));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},735:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}i.default=t,r&&r.set(t,i);return i}(r(794));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},794:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.2.4","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>M});var t={};r.r(t),r.d(t,{BaseClient:()=>_,BaseRequest:()=>b});var e={};r.r(e),r.d(e,{Channel:()=>O,Device:()=>S,DeviceStatus:()=>w,ErrorDictionary:()=>I,ErrorModel:()=>g,EventType:()=>P});var i={};r.r(i),r.d(i,{CommonUtils:()=>R,CorePermissions:()=>T,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>C,Log:()=>E,LogLevel:()=>p,Validations:()=>x});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,d=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getDeviceJson(){return c.getItem(this.DEVICE_JSON)}async setDeviceJson(t){c.setItem(this.DEVICE_JSON,t)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}},p=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=p;class v{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new d).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const E=v,g=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new g(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new g(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},_=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new E("[IND]BaseClient: ");let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\n").writeLog(),new g(n.statusCode,n.message))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},b=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new d).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},O=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),S=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new d).getBrowserPublicKey(),this.browserPrivateKey=(new d).getBrowserPrivateKey(),this.platform=(new d).getPlatform(),this.version=(new d).getVersion(),this.browserName=(new d).getBrowserName(),this.browserVersion=(new d).getBrowserVersion(),this.osName=(new d).getOsName(),this.osVersion=(new d).getOsVersion(),this.deviceType=(new d).getDeviceType(),(new d).getEnabled()&&(this.enabled="true"===(new d).getEnabled()),(new d).getExternalId()&&(this.externalCode=(new d).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new d).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new d).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}static setDeviceJson(t){(new d).setDeviceJson(JSON.stringify(t.toJSON()))}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},w=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),P=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=class{static isServiceTimestampExceed(){return!(new d).getServiceTimestamp()||(new d).getServiceSyncTime()<=(Date.now()-(new d).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},T=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new E("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},A=new E("[IND]Crypto"),N=new TextEncoder("utf-8"),L="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",N.encode(t),{name:L,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(L,n,N.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return A.d("hmac: ",s).writeLog(),s}catch(t){return void A.e("error:",t).writeLog()}}},C=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},x=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M={Repository:d,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=u(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(545)),i=a(r(358)),o=a(r(568)),s=a(r(801));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,a,u,l,d,p,y;return e=t,r=[{key:"getURL",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"call",value:(p=f(c().mark((function t(e,r,a,u){var l,f,h,d,p;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=new n.default("[IND]BaseClient: "),t.next=3,this.getURL();case 3:return t.t0=t.sent,t.t1=a.getPath(r),t.t2=t.t0+t.t1,t.t3=a.getParams(),f=t.t2+t.t3,a.isJourneyRequest()&&(f=f.replace("v1","v2")),h={method:e,headers:a.addHeaders()},e!==this.GET&&(h.body=JSON.stringify(a.getBody())),u&&(h.credentials=u),t.prev=12,t.next=15,fetch(f,h);case 15:return d=t.sent,t.next=18,d.json();case 18:if(p=t.sent,!d.ok){t.next=22;break}return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.statusCode+"\nResponse Message: "+p.message+"\nResponse Body:",JSON.stringify(p.data,null,"\t")).writeLog(),t.abrupt("return",p);case 22:return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.statusCode+"\nResponse Message: "+p.message+"\n").writeLog(),t.abrupt("return",new i.default(p.statusCode,p.message));case 26:return t.prev=26,t.t4=t.catch(12),l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 30:case"end":return t.stop()}}),t,this,[[12,26]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(d=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(l=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return l.apply(this,arguments)})},{key:"put",value:(u=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"delete",value:(a=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return a.apply(this,arguments)})}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version;var o=n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}});e.default=o},106:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}var h={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u};e.default=h},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.Channel=r;var n=r;e.default=n},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r,n;return e=t,n=[{key:"setDeviceJson",value:function(t){(new i.default).setDeviceJson(JSON.stringify(t.toJSON()))}}],(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}};e.default=r},358:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=i},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}});var n=r(901),i=c(r(354)),o=c(r(202)),s=c(r(801)),a=c(r(358)),u=c(r(22));function c(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(){n=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof p?e:p,s=Object.create(i.prototype),a=new R(n||[]);return o(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&i.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(o,s,a,u){var c=h(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var s;o(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return s=s?s.then(i,i):i()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,o(I,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},795:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}var e,r,a,u,l,d,p,y,v,E,g,m,I;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.APP_KEY,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(E=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(y=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},{key:"getExternalIdRequest",value:(p=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return p.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getDeviceJson",value:(d=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.DEVICE_JSON));case 1:case"end":return t.stop()}}),t,this)}))),function(){return d.apply(this,arguments)})},{key:"setDeviceJson",value:(l=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.DEVICE_JSON,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getRegisteredByCookie",value:(u=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(a=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},636:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(){s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,u)}),(function(t){i("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="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},i(t)}function o(){o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(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,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h,d;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,s=null===(n=window)||void 0===n||null===(i=n.crypto)||void 0===i?void 0:i.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,s.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return a=t.sent,t.next=9,s.sign(l,a,c.encode(r));case 9:return f=t.sent,h=new Uint8Array(f),d=Array.prototype.map.call(h,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",d).writeLog(),t.abrupt("return",d);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.CryptoUtils=f;var h=f;e.default=h},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},970:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,i;return e=t,i=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="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},s(t)}function a(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,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.LogLevel=r;var n=r;e.default=n},506:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(306)),i=f(r(897)),o=f(r(95)),s=f(r(568)),a=f(r(970)),u=f(r(545)),c=r(136),l=f(r(506));function f(t){return t&&t.__esModule?t:{default:t}}},301:function(t){var e;e=()=>(()=>{var t={153:function(t){var e;e=()=>(()=>{"use strict";var t={147:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.2.4","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"scripts":{"test":"echo \'There are not tests\'","public":"ws --directory ./public --port 80 --log.format dev","build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{default:()=>M});var t={};r.r(t),r.d(t,{BaseClient:()=>_,BaseRequest:()=>b});var e={};r.r(e),r.d(e,{Channel:()=>O,Device:()=>S,DeviceStatus:()=>w,ErrorDictionary:()=>I,ErrorModel:()=>g,EventType:()=>P});var i={};r.r(i),r.d(i,{CommonUtils:()=>R,CorePermissions:()=>T,CryptoUtils:()=>D,ErrorUtils:()=>m,JsonUtils:()=>C,Log:()=>E,LogLevel:()=>p,Validations:()=>x});var o={platform:"webpush",version:"0.0.1"};const s=r(147);o.version=s.version;const a=o=Object.assign(o,{client:{URL_BASE:"https://device-api.indigitall.com/v1",URL_DEVICE_V2:"https://device-api.indigitall.com/v2",INAPP_URL_BASE:"https://inapp-api.indigitall.com/v1",INBOX_URL_BASE:"https://inbox-api.indigitall.com/v1",CUSTOMER_URL_BASE:"https://device-api.indigitall.com/v2"}}),u=new class{constructor(){this.storage=this.isLocalStorageAvailable()?window.localStorage:null}isLocalStorageAvailable(){try{const t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==u.length}return!1}setItem(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}getItem(t){return null!=this.storage?this.storage.getItem(t):null}deleteItem(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}clear(){this.storage&&this.storage.clear()}},c=u,l=new class{constructor(){this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}async getDB(){return new Promise(((t,e)=>{const r=this.IDB;if(r){const n=r.open("indigitall.indexedDB",1);n.onupgradeneeded=function(){n.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},n.onsuccess=function(){const e=n.result,r=e.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");t({db:e,tx:r,store:i,index:o})},n.onerror=function(t){e(t)}}else e(!1)}))}async get(t,e){return new Promise(((r,n)=>{t||n(!1),t.index.get(e).onsuccess=e=>{e.target.result&&(this.close(t),r(e.target.result.store.value)),n(!1)}}))}async put(t,e,r){return new Promise(((n,i)=>{t||i(!1),t.store.put({store:{key:e,value:r}},e).onsuccess=e=>{this.close(t),n(r)}}))}close(t){if(t.tx)try{t.tx.oncomplete=()=>{t.db.close()}}catch(t){console.error(this.TAG,t)}}async setItem(t,e){try{const r=await this.getDB();return this.put(r,t,e)}catch(t){return t}}async getItem(t){try{const e=await this.getDB();return this.get(e,t)}catch(t){return t}}},f=new class{constructor(){this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}isSessionStorageAvailable(){try{const t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==f.length}return!1}getItem(t){return null!=this.session?this.session.getItem(t):null}setItem(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}clearMessages(){this.session&&this.session.removeItem("messages")}},h=f,d=class{constructor(){this.storage=c,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}setItemSessionStorage(t,e){h.setItem(t,e)}getItemSessionStorage(t){return h.getItem(t)}clearSessionStorage(){h.clearMessages()}setStorage(t,e){c.setItem(t,e)}getStorage(t){return c.getItem(t)}clearStorage(){c.clear()}setBrowserPublicKey(t){c.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return c.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){c.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return c.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){c.setItem(this.APP_KEY,t)}getAppKey(){return c.getItem(this.APP_KEY)}setVAPID(t){c.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return c.getItem(this.VAPID_PUBLIC)}setEnabled(t){c.setItem(this.ENABLED,t)}getEnabled(){return c.getItem(this.ENABLED)}setServiceSyncTime(t){c.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return c.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){c.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return c.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){c.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return c.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){c.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!c&&c.getItem(this.REQUEST_LOCATION)}async setPlatform(t){c.setItem(this.PLATFORM,t)}getPlatform(){return c&&c.getItem(this.PLATFORM)||a.platform}getVersion(){return a.version}async setBrowserName(t){c.setItem(this.BROWSER_NAME,t)}getBrowserName(){return c.getItem(this.BROWSER_NAME)}setBrowserVersion(t){c.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return c.getItem(this.BROWSER_VERSION)}async setOsName(t){c.setItem(this.OS_NAME,t)}getOsName(){return c.getItem(this.OS_NAME)}setOsVersion(t){c.setItem(this.OS_VERSION,t)}getOsVersion(){return c.getItem(this.OS_VERSION)}setDeviceType(t){c.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return c.getItem(this.DEVICE_TYPE)}setSupported(t){c.setItem(this.SUPPORTED,t)}getSupported(){return c.getItem(this.SUPPORTED)}setServiceTimestamp(t){c.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return c.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){c.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return c.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){c.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return c.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){c.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==c.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){c.setItem(this.LOG_LEVEL,t)}getLogLevel(){return c.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){c.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return c.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){c&&c.isLocalStorageAvailable()&&c.setItem(this.EXTERNAL_ID,t),l&&l.IDB&&await l.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{c&&c.isLocalStorageAvailable()?t=c.getItem(this.EXTERNAL_ID):l&&l.IDB&&(t=await l.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){c.setItem(this.EXTERNAL_ID,t)}getExternalId(){return c.getItem(this.EXTERNAL_ID)}async getDeviceJson(){return c.getItem(this.DEVICE_JSON)}async setDeviceJson(t){c.setItem(this.DEVICE_JSON,t)}async getRegisteredByCookie(){return c.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){c.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){c.setItem(this.LATITUDE,t)}getLatitude(){return c.getItem(this.LATITUDE)}setLongitude(t){c.setItem(this.LONGITUDE,t)}getLongitude(){return c.getItem(this.LONGITUDE)}},p=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=p;class v{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=y.INFO,this.setLogLevel((new d).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=y.DEBUG&&t<=y.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=y.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}i(){if(this.level<=y.INFO)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}w(){if(this.level<=y.WARNING)for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=v.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const E=v,g=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=r)}},m=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new g(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new g(GENERAL_ERROR,"general error",r)}}},I={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}},_=class{constructor(){this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}async getURL(){return this.URL_BASE}async call(t,e,r,n){const i=new E("[IND]BaseClient: ");let o=await this.getURL()+r.getPath(e)+r.getParams();r.isJourneyRequest()&&(o=o.replace("v1","v2"));const s={method:t,headers:r.addHeaders()};t!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);try{const e=await fetch(o,s),n=await e.json();return e.ok?(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\nResponse Body:",JSON.stringify(n.data,null,"\t")).writeLog(),n):(i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+n.statusCode+"\nResponse Message: "+n.message+"\n").writeLog(),new g(n.statusCode,n.message))}catch(e){return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+e).writeLog(),m.showError(I,I.ErrorCode.GENERAL_ERROR,e)}}async get(t,e){return await this.call(this.GET,t,e)}async post(t,e,r){return await this.call(this.POST,t,e,r)}async put(t,e,r){return await this.call(this.PUT,t,e,r)}async delete(t,e){return await this.call(this.DELETE,t,e)}},b=class{constructor(){this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new d).getAppKey(),this.params=null,this.pathParams={},this.headers={}}getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}getBody(){return this.body?this.body:""}getPath(t){let e=t;return Object.keys(this.pathParams).forEach((t=>{e=e.replace(t,this.pathParams[t])})),e}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},O=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"}),S=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new d).getBrowserPublicKey(),this.browserPrivateKey=(new d).getBrowserPrivateKey(),this.platform=(new d).getPlatform(),this.version=(new d).getVersion(),this.browserName=(new d).getBrowserName(),this.browserVersion=(new d).getBrowserVersion(),this.osName=(new d).getOsName(),this.osVersion=(new d).getOsVersion(),this.deviceType=(new d).getDeviceType(),(new d).getEnabled()&&(this.enabled="true"===(new d).getEnabled()),(new d).getExternalId()&&(this.externalCode=(new d).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new d).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new d).setRegisteredByCookie(this.registeredByCookie))):(t.browserPublicKey&&(this.browserPublicKey=t.browserPublicKey),t.browserPrivateKey&&(this.browserPrivateKey=t.browserPrivateKey),t.platform&&(this.platform=t.platform),t.version&&(this.version=t.version),t.osVersion&&(this.osVersion=t.osVersion),t.browserName&&(this.browserName=t.browserName),t.browserVersion&&(this.browserVersion=t.browserVersion),t.osName&&(this.osName=t.osName),t.deviceType&&(this.deviceType=t.deviceType),t.enabled&&(this.enabled=t.enabled),t.externalCode&&(this.externalCode=t.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}getDeviceId(){return this.deviceId}setDeviceId(t){this.deviceId=t}setExternalCode(t){this.externalCode=t}static setDeviceJson(t){(new d).setDeviceJson(JSON.stringify(t.toJSON()))}toJSON(){const t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}},w=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),P=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"}),R=class{static isServiceTimestampExceed(){return!(new d).getServiceTimestamp()||(new d).getServiceSyncTime()<=(Date.now()-(new d).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},T=class{static async getPermissions(){const t=await this.getPermission("geolocation"),e={};return t&&(e.location=t.state),e}static async getPermission(t){try{if(navigator&&navigator.permissions&&navigator.permissions.query&&t)return await navigator.permissions.query({name:t,userVisibleOnly:!0})}catch(t){return null}return null}static async setPermissionsCallback(){await this.setCallback("geolocation",navigator.indigitallRequestLocationPermission)}static async setCallback(t,e){const r=await this.getPermission(t);if(r){let n=r.state;"onchange"in r&&(r.onchange=()=>{new E("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},A=new E("[IND]Crypto"),N=new TextEncoder("utf-8"),L="HMAC",D=class{static async createHmac(t,e){try{const r=window?.crypto?.subtle;if(!r)return;const n=await r.importKey("raw",N.encode(t),{name:L,hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await r.sign(L,n,N.encode(e)),o=new Uint8Array(i),s=Array.prototype.map.call(o,(t=>("00"+t.toString(16)).slice(-2))).join("");return A.d("hmac: ",s).writeLog(),s}catch(t){return void A.e("error:",t).writeLog()}}},C=class{static compareJSON(t,e){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const n of r)if(t[n]!==e[n]){if("object"!=typeof t[n]||"object"!=typeof e[n])return!1;if(!isEqual(t[n],e[n]))return!1}return!0}},x=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},M={Repository:d,Config:a,Api:t,Models:e,Utils:i}})(),n})(),t.exports=e()},872:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(e,"Core",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=u(void 0);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}(r(153));Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var s,a=(s=r(106))&&s.__esModule?s:{default:s};function u(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:e})(t)}},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(545)),i=a(r(358)),o=a(r(568)),s=a(r(801));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE"}var e,r,a,u,l,d,p,y;return e=t,r=[{key:"getURL",value:(y=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.URL_BASE);case 1:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"call",value:(p=f(c().mark((function t(e,r,a,u){var l,f,h,d,p;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=new n.default("[IND]BaseClient: "),t.next=3,this.getURL();case 3:return t.t0=t.sent,t.t1=a.getPath(r),t.t2=t.t0+t.t1,t.t3=a.getParams(),f=t.t2+t.t3,a.isJourneyRequest()&&(f=f.replace("v1","v2")),h={method:e,headers:a.addHeaders()},e!==this.GET&&(h.body=JSON.stringify(a.getBody())),u&&(h.credentials=u),t.prev=12,t.next=15,fetch(f,h);case 15:return d=t.sent,t.next=18,d.json();case 18:if(p=t.sent,!d.ok){t.next=22;break}return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.statusCode+"\nResponse Message: "+p.message+"\nResponse Body:",JSON.stringify(p.data,null,"\t")).writeLog(),t.abrupt("return",p);case 22:return l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.statusCode+"\nResponse Message: "+p.message+"\n").writeLog(),t.abrupt("return",new i.default(p.statusCode,p.message));case 26:return t.prev=26,t.t4=t.catch(12),l.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(a.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 30:case"end":return t.stop()}}),t,this,[[12,26]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(d=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.GET,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"post",value:(l=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.POST,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return l.apply(this,arguments)})},{key:"put",value:(u=f(c().mark((function t(e,r,n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.PUT,e,r,n);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"delete",value:(a=f(c().mark((function t(e,r){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.call(this.DELETE,e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return a.apply(this,arguments)})}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},580:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.PARAM_APP_KEY="appKey",this.PARAM_DEVICE_ID="deviceId",this.PARAM_PUSH_TOKEN="pushToken",this.PARAM_ENABLED="enabled",this.PARAM_PLATFORM="platform",this.PARAM_VERSION="version",this.PARAM_TOPICS="topics",this.PARAM_EVENT_TYPE="eventType",this.PARAM_PUSH_ID="pushId",this.PARAM_CLICKED_BUTTON="clickedButton",this.PARAM_PERMISSION_TYPE="permissionType",this.PARAM_LATITUDE="latitude",this.PARAM_LONGITUDE="longitude",this.PARAM_INAPP_ID="inAppId",this.PARAM_INAPP_EVENT_TYPE="eventType",this.PARAM_INAPP_CLICKED_BUTTON="clickedButton",this.PARAM_INAPP_LAST_VERSION_ID="lastVersionId",this.PARAM_INBOX_EXTERNALID="externalId",this.PARAM_INBOX_PAGE="page",this.PARAM_INBOX_PAGE_SIZE="pageSize",this.PARAM_INBOX_DATE_FROM="dateFrom",this.PARAM_INBOX_DATE_TO="dateTo",this.PARAM_INBOX_STATUS="status",this.PARAM_INBOX_SENDER_IDS="sendingIds",this.PARAM_CUSTOMER_ID="customerId",this.PARAM_CUSTOMER_FIELD_NAMES="fieldNames",this.PARAM_CUSTOMER_FIELDS="fields",this.PARAM_CUSTOMER_LINK="link",this.PARAM_CUSTOMER_CHANNEL="channel",this.appKey=(new i.default).getAppKey(),this.params=null,this.pathParams={},this.headers={}}var e,r;return e=t,(r=[{key:"getParams",value:function(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"")}},{key:"getBody",value:function(){return this.body?this.body:""}},{key:"getPath",value:function(t){var e=this,r=t;return Object.keys(this.pathParams).forEach((function(t){r=r.replace(t,e.pathParams[t])})),r}},{key:"addHeaders",value:function(){var t=this,e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((function(r){e.append(r,t.headers[r])})),e}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])&&function(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=s},744:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=o(r(659)),i=o(r(580));function o(t){return t&&t.__esModule?t:{default:t}}},802:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={platform:"webpush",version:"0.0.1"},i=r(248);n.version=i.version;var o=n=Object.assign(n,{client:{URL_BASE:"https://".concat("","device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat("","device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat("","inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat("","inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat("","device-api.indigitall.com/v2")}});e.default=o},106:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=f(r(802)),o=f(r(640)),s=l(r(744)),a=l(r(253)),u=l(r(550));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(c=function(t){return t?r:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=c(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function f(t){return t&&t.__esModule?t:{default:t}}var h={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u};e.default=h},901:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat"});e.Channel=r;var n=r;e.default=n},354:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var a=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e?(this.browserPublicKey=(new i.default).getBrowserPublicKey(),this.browserPrivateKey=(new i.default).getBrowserPrivateKey(),this.platform=(new i.default).getPlatform(),this.version=(new i.default).getVersion(),this.browserName=(new i.default).getBrowserName(),this.browserVersion=(new i.default).getBrowserVersion(),this.osName=(new i.default).getOsName(),this.osVersion=(new i.default).getOsVersion(),this.deviceType=(new i.default).getDeviceType(),(new i.default).getEnabled()&&(this.enabled="true"===(new i.default).getEnabled()),(new i.default).getExternalId()&&(this.externalCode=(new i.default).getExternalId())):r?(e.enabled&&(this.enabled=e.enabled,(new i.default).setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,(new i.default).setRegisteredByCookie(this.registeredByCookie))):(e.browserPublicKey&&(this.browserPublicKey=e.browserPublicKey),e.browserPrivateKey&&(this.browserPrivateKey=e.browserPrivateKey),e.platform&&(this.platform=e.platform),e.version&&(this.version=e.version),e.osVersion&&(this.osVersion=e.osVersion),e.browserName&&(this.browserName=e.browserName),e.browserVersion&&(this.browserVersion=e.browserVersion),e.osName&&(this.osName=e.osName),e.deviceType&&(this.deviceType=e.deviceType),e.enabled&&(this.enabled=e.enabled),e.externalCode&&(this.externalCode=e.externalCode)),this.platform&&(this.productName=this.platform),this.version&&(this.productVersion=this.version),navigator&&"language"in navigator&&(this.locale=navigator.language),Intl&&"DateTimeFormat"in Intl&&(this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone),this.timeOffset=-(new Date).getTimezoneOffset()}var e,r,n;return e=t,n=[{key:"setDeviceJson",value:function(t){(new i.default).setDeviceJson(JSON.stringify(t.toJSON()))}}],(r=[{key:"getDeviceId",value:function(){return this.deviceId}},{key:"setDeviceId",value:function(t){this.deviceId=t}},{key:"setExternalCode",value:function(t){this.externalCode=t}},{key:"toJSON",value:function(){var t={};return this.platform&&(t.platform=this.platform),this.version&&(t.version=this.version),this.productName&&(t.productName=this.productName),this.productVersion&&(t.productVersion=this.productVersion),this.browserName&&(t.browserName=this.browserName),this.browserVersion&&(t.browserVersion=this.browserVersion),this.osName&&(t.osName=this.osName),this.osVersion&&(t.osVersion=this.osVersion),this.deviceType&&(t.deviceType=this.deviceType),this.locale&&(t.locale=this.locale),this.timeZone&&(t.timeZome=this.timeZone),this.timeOffset&&(t.timeOffset=this.timeOffset),this.enabled&&(t.enabled=this.enabled),this.browserPublicKey&&(t.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(t.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(t.externalCode=this.externalCode),t}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a},202:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});e.default=r},801:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={ErrorCode:{GENERAL_ERROR:600,API_SERVER_ERROR:500,API_PARAMETER_MISSING:400,API_APPKEY_NOT_VALID:401,API_FORBIDDEN_REQUEST:403,API_DEVICE_NOT_FOUND:404,API_TOPICS_ARE_INSERTED:409,BAD_REQUEST_SERVER_ERROR:410},ErrorMessage:{GENERAL_ERROR:"General Error",API_SERVER_ERROR:"Error server response",API_PARAMETER_MISSING:"Api parameter missing",API_APPKEY_NOT_VALID:"appKey is not valid",API_FORBIDDEN_REQUEST:"forbidden request",API_DEVICE_NOT_FOUND:"device not found",API_TOPICS_ARE_INSERTED:"topics are inserted",BAD_REQUEST_SERVER_ERROR:"bad request"}}},358:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=function(t,e,r){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.errorCode=e,this.errorMessage=r,null!=n&&(this.exceptionMessage=n)}));e.default=r},22:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({EVENT_TYPE_CLICK:"click",EVENT_TYPE_RECEIVE:"receive",EVENT_TYPE_UPDATE:"update",EVENT_TYPE_ACCEPT:"accept",EVENT_TYPE_REJECT:"reject",EVENT_TYPE_ASK:"ask"});e.default=r},253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Channel",{enumerable:!0,get:function(){return n.Channel}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"DeviceStatus",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorDictionary",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ErrorModel",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return u.default}});var n=r(901),i=c(r(354)),o=c(r(202)),s=c(r(801)),a=c(r(358)),u=c(r(22));function c(t){return t&&t.__esModule?t:{default:t}}},104:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(){n=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof p?e:p,s=Object.create(i.prototype),a=new R(n||[]);return o(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&i.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(o,s,a,u){var c=h(t[o],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var s;o(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return s=s?s.then(i,i):i()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,o(I,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="[IND]IndexedDB: ",this.DB_NAME="indigitall.indexedDB",this.DB_VERSION=1,this.DB_STORE_NAME="indigitallStore",this.DB_STORE_MODE="readwrite",this.DB_KEY_PATH="id",this.DB_STORE_INDEX="storeIndex",this.IDB=indexedDB||mozzIndexedDB||webkitIndexedDB||msIndexedDB}var e,r,i,a,u,c,l;return e=t,r=[{key:"getDB",value:(l=o(n().mark((function t(){var e=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){var n=e.IDB;if(n){var i=n.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key")},i.onsuccess=function(){var e=i.result,r=e.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");t({db:e,tx:r,store:n,index:o})},i.onerror=function(t){r(t)}}else r(!1)})));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"get",value:(c=o(n().mark((function t(e,r){var i=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.index.get(r).onsuccess=function(r){r.target.result&&(i.close(e),t(r.target.result.store.value)),n(!1)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e){return c.apply(this,arguments)})},{key:"put",value:(u=o(n().mark((function t(e,r,i){var o=this;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){e||n(!1),e.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(e),t(i)}})));case 1:case"end":return t.stop()}}),t)}))),function(t,e,r){return u.apply(this,arguments)})},{key:"close",value:function(t){if(t.tx)try{t.tx.oncomplete=function(){t.db.close()}}catch(t){console.error(this.TAG,t)}}},{key:"setItem",value:(a=o(n().mark((function t(e,r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return i=t.sent,t.abrupt("return",this.put(i,e,r));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t,e){return a.apply(this,arguments)})},{key:"getItem",value:(i=o(n().mark((function t(e){var r;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.getDB();case 3:return r=t.sent,t.abrupt("return",this.get(r,e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(t){return i.apply(this,arguments)})}],r&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=a},795:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=this.isLocalStorageAvailable()?window.localStorage:null}var e,r;return e=t,(r=[{key:"isLocalStorageAvailable",value:function(){try{var t=window.localStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"setItem",value:function(t,e){return null!=this.storage&&(this.storage.setItem(t,e),!0)}},{key:"getItem",value:function(t){return null!=this.storage?this.storage.getItem(t):null}},{key:"deleteItem",value:function(t){return!!this.storage&&(this.storage.setItem(t,value),!0)}},{key:"clear",value:function(){this.storage&&this.storage.clear()}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},640:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(802)),i=a(r(795)),o=a(r(104)),s=a(r(636));function a(t){return t&&t.__esModule?t:{default:t}}function u(t){return u="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},u(t)}function c(){c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,o)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,s,a){var c=h(t[n],t,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==u(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,a)}))}a(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,a,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,s,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,a,"Generator"),l(I,o,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){l(o,n,i,s,a,"next",t)}function a(t){l(o,n,i,s,a,"throw",t)}s(void 0)}))}}function h(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,(i=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===u(i)?i:String(i)),n)}var i}var d=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.storage=i.default,this.db=o.default,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE"}var e,r,a,u,l,d,p,y,v,E,g,m,I;return e=t,r=[{key:"setItemSessionStorage",value:function(t,e){s.default.setItem(t,e)}},{key:"getItemSessionStorage",value:function(t){return s.default.getItem(t)}},{key:"clearSessionStorage",value:function(){s.default.clearMessages()}},{key:"setStorage",value:function(t,e){i.default.setItem(t,e)}},{key:"getStorage",value:function(t){return i.default.getItem(t)}},{key:"clearStorage",value:function(){i.default.clear()}},{key:"setBrowserPublicKey",value:function(t){i.default.setItem(this.BROWSER_PUBLIC_KEY,t)}},{key:"getBrowserPublicKey",value:function(){return i.default.getItem(this.BROWSER_PUBLIC_KEY)}},{key:"setBrowserPrivateKey",value:function(t){i.default.setItem(this.BROWSER_PRIVATE_KEY,t)}},{key:"getBrowserPrivateKey",value:function(){return i.default.getItem(this.BROWSER_PRIVATE_KEY)}},{key:"setAppKey",value:(I=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.APP_KEY,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"setVAPID",value:function(t){i.default.setItem(this.VAPID_PUBLIC,t)}},{key:"getVAPID",value:function(){return i.default.getItem(this.VAPID_PUBLIC)}},{key:"setEnabled",value:function(t){i.default.setItem(this.ENABLED,t)}},{key:"getEnabled",value:function(){return i.default.getItem(this.ENABLED)}},{key:"setServiceSyncTime",value:function(t){i.default.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}},{key:"getServiceSyncTime",value:function(){return i.default.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}},{key:"setLocationEnabled",value:function(t){i.default.setItem(this.LOCATION_ENABLED,t)}},{key:"getLocationEnabled",value:function(){return i.default.getItem(this.LOCATION_ENABLED)}},{key:"setLocationUpdateMinutes",value:function(t){i.default.setItem(this.LOCATION_UPDATE_MINUTES,t)}},{key:"getLocationUpdateMinutes",value:function(){return i.default.getItem(this.LOCATION_UPDATE_MINUTES)||30}},{key:"setRequestLocation",value:(m=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REQUEST_LOCATION,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(g=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.PLATFORM,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"getPlatform",value:function(){return i.default&&i.default.getItem(this.PLATFORM)||n.default.platform}},{key:"getVersion",value:function(){return n.default.version}},{key:"setBrowserName",value:(E=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.BROWSER_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"getBrowserName",value:function(){return i.default.getItem(this.BROWSER_NAME)}},{key:"setBrowserVersion",value:function(t){i.default.setItem(this.BROWSER_VERSION,t)}},{key:"getBrowserVersion",value:function(){return i.default.getItem(this.BROWSER_VERSION)}},{key:"setOsName",value:(v=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.OS_NAME,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"getOsName",value:function(){return i.default.getItem(this.OS_NAME)}},{key:"setOsVersion",value:function(t){i.default.setItem(this.OS_VERSION,t)}},{key:"getOsVersion",value:function(){return i.default.getItem(this.OS_VERSION)}},{key:"setDeviceType",value:function(t){i.default.setItem(this.DEVICE_TYPE,t)}},{key:"getDeviceType",value:function(){return i.default.getItem(this.DEVICE_TYPE)}},{key:"setSupported",value:function(t){i.default.setItem(this.SUPPORTED,t)}},{key:"getSupported",value:function(){return i.default.getItem(this.SUPPORTED)}},{key:"setServiceTimestamp",value:function(t){i.default.setItem(this.SERVICE_TIMESTAMP,t)}},{key:"getServiceTimestamp",value:function(){return i.default.getItem(this.SERVICE_TIMESTAMP)}},{key:"setLocationTimestamp",value:function(t){i.default.setItem(this.LOCATION_TIMESTAMP,t)}},{key:"getLocationTimestamp",value:function(){return i.default.getItem(this.LOCATION_TIMESTAMP)}},{key:"setPermissionLocation",value:function(t){i.default.setItem(this.PERMISSION_LOCATION,t)}},{key:"getPermissionLocation",value:function(){return i.default.getItem(this.PERMISSION_LOCATION)}},{key:"setDebugLog",value:function(t){i.default.setItem(this.SET_LOG_DEBUG,t)}},{key:"getDebugLog",value:function(){return"false"!==i.default.getItem(this.SET_LOG_DEBUG)}},{key:"setLogLevel",value:function(t){i.default.setItem(this.LOG_LEVEL,t)}},{key:"getLogLevel",value:function(){return i.default.getItem(this.LOG_LEVEL)}},{key:"setNewUserTimestamp",value:function(t){i.default.setItem(this.NEW_USER_TIMESTAMP,t)}},{key:"getNewUserTimestamp",value:function(){return i.default.getItem(this.NEW_USER_TIMESTAMP)}},{key:"setExternalIdRequest",value:(y=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default&&i.default.isLocalStorageAvailable()&&i.default.setItem(this.EXTERNAL_ID,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.EXTERNAL_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},{key:"getExternalIdRequest",value:(p=f(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!i.default||!i.default.isLocalStorageAvailable()){t.next=5;break}e=i.default.getItem(this.EXTERNAL_ID),t.next=9;break;case 5:if(!o.default||!o.default.IDB){t.next=9;break}return t.next=8,o.default.getItem(this.EXTERNAL_ID);case 8:e=t.sent;case 9:t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return p.apply(this,arguments)})},{key:"setExternalId",value:function(t){i.default.setItem(this.EXTERNAL_ID,t)}},{key:"getExternalId",value:function(){return i.default.getItem(this.EXTERNAL_ID)}},{key:"getDeviceJson",value:(d=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.DEVICE_JSON));case 1:case"end":return t.stop()}}),t,this)}))),function(){return d.apply(this,arguments)})},{key:"setDeviceJson",value:(l=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.DEVICE_JSON,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getRegisteredByCookie",value:(u=f(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.default.getItem(this.REGISTERED_BY_COOKIE));case 1:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(a=f(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.default.setItem(this.REGISTERED_BY_COOKIE,e);case 1:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"setLatitude",value:function(t){i.default.setItem(this.LATITUDE,t)}},{key:"getLatitude",value:function(){return i.default.getItem(this.LATITUDE)}},{key:"setLongitude",value:function(t){i.default.setItem(this.LONGITUDE,t)}},{key:"getLongitude",value:function(){return i.default.getItem(this.LONGITUDE)}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=d},636:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null}var e,r;return e=t,(r=[{key:"isSessionStorageAvailable",value:function(){try{var t=window.sessionStorage,e="__storage_test__";if(t)return t.setItem(e,e),t.removeItem(e),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==i.length}return!1}},{key:"getItem",value:function(t){return null!=this.session?this.session.getItem(t):null}},{key:"setItem",value:function(t,e){return null!=this.session&&(this.session.setItem(t,e),!0)}},{key:"clearMessages",value:function(){this.session&&this.session.removeItem("messages")}}])&&n(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()),o=i;e.default=o},306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(640))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}var s=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isServiceTimestampExceed",value:function(){return!(new i.default).getServiceTimestamp()||(new i.default).getServiceSyncTime()<=(Date.now()-(new i.default).getServiceTimestamp())/6e4}},{key:"isFunction",value:function(t){return!(!t||"function"!=typeof t)}}],r&&function(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=s},897:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(545))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}function s(){s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==o(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,u)}),(function(t){i("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function a(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function c(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,a,l;return e=t,r=[{key:"getPermissions",value:(l=u(s().mark((function t(){var e,r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission("geolocation");case 2:return e=t.sent,r={},e&&(r.location=e.state),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getPermission",value:(a=u(s().mark((function t(e){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){t.next=5;break}return t.next=4,navigator.permissions.query({name:e,userVisibleOnly:!0});case 4:return t.abrupt("return",t.sent);case 5:t.next=10;break;case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",null);case 10:return t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(t){return a.apply(this,arguments)})},{key:"setPermissionsCallback",value:(o=u(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setCallback",value:(n=u(s().mark((function t(e,r){var n,o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getPermission(e);case 2:(n=t.sent)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i.default("[IND]CorePermissions: ").d(e+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:e,state:n.state})}));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=l},95:(t,e,r)=>{"use strict";var n;function i(t){return i="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},i(t)}function o(){o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,i){var o=e&&e.prototype instanceof p?e:p,s=Object.create(o.prototype),a=new R(i||[]);return n(s,"_invoke",{value:O(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function p(){}function y(){}function v(){}var E={};l(E,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==e&&r.call(m,a)&&(E=m);var I=v.prototype=p.prototype=Object.create(E);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(n,s,a,u){var c=h(t[n],t,s);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var s;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return s=s?s.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=S(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return y.prototype=v,n(I,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(I),t},t.awrap=function(t){return{__await:t}},_(b.prototype),l(b.prototype,u,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var s=new b(f(e,r,n,i),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(I),l(I,c,"Generator"),l(I,a,(function(){return this})),l(I,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function s(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void r(t)}a.done?e(u):Promise.resolve(u).then(n,i)}function a(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,(o=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===i(o)?o:String(o)),n)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var u=new(((n=r(545))&&n.__esModule?n:{default:n}).default)("[IND]Crypto"),c=new TextEncoder("utf-8"),l="HMAC",f=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,i;return e=t,r=[{key:"createHmac",value:(n=o().mark((function t(e,r){var n,i,s,a,f,h,d;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,s=null===(n=window)||void 0===n||null===(i=n.crypto)||void 0===i?void 0:i.subtle){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,s.importKey("raw",c.encode(e),{name:l,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 6:return a=t.sent,t.next=9,s.sign(l,a,c.encode(r));case 9:return f=t.sent,h=new Uint8Array(f),d=Array.prototype.map.call(h,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),u.d("hmac: ",d).writeLog(),t.abrupt("return",d);case 16:return t.prev=16,t.t0=t.catch(0),u.e("error:",t.t0).writeLog(),t.abrupt("return");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}],r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.CryptoUtils=f;var h=f;e.default=h},568:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(358))&&n.__esModule?n:{default:n};function o(t){return o="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},o(t)}var s=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,(r=[{key:"showError",value:function(t,e,r){if(null!=t){var n=Object.values(t.ErrorCode).indexOf(e);return n>=0?new i.default(Object.keys(t.ErrorCode)[n],Object.keys(t.ErrorMessage)[n],r):new i.default(GENERAL_ERROR,"general error",r)}}}])&&function(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,(i=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===o(i)?i:String(i)),n)}var i}(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}());e.default=s},970:(t,e)=>{"use strict";function r(t){return r="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},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"compareJSON",value:function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(t[a]!==e[a]){if("object"!=r(t[a])||"object"!=r(e[a]))return!1;if(!isEqual(t[a],e[a]))return!1}}return!0}}],n&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=n},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(640)),i=o(r(136));function o(t){return t&&t.__esModule?t:{default:t}}function s(t){return s="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},s(t)}function a(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,(i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}var u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag="[IND]",e&&(this.tag=e),this.level=i.default.INFO,this.setLogLevel((new n.default).getLogLevel()),this.log=[]}var e,r,o;return e=t,r=[{key:"setLogLevel",value:function(t){t&&t>=i.default.DEBUG&&t<=i.default.ERROR&&(this.level=t)}},{key:"d",value:function(){if(this.level<=i.default.DEBUG)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"i",value:function(){if(this.level<=i.default.INFO)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"w",value:function(){if(this.level<=i.default.WARNING)for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"e",value:function(){if(this.level<=i.default.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var e=0;e<arguments.length;e++)this.log+=t.addedAsString(arguments[e]);return this}},{key:"writeLog",value:function(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}],o=[{key:"addedAsString",value:function(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}}],r&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=u},136:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.LogLevel=r;var n=r;e.default=n},506:(t,e)=>{"use strict";function r(t){return r="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},r(t)}function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=i},550:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CommonUtils",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"CorePermissions",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CryptoUtils",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ErrorUtils",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"JsonUtils",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return c.LogLevel}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(306)),i=f(r(897)),o=f(r(95)),s=f(r(568)),a=f(r(970)),u=f(r(545)),c=r(136),l=f(r(506));function f(t){return t&&t.__esModule?t:{default:t}}},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.2.4","_id":"indigitall-web-core@4.2.4","_inBundle":false,"_integrity":"sha512-XBgYKfMnDxWIfvgYuxJj4nZ9vJiZms1a2Hwe4CCuH06FnePS0wTbOBSP9QMLOOTj75PWrYEYlJECY5+/Yl5TgA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.2.4","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.2.4","saveSpec":null,"fetchSpec":"4.2.4"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.2.4.tgz","_shasum":"652eee30d5ee8be997152afce6b411c6c83946d3","_spec":"indigitall-web-core@4.2.4","_where":"/home/circleci/webpush/inbox","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.2.4"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{default:()=>D});const{Repository:t}=r(872).Core,e=new class extends t{constructor(){super(),this.AUTH_TOKEN=this.REPOSITORY+".AUTH_TOKEN",this.INBOX_AUTH_MODE=this.REPOSITORY+".INBOX_AUTH_MODE",this.URL_INBOX_API=this.REPOSITORY+".URL_INBOX_API"}async setDeviceId(t){this.setStorage(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}setAuthToken(t){this.setStorage(this.AUTH_TOKEN,t)}getAuthToken(){return this.getStorage(this.AUTH_TOKEN)}setInboxAuthMode(t){this.setStorage(this.INBOX_AUTH_MODE,t)}getInboxAuthMode(){return this.getStorage(this.INBOX_AUTH_MODE)}async getUrlInboxApi(){return this.getStorage(this.URL_INBOX_API)}async setUrlInboxApi(t){this.setStorage(this.URL_INBOX_API,t)}},{BaseClient:o}=r(872).Core.Api,{Config:s}=r(872).Core,{ErrorModel:a}=r(872).Core.Models,{CommonUtils:u}=r(872).Core.Utils,c=new class extends o{constructor(){super(),this.URL_BASE=s.client.INBOX_URL_BASE,this.ENDPOINT_INBOX_NOTIFICATIONS="/notification",this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID=this.ENDPOINT_INBOX_NOTIFICATIONS+"/{sendingId}",this.ENDPOINT_INBOX_COUNTER="/counters",this.ENDPOINT_INBOX_AUTH="/auth/webhook"}async getURL(){return await e.getUrlInboxApi()||this.URL_BASE}async postInboxAuth(t,r,n){const i=await this.post(this.ENDPOINT_INBOX_AUTH,t.postInboxAuth());if(!i||i instanceof a||!i.data)i?u.isFunction(n)&&n(i):u.isFunction(n)&&n();else{const t=i.data.token;e.setAuthToken(t),u.isFunction(r)&&r(i)}return!0}async getInbox(t,e,r){const n=await this.get(this.ENDPOINT_INBOX_NOTIFICATIONS,t.getInboxPushRequest());return this.getInboxResponseStatus(n,e,r),!0}async putInboxPush(t,e,r){const n=await this.put(this.ENDPOINT_INBOX_NOTIFICATIONS,t.putInboxPushRequest());return this.getInboxResponseEdit(n,e,r),!0}async getInboxPushWithSendingId(t,e,r,n){const i=await this.get(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,t.getInboxPushRequestWithSendingId());return this.getNotificationResponseStatus(i,e,r,n),!0}async putInboxPushWithSendingId(t,e,r,n){const i=await this.put(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,t.putInboxWithSendingId());return this.getNotificationResponseStatus(i,e,r,n),!0}async getInboxCounter(t,e,r){const n=await this.get(this.ENDPOINT_INBOX_COUNTER,t.getCounter());this.getCounterStatus(n,e,r)}async getInboxResponseStatus(t,e,r){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const r=new D(t.data);u.isFunction(e)&&e(r)}else t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}async getInboxResponseEdit(t,e,r){t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300?u.isFunction(e)&&e():t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}getNotifications(t,e){const r=[];for(let n=0;n<t.length;n++){null!=t[n].sentAt&&null!=e&&t[n].sentAt<e&&(read=!0);const i=new InboxNotification(t[n],e);r.push(i)}return r}async getNotificationResponseStatus(t,e,r,n){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const t=new InboxNotification(notifications[i],e);u.isFunction(r)&&r(t)}else t?u.isFunction(n)&&n(t):u.isFunction(n)&&n()}async getCounterStatus(t,e,r){if(t&&!(t instanceof a)&&t.statusCode>=200&&t.statusCode<300){const r={click:t.data.click,sent:t.data.sent,deleted:t.data.deleted,unread:this.getUnreadCounters(t.data.unread)};u.isFunction(e)&&e(r)}else t?u.isFunction(r)&&r(t):u.isFunction(r)&&r()}getUnreadCounters(t){return{count:t.count,lastAccess:t.lastAccess}}},{BaseRequest:l}=r(872).Core.Api,f=class extends l{constructor(){super()}postInboxAuth(){return this.body=this.json,this}setJson(t){this.json=t}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}},h=Object.freeze({SENT:"sent",CLICK:"click",DELETED:"deleted"});window.inboxStatus=h;const d=h,p=Object.freeze({NONE:"none",DEFAULT:"default",WEBHOOK:"webhook"}),{BaseRequest:y}=r(872).Core.Api,v=class extends y{constructor(){super(),null!=e.getExternalId()&&(this.externalId=e.getExternalId()),null!=e.getAuthToken()&&e.getInboxAuthMode()==p.WEBHOOK&&(this.headers.Authorization="Bearer "+e.getAuthToken()),this.sendingId="",this.sendingIds=null,this.page=0,this.pageSize=0,this.dateFrom="",this.dateTo="",this.status=d.INBOXSTATUS_SENT,this.statusList=null}getInboxPushRequest(){return this.params=this.createQueryString(),this}putInboxPushRequest(){return this.params=this.createQueryStringExternalId(),this.body=this.createBodyJson(),this}getInboxPushRequestWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this}putInboxWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this.body=this.createBodyStatusJson(),this}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}createQueryString(){let t="";if(this.page&&(t+=this.PARAM_INBOX_PAGE+"="+this.page+"&"),this.pageSize&&(t+=this.PARAM_INBOX_PAGE_SIZE+"="+this.pageSize+"&"),this.dateFrom&&(t+=this.PARAM_INBOX_DATE_FROM+"="+this.dateFrom+"&"),this.dateTo&&(t+=this.PARAM_INBOX_DATE_TO+"="+this.dateTo+"&"),this.statusList){let e="";for(let t=0;t<this.statusList.length;t++)e+=this.statusList[t],t!=this.statusList.length-1&&(e+=",");t+=this.PARAM_INBOX_STATUS+"="+e+"&"}return t+this.createQueryStringExternalId()}createQueryStringExternalId(){return this.PARAM_INBOX_EXTERNALID+"="+this.externalId}createBodyJson(){let t={};const e=[];try{if(t=this.createBodyStatusJson(),this.sendingIds)for(let t=0;t<this.sendingIds.length;t++)e.push(this.sendingIds[t]);t.sendingIds=e}catch(t){console.log("Error Inbox request :"+t)}return t}createBodyStatusJson(){const t={};return this.status&&(t.status=this.status),t}setSendingId(t){this.sendingId=t}setSendingIds(t){this.sendingIds=t}setPage(t){this.page=t}setPageSize(t){this.pageSize=t}setDateFrom(t){this.dateFrom=t}setDateTo(t){this.dateTo=t}setStatus(t){this.status=t}setStatusList(t){this.statusList=t}},{BaseRequest:E}=r(872).Core.Api,g=class extends E{constructor(){super(),null!=e.getExternalId()&&(this.externalId=e.getExternalId()),null!=e.getAuthToken()&&e.getInboxAuthMode()==p.WEBHOOK&&(this.headers.Authorization="Bearer "+e.getAuthToken())}getCounter(){return this.params=this.createQueryStringExternalId(),this}addHeaders(){const t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach((e=>{t.append(e,this.headers[e])})),t}createQueryStringExternalId(){return this.PARAM_INBOX_EXTERNALID+"="+this.externalId}};class m{constructor(t,e){t&&(t.id&&(this.id=t.id),t.externalId&&(this.externalId=t.externalId),t.sentAt&&(this.sentAt=t.sentAt),t.status&&(this.status=t.status),t.sendingId&&(this.sendingId=t.sendingId),t.message&&(this.message=t.message),t.campaignId&&(this.campaignId=t.campaignId),this.read=!1,this.sentAt&&e&&this.sentAt<e&&(this.read=!0))}}window.inboxNotification=m;const I=m,{ErrorDictionary:_}=r(872).Core.Models,b=_.ErrorCode;Object.assign(b,{INBOX_GET_ERROR:3001,INBOX_GET_PAGE_ERROR:3011,INBOX_EXTERNAL_ID_NO_REGISTERED:3012,INBOX_NO_MESSAGES:3013,INBOX_IS_REQUESTING_PAGE:3014,INBOX_EMPTY:3015,INBOX_GENERAL_ERROR:3600});const O=_.ErrorMessage;Object.assign(O,{INBOX_GET_ERROR:"inbox GET request error",INBOX_GET_PAGE_ERROR:"error inbox get page",INBOX_EXTERNAL_ID_NO_REGISTERED:"external Id is not registered",INBOX_NO_MESSAGES:"There are no more messages on Inbox",INBOX_IS_REQUESTING_PAGE:"Wait. Is Requesting new page",INBOX_EMPTY:"There are no messages on Inbox",INBOX_GENERAL_ERROR:"general error"});const S={ErrorCode:b,ErrorMessage:O},{Validations:w,Log:P}=r(872).Core.Utils,R=class extends w{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new P("[IND]InboxValidations: "),r=e.getDeviceId();let n=!0;return this.isAppKeyFormat()||(n=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(r)||(n=!1,t.w("deviceId is null or empty").writeLog()),n}},{CommonUtils:T,ErrorUtils:A,Log:N}=r(872).Core.Utils;class L{constructor(t){if(t){if(t.lastAccess&&(this.lastAccess=t.lastAccess),t.numPage?this.page=t.numPage:this.page=0,t.pageSize&&(this.pageSize=t.pageSize),t.count&&(this.count=t.count),t.notifications){this.notifications=[];const e=t.notifications;for(let t=0;t<e.length;t++){const r=new I(e[t],this.lastAccess);this.notifications.push(r)}}this.totalPages=Math.trunc(this.count/this.pageSize)}this.dateFrom=null,this.dateTo=null,this.statusList=null,this.newNotifications=[I],this.isRequestingPage=!1}static generateAuthToken(t,e){let r={};navigator.indigitallGetAuthConfig&&T.isFunction(navigator.indigitallGetAuthConfig)&&(r=navigator.indigitallGetAuthConfig());const n=new f;n.setJson(r),c.postInboxAuth(n,t,e)}static getInboxMessagesCount(t,e,r){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getMessagesCount(e,r)}static setUrlInboxApi(t){e.setUrlInboxApi(t)}static setInboxAuthMode(t){e.setInboxAuthMode(t)}static getMessagesCount(t,r){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new g;c.getInboxCounter(e,t,(r=>{401===r.errorCode?this.generateAuthToken((()=>{c.getInboxCounter(e,t,r)}),r):T.isFunction(r)&&r(r)}))}else T.isFunction(r)&&r(A.showError(S,S.ErrorCode.INBOX_GET_ERROR));else T.isFunction(r)&&r(A.showError(S,S.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}static getInbox(t,e,r){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getInbox(e,r)}static getInbox(t,e){L.getInboxWithPage(null,null,null,null,null,t,e)}static getInboxWithPage(t,e,r,n,i,o,s,a){T.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getInboxWithPage(e,r,n,i,o,s,a)}static getInboxWithPage(t,r,n,i,o,s,a){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new v;t&&e.setPage(t),r&&e.setPageSize(r),n&&(e.setDateFrom(n),this.dateFrom=n),i&&(e.setDateTo(i),this.dateTo=i),o&&(e.setStatusList(o),this.statusList=o),c.getInbox(e,(t=>{this.totalPages=t.totalPages,0!=t.count?T.isFunction(s)&&s(t):T.isFunction(a)&&a(A.showError(S,S.ErrorCode.INBOX_GET_PAGE_ERROR))}),(t=>{401==t.errorCode?this.generateAuthToken((()=>{c.getInbox(e,(t=>{this.totalPages=t.totalPages,T.isFunction(s)&&s(t)}),t)}),t):T.isFunction(t)&&t(t)}))}else T.isFunction(a)&&a(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(a)&&a(A.showError(S,S.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}getNextPage(t,r){const n=new N("[IND]Inbox: ");if(this.isRequestingPage)n.w(S.ErrorMessage.INBOX_IS_REQUESTING_PAGE).writeLog();else if(this.isRequestingPage=!0,this.page+1<this.totalPages)if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){const e=new v;(this.page||0==this.page)&&e.setPage(this.page+1),this.pageSize&&e.setPageSize(this.pageSize),this.dateFrom&&e.setDateFrom(this.dateFrom),this.dateTo&&e.setDateTo(this.dateTo),this.statusList&&e.setStatusList(this.statusList),c.getInbox(e,(e=>{this.notifications=this.notifications.concat(e.notifications),this.newNotifications=e.notifications,this.lastAccess=e.lastAccess,this.count=e.count,this.page=e.page,this.pageSize=e.pageSize,this.totalPages=e.totalPages,this.isRequestingPage=!1,T.isFunction(t)&&t(this,this.newNotifications)}),(r=>{401===r.errorCode?this.generateAuthToken((()=>{c.getInbox(e,(e=>{this.notifications=this.notifications.concat(e.notifications),this.newNotifications=e.notifications,this.lastAccess=e.lastAccess,this.count=e.count,this.page=e.page,this.pageSize=e.pageSize,this.totalPages=e.totalPages,this.isRequestingPage=!1,T.isFunction(t)&&t(this,this.newNotifications)}),r)}),r):(this.isRequestingPage=!1,T.isFunction(r)&&r())}))}else this.isRequestingPage=!1,T.isFunction(r)&&r(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(r)&&r(A.showError(S,S.ErrorCode.GENERAL_ERROR_BAD_REQUEST));else this.isRequestingPage=!1,T.isFunction(r)&&r(A.showError(S,S.ErrorCode.INBOX_NO_MESSAGES))}massiveEditNotifications(t,r,n,i){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t&&r){const e=new v;e.setSendingIds(t),e.setStatus(r),c.putInboxPush(e,n,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPush(e,n,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(i)&&i(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(i)&&i(A.showError(S,S.ErrorCode.BAD_REQUEST_SERVER_ERROR))}getInfoFromNotification(t,r,n){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t){const e=new v;e.setSendingId(t),c.getInboxPushWithSendingId(e,this.lastAccess,r,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.getInboxPushWithSendingId(e,this.lastAccess,r,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(n)&&n(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(n)&&n(A.showError(S,S.ErrorCode.BAD_REQUEST_SERVER_ERROR))}modifyStatusFromNotification(t,r,n,i){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t&&r){const e=new v;e.setSendingId(t),e.setStatus(r),c.putInboxPushWithSendingId(e,this.lastAccess,n,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPushWithSendingId(e,this.lastAccess,n,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(i)&&i(A.showError(S,S.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(i)&&i(A.showError(S,S.ErrorCode.BAD_REQUEST_SERVER_ERROR))}}const D=L})(),n})(),t.exports=e()},277:(t,e,r)=>{"use strict";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)}Object.defineProperty(e,"__esModule",{value:!0});var i={};Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o.default}});var o=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=s(e);if(r&&r.has(t))return r.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=o?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(i,a,u):i[a]=t[a]}return i.default=t,r&&r.set(t,i),i}(r(301));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(s=function(t){return t?r:e})(t)}Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}))},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.2.4","_id":"indigitall-web-core@4.2.4","_inBundle":false,"_integrity":"sha512-XBgYKfMnDxWIfvgYuxJj4nZ9vJiZms1a2Hwe4CCuH06FnePS0wTbOBSP9QMLOOTj75PWrYEYlJECY5+/Yl5TgA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.2.4","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.2.4","saveSpec":null,"fetchSpec":"4.2.4"},"_requiredBy":["#USER","/","/indigitall-web-inbox"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.2.4.tgz","_shasum":"652eee30d5ee8be997152afce6b411c6c83946d3","_spec":"indigitall-web-core@4.2.4","_where":"/home/circleci/webpush/push","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.2.4"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{default:()=>Q});var t=r(277),e=r.n(t);const{Repository:i}=r(872).Core,o=new class extends i{constructor(){super(),this.SAFARI_WEBSITE_PUSH_ID=this.REPOSITORY+".SAFARI_WEBSITE_PUSH_ID",this.PUSH_TOKEN=this.REPOSITORY+".PUSH_TOKEN",this.PERMISSION_PUSH=this.REPOSITORY+".PERMISSION_PUSH",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.DEVICE_JSON=this.REPOSITORY+".DEVICE_JSON",this.PUT_REQUEST_TIMESTAMP=this.REPOSITORY+".PUT_REQUEST_TIMESTAMP",this.WORKER_PATH=this.REPOSITORY+".WORKER_PATH",this.TEST=this.REPOSITORY+".TEST",this.SAFARI_GESTURE_REQUEST_PERMISSION=this.SAFARI_GESTURE_REQUEST_PERMISSION+".SAFARI_GESTURE_REQUEST_PERMISSION"}async setDeviceId(t){this.setStorage(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}setPushToken(t){this.setStorage(this.PUSH_TOKEN,t)}getPushToken(){return this.getStorage(this.PUSH_TOKEN)}setSafariWebsitePushId(t){this.setStorage(this.SAFARI_WEBSITE_PUSH_ID,t)}getSafariWebsitePushId(){return this.getStorage(this.SAFARI_WEBSITE_PUSH_ID)}setPermissionPush(t){this.setStorage(this.PERMISSION_PUSH,t)}getPermissionPush(){return this.getStorage(this.PERMISSION_PUSH)}async getUrlDeviceApi(){let t;try{this.storage&&this.storage.isLocalStorageAvailable()?t=this.getStorage(this.URL_DEVICE_API):this.db&&this.db.IDB&&(t=await this.db.getItem(this.URL_DEVICE_API))}catch(t){}return t}async setUrlDeviceApi(t){this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,t),this.db&&this.db.IDB&&await this.db.setItem(this.URL_DEVICE_API,t)}async getDeviceJson(){return this.getStorage(this.DEVICE_JSON)}async setDeviceJson(t){this.setStorage(this.DEVICE_JSON,t)}async getPutRequestTimestamp(){return this.getStorage(this.PUT_REQUEST_TIMESTAMP)}async setPutRequestTimestamp(t){this.setStorage(this.PUT_REQUEST_TIMESTAMP,t)}setWorkerPath(t){this.setStorage(this.WORKER_PATH,t)}getWorkerPath(){return this.getStorage(this.WORKER_PATH)}setTestValue(t){this.setStorage(this.TEST,t)}getTestValue(){return this.getStorage(this.TEST)}setSafariGestureRequestPermission(t){this.setStorage(this.SAFARI_GESTURE_REQUEST_PERMISSION,t)}getSafariGestureRequestPermission(){return this.getStorage(this.SAFARI_GESTURE_REQUEST_PERMISSION)}},{ErrorDictionary:s}=r(872).Core.Models,a=s.ErrorCode;Object.assign(a,{GENERAL_ERROR_BAD_REQUEST:601,GENERAL_ERROR_APPKEY_BAD_REQUEST:602,PUSH_INITIALIZATION_ERROR:1e3,PUSH_RECEPTION_ERROR:1200,PUSH_TOPICS_ERROR:1400,PUSH_DEVICE_ERROR:1500,PUSH_EVENT_ERROR:1600,API_APPKEY_NOT_VALID:1601});const u=s.ErrorMessage;Object.assign(u,{GENERAL_ERROR_BAD_REQUEST:"AppKey or DeviceId are null or empty",GENERAL_ERROR_APPKEY_BAD_REQUEST:"AppKey is null or empty",PUSH_INITIALIZATION_ERROR:"initialization error",PUSH_RECEPTION_ERROR:"push reception error",PUSH_TOPICS_ERROR:"push topics error",PUSH_DEVICE_ERROR:"device error",PUSH_EVENT_ERROR:"event error",API_APPKEY_NOT_VALID:"appKey is missing'"});const c={ErrorCode:a,ErrorMessage:u},{BaseRequest:l}=r(872).Core.Api,{EventType:f}=r(872).Core.Models,h=class extends l{constructor(){super()}setEventType(t){this.eventType=t}setPushId(t){this.pushId=t}setClickedButton(t){this.clickedButton=t}setSendingId(t){this.sendingId=t}setPermissionType(t){this.permissionType=t}setLocation(t,e){this.latitude=t,this.longitude=e}setDeviceId(t){this.deviceId=t}setPlatform(t){this.platform=t}setAppKey(t){this.appKey=t}setCustomData(t){this.customData=t}async setExternalCodeRequest(){this.externalCode=await o.getExternalIdRequest()}setExternalCode(t){this.externalCode=t}setCampaingId(t){this.campaignId=t}setJourneyStateId(t){this.journeyStateId=t}setJourneyExecution(t){this.journeyExecution=t}setCjCurrentStateId(t){this.cjCurrentStateId=t}postEventPushRequest(){const t={};return t.deviceId=this.deviceId,t.platform=this.platform,this.eventType&&(t.eventType=this.eventType),this.pushId&&(t.pushId=this.pushId),t.clickedButton=this.clickedButton,null!=this.externalCode&&(t.externalCode=this.externalCode),this.sendingId&&"undefined"!=this.sendingId&&(t.sendingId=this.sendingId),this.journeyStateId&&(t.journeyStateId=this.journeyStateId),this.campaignId&&(t.campaignId=this.campaignId),this.body=t,this}postEventVisitRequest(){const t={};return t.deviceId=o.getDeviceId(),t.eventType=f.EVENT_TYPE_UPDATE,this.body=t,this}postEventPermissionRequest(){const t={};return t.deviceId=o.getDeviceId(),this.eventType&&(t.eventType=this.eventType),this.permissionType&&(t.permissionType=this.permissionType),this.body=t,this}postEventLocationRequest(){const t={};return t.deviceId=o.getDeviceId(),t.eventType=f.EVENT_TYPE_UPDATE,this.latitude&&(t.latitude=this.latitude),this.longitude&&(t.longitude=this.longitude),this.body=t,this}postEventCustomRequest(){const t={};return this.deviceId&&(t.deviceId=this.deviceId),this.eventType&&(t.eventType=this.eventType),this.customData&&(t.customData=this.customData),this.externalCode&&(t.externalCode=this.externalCode),this.body=t,this}},d=class{static urlBase64ToUint8Array(t){const e=(t+"=".repeat((4-t.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),r=window.atob(e),n=new Uint8Array(r.length);for(let t=0;t<r.length;++t)n[t]=r.charCodeAt(t);return n}static callEventPermission(t,e){const r=new h;r.setAppKey(o.getAppKey()),r.setDeviceId(o.getDeviceId()),r.setPermissionType(t),r.setEventType(e),w.postEventPermission(r)}static async getPutRequestTimestamp(){return await o.getPutRequestTimestamp()?o.getPutRequestTimestamp():Date.now()+6048e5}},{Validations:p,Log:y}=r(872).Core.Utils,v=class extends p{static isAppKeyFormat(){const t=o.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new y("[IND]PushValidations: "),e=o.getDeviceId();let r=!0;return this.isAppKeyFormat()||(r=!1,t.w("appKey is null or empty").writeLog()),this.isValidFormat(e)||(r=!1,t.w("deviceId is null or empty").writeLog()),r}static async isPutRequestExceed(){return await d.getPutRequestTimestamp()<=Date.now()}static isSafariBrowserDevice(){const t=window.navigator.userAgent,e=!!t.match(/iPad/i)||!!t.match(/iPhone/i),r=!!t.match(/WebKit/i);return e&&r&&!t.match(/CriOS/i)&&!t.match(/OPiOS/i)}},{Device:E}=r(872).Core.Models,g=class extends E{constructor(t=null,e){super(t,e),null==t?(null!=o.getDeviceId()&&(this.deviceId=o.getDeviceId()),null!=o.getPushToken()&&(this.pushToken=o.getPushToken())):e?t.deviceId&&(this.deviceId=t.deviceId,o.setDeviceId(this.deviceId)):(t.deviceId&&(this.deviceId=t.deviceId),t.pushToken&&(this.pushToken=t.pushToken))}getDeviceId(){return this.deviceId}getPushToken(){return this.pushToken}toJSON(){const t=super.toJSON();return this.deviceId&&(t.deviceId=this.deviceId),this.pushToken&&(t.pushToken=this.pushToken),t}},{Config:m}=r(872).Core,{BaseClient:I}=r(872).Core.Api,{ErrorModel:_}=r(872).Core.Models,{Log:b,CommonUtils:O,ErrorUtils:S}=r(872).Core.Utils,w=new class extends I{constructor(){super(),this.URL_BASE=m.client.URL_BASE,this.ENDPOINT_APPLICATION="/application",this.ENDPOINT_APPLICATION_ALL=this.ENDPOINT_APPLICATION+"/all",this.ENDPOINT_DEVICE="/device",this.ENDPOINT_DEVICE_TOPICS=this.ENDPOINT_DEVICE+"/topics",this.ENDPOINT_PUSH="/push",this.ENDPOINT_EVENT="/event",this.ENDPOINT_EVENT_PUSH=this.ENDPOINT_EVENT+"/push",this.ENDPOINT_EVENT_VISIT=this.ENDPOINT_EVENT+"/visit",this.ENDPOINT_EVENT_PERMISSION=this.ENDPOINT_EVENT+"/permission",this.ENDPOINT_EVENT_LOCATION=this.ENDPOINT_EVENT+"/location",this.ENDPOINT_EVENT_CUSTOM=this.ENDPOINT_EVENT+"/custom",this.ENDPOINT_EVENT_CUSTOM_BEACON=this.ENDPOINT_EVENT_CUSTOM+"/beacon",this.ENDPOINT_BROWSER="/browser",this.log=new b("[IND]Client: ")}async getURL(){return await o.getUrlDeviceApi()||this.URL_BASE}async getApplicationAll(t,e,r){if(v.isAppKeyFormat()){const n=await this.get(this.ENDPOINT_APPLICATION_ALL,t.getApplicationRequest());!n||n instanceof _?n?O.isFunction(r)&&r(n):O.isFunction(r)&&r():O.isFunction(e)&&e(n)}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.BAD_REQUEST_SERVER_ERROR));return!0}async postDevice(t,e,r){if(v.isAppKeyFormat()){const n=await this.post(this.ENDPOINT_DEVICE,t.postDeviceRequest(),"include");if(!n||n instanceof _)n?O.isFunction(r)&&r(n):O.isFunction(r)&&r();else{const t={enabled:n.data.enabled,deviceId:n.data.deviceId,registeredByCookie:n.data.registeredByCookie};await o.setDeviceId(t.deviceId),O.isFunction(e)&&e(new g(t,!0))}}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_APPKEY_BAD_REQUEST));return!0}async putDevice(t,e,r){const n=new g,i=await v.isPutRequestExceed();if(t.deviceUpdate||null==await o.getPutRequestTimestamp()||i)if(v.isValidFormatRequest()){o.setPutRequestTimestamp(await d.getPutRequestTimestamp());const i=await this.put(this.ENDPOINT_DEVICE,t.putDeviceRequest(n),"include");if(!i||i instanceof _)i?O.isFunction(r)&&r(i):O.isFunction(r)&&r();else{const t={enabled:i.data.enabled,deviceId:i.data.deviceId,registeredByCookie:i.data.registeredByCookie};O.isFunction(e)&&e(new g(t,!0))}}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));else O.isFunction(e)&&e(n)}async getDevice(t,e,r){if(v.isValidFormatRequest()){const n=await this.get(this.ENDPOINT_DEVICE,t.getDeviceRequest());if(!n||n instanceof _)n?O.isFunction(r)&&r(n):O.isFunction(r)&&r();else{const t={enabled:n.data.enabled,deviceId:n.data.deviceId};O.isFunction(e)&&e(new g(t,!0))}}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async getDeviceTopics(t,e,r){if(v.isValidFormatRequest()){const n=await this.get(this.ENDPOINT_DEVICE_TOPICS,t.getDeviceTopicsRequest());if(!n||n instanceof _)n?O.isFunction(r)&&r(n):O.isFunction(r)&&r();else{const t=n.data.topics;O.isFunction(e)&&e(t)}}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postDeviceTopics(t,e,r){if(v.isValidFormatRequest()){const n=await this.post(this.ENDPOINT_DEVICE_TOPICS,t.postDeviceTopicsRequest());if(!n||n instanceof _)n?O.isFunction(r)&&r(n):O.isFunction(r)&&r();else{const t=n.data.topics;O.isFunction(e)&&e(t)}}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async deleteDeviceTopics(t,e,r){if(v.isValidFormatRequest()){const n=await this.delete(this.ENDPOINT_DEVICE_TOPICS,t.deleteDeviceTopicsRequest());if(!n||n instanceof _)n?O.isFunction(r)&&r(n):O.isFunction(r)&&r();else{const t=n.data.topics;O.isFunction(e)&&e(t)}}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventPush(t){v.isValidFormatRequest()&&await this.post(this.ENDPOINT_EVENT_PUSH,t.postEventPushRequest())}postEventVisit(t){v.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_VISIT,t.postEventVisitRequest())}postEventPermission(t){v.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_PERMISSION,t.postEventPermissionRequest())}postEventLocation(t){v.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_LOCATION,t.postEventLocationRequest())}async getBrowser(t,e,r){if(v.isAppKeyFormat()){const n=await this.get(this.ENDPOINT_BROWSER,t);if(!n||n instanceof _)n?O.isFunction(r)&&r(n):O.isFunction(r)&&r();else{const t={browserName:n.data.browserName,browserVersion:n.data.browserVersion,deviceType:n.data.deviceType,osName:n.data.osName,osVersion:n.data.osVersion,supported:n.data.supported,platform:n.data.platform};await o.setBrowserName(t.browserName),o.setBrowserVersion(t.browserVersion),await o.setOsName(t.osName),o.setOsVersion(t.osVersion),o.setDeviceType(t.deviceType),o.setSupported(t.supported),v.isSafariBrowserDevice()?await o.setPlatform("webpush"):await o.setPlatform(t.platform),O.isFunction(e)&&e(t)}}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventCustom(t,e,r){if(v.isValidFormatRequest()){const n=await this.post(this.ENDPOINT_EVENT_CUSTOM,t.postEventCustomRequest());!n||n instanceof _?n?O.isFunction(r)&&r(n):O.isFunction(r)&&r():O.isFunction(e)&&e(n)}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventCustomSync(t,e,r){if(v.isValidFormatRequest()){t=t.postEventCustomRequest();try{if(navigator&&"sendBeacon"in navigator){const r=await this.getURL()+this.ENDPOINT_EVENT_CUSTOM_BEACON+t.getParams();navigator.sendBeacon(r,JSON.stringify(t.getBody())),O.isFunction(e)&&e()}else{const n=await this.getURL()+this.ENDPOINT_EVENT_CUSTOM+t.getParams(),i=new XMLHttpRequest;i.open("POST",n,!1),i.setRequestHeader("Content-Type","application/json"),i.onreadystatechange=()=>{i.readyState===XMLHttpRequest.DONE&&(i.status>=200||i.status<300)?O.isFunction(e)&&e():O.isFunction(r)&&r()},i.send(JSON.stringify(t.getBody()))}}catch(t){O.isFunction(r)&&r(S.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventJourney(t,e,r){if(v.isValidFormatRequest()){const n=await this.post(this.ENDPOINT_PUSH+this.ENDPOINT_EVENT_CUSTOM,t.postEventCustomRequest());!n||n instanceof _?n?O.isFunction(r)&&r(n):O.isFunction(r)&&r():O.isFunction(e)&&e(n)}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventJourneySync(t,e,r){if(v.isValidFormatRequest()){t=t.postEventCustomRequest();try{let n=await this.getURL();if(n=n.replace("v1","v2"),navigator&&"sendBeacon"in navigator){const r=n+this.ENDPOINT_PUSH+this.ENDPOINT_EVENT_CUSTOM+t.getParams();navigator.sendBeacon(r,JSON.stringify(t.getBody())),O.isFunction(e)&&e()}else{const n=await this.getURL().replace("v1","v2")+this.ENDPOINT_PUSH+this.ENDPOINT_EVENT_CUSTOM+t.getParams(),i=new XMLHttpRequest;i.open("POST",n,!1),i.setRequestHeader("Content-Type","application/json"),i.onreadystatechange=()=>{i.readyState===XMLHttpRequest.DONE&&(i.status>=200||i.status<300)?O.isFunction(e)&&e():O.isFunction(r)&&r()},i.send(JSON.stringify(t.getBody()))}}catch(t){O.isFunction(r)&&r(S.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}else O.isFunction(r)&&r(S.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}},{Config:P}=r(872).Core,{BaseRequest:R}=r(872).Core.Api,T=class extends R{getApplicationRequest(){return this.params=this.PARAM_PLATFORM+"="+P.platform,this}},{DeviceStatus:A}=r(872).Core.Models,{BaseRequest:N}=r(872).Core.Api,L=class extends N{constructor(t=A.DEFAULT){super(),this.device=new g,this.status=t,this.notToUpdate=!1,this.deviceUpdate=!1}isDeviceUpdated(t){this.deviceUpdate=t}setDeviceId(t){this.device&&(this.device.deviceId=t)}setAppKey(t){this.appKey=t}getDeviceRequest(){return this.params=this.createQueryString(),this}postDeviceRequest(){return this.body=this.createDeviceJson(),this.status!==A.DEFAULT&&(this.body.enabled=1===this.status),this}putDeviceRequest(t){return this.params=this.createQueryString(),this.body=this.createPUTDeviceJson(t),this.status!==A.DEFAULT&&(this.body.enabled=1===this.status),this}getDeviceTopicsRequest(){return this.params=this.createQueryString(),this}postDeviceTopicsRequest(){return this.params=this.createQueryString(),this.body=this.createTopicsJson(),this}deleteDeviceTopicsRequest(){return this.params=this.createQueryString(),this.body=this.createTopicsJson(),this}createQueryString(){return this.PARAM_DEVICE_ID+"="+this.device.deviceId}createDeviceJson(){let t={};try{t=this.device.toJSON()}catch(t){}return t}createPUTDeviceJson(t){let e={};try{g.setDeviceJson(t),e=t.toJSON()}catch(t){}return e}createTopicsJson(){const t={};return this.topics&&(t.topics=this.topics),t}getDeviceId(){return this.device.getDeviceId()}setTopics(t){this.topics=t}setExternalCode(t){this.device.setExternalCode(t)}},D=Object.freeze({PERMISSION_TYPE_PUSH:"push",PERMISSION_TYPE_LOCATION:"location"}),{CorePermissions:C}=r(872).Core.Utils,x=class{static async getPermissions(){const t=await C.getPermissions(),e=await C.getPermission("push");return e&&(t.push=e.state),null===e&&window.Notification&&window.Notification.permission&&(t.push=window.Notification.permission),t}static async setPermissionsCallback(){C.setPermissionsCallback(),await C.setCallback("push",navigator.indigitallRequestPushPermission)}},{Log:M,CommonUtils:k,ErrorUtils:B}=r(872).Core.Utils,{EventType:U}=r(872).Core.Models,j="[IND]IndigitallSafari: ",V=class{static isSafariPushNotificationSupported(){return!!v.isSafariBrowserDevice()||"safari"in window&&"pushNotification"in window.safari}static async launchNotificationPermissionForSafari(){const t=new M(j);if(o.getSafariGestureRequestPermission()===U.EVENT_TYPE_ASK)if(o.getSafariWebsitePushId()&&o.getDeviceId())if(v.isSafariBrowserDevice()&&o.getWorkerPath()){const t=await navigator.serviceWorker.register(o.getWorkerPath());"granted"===await window.Notification.requestPermission()&&(o.setPermissionPush(U.EVENT_TYPE_ACCEPT),Q.subscribeForPushNotification(t))}else{const t=window.safari.pushNotification.permission(o.getSafariWebsitePushId());this.checkRemotePermission(t)}else o.getSafariWebsitePushId()?t.w("error Device Id is not found").writeLog():t.w("error Safari Website Push Id is not found").writeLog();else t.w("there was not user gesture to request safari permissions").writeLog()}static async checkRemotePermission(t){const e=new M(j);try{if("default"===t.permission){const t={deviceCode:o.getDeviceId()};e.d("permission default: ",t).writeLog(),o.getPermissionPush()||d.callEventPermission(D.PERMISSION_TYPE_PUSH,U.EVENT_TYPE_ASK),window.safari.pushNotification.requestPermission(await w.getURL()+"/safari",o.getSafariWebsitePushId(),t,window.indigitall.Push.checkRemotePermission)}else"denied"===t.permission?(e.w("permission denied: ",t).writeLog(),o.getPermissionPush()&&o.getPermissionPush()!=U.EVENT_TYPE_REJECT&&(d.callEventPermission(D.PERMISSION_TYPE_PUSH,U.EVENT_TYPE_REJECT),o.setPermissionPush(U.EVENT_TYPE_REJECT))):"granted"===t.permission&&(e.d("permission granted: ",t).writeLog(),o.getPermissionPush()&&o.getPermissionPush()!=U.EVENT_TYPE_ACCEPT&&(d.callEventPermission(D.PERMISSION_TYPE_PUSH,U.EVENT_TYPE_ACCEPT),o.setPermissionPush(U.EVENT_TYPE_ACCEPT)),t.deviceToken&&t.deviceToken!==o.getPushToken()&&(o.setPushToken(t.deviceToken),w.putDevice(new L,(t=>{if(k.isFunction(navigator.indigitallOnInitialized)){const t={};t.push=o.getPermissionPush(),t.location=o.getPermissionLocation(),navigator.indigitallOnInitialized(t,new g)}k.isFunction(navigator.indigitallOnNewUserRegistered)&&!o.getNewUserTimestamp()&&(o.setNewUserTimestamp(Date.now()),navigator.indigitallOnNewUserRegistered(t)),Q.registerLocation()}),navigator.indigitallOnError),o.setServiceTimestamp(Date.now())))}catch(t){k.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(B.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}},{EventType:F,DeviceStatus:Y}=r(872).Core.Models,{LogLevel:G,Log:K,CommonUtils:q,ErrorUtils:W,CryptoUtils:J}=r(872).Core.Utils,X="[IND]IndigitallPush: ";class H{constructor(){this.config=null}static async init(t){try{let r=new K(X);if(!t)return void r.w("config is not defined").writeLog();t.onPushPermissionChanged&&(t.requestPushPermission=t.onPushPermissionChanged),t.onLocationPermissionChanged&&(t.requestLocationPermission=t.onLocationPermissionChanged),this.config=t,this.config.logLevel?(o.setLogLevel(this.config.logLevel),r=new K(X)):this.config.setDebugLog&&(o.setLogLevel(G.WARNING),r=new K(X));let n="https://device-api.indigitall.com/v1",i="https://inbox-api.indigitall.com/v1";this.config.urlDeviceApi&&(n=this.config.urlDeviceApi),this.config.urlInboxApi&&(i=this.config.urlInboxApi),await o.setUrlDeviceApi(n),e()&&e().setUrlInboxApi(i),q.isFunction(this.config.requestPushPermission)&&(navigator.indigitallRequestPushPermission=this.config.requestPushPermission),q.isFunction(this.config.requestLocationPermission)&&(navigator.indigitallRequestLocationPermission=this.config.requestLocationPermission),q.isFunction(this.config.onNewUserRegistered)&&(navigator.indigitallOnNewUserRegistered=this.config.onNewUserRegistered),q.isFunction(this.config.onInitialized)&&(navigator.indigitallOnInitialized=this.config.onInitialized),q.isFunction(this.config.onError)&&(navigator.indigitallOnError=this.config.onError),q.isFunction(this.config.onLocationUpdated)&&(navigator.indigitallOnLocationUpdated=this.config.onLocationUpdated);const s=await x.getPermissions();if(x.setPermissionsCallback(),s&&"denied"===s.push)return r.i("Push permission denied").writeLog(),q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError("Push permission denied"),!1;if(!q.isServiceTimestampExceed())return this.device=new g,x.getPermissions().then((t=>{q.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(t,new g)})),r.d("Device enabled").writeLog(),!0;{let t="",n=null;if(!this.config||!this.config.appKey)return r.w("config.appKey is not defined").writeLog(),!1;if(t=this.config.appKey,this.config.requestLocation&&await o.setRequestLocation(this.config.requestLocation),this.config.workerPath&&(n=this.config.workerPath),t){if(await o.setAppKey(t),H.isServiceWorkerSupported()||V.isSafariPushNotificationSupported()){const t=new T;return w.getBrowser(t,(t=>{if(t.supported||this.isSafariBrowserDevice()){r.d("browser supported for webpush").writeLog();const t=new T;w.getApplicationAll(t,(async t=>{if(r.d("application ",t).writeLog(),t&&t.data&&t.data.configuration){const n=t.data.configuration;r.d("configuration ",n).writeLog(),n.vapidPublic&&o.setVAPID(n.vapidPublic),n.safariWebsitePushId&&o.setSafariWebsitePushId(n.safariWebsitePushId),n.enabled&&o.setEnabled(n.enabled),n.serviceSyncTime&&o.setServiceSyncTime(n.serviceSyncTime),n.locationEnabled&&o.setLocationEnabled(n.locationEnabled),n.locationUpdateMinutes&&o.setLocationUpdateMinutes(n.locationUpdateMinutes),n.inboxAuthMode&&e()&&e().setInboxAuthMode(n.inboxAuthMode),n.inAppEnabled}const i=new L;o.getDeviceId()&&o.getPushToken()?w.putDevice(i,(t=>{try{if(q.isServiceTimestampExceed()){const t=new h;t.setAppKey(o.getAppKey()),t.setDeviceId(o.getDeviceId()),w.postEventVisit(t)}t.registeredByCookie?(o.setServiceTimestamp(Date.now()),x.getPermissions().then((t=>{const e=new g;e.deviceId&&r.i("deviceId:",e.deviceId).writeLog(),e.pushToken&&r.i("pushToken:",e.pushToken).writeLog(),this.config&&q.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(t,e)}))):H.registerForPush(n)}catch(t){q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(W.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}),navigator.indigitallOnError):w.postDevice(i,(t=>{try{const e=new h;e.setAppKey(o.getAppKey()),e.setDeviceId(o.getDeviceId()),w.postEventVisit(e),t.registeredByCookie?o.setServiceTimestamp(Date.now()):H.registerForPush(n)}catch(t){q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(W.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}),(t=>{404===t.errorCode&&o.clearStorage(),q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(t)}))}),navigator.indigitallOnError)}else r.w("Browser not Supported").writeLog()}),navigator.indigitallOnError),!0}r.w("ServiceWorker and SafariPushNotification not supported").writeLog()}else r.w("appKey is not found").writeLog()}}catch(t){q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(W.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}return!1}static deviceGet(t,e){return w.getDevice(new L,t,e),!0}static deviceEnable(t,e){const r=new L(Y.ENABLE);return r.isDeviceUpdated(!0),w.putDevice(r,t,e),!0}static deviceDisable(t,e){const r=new L(Y.DISABLE);return r.isDeviceUpdated(!0),w.putDevice(r,t,e),!0}static topicsList(t,e){return w.getDeviceTopics(new L,t,e),!0}static topicsSubscribe(t,e,r){const n=new L;return n.setTopics(t),w.postDeviceTopics(n,e,r),!0}static topicsUnsubscribe(t,e,r){const n=new L;return n.setTopics(t),w.deleteDeviceTopics(n,e,r),!0}static registerForPush(t){o.setWorkerPath(t),V.isSafariPushNotificationSupported()?V.launchNotificationPermissionForSafari():H.isServiceWorkerSupported()&&H.launchNotificationPermission(t)}static isSafariPushNotificationSupported(){return V.isSafariPushNotificationSupported()}static isSafariBrowserDevice(){return v.isSafariBrowserDevice()}static isServiceWorkerSupported(){return"serviceWorker"in navigator}static registerServiceWorker(t){const e=new K(X);let r="/service-worker.js";return t&&(r=t),navigator.serviceWorker.register(r).then((t=>(e.d("ServiceWorker registration successful with scope: "+t.scope).writeLog(),t))).catch((t=>(e.e("ServiceWorker registration failed: ",t).writeLog(),t)))}static launchNotificationPermission(t){const e=new K(X);this.registerServiceWorker(t).then((t=>{try{let r;t.installing?r=t.installing:t.waiting?r=t.waiting:t.active&&(r=t.active),r&&(e.d("sw current state "+r.state).writeLog(),"activated"==r.state?H.subscribeForPushNotification(t):("installed"==r.state&&o.getPushToken()&&t.update(),r.addEventListener("statechange",(function(r){e.d("sw statechange : "+r.target.state).writeLog(),"activated"==r.target.state&&H.subscribeForPushNotification(t)}))))}catch(t){q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(W.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}))}static async subscribeForPushNotification(t){const e=new K(X);try{const r=await new Promise(((r,n)=>{const i={userVisibleOnly:!0,applicationServerKey:d.urlBase64ToUint8Array(o.getVAPID())};return e.d("Registration: ",t).writeLog(),o.getPermissionPush()||d.callEventPermission(D.PERMISSION_TYPE_PUSH,F.EVENT_TYPE_ASK),r(t.pushManager.subscribe(i))}));e.d("Received PushSubscription: ",r).writeLog(),o.getPermissionPush()&&o.getPermissionPush()===F.EVENT_TYPE_ACCEPT||(d.callEventPermission(D.PERMISSION_TYPE_PUSH,F.EVENT_TYPE_ACCEPT),o.setPermissionPush(F.EVENT_TYPE_ACCEPT));const n=r.toJSON();o.setBrowserPublicKey(n.keys.p256dh),o.setBrowserPrivateKey(n.keys.auth),o.setPushToken(n.endpoint),w.putDevice(new L,(t=>{x.getPermissions().then((t=>{q.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(t,new g)})),q.isFunction(navigator.indigitallOnNewUserRegistered)&&!o.getNewUserTimestamp()&&(o.setNewUserTimestamp(Date.now()),navigator.indigitallOnNewUserRegistered(t)),H.registerLocation()}),navigator.indigitallOnError),o.setServiceTimestamp(Date.now())}catch(t){e.e("No Registration: "+t).writeLog(),o.getPermissionPush()&&o.getPermissionPush()===F.EVENT_TYPE_REJECT||(d.callEventPermission(D.PERMISSION_TYPE_PUSH,F.EVENT_TYPE_REJECT),o.setPermissionPush(F.EVENT_TYPE_REJECT)),q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(t)}}static async launchNotificationPermissionForSafari(){o.setSafariGestureRequestPermission(F.EVENT_TYPE_ASK),V.launchNotificationPermissionForSafari()}static async checkRemotePermission(t){V.checkRemotePermission(t)}static registerLocation(){const t=new K(X);try{navigator.geolocation&&o.getRequestLocation()&&o.getLocationEnabled()&&(!o.getLocationTimestamp()||o.getLocationUpdateMinutes()<=(Date.now()-o.getLocationTimestamp())/6e4)&&(o.getPermissionLocation()||d.callEventPermission(D.PERMISSION_TYPE_LOCATION,F.EVENT_TYPE_ASK),navigator.geolocation.getCurrentPosition((t=>{o.getPermissionLocation()||o.getPermissionLocation()==F.EVENT_TYPE_ACCEPT||(d.callEventPermission(D.PERMISSION_TYPE_LOCATION,F.EVENT_TYPE_ACCEPT),o.setPermissionLocation(F.EVENT_TYPE_ACCEPT));const e=new h;e.setLocation(t.coords.latitude,t.coords.longitude),w.postEventLocation(e),q.isFunction(navigator.indigitallOnLocationUpdated)&&navigator.indigitallOnLocationUpdated(t),o.setLocationTimestamp(Date.now())}),(e=>{t.e("error "+e).writeLog(),o.getPermissionLocation()||o.getPermissionLocation()==F.EVENT_TYPE_REJECT||(d.callEventPermission(D.PERMISSION_TYPE_LOCATION,F.EVENT_TYPE_REJECT),o.setPermissionLocation(F.EVENT_TYPE_REJECT))})))}catch(t){q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(W.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}static requestPushPermission(t){x.getPushPermission().then((e=>{q.isFunction(t)&&t(e)}))}static onPermissionChange(){x.setPermissionCallback()}static requestLocationPermission(t){x.getLocationPermission().then((e=>{q.isFunction(t)&&t(e)}))}static logIn(t,e,r){H.setExternalId(t,e,r)}static logout(t,e){H.setExternalId(null,t,e)}static setExternalCode(t,e,r){H.setExternalId(t,e,r)}static async setExternalId(t,e,r){try{const n=o.getAppKey();if(!n)return void(q.isFunction(r)&&r(W.showError(c,c.ErrorCode.API_APPKEY_NOT_VALID)));if(null!=t){const i=await J.createHmac(n,t);i&&this.setExternalIdRequest(i,e,r)}else this.setExternalIdRequest(null,e,r)}catch(t){q.isFunction(r)&&r(W.showError(c,c.ErrorCode.PUSH_DEVICE_ERROR,t))}}static async setExternalIdRequest(t,e,r){const n=new L;o.setExternalId(t),await o.setExternalIdRequest(t),n.setExternalCode(t),n.isDeviceUpdated(!0),w.putDevice(n,(t=>{q.isFunction(e)&&e(new g(t))}),r)}static sendCustomEvent(t,e,r){try{let n="",i={},s=!0;"string"==typeof t?n=t:"object"==typeof t&&(n=t.eventType,t.customData&&(i=t.customData),!1===t.async&&(s=t.async));const a=new h;a.setDeviceId(o.getDeviceId()),a.setEventType(n),a.setCustomData(i),null!=o.getExternalId()&&"null"!=o.getExternalId()?(a.setExternalCode(o.getExternalId()),a.setJourneyRequest(!0),!1===s?w.postEventJourneySync(a,e,r):w.postEventJourney(a,e,r)):!1===s?w.postEventCustomSync(a,e,r):w.postEventCustom(a,e,r)}catch(t){q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(W.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}static sendJourneyEvent(t,e,r){try{let n="",i={},s=!0;"string"==typeof t?n=t:"object"==typeof t&&(n=t.eventType,t.customData&&(i=t.customData),!1===t.async&&(s=t.async));const a=new h;a.setDeviceId(o.getDeviceId()),a.setExternalCodeRequest(),a.setEventType(n),a.setCustomData(i),a.setJourneyRequest(!0),!1===s?w.postEventJourneySync(a,e,r):w.postEventJourney(a,e,r)}catch(t){q.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(W.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}}const Q=H;window.indigitall||(window.indigitall={}),window.indigitall.Push=H,window.indigitall.LogLevel=G,window.indigitall.version=o.getVersion()})(),n})(),t.exports=e()},248:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.2.4","_id":"indigitall-web-core@4.2.4","_inBundle":false,"_integrity":"sha512-XBgYKfMnDxWIfvgYuxJj4nZ9vJiZms1a2Hwe4CCuH06FnePS0wTbOBSP9QMLOOTj75PWrYEYlJECY5+/Yl5TgA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.2.4","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.2.4","saveSpec":null,"fetchSpec":"4.2.4"},"_requiredBy":["#USER","/","/indigitall-web-notification"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.2.4.tgz","_shasum":"652eee30d5ee8be997152afce6b411c6c83946d3","_spec":"indigitall-web-core@4.2.4","_where":"/home/circleci/webpush/sdk","author":{"name":"Smart2me S.L."},"bundleDependencies":false,"deprecated":false,"description":"indigitall web core","devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","script-loader":"^0.7.2","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"homepage":"https://indigitall.com","main":"index.js","name":"indigitall-web-core","scripts":{"build":"webpack --config webpack.config.js --mode=production","build-dev":"webpack --config webpack.config.js --watch --mode=development","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json","install-core":"npm install && npm run build","public":"ws --directory ./public --port 80 --log.format dev","test":"echo \'There are not tests\'"},"version":"4.2.4"}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(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.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n);var t=r(396),e=r.n(t),i=r(277),o=r.n(i),s=r(413),a=r.n(s),u=r(735),c=r.n(u);const{Channel:l}=r(872).Core.Models,{LogLevel:f,CommonUtils:h}=r(872).Core.Utils,{Repository:d}=r(872).Core;class p{constructor(){this.config=null}static async init(t){return c().init(t)}static deviceGet(t,e){return c().devideGet(t,e)}static deviceEnable(t,e){return c().deviceEnable(t,e)}static deviceDisable(t,e){return c().deviceDisable(t,e)}static topicsList(t,e){return c().topicsList(t,e)}static topicsSubscribe(t,r,n){return e().topicsSubscribe(t),c().topicsSubscribe(t,r,n)}static topicsUnsubscribe(t,r,n){return e().topicsUnsubscribe(t),topicsUnsubscribe(t,r,n)}static async setExternalId(t,e,r){c().setExternalId(t,e,r)}static logIn(t,e,r){p.setExternalId(t,e,r)}static logout(t,e){p.setExternalId(null,t,e)}static sendCustomEvent(t,e,r){c().sendCustomEvent(t,e,r)}static sendJourneyEvent(t,e,r){c().sendJourneyEvent(t,e,r)}static isServiceWorkerSupported(){return c().isServiceWorkerSupported()}static isSafariPushNotificationSupported(){return c().isSafariPushNotificationSupported()}static isSafariPermissionAsked(){return c().isSafariPermissionAsked()}static isSafariBrowserDevice(){return c().isSafariBrowserDevice()}static launchNotificationPermissionForSafari(){c().launchNotificationPermissionForSafari()}static async showInApp(t,r,n,i){e().showInApp(t,r,n,i)}static async showInAppWithConfig(t,r,n,i,o,s,a,u,c,l,f){e().showInAppWithConfig(t,r,n,i,o,s,a,u,c,l,f)}static showMultipleInApp(t,r,n,i){e().showMultipleInApp(t,r,n,i)}static async showMultipleInAppWithConfig(t,r,n,i,o,s,a,u,c,l,f){e().showMultipleInAppWithConfig(t,r,n,i,o,s,a,u,c,l,f)}static getInboxMessagesCount(t,e,r){o().getMessagesCount(t,e,r)}static getInbox(t,e,r){o().getInbox(t,e,r)}static getInboxWithPage(t,e,r,n,i,s,a,u){o().getInboxWithPage(t,e,r,n,i,s,a,u)}static getCustomer(t,e){a().getCustomer(t,e)}static getCustomerInformation(t,e){this.getCustomerInformationWithFields(null,t,e)}static getCustomerInformationWithFields(t,e,r){a().getCustomerInformation(t,e,r)}static assignOrUpdateValueToCustomerFields(t,e,r){a().assignOrUpdateValueToCustomerFields(t,e,r)}static deleteValuesFromCustomerFields(t,e,r){a().deleteValuesFromCustomerFields(t,e,r)}static link(t,e,r,n){p.logIn(t,(t=>{a().link(e,r,n)}),(t=>{h.isFunction(n)&&n(t)}))}static unlink(t,e,r){p.logout((n=>{a().unlink(t,e,r)}),(t=>{h.isFunction(r)&&r(t)}))}}window.indigitall=p,window.indigitall.InApp=e(),window.indigitall.Inbox=o(),window.indigitall.Customer=a(),window.indigitall.Push=c(),window.indigitall.InApp.Utils=e().Utils,window.indigitall.Channel=l,window.indigitall.LogLevel=f})(),n})()));
|