indigitall-web-sdk 4.9.0 → 4.9.2

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/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={710:function(t){var e;e=()=>(()=>{"use strict";var t={330:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.9.0","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={};r.r(n),r.d(n,{default:()=>Y});var i={};r.r(i),r.d(i,{BaseApplicationRequest:()=>P,BaseClient:()=>S,BaseRequest:()=>O});var o={};r.r(o),r.d(o,{Channel:()=>R,CoreApplication:()=>L,Device:()=>T,DeviceStatus:()=>A,ErrorDictionary:()=>_,ErrorModel:()=>I,EventType:()=>w,TopicSubscribeType:()=>N});var s={};r.r(s),r.d(s,{CommonUtils:()=>C,CorePermissions:()=>D,CryptoUtils:()=>B,ErrorUtils:()=>b,JsonUtils:()=>U,Log:()=>m,LogLevel:()=>y,TopicUtils:()=>j,Validations:()=>V});var a={platform:"webpush",version:"0.0.1"};const u=r(330);a.version=u.version;const c=a=Object.assign(a,{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"}}),l=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!==l.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()}},h=l,f=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}}},d=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!==d.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")}},p=d,E=class{constructor(){this.storage=h,this.db=f,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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"}setItemSessionStorage(t,e){p.setItem(t,e)}getItemSessionStorage(t){return p.getItem(t)}clearSessionStorage(){p.clearMessages()}setStorage(t,e){h.setItem(t,e)}getStorage(t){return h.getItem(t)}clearStorage(){h.clear()}setBrowserPublicKey(t){h.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return h.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){h.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return h.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){h.setItem(this.APP_KEY,t),f&&f.IDB&&await f.setItem(this.APP_KEY,t)}getAppKey(){return h.getItem(this.APP_KEY)}async getAppKeySync(){if(f&&f.IDB)return await f.getItem(this.APP_KEY)}setVAPID(t){h.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return h.getItem(this.VAPID_PUBLIC)}setEnabled(t){h.setItem(this.ENABLED,t)}getEnabled(){return h.getItem(this.ENABLED)}setServiceSyncTime(t){h.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return h.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){h.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return h.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){h.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return h.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){h.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!h&&h.getItem(this.REQUEST_LOCATION)}async setPlatform(t){h.setItem(this.PLATFORM,t)}getPlatform(){return h&&h.getItem(this.PLATFORM)||c.platform}getVersion(){return c.version}async setBrowserName(t){h.setItem(this.BROWSER_NAME,t)}getBrowserName(){return h.getItem(this.BROWSER_NAME)}setBrowserVersion(t){h.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return h.getItem(this.BROWSER_VERSION)}async setOsName(t){h.setItem(this.OS_NAME,t)}getOsName(){return h.getItem(this.OS_NAME)}setOsVersion(t){h.setItem(this.OS_VERSION,t)}getOsVersion(){return h.getItem(this.OS_VERSION)}setDeviceType(t){h.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return h.getItem(this.DEVICE_TYPE)}setSupported(t){h.setItem(this.SUPPORTED,t)}getSupported(){return h.getItem(this.SUPPORTED)}setServiceTimestamp(t){h.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return h.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){h.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return h.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){h.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return h.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){h.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==h.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){h.setItem(this.LOG_LEVEL,t)}getLogLevel(){return h.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){h.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return h.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){h&&h.isLocalStorageAvailable()&&h.setItem(this.EXTERNAL_ID,t),f&&f.IDB&&await f.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{h&&h.isLocalStorageAvailable()?t=h.getItem(this.EXTERNAL_ID):f&&f.IDB&&(t=await f.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){h.setItem(this.EXTERNAL_ID,t)}getExternalId(){return h.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return h.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){h.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){h.setItem(this.LATITUDE,t)}getLatitude(){return h.getItem(this.LATITUDE)}setLongitude(t){h.setItem(this.LONGITUDE,t)}getLongitude(){return h.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}setAvoidCypher(t){this.setStorage(this.AVOID_CYPHER,t)}isAvoidCypher(){return this.getStorage(this.AVOID_CYPHER)}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)}setPushDisabled(t){this.setStorage(this.PUSH_DISABLED,t)}isPushDisabled(){return this.getStorage(this.PUSH_DISABLED)}getConfigV2ServiceSyncTime(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}setConfigV2ServiceSyncTime(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}getConfigV2(){return this.getStorage(this.CONFIG_V2)}setConfigV2(t){this.setStorage(this.CONFIG_V2,t)}getMaintenanceEnd(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}setMaintenanceEnd(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}getMaintenanceStart(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}setMaintenanceStart(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}},y=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),v=y;class g{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=v.INFO,this.setLogLevel((new E).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=v.DEBUG&&t<=v.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=v.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}i(){if(this.level<=v.INFO)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}w(){if(this.level<=v.WARNING)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}e(){if(this.level<=v.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const m=g,I=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=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"}},b=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);if(n>=0){const e=Object.keys(t.ErrorCode)[n],i=Object.values(t.ErrorCode)[n];return new I({code:e,errorId:i},Object.values(t.ErrorMessage)[n],r)}return new I(_.ErrorCode.GENERAL_ERROR,"general error",r)}}},S=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 m("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(v.DEBUG);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);if(304!=e.status){const 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 I(n.statusCode,n.message))}return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+e.status+"\n").writeLog(),e}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(),b.showError(_,_.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)}},O=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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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 E).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}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},P=class extends O{constructor(t=null){super(),this.PARAM_APPLICATION_CHANNEL="channel",this.channels=t}getApplicationRequest(){return this.params=this.createQueryString(),this}createQueryString(){let t="";if(this.channels&&this.channels.length>0)for(let e=0;e<this.channels.length;e++)t+=`${this.PARAM_APPLICATION_CHANNEL}=${this.channels[e].toLowerCase()}&`;return t+=`${this.PARAM_PLATFORM}=webpush`,t}},R=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"}),T=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new E).getBrowserPublicKey(),this.browserPrivateKey=(new E).getBrowserPrivateKey(),this.platform=(new E).getPlatform(),this.version=(new E).getVersion(),this.browserName=(new E).getBrowserName(),this.browserVersion=(new E).getBrowserVersion(),this.osName=(new E).getOsName(),this.osVersion=(new E).getOsVersion(),this.deviceType=(new E).getDeviceType(),(new E).getEnabled()&&(this.enabled="true"===(new E).getEnabled()),(new E).getExternalId()&&(this.externalCode=(new E).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new E).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new E).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}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}},A=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=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"}),N=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),L=class{constructor(t,e=!1){const r=new E;if(null!=t){r.setConfigV2(JSON.stringify(t)),t.contentAvailable&&(this.contentAvailable=t.contentAvailable),t.locationAccuracy&&(this.locationAccuracy=t.locationAccuracy),t.locationDistance&&(this.locationDistance=t.locationDistance),t.locationEnabled&&(this.locationEnabled=t.locationEnabled),t.locationUpdateMinutes&&(this.locationUpdateMinutes=t.locationUpdateMinutes),t.maintenanceWindow&&(this.maintenanceWindow=t.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,r.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,r.setMaintenanceEnd(this.maintenanceWindow.end))),t.networkEventsEnabled&&(this.networkEventsEnabled=t.networkEventsEnabled),t.networkUpdateMinutes&&(this.networkUpdateMinutes=t.networkUpdateMinutes);let n=Date.now();if(t.serviceSyncTime?(this.serviceSyncTime=t.serviceSyncTime,n=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):n=new Date(Date.now()+36e5),!e){const t=n.toString();new m("[IND]CoreApplication").d("ServiceSyncTime defined on: "+t).writeLog(),r.setConfigV2ServiceSyncTime(t)}}}},C=class{static isServiceTimestampExceed(){return!(new E).getServiceTimestamp()||(new E).getServiceSyncTime()<=(Date.now()-(new E).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},D=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 m("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},M=new m("[IND]Crypto"),k=new TextEncoder("utf-8"),x="HMAC",B=class{static async createHmac(t,e){try{let r="";if(!0===(new E).isAvoidCypher())r=e;else{const n=window?.crypto?.subtle;if(!n)return;const i=await n.importKey("raw",k.encode(t),{name:x,hash:{name:"SHA-256"}},!1,["sign","verify"]),o=await n.sign(x,i,k.encode(e)),s=new Uint8Array(o);r=Array.prototype.map.call(s,(t=>("00"+t.toString(16)).slice(-2))).join(""),M.d("hmac: ",r).writeLog()}return r}catch(t){return void M.e("error:",t).writeLog()}}},U=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}},V=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},j=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},Y={Repository:E,Config:c,Api:i,Models:o,Utils:s};return n})(),t.exports=e()},315:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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(710));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(610))&&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)}},468:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(254)),i=u(r(234)),o=u(r(457)),s=u(r(735)),a=u(r(630));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="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},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,s,a){var u=d(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==c(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,a,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,u,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(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){h(o,n,i,s,a,"next",t)}function a(t){h(o,n,i,s,a,"throw",t)}s(void 0)}))}}function d(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,p(n.key),n)}}function p(t){var e=function(t,e){if("object"!=c(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==c(e)?e:e+""}var E=function(){return t=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"},e=[{key:"getURL",value:(y=f(l().mark((function t(){return l().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:(E=f(l().mark((function t(e,r,u,c){var h,f,d,p,E;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return h=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&h.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),f=t.t2+t.t3,u.isJourneyRequest()&&(f=f.replace("v1","v2")),d={method:e,headers:u.addHeaders()},e!==this.GET&&(d.body=JSON.stringify(u.getBody())),c&&(d.credentials=c),t.prev=13,t.next=16,fetch(f,d);case 16:if(304==(p=t.sent).status){t.next=28;break}return t.next=20,p.json();case 20:if(E=t.sent,!p.ok){t.next=24;break}return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\nResponse Body:",JSON.stringify(E.data,null,"\t")).writeLog(),t.abrupt("return",E);case 24:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\n").writeLog(),t.abrupt("return",new i.default(E.statusCode,E.message));case 28:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.status+"\n").writeLog(),t.abrupt("return",p);case 30:t.next=36;break;case 32:return t.prev=32,t.t4=t.catch(13),h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 36:case"end":return t.stop()}}),t,this,[[13,32]])}))),function(t,e,r,n){return E.apply(this,arguments)})},{key:"get",value:(p=f(l().mark((function t(e,r){return l().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:(h=f(l().mark((function t(e,r,n){return l().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 h.apply(this,arguments)})},{key:"put",value:(c=f(l().mark((function t(e,r,n){return l().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 c.apply(this,arguments)})},{key:"delete",value:(u=f(l().mark((function t(e,r){return l().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)})}],e&&d(t.prototype,e),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,u,c,h,p,E,y}();e.default=E},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseApplicationRequest",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=s(r(468)),i=s(r(237)),o=s(r(773));function s(t){return t&&t.__esModule?t:{default:t}}},773:(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)}var i;function o(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,s(n.key),n)}}function s(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}function a(t,e,r){return e=c(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,u()?Reflect.construct(e,r||[],c(t).constructor):e.apply(t,r))}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(u=function(){return!!t})()}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var h=function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=a(this,e)).PARAM_APPLICATION_CHANNEL="channel",t.channels=r,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(e,t),function(t,e,r){return e&&o(t.prototype,e),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"getApplicationRequest",value:function(){return this.params=this.createQueryString(),this}},{key:"createQueryString",value:function(){var t="";if(this.channels&&this.channels.length>0)for(var e=0;e<this.channels.length;e++)t+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[e].toLowerCase(),"&");return t+="".concat(this.PARAM_PLATFORM,"=webpush")}}])}(((i=r(237))&&i.__esModule?i:{default:i}).default);e.default=h},237:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t,e){if("object"!=o(t)||!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)}(t,"string");return"symbol"==o(e)?e:e+""}var u=function(){return function(t,e,r){return e&&s(t.prototype,e),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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={}}),[{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:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])}();e.default=u},122:(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(904);n.version=i.version,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=n},610:(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=h(r(122)),o=h(r(291)),s=l(r(545)),a=l(r(225)),u=l(r(628));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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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 h(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"});e.default=r},174:(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=s(r(291)),o=s(r(254));function s(t){return t&&t.__esModule?t:{default: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,c(n.key),n)}}function u(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}var l=u((function t(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=new i.default;if(null!=e){n.setConfigV2(JSON.stringify(e)),e.contentAvailable&&(this.contentAvailable=e.contentAvailable),e.locationAccuracy&&(this.locationAccuracy=e.locationAccuracy),e.locationDistance&&(this.locationDistance=e.locationDistance),e.locationEnabled&&(this.locationEnabled=e.locationEnabled),e.locationUpdateMinutes&&(this.locationUpdateMinutes=e.locationUpdateMinutes),e.maintenanceWindow&&(this.maintenanceWindow=e.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,n.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,n.setMaintenanceEnd(this.maintenanceWindow.end))),e.networkEventsEnabled&&(this.networkEventsEnabled=e.networkEventsEnabled),e.networkUpdateMinutes&&(this.networkUpdateMinutes=e.networkUpdateMinutes);var s=Date.now();if(e.serviceSyncTime?(this.serviceSyncTime=e.serviceSyncTime,s=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):s=new Date(Date.now()+36e5),!r){var a=s.toString();new o.default("[IND]CoreApplication").d("ServiceSyncTime defined on: "+a).writeLog(),n.setConfigV2ServiceSyncTime(a)}}}));e.default=l},395:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t,e){if("object"!=o(t)||!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)}(t,"string");return"symbol"==o(e)?e:e+""}var u=function(){return function(t,e,r){return e&&s(t.prototype,e),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((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()}),[{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}}])}();e.default=u},89:(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},735:(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},234:(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 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),n)}}function i(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t){var e=function(t,e){if("object"!=r(t)||!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)}(t,"string");return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=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=s},953:(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},72:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},225:(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,"CoreApplication",{enumerable:!0,get:function(){return l.default}}),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}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(902),i=h(r(395)),o=h(r(89)),s=h(r(735)),a=h(r(234)),u=h(r(953)),c=h(r(72)),l=h(r(174));function h(t){return t&&t.__esModule?t:{default:t}}},672:(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 e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:A(t,r,a)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function n(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==r(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=_,s(P,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,c,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.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&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 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,a(n.key),n)}}function a(t){var e=function(t,e){if("object"!=r(t)||!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)}(t,"string");return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=function(){return t=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},e=[{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)})}],e&&s(t.prototype,e),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i,a,u,c,l}();e.default=new u},87:(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 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),n)}}function i(t){var e=function(t,e){if("object"!=r(t)||!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)}(t,"string");return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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()}}],e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}());e.default=o},291:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(122)),i=a(r(87)),o=a(r(672)),s=a(r(238));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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,s,a){var c=d(t[i],t,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==u(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,a,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 h(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 f(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,d(n.key),n)}}function d(t){var e=function(t,e){if("object"!=u(t)||!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)}(t,"string");return"symbol"==u(e)?e:e+""}var p=function(){return t=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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"},e=[{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:(P=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return P.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"getAppKeySync",value:(O=h(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return O.apply(this,arguments)})},{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:(S=h(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 S.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(b=h(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 b.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:(_=h(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 _.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:(I=h(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 I.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:(m=h(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 m.apply(this,arguments)})},{key:"getExternalIdRequest",value:(g=h(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 g.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:"getRegisteredByCookie",value:(v=h(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 v.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(y=h(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 y.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)}},{key:"setInAppTopicList",value:(E=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"getInAppTopicList",value:(p=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return p.apply(this,arguments)})},{key:"setTopicList",value:(d=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"getTopicList",value:(l=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return l.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}},{key:"setAvoidCypher",value:function(t){this.setStorage(this.AVOID_CYPHER,t)}},{key:"isAvoidCypher",value:function(){return this.getStorage(this.AVOID_CYPHER)}},{key:"getUrlDeviceApi",value:(u=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.storage||!this.storage.isLocalStorageAvailable()){t.next=5;break}e=this.getStorage(this.URL_DEVICE_API),t.next=9;break;case 5:if(!this.db||!this.db.IDB){t.next=9;break}return t.next=8,this.db.getItem(this.URL_DEVICE_API);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 u.apply(this,arguments)})},{key:"setUrlDeviceApi",value:(a=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,e),!this.db||!this.db.IDB){t.next=4;break}return t.next=4,this.db.setItem(this.URL_DEVICE_API,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"setPushDisabled",value:function(t){this.setStorage(this.PUSH_DISABLED,t)}},{key:"isPushDisabled",value:function(){return this.getStorage(this.PUSH_DISABLED)}},{key:"getConfigV2ServiceSyncTime",value:function(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}},{key:"setConfigV2ServiceSyncTime",value:function(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}},{key:"getConfigV2",value:function(){return this.getStorage(this.CONFIG_V2)}},{key:"setConfigV2",value:function(t){this.setStorage(this.CONFIG_V2,t)}},{key:"getMaintenanceEnd",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}},{key:"setMaintenanceEnd",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}},{key:"getMaintenanceStart",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}},{key:"setMaintenanceStart",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}}],e&&f(t.prototype,e),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,a,u,l,d,p,E,y,v,g,m,I,_,b,S,O,P}();e.default=p},238:(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 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),n)}}function i(t){var e=function(t,e){if("object"!=r(t)||!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)}(t,"string");return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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")}}],e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}());e.default=o},622:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t,e){if("object"!=o(t)||!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)}(t,"string");return"symbol"==o(e)?e:e+""}var u=function(){return function(t,e,r){return e&&s(t.prototype,e),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),null,[{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)}}])}();e.default=u},429:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(254))&&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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,c,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,l(n.key),n)}}function l(t){var e=function(t,e){if("object"!=o(t)||!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)}(t,"string");return"symbol"==o(e)?e:e+""}var h=function(){return function(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),null,[{key:"getPermissions",value:(n=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 n.apply(this,arguments)})},{key:"getPermission",value:(r=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 r.apply(this,arguments)})},{key:"setPermissionsCallback",value:(e=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 e.apply(this,arguments)})},{key:"setCallback",value:(t=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(e,r){return t.apply(this,arguments)})}]);var t,e,r,n}();e.default=h},170:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var n=i(r(291));function i(t){return t&&t.__esModule?t:{default:t}}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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,c,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,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,c(n.key),n)}}function c(t){var e=function(t,e){if("object"!=o(t)||!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)}(t,"string");return"symbol"==o(e)?e:e+""}var l=new(i(r(254)).default)("[IND]Crypto"),h=new TextEncoder("utf-8"),f="HMAC",d=e.CryptoUtils=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=null,r=[{key:"createHmac",value:(i=s().mark((function t(e,r){var i,o,a,u,c,d;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i="",!0!==(new n.default).isAvoidCypher()){t.next=6;break}i=r,t.next=18;break;case 6:if(a=null===(o=window)||void 0===o||null===(o=o.crypto)||void 0===o?void 0:o.subtle){t.next=9;break}return t.abrupt("return");case 9:return t.next=11,a.importKey("raw",h.encode(e),{name:f,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 11:return u=t.sent,t.next=14,a.sign(f,u,h.encode(r));case 14:c=t.sent,d=new Uint8Array(c),i=Array.prototype.map.call(d,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),l.d("hmac: ",i).writeLog();case 18:return t.abrupt("return",i);case 21:return t.prev=21,t.t0=t.catch(0),l.e("error:",t.t0).writeLog(),t.abrupt("return");case 25:case"end":return t.stop()}}),t,null,[[0,21]])})),o=function(){var t=this,e=arguments;return new Promise((function(r,n){var o=i.apply(t,e);function s(t){a(o,r,n,s,u,"next",t)}function u(t){a(o,r,n,s,u,"throw",t)}s(void 0)}))},function(t,e){return o.apply(this,arguments)})}],e&&u(t.prototype,e),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i,o}();e.default=d},457:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(735)),i=o(r(234));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,u(n.key),n)}}function u(t){var e=function(t,e){if("object"!=s(t)||!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)}(t,"string");return"symbol"==s(e)?e:e+""}var c=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},(e=[{key:"showError",value:function(t,e,r){if(null!=t){var o=Object.values(t.ErrorCode).indexOf(e);if(o>=0){var s={code:Object.keys(t.ErrorCode)[o],errorId:Object.values(t.ErrorCode)[o]};return new i.default(s,Object.values(t.ErrorMessage)[o],r)}return new i.default(n.default.ErrorCode.GENERAL_ERROR,"general error",r)}}}])&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();e.default=new c},325:(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 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),n)}}function i(t){var e=function(t,e){if("object"!=r(t)||!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)}(t,"string");return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,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}}],(e=null)&&n(t.prototype,e),i&&n(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,i}();e.default=o},254:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(291)),i=o(r(630));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,u(n.key),n)}}function u(t){var e=function(t,e){if("object"!=s(t)||!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)}(t,"string");return"symbol"==s(e)?e:e+""}var c=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=[]}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}),e;var e,r,o}();e.default=c},630:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},662:(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 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),n)}}function i(t){var e=function(t,e){if("object"!=r(t)||!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)}(t,"string");return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},r=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],(e=null)&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();e.default=o},332:(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 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),n)}}function i(t){var e=function(t,e){if("object"!=r(t)||!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)}(t,"string");return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],(e=null)&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();e.default=o},628:(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,"TopicUtils",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(622)),i=f(r(429)),o=f(r(170)),s=f(r(457)),a=f(r(325)),u=f(r(254)),c=r(630),l=f(r(332)),h=f(r(662));function f(t){return t&&t.__esModule?t:{default:t}}},740:function(t){var e;e=()=>(()=>{var t={710:function(t){var e;e=()=>(()=>{"use strict";var t={330:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.9.0","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={};r.r(n),r.d(n,{default:()=>Y});var i={};r.r(i),r.d(i,{BaseApplicationRequest:()=>P,BaseClient:()=>S,BaseRequest:()=>O});var o={};r.r(o),r.d(o,{Channel:()=>R,CoreApplication:()=>L,Device:()=>T,DeviceStatus:()=>A,ErrorDictionary:()=>_,ErrorModel:()=>I,EventType:()=>w,TopicSubscribeType:()=>N});var s={};r.r(s),r.d(s,{CommonUtils:()=>C,CorePermissions:()=>D,CryptoUtils:()=>B,ErrorUtils:()=>b,JsonUtils:()=>U,Log:()=>m,LogLevel:()=>y,TopicUtils:()=>j,Validations:()=>V});var a={platform:"webpush",version:"0.0.1"};const u=r(330);a.version=u.version;const c=a=Object.assign(a,{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"}}),l=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!==l.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()}},h=l,f=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}}},d=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!==d.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")}},p=d,E=class{constructor(){this.storage=h,this.db=f,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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"}setItemSessionStorage(t,e){p.setItem(t,e)}getItemSessionStorage(t){return p.getItem(t)}clearSessionStorage(){p.clearMessages()}setStorage(t,e){h.setItem(t,e)}getStorage(t){return h.getItem(t)}clearStorage(){h.clear()}setBrowserPublicKey(t){h.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return h.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){h.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return h.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){h.setItem(this.APP_KEY,t),f&&f.IDB&&await f.setItem(this.APP_KEY,t)}getAppKey(){return h.getItem(this.APP_KEY)}async getAppKeySync(){if(f&&f.IDB)return await f.getItem(this.APP_KEY)}setVAPID(t){h.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return h.getItem(this.VAPID_PUBLIC)}setEnabled(t){h.setItem(this.ENABLED,t)}getEnabled(){return h.getItem(this.ENABLED)}setServiceSyncTime(t){h.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return h.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){h.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return h.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){h.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return h.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){h.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!h&&h.getItem(this.REQUEST_LOCATION)}async setPlatform(t){h.setItem(this.PLATFORM,t)}getPlatform(){return h&&h.getItem(this.PLATFORM)||c.platform}getVersion(){return c.version}async setBrowserName(t){h.setItem(this.BROWSER_NAME,t)}getBrowserName(){return h.getItem(this.BROWSER_NAME)}setBrowserVersion(t){h.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return h.getItem(this.BROWSER_VERSION)}async setOsName(t){h.setItem(this.OS_NAME,t)}getOsName(){return h.getItem(this.OS_NAME)}setOsVersion(t){h.setItem(this.OS_VERSION,t)}getOsVersion(){return h.getItem(this.OS_VERSION)}setDeviceType(t){h.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return h.getItem(this.DEVICE_TYPE)}setSupported(t){h.setItem(this.SUPPORTED,t)}getSupported(){return h.getItem(this.SUPPORTED)}setServiceTimestamp(t){h.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return h.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){h.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return h.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){h.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return h.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){h.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==h.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){h.setItem(this.LOG_LEVEL,t)}getLogLevel(){return h.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){h.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return h.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){h&&h.isLocalStorageAvailable()&&h.setItem(this.EXTERNAL_ID,t),f&&f.IDB&&await f.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{h&&h.isLocalStorageAvailable()?t=h.getItem(this.EXTERNAL_ID):f&&f.IDB&&(t=await f.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){h.setItem(this.EXTERNAL_ID,t)}getExternalId(){return h.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return h.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){h.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){h.setItem(this.LATITUDE,t)}getLatitude(){return h.getItem(this.LATITUDE)}setLongitude(t){h.setItem(this.LONGITUDE,t)}getLongitude(){return h.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}setAvoidCypher(t){this.setStorage(this.AVOID_CYPHER,t)}isAvoidCypher(){return this.getStorage(this.AVOID_CYPHER)}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)}setPushDisabled(t){this.setStorage(this.PUSH_DISABLED,t)}isPushDisabled(){return this.getStorage(this.PUSH_DISABLED)}getConfigV2ServiceSyncTime(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}setConfigV2ServiceSyncTime(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}getConfigV2(){return this.getStorage(this.CONFIG_V2)}setConfigV2(t){this.setStorage(this.CONFIG_V2,t)}getMaintenanceEnd(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}setMaintenanceEnd(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}getMaintenanceStart(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}setMaintenanceStart(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}},y=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),v=y;class g{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=v.INFO,this.setLogLevel((new E).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=v.DEBUG&&t<=v.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=v.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}i(){if(this.level<=v.INFO)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}w(){if(this.level<=v.WARNING)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}e(){if(this.level<=v.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const m=g,I=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=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"}},b=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);if(n>=0){const e=Object.keys(t.ErrorCode)[n],i=Object.values(t.ErrorCode)[n];return new I({code:e,errorId:i},Object.values(t.ErrorMessage)[n],r)}return new I(_.ErrorCode.GENERAL_ERROR,"general error",r)}}},S=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 m("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(v.DEBUG);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);if(304!=e.status){const 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 I(n.statusCode,n.message))}return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+e.status+"\n").writeLog(),e}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(),b.showError(_,_.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)}},O=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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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 E).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}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},P=class extends O{constructor(t=null){super(),this.PARAM_APPLICATION_CHANNEL="channel",this.channels=t}getApplicationRequest(){return this.params=this.createQueryString(),this}createQueryString(){let t="";if(this.channels&&this.channels.length>0)for(let e=0;e<this.channels.length;e++)t+=`${this.PARAM_APPLICATION_CHANNEL}=${this.channels[e].toLowerCase()}&`;return t+=`${this.PARAM_PLATFORM}=webpush`,t}},R=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"}),T=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new E).getBrowserPublicKey(),this.browserPrivateKey=(new E).getBrowserPrivateKey(),this.platform=(new E).getPlatform(),this.version=(new E).getVersion(),this.browserName=(new E).getBrowserName(),this.browserVersion=(new E).getBrowserVersion(),this.osName=(new E).getOsName(),this.osVersion=(new E).getOsVersion(),this.deviceType=(new E).getDeviceType(),(new E).getEnabled()&&(this.enabled="true"===(new E).getEnabled()),(new E).getExternalId()&&(this.externalCode=(new E).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new E).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new E).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}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}},A=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=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"}),N=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),L=class{constructor(t,e=!1){const r=new E;if(null!=t){r.setConfigV2(JSON.stringify(t)),t.contentAvailable&&(this.contentAvailable=t.contentAvailable),t.locationAccuracy&&(this.locationAccuracy=t.locationAccuracy),t.locationDistance&&(this.locationDistance=t.locationDistance),t.locationEnabled&&(this.locationEnabled=t.locationEnabled),t.locationUpdateMinutes&&(this.locationUpdateMinutes=t.locationUpdateMinutes),t.maintenanceWindow&&(this.maintenanceWindow=t.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,r.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,r.setMaintenanceEnd(this.maintenanceWindow.end))),t.networkEventsEnabled&&(this.networkEventsEnabled=t.networkEventsEnabled),t.networkUpdateMinutes&&(this.networkUpdateMinutes=t.networkUpdateMinutes);let n=Date.now();if(t.serviceSyncTime?(this.serviceSyncTime=t.serviceSyncTime,n=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):n=new Date(Date.now()+36e5),!e){const t=n.toString();new m("[IND]CoreApplication").d("ServiceSyncTime defined on: "+t).writeLog(),r.setConfigV2ServiceSyncTime(t)}}}},C=class{static isServiceTimestampExceed(){return!(new E).getServiceTimestamp()||(new E).getServiceSyncTime()<=(Date.now()-(new E).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},D=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 m("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},M=new m("[IND]Crypto"),k=new TextEncoder("utf-8"),x="HMAC",B=class{static async createHmac(t,e){try{let r="";if(!0===(new E).isAvoidCypher())r=e;else{const n=window?.crypto?.subtle;if(!n)return;const i=await n.importKey("raw",k.encode(t),{name:x,hash:{name:"SHA-256"}},!1,["sign","verify"]),o=await n.sign(x,i,k.encode(e)),s=new Uint8Array(o);r=Array.prototype.map.call(s,(t=>("00"+t.toString(16)).slice(-2))).join(""),M.d("hmac: ",r).writeLog()}return r}catch(t){return void M.e("error:",t).writeLog()}}},U=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}},V=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},j=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},Y={Repository:E,Config:c,Api:i,Models:o,Utils:s};return n})(),t.exports=e()},315:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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(710));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(610))&&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)}},468:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(254)),i=u(r(234)),o=u(r(457)),s=u(r(735)),a=u(r(630));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="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},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,s,a){var u=d(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==c(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,a,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,u,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(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){h(o,n,i,s,a,"next",t)}function a(t){h(o,n,i,s,a,"throw",t)}s(void 0)}))}}function d(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,p(n.key),n)}}function p(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}var E=function(){return t=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"},e=[{key:"getURL",value:(E=f(l().mark((function t(){return l().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 E.apply(this,arguments)})},{key:"call",value:(p=f(l().mark((function t(e,r,u,c){var h,f,d,p,E;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return h=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&h.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),f=t.t2+t.t3,u.isJourneyRequest()&&(f=f.replace("v1","v2")),d={method:e,headers:u.addHeaders()},e!==this.GET&&(d.body=JSON.stringify(u.getBody())),c&&(d.credentials=c),t.prev=13,t.next=16,fetch(f,d);case 16:if(304==(p=t.sent).status){t.next=28;break}return t.next=20,p.json();case 20:if(E=t.sent,!p.ok){t.next=24;break}return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\nResponse Body:",JSON.stringify(E.data,null,"\t")).writeLog(),t.abrupt("return",E);case 24:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\n").writeLog(),t.abrupt("return",new i.default(E.statusCode,E.message));case 28:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.status+"\n").writeLog(),t.abrupt("return",p);case 30:t.next=36;break;case 32:return t.prev=32,t.t4=t.catch(13),h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 36:case"end":return t.stop()}}),t,this,[[13,32]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(h=f(l().mark((function t(e,r){return l().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 h.apply(this,arguments)})},{key:"post",value:(c=f(l().mark((function t(e,r,n){return l().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 c.apply(this,arguments)})},{key:"put",value:(u=f(l().mark((function t(e,r,n){return l().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:(r=f(l().mark((function t(e,r){return l().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 r.apply(this,arguments)})}],e&&d(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,u,c,h,p,E}();e.default=E},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseApplicationRequest",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=s(r(468)),i=s(r(237)),o=s(r(773));function s(t){return t&&t.__esModule?t:{default:t}}},773:(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)}var i;function o(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,s(n.key),n)}}function s(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(a=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,a()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e)).PARAM_APPLICATION_CHANNEL="channel",t.channels=r,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(e,t),function(t,e){return e&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"getApplicationRequest",value:function(){return this.params=this.createQueryString(),this}},{key:"createQueryString",value:function(){var t="";if(this.channels&&this.channels.length>0)for(var e=0;e<this.channels.length;e++)t+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[e].toLowerCase(),"&");return t+"".concat(this.PARAM_PLATFORM,"=webpush")}}])}(((i=r(237))&&i.__esModule?i:{default:i}).default);e.default=l},237:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e){return e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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={}}),[{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:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}]);e.default=u},122:(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(904);n.version=i.version,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=n},610:(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=h(r(122)),o=h(r(291)),s=l(r(545)),a=l(r(225)),u=l(r(628));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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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 h(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"});e.default=r},174:(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=s(r(291)),o=s(r(254));function s(t){return t&&t.__esModule?t:{default: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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}var c=function(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=new i.default;if(null!=e){n.setConfigV2(JSON.stringify(e)),e.contentAvailable&&(this.contentAvailable=e.contentAvailable),e.locationAccuracy&&(this.locationAccuracy=e.locationAccuracy),e.locationDistance&&(this.locationDistance=e.locationDistance),e.locationEnabled&&(this.locationEnabled=e.locationEnabled),e.locationUpdateMinutes&&(this.locationUpdateMinutes=e.locationUpdateMinutes),e.maintenanceWindow&&(this.maintenanceWindow=e.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,n.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,n.setMaintenanceEnd(this.maintenanceWindow.end))),e.networkEventsEnabled&&(this.networkEventsEnabled=e.networkEventsEnabled),e.networkUpdateMinutes&&(this.networkUpdateMinutes=e.networkUpdateMinutes);var s=Date.now();if(e.serviceSyncTime?(this.serviceSyncTime=e.serviceSyncTime,s=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):s=new Date(Date.now()+36e5),!r){var a=s.toString();new o.default("[IND]CoreApplication").d("ServiceSyncTime defined on: "+a).writeLog(),n.setConfigV2ServiceSyncTime(a)}}}));e.default=c},395:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e){return e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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()}),[{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}}]);e.default=u},89:(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},735:(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},234:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=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=o},953:(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},72:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},225:(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,"CoreApplication",{enumerable:!0,get:function(){return l.default}}),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}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(902),i=h(r(395)),o=h(r(89)),s=h(r(735)),a=h(r(234)),u=h(r(953)),c=h(r(72)),l=h(r(174));function h(t){return t&&t.__esModule?t:{default:t}}},672:(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 e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:A(t,r,a)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function n(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==r(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=_,s(P,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,c,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.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&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=function(){return t=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},e=[{key:"getDB",value:(c=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 c.apply(this,arguments)})},{key:"get",value:(u=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 u.apply(this,arguments)})},{key:"put",value:(a=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 a.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:(i=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 i.apply(this,arguments)})},{key:"getItem",value:(r=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 r.apply(this,arguments)})}],e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i,a,u,c}();e.default=new u},87:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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()}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=o},291:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(122)),i=a(r(87)),o=a(r(672)),s=a(r(238));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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,s,a){var c=d(t[i],t,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==u(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,a,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 h(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 f(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,d(n.key),n)}}function d(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}var p=function(){return t=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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"},e=[{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:(O=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return O.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"getAppKeySync",value:(S=h(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return S.apply(this,arguments)})},{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:(b=h(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 b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(_=h(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 _.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:(I=h(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 I.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:(m=h(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 m.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:(g=h(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 g.apply(this,arguments)})},{key:"getExternalIdRequest",value:(v=h(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 v.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:"getRegisteredByCookie",value:(y=h(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 y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(E=h(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 E.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)}},{key:"setInAppTopicList",value:(p=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(d=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return d.apply(this,arguments)})},{key:"setTopicList",value:(l=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getTopicList",value:(u=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return u.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}},{key:"setAvoidCypher",value:function(t){this.setStorage(this.AVOID_CYPHER,t)}},{key:"isAvoidCypher",value:function(){return this.getStorage(this.AVOID_CYPHER)}},{key:"getUrlDeviceApi",value:(a=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.storage||!this.storage.isLocalStorageAvailable()){t.next=5;break}e=this.getStorage(this.URL_DEVICE_API),t.next=9;break;case 5:if(!this.db||!this.db.IDB){t.next=9;break}return t.next=8,this.db.getItem(this.URL_DEVICE_API);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 a.apply(this,arguments)})},{key:"setUrlDeviceApi",value:(r=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,e),!this.db||!this.db.IDB){t.next=4;break}return t.next=4,this.db.setItem(this.URL_DEVICE_API,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"setPushDisabled",value:function(t){this.setStorage(this.PUSH_DISABLED,t)}},{key:"isPushDisabled",value:function(){return this.getStorage(this.PUSH_DISABLED)}},{key:"getConfigV2ServiceSyncTime",value:function(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}},{key:"setConfigV2ServiceSyncTime",value:function(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}},{key:"getConfigV2",value:function(){return this.getStorage(this.CONFIG_V2)}},{key:"setConfigV2",value:function(t){this.setStorage(this.CONFIG_V2,t)}},{key:"getMaintenanceEnd",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}},{key:"setMaintenanceEnd",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}},{key:"getMaintenanceStart",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}},{key:"setMaintenanceStart",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}}],e&&f(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,a,u,l,d,p,E,y,v,g,m,I,_,b,S,O}();e.default=p},238:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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")}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=o},622:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e,r){return r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{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)}}]);e.default=u},429:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(254))&&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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,c,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,l(n.key),n)}}function l(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var h=function(){return function(t,e,r){return r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{key:"getPermissions",value:(n=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 n.apply(this,arguments)})},{key:"getPermission",value:(r=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 r.apply(this,arguments)})},{key:"setPermissionsCallback",value:(e=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 e.apply(this,arguments)})},{key:"setCallback",value:(t=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(e,r){return t.apply(this,arguments)})}]);var t,e,r,n}();e.default=h},170:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var n=i(r(291));function i(t){return t&&t.__esModule?t:{default:t}}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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,c,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,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,c(n.key),n)}}function c(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var l=new(i(r(254)).default)("[IND]Crypto"),h=new TextEncoder("utf-8"),f="HMAC",d=e.CryptoUtils=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"createHmac",value:(r=s().mark((function t(e,r){var i,o,a,u,c,d;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i="",!0!==(new n.default).isAvoidCypher()){t.next=6;break}i=r,t.next=18;break;case 6:if(a=null===(o=window)||void 0===o||null===(o=o.crypto)||void 0===o?void 0:o.subtle){t.next=9;break}return t.abrupt("return");case 9:return t.next=11,a.importKey("raw",h.encode(e),{name:f,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 11:return u=t.sent,t.next=14,a.sign(f,u,h.encode(r));case 14:c=t.sent,d=new Uint8Array(c),i=Array.prototype.map.call(d,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),l.d("hmac: ",i).writeLog();case 18:return t.abrupt("return",i);case 21:return t.prev=21,t.t0=t.catch(0),l.e("error:",t.t0).writeLog(),t.abrupt("return");case 25:case"end":return t.stop()}}),t,null,[[0,21]])})),i=function(){var t=this,e=arguments;return new Promise((function(n,i){var o=r.apply(t,e);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(t,e){return i.apply(this,arguments)})}],e&&u(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i}();e.default=d},457:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(735)),i=o(r(234));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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var c=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},(e=[{key:"showError",value:function(t,e,r){if(null!=t){var o=Object.values(t.ErrorCode).indexOf(e);if(o>=0){var s={code:Object.keys(t.ErrorCode)[o],errorId:Object.values(t.ErrorCode)[o]};return new i.default(s,Object.values(t.ErrorMessage)[o],r)}return new i.default(n.default.ErrorCode.GENERAL_ERROR,"general error",r)}}}])&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=new c},325:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{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}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},254:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(291)),i=o(r(630));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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var c=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=[]}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}),e;var e,r,o}();e.default=c},630:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},662:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},332:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},628:(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,"TopicUtils",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(622)),i=f(r(429)),o=f(r(170)),s=f(r(457)),a=f(r(325)),u=f(r(254)),c=r(630),l=f(r(332)),h=f(r(662));function f(t){return t&&t.__esModule?t:{default:t}}},904:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.9.0","_id":"indigitall-web-core@4.9.0","_inBundle":false,"_integrity":"sha512-lC3G2VLwtDvv0jAmaiXdW8lYmGmwCVkE2ubLfFmFIOKfR/f2u33hBj+uokM5qxwMuxlohXteuXCLs3BFbGsV4w==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.9.0","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.9.0","saveSpec":null,"fetchSpec":"4.9.0"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.9.0.tgz","_shasum":"30c78db643e8a62feb23626dc394a05f49f187e4","_spec":"indigitall-web-core@4.9.0","_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.9.0"}')}},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(315).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(315).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()),e.isPushDisabled()||this.isValidFormat(r)||(n=!1,t.w("deviceId is null or empty").writeLog()),n}},a=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}}},u=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:c}=r(315).Core.Models,l=c.ErrorCode;Object.assign(l,{CUSTOMER_GET_ERROR:4001,CUSTOMER_PARAMS_ERROR:4011,CUSTOMER_GENERAL_ERROR:4600,CUSTOMER_NO_EXTERNAL_CODE:4601,DISABLED_CHANNEL:4404});const h=c.ErrorMessage;Object.assign(h,{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",DISABLED_CHANNEL:"disabled channel"});const f={ErrorCode:l,ErrorMessage:h},{Config:d}=r(315).Core,{BaseClient:p}=r(315).Core.Api,{ErrorModel:E}=r(315).Core.Models,{CommonUtils:y,ErrorUtils:v}=r(315).Core.Utils,g=new class extends p{constructor(){super(),this.URL_BASE=d.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_CUSTOMER_EVENT_JOURNEY=this.ENDPOINT_CUSTOMER+this.ENDPOINT_EVENT+"/custom"}async getURL(){let t=await e.getUrlDeviceApi();return t?t=t.replaceAll("v1","v2"):d.client.CUSTOMER_URL_BASE}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 E)&&e.statusCode>=200&&e.statusCode<300?y.isFunction(r)&&r(new a(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 u(t,e.data[t]));e&&i.length>0&&!(e instanceof E)&&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 E)&&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()}async postCustomJourneyEvent(t,r,n){if(s.isValidFormatRequest()&&s.isValidFormat(e.getExternalId())){const e=await this.post(this.ENDPOINT_CUSTOMER_EVENT_JOURNEY,t.postCustomEventRequest());this.getCustomerResponse(e,r,n)}else y.isFunction(n)&&n(v.showError(f,f.ErrorCode.BAD_REQUEST_SERVER_ERROR))}},{BaseRequest:m}=r(315).Core.Api,{Device:I}=r(315).Core.Models,_=class extends m{constructor(){super(),this.device=new I,null!=e.getExternalId()&&(this.customerId=e.getExternalId()),this.fieldNames,this.link,this.fields,this.eventType,this.customData}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}postCustomEventRequest(){return this.params="",this.body=this.createCustomEventBodyJson(),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&&"none"!=this.channel&&(t.channel=this.channel,this.device&&this.device.deviceId&&(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}createCustomEventBodyJson(){const t={};try{t.customData=this.customData,t.eventType=this.eventType,t.externalCode=this.customerId}catch(t){console.log("Error creating custom event request: "+t)}return t}setFields(t){this.fields=t}setFieldNames(t){this.fieldNames=t}setLink(t){this.link=t}setChannel(t){this.channel=t}setEventType(t){this.eventType=t}setCustomData(t){this.customData=t}},{CommonUtils:b,ErrorUtils:S}=r(315).Core.Utils,O=class{static async getCustomer(t,e){const r=new _;await g.getCustomer(r,t,e)}static async getCustomerInformation(t,e,r){const n=new _;null!=t&&(Array.isArray(t)?n.setFieldNames(t):b.isFunction(r)&&r(S.showError(f,f.ErrorCode.CUSTOMER_ERROR_PARAMS))),await g.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){b.isFunction(r)&&r(S.showError(f,f.ErrorCode.CUSTOMER_ERROR_PARAMS,t))}if(n){const t=new _;t.setFields(n),await g.putCustomerField(t,e,r)}else b.isFunction(r)&&r(S.showError(f,f.ErrorCode.CUSTOMER_ERROR_PARAMS))}static async deleteValuesFromCustomerFields(t,e,r){if(Array.isArray(t)){const n=new _;n.setFieldNames(t),await g.deleteCustomerField(n,e,r)}else b.isFunction(r)&&r(S.showError(f,f.ErrorCode.CUSTOMER_ERROR_PARAMS))}static async link(t,e,r){if("none"===t)return void(b.isFunction(r)&&r(S.showError(f,f.ErrorCode.DISABLED_CHANNEL)));const n=new _;n.setChannel(t),await g.postCustomerLink(n,e,r)}static async unlink(t,e,r){if("none"==t)return void(b.isFunction(r)&&r(S.showError(f,f.ErrorCode.DISABLED_CHANNEL)));const n=new _;n.setChannel(t),await g.deleteCustomerLink(n,e,r)}static async sendCustomerCustomEvent(t,e,r,n){let i,o;try{"string"==typeof e?i=JSON.parse(e):"object"==typeof e&&(i=e),"string"==typeof t&&(o=t)}catch(t){b.isFunction(n)&&n(S.showError(f,f.ErrorCode.CUSTOMER_ERROR_PARAMS))}if(i&&o){const t=new _;t.setCustomData(i),t.setEventType(o),await g.postCustomJourneyEvent(t,r,n)}else b.isFunction(n)&&n(S.showError(f,f.ErrorCode.CUSTOMER_ERROR_PARAMS))}}})(),n})(),t.exports=e()},960:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&{}.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(740));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]}}))}))},126:function(t){var e;e=()=>(()=>{var t={710:function(t){var e;e=()=>(()=>{"use strict";var t={330:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.9.0","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={};r.r(n),r.d(n,{default:()=>Y});var i={};r.r(i),r.d(i,{BaseApplicationRequest:()=>P,BaseClient:()=>S,BaseRequest:()=>O});var o={};r.r(o),r.d(o,{Channel:()=>R,CoreApplication:()=>L,Device:()=>T,DeviceStatus:()=>A,ErrorDictionary:()=>_,ErrorModel:()=>I,EventType:()=>w,TopicSubscribeType:()=>N});var s={};r.r(s),r.d(s,{CommonUtils:()=>C,CorePermissions:()=>D,CryptoUtils:()=>B,ErrorUtils:()=>b,JsonUtils:()=>U,Log:()=>m,LogLevel:()=>y,TopicUtils:()=>j,Validations:()=>V});var a={platform:"webpush",version:"0.0.1"};const u=r(330);a.version=u.version;const c=a=Object.assign(a,{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"}}),l=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!==l.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()}},h=l,f=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}}},d=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!==d.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")}},p=d,E=class{constructor(){this.storage=h,this.db=f,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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"}setItemSessionStorage(t,e){p.setItem(t,e)}getItemSessionStorage(t){return p.getItem(t)}clearSessionStorage(){p.clearMessages()}setStorage(t,e){h.setItem(t,e)}getStorage(t){return h.getItem(t)}clearStorage(){h.clear()}setBrowserPublicKey(t){h.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return h.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){h.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return h.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){h.setItem(this.APP_KEY,t),f&&f.IDB&&await f.setItem(this.APP_KEY,t)}getAppKey(){return h.getItem(this.APP_KEY)}async getAppKeySync(){if(f&&f.IDB)return await f.getItem(this.APP_KEY)}setVAPID(t){h.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return h.getItem(this.VAPID_PUBLIC)}setEnabled(t){h.setItem(this.ENABLED,t)}getEnabled(){return h.getItem(this.ENABLED)}setServiceSyncTime(t){h.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return h.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){h.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return h.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){h.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return h.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){h.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!h&&h.getItem(this.REQUEST_LOCATION)}async setPlatform(t){h.setItem(this.PLATFORM,t)}getPlatform(){return h&&h.getItem(this.PLATFORM)||c.platform}getVersion(){return c.version}async setBrowserName(t){h.setItem(this.BROWSER_NAME,t)}getBrowserName(){return h.getItem(this.BROWSER_NAME)}setBrowserVersion(t){h.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return h.getItem(this.BROWSER_VERSION)}async setOsName(t){h.setItem(this.OS_NAME,t)}getOsName(){return h.getItem(this.OS_NAME)}setOsVersion(t){h.setItem(this.OS_VERSION,t)}getOsVersion(){return h.getItem(this.OS_VERSION)}setDeviceType(t){h.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return h.getItem(this.DEVICE_TYPE)}setSupported(t){h.setItem(this.SUPPORTED,t)}getSupported(){return h.getItem(this.SUPPORTED)}setServiceTimestamp(t){h.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return h.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){h.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return h.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){h.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return h.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){h.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==h.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){h.setItem(this.LOG_LEVEL,t)}getLogLevel(){return h.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){h.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return h.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){h&&h.isLocalStorageAvailable()&&h.setItem(this.EXTERNAL_ID,t),f&&f.IDB&&await f.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{h&&h.isLocalStorageAvailable()?t=h.getItem(this.EXTERNAL_ID):f&&f.IDB&&(t=await f.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){h.setItem(this.EXTERNAL_ID,t)}getExternalId(){return h.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return h.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){h.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){h.setItem(this.LATITUDE,t)}getLatitude(){return h.getItem(this.LATITUDE)}setLongitude(t){h.setItem(this.LONGITUDE,t)}getLongitude(){return h.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}setAvoidCypher(t){this.setStorage(this.AVOID_CYPHER,t)}isAvoidCypher(){return this.getStorage(this.AVOID_CYPHER)}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)}setPushDisabled(t){this.setStorage(this.PUSH_DISABLED,t)}isPushDisabled(){return this.getStorage(this.PUSH_DISABLED)}getConfigV2ServiceSyncTime(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}setConfigV2ServiceSyncTime(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}getConfigV2(){return this.getStorage(this.CONFIG_V2)}setConfigV2(t){this.setStorage(this.CONFIG_V2,t)}getMaintenanceEnd(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}setMaintenanceEnd(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}getMaintenanceStart(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}setMaintenanceStart(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}},y=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),v=y;class g{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=v.INFO,this.setLogLevel((new E).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=v.DEBUG&&t<=v.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=v.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}i(){if(this.level<=v.INFO)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}w(){if(this.level<=v.WARNING)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}e(){if(this.level<=v.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const m=g,I=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=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"}},b=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);if(n>=0){const e=Object.keys(t.ErrorCode)[n],i=Object.values(t.ErrorCode)[n];return new I({code:e,errorId:i},Object.values(t.ErrorMessage)[n],r)}return new I(_.ErrorCode.GENERAL_ERROR,"general error",r)}}},S=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 m("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(v.DEBUG);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);if(304!=e.status){const 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 I(n.statusCode,n.message))}return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+e.status+"\n").writeLog(),e}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(),b.showError(_,_.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)}},O=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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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 E).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}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},P=class extends O{constructor(t=null){super(),this.PARAM_APPLICATION_CHANNEL="channel",this.channels=t}getApplicationRequest(){return this.params=this.createQueryString(),this}createQueryString(){let t="";if(this.channels&&this.channels.length>0)for(let e=0;e<this.channels.length;e++)t+=`${this.PARAM_APPLICATION_CHANNEL}=${this.channels[e].toLowerCase()}&`;return t+=`${this.PARAM_PLATFORM}=webpush`,t}},R=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"}),T=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new E).getBrowserPublicKey(),this.browserPrivateKey=(new E).getBrowserPrivateKey(),this.platform=(new E).getPlatform(),this.version=(new E).getVersion(),this.browserName=(new E).getBrowserName(),this.browserVersion=(new E).getBrowserVersion(),this.osName=(new E).getOsName(),this.osVersion=(new E).getOsVersion(),this.deviceType=(new E).getDeviceType(),(new E).getEnabled()&&(this.enabled="true"===(new E).getEnabled()),(new E).getExternalId()&&(this.externalCode=(new E).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new E).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new E).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}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}},A=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=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"}),N=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),L=class{constructor(t,e=!1){const r=new E;if(null!=t){r.setConfigV2(JSON.stringify(t)),t.contentAvailable&&(this.contentAvailable=t.contentAvailable),t.locationAccuracy&&(this.locationAccuracy=t.locationAccuracy),t.locationDistance&&(this.locationDistance=t.locationDistance),t.locationEnabled&&(this.locationEnabled=t.locationEnabled),t.locationUpdateMinutes&&(this.locationUpdateMinutes=t.locationUpdateMinutes),t.maintenanceWindow&&(this.maintenanceWindow=t.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,r.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,r.setMaintenanceEnd(this.maintenanceWindow.end))),t.networkEventsEnabled&&(this.networkEventsEnabled=t.networkEventsEnabled),t.networkUpdateMinutes&&(this.networkUpdateMinutes=t.networkUpdateMinutes);let n=Date.now();if(t.serviceSyncTime?(this.serviceSyncTime=t.serviceSyncTime,n=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):n=new Date(Date.now()+36e5),!e){const t=n.toString();new m("[IND]CoreApplication").d("ServiceSyncTime defined on: "+t).writeLog(),r.setConfigV2ServiceSyncTime(t)}}}},C=class{static isServiceTimestampExceed(){return!(new E).getServiceTimestamp()||(new E).getServiceSyncTime()<=(Date.now()-(new E).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},D=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 m("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},M=new m("[IND]Crypto"),k=new TextEncoder("utf-8"),x="HMAC",B=class{static async createHmac(t,e){try{let r="";if(!0===(new E).isAvoidCypher())r=e;else{const n=window?.crypto?.subtle;if(!n)return;const i=await n.importKey("raw",k.encode(t),{name:x,hash:{name:"SHA-256"}},!1,["sign","verify"]),o=await n.sign(x,i,k.encode(e)),s=new Uint8Array(o);r=Array.prototype.map.call(s,(t=>("00"+t.toString(16)).slice(-2))).join(""),M.d("hmac: ",r).writeLog()}return r}catch(t){return void M.e("error:",t).writeLog()}}},U=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}},V=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},j=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},Y={Repository:E,Config:c,Api:i,Models:o,Utils:s};return n})(),t.exports=e()},315:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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(710));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(610))&&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)}},468:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(254)),i=u(r(234)),o=u(r(457)),s=u(r(735)),a=u(r(630));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="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},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,s,a){var u=d(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==c(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,a,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,u,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(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){h(o,n,i,s,a,"next",t)}function a(t){h(o,n,i,s,a,"throw",t)}s(void 0)}))}}function d(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,p(n.key),n)}}function p(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}var E=function(){return t=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"},e=[{key:"getURL",value:(E=f(l().mark((function t(){return l().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 E.apply(this,arguments)})},{key:"call",value:(p=f(l().mark((function t(e,r,u,c){var h,f,d,p,E;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return h=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&h.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),f=t.t2+t.t3,u.isJourneyRequest()&&(f=f.replace("v1","v2")),d={method:e,headers:u.addHeaders()},e!==this.GET&&(d.body=JSON.stringify(u.getBody())),c&&(d.credentials=c),t.prev=13,t.next=16,fetch(f,d);case 16:if(304==(p=t.sent).status){t.next=28;break}return t.next=20,p.json();case 20:if(E=t.sent,!p.ok){t.next=24;break}return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\nResponse Body:",JSON.stringify(E.data,null,"\t")).writeLog(),t.abrupt("return",E);case 24:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\n").writeLog(),t.abrupt("return",new i.default(E.statusCode,E.message));case 28:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.status+"\n").writeLog(),t.abrupt("return",p);case 30:t.next=36;break;case 32:return t.prev=32,t.t4=t.catch(13),h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 36:case"end":return t.stop()}}),t,this,[[13,32]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(h=f(l().mark((function t(e,r){return l().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 h.apply(this,arguments)})},{key:"post",value:(c=f(l().mark((function t(e,r,n){return l().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 c.apply(this,arguments)})},{key:"put",value:(u=f(l().mark((function t(e,r,n){return l().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:(r=f(l().mark((function t(e,r){return l().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 r.apply(this,arguments)})}],e&&d(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,u,c,h,p,E}();e.default=E},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseApplicationRequest",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=s(r(468)),i=s(r(237)),o=s(r(773));function s(t){return t&&t.__esModule?t:{default:t}}},773:(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)}var i;function o(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,s(n.key),n)}}function s(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(a=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,a()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e)).PARAM_APPLICATION_CHANNEL="channel",t.channels=r,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(e,t),function(t,e){return e&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"getApplicationRequest",value:function(){return this.params=this.createQueryString(),this}},{key:"createQueryString",value:function(){var t="";if(this.channels&&this.channels.length>0)for(var e=0;e<this.channels.length;e++)t+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[e].toLowerCase(),"&");return t+"".concat(this.PARAM_PLATFORM,"=webpush")}}])}(((i=r(237))&&i.__esModule?i:{default:i}).default);e.default=l},237:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e){return e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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={}}),[{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:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}]);e.default=u},122:(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(904);n.version=i.version,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=n},610:(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=h(r(122)),o=h(r(291)),s=l(r(545)),a=l(r(225)),u=l(r(628));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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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 h(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"});e.default=r},174:(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=s(r(291)),o=s(r(254));function s(t){return t&&t.__esModule?t:{default: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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}var c=function(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=new i.default;if(null!=e){n.setConfigV2(JSON.stringify(e)),e.contentAvailable&&(this.contentAvailable=e.contentAvailable),e.locationAccuracy&&(this.locationAccuracy=e.locationAccuracy),e.locationDistance&&(this.locationDistance=e.locationDistance),e.locationEnabled&&(this.locationEnabled=e.locationEnabled),e.locationUpdateMinutes&&(this.locationUpdateMinutes=e.locationUpdateMinutes),e.maintenanceWindow&&(this.maintenanceWindow=e.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,n.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,n.setMaintenanceEnd(this.maintenanceWindow.end))),e.networkEventsEnabled&&(this.networkEventsEnabled=e.networkEventsEnabled),e.networkUpdateMinutes&&(this.networkUpdateMinutes=e.networkUpdateMinutes);var s=Date.now();if(e.serviceSyncTime?(this.serviceSyncTime=e.serviceSyncTime,s=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):s=new Date(Date.now()+36e5),!r){var a=s.toString();new o.default("[IND]CoreApplication").d("ServiceSyncTime defined on: "+a).writeLog(),n.setConfigV2ServiceSyncTime(a)}}}));e.default=c},395:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e){return e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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()}),[{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}}]);e.default=u},89:(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},735:(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},234:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=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=o},953:(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},72:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},225:(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,"CoreApplication",{enumerable:!0,get:function(){return l.default}}),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}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(902),i=h(r(395)),o=h(r(89)),s=h(r(735)),a=h(r(234)),u=h(r(953)),c=h(r(72)),l=h(r(174));function h(t){return t&&t.__esModule?t:{default:t}}},672:(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 e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:A(t,r,a)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function n(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==r(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=_,s(P,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,c,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.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&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=function(){return t=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},e=[{key:"getDB",value:(c=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 c.apply(this,arguments)})},{key:"get",value:(u=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 u.apply(this,arguments)})},{key:"put",value:(a=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 a.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:(i=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 i.apply(this,arguments)})},{key:"getItem",value:(r=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 r.apply(this,arguments)})}],e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i,a,u,c}();e.default=new u},87:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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()}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=o},291:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(122)),i=a(r(87)),o=a(r(672)),s=a(r(238));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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,s,a){var c=d(t[i],t,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==u(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,a,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 h(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 f(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,d(n.key),n)}}function d(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}var p=function(){return t=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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"},e=[{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:(O=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return O.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"getAppKeySync",value:(S=h(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return S.apply(this,arguments)})},{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:(b=h(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 b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(_=h(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 _.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:(I=h(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 I.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:(m=h(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 m.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:(g=h(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 g.apply(this,arguments)})},{key:"getExternalIdRequest",value:(v=h(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 v.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:"getRegisteredByCookie",value:(y=h(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 y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(E=h(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 E.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)}},{key:"setInAppTopicList",value:(p=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(d=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return d.apply(this,arguments)})},{key:"setTopicList",value:(l=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getTopicList",value:(u=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return u.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}},{key:"setAvoidCypher",value:function(t){this.setStorage(this.AVOID_CYPHER,t)}},{key:"isAvoidCypher",value:function(){return this.getStorage(this.AVOID_CYPHER)}},{key:"getUrlDeviceApi",value:(a=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.storage||!this.storage.isLocalStorageAvailable()){t.next=5;break}e=this.getStorage(this.URL_DEVICE_API),t.next=9;break;case 5:if(!this.db||!this.db.IDB){t.next=9;break}return t.next=8,this.db.getItem(this.URL_DEVICE_API);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 a.apply(this,arguments)})},{key:"setUrlDeviceApi",value:(r=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,e),!this.db||!this.db.IDB){t.next=4;break}return t.next=4,this.db.setItem(this.URL_DEVICE_API,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"setPushDisabled",value:function(t){this.setStorage(this.PUSH_DISABLED,t)}},{key:"isPushDisabled",value:function(){return this.getStorage(this.PUSH_DISABLED)}},{key:"getConfigV2ServiceSyncTime",value:function(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}},{key:"setConfigV2ServiceSyncTime",value:function(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}},{key:"getConfigV2",value:function(){return this.getStorage(this.CONFIG_V2)}},{key:"setConfigV2",value:function(t){this.setStorage(this.CONFIG_V2,t)}},{key:"getMaintenanceEnd",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}},{key:"setMaintenanceEnd",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}},{key:"getMaintenanceStart",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}},{key:"setMaintenanceStart",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}}],e&&f(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,a,u,l,d,p,E,y,v,g,m,I,_,b,S,O}();e.default=p},238:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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")}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=o},622:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e,r){return r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{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)}}]);e.default=u},429:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(254))&&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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,c,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,l(n.key),n)}}function l(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var h=function(){return function(t,e,r){return r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{key:"getPermissions",value:(n=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 n.apply(this,arguments)})},{key:"getPermission",value:(r=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 r.apply(this,arguments)})},{key:"setPermissionsCallback",value:(e=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 e.apply(this,arguments)})},{key:"setCallback",value:(t=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(e,r){return t.apply(this,arguments)})}]);var t,e,r,n}();e.default=h},170:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var n=i(r(291));function i(t){return t&&t.__esModule?t:{default:t}}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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,c,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,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,c(n.key),n)}}function c(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var l=new(i(r(254)).default)("[IND]Crypto"),h=new TextEncoder("utf-8"),f="HMAC",d=e.CryptoUtils=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"createHmac",value:(r=s().mark((function t(e,r){var i,o,a,u,c,d;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i="",!0!==(new n.default).isAvoidCypher()){t.next=6;break}i=r,t.next=18;break;case 6:if(a=null===(o=window)||void 0===o||null===(o=o.crypto)||void 0===o?void 0:o.subtle){t.next=9;break}return t.abrupt("return");case 9:return t.next=11,a.importKey("raw",h.encode(e),{name:f,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 11:return u=t.sent,t.next=14,a.sign(f,u,h.encode(r));case 14:c=t.sent,d=new Uint8Array(c),i=Array.prototype.map.call(d,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),l.d("hmac: ",i).writeLog();case 18:return t.abrupt("return",i);case 21:return t.prev=21,t.t0=t.catch(0),l.e("error:",t.t0).writeLog(),t.abrupt("return");case 25:case"end":return t.stop()}}),t,null,[[0,21]])})),i=function(){var t=this,e=arguments;return new Promise((function(n,i){var o=r.apply(t,e);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(t,e){return i.apply(this,arguments)})}],e&&u(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i}();e.default=d},457:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(735)),i=o(r(234));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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var c=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},(e=[{key:"showError",value:function(t,e,r){if(null!=t){var o=Object.values(t.ErrorCode).indexOf(e);if(o>=0){var s={code:Object.keys(t.ErrorCode)[o],errorId:Object.values(t.ErrorCode)[o]};return new i.default(s,Object.values(t.ErrorMessage)[o],r)}return new i.default(n.default.ErrorCode.GENERAL_ERROR,"general error",r)}}}])&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=new c},325:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{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}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},254:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(291)),i=o(r(630));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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var c=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=[]}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}),e;var e,r,o}();e.default=c},630:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},662:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},332:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},628:(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,"TopicUtils",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(622)),i=f(r(429)),o=f(r(170)),s=f(r(457)),a=f(r(325)),u=f(r(254)),c=r(630),l=f(r(332)),h=f(r(662));function f(t){return t&&t.__esModule?t:{default:t}}},904:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.9.0","_id":"indigitall-web-core@4.9.0","_inBundle":false,"_integrity":"sha512-lC3G2VLwtDvv0jAmaiXdW8lYmGmwCVkE2ubLfFmFIOKfR/f2u33hBj+uokM5qxwMuxlohXteuXCLs3BFbGsV4w==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.9.0","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.9.0","saveSpec":null,"fetchSpec":"4.9.0"},"_requiredBy":["#USER","/","/indigitall-web-customer"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.9.0.tgz","_shasum":"30c78db643e8a62feb23626dc394a05f49f187e4","_spec":"indigitall-web-core@4.9.0","_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.9.0"}')}},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:()=>Rt});const{Repository:t}=r(315).Core,e=new class extends t{constructor(){super(),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.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.INAPP_TOPICS_SYNC=this.REPOSITORY+".INAPP_TOPICS_SYNC",this.AVOID_ACTION=this.REPOSITORY+".AVOID_ACTION",this.CONFIG_INAPP_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_INAPP_V2_SERVICE_SYNC_TIME",this.AUDIENCE_DATE_CACHE_TTL=this.REPOSITORY+".AUDIENCE_DATE_CACHE_TTL",this.INAPP_AUDIENCES=this.REPOSITORY+".INAPP_AUDIENCES",this.INAPP_AUDIENCES_CACHE=this.REPOSITORY+".INAPP_AUDIENCES_CACHE",this.INAPP_AUDIENCES_LAST_UPDATE=this.REPOSITORY+".INAPP_AUDIENCES_LAST_UPDATE"}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)}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)?this.getStorage(this.INAPP_TOPICS).split(","):null}setInAppTopics(t){this.setStorage(this.INAPP_TOPICS,t)}async getInAppTopicsSync(){let t=null;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS_SYNC))}catch(t){}return t}async setInAppTopicsSync(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS_SYNC,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}isAvoidAction(){return this.getStorage(this.AVOID_ACTION)}setAvoidAction(t){this.setStorage(this.AVOID_ACTION,t)}getConfigInAppV2ServiceSyncTime(){return this.getStorage(this.CONFIG_INAPP_V2_SERVICE_SYNC_TIME)}setConfigInAppV2ServiceSyncTime(t){this.setStorage(this.CONFIG_INAPP_V2_SERVICE_SYNC_TIME,t)}getInAppAudienceDateCacheTtl(){return this.getStorage(this.AUDIENCE_DATE_CACHE_TTL)}setInAppAudienceDateCacheTtl(t){this.setStorage(this.AUDIENCE_DATE_CACHE_TTL,t)}getAudienceModel(){return this.getStorage(this.INAPP_AUDIENCES)}setAudienceModel(t){this.setStorage(this.INAPP_AUDIENCES,t)}getAudienceCache(){return this.getStorage(this.INAPP_AUDIENCES_CACHE)}setAudienceCache(t){this.setStorage(this.INAPP_AUDIENCES_CACHE,t)}getAudienceLastUpdate(){return this.getStorage(this.INAPP_AUDIENCES_LAST_UPDATE)}setAudienceLastUpdate(t){this.setStorage(this.INAPP_AUDIENCES_LAST_UPDATE,t)}},{Validations:i,Log:o}=r(315).Core.Utils,s=class extends i{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFieldFormat(t){return null!=t&&""!=t&&"null"!=t}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}static isInAppRegisterFormat(){return!(!this.isValidFormatRequest()||!e.getExternalId()||"null"===e.getExternalId())}},{ErrorDictionary:a}=r(315).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_TOPIC_EMPTY:2104,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_TOPIC_EMPTY:"There is no inApp Topics subscription",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},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.app&&(this.app=t.app),t.no_action&&(this.no_action=t.no_action)}},f=class{constructor(t){t.borderRadius&&(this.borderRadius=t.borderRadius)}},d=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 f(t.layout)),t.action&&(this.action=new h(t.action))}setAction(t){this.action=t}},p=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))}},E=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 updateInApp(t){const r=this.getListInApp(),n=[];let i=!1,o=null;if(null!=r)for(let e=0;e<r.length;e++)r[e].inAppId===t.inAppId&&(i=!0,r[e].filters&&(t.filters=r[e].filters),r[e].name&&(t.name=r[e].name),null!=r[e].properties&&(t.properties=new d(r[e].properties)),null!=r[e].inAppShow&&(t.inAppShow=new p(r[e].inAppShow)),n.push(t),o=t);if(i)return e.setItemStorage(JSON.stringify(n)),o}static deleteInApp(t){let r=!1;const n=this.getListInApp(),i=[];if(null!=n)for(let e=0;e<n.length;e++)n[e].inAppId!=t.inAppId?i.push(n[e]):r=!0;return e.setItemStorage(JSON.stringify(i)),r}static deleteInAppIfOldVersion(t){let e=!1;const r=this.getListInApp(),n=[];if(null!=r)for(let i=0;i<r.length;i++)r[i].inAppId!=t.inAppId?n.push(r[i]):r[i].version<=t.version?e=!0:n.push(r[i]);return e}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}},y=class{constructor(t){t.code&&(this.code=t.code),t.width&&(this.width=t.width),t.height&&(this.height=t.height)}},v=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=k.getDate((new Date).getTime()),t.expiredDate)this.expiredDate=t.expiredDate;else{let t=36e5;this.cacheTtl&&(t=1e3*this.cacheTtl),this.expiredDate=k.getDate((new Date).getTime()+t)}t.schema&&(this.schema=new y(t.schema)),t.properties&&(this.properties=new d(t.properties)),this.inAppShow=new p(t.inAppShow),t.filters&&(this.filters=t.filters),t.name&&(this.name=t.name)}},{BaseRequest:g}=r(315).Core.Api,{Config:m}=r(315).Core,I=class extends g{constructor(){super(),e.getDeviceId()?this.deviceId=e.getDeviceId():this.deviceId=k.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.externalCode=e.getExternalId()),t.inAppId=this.inAppId,t.platform=m.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:_}=r(315).Core.Api,b=class extends _{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:S}=r(315).Core.Api,{Config:O}=r(315).Core,P=class extends S{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=O.platform,t.version=this.version,t}},R=class{static sendEventPrint(t){const e=new I;e.setInAppId(t.inAppId),e.setVersion(t.version),et.postEventPrint(e)}static sendEventClick(t){const e=new I;e.setActionId(t.properties.action.actionId),e.setInAppId(t.inAppId),e.setVersion(t.version),et.postEventClick(e)}static sendEventForm(t,e,r){const n=new P;n.setVersion(e),n.setInAppId(t),n.setJsonForm(r),et.postEventForm(n)}static sendEventFormToCustomer(t){const e=new b;e.setFields(t),et.putCustomerField(e)}},{DeviceStatus:T,Device:A}=r(315).Core.Models,{BaseRequest:w}=r(315).Core.Api,N=class extends w{constructor(){super(),this.device=new A}postDeviceRequest(){return this.body=this.createDeviceJson(),this.status!==T.DEFAULT&&(this.body.enabled=1===this.status),this}createDeviceJson(){let t={};try{t=this.device.toJSON()}catch(t){console.log(t)}return t}},{Log:L,CryptoUtils:C,CorePermissions:D}=r(315).Core.Utils,{EventType:M}=r(315).Core.Models,k=class{constructor(){this.MONTH=24192e5}static onClickAction(t){"false"===e.isAvoidAction()&&t.type==t.URL&&window.open(t.url)}static addNewInApp(t){E.addInApp(t)}static addNewInAppClick(t){t.properties.numberOfClicks&&t.properties.numberOfClicks>0&&E.addInAppNewClick(t),R.sendEventClick(t)}static addNewInApptoDismissForever(t){E.addInAppDismissForever(t)}static isInAppDismissForever(t){const e=E.searchInAppWithInAppId(t.inAppId);return!(null==e||!new v(e).inAppShow.wasDismissed)}static async registerLocation(){const t=new L("[IND]InAppUtils: ");try{navigator.geolocation&&"prompt"===(await D.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()==M.EVENT_TYPE_REJECT||e.setPermissionLocation(M.EVENT_TYPE_REJECT)}))}catch(e){t.e(e).writeLog()}}static generateDeviceId(){et.postDevice(new N,(t=>t),(t=>(console.log(t),null)))}static async setExternalCode(t){let r=t;if(t){const n=e.getAppKey();r=await C.createHmac(n,t)}return e.setExternalId(r),r}static async setExternalCodeWithoutCypher(t){await e.setExternalId(t)}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}`}},{CommonUtils:x,ErrorUtils:B}=r(315).Core.Utils,{Channel:U}=r(315).Core.Models,V=class{static async listTopics(t,r){const n=[],i=await e.getInAppTopics();if(null!=i&&""!=i){for(let t=0;t<i.length;t++)n.push({code:i[t],name:i[t],visible:!0,subscribe:!0,parentCode:i[t],channel:U.INAPP});x.isFunction(t)&&t(n)}else x.isFunction(r)&&r(B.showError(l,l.ErrorCode.INAPP_TOPIC_EMPTY))}static async saveTopics(t,r,n){try{if(t instanceof Array){let n=[];const i=await e.getInAppTopics();if(null!=i&&""!=i&&(n=i),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),await e.setInAppTopicsSync(n);const o=[];for(let t=0;t<n.length;t++)o.push({code:n[t],name:n[t],visible:!0,subscribe:!0,parentCode:"",channel:U.INAPP});x.isFunction(r)&&r(o)}else x.isFunction(n)&&n(B.showError(l,l.ErrorCode.INAPP_INSTANCE_TOPICS_ERROR))}catch(t){x.isFunction(n)&&n(B.showError(l,l.ErrorCode.INAPP_ERROR,t.message))}}static async deleteTopics(t,r,n){if(t instanceof Array){let n=[],i=[];const o=await e.getInAppTopics();null!=o&&""!=o&&(n=o),0!==n.length&&(i=n.filter((e=>!t.includes(e))),e.setInAppTopics(i),await e.setInAppTopicsSync(i));const s=[];if(i.length>0)for(let t=0;t<i.length;t++)s.push({code:i[t],name:i[t],visible:!0,subscribe:!0,parentCode:"",channel:U.INAPP});x.isFunction(r)&&r(s)}else x.isFunction(n)&&n(B.showError(l,l.ErrorCode.INAPP_INSTANCE_TOPICS_ERROR))}static isSubscribe(t){let r=[],n=[];if(e.getInAppTopics()&&(n=e.getInAppTopics()),t&&t.length>0)if(n&&n.length>0)for(let e=0;e<t.length;e++){t[e].subscribed=!1;for(let r=0;r<n.length;r++)t[e].code===n[r]&&(t[e].subscribed=!0);r.push(t[e])}else{for(let e=0;e<t.length;e++)t[e].subscribe=!1;r=t}return r}},{CoreApplication:j}=r(315).Core.Models,Y=class extends j{constructor(t,r=!1){if(super(t,r),t&&t.inapp){const r=t.inapp;r.enabled&&(this.enabled=r.enabled),r.clearCacheList&&(this.clearCacheList=r.clearCacheList),r.clearCacheAll&&(this.clearCacheAll=r.clearCacheAll),r.serviceSyncTime&&(this.serviceSyncTime=r.serviceSyncTime,e.setConfigInAppV2ServiceSyncTime(this.serviceSyncTime)),r.audienceCache&&(this.audienceCache=r.audienceCache,this.audienceCache.deviceTtl&&(this.audienceCacheDeviceTtl=this.audienceCache.deviceTtl),e.setAudienceCache(this.audienceCacheDeviceTtl))}}updateCache(){let t=0;if(this.clearCacheAll)e.clearSessionStorage(),t=!0,e.setAudienceModel(""),e.setAudienceLastUpdate(""),e.setAudienceCache(0),e.setInAppAudienceDateCacheTtl("");else if(this.clearCacheList&&this.clearCacheList.length>0)for(let e=0;e<this.clearCacheList.length;e++){const r=new v(this.clearCacheList[e]);if(r&&0!=r.inAppId){let e=!1;e=0!=r.version?E.deleteInAppIfOldVersion(r):E.deleteInApp(r),e&&t++}}return t}},F=class{constructor(t){t&&(t.audiences&&(this.audiences=t.audiences),t.lastUpdate&&(this.lastUpdate=t.lastUpdate))}},{Log:G}=r(315).Core.Utils,K="[IND]InAppAudienceUtils: ",W=class{static isAudienceCacheFinish(){const t=new G(K+".isAudienceCacheFinish");if(e.getInAppAudienceDateCacheTtl()&&""!=e.getInAppAudienceDateCacheTtl()){const r=new Date(e.getInAppAudienceDateCacheTtl());return!!(r&&r<Date.now())||(t.d(`InApp Audience cache reload on: ${r.toISOString()}`).writeLog(),!1)}return this.saveAudienceCache(e.getAudienceCache()),!0}static saveAudienceCache(t){const r=new G(K+".saveAudienceCache");let n=216e5;t&&0!=t&&(n=1e3*t);const i=new Date(Date.now()+n).toISOString();r.d(`InApp Audience cache reload on: ${i}`).writeLog(),e.setInAppAudienceDateCacheTtl(i)}static saveAudiences(t){t&&t.audiences&&e.setAudienceModel(JSON.stringify(t))}static loadAudiences(){return e.getAudienceModel()&&""!=e.getAudienceModel()?new F(JSON.parse(e.getAudienceModel())):null}},{BaseClient:q}=r(315).Core.Api,{Config:H}=r(315).Core,{Channel:X,ErrorModel:J}=r(315).Core.Models,{TopicUtils:$,CommonUtils:Q,ErrorUtils:z,Log:Z}=r(315).Core.Utils,tt="[IND]InAppApplication: ",et=new class extends q{constructor(){super(),this.ENDPOINT_INAPP="/inapp",this.URL_BASE=H.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_INAPP_AUDIENCE=this.ENDPOINT_DEVICE+"/audiences",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_TOPICS="/topic",this.ENDPOINT_CUSTOMER="/customer",this.ENDPOINT_CUSTOMER_FIELD=this.ENDPOINT_CUSTOMER+"/field",this.ENDPOINT_APPLICATION="/application",this.isCustomerRequest=!1,this.isDeviceRequest=!1,this.isApplicationRequest=!1}async getURL(){if(this.isCustomerRequest){this.isCustomerRequest=!1;let t=await e.getUrlInappApi();return t?t=t.replaceAll("v2","v1"):H.client.CUSTOMER_URL_BASE}if(this.isDeviceRequest){this.isDeviceRequest=!1;let t=await e.getUrlInappApi();return t?t=t.replaceAll("v2","v1"):H.client.URL_BASE}if(this.isApplicationRequest)return this.isApplicationRequest=!1,await e.getUrlInappApi()||H.client.URL_DEVICE_V2;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 J)&&n.data&&Object.keys(n.data).length>0){if(Q.isFunction(e)){const r=new v(n.data);r.properties.numberOfShows>0&&(r.inAppShow.timesShowed=1),r.properties.dismissForever&&(r.inAppShow.wasDismissed=!0),t.isUpdateInApp()||k.addNewInApp(r),e(r)}}else n?Q.isFunction(r)&&r(n):Q.isFunction(r)&&r(z.showError(l,l.ErrorCode.INAPP_ERROR_CONTENT_MESSAGE));return null}async getInAppTopics(t,r,n){if(s.isAppKeyFormat()){const i=await this.get(this.ENDPOINT_DEVICE_TOPICS,t.getDeviceTopicsRequest());if(!i||i instanceof J)i?Q.isFunction(n)&&n(i):Q.isFunction(n)&&n();else{const t=$.setTopicChannel(i.data,X.INAPP),n=V.isSubscribe(t);await e.setInAppTopicList(n),Q.isFunction(r)&&r(n)}}else Q.isFunction(n)&&n(z.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 J?i?Q.isFunction(n)&&n(i):Q.isFunction(n)&&n():(i.data.deviceId&&e.setDeviceId(i.data.deviceId),Q.isFunction(r)&&r(i.data.deviceId))}else Q.isFunction(n)&&n(z.showError(l,l.ErrorCode.INAPP_ERROR));return!0}async getApplicationWithInAppChannel(t,r,n){if(s.isAppKeyFormat()){const i=e.getConfigV2ServiceSyncTime(),o=new Z(tt);if(null!=i&&Date.now()<new Date(i)){o.d(`InApp config cache reload on: ${new Date(i).toISOString()}`).writeLog();const t=JSON.parse(e.getConfigV2());t&&Q.isFunction(r)&&r(new Y(t,!0))}else{null!=i&&o.d(`InApp config cache reload on: ${new Date(i).toISOString()}`).writeLog(),this.isApplicationRequest=!0;const e=await this.get(this.ENDPOINT_APPLICATION,t.getApplicationRequest());if(e&&!(e instanceof J))if(e.data&&Object.keys(e.data).length>0){if(Q.isFunction(r)){const t=new Y(e.data,!1);if(t.enabled){const e=t.updateCache();e>0&&o.d(`Deleted ${e} inapp cache from database`).writeLog()}r(t)}}else e?Q.isFunction(n)&&n(e):Q.isFunction(n)&&n()}}else Q.isFunction(n)&&n(z.showError(l,l.ErrorCode.INAPP_ERROR));return!0}async getAudiences(t,r,n){const i=new Z(`${tt}.getAudiences`);if(s.isInAppRegisterFormat()){const o=await this.get(this.ENDPOINT_INAPP_AUDIENCE,t.getAudiences());if(!o||o instanceof J)o?Q.isFunction(n)&&n(o):Q.isFunction(n)&&n();else{let t;o.data?(t=new F(o.data),t.lastUpdate&&e.setAudienceLastUpdate(t.lastUpdate),t.audiences&&W.saveAudiences(t)):o.status&&304==o.status&&i.d("No audiences modified. No need to sync changes to the device").writeLog(),Q.isFunction(r)&&r(t)}}else Q.isFunction(n)&&n(z.showError(l,l.ErrorCode.INAPP_ERROR,"Bad request, deviceId and externalCode not found"))}},{BaseRequest:rt}=r(315).Core.Api,nt=class extends rt{constructor(){super(),this.update=!1,this.PARAM_DEVICE_TYPE="deviceType",this.PARAM_BROWSER_NAME="browserName",this.PARAM_AUDIENCES="audiences",this.PARAM_AUDIENCES_VERSION="audiencesVersion"}setTag(t){this.tag=t}setUpdateInApp(t){this.update=t}isUpdateInApp(){return this.update}getCampaignTagRequest(){return this.params=this.createQueryString(),this.pathParams["{tag}"]=this.tag,this}createQueryString(){let t="";if(null!=e.getDeviceId()?t+=`${this.PARAM_DEVICE_ID}=${e.getDeviceId()}&`:k.generateDeviceId(),s.isValidFieldFormat(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){const r=e.getInAppTopics();t+=`${this.PARAM_TOPICS}=${encodeURIComponent(r)}&`}const r=W.loadAudiences();return null!=r&&0!==r.audiences.length&&(t+=`${this.PARAM_AUDIENCES}=${encodeURIComponent(r.audiences)}&`),t+=`${this.PARAM_AUDIENCES_VERSION}=v2&`,t+=`${this.PARAM_PLATFORM}=webpush`,t}},it=class{constructor(t,e){this.script=` \n\n\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 ? document.getElementById("${t}").getElementsByClassName("ind_slideshow-item").length : document.getElementById("${t}").getElementsByClassName("ind_slideshow-carousel-item").length;\n \n var ind_carouselOverlap_${e} = document.getElementById("ind_carouselOverlapContainer_${e}");\n\n var imageList_${e} = document.getElementById("${t}").getElementsByClassName("indCOImages_${e}");\n if (imageList_${e}) {\n setImagesCarouselOverLap_${e}();\n let docIframeHeight_${e} = document.getElementById("${t}").clientHeight;\n \n if (document.getElementById("ind_carouselOverlapLeftView_${e}")) document.getElementById("ind_carouselOverlapLeftView_${e}").style.height = (docIframeHeight_${e}-20)+"px";\n if (document.getElementById("ind_carouselOverlapLRightView_${e}")) document.getElementById("ind_carouselOverlapLRightView_${e}").style.height = (docIframeHeight_${e}-20)+"px";\n if (document.getElementById("ind_carouselOverlapLMainView_${e}")) document.getElementById("ind_carouselOverlapLMainView_${e}").style.height = document.getElementById("${t}").style.height;\n if (document.getElementById("ind_carouselOverlapLMainView_${e}")) document.getElementById("ind_carouselOverlapLMainView_${e}").style.width = document.getElementById("${t}").style.width;\n }\n\n function setImagesCarouselOverLap_${e}() {\n let slides = document.getElementById("${t}").getElementsByClassName("ind_slideshow-carousel-item");\n for (i = 0; i < slides.length; i++) {\n if (imageList[i] && i != 1) {\n slides[i].style.backgroundImage = "url('"+imageList_${e}[i].src+"')";\n slides[i].style.backgroundSize = "cover";\n } else if (i == 1) {\n let width = document.getElementById('${t}').querySelector("#ind_carouselOverlapLMainView_${e}").offsetWidth;\n let height = document.getElementById('${t}').querySelector("#ind_carouselOverlapLMainView_${e}").offsetHeight;\n slides[i].style.backgroundImage = "url('"+imageList_${e}[i].src+"')";\n slides[i].style.backgroundSize = width+"px "+height+"px";\n }\n }\n if (slides[1]) slides[1].onclick = imageList_${e}[1].onclick; \n }\n\n function shiftRight_${e}() {\n let newArr = new Array(imageList_${e}.length);\n for (var i = 0; i < imageList_${e}.length; i++) {\n if (i == 0) {\n newArr[i] = imageList_${e}[imageList_${e}.length-1];\n } else {\n newArr[i] = imageList_${e}[i-1];\n }\n }\n imageList_${e} = newArr;\n }\n\n function shiftLeft_${e}() {\n let newArr = new Array(imageList_${e}.length);\n for (var i = 0; i < imageList_${e}.length; i++) {\n if (i+1 == imageList_${e}.length) {\n newArr[i] = imageList_${e}[0]; \n } else {\n newArr[i] = imageList_${e}[i+1];\n }\n }\n imageList_${e} = newArr;\n }\n\n var interval_${e} = setInterval(() => {\n newSlide_${e}();\n }, timeSlide_${e});\n \n if (slider_${e} && !ind_carouselOverlap_${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 } else if (ind_carouselOverlap_${e} && ind_carouselOverlapLMainView_${e}) {\n ind_carouselOverlapLMainView_${e}.addEventListener('touchstart', handleStart_${e}, false);\n ind_carouselOverlapLMainView_${e}.addEventListener('touchend', handleEnd_${e}, false);\n ind_carouselOverlapLMainView_${e}.addEventListener('mousedown', mouseStart_${e});\n ind_carouselOverlapLMainView_${e}.addEventListener('mouseup', mouseEnd_${e});\n }\n\n showSlides_${e}(slideIndex_${e});\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 if (ind_carouselOverlap_${e}) {\n slideIndex_${e} = -1;\n } else {\n slideIndex_${e}++;\n if (slideIndex_${e} > sliderTotal_${e}) {\n slideIndex_${e} = 1;\n }\n }\n } else {\n if (ind_carouselOverlap_${e}) {\n if (startMove_${e} == endMove) {\n slideIndex_${e} = 0;\n } else {\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 }\n showSlides_${e}(slideIndex_${e});\n setNewInterval_${e}();\n }\n }\n\n function plusSlides_${e}(n) {\n if (ind_carouselOverlap_${e}) {\n showSlides_${e}(n == 1 ? -1: 1);\n } else {\n showSlides_${e}(slideIndex_${e} += n);\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}") ? document.getElementById("${t}") : document;\n if (view) {\n if (ind_carouselOverlap_${e}) {\n let slides = document.getElementsByClassName("ind_slideshow-carousel-item");\n if (n < 0) {\n shiftLeft_${e}();\n } else if (n > 0) {\n shiftRight_${e}();\n }\n setImagesCarouselOverLap_${e}();\n } else {\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\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_${e}(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.html=" "}},ot=Object.freeze({TEXT:"text",NUMBER:"number",RADIO:"radio",CHECKBOX:"checkbox",SELECT:"select"}),st=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=ot.TEXT;break;case"checkbox":this.type=ot.CHECKBOX;break;case"number":this.type=ot.NUMBER;break;case"radio":this.type=ot.RADIO;break;case"select":this.type=ot.SELECT}t.required&&(this.required=t.required),t.sendToCustomer&&(this.sendToCustomer=t.sendToCustomer)}},at=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 st(t.inputs[e]))}}},{ErrorUtils:ut}=r(315).Core.Utils,ct=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&&R.sendEventForm(t.inAppId,t.inappVersion,e),r&&0!==Object.keys(r).length&&R.sendEventFormToCustomer(r)}static checkInputType(t,e){if(null!=t.id)switch(t.type){case ot.TEXT:if(t.required){if(!e[t.id])return ut.showError(l,2121,t.id);if(!e[t.id]instanceof String)return ut.showError(l,2120,`The field ${t.id} is not text`)}break;case ot.NUMBER:if(t.required){if(!e[t.id])return ut.showError(l,2121,t.id);if(!e[t.id]instanceof String){if(!parseInt(e[t.id]))return ut.showError(l,2120,`The field ${t.id} is not number`)}else if(!e[t.id]instanceof int)return ut.showError(l,2120,`The field ${t.id} is not number`)}break;default:if(t.required&&e[t.id]&&""==e[t.id])return ut.showError(l,2121,t.id)}return null}static editingFormHtml(t,e){return t.replaceAll("InAppIndigitall.onClick",`inAppIndigitallOnClick_${e}`).replaceAll("InAppIndigitall.submit",`inAppIndigitallSubmit_${e}`).replaceAll("plusSlides",`plusSlides_${e}`).replaceAll("indCOImages",`indCOImages_${e}`).replaceAll("ind_carouselOverlapLeftView",`ind_carouselOverlapLeftView_${e}`).replaceAll("ind_carouselOverlapLRightView",`ind_carouselOverlapLRightView_${e}`).replaceAll("ind_carouselOverlapLMainView",`ind_carouselOverlapLMainView_${e}`).replaceAll("ind_carouselOverlapContainer",`ind_carouselOverlapContainer_${e}`).replaceAll("setImagesCarouselOverLap",`setImagesCarouselOverLap_${e}`).replaceAll("shiftRight",`shiftRight_${e}`).replaceAll("shiftLeft",`shiftLeft_${e}`).replaceAll("currentSlide",`currentSlide_${e}`).replaceAll("setNewInterval",`setNewInterval_${e}`).replaceAll("newSlide",`newSlide_${e}`).replaceAll("showSlides",`showSlides_${e}`)}},lt=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=E.searchInAppWithInAppId(r);if(n&&e.action){const t=new v(n),r=new h(e.action);if(t.properties.setAction(r),k.onClickAction(r),t){k.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 at(JSON.parse(t));if(e){const t=ct.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)}}}}},{Log:ht,ErrorUtils:ft,CommonUtils:dt}=r(315).Core.Utils,pt="[IND]ShowInAppUtils: ";class Et{static async inAppWasShown(t,e,r,n,i){const o=new ht(pt);t.schema.code&&this.inAppWasGot(t.schema.code,null,e,(t=>{dt.isFunction(i)&&i(t)}),(()=>{dt.isFunction(i)&&i(t)}),((t,e)=>{o.d("inAppWasShown: "+t.inAppId+" with error: "+e.errorMessage).writeLog()}),r,n)}static inAppWasGot(t,e,r,n,i,o,s,a){const u=E.searchInApp(t),c=(new Date).getTime();if(null!=u){const t=new v(u);if(c<new Date(t.expiredDate).getTime()){const r=this.wasInAppPassedFilterProperties(t);null!=r?(r==l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER&&dt.isFunction(o)&&o(t,ft.showError(l,l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER)),r==l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES&&dt.isFunction(s)&&s(t,ft.showError(l,l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES)),r==l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES&&dt.isFunction(a)&&a(t,ft.showError(l,l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES))):dt.isFunction(n)&&n(t,e)}else dt.isFunction(r)&&r(t,ft.showError(l,l.ErrorCode.INAPP_WAS_EXPIRED)),Et.updateInAppGet(t.schema.code,o,s,a,(t=>{dt.isFunction(n)&&n(t,e)}),(t=>{new ht(pt).e(t).writeLog()}))}else dt.isFunction(i)&&i(t,e)}static wasInAppPassedFilterProperties(t){if(t.properties.dismissForever&&t.inAppShow.wasDismissed)return l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER;{t.properties.dismissForever&&k.addNewInApptoDismissForever(t);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 l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES;E.addInAppNewShow(t)}if(n>0&&null!=i&&i>=n)return l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES}return null}static updateInAppGet(t,e,r,n,i,o){Rt.getInAppWithUpdate(t,!0,(t=>{const o=E.updateInApp(t),s=this.wasInAppPassedFilterProperties(o);if(null!=s)return s==l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER&&dt.isFunction(e)&&e(t,ft.showError(l,l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER)),s==l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES&&dt.isFunction(r)&&r(t,ft.showError(l,l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES)),void(s==l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES&&dt.isFunction(n)&&n(t,ft.showError(l,l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES)));dt.isFunction(i)&&i(o)}),(t=>{dt.isFunction(o)&&o(t)}))}}const yt=Et,{BaseApplicationRequest:vt}=r(315).Core.Api,gt=class extends vt{constructor(){super(["inApp"])}},{BaseApplicationRequest:mt}=r(315).Core.Api,It=class extends mt{constructor(){super(),this.PARAM_LAST_SYNC="lastSync"}getAudiences(){return this.params=this.createQueryString(),this}createQueryString(){let t="";return e.getDeviceId()&&(t+=`${this.PARAM_DEVICE_ID}=${e.getDeviceId()}&`),e.getAudienceLastUpdate()&&(t+=`${this.PARAM_LAST_SYNC}=${encodeURIComponent(e.getAudienceLastUpdate())}&`),e.getExternalId()&&(t+=`${this.PARAM_EXTERNAL_CODE}=${e.getExternalId()}`),t}},{ErrorUtils:_t,CommonUtils:bt,LogLevel:St,Log:Ot}=r(315).Core.Utils;class Pt{constructor(){this.LogLevel=St,this.inAppIndigitallInterface=lt}static async init(t,r,n){null!=t.appKey&&await e.setAppKey(t.appKey),t.urlInAppApi&&e.setUrlInappApi(t.urlInAppApi),e.setAvoidCypher(!!t.avoidCypher),e.setAvoidAction(!!t.avoidAction),t.logLevel&&e.setLogLevel(t.logLevel),!0===t.requestLocation&&k.registerLocation(),et.getApplicationWithInAppChannel(new gt,(t=>{W.isAudienceCacheFinish()?et.getAudiences(new It,(e=>{W.saveAudienceCache(t.audienceCacheDeviceTtl),bt.isFunction(r)&&r(t)}),(e=>{const n=new Ot("[IND]InAppIndigitall: .init");e&&e.errorMessage&&n.e(e.errorMessage).writeLog(),bt.isFunction(r)&&r(t)})):bt.isFunction(r)&&r(t)}),n)}static async showInApp(t,r,n,i){const o={appKey:e.getAppKey(),urlInAppApi:"https://device-api.indigitall.com/v2",requestLocation:!0,logLevel:St.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,h,f){await this.init(t,(d=>{s.isAppKeyFormat()?yt.inAppWasGot(t.inAppCode,t.viewId,r,(async(t,r)=>{t&&t.properties&&this.createInApp(t,r,a,u,c,e,h,f)}),((t,r)=>{this.drawInApp(t,r,e,a,u,c,h,f)}),o,n,i):bt.isFunction(c)&&c(_t.showError(l,l.ErrorCode.BAD_REQUEST_SERVER_ERROR))}),c)}static showMultipleInApp(t,r,n,i){const o={appKey:e.getAppKey(),urlInAppApi:"https://device-api.indigitall.com/v2",requestLocation:!0,logLevel:St.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,h,f){await this.init(t,(d=>{if(s.isAppKeyFormat()){if(t.inAppCodeList.length==t.divList.length&&t.inAppCodeList.length>0)for(var p=0;p<t.inAppCodeList.length;p++)yt.inAppWasGot(t.inAppCodeList[p],t.divList[p],r,(async(t,r)=>{t&&t.properties&&this.createInApp(t,r,a,u,c,e,h,f)}),((t,r)=>{Pt.drawInApp(t,r,e,a,u,c,h,f)}),o,n,i)}else bt.isFunction(c)&&c(_t.showError(l,l.ErrorCode.BAD_REQUEST_SERVER_ERROR))}),c)}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);let c=await u.text();null!=t.customData&&Object.keys(t.customData).forEach((function(e){c=c.replaceAll(`{{${e}}}`,t.customData[e])})),t.version&&(c=c.replaceAll("'inappVersion':'{{version}}'","'inappVersion':"+t.version));const l=e.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,""),h=ct.editingFormHtml(c,l);if(i.innerHTML=h,"undefined"===document.getElementById(`script_${l}`)||null===document.getElementById(`script_${l}`)){const t=document.createElement("script");t.id=`script_${l}`,t.type="text/javascript",t.innerHTML=new it(e,l).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),bt.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}bt.isFunction(n)&&n(t,i),R.sendEventPrint(t)}}catch(r){let n=null;t&&t.schema&&t.schema.code&&(n=t.schema.code),bt.isFunction(i)&&i(r,e,n)}}static topicsList(t,e){return V.listTopics(t,e),!0}static topicsSubscribe(t,e,r){V.saveTopics(t,e,r)}static topicsUnsubscribe(t,e,r){V.deleteTopics(t,e,r)}static inAppGet(t,e,r){this.getInApp(t,e,r)}static getInApp(t,e,r){this.getInAppWithUpdate(t,!1,e,r)}static getInAppWithUpdate(t,e,r,n){if(s.isAppKeyFormat()){const i=new nt;i.setTag(t),i.setUpdateInApp(e),et.getCampaignTag(i,r,n)}else bt.isFunction(n)&&n(_t.showError(l,l.ErrorCode.BAD_REQUEST_SERVER_ERROR))}static addNewInAppToDismissForever(t){k.addNewInApptoDismissForever(t)}static async isInAppDismissForever(t){k.isInAppDismissForever(t)}static async inAppOnClick(t){lt.onClick(t)}static async inAppSubmit(t,e,r){lt.submit(t,e,r)}static async inAppWasShown(t,e,r,n,i){yt.inAppWasShown(t,e,r,n,i)}static async downloadHTML(t){const e=await fetch(t,{method:"GET"});console.log(e)}static async setExternalCode(t,e,r){try{const r=await k.setExternalCode(t);e&&e(r)}catch(t){r&&r(t)}}static async logIn(t,e,r){await this.setExternalCode(t,e,r)}static async logOut(t,e){await this.setExternalCode(null,t,e)}}const Rt=Pt;window.indigitall||(window.indigitall={}),window.indigitall.InApp=Pt,window.indigitall.InApp.version=e.getVersion(),window.indigitall.InApp.Utils=k,window.indigitall.LogLevel=St})(),n})(),t.exports=e()},326:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&{}.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(126));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]}}))}))},114:function(t){var e;e=()=>(()=>{var t={710:function(t){var e;e=()=>(()=>{"use strict";var t={330:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.9.0","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={};r.r(n),r.d(n,{default:()=>Y});var i={};r.r(i),r.d(i,{BaseApplicationRequest:()=>P,BaseClient:()=>S,BaseRequest:()=>O});var o={};r.r(o),r.d(o,{Channel:()=>R,CoreApplication:()=>L,Device:()=>T,DeviceStatus:()=>A,ErrorDictionary:()=>_,ErrorModel:()=>I,EventType:()=>w,TopicSubscribeType:()=>N});var s={};r.r(s),r.d(s,{CommonUtils:()=>C,CorePermissions:()=>D,CryptoUtils:()=>B,ErrorUtils:()=>b,JsonUtils:()=>U,Log:()=>m,LogLevel:()=>y,TopicUtils:()=>j,Validations:()=>V});var a={platform:"webpush",version:"0.0.1"};const u=r(330);a.version=u.version;const c=a=Object.assign(a,{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"}}),l=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!==l.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()}},h=l,f=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}}},d=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!==d.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")}},p=d,E=class{constructor(){this.storage=h,this.db=f,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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"}setItemSessionStorage(t,e){p.setItem(t,e)}getItemSessionStorage(t){return p.getItem(t)}clearSessionStorage(){p.clearMessages()}setStorage(t,e){h.setItem(t,e)}getStorage(t){return h.getItem(t)}clearStorage(){h.clear()}setBrowserPublicKey(t){h.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return h.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){h.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return h.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){h.setItem(this.APP_KEY,t),f&&f.IDB&&await f.setItem(this.APP_KEY,t)}getAppKey(){return h.getItem(this.APP_KEY)}async getAppKeySync(){if(f&&f.IDB)return await f.getItem(this.APP_KEY)}setVAPID(t){h.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return h.getItem(this.VAPID_PUBLIC)}setEnabled(t){h.setItem(this.ENABLED,t)}getEnabled(){return h.getItem(this.ENABLED)}setServiceSyncTime(t){h.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return h.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){h.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return h.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){h.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return h.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){h.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!h&&h.getItem(this.REQUEST_LOCATION)}async setPlatform(t){h.setItem(this.PLATFORM,t)}getPlatform(){return h&&h.getItem(this.PLATFORM)||c.platform}getVersion(){return c.version}async setBrowserName(t){h.setItem(this.BROWSER_NAME,t)}getBrowserName(){return h.getItem(this.BROWSER_NAME)}setBrowserVersion(t){h.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return h.getItem(this.BROWSER_VERSION)}async setOsName(t){h.setItem(this.OS_NAME,t)}getOsName(){return h.getItem(this.OS_NAME)}setOsVersion(t){h.setItem(this.OS_VERSION,t)}getOsVersion(){return h.getItem(this.OS_VERSION)}setDeviceType(t){h.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return h.getItem(this.DEVICE_TYPE)}setSupported(t){h.setItem(this.SUPPORTED,t)}getSupported(){return h.getItem(this.SUPPORTED)}setServiceTimestamp(t){h.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return h.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){h.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return h.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){h.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return h.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){h.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==h.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){h.setItem(this.LOG_LEVEL,t)}getLogLevel(){return h.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){h.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return h.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){h&&h.isLocalStorageAvailable()&&h.setItem(this.EXTERNAL_ID,t),f&&f.IDB&&await f.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{h&&h.isLocalStorageAvailable()?t=h.getItem(this.EXTERNAL_ID):f&&f.IDB&&(t=await f.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){h.setItem(this.EXTERNAL_ID,t)}getExternalId(){return h.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return h.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){h.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){h.setItem(this.LATITUDE,t)}getLatitude(){return h.getItem(this.LATITUDE)}setLongitude(t){h.setItem(this.LONGITUDE,t)}getLongitude(){return h.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}setAvoidCypher(t){this.setStorage(this.AVOID_CYPHER,t)}isAvoidCypher(){return this.getStorage(this.AVOID_CYPHER)}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)}setPushDisabled(t){this.setStorage(this.PUSH_DISABLED,t)}isPushDisabled(){return this.getStorage(this.PUSH_DISABLED)}getConfigV2ServiceSyncTime(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}setConfigV2ServiceSyncTime(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}getConfigV2(){return this.getStorage(this.CONFIG_V2)}setConfigV2(t){this.setStorage(this.CONFIG_V2,t)}getMaintenanceEnd(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}setMaintenanceEnd(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}getMaintenanceStart(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}setMaintenanceStart(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}},y=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),v=y;class g{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=v.INFO,this.setLogLevel((new E).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=v.DEBUG&&t<=v.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=v.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}i(){if(this.level<=v.INFO)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}w(){if(this.level<=v.WARNING)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}e(){if(this.level<=v.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const m=g,I=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=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"}},b=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);if(n>=0){const e=Object.keys(t.ErrorCode)[n],i=Object.values(t.ErrorCode)[n];return new I({code:e,errorId:i},Object.values(t.ErrorMessage)[n],r)}return new I(_.ErrorCode.GENERAL_ERROR,"general error",r)}}},S=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 m("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(v.DEBUG);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);if(304!=e.status){const 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 I(n.statusCode,n.message))}return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+e.status+"\n").writeLog(),e}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(),b.showError(_,_.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)}},O=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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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 E).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}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},P=class extends O{constructor(t=null){super(),this.PARAM_APPLICATION_CHANNEL="channel",this.channels=t}getApplicationRequest(){return this.params=this.createQueryString(),this}createQueryString(){let t="";if(this.channels&&this.channels.length>0)for(let e=0;e<this.channels.length;e++)t+=`${this.PARAM_APPLICATION_CHANNEL}=${this.channels[e].toLowerCase()}&`;return t+=`${this.PARAM_PLATFORM}=webpush`,t}},R=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"}),T=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new E).getBrowserPublicKey(),this.browserPrivateKey=(new E).getBrowserPrivateKey(),this.platform=(new E).getPlatform(),this.version=(new E).getVersion(),this.browserName=(new E).getBrowserName(),this.browserVersion=(new E).getBrowserVersion(),this.osName=(new E).getOsName(),this.osVersion=(new E).getOsVersion(),this.deviceType=(new E).getDeviceType(),(new E).getEnabled()&&(this.enabled="true"===(new E).getEnabled()),(new E).getExternalId()&&(this.externalCode=(new E).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new E).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new E).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}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}},A=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=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"}),N=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),L=class{constructor(t,e=!1){const r=new E;if(null!=t){r.setConfigV2(JSON.stringify(t)),t.contentAvailable&&(this.contentAvailable=t.contentAvailable),t.locationAccuracy&&(this.locationAccuracy=t.locationAccuracy),t.locationDistance&&(this.locationDistance=t.locationDistance),t.locationEnabled&&(this.locationEnabled=t.locationEnabled),t.locationUpdateMinutes&&(this.locationUpdateMinutes=t.locationUpdateMinutes),t.maintenanceWindow&&(this.maintenanceWindow=t.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,r.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,r.setMaintenanceEnd(this.maintenanceWindow.end))),t.networkEventsEnabled&&(this.networkEventsEnabled=t.networkEventsEnabled),t.networkUpdateMinutes&&(this.networkUpdateMinutes=t.networkUpdateMinutes);let n=Date.now();if(t.serviceSyncTime?(this.serviceSyncTime=t.serviceSyncTime,n=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):n=new Date(Date.now()+36e5),!e){const t=n.toString();new m("[IND]CoreApplication").d("ServiceSyncTime defined on: "+t).writeLog(),r.setConfigV2ServiceSyncTime(t)}}}},C=class{static isServiceTimestampExceed(){return!(new E).getServiceTimestamp()||(new E).getServiceSyncTime()<=(Date.now()-(new E).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},D=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 m("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},M=new m("[IND]Crypto"),k=new TextEncoder("utf-8"),x="HMAC",B=class{static async createHmac(t,e){try{let r="";if(!0===(new E).isAvoidCypher())r=e;else{const n=window?.crypto?.subtle;if(!n)return;const i=await n.importKey("raw",k.encode(t),{name:x,hash:{name:"SHA-256"}},!1,["sign","verify"]),o=await n.sign(x,i,k.encode(e)),s=new Uint8Array(o);r=Array.prototype.map.call(s,(t=>("00"+t.toString(16)).slice(-2))).join(""),M.d("hmac: ",r).writeLog()}return r}catch(t){return void M.e("error:",t).writeLog()}}},U=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}},V=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},j=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},Y={Repository:E,Config:c,Api:i,Models:o,Utils:s};return n})(),t.exports=e()},315:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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(710));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(610))&&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)}},468:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(254)),i=u(r(234)),o=u(r(457)),s=u(r(735)),a=u(r(630));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="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},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,s,a){var u=d(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==c(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,a,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,u,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(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){h(o,n,i,s,a,"next",t)}function a(t){h(o,n,i,s,a,"throw",t)}s(void 0)}))}}function d(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,p(n.key),n)}}function p(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}var E=function(){return t=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"},e=[{key:"getURL",value:(E=f(l().mark((function t(){return l().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 E.apply(this,arguments)})},{key:"call",value:(p=f(l().mark((function t(e,r,u,c){var h,f,d,p,E;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return h=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&h.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),f=t.t2+t.t3,u.isJourneyRequest()&&(f=f.replace("v1","v2")),d={method:e,headers:u.addHeaders()},e!==this.GET&&(d.body=JSON.stringify(u.getBody())),c&&(d.credentials=c),t.prev=13,t.next=16,fetch(f,d);case 16:if(304==(p=t.sent).status){t.next=28;break}return t.next=20,p.json();case 20:if(E=t.sent,!p.ok){t.next=24;break}return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\nResponse Body:",JSON.stringify(E.data,null,"\t")).writeLog(),t.abrupt("return",E);case 24:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\n").writeLog(),t.abrupt("return",new i.default(E.statusCode,E.message));case 28:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.status+"\n").writeLog(),t.abrupt("return",p);case 30:t.next=36;break;case 32:return t.prev=32,t.t4=t.catch(13),h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 36:case"end":return t.stop()}}),t,this,[[13,32]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(h=f(l().mark((function t(e,r){return l().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 h.apply(this,arguments)})},{key:"post",value:(c=f(l().mark((function t(e,r,n){return l().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 c.apply(this,arguments)})},{key:"put",value:(u=f(l().mark((function t(e,r,n){return l().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:(r=f(l().mark((function t(e,r){return l().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 r.apply(this,arguments)})}],e&&d(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,u,c,h,p,E}();e.default=E},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseApplicationRequest",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=s(r(468)),i=s(r(237)),o=s(r(773));function s(t){return t&&t.__esModule?t:{default:t}}},773:(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)}var i;function o(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,s(n.key),n)}}function s(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(a=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,a()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e)).PARAM_APPLICATION_CHANNEL="channel",t.channels=r,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(e,t),function(t,e){return e&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"getApplicationRequest",value:function(){return this.params=this.createQueryString(),this}},{key:"createQueryString",value:function(){var t="";if(this.channels&&this.channels.length>0)for(var e=0;e<this.channels.length;e++)t+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[e].toLowerCase(),"&");return t+"".concat(this.PARAM_PLATFORM,"=webpush")}}])}(((i=r(237))&&i.__esModule?i:{default:i}).default);e.default=l},237:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e){return e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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={}}),[{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:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}]);e.default=u},122:(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(904);n.version=i.version,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=n},610:(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=h(r(122)),o=h(r(291)),s=l(r(545)),a=l(r(225)),u=l(r(628));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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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 h(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"});e.default=r},174:(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=s(r(291)),o=s(r(254));function s(t){return t&&t.__esModule?t:{default: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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}var c=function(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=new i.default;if(null!=e){n.setConfigV2(JSON.stringify(e)),e.contentAvailable&&(this.contentAvailable=e.contentAvailable),e.locationAccuracy&&(this.locationAccuracy=e.locationAccuracy),e.locationDistance&&(this.locationDistance=e.locationDistance),e.locationEnabled&&(this.locationEnabled=e.locationEnabled),e.locationUpdateMinutes&&(this.locationUpdateMinutes=e.locationUpdateMinutes),e.maintenanceWindow&&(this.maintenanceWindow=e.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,n.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,n.setMaintenanceEnd(this.maintenanceWindow.end))),e.networkEventsEnabled&&(this.networkEventsEnabled=e.networkEventsEnabled),e.networkUpdateMinutes&&(this.networkUpdateMinutes=e.networkUpdateMinutes);var s=Date.now();if(e.serviceSyncTime?(this.serviceSyncTime=e.serviceSyncTime,s=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):s=new Date(Date.now()+36e5),!r){var a=s.toString();new o.default("[IND]CoreApplication").d("ServiceSyncTime defined on: "+a).writeLog(),n.setConfigV2ServiceSyncTime(a)}}}));e.default=c},395:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e){return e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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()}),[{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}}]);e.default=u},89:(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},735:(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},234:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=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=o},953:(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},72:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},225:(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,"CoreApplication",{enumerable:!0,get:function(){return l.default}}),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}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(902),i=h(r(395)),o=h(r(89)),s=h(r(735)),a=h(r(234)),u=h(r(953)),c=h(r(72)),l=h(r(174));function h(t){return t&&t.__esModule?t:{default:t}}},672:(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 e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:A(t,r,a)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function n(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==r(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=_,s(P,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,c,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.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&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=function(){return t=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},e=[{key:"getDB",value:(c=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 c.apply(this,arguments)})},{key:"get",value:(u=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 u.apply(this,arguments)})},{key:"put",value:(a=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 a.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:(i=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 i.apply(this,arguments)})},{key:"getItem",value:(r=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 r.apply(this,arguments)})}],e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i,a,u,c}();e.default=new u},87:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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()}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=o},291:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(122)),i=a(r(87)),o=a(r(672)),s=a(r(238));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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,s,a){var c=d(t[i],t,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==u(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,a,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 h(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 f(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,d(n.key),n)}}function d(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}var p=function(){return t=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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"},e=[{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:(O=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return O.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"getAppKeySync",value:(S=h(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return S.apply(this,arguments)})},{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:(b=h(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 b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(_=h(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 _.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:(I=h(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 I.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:(m=h(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 m.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:(g=h(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 g.apply(this,arguments)})},{key:"getExternalIdRequest",value:(v=h(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 v.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:"getRegisteredByCookie",value:(y=h(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 y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(E=h(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 E.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)}},{key:"setInAppTopicList",value:(p=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(d=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return d.apply(this,arguments)})},{key:"setTopicList",value:(l=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getTopicList",value:(u=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return u.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}},{key:"setAvoidCypher",value:function(t){this.setStorage(this.AVOID_CYPHER,t)}},{key:"isAvoidCypher",value:function(){return this.getStorage(this.AVOID_CYPHER)}},{key:"getUrlDeviceApi",value:(a=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.storage||!this.storage.isLocalStorageAvailable()){t.next=5;break}e=this.getStorage(this.URL_DEVICE_API),t.next=9;break;case 5:if(!this.db||!this.db.IDB){t.next=9;break}return t.next=8,this.db.getItem(this.URL_DEVICE_API);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 a.apply(this,arguments)})},{key:"setUrlDeviceApi",value:(r=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,e),!this.db||!this.db.IDB){t.next=4;break}return t.next=4,this.db.setItem(this.URL_DEVICE_API,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"setPushDisabled",value:function(t){this.setStorage(this.PUSH_DISABLED,t)}},{key:"isPushDisabled",value:function(){return this.getStorage(this.PUSH_DISABLED)}},{key:"getConfigV2ServiceSyncTime",value:function(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}},{key:"setConfigV2ServiceSyncTime",value:function(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}},{key:"getConfigV2",value:function(){return this.getStorage(this.CONFIG_V2)}},{key:"setConfigV2",value:function(t){this.setStorage(this.CONFIG_V2,t)}},{key:"getMaintenanceEnd",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}},{key:"setMaintenanceEnd",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}},{key:"getMaintenanceStart",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}},{key:"setMaintenanceStart",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}}],e&&f(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,a,u,l,d,p,E,y,v,g,m,I,_,b,S,O}();e.default=p},238:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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")}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=o},622:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e,r){return r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{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)}}]);e.default=u},429:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(254))&&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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,c,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,l(n.key),n)}}function l(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var h=function(){return function(t,e,r){return r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{key:"getPermissions",value:(n=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 n.apply(this,arguments)})},{key:"getPermission",value:(r=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 r.apply(this,arguments)})},{key:"setPermissionsCallback",value:(e=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 e.apply(this,arguments)})},{key:"setCallback",value:(t=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(e,r){return t.apply(this,arguments)})}]);var t,e,r,n}();e.default=h},170:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var n=i(r(291));function i(t){return t&&t.__esModule?t:{default:t}}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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,c,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,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,c(n.key),n)}}function c(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var l=new(i(r(254)).default)("[IND]Crypto"),h=new TextEncoder("utf-8"),f="HMAC",d=e.CryptoUtils=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"createHmac",value:(r=s().mark((function t(e,r){var i,o,a,u,c,d;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i="",!0!==(new n.default).isAvoidCypher()){t.next=6;break}i=r,t.next=18;break;case 6:if(a=null===(o=window)||void 0===o||null===(o=o.crypto)||void 0===o?void 0:o.subtle){t.next=9;break}return t.abrupt("return");case 9:return t.next=11,a.importKey("raw",h.encode(e),{name:f,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 11:return u=t.sent,t.next=14,a.sign(f,u,h.encode(r));case 14:c=t.sent,d=new Uint8Array(c),i=Array.prototype.map.call(d,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),l.d("hmac: ",i).writeLog();case 18:return t.abrupt("return",i);case 21:return t.prev=21,t.t0=t.catch(0),l.e("error:",t.t0).writeLog(),t.abrupt("return");case 25:case"end":return t.stop()}}),t,null,[[0,21]])})),i=function(){var t=this,e=arguments;return new Promise((function(n,i){var o=r.apply(t,e);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(t,e){return i.apply(this,arguments)})}],e&&u(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i}();e.default=d},457:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(735)),i=o(r(234));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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var c=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},(e=[{key:"showError",value:function(t,e,r){if(null!=t){var o=Object.values(t.ErrorCode).indexOf(e);if(o>=0){var s={code:Object.keys(t.ErrorCode)[o],errorId:Object.values(t.ErrorCode)[o]};return new i.default(s,Object.values(t.ErrorMessage)[o],r)}return new i.default(n.default.ErrorCode.GENERAL_ERROR,"general error",r)}}}])&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=new c},325:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{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}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},254:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(291)),i=o(r(630));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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var c=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=[]}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}),e;var e,r,o}();e.default=c},630:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},662:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},332:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},628:(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,"TopicUtils",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(622)),i=f(r(429)),o=f(r(170)),s=f(r(457)),a=f(r(325)),u=f(r(254)),c=r(630),l=f(r(332)),h=f(r(662));function f(t){return t&&t.__esModule?t:{default:t}}},904:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.9.0","_id":"indigitall-web-core@4.9.0","_inBundle":false,"_integrity":"sha512-lC3G2VLwtDvv0jAmaiXdW8lYmGmwCVkE2ubLfFmFIOKfR/f2u33hBj+uokM5qxwMuxlohXteuXCLs3BFbGsV4w==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.9.0","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.9.0","saveSpec":null,"fetchSpec":"4.9.0"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.9.0.tgz","_shasum":"30c78db643e8a62feb23626dc394a05f49f187e4","_spec":"indigitall-web-core@4.9.0","_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.9.0"}')}},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:()=>C});const{Repository:t}=r(315).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(315).Core.Api,{Config:s}=r(315).Core,{ErrorModel:a}=r(315).Core.Models,{CommonUtils:u}=r(315).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 C(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(315).Core.Api,h=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}},f=Object.freeze({SENT:"sent",CLICK:"click",DELETED:"deleted"});window.inboxStatus=f;const d=f,p=Object.freeze({NONE:"none",DEFAULT:"default",WEBHOOK:"webhook"}),{BaseRequest:E}=r(315).Core.Api,y=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()),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_EXTERNAL_ID+"="+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:v}=r(315).Core.Api,g=class extends v{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_EXTERNAL_ID+"="+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(315).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 S=_.ErrorMessage;Object.assign(S,{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 O={ErrorCode:b,ErrorMessage:S},{Validations:P,Log:R}=r(315).Core.Utils,T=class extends P{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new R("[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:A,ErrorUtils:w,Log:N}=r(315).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),this.count=0,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&&A.isFunction(navigator.indigitallGetAuthConfig)&&(r=navigator.indigitallGetAuthConfig());const n=new h;n.setJson(r),c.postInboxAuth(n,t,e)}static getMessagesCountWithAuth(t,e,r){A.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(T.isValidFormatRequest())if(T.isValidFormat(e.getExternalId())){const e=new g;c.getInboxCounter(e,t,(r=>{401===r.errorCode?this.generateAuthToken((()=>{c.getInboxCounter(e,t,r)}),r):A.isFunction(r)&&r(r)}))}else A.isFunction(r)&&r(w.showError(O,O.ErrorCode.INBOX_GET_ERROR));else A.isFunction(r)&&r(w.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}static getInboxWithAuth(t,e,r){A.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getInbox(e,r)}static getInbox(t,e){L.getInboxWithPage(null,null,null,null,null,t,e)}static getInboxWithPageAuth(t,e,r,n,i,o,s,a){A.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(T.isValidFormatRequest())if(T.isValidFormat(e.getExternalId())){const e=new y;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?A.isFunction(s)&&s(t):A.isFunction(a)&&a(w.showError(O,O.ErrorCode.INBOX_GET_PAGE_ERROR))}),(t=>{401==t.errorCode?this.generateAuthToken((()=>{c.getInbox(e,(t=>{this.totalPages=t.totalPages,A.isFunction(s)&&s(t)}),t)}),t):A.isFunction(t)&&t(t)}))}else A.isFunction(a)&&a(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else A.isFunction(a)&&a(w.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}getNextPage(t,r){const n=new N("[IND]Inbox: ");if(this.isRequestingPage)n.w(O.ErrorMessage.INBOX_IS_REQUESTING_PAGE).writeLog();else if(this.isRequestingPage=!0,this.page+1<this.totalPages)if(T.isValidFormatRequest())if(T.isValidFormat(e.getExternalId())){const e=new y;(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,A.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,A.isFunction(t)&&t(this,this.newNotifications)}),r)}),r):(this.isRequestingPage=!1,A.isFunction(r)&&r())}))}else this.isRequestingPage=!1,A.isFunction(r)&&r(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else A.isFunction(r)&&r(w.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST));else this.isRequestingPage=!1,A.isFunction(r)&&r(w.showError(O,O.ErrorCode.INBOX_NO_MESSAGES))}massiveEditNotifications(t,r,n,i){if(T.isValidFormatRequest())if(T.isValidFormat(e.getExternalId())){if(r){const e=new y;null!=t&&e.setSendingIds(t),e.setStatus(r),c.putInboxPush(e,n,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPush(e,n,t)}),t):A.isFunction(t)&&t(t)}))}}else A.isFunction(i)&&i(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else A.isFunction(i)&&i(w.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}getInfoFromNotification(t,r,n){if(T.isValidFormatRequest())if(T.isValidFormat(e.getExternalId())){if(t){const e=new y;e.setSendingId(t),c.getInboxPushWithSendingId(e,this.lastAccess,r,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.getInboxPushWithSendingId(e,this.lastAccess,r,t)}),t):A.isFunction(t)&&t(t)}))}}else A.isFunction(n)&&n(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else A.isFunction(n)&&n(w.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}modifyStatusFromNotification(t,r,n,i){if(T.isValidFormatRequest())if(T.isValidFormat(e.getExternalId())){if(t&&r){const e=new y;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):A.isFunction(t)&&t(t)}))}}else A.isFunction(i)&&i(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else A.isFunction(i)&&i(w.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}}const C=L})(),n})(),t.exports=e()},824:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&{}.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(114));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]}}))}))},603:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&{}.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(93));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]}}))}))},93:function(t){var e;e=()=>(()=>{var t={710:function(t){var e;e=()=>(()=>{"use strict";var t={330:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.9.0","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={};r.r(n),r.d(n,{default:()=>Y});var i={};r.r(i),r.d(i,{BaseApplicationRequest:()=>P,BaseClient:()=>S,BaseRequest:()=>O});var o={};r.r(o),r.d(o,{Channel:()=>R,CoreApplication:()=>L,Device:()=>T,DeviceStatus:()=>A,ErrorDictionary:()=>_,ErrorModel:()=>I,EventType:()=>w,TopicSubscribeType:()=>N});var s={};r.r(s),r.d(s,{CommonUtils:()=>C,CorePermissions:()=>D,CryptoUtils:()=>B,ErrorUtils:()=>b,JsonUtils:()=>U,Log:()=>m,LogLevel:()=>y,TopicUtils:()=>j,Validations:()=>V});var a={platform:"webpush",version:"0.0.1"};const u=r(330);a.version=u.version;const c=a=Object.assign(a,{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"}}),l=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!==l.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()}},h=l,f=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}}},d=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!==d.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")}},p=d,E=class{constructor(){this.storage=h,this.db=f,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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"}setItemSessionStorage(t,e){p.setItem(t,e)}getItemSessionStorage(t){return p.getItem(t)}clearSessionStorage(){p.clearMessages()}setStorage(t,e){h.setItem(t,e)}getStorage(t){return h.getItem(t)}clearStorage(){h.clear()}setBrowserPublicKey(t){h.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return h.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){h.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return h.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){h.setItem(this.APP_KEY,t),f&&f.IDB&&await f.setItem(this.APP_KEY,t)}getAppKey(){return h.getItem(this.APP_KEY)}async getAppKeySync(){if(f&&f.IDB)return await f.getItem(this.APP_KEY)}setVAPID(t){h.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return h.getItem(this.VAPID_PUBLIC)}setEnabled(t){h.setItem(this.ENABLED,t)}getEnabled(){return h.getItem(this.ENABLED)}setServiceSyncTime(t){h.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return h.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){h.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return h.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){h.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return h.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){h.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!h&&h.getItem(this.REQUEST_LOCATION)}async setPlatform(t){h.setItem(this.PLATFORM,t)}getPlatform(){return h&&h.getItem(this.PLATFORM)||c.platform}getVersion(){return c.version}async setBrowserName(t){h.setItem(this.BROWSER_NAME,t)}getBrowserName(){return h.getItem(this.BROWSER_NAME)}setBrowserVersion(t){h.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return h.getItem(this.BROWSER_VERSION)}async setOsName(t){h.setItem(this.OS_NAME,t)}getOsName(){return h.getItem(this.OS_NAME)}setOsVersion(t){h.setItem(this.OS_VERSION,t)}getOsVersion(){return h.getItem(this.OS_VERSION)}setDeviceType(t){h.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return h.getItem(this.DEVICE_TYPE)}setSupported(t){h.setItem(this.SUPPORTED,t)}getSupported(){return h.getItem(this.SUPPORTED)}setServiceTimestamp(t){h.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return h.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){h.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return h.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){h.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return h.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){h.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==h.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){h.setItem(this.LOG_LEVEL,t)}getLogLevel(){return h.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){h.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return h.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){h&&h.isLocalStorageAvailable()&&h.setItem(this.EXTERNAL_ID,t),f&&f.IDB&&await f.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{h&&h.isLocalStorageAvailable()?t=h.getItem(this.EXTERNAL_ID):f&&f.IDB&&(t=await f.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){h.setItem(this.EXTERNAL_ID,t)}getExternalId(){return h.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return h.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){h.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){h.setItem(this.LATITUDE,t)}getLatitude(){return h.getItem(this.LATITUDE)}setLongitude(t){h.setItem(this.LONGITUDE,t)}getLongitude(){return h.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}setAvoidCypher(t){this.setStorage(this.AVOID_CYPHER,t)}isAvoidCypher(){return this.getStorage(this.AVOID_CYPHER)}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)}setPushDisabled(t){this.setStorage(this.PUSH_DISABLED,t)}isPushDisabled(){return this.getStorage(this.PUSH_DISABLED)}getConfigV2ServiceSyncTime(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}setConfigV2ServiceSyncTime(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}getConfigV2(){return this.getStorage(this.CONFIG_V2)}setConfigV2(t){this.setStorage(this.CONFIG_V2,t)}getMaintenanceEnd(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}setMaintenanceEnd(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}getMaintenanceStart(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}setMaintenanceStart(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}},y=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),v=y;class g{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=v.INFO,this.setLogLevel((new E).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=v.DEBUG&&t<=v.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=v.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}i(){if(this.level<=v.INFO)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}w(){if(this.level<=v.WARNING)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}e(){if(this.level<=v.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const m=g,I=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=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"}},b=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);if(n>=0){const e=Object.keys(t.ErrorCode)[n],i=Object.values(t.ErrorCode)[n];return new I({code:e,errorId:i},Object.values(t.ErrorMessage)[n],r)}return new I(_.ErrorCode.GENERAL_ERROR,"general error",r)}}},S=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 m("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(v.DEBUG);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);if(304!=e.status){const 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 I(n.statusCode,n.message))}return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+e.status+"\n").writeLog(),e}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(),b.showError(_,_.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)}},O=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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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 E).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}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},P=class extends O{constructor(t=null){super(),this.PARAM_APPLICATION_CHANNEL="channel",this.channels=t}getApplicationRequest(){return this.params=this.createQueryString(),this}createQueryString(){let t="";if(this.channels&&this.channels.length>0)for(let e=0;e<this.channels.length;e++)t+=`${this.PARAM_APPLICATION_CHANNEL}=${this.channels[e].toLowerCase()}&`;return t+=`${this.PARAM_PLATFORM}=webpush`,t}},R=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"}),T=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new E).getBrowserPublicKey(),this.browserPrivateKey=(new E).getBrowserPrivateKey(),this.platform=(new E).getPlatform(),this.version=(new E).getVersion(),this.browserName=(new E).getBrowserName(),this.browserVersion=(new E).getBrowserVersion(),this.osName=(new E).getOsName(),this.osVersion=(new E).getOsVersion(),this.deviceType=(new E).getDeviceType(),(new E).getEnabled()&&(this.enabled="true"===(new E).getEnabled()),(new E).getExternalId()&&(this.externalCode=(new E).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new E).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new E).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}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}},A=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=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"}),N=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),L=class{constructor(t,e=!1){const r=new E;if(null!=t){r.setConfigV2(JSON.stringify(t)),t.contentAvailable&&(this.contentAvailable=t.contentAvailable),t.locationAccuracy&&(this.locationAccuracy=t.locationAccuracy),t.locationDistance&&(this.locationDistance=t.locationDistance),t.locationEnabled&&(this.locationEnabled=t.locationEnabled),t.locationUpdateMinutes&&(this.locationUpdateMinutes=t.locationUpdateMinutes),t.maintenanceWindow&&(this.maintenanceWindow=t.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,r.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,r.setMaintenanceEnd(this.maintenanceWindow.end))),t.networkEventsEnabled&&(this.networkEventsEnabled=t.networkEventsEnabled),t.networkUpdateMinutes&&(this.networkUpdateMinutes=t.networkUpdateMinutes);let n=Date.now();if(t.serviceSyncTime?(this.serviceSyncTime=t.serviceSyncTime,n=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):n=new Date(Date.now()+36e5),!e){const t=n.toString();new m("[IND]CoreApplication").d("ServiceSyncTime defined on: "+t).writeLog(),r.setConfigV2ServiceSyncTime(t)}}}},C=class{static isServiceTimestampExceed(){return!(new E).getServiceTimestamp()||(new E).getServiceSyncTime()<=(Date.now()-(new E).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},D=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 m("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},M=new m("[IND]Crypto"),k=new TextEncoder("utf-8"),x="HMAC",B=class{static async createHmac(t,e){try{let r="";if(!0===(new E).isAvoidCypher())r=e;else{const n=window?.crypto?.subtle;if(!n)return;const i=await n.importKey("raw",k.encode(t),{name:x,hash:{name:"SHA-256"}},!1,["sign","verify"]),o=await n.sign(x,i,k.encode(e)),s=new Uint8Array(o);r=Array.prototype.map.call(s,(t=>("00"+t.toString(16)).slice(-2))).join(""),M.d("hmac: ",r).writeLog()}return r}catch(t){return void M.e("error:",t).writeLog()}}},U=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}},V=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},j=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},Y={Repository:E,Config:c,Api:i,Models:o,Utils:s};return n})(),t.exports=e()},315:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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(710));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(610))&&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)}},468:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(254)),i=u(r(234)),o=u(r(457)),s=u(r(735)),a=u(r(630));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="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},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,s,a){var u=d(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==c(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,a,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,u,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(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){h(o,n,i,s,a,"next",t)}function a(t){h(o,n,i,s,a,"throw",t)}s(void 0)}))}}function d(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,p(n.key),n)}}function p(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}var E=function(){return t=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"},e=[{key:"getURL",value:(E=f(l().mark((function t(){return l().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 E.apply(this,arguments)})},{key:"call",value:(p=f(l().mark((function t(e,r,u,c){var h,f,d,p,E;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return h=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&h.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),f=t.t2+t.t3,u.isJourneyRequest()&&(f=f.replace("v1","v2")),d={method:e,headers:u.addHeaders()},e!==this.GET&&(d.body=JSON.stringify(u.getBody())),c&&(d.credentials=c),t.prev=13,t.next=16,fetch(f,d);case 16:if(304==(p=t.sent).status){t.next=28;break}return t.next=20,p.json();case 20:if(E=t.sent,!p.ok){t.next=24;break}return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\nResponse Body:",JSON.stringify(E.data,null,"\t")).writeLog(),t.abrupt("return",E);case 24:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\n").writeLog(),t.abrupt("return",new i.default(E.statusCode,E.message));case 28:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.status+"\n").writeLog(),t.abrupt("return",p);case 30:t.next=36;break;case 32:return t.prev=32,t.t4=t.catch(13),h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 36:case"end":return t.stop()}}),t,this,[[13,32]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(h=f(l().mark((function t(e,r){return l().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 h.apply(this,arguments)})},{key:"post",value:(c=f(l().mark((function t(e,r,n){return l().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 c.apply(this,arguments)})},{key:"put",value:(u=f(l().mark((function t(e,r,n){return l().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:(r=f(l().mark((function t(e,r){return l().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 r.apply(this,arguments)})}],e&&d(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,u,c,h,p,E}();e.default=E},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseApplicationRequest",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=s(r(468)),i=s(r(237)),o=s(r(773));function s(t){return t&&t.__esModule?t:{default:t}}},773:(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)}var i;function o(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,s(n.key),n)}}function s(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(a=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,a()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e)).PARAM_APPLICATION_CHANNEL="channel",t.channels=r,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(e,t),function(t,e){return e&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"getApplicationRequest",value:function(){return this.params=this.createQueryString(),this}},{key:"createQueryString",value:function(){var t="";if(this.channels&&this.channels.length>0)for(var e=0;e<this.channels.length;e++)t+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[e].toLowerCase(),"&");return t+"".concat(this.PARAM_PLATFORM,"=webpush")}}])}(((i=r(237))&&i.__esModule?i:{default:i}).default);e.default=l},237:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e){return e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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={}}),[{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:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}]);e.default=u},122:(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(904);n.version=i.version,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=n},610:(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=h(r(122)),o=h(r(291)),s=l(r(545)),a=l(r(225)),u=l(r(628));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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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 h(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"});e.default=r},174:(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=s(r(291)),o=s(r(254));function s(t){return t&&t.__esModule?t:{default: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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}var c=function(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=new i.default;if(null!=e){n.setConfigV2(JSON.stringify(e)),e.contentAvailable&&(this.contentAvailable=e.contentAvailable),e.locationAccuracy&&(this.locationAccuracy=e.locationAccuracy),e.locationDistance&&(this.locationDistance=e.locationDistance),e.locationEnabled&&(this.locationEnabled=e.locationEnabled),e.locationUpdateMinutes&&(this.locationUpdateMinutes=e.locationUpdateMinutes),e.maintenanceWindow&&(this.maintenanceWindow=e.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,n.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,n.setMaintenanceEnd(this.maintenanceWindow.end))),e.networkEventsEnabled&&(this.networkEventsEnabled=e.networkEventsEnabled),e.networkUpdateMinutes&&(this.networkUpdateMinutes=e.networkUpdateMinutes);var s=Date.now();if(e.serviceSyncTime?(this.serviceSyncTime=e.serviceSyncTime,s=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):s=new Date(Date.now()+36e5),!r){var a=s.toString();new o.default("[IND]CoreApplication").d("ServiceSyncTime defined on: "+a).writeLog(),n.setConfigV2ServiceSyncTime(a)}}}));e.default=c},395:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e){return e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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()}),[{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}}]);e.default=u},89:(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},735:(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},234:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=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=o},953:(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},72:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},225:(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,"CoreApplication",{enumerable:!0,get:function(){return l.default}}),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}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(902),i=h(r(395)),o=h(r(89)),s=h(r(735)),a=h(r(234)),u=h(r(953)),c=h(r(72)),l=h(r(174));function h(t){return t&&t.__esModule?t:{default:t}}},672:(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 e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:A(t,r,a)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function n(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==r(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=_,s(P,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,c,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.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&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=function(){return t=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},e=[{key:"getDB",value:(c=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 c.apply(this,arguments)})},{key:"get",value:(u=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 u.apply(this,arguments)})},{key:"put",value:(a=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 a.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:(i=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 i.apply(this,arguments)})},{key:"getItem",value:(r=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 r.apply(this,arguments)})}],e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i,a,u,c}();e.default=new u},87:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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()}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=o},291:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(122)),i=a(r(87)),o=a(r(672)),s=a(r(238));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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,s,a){var c=d(t[i],t,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==u(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,a,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 h(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 f(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,d(n.key),n)}}function d(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}var p=function(){return t=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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"},e=[{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:(O=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return O.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"getAppKeySync",value:(S=h(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return S.apply(this,arguments)})},{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:(b=h(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 b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(_=h(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 _.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:(I=h(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 I.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:(m=h(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 m.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:(g=h(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 g.apply(this,arguments)})},{key:"getExternalIdRequest",value:(v=h(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 v.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:"getRegisteredByCookie",value:(y=h(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 y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(E=h(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 E.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)}},{key:"setInAppTopicList",value:(p=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(d=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return d.apply(this,arguments)})},{key:"setTopicList",value:(l=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getTopicList",value:(u=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return u.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}},{key:"setAvoidCypher",value:function(t){this.setStorage(this.AVOID_CYPHER,t)}},{key:"isAvoidCypher",value:function(){return this.getStorage(this.AVOID_CYPHER)}},{key:"getUrlDeviceApi",value:(a=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.storage||!this.storage.isLocalStorageAvailable()){t.next=5;break}e=this.getStorage(this.URL_DEVICE_API),t.next=9;break;case 5:if(!this.db||!this.db.IDB){t.next=9;break}return t.next=8,this.db.getItem(this.URL_DEVICE_API);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 a.apply(this,arguments)})},{key:"setUrlDeviceApi",value:(r=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,e),!this.db||!this.db.IDB){t.next=4;break}return t.next=4,this.db.setItem(this.URL_DEVICE_API,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"setPushDisabled",value:function(t){this.setStorage(this.PUSH_DISABLED,t)}},{key:"isPushDisabled",value:function(){return this.getStorage(this.PUSH_DISABLED)}},{key:"getConfigV2ServiceSyncTime",value:function(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}},{key:"setConfigV2ServiceSyncTime",value:function(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}},{key:"getConfigV2",value:function(){return this.getStorage(this.CONFIG_V2)}},{key:"setConfigV2",value:function(t){this.setStorage(this.CONFIG_V2,t)}},{key:"getMaintenanceEnd",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}},{key:"setMaintenanceEnd",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}},{key:"getMaintenanceStart",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}},{key:"setMaintenanceStart",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}}],e&&f(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,a,u,l,d,p,E,y,v,g,m,I,_,b,S,O}();e.default=p},238:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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")}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=o},622:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e,r){return r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{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)}}]);e.default=u},429:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(254))&&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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,c,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,l(n.key),n)}}function l(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var h=function(){return function(t,e,r){return r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{key:"getPermissions",value:(n=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 n.apply(this,arguments)})},{key:"getPermission",value:(r=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 r.apply(this,arguments)})},{key:"setPermissionsCallback",value:(e=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 e.apply(this,arguments)})},{key:"setCallback",value:(t=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(e,r){return t.apply(this,arguments)})}]);var t,e,r,n}();e.default=h},170:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var n=i(r(291));function i(t){return t&&t.__esModule?t:{default:t}}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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,c,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,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,c(n.key),n)}}function c(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var l=new(i(r(254)).default)("[IND]Crypto"),h=new TextEncoder("utf-8"),f="HMAC",d=e.CryptoUtils=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"createHmac",value:(r=s().mark((function t(e,r){var i,o,a,u,c,d;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i="",!0!==(new n.default).isAvoidCypher()){t.next=6;break}i=r,t.next=18;break;case 6:if(a=null===(o=window)||void 0===o||null===(o=o.crypto)||void 0===o?void 0:o.subtle){t.next=9;break}return t.abrupt("return");case 9:return t.next=11,a.importKey("raw",h.encode(e),{name:f,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 11:return u=t.sent,t.next=14,a.sign(f,u,h.encode(r));case 14:c=t.sent,d=new Uint8Array(c),i=Array.prototype.map.call(d,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),l.d("hmac: ",i).writeLog();case 18:return t.abrupt("return",i);case 21:return t.prev=21,t.t0=t.catch(0),l.e("error:",t.t0).writeLog(),t.abrupt("return");case 25:case"end":return t.stop()}}),t,null,[[0,21]])})),i=function(){var t=this,e=arguments;return new Promise((function(n,i){var o=r.apply(t,e);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(t,e){return i.apply(this,arguments)})}],e&&u(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i}();e.default=d},457:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(735)),i=o(r(234));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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var c=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},(e=[{key:"showError",value:function(t,e,r){if(null!=t){var o=Object.values(t.ErrorCode).indexOf(e);if(o>=0){var s={code:Object.keys(t.ErrorCode)[o],errorId:Object.values(t.ErrorCode)[o]};return new i.default(s,Object.values(t.ErrorMessage)[o],r)}return new i.default(n.default.ErrorCode.GENERAL_ERROR,"general error",r)}}}])&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=new c},325:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{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}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},254:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(291)),i=o(r(630));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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var c=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=[]}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}),e;var e,r,o}();e.default=c},630:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},662:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},332:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},628:(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,"TopicUtils",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(622)),i=f(r(429)),o=f(r(170)),s=f(r(457)),a=f(r(325)),u=f(r(254)),c=r(630),l=f(r(332)),h=f(r(662));function f(t){return t&&t.__esModule?t:{default:t}}},114:function(t){var e;e=()=>(()=>{var t={710:function(t){var e;e=()=>(()=>{"use strict";var t={330:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.9.0","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={};r.r(n),r.d(n,{default:()=>Y});var i={};r.r(i),r.d(i,{BaseApplicationRequest:()=>P,BaseClient:()=>S,BaseRequest:()=>O});var o={};r.r(o),r.d(o,{Channel:()=>R,CoreApplication:()=>L,Device:()=>T,DeviceStatus:()=>A,ErrorDictionary:()=>_,ErrorModel:()=>I,EventType:()=>w,TopicSubscribeType:()=>N});var s={};r.r(s),r.d(s,{CommonUtils:()=>C,CorePermissions:()=>D,CryptoUtils:()=>B,ErrorUtils:()=>b,JsonUtils:()=>U,Log:()=>m,LogLevel:()=>y,TopicUtils:()=>j,Validations:()=>V});var a={platform:"webpush",version:"0.0.1"};const u=r(330);a.version=u.version;const c=a=Object.assign(a,{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"}}),l=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!==l.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()}},h=l,f=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}}},d=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!==d.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")}},p=d,E=class{constructor(){this.storage=h,this.db=f,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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"}setItemSessionStorage(t,e){p.setItem(t,e)}getItemSessionStorage(t){return p.getItem(t)}clearSessionStorage(){p.clearMessages()}setStorage(t,e){h.setItem(t,e)}getStorage(t){return h.getItem(t)}clearStorage(){h.clear()}setBrowserPublicKey(t){h.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return h.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){h.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return h.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){h.setItem(this.APP_KEY,t),f&&f.IDB&&await f.setItem(this.APP_KEY,t)}getAppKey(){return h.getItem(this.APP_KEY)}async getAppKeySync(){if(f&&f.IDB)return await f.getItem(this.APP_KEY)}setVAPID(t){h.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return h.getItem(this.VAPID_PUBLIC)}setEnabled(t){h.setItem(this.ENABLED,t)}getEnabled(){return h.getItem(this.ENABLED)}setServiceSyncTime(t){h.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return h.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){h.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return h.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){h.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return h.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){h.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!h&&h.getItem(this.REQUEST_LOCATION)}async setPlatform(t){h.setItem(this.PLATFORM,t)}getPlatform(){return h&&h.getItem(this.PLATFORM)||c.platform}getVersion(){return c.version}async setBrowserName(t){h.setItem(this.BROWSER_NAME,t)}getBrowserName(){return h.getItem(this.BROWSER_NAME)}setBrowserVersion(t){h.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return h.getItem(this.BROWSER_VERSION)}async setOsName(t){h.setItem(this.OS_NAME,t)}getOsName(){return h.getItem(this.OS_NAME)}setOsVersion(t){h.setItem(this.OS_VERSION,t)}getOsVersion(){return h.getItem(this.OS_VERSION)}setDeviceType(t){h.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return h.getItem(this.DEVICE_TYPE)}setSupported(t){h.setItem(this.SUPPORTED,t)}getSupported(){return h.getItem(this.SUPPORTED)}setServiceTimestamp(t){h.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return h.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){h.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return h.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){h.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return h.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){h.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==h.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){h.setItem(this.LOG_LEVEL,t)}getLogLevel(){return h.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){h.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return h.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){h&&h.isLocalStorageAvailable()&&h.setItem(this.EXTERNAL_ID,t),f&&f.IDB&&await f.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{h&&h.isLocalStorageAvailable()?t=h.getItem(this.EXTERNAL_ID):f&&f.IDB&&(t=await f.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){h.setItem(this.EXTERNAL_ID,t)}getExternalId(){return h.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return h.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){h.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){h.setItem(this.LATITUDE,t)}getLatitude(){return h.getItem(this.LATITUDE)}setLongitude(t){h.setItem(this.LONGITUDE,t)}getLongitude(){return h.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}setAvoidCypher(t){this.setStorage(this.AVOID_CYPHER,t)}isAvoidCypher(){return this.getStorage(this.AVOID_CYPHER)}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)}setPushDisabled(t){this.setStorage(this.PUSH_DISABLED,t)}isPushDisabled(){return this.getStorage(this.PUSH_DISABLED)}getConfigV2ServiceSyncTime(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}setConfigV2ServiceSyncTime(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}getConfigV2(){return this.getStorage(this.CONFIG_V2)}setConfigV2(t){this.setStorage(this.CONFIG_V2,t)}getMaintenanceEnd(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}setMaintenanceEnd(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}getMaintenanceStart(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}setMaintenanceStart(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}},y=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),v=y;class g{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=v.INFO,this.setLogLevel((new E).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=v.DEBUG&&t<=v.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=v.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}i(){if(this.level<=v.INFO)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}w(){if(this.level<=v.WARNING)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}e(){if(this.level<=v.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const m=g,I=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=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"}},b=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);if(n>=0){const e=Object.keys(t.ErrorCode)[n],i=Object.values(t.ErrorCode)[n];return new I({code:e,errorId:i},Object.values(t.ErrorMessage)[n],r)}return new I(_.ErrorCode.GENERAL_ERROR,"general error",r)}}},S=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 m("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(v.DEBUG);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);if(304!=e.status){const 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 I(n.statusCode,n.message))}return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+e.status+"\n").writeLog(),e}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(),b.showError(_,_.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)}},O=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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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 E).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}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},P=class extends O{constructor(t=null){super(),this.PARAM_APPLICATION_CHANNEL="channel",this.channels=t}getApplicationRequest(){return this.params=this.createQueryString(),this}createQueryString(){let t="";if(this.channels&&this.channels.length>0)for(let e=0;e<this.channels.length;e++)t+=`${this.PARAM_APPLICATION_CHANNEL}=${this.channels[e].toLowerCase()}&`;return t+=`${this.PARAM_PLATFORM}=webpush`,t}},R=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"}),T=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new E).getBrowserPublicKey(),this.browserPrivateKey=(new E).getBrowserPrivateKey(),this.platform=(new E).getPlatform(),this.version=(new E).getVersion(),this.browserName=(new E).getBrowserName(),this.browserVersion=(new E).getBrowserVersion(),this.osName=(new E).getOsName(),this.osVersion=(new E).getOsVersion(),this.deviceType=(new E).getDeviceType(),(new E).getEnabled()&&(this.enabled="true"===(new E).getEnabled()),(new E).getExternalId()&&(this.externalCode=(new E).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new E).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new E).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}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}},A=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=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"}),N=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),L=class{constructor(t,e=!1){const r=new E;if(null!=t){r.setConfigV2(JSON.stringify(t)),t.contentAvailable&&(this.contentAvailable=t.contentAvailable),t.locationAccuracy&&(this.locationAccuracy=t.locationAccuracy),t.locationDistance&&(this.locationDistance=t.locationDistance),t.locationEnabled&&(this.locationEnabled=t.locationEnabled),t.locationUpdateMinutes&&(this.locationUpdateMinutes=t.locationUpdateMinutes),t.maintenanceWindow&&(this.maintenanceWindow=t.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,r.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,r.setMaintenanceEnd(this.maintenanceWindow.end))),t.networkEventsEnabled&&(this.networkEventsEnabled=t.networkEventsEnabled),t.networkUpdateMinutes&&(this.networkUpdateMinutes=t.networkUpdateMinutes);let n=Date.now();if(t.serviceSyncTime?(this.serviceSyncTime=t.serviceSyncTime,n=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):n=new Date(Date.now()+36e5),!e){const t=n.toString();new m("[IND]CoreApplication").d("ServiceSyncTime defined on: "+t).writeLog(),r.setConfigV2ServiceSyncTime(t)}}}},C=class{static isServiceTimestampExceed(){return!(new E).getServiceTimestamp()||(new E).getServiceSyncTime()<=(Date.now()-(new E).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},D=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 m("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},M=new m("[IND]Crypto"),k=new TextEncoder("utf-8"),x="HMAC",B=class{static async createHmac(t,e){try{let r="";if(!0===(new E).isAvoidCypher())r=e;else{const n=window?.crypto?.subtle;if(!n)return;const i=await n.importKey("raw",k.encode(t),{name:x,hash:{name:"SHA-256"}},!1,["sign","verify"]),o=await n.sign(x,i,k.encode(e)),s=new Uint8Array(o);r=Array.prototype.map.call(s,(t=>("00"+t.toString(16)).slice(-2))).join(""),M.d("hmac: ",r).writeLog()}return r}catch(t){return void M.e("error:",t).writeLog()}}},U=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}},V=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},j=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},Y={Repository:E,Config:c,Api:i,Models:o,Utils:s};return n})(),t.exports=e()},315:(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){if(t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var e=u(void 0);if(e&&e.has(t))return e.get(t);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,e&&e.set(t,r),r}(r(710));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(610))&&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)}},468:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(254)),i=u(r(234)),o=u(r(457)),s=u(r(735)),a=u(r(630));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="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},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,s,a){var u=d(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==c(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,a,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,u,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(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){h(o,n,i,s,a,"next",t)}function a(t){h(o,n,i,s,a,"throw",t)}s(void 0)}))}}function d(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,p(n.key),n)}}function p(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}var E=function(){return t=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"},e=[{key:"getURL",value:(E=f(l().mark((function t(){return l().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 E.apply(this,arguments)})},{key:"call",value:(p=f(l().mark((function t(e,r,u,c){var h,f,d,p,E;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return h=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&h.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),f=t.t2+t.t3,u.isJourneyRequest()&&(f=f.replace("v1","v2")),d={method:e,headers:u.addHeaders()},e!==this.GET&&(d.body=JSON.stringify(u.getBody())),c&&(d.credentials=c),t.prev=13,t.next=16,fetch(f,d);case 16:if(304==(p=t.sent).status){t.next=28;break}return t.next=20,p.json();case 20:if(E=t.sent,!p.ok){t.next=24;break}return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\nResponse Body:",JSON.stringify(E.data,null,"\t")).writeLog(),t.abrupt("return",E);case 24:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\n").writeLog(),t.abrupt("return",new i.default(E.statusCode,E.message));case 28:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.status+"\n").writeLog(),t.abrupt("return",p);case 30:t.next=36;break;case 32:return t.prev=32,t.t4=t.catch(13),h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 36:case"end":return t.stop()}}),t,this,[[13,32]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(h=f(l().mark((function t(e,r){return l().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 h.apply(this,arguments)})},{key:"post",value:(c=f(l().mark((function t(e,r,n){return l().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 c.apply(this,arguments)})},{key:"put",value:(u=f(l().mark((function t(e,r,n){return l().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:(r=f(l().mark((function t(e,r){return l().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 r.apply(this,arguments)})}],e&&d(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,u,c,h,p,E}();e.default=E},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseApplicationRequest",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=s(r(468)),i=s(r(237)),o=s(r(773));function s(t){return t&&t.__esModule?t:{default:t}}},773:(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)}var i;function o(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(s=function(){return!!t})()}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var c=function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=a(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,s()?Reflect.construct(e,[],a(t).constructor):e.apply(t,r))}(this,e)).PARAM_APPLICATION_CHANNEL="channel",t.channels=r,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(e,t),function(t,e){return e&&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,o(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"getApplicationRequest",value:function(){return this.params=this.createQueryString(),this}},{key:"createQueryString",value:function(){var t="";if(this.channels&&this.channels.length>0)for(var e=0;e<this.channels.length;e++)t+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[e].toLowerCase(),"&");return t+"".concat(this.PARAM_PLATFORM,"=webpush")}}])}(((i=r(237))&&i.__esModule?i:{default:i}).default);e.default=c},237:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var a=function(t,e){return e&&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,s(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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={}}),[{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:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}]);e.default=a},122:(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(904);n.version=i.version,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=n},610:(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=h(r(122)),o=h(r(291)),s=l(r(545)),a=l(r(225)),u=l(r(628));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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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 h(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"});e.default=r},174:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(291)),i=o(r(254));function o(t){return t&&t.__esModule?t:{default:t}}var s=function(t){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var o=new n.default;if(null!=e){o.setConfigV2(JSON.stringify(e)),e.contentAvailable&&(this.contentAvailable=e.contentAvailable),e.locationAccuracy&&(this.locationAccuracy=e.locationAccuracy),e.locationDistance&&(this.locationDistance=e.locationDistance),e.locationEnabled&&(this.locationEnabled=e.locationEnabled),e.locationUpdateMinutes&&(this.locationUpdateMinutes=e.locationUpdateMinutes),e.maintenanceWindow&&(this.maintenanceWindow=e.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,o.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,o.setMaintenanceEnd(this.maintenanceWindow.end))),e.networkEventsEnabled&&(this.networkEventsEnabled=e.networkEventsEnabled),e.networkUpdateMinutes&&(this.networkUpdateMinutes=e.networkUpdateMinutes);var s=Date.now();if(e.serviceSyncTime?(this.serviceSyncTime=e.serviceSyncTime,s=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):s=new Date(Date.now()+36e5),!r){var a=s.toString();new i.default("[IND]CoreApplication").d("ServiceSyncTime defined on: "+a).writeLog(),o.setConfigV2ServiceSyncTime(a)}}}));e.default=s},395:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var a=function(t,e){return e&&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,s(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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()}),[{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}}]);e.default=a},89:(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},735:(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"}}},234:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=function(t){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},953:(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},72:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},225:(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,"CoreApplication",{enumerable:!0,get:function(){return l.default}}),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}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(902),i=h(r(395)),o=h(r(89)),s=h(r(735)),a=h(r(234)),u=h(r(953)),c=h(r(72)),l=h(r(174));function h(t){return t&&t.__esModule?t:{default:t}}},672:(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 e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:A(t,r,a)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function n(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==r(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=_,s(P,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,c,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.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&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=function(){return t=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},e=[{key:"getDB",value:(c=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 c.apply(this,arguments)})},{key:"get",value:(u=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 u.apply(this,arguments)})},{key:"put",value:(a=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 a.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:(i=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 i.apply(this,arguments)})},{key:"getItem",value:(r=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 r.apply(this,arguments)})}],e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i,a,u,c}();e.default=new u},87:(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){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){return t=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},e=[{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()}}],e&&function(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=i},291:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(122)),i=a(r(87)),o=a(r(672)),s=a(r(238));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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,s,a){var c=d(t[i],t,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==u(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,a,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 h(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 f(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,d(n.key),n)}}function d(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}var p=function(){return t=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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"},e=[{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:(O=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return O.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"getAppKeySync",value:(S=h(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return S.apply(this,arguments)})},{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:(b=h(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 b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(_=h(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 _.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:(I=h(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 I.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:(m=h(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 m.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:(g=h(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 g.apply(this,arguments)})},{key:"getExternalIdRequest",value:(v=h(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 v.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:"getRegisteredByCookie",value:(y=h(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 y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(E=h(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 E.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)}},{key:"setInAppTopicList",value:(p=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(d=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return d.apply(this,arguments)})},{key:"setTopicList",value:(l=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getTopicList",value:(u=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return u.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}},{key:"setAvoidCypher",value:function(t){this.setStorage(this.AVOID_CYPHER,t)}},{key:"isAvoidCypher",value:function(){return this.getStorage(this.AVOID_CYPHER)}},{key:"getUrlDeviceApi",value:(a=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.storage||!this.storage.isLocalStorageAvailable()){t.next=5;break}e=this.getStorage(this.URL_DEVICE_API),t.next=9;break;case 5:if(!this.db||!this.db.IDB){t.next=9;break}return t.next=8,this.db.getItem(this.URL_DEVICE_API);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 a.apply(this,arguments)})},{key:"setUrlDeviceApi",value:(r=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,e),!this.db||!this.db.IDB){t.next=4;break}return t.next=4,this.db.setItem(this.URL_DEVICE_API,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"setPushDisabled",value:function(t){this.setStorage(this.PUSH_DISABLED,t)}},{key:"isPushDisabled",value:function(){return this.getStorage(this.PUSH_DISABLED)}},{key:"getConfigV2ServiceSyncTime",value:function(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}},{key:"setConfigV2ServiceSyncTime",value:function(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}},{key:"getConfigV2",value:function(){return this.getStorage(this.CONFIG_V2)}},{key:"setConfigV2",value:function(t){this.setStorage(this.CONFIG_V2,t)}},{key:"getMaintenanceEnd",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}},{key:"setMaintenanceEnd",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}},{key:"getMaintenanceStart",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}},{key:"setMaintenanceStart",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}}],e&&f(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,a,u,l,d,p,E,y,v,g,m,I,_,b,S,O}();e.default=p},238:(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){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){return t=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},e=[{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")}}],e&&function(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=i},622:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var a=function(t,e,r){return 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,s(n.key),n)}}(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{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)}}]);e.default=a},429:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(254))&&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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,c,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var l=function(){return function(t,e,r){return 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,c(n.key),n)}}(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{key:"getPermissions",value:(n=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 n.apply(this,arguments)})},{key:"getPermission",value:(r=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 r.apply(this,arguments)})},{key:"setPermissionsCallback",value:(e=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 e.apply(this,arguments)})},{key:"setCallback",value:(t=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(e,r){return t.apply(this,arguments)})}]);var t,e,r,n}();e.default=l},170:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var n=i(r(291));function i(t){return t&&t.__esModule?t:{default:t}}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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:A(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function R(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function A(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},R(T.prototype),h(T.prototype,c,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new T(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},R(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var c=new(i(r(254)).default)("[IND]Crypto"),l=new TextEncoder("utf-8"),h="HMAC",f=e.CryptoUtils=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"createHmac",value:(r=s().mark((function t(e,r){var i,o,a,u,f,d;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i="",!0!==(new n.default).isAvoidCypher()){t.next=6;break}i=r,t.next=18;break;case 6:if(a=null===(o=window)||void 0===o||null===(o=o.crypto)||void 0===o?void 0:o.subtle){t.next=9;break}return t.abrupt("return");case 9:return t.next=11,a.importKey("raw",l.encode(e),{name:h,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 11:return u=t.sent,t.next=14,a.sign(h,u,l.encode(r));case 14:f=t.sent,d=new Uint8Array(f),i=Array.prototype.map.call(d,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),c.d("hmac: ",i).writeLog();case 18:return t.abrupt("return",i);case 21:return t.prev=21,t.t0=t.catch(0),c.e("error:",t.t0).writeLog(),t.abrupt("return");case 25:case"end":return t.stop()}}),t,null,[[0,21]])})),i=function(){var t=this,e=arguments;return new Promise((function(n,i){var o=r.apply(t,e);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(t,e){return i.apply(this,arguments)})}],e&&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,u(n.key),n)}}(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i}();e.default=f},457:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(735)),i=o(r(234));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){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var u=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},(e=[{key:"showError",value:function(t,e,r){if(null!=t){var o=Object.values(t.ErrorCode).indexOf(e);if(o>=0){var s={code:Object.keys(t.ErrorCode)[o],errorId:Object.values(t.ErrorCode)[o]};return new i.default(s,Object.values(t.ErrorMessage)[o],r)}return new i.default(n.default.ErrorCode.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,a(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=new u},325:(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){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{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}}],e&&function(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=i},254:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(291)),i=o(r(630));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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var c=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=[]}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}),e;var e,r,o}();e.default=c},630:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},662:(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){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],e&&function(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=i},332:(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){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],e&&function(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=i},628:(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,"TopicUtils",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(622)),i=f(r(429)),o=f(r(170)),s=f(r(457)),a=f(r(325)),u=f(r(254)),c=r(630),l=f(r(332)),h=f(r(662));function f(t){return t&&t.__esModule?t:{default:t}}},904:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.9.0","_id":"indigitall-web-core@4.9.0","_inBundle":false,"_integrity":"sha512-lC3G2VLwtDvv0jAmaiXdW8lYmGmwCVkE2ubLfFmFIOKfR/f2u33hBj+uokM5qxwMuxlohXteuXCLs3BFbGsV4w==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.9.0","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.9.0","saveSpec":null,"fetchSpec":"4.9.0"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.9.0.tgz","_shasum":"30c78db643e8a62feb23626dc394a05f49f187e4","_spec":"indigitall-web-core@4.9.0","_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.9.0"}')}},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:()=>C});const{Repository:t}=r(315).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(315).Core.Api,{Config:s}=r(315).Core,{ErrorModel:a}=r(315).Core.Models,{CommonUtils:u}=r(315).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 C(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(315).Core.Api,h=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}},f=Object.freeze({SENT:"sent",CLICK:"click",DELETED:"deleted"});window.inboxStatus=f;const d=f,p=Object.freeze({NONE:"none",DEFAULT:"default",WEBHOOK:"webhook"}),{BaseRequest:E}=r(315).Core.Api,y=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()),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_EXTERNAL_ID+"="+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:v}=r(315).Core.Api,g=class extends v{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_EXTERNAL_ID+"="+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(315).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 S=_.ErrorMessage;Object.assign(S,{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 O={ErrorCode:b,ErrorMessage:S},{Validations:P,Log:R}=r(315).Core.Utils,T=class extends P{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new R("[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:A,ErrorUtils:w,Log:N}=r(315).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),this.count=0,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&&A.isFunction(navigator.indigitallGetAuthConfig)&&(r=navigator.indigitallGetAuthConfig());const n=new h;n.setJson(r),c.postInboxAuth(n,t,e)}static getMessagesCountWithAuth(t,e,r){A.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(T.isValidFormatRequest())if(T.isValidFormat(e.getExternalId())){const e=new g;c.getInboxCounter(e,t,(r=>{401===r.errorCode?this.generateAuthToken((()=>{c.getInboxCounter(e,t,r)}),r):A.isFunction(r)&&r(r)}))}else A.isFunction(r)&&r(w.showError(O,O.ErrorCode.INBOX_GET_ERROR));else A.isFunction(r)&&r(w.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}static getInboxWithAuth(t,e,r){A.isFunction(t.getAuthConfig)&&(navigator.indigitallGetAuthConfig=getAuthConfig),L.getInbox(e,r)}static getInbox(t,e){L.getInboxWithPage(null,null,null,null,null,t,e)}static getInboxWithPageAuth(t,e,r,n,i,o,s,a){A.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(T.isValidFormatRequest())if(T.isValidFormat(e.getExternalId())){const e=new y;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?A.isFunction(s)&&s(t):A.isFunction(a)&&a(w.showError(O,O.ErrorCode.INBOX_GET_PAGE_ERROR))}),(t=>{401==t.errorCode?this.generateAuthToken((()=>{c.getInbox(e,(t=>{this.totalPages=t.totalPages,A.isFunction(s)&&s(t)}),t)}),t):A.isFunction(t)&&t(t)}))}else A.isFunction(a)&&a(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else A.isFunction(a)&&a(w.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}getNextPage(t,r){const n=new N("[IND]Inbox: ");if(this.isRequestingPage)n.w(O.ErrorMessage.INBOX_IS_REQUESTING_PAGE).writeLog();else if(this.isRequestingPage=!0,this.page+1<this.totalPages)if(T.isValidFormatRequest())if(T.isValidFormat(e.getExternalId())){const e=new y;(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,A.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,A.isFunction(t)&&t(this,this.newNotifications)}),r)}),r):(this.isRequestingPage=!1,A.isFunction(r)&&r())}))}else this.isRequestingPage=!1,A.isFunction(r)&&r(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else A.isFunction(r)&&r(w.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST));else this.isRequestingPage=!1,A.isFunction(r)&&r(w.showError(O,O.ErrorCode.INBOX_NO_MESSAGES))}massiveEditNotifications(t,r,n,i){if(T.isValidFormatRequest())if(T.isValidFormat(e.getExternalId())){if(r){const e=new y;null!=t&&e.setSendingIds(t),e.setStatus(r),c.putInboxPush(e,n,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPush(e,n,t)}),t):A.isFunction(t)&&t(t)}))}}else A.isFunction(i)&&i(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else A.isFunction(i)&&i(w.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}getInfoFromNotification(t,r,n){if(T.isValidFormatRequest())if(T.isValidFormat(e.getExternalId())){if(t){const e=new y;e.setSendingId(t),c.getInboxPushWithSendingId(e,this.lastAccess,r,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.getInboxPushWithSendingId(e,this.lastAccess,r,t)}),t):A.isFunction(t)&&t(t)}))}}else A.isFunction(n)&&n(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else A.isFunction(n)&&n(w.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}modifyStatusFromNotification(t,r,n,i){if(T.isValidFormatRequest())if(T.isValidFormat(e.getExternalId())){if(t&&r){const e=new y;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):A.isFunction(t)&&t(t)}))}}else A.isFunction(i)&&i(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else A.isFunction(i)&&i(w.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}}const C=L})(),n})(),t.exports=e()},824:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&{}.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(114));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]}}))}))},904:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.9.0","_id":"indigitall-web-core@4.9.0","_inBundle":false,"_integrity":"sha512-lC3G2VLwtDvv0jAmaiXdW8lYmGmwCVkE2ubLfFmFIOKfR/f2u33hBj+uokM5qxwMuxlohXteuXCLs3BFbGsV4w==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.9.0","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.9.0","saveSpec":null,"fetchSpec":"4.9.0"},"_requiredBy":["#USER","/","/indigitall-web-inbox"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.9.0.tgz","_shasum":"30c78db643e8a62feb23626dc394a05f49f187e4","_spec":"indigitall-web-core@4.9.0","_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.9.0"}')}},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:()=>vt});var t=r(824),e=r.n(t);const{Repository:i}=r(315).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.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.REPOSITORY+".SAFARI_GESTURE_REQUEST_PERMISSION",this.UPDATE_TOPIC_SUBSCRIBE=this.REPOSITORY+".UPDATE_TOPIC_SUBSCRIBE",this.TOPIC_SYNC_TIMESTAMP=this.REPOSITORY+".TOPIC_SYNC_TIMESTAMP",this.TOPIC_SEMAPHORE=this.REPOSITORY+".TOPIC_SEMAPHORE",this.TOPIC_SYNC_IS_PROCESSING=this.REPOSITORY+".TOPIC_SYNC_IS_PROCESSING"}async setDeviceId(t){this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,t),this.db&&this.db.IDB&&await this.db.setItem(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}async getDeviceIdSync(){if(this.db&&this.db.IDB)return await this.db.getItem(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 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)}async setUpdateTopicSubscribe(t){this.db&&this.db.IDB&&await this.db.setItem(this.UPDATE_TOPIC_SUBSCRIBE,t)}async getUpdateTopicSubscribe(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.UPDATE_TOPIC_SUBSCRIBE))}catch(t){}return t}async setTopicSyncTimestamp(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_SYNC_TIMESTAMP,t)}async getTopicSyncTimestamp(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_SYNC_TIMESTAMP))}catch(t){}return t}async setTopicSemaphore(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_SEMAPHORE,t)}async getTopicSemaphore(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_SEMAPHORE))}catch(t){}return t}async setTopicSyncIsProcessing(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_SYNC_IS_PROCESSING,t)}async getTopicSyncIsProcessing(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_SYNC_IS_PROCESSING))}catch(t){}return t}},{ErrorDictionary:s}=r(315).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,DISABLED_CHANNEL:4404});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'",DISABLED_CHANNEL:"disabled channel"});const c={ErrorCode:a,ErrorMessage:u},{BaseRequest:l}=r(315).Core.Api,{EventType:h}=r(315).Core.Models,f=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.journeyExecution&&(t.journeyExecution=this.journeyExecution),this.cjCurrentStateId&&(t.cjCurrentStateId=this.cjCurrentStateId),this.campaignId&&(t.campaignId=this.campaignId),this.body=t,this}postEventVisitRequest(){const t={};return t.deviceId=o.getDeviceId(),t.eventType=h.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=h.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 f;r.setAppKey(o.getAppKey()),r.setDeviceId(o.getDeviceId()),r.setPermissionType(t),r.setEventType(e),T.postEventPermission(r)}static async getPutRequestTimestamp(){return await o.getPutRequestTimestamp()?o.getPutRequestTimestamp():Date.now()+6048e5}},{Validations:p,Log:E}=r(315).Core.Utils,y=class extends p{static isAppKeyFormat(){const t=o.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new E("[IND]PushValidations: "),e=o.getDeviceId();let r=!0;return this.isAppKeyFormat()||(r=!1,t.w("appKey is null or empty").writeLog()),o.isPushDisabled()||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:v}=r(315).Core.Models,g=class extends v{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))}static setDeviceJson(t){o.setDeviceJson(JSON.stringify(t.toJSON()))}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(315).Core,{BaseClient:I}=r(315).Core.Api,{ErrorModel:_,Channel:b}=r(315).Core.Models,{TopicUtils:S,Log:O,CommonUtils:P,ErrorUtils:R}=r(315).Core.Utils,T=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 O("[IND]Client: ")}async getURL(){return await o.getUrlDeviceApi()||this.URL_BASE}async getApplicationAll(t,e,r){if(y.isAppKeyFormat()){const n=await this.get(this.ENDPOINT_APPLICATION_ALL,t.getApplicationRequest());!n||n instanceof _?n?P.isFunction(r)&&r(n):P.isFunction(r)&&r():P.isFunction(e)&&e(n)}else P.isFunction(r)&&r(R.showError(c,c.ErrorCode.BAD_REQUEST_SERVER_ERROR));return!0}async postDevice(t,e,r){if(y.isAppKeyFormat()){const n=await this.post(this.ENDPOINT_DEVICE,t.postDeviceRequest(),"include");if(!n||n instanceof _)n?P.isFunction(r)&&r(n):P.isFunction(r)&&r();else{const t={enabled:n.data.enabled,deviceId:n.data.deviceId,registeredByCookie:n.data.registeredByCookie};await o.setDeviceId(t.deviceId),P.isFunction(e)&&e(new g(t,!0))}}else P.isFunction(r)&&r(R.showError(c,c.ErrorCode.GENERAL_ERROR_APPKEY_BAD_REQUEST));return!0}async putDevice(t,e,r){const n=new g,i=await y.isPutRequestExceed();if(t.deviceUpdate||null==await o.getPutRequestTimestamp()||i)if(y.isValidFormatRequest()){o.setPutRequestTimestamp(await d.getPutRequestTimestamp());const i=await this.put(this.ENDPOINT_DEVICE,t.putDeviceRequest(n),"include");if(!i||i instanceof _)i?P.isFunction(r)&&r(i):P.isFunction(r)&&r();else{const t={enabled:i.data.enabled,deviceId:i.data.deviceId,registeredByCookie:i.data.registeredByCookie};P.isFunction(e)&&e(new g(t,!0))}}else P.isFunction(r)&&r(R.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));else P.isFunction(e)&&e(n)}async getDevice(t,e,r){if(y.isValidFormatRequest()){const n=await this.get(this.ENDPOINT_DEVICE,t.getDeviceRequest());if(!n||n instanceof _)n?P.isFunction(r)&&r(n):P.isFunction(r)&&r();else{const t={enabled:n.data.enabled,deviceId:n.data.deviceId};P.isFunction(e)&&e(new g(t,!0))}}else P.isFunction(r)&&r(R.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async getDeviceTopics(t,e,r){if(y.isValidFormatRequest()){const n=await this.get(this.ENDPOINT_DEVICE_TOPICS,t.getDeviceTopicsRequest());!n||n instanceof _?n?P.isFunction(r)&&r(n):P.isFunction(r)&&r():P.isFunction(e)&&e(S.setTopicChannel(n.data.topics,b.PUSH))}else P.isFunction(r)&&r(R.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postDeviceTopics(t,e,r){return y.isValidFormatRequest()?await this.postDeviceTopicsRequest(t,e,r):P.isFunction(r)&&r(R.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST)),!0}async postDeviceTopicsRequest(t,e,r){const n=await this.post(this.ENDPOINT_DEVICE_TOPICS,t.postDeviceTopicsRequest());if(!n||n instanceof _)n?P.isFunction(r)&&r(n):P.isFunction(r)&&r();else{const t=n.data.topics;P.isFunction(e)&&e(t)}}async deleteDeviceTopics(t,e,r){return y.isValidFormatRequest()?this.deleteDeviceTopicsRequest(t,e,r):P.isFunction(r)&&r(R.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST)),!0}async deleteDeviceTopicsRequest(t,e,r){const n=await this.delete(this.ENDPOINT_DEVICE_TOPICS,t.deleteDeviceTopicsRequest());if(!n||n instanceof _)n?P.isFunction(r)&&r(n):P.isFunction(r)&&r();else{const t=n.data.topics;P.isFunction(e)&&e(t)}}async postEventPush(t){y.isValidFormatRequest()&&await this.post(this.ENDPOINT_EVENT_PUSH,t.postEventPushRequest())}postEventVisit(t){y.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_VISIT,t.postEventVisitRequest())}postEventPermission(t){y.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_PERMISSION,t.postEventPermissionRequest())}postEventLocation(t){y.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_LOCATION,t.postEventLocationRequest())}async getBrowser(t,e,r){if(y.isAppKeyFormat()){const n=await this.get(this.ENDPOINT_BROWSER,t);if(!n||n instanceof _)n?P.isFunction(r)&&r(n):P.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),await o.setPlatform("webpush"),P.isFunction(e)&&e(t)}}else P.isFunction(r)&&r(R.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventCustom(t,e,r){if(y.isValidFormatRequest()){const n=await this.post(this.ENDPOINT_EVENT_CUSTOM,t.postEventCustomRequest());!n||n instanceof _?n?P.isFunction(r)&&r(n):P.isFunction(r)&&r():P.isFunction(e)&&e(n)}else P.isFunction(r)&&r(R.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventCustomSync(t,e,r){if(y.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())),P.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)?P.isFunction(e)&&e():P.isFunction(r)&&r()},i.send(JSON.stringify(t.getBody()))}}catch(t){P.isFunction(r)&&r(R.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}else P.isFunction(r)&&r(R.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventJourney(t,e,r){if(y.isValidFormatRequest()){const n=await this.post(this.ENDPOINT_PUSH+this.ENDPOINT_EVENT_CUSTOM,t.postEventCustomRequest());!n||n instanceof _?n?P.isFunction(r)&&r(n):P.isFunction(r)&&r():P.isFunction(e)&&e(n)}else P.isFunction(r)&&r(R.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventJourneySync(t,e,r){if(y.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())),P.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)?P.isFunction(e)&&e():P.isFunction(r)&&r()},i.send(JSON.stringify(t.getBody()))}}catch(t){P.isFunction(r)&&r(R.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}else P.isFunction(r)&&r(R.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventPushClick(t){let e="/event/push";t.journeyStateId&&(t.setJourneyRequest(!0),e="/push/event/click"),t.setServiceWorkerRequest(!0),await this.post(e,t.postEventPushRequest())}async postTopicsSubscribeFromServiceWorker(t){t.setServiceWorkerRequest(!0),await this.post("/device/topics",t.postDeviceTopicsRequest())}},{Config:A}=r(315).Core,{BaseRequest:w}=r(315).Core.Api,N=class extends w{getApplicationRequest(){return this.params=this.PARAM_PLATFORM+"="+A.platform,this}},{DeviceStatus:L}=r(315).Core.Models,{BaseRequest:C}=r(315).Core.Api,D=class extends C{constructor(t=L.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!==L.DEFAULT&&(this.body.enabled=1===this.status),this}putDeviceRequest(t){return this.params=this.createQueryString(),this.body=this.createPUTDeviceJson(t),this.status!==L.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.device.deviceId?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)}},M=Object.freeze({PERMISSION_TYPE_PUSH:"push",PERMISSION_TYPE_LOCATION:"location"}),{CorePermissions:k}=r(315).Core.Utils,x=class{static async getPermissions(){const t=await k.getPermissions(),e=await k.getPermission("push");return e&&(t.push=e.state),null===e&&window.Notification&&window.Notification.permission&&(t.push=window.Notification.permission),t}static async setPermissionsCallback(){k.setPermissionsCallback(),await k.setCallback("push",navigator.indigitallRequestPushPermission)}},{Log:B,CommonUtils:U,ErrorUtils:V}=r(315).Core.Utils,{EventType:j}=r(315).Core.Models,Y="[IND]IndigitallSafari: ",F=class{static isSafariPushNotificationSupported(){return!!y.isSafariBrowserDevice()||!!window?.safari?.pushNotification}static async launchNotificationPermissionForSafari(){const t=new B(Y);if(o.getSafariGestureRequestPermission()===j.EVENT_TYPE_ASK)if(o.getSafariWebsitePushId()&&o.getDeviceId())if(y.isSafariBrowserDevice()&&o.getWorkerPath()){const t=await navigator.serviceWorker.register(o.getWorkerPath());"granted"===await window.Notification.requestPermission()&&(o.setPermissionPush(j.EVENT_TYPE_ACCEPT),vt.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 B(Y);try{if("default"===t.permission){const t={deviceCode:o.getDeviceId()};e.d("permission default: ",t).writeLog(),o.getPermissionPush()||d.callEventPermission(M.PERMISSION_TYPE_PUSH,j.EVENT_TYPE_ASK),window.safari.pushNotification.requestPermission(await T.getURL()+"/safari",o.getSafariWebsitePushId(),t,window.indigitall.Push.checkRemotePermission)}else"denied"===t.permission?(e.w("permission denied: ",t).writeLog(),o.getPermissionPush()&&o.getPermissionPush()!=j.EVENT_TYPE_REJECT&&(d.callEventPermission(M.PERMISSION_TYPE_PUSH,j.EVENT_TYPE_REJECT),o.setPermissionPush(j.EVENT_TYPE_REJECT))):"granted"===t.permission&&(e.d("permission granted: ",t).writeLog(),o.getPermissionPush()&&o.getPermissionPush()!=j.EVENT_TYPE_ACCEPT&&(d.callEventPermission(M.PERMISSION_TYPE_PUSH,j.EVENT_TYPE_ACCEPT),o.setPermissionPush(j.EVENT_TYPE_ACCEPT)),t.deviceToken&&t.deviceToken!==o.getPushToken()&&(o.setPushToken(t.deviceToken),T.putDevice(new D,(t=>{if(U.isFunction(navigator.indigitallOnInitialized)){const t={};t.push=o.getPermissionPush(),t.location=o.getPermissionLocation(),navigator.indigitallOnInitialized(t,new g)}U.isFunction(navigator.indigitallOnNewUserRegistered)&&!o.getNewUserTimestamp()&&(o.setNewUserTimestamp(Date.now()),navigator.indigitallOnNewUserRegistered(t)),vt.registerLocation()}),navigator.indigitallOnError),o.setServiceTimestamp(Date.now())))}catch(t){U.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(V.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}},G=new class{constructor(){this.TOPIC_SYNC_TIMESTAMP=3e4,this.TOPIC_SYNC_TAG="syncTopics",this.TOPIC_SYNC_SUBSCRIBE_CALLBACK="indigitallSyncTopicSubscribeOnSuccess",this.TOPIC_SYNC_SUBSCRIBE_ERROR_CALLBACK="indigitallSyncTopicSubscribeOnError",this.TOPIC_SYNC_UNSUBSCRIBE_CALLBACK="indigitallSyncTopicUnsubscribeOnSuccess",this.TOPIC_SYNC_UNSUBSCRIBE_ERROR_CALLBACK="indigitallSyncTopicUnsubscribeOnError"}},K=Object.freeze({GREEN:"green",RED:"red"}),{EventType:W}=r(315).Core.Models,{Config:q}=r(315).Core,H=class{static async requestBackgroundSync(){const t=await navigator.serviceWorker.getRegistration(o.getWorkerPath());return null!=t?t:null}static findIndigitallSW(t){for(let e=0;e<t.length;e++)if(void 0!==t[e]&&t[e].active&&t[e].active.scriptURL&&t[e].active.scriptURL.includes("worker.min.js"))return t[e];return null}static async sendEventRequest(t,e){const r=new f;r.setAppKey(t.appKey),r.setDeviceId(t.deviceId),r.setPlatform(q.platform),r.setPushId(""+t.id),r.setSendingId(""+t.sendingId),t.campaignId&&r.setCampaingId(""+t.campaignId),t.journeyStateId&&r.setJourneyStateId(t.journeyStateId),t.journeyExecution&&r.setJourneyExecution(t.journeyExecution),t.cjCurrentStateId&&r.setCjCurrentStateId(t.cjCurrentStateId),r.setEventType(W.EVENT_TYPE_CLICK),await r.setExternalCodeRequest(),"action-1"==e.action?r.setClickedButton(1):"action-2"==e.action?r.setClickedButton(2):r.setClickedButton(0),r.setServiceWorkerRequest(!0),await T.postEventPushClick(r)}static async topicsSubscribeFromServiceWorker(t,e){const r=new D;r.setTopics(e),r.setAppKey(t.appKey),r.setDeviceId(t.deviceId),await T.postTopicsSubscribeFromServiceWorker(r)}},{CommonUtils:X}=r(315).Core.Utils,J=class{static async setTopicRequest(t){const e=new D;return e.setAppKey(await o.getAppKeySync()),e.setDeviceId(await o.getDeviceIdSync()),e.setServiceWorkerRequest(!0),e.setTopics(t),e}static async getTopicsList(t,e){try{const r=await o.getTopicList();r&&r.length>0?await st.isTopicTimestampExceed()?this.getDeviceTopicClient(t,e):(await o.setTopicSemaphore(K.GREEN),X.isFunction(t)&&t(r)):this.getDeviceTopicClient(t,e)}catch(t){await o.setTopicSemaphore(K.GREEN)}}static async getDeviceTopicClient(t,e){try{T.getDeviceTopics(new D,(async e=>{await st.setTopicTimestamp(),await o.setTopicList(e),await o.setTopicSemaphore(K.GREEN),X.isFunction(t)&&t(e)}),(async t=>{await st.setTopicTimestamp(),await o.setTopicSemaphore(K.GREEN),X.isFunction(e)&&e(t)}))}catch(t){await o.setTopicSemaphore(K.GREEN),X.isFunction(e)&&e(t)}}},$=class{constructor(t,e){this.code=t,this.type=e}static getAllCodes(t){const e=[];for(let r=0;r<t.length;r++)e.push(t[r].code);return e}toJSON(){const t={};return this.code&&(t.code=this.code),this.type&&(t.type=this.type),t}},{Channel:Q,TopicSubscribeType:z}=r(315).Core.Models,{ErrorUtils:Z,Log:tt}=r(315).Core.Utils;class et{static async syncTopics(){if(!await o.getTopicSyncIsProcessing()){await o.setTopicSyncIsProcessing(!0);const t=setTimeout((async function(){try{await et.sendTopicSync()}catch(t){}await o.setTopicSyncIsProcessing(!1),clearTimeout(t)}),G.TOPIC_SYNC_TIMESTAMP)}}static async sendTopicSync(){const t=await st.filterTopicExistingOnIDB(),e=st.topicFilter(t,z.SUBSCRIBE),r=st.topicFilter(t,z.UNSUBSCRIBE);if(e&&e.length>0)T.postDeviceTopicsRequest(await J.setTopicRequest(e),(async t=>{await st.setTopicTimestamp(),t.channel=Q.PUSH,await o.setTopicList(t),st.indigitallSyncTopicEvent(G.TOPIC_SYNC_SUBSCRIBE_CALLBACK,t)}),(async t=>{st.indigitallSyncTopicEvent(G.TOPIC_SYNC_SUBSCRIBE_ERROR_CALLBACK,t)}));else if(r&&r.length>0)T.deleteDeviceTopicsRequest(await J.setTopicRequest(r),(async t=>{await st.setTopicTimestamp(),await o.setTopicList(t),st.indigitallSyncTopicEvent(G.TOPIC_SYNC_UNSUBSCRIBE_CALLBACK,t)}),(async t=>{st.indigitallSyncTopicEvent(G.TOPIC_SYNC_UNSUBSCRIBE_ERROR_CALLBACK,t)}));else{const t=Z.showError(c,c.ErrorCode.PUSH_TOPICS_ERROR,"there is no topic with one of the codes in the push topic list");st.indigitallSyncTopicEvent(G.TOPIC_SYNC_SUBSCRIBE_ERROR_CALLBACK,t),st.indigitallSyncTopicEvent(G.TOPIC_SYNC_UNSUBSCRIBE_ERROR_CALLBACK,t)}await o.setUpdateTopicSubscribe([])}static async updateTopicAction(t,e){const r=await o.getUpdateTopicSubscribe();if(r&&r.length>0){const n=new tt("[IND]TopicSyncUtils: ");try{const n=[],i=r.filter((e=>t.includes(e.code))),s=t.filter((t=>!$.getAllCodes(r).includes(t)));if(s&&s.length>0)for(let t=0;t<s.length;t++)null!==s[t]&&n.push(new $(s[t],e).toJSON());if(i&&i.length>0)for(let t=0;t<i.length;t++){const n=r.findIndex((e=>e.code===i[t].code)),o=new $(i[t].code,e);r[n]=o.toJSON()}n.length>0&&await o.setUpdateTopicSubscribe(n.concat(r))}catch(t){n.e("updateTopicAction: "+t).writeLog()}}else{const r=[];for(let n=0;n<t.length;n++){const i=t[n];r.push({code:i,type:e})}await o.setUpdateTopicSubscribe(r)}}}const rt=et,{TopicSubscribeType:nt}=r(315).Core.Models,{CommonUtils:it}=r(315).Core.Utils;class ot{static async updateTopic(t,e,r,n){ot.checkTopicSemaphore().then((async()=>{await o.setTopicSemaphore(K.RED),await J.getTopicsList((async i=>{await this.setTopicCallbacks(t,r,n),await this.requestTopicBackground(G.TOPIC_SYNC_TAG),await rt.updateTopicAction(e,t)}),n)}))}static async checkTopicSemaphore(){if(await o.getTopicSemaphore()!=K.RED)return!0;this.topicSemaphoreWaitTime((()=>!0))}static async topicSemaphoreWaitTime(t){const e=setInterval((async function(){await o.getTopicSemaphore()==K.GREEN&&(clearInterval(e),t())}),1e3)}static async setTopicCallbacks(t,e,r){let n=G.TOPIC_SYNC_SUBSCRIBE_CALLBACK,i=G.TOPIC_SYNC_SUBSCRIBE_ERROR_CALLBACK;t===nt.UNSUBSCRIBE&&(n=G.TOPIC_SYNC_UNSUBSCRIBE_CALLBACK,i=G.TOPIC_SYNC_UNSUBSCRIBE_ERROR_CALLBACK);const o=new BroadcastChannel(n);o.onmessage=t=>{it.isFunction(e)&&e(t.data),o.close()};const s=new BroadcastChannel(i);s.onmessage=t=>{it.isFunction(r)&&r(t.data),s.close()}}static async requestTopicBackground(t){const e=await H.requestBackgroundSync();null!=e&&await e.sync.register(t)}static async isTopicTimestampExceed(){const t=await o.getTopicSyncTimestamp();return!(t&&t>Date.now())&&void 0!==t}static async setTopicTimestamp(){const t=Date.now()+G.TOPIC_SYNC_TIMESTAMP;await o.setTopicSyncTimestamp(t)}static indigitallSyncTopicEvent(t,e){new BroadcastChannel(t).postMessage(e)}static topicFilter(t,e){const r=[];if(t)for(let n=0;n<t.length;n++)t[n].type===e&&r.push(t[n].code);return r}static async filterTopicExistingOnIDB(){const t=await o.getUpdateTopicSubscribe(),e=await o.getTopicList(),r=[];for(let n=0;n<t.length;n++)for(let i=0;i<e.length;i++)t[n]&&e[i]&&t[n].code==e[i].code&&(!0===e[i].subscribed&&t[n].type==nt.UNSUBSCRIBE||!1===e[i].subscribed&&t[n].type==nt.SUBSCRIBE)&&r.push(t[n]);return r}}const st=ot,{EventType:at,DeviceStatus:ut}=r(315).Core.Models,{LogLevel:ct,Log:lt,CommonUtils:ht,ErrorUtils:ft,CryptoUtils:dt}=r(315).Core.Utils,{Repository:pt}=r(315).Core,Et="[IND]IndigitallPush: ";class yt{constructor(){this.config=null,this.interval=null}static async init(t){try{let r=new lt(Et);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 lt(Et)):this.config.setDebugLog&&(o.setLogLevel(ct.WARNING),r=new lt(Et));let n="https://device-api.indigitall.com/v1",i="https://inbox-api.indigitall.com/v1",s="https://device-api.indigitall.com/v2";if(this.config.urlDeviceApi&&(n=this.config.urlDeviceApi),this.config.urlInAppApi&&(s=this.config.urlInAppApi),this.config.urlInboxApi&&(i=this.config.urlInboxApi),(new pt).setAvoidCypher(!!this.config.avoidCypher&&this.config.avoidCypher),await o.setUrlDeviceApi(n),e()&&e().setUrlInboxApi(i),ht.isFunction(this.config.requestPushPermission)&&(navigator.indigitallRequestPushPermission=this.config.requestPushPermission),ht.isFunction(this.config.requestLocationPermission)&&(navigator.indigitallRequestLocationPermission=this.config.requestLocationPermission),ht.isFunction(this.config.onNewUserRegistered)&&(navigator.indigitallOnNewUserRegistered=this.config.onNewUserRegistered),ht.isFunction(this.config.onInitialized)&&(navigator.indigitallOnInitialized=this.config.onInitialized),ht.isFunction(this.config.onError)&&(navigator.indigitallOnError=this.config.onError),ht.isFunction(this.config.onLocationUpdated)&&(navigator.indigitallOnLocationUpdated=this.config.onLocationUpdated),this.config.disabledPushService)return this.config.appKey&&await o.setAppKey(this.config.appKey),o.setPushDisabled(!0),r.i("Push Service disabled").writeLog(),ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError("Push Service disabled"),!1;const a=await x.getPermissions();if(x.setPermissionsCallback(),a&&"denied"===a.push)return r.i("Push permission denied").writeLog(),ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError("Push permission denied"),!1;if(!ht.isServiceTimestampExceed())return this.device=new g,x.getPermissions().then((t=>{ht.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,o.setWorkerPath(n)),t){if(await o.setAppKey(t),yt.isServiceWorkerSupported()){const t=new N;return T.getBrowser(t,(t=>{if(t.supported||this.isSafariBrowserDevice()){r.d("browser supported for webpush").writeLog();const i=new N;T.getApplicationAll(i,(async i=>{if(r.d("application ",i).writeLog(),i&&i.data&&i.data.configuration){const t=i.data.configuration;r.d("configuration ",t).writeLog(),t.vapidPublic&&o.setVAPID(t.vapidPublic),t.safariWebsitePushId&&o.setSafariWebsitePushId(t.safariWebsitePushId),t.enabled&&o.setEnabled(t.enabled),t.serviceSyncTime&&o.setServiceSyncTime(t.serviceSyncTime),t.locationEnabled&&o.setLocationEnabled(t.locationEnabled),t.locationUpdateMinutes&&o.setLocationUpdateMinutes(t.locationUpdateMinutes),t.inboxAuthMode&&e()&&e().setInboxAuthMode(t.inboxAuthMode),t.inAppEnabled&&(o.setInAppEnabled(t.inAppEnabled),await o.setUrlInappApi(s))}const a=new D;o.getDeviceId()&&o.getPushToken()?T.putDevice(a,(e=>{try{if(ht.isServiceTimestampExceed()){const t=new f;t.setAppKey(o.getAppKey()),t.setDeviceId(o.getDeviceId()),T.postEventVisit(t)}e.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&&ht.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(t,e)}))):"Safari"!==t.browserName&&yt.registerForPush(n)}catch(t){ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ft.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}),navigator.indigitallOnError):T.postDevice(a,(e=>{try{const r=new f;r.setAppKey(o.getAppKey()),r.setDeviceId(o.getDeviceId()),T.postEventVisit(r),e.registeredByCookie?o.setServiceTimestamp(Date.now()):"Safari"!==t.browserName&&yt.registerForPush(n)}catch(t){ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ft.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}),(t=>{404===t.errorCode&&o.clearStorage(),ht.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){ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ft.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}return!1}static deviceGet(t,e){return T.getDevice(new D,t,e),!0}static deviceEnable(t,e){const r=new D(ut.ENABLE);return r.isDeviceUpdated(!0),T.putDevice(r,t,e),!0}static deviceDisable(t,e){const r=new D(ut.DISABLE);return r.isDeviceUpdated(!0),T.putDevice(r,t,e),!0}static topicsList(t,e){return T.getDeviceTopics(new D,(async e=>{ht.isFunction(t)&&t(e)}),(t=>{ht.isFunction(e)&&e(t)})),!0}static topicsSubscribe(t,e,r){const n=new D;return n.setTopics(t),T.postDeviceTopics(n,(t=>{ht.isFunction(e)&&e(t)}),(t=>{ht.isFunction(r)&&r(t)})),!0}static topicsUnsubscribe(t,e,r){const n=new D;return n.setTopics(t),T.deleteDeviceTopics(n,(t=>{ht.isFunction(e)&&e(t)}),(t=>{ht.isFunction(r)&&r(t)})),!0}static async topicsSubscribeUpdate(t,e,r,n){st.updateTopic(t,e,r,n)}static registerForPush(t){o.setWorkerPath(t),yt.isServiceWorkerSupported()&&yt.launchNotificationPermission(t)}static isSafariPushNotificationSupported(){return F.isSafariPushNotificationSupported()}static isServiceWorkerSupported(){return"serviceWorker"in navigator}static registerServiceWorker(t){const e=new lt(Et);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 launchNotificationPermissionForSafari(){this.registerForPush(o.getWorkerPath())}static isSafariBrowserDevice(){return y.isSafariBrowserDevice()}static launchNotificationPermission(t){const e=new lt(Et);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?yt.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&&yt.subscribeForPushNotification(t)}))))}catch(t){ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ft.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}))}static async subscribeForPushNotification(t){const e=new lt(Et);try{const r={userVisibleOnly:!0,applicationServerKey:d.urlBase64ToUint8Array(o.getVAPID())};e.d("Registration: ",t).writeLog(),o.getPermissionPush()||d.callEventPermission(M.PERMISSION_TYPE_PUSH,at.EVENT_TYPE_ASK);const n=await t.pushManager.subscribe(r);e.d("Received PushSubscription: "+n).writeLog(),o.getPermissionPush()&&o.getPermissionPush()===at.EVENT_TYPE_ACCEPT||(d.callEventPermission(M.PERMISSION_TYPE_PUSH,at.EVENT_TYPE_ACCEPT),o.setPermissionPush(at.EVENT_TYPE_ACCEPT));const i=n.toJSON();o.setBrowserPublicKey(i.keys.p256dh),o.setBrowserPrivateKey(i.keys.auth),o.setPushToken(i.endpoint),T.putDevice(new D,(t=>{x.getPermissions().then((t=>{ht.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(t,new g)})),ht.isFunction(navigator.indigitallOnNewUserRegistered)&&!o.getNewUserTimestamp()&&(o.setNewUserTimestamp(Date.now()),navigator.indigitallOnNewUserRegistered(t)),yt.registerLocation()}),navigator.indigitallOnError),o.setServiceTimestamp(Date.now())}catch(t){e.e("No Registration: "+t).writeLog(),o.getPermissionPush()&&o.getPermissionPush()===at.EVENT_TYPE_REJECT||(d.callEventPermission(M.PERMISSION_TYPE_PUSH,at.EVENT_TYPE_REJECT),o.setPermissionPush(at.EVENT_TYPE_REJECT)),ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(t)}}static registerLocation(){const t=new lt(Et);try{navigator.geolocation&&o.getRequestLocation()&&o.getLocationEnabled()&&(!o.getLocationTimestamp()||o.getLocationUpdateMinutes()<=(Date.now()-o.getLocationTimestamp())/6e4)&&(o.getPermissionLocation()||d.callEventPermission(M.PERMISSION_TYPE_LOCATION,at.EVENT_TYPE_ASK),navigator.geolocation.getCurrentPosition((t=>{o.getPermissionLocation()||o.getPermissionLocation()==at.EVENT_TYPE_ACCEPT||(d.callEventPermission(M.PERMISSION_TYPE_LOCATION,at.EVENT_TYPE_ACCEPT),o.setPermissionLocation(at.EVENT_TYPE_ACCEPT));const e=new f;e.setLocation(t.coords.latitude,t.coords.longitude),T.postEventLocation(e),ht.isFunction(navigator.indigitallOnLocationUpdated)&&navigator.indigitallOnLocationUpdated(t),o.setLocationTimestamp(Date.now())}),(e=>{t.e("error "+e).writeLog(),o.getPermissionLocation()||o.getPermissionLocation()==at.EVENT_TYPE_REJECT||(d.callEventPermission(M.PERMISSION_TYPE_LOCATION,at.EVENT_TYPE_REJECT),o.setPermissionLocation(at.EVENT_TYPE_REJECT))})))}catch(t){ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ft.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}static requestPushPermission(t){x.getPushPermission().then((e=>{ht.isFunction(t)&&t(e)}))}static onPermissionChange(){x.setPermissionCallback()}static requestLocationPermission(t){x.getLocationPermission().then((e=>{ht.isFunction(t)&&t(e)}))}static logIn(t,e,r){yt.setExternalId(t,e,r)}static logout(t,e){yt.setExternalId(null,t,e)}static setExternalCode(t,e,r){yt.setExternalId(t,e,r)}static async setExternalId(t,e,r){try{const n=o.getAppKey();if(!n)return void(ht.isFunction(r)&&r(ft.showError(c,c.ErrorCode.API_APPKEY_NOT_VALID)));if(null!=t){const i=await dt.createHmac(n,t);i&&this.setExternalIdRequest(i,e,r)}else this.setExternalIdRequest(null,e,r)}catch(t){ht.isFunction(r)&&r(ft.showError(c,c.ErrorCode.PUSH_DEVICE_ERROR,t))}}static async setExternalIdRequest(t,e,r){if(o.setExternalId(t),o.isPushDisabled())ht.isFunction(r)&&r(ft.showError(c,c.ErrorCode.DISABLED_CHANNEL));else{const n=new D;await o.setExternalIdRequest(t),n.setExternalCode(t),n.isDeviceUpdated(!0),T.putDevice(n,(t=>{ht.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 f;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?T.postEventJourneySync(a,e,r):T.postEventJourney(a,e,r)):!1===s?T.postEventCustomSync(a,e,r):T.postEventCustom(a,e,r)}catch(t){ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ft.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 f;a.setDeviceId(o.getDeviceId()),a.setExternalCodeRequest(),a.setEventType(n),a.setCustomData(i),a.setJourneyRequest(!0),!1===s?T.postEventJourneySync(a,e,r):T.postEventJourney(a,e,r)}catch(t){ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ft.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}}const vt=yt;window.indigitall||(window.indigitall={}),window.indigitall.Push=yt,window.indigitall.LogLevel=ct,window.indigitall.version=o.getVersion()})(),n})(),t.exports=e()},904:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.9.0","_id":"indigitall-web-core@4.9.0","_inBundle":false,"_integrity":"sha512-lC3G2VLwtDvv0jAmaiXdW8lYmGmwCVkE2ubLfFmFIOKfR/f2u33hBj+uokM5qxwMuxlohXteuXCLs3BFbGsV4w==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.9.0","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.9.0","saveSpec":null,"fetchSpec":"4.9.0"},"_requiredBy":["#USER","/","/indigitall-web-notification"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.9.0.tgz","_shasum":"30c78db643e8a62feb23626dc394a05f49f187e4","_spec":"indigitall-web-core@4.9.0","_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.9.0"}')},330:t=>{"use strict";t.exports=JSON.parse('{"name":"indigitall-web-sdk","description":"indigitall webpush SDK","version":"4.9.0","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","dependencies":{"indigitall-web-core":"^4.9.0","indigitall-web-customer":"^4.9.0","indigitall-web-inapp":"^4.9.0","indigitall-web-inbox":"^4.9.0","indigitall-web-notification":"^4.9.0"},"devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","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","build-sdk":"npm run build-install-core && npm run build-install-inapp && npm run build","build-install-core":"npm uninstall indigitall-web-core && npm install ../core","build-install-inapp":"npm uninstall indigitall-web-inapp && npm install ../inapp","build-install-customer":"npm uninstall indigitall-web-customer && npm install ../customer","build-install-inbox":"npm uninstall indigitall-web-inbox && npm install ../inbox","build-install-push":"npm uninstall indigitall-web-notification && npm install ../push","install-sdk":"npm install && npm run build","release-install-core":"npm uninstall indigitall-web-core && npm install indigitall-web-core@$npm_package_version","release-install-inapp":"npm uninstall indigitall-web-inapp && npm install indigitall-web-inapp@$npm_package_version ","release-install-customer":"npm uninstall indigitall-web-customer && npm install indigitall-web-customer@$npm_package_version ","release-install-inbox":"npm uninstall indigitall-web-inbox && npm install indigitall-web-inbox@$npm_package_version ","release-install-push":"npm uninstall indigitall-web-notification && npm install indigitall-web-notification@$npm_package_version && npm run release-install-core && npm run release-install-inapp && npm run release-install-inbox && npm run release-install-customer && npm run install-sdk && npm run delete-node-modules","simulate-release-install-sdk":"npm run install-sdk && npm run delete-node-modules","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json"}}')}},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(326),e=r.n(t),i=r(824),o=r.n(i),s=r(960),a=r.n(s),u=r(603),c=r.n(u);const{Log:l,LogLevel:h,CommonUtils:f,ErrorUtils:d}=r(315).Core.Utils,{Repository:p}=r(315).Core,E=r(330),{Channel:y}=r(315).Core.Models,v="[IND]Indigitall: ";class g{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((e=>{this.inAppTopicList(e,t,(r=>{new l(v).w(r.message).writeLog(),f.isFunction(t)&&t(e)}))}),(r=>{new l(v).w(r).writeLog(),this.inAppTopicList(null,t,e),f.isFunction(e)&&e(r)}))}static async inAppTopicList(t,r,n){"true"===(new p).isInAppEnabled()?e().topicsList((async e=>{null!=t?(await(new p).setTopicList(t),await(new p).setInAppTopicList(e),f.isFunction(r)&&r(e.concat(t))):(await(new p).setInAppTopicList(e),f.isFunction(r)&&r(e))}),(async e=>{null!=t?(await(new p).setTopicList(t),f.isFunction(r)&&r(t)):f.isFunction(n)&&n(e)})):null!=t?(await(new p).setTopicList(t),f.isFunction(r)&&r(t)):f.isFunction(n)&&n(d.showError(null,null,"Internal error bad topic list"))}static topicsSubscribe(t,r,n){"true"===(new p).isInAppEnabled()?e().topicsSubscribe(t,(e=>{this.pushTopicsSubscribe(t,e,r,n)}),(async e=>{new l(v).w(e).writeLog(),this.pushTopicsSubscribe(t,null,r,n)})):this.pushTopicsSubscribe(t,null,r,n)}static pushTopicsSubscribe(t,e,r,n){c().topicsSubscribe(t,(async t=>{this.topicActionOnSuccess(e,t,r)}),(async t=>{this.topicActionOnError(e,t,r,n)}))}static async topicsUnsubscribe(t,r,n){"true"===(new p).isInAppEnabled()?e().topicsUnsubscribe(t,(e=>{this.pushTopicsUnsubscribe(t,e,r,n)}),(async e=>{new l(v).w(e).writeLog(),this.pushTopicsUnsubscribe(t,null,r,n)})):this.pushTopicsUnsubscribe(t,null,r,n)}static pushTopicsUnsubscribe(t,e,r,n){c().topicsUnsubscribe(t,(async t=>{this.topicActionOnSuccess(e,t,r)}),(async t=>{this.topicActionOnError(e,t,r,n)}))}static async topicActionOnSuccess(t,e,r){let n=[];null!=t&&(n=t,await(new p).setInAppTopicList(t)),null!=e&&await(new p).setTopicList(e),f.isFunction(r)&&r(n.concat(e))}static async topicActionOnError(t,e,r,n){new l(v).w(`${e.errorCode}: ${e.exceptionMessage}`).writeLog(),null!=t?(await(new p).setInAppTopicList(t),f.isFunction(r)&&r(t)):f.isFunction(n)&&n(e)}static async setExternalId(t,e,r){c().setExternalId(t,e,r)}static logIn(t,e,r){g.setExternalId(t,e,r)}static logout(t,e){g.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,h){e().showInAppWithConfig(t,r,n,i,o,s,a,u,c,l,h)}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,h){e().showMultipleInAppWithConfig(t,r,n,i,o,s,a,u,c,l,h)}static getInboxMessagesCount(t,e,r){o().getMessagesCountWithAuth(t,e,r)}static getInbox(t,e,r){o().getInboxWithAuth(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){g.logIn(t,(t=>{a().link(e,r,n)}),(t=>{f.isFunction(n)&&n(t)}))}static unlink(t,e,r){g.logout((n=>{a().unlink(t,e,r)}),(t=>{f.isFunction(r)&&r(t)}))}static sendCustomerCustomEvent(t,e,r,n){a().sendCustomerCustomEvent(t,e,r,n)}}window.indigitall=g,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=y,window.indigitall.LogLevel=h,window.indigitall.version=E.version})(),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={710:function(t){var e;e=()=>(()=>{"use strict";var t={330:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.9.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={};r.r(n),r.d(n,{default:()=>Y});var i={};r.r(i),r.d(i,{BaseApplicationRequest:()=>P,BaseClient:()=>S,BaseRequest:()=>O});var o={};r.r(o),r.d(o,{Channel:()=>A,CoreApplication:()=>L,Device:()=>R,DeviceStatus:()=>T,ErrorDictionary:()=>_,ErrorModel:()=>I,EventType:()=>w,TopicSubscribeType:()=>N});var s={};r.r(s),r.d(s,{CommonUtils:()=>C,CorePermissions:()=>D,CryptoUtils:()=>B,ErrorUtils:()=>b,JsonUtils:()=>U,Log:()=>m,LogLevel:()=>y,TopicUtils:()=>j,Validations:()=>V});var a={platform:"webpush",version:"0.0.1"};const u=r(330);a.version=u.version;const c=a=Object.assign(a,{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"}}),l=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!==l.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()}},h=l,f=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}}},d=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!==d.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")}},p=d,E=class{constructor(){this.storage=h,this.db=f,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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"}setItemSessionStorage(t,e){p.setItem(t,e)}getItemSessionStorage(t){return p.getItem(t)}clearSessionStorage(){p.clearMessages()}setStorage(t,e){h.setItem(t,e)}getStorage(t){return h.getItem(t)}clearStorage(){h.clear()}setBrowserPublicKey(t){h.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return h.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){h.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return h.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){h.setItem(this.APP_KEY,t),f&&f.IDB&&await f.setItem(this.APP_KEY,t)}getAppKey(){return h.getItem(this.APP_KEY)}async setDeviceId(t){this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,t),this.db&&this.db.IDB&&await this.db.setItem(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}async getAppKeySync(){if(f&&f.IDB)return await f.getItem(this.APP_KEY)}setVAPID(t){h.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return h.getItem(this.VAPID_PUBLIC)}setEnabled(t){h.setItem(this.ENABLED,t)}getEnabled(){return h.getItem(this.ENABLED)}setServiceSyncTime(t){h.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return h.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){h.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return h.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){h.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return h.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){h.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!h&&h.getItem(this.REQUEST_LOCATION)}async setPlatform(t){h.setItem(this.PLATFORM,t)}getPlatform(){return h&&h.getItem(this.PLATFORM)||c.platform}getVersion(){return c.version}async setBrowserName(t){h.setItem(this.BROWSER_NAME,t)}getBrowserName(){return h.getItem(this.BROWSER_NAME)}setBrowserVersion(t){h.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return h.getItem(this.BROWSER_VERSION)}async setOsName(t){h.setItem(this.OS_NAME,t)}getOsName(){return h.getItem(this.OS_NAME)}setOsVersion(t){h.setItem(this.OS_VERSION,t)}getOsVersion(){return h.getItem(this.OS_VERSION)}setDeviceType(t){h.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return h.getItem(this.DEVICE_TYPE)}setSupported(t){h.setItem(this.SUPPORTED,t)}getSupported(){return h.getItem(this.SUPPORTED)}setServiceTimestamp(t){h.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return h.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){h.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return h.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){h.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return h.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){h.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==h.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){h.setItem(this.LOG_LEVEL,t)}getLogLevel(){return h.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){h.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return h.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){h&&h.isLocalStorageAvailable()&&h.setItem(this.EXTERNAL_ID,t),f&&f.IDB&&await f.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{h&&h.isLocalStorageAvailable()?t=h.getItem(this.EXTERNAL_ID):f&&f.IDB&&(t=await f.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){h.setItem(this.EXTERNAL_ID,t)}getExternalId(){return h.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return h.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){h.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){h.setItem(this.LATITUDE,t)}getLatitude(){return h.getItem(this.LATITUDE)}setLongitude(t){h.setItem(this.LONGITUDE,t)}getLongitude(){return h.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}setAvoidCypher(t){this.setStorage(this.AVOID_CYPHER,t)}isAvoidCypher(){return this.getStorage(this.AVOID_CYPHER)}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)}setPushDisabled(t){this.setStorage(this.PUSH_DISABLED,t)}isPushDisabled(){return this.getStorage(this.PUSH_DISABLED)}getConfigV2ServiceSyncTime(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}setConfigV2ServiceSyncTime(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}getConfigV2(){return this.getStorage(this.CONFIG_V2)}setConfigV2(t){this.setStorage(this.CONFIG_V2,t)}getMaintenanceEnd(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}setMaintenanceEnd(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}getMaintenanceStart(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}setMaintenanceStart(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}},y=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),v=y;class g{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=v.INFO,this.setLogLevel((new E).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=v.DEBUG&&t<=v.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=v.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}i(){if(this.level<=v.INFO)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}w(){if(this.level<=v.WARNING)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}e(){if(this.level<=v.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const m=g,I=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=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"}},b=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);if(n>=0){const e=Object.keys(t.ErrorCode)[n],i=Object.values(t.ErrorCode)[n];return new I({code:e,errorId:i},Object.values(t.ErrorMessage)[n],r)}return new I(_.ErrorCode.GENERAL_ERROR,"general error",r)}}},S=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 m("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(v.DEBUG);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);if(304!=e.status){const 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 I(n.statusCode,n.message))}return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+e.status+"\n").writeLog(),e}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(),b.showError(_,_.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)}},O=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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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_INITIAL_STATUS="initialStatus",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 E).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}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},P=class extends O{constructor(t=null){super(),this.PARAM_APPLICATION_CHANNEL="channel",this.channels=t}getApplicationRequest(){return this.params=this.createQueryString(),this}createQueryString(){let t="";if(this.channels&&this.channels.length>0)for(let e=0;e<this.channels.length;e++)t+=`${this.PARAM_APPLICATION_CHANNEL}=${this.channels[e].toLowerCase()}&`;return t+=`${this.PARAM_PLATFORM}=webpush`,t}},A=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"}),R=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new E).getBrowserPublicKey(),this.browserPrivateKey=(new E).getBrowserPrivateKey(),this.platform=(new E).getPlatform(),this.version=(new E).getVersion(),this.browserName=(new E).getBrowserName(),this.browserVersion=(new E).getBrowserVersion(),this.osName=(new E).getOsName(),this.osVersion=(new E).getOsVersion(),this.deviceId=(new E).getDeviceId(),this.deviceType=(new E).getDeviceType(),(new E).getEnabled()&&(this.enabled="true"===(new E).getEnabled()),(new E).getExternalId()&&(this.externalCode=(new E).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new E).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new E).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}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.deviceId&&(t.deviceId=this.deviceId),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}},T=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=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"}),N=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),L=class{constructor(t,e=!1){const r=new E;if(null!=t){r.setConfigV2(JSON.stringify(t)),t.contentAvailable&&(this.contentAvailable=t.contentAvailable),t.locationAccuracy&&(this.locationAccuracy=t.locationAccuracy),t.locationDistance&&(this.locationDistance=t.locationDistance),t.locationEnabled&&(this.locationEnabled=t.locationEnabled),t.locationUpdateMinutes&&(this.locationUpdateMinutes=t.locationUpdateMinutes),t.maintenanceWindow&&(this.maintenanceWindow=t.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,r.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,r.setMaintenanceEnd(this.maintenanceWindow.end))),t.networkEventsEnabled&&(this.networkEventsEnabled=t.networkEventsEnabled),t.networkUpdateMinutes&&(this.networkUpdateMinutes=t.networkUpdateMinutes);let n=Date.now();if(t.serviceSyncTime?(this.serviceSyncTime=t.serviceSyncTime,n=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):n=new Date(Date.now()+36e5),!e){const t=n.toString();new m("[IND]CoreApplication").d("ServiceSyncTime defined on: "+t).writeLog(),r.setConfigV2ServiceSyncTime(t)}}}},C=class{static isServiceTimestampExceed(){return!(new E).getServiceTimestamp()||(new E).getServiceSyncTime()<=(Date.now()-(new E).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},D=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 m("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},M=new m("[IND]Crypto"),k=new TextEncoder("utf-8"),x="HMAC",B=class{static async createHmac(t,e){try{let r="";if(!0===(new E).isAvoidCypher())r=e;else{const n=window?.crypto?.subtle;if(!n)return;const i=await n.importKey("raw",k.encode(t),{name:x,hash:{name:"SHA-256"}},!1,["sign","verify"]),o=await n.sign(x,i,k.encode(e)),s=new Uint8Array(o);r=Array.prototype.map.call(s,(t=>("00"+t.toString(16)).slice(-2))).join(""),M.d("hmac: ",r).writeLog()}return r}catch(t){return void M.e("error:",t).writeLog()}}},U=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}},V=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},j=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},Y={Repository:E,Config:c,Api:i,Models:o,Utils:s};return n})(),t.exports=e()},315:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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(710));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(610))&&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)}},468:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(254)),i=u(r(234)),o=u(r(457)),s=u(r(735)),a=u(r(630));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="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},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var u=d(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==c(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,u,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(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){h(o,n,i,s,a,"next",t)}function a(t){h(o,n,i,s,a,"throw",t)}s(void 0)}))}}function d(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,p(n.key),n)}}function p(t){var e=function(t,e){if("object"!=c(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==c(e)?e:e+""}var E=function(){return t=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"},e=[{key:"getURL",value:(y=f(l().mark((function t(){return l().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:(E=f(l().mark((function t(e,r,u,c){var h,f,d,p,E;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return h=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&h.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),f=t.t2+t.t3,u.isJourneyRequest()&&(f=f.replace("v1","v2")),d={method:e,headers:u.addHeaders()},e!==this.GET&&(d.body=JSON.stringify(u.getBody())),c&&(d.credentials=c),t.prev=13,t.next=16,fetch(f,d);case 16:if(304==(p=t.sent).status){t.next=28;break}return t.next=20,p.json();case 20:if(E=t.sent,!p.ok){t.next=24;break}return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\nResponse Body:",JSON.stringify(E.data,null,"\t")).writeLog(),t.abrupt("return",E);case 24:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\n").writeLog(),t.abrupt("return",new i.default(E.statusCode,E.message));case 28:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.status+"\n").writeLog(),t.abrupt("return",p);case 30:t.next=36;break;case 32:return t.prev=32,t.t4=t.catch(13),h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 36:case"end":return t.stop()}}),t,this,[[13,32]])}))),function(t,e,r,n){return E.apply(this,arguments)})},{key:"get",value:(p=f(l().mark((function t(e,r){return l().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:(h=f(l().mark((function t(e,r,n){return l().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 h.apply(this,arguments)})},{key:"put",value:(c=f(l().mark((function t(e,r,n){return l().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 c.apply(this,arguments)})},{key:"delete",value:(u=f(l().mark((function t(e,r){return l().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)})}],e&&d(t.prototype,e),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,u,c,h,p,E,y}();e.default=E},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseApplicationRequest",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=s(r(468)),i=s(r(237)),o=s(r(773));function s(t){return t&&t.__esModule?t:{default:t}}},773:(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)}var i;function o(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,s(n.key),n)}}function s(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}function a(t,e,r){return e=c(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,u()?Reflect.construct(e,r||[],c(t).constructor):e.apply(t,r))}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(u=function(){return!!t})()}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var h=function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=a(this,e)).PARAM_APPLICATION_CHANNEL="channel",t.channels=r,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(e,t),function(t,e,r){return e&&o(t.prototype,e),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"getApplicationRequest",value:function(){return this.params=this.createQueryString(),this}},{key:"createQueryString",value:function(){var t="";if(this.channels&&this.channels.length>0)for(var e=0;e<this.channels.length;e++)t+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[e].toLowerCase(),"&");return t+="".concat(this.PARAM_PLATFORM,"=webpush")}}])}(((i=r(237))&&i.__esModule?i:{default:i}).default);e.default=h},237:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t,e){if("object"!=o(t)||!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)}(t,"string");return"symbol"==o(e)?e:e+""}var u=function(){return function(t,e,r){return e&&s(t.prototype,e),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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_INITIAL_STATUS="initialStatus",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={}}),[{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:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}])}();e.default=u},122:(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(904);n.version=i.version,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=n},610:(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=h(r(122)),o=h(r(291)),s=l(r(545)),a=l(r(225)),u=l(r(628));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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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 h(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"});e.default=r},174:(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=s(r(291)),o=s(r(254));function s(t){return t&&t.__esModule?t:{default: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,c(n.key),n)}}function u(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}var l=u((function t(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=new i.default;if(null!=e){n.setConfigV2(JSON.stringify(e)),e.contentAvailable&&(this.contentAvailable=e.contentAvailable),e.locationAccuracy&&(this.locationAccuracy=e.locationAccuracy),e.locationDistance&&(this.locationDistance=e.locationDistance),e.locationEnabled&&(this.locationEnabled=e.locationEnabled),e.locationUpdateMinutes&&(this.locationUpdateMinutes=e.locationUpdateMinutes),e.maintenanceWindow&&(this.maintenanceWindow=e.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,n.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,n.setMaintenanceEnd(this.maintenanceWindow.end))),e.networkEventsEnabled&&(this.networkEventsEnabled=e.networkEventsEnabled),e.networkUpdateMinutes&&(this.networkUpdateMinutes=e.networkUpdateMinutes);var s=Date.now();if(e.serviceSyncTime?(this.serviceSyncTime=e.serviceSyncTime,s=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):s=new Date(Date.now()+36e5),!r){var a=s.toString();new o.default("[IND]CoreApplication").d("ServiceSyncTime defined on: "+a).writeLog(),n.setConfigV2ServiceSyncTime(a)}}}));e.default=l},395:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t,e){if("object"!=o(t)||!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)}(t,"string");return"symbol"==o(e)?e:e+""}var u=function(){return function(t,e,r){return e&&s(t.prototype,e),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((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.deviceId=(new i.default).getDeviceId(),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()}),[{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.deviceId&&(t.deviceId=this.deviceId),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}}])}();e.default=u},89:(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},735:(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},234:(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 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),n)}}function i(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t){var e=function(t,e){if("object"!=r(t)||!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)}(t,"string");return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=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=s},953:(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},72:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},225:(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,"CoreApplication",{enumerable:!0,get:function(){return l.default}}),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}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(902),i=h(r(395)),o=h(r(89)),s=h(r(735)),a=h(r(234)),u=h(r(953)),c=h(r(72)),l=h(r(174));function h(t){return t&&t.__esModule?t:{default:t}}},672:(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 e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==r(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=_,s(P,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.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&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 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,a(n.key),n)}}function a(t){var e=function(t,e){if("object"!=r(t)||!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)}(t,"string");return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=function(){return t=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},e=[{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)})}],e&&s(t.prototype,e),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i,a,u,c,l}();e.default=new u},87:(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 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),n)}}function i(t){var e=function(t,e){if("object"!=r(t)||!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)}(t,"string");return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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()}}],e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}());e.default=o},291:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(122)),i=a(r(87)),o=a(r(672)),s=a(r(238));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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var c=d(t[i],t,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==u(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 h(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 f(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,d(n.key),n)}}function d(t){var e=function(t,e){if("object"!=u(t)||!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)}(t,"string");return"symbol"==u(e)?e:e+""}var p=function(){return t=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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"},e=[{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:(A=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return A.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"setDeviceId",value:(P=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,e),!this.db||!this.db.IDB){t.next=4;break}return t.next=4,this.db.setItem(this.DEVICE_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return P.apply(this,arguments)})},{key:"getDeviceId",value:function(){return this.getStorage(this.DEVICE_ID)}},{key:"getAppKeySync",value:(O=h(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return O.apply(this,arguments)})},{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:(S=h(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 S.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(b=h(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 b.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:(_=h(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 _.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:(I=h(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 I.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:(m=h(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 m.apply(this,arguments)})},{key:"getExternalIdRequest",value:(g=h(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 g.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:"getRegisteredByCookie",value:(v=h(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 v.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(y=h(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 y.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)}},{key:"setInAppTopicList",value:(E=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"getInAppTopicList",value:(p=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return p.apply(this,arguments)})},{key:"setTopicList",value:(d=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"getTopicList",value:(l=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return l.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}},{key:"setAvoidCypher",value:function(t){this.setStorage(this.AVOID_CYPHER,t)}},{key:"isAvoidCypher",value:function(){return this.getStorage(this.AVOID_CYPHER)}},{key:"getUrlDeviceApi",value:(u=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.storage||!this.storage.isLocalStorageAvailable()){t.next=5;break}e=this.getStorage(this.URL_DEVICE_API),t.next=9;break;case 5:if(!this.db||!this.db.IDB){t.next=9;break}return t.next=8,this.db.getItem(this.URL_DEVICE_API);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 u.apply(this,arguments)})},{key:"setUrlDeviceApi",value:(a=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,e),!this.db||!this.db.IDB){t.next=4;break}return t.next=4,this.db.setItem(this.URL_DEVICE_API,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"setPushDisabled",value:function(t){this.setStorage(this.PUSH_DISABLED,t)}},{key:"isPushDisabled",value:function(){return this.getStorage(this.PUSH_DISABLED)}},{key:"getConfigV2ServiceSyncTime",value:function(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}},{key:"setConfigV2ServiceSyncTime",value:function(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}},{key:"getConfigV2",value:function(){return this.getStorage(this.CONFIG_V2)}},{key:"setConfigV2",value:function(t){this.setStorage(this.CONFIG_V2,t)}},{key:"getMaintenanceEnd",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}},{key:"setMaintenanceEnd",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}},{key:"getMaintenanceStart",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}},{key:"setMaintenanceStart",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}}],e&&f(t.prototype,e),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,a,u,l,d,p,E,y,v,g,m,I,_,b,S,O,P,A}();e.default=p},238:(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 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),n)}}function i(t){var e=function(t,e){if("object"!=r(t)||!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)}(t,"string");return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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")}}],e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}());e.default=o},622:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t,e){if("object"!=o(t)||!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)}(t,"string");return"symbol"==o(e)?e:e+""}var u=function(){return function(t,e,r){return e&&s(t.prototype,e),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),null,[{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)}}])}();e.default=u},429:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(254))&&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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,l(n.key),n)}}function l(t){var e=function(t,e){if("object"!=o(t)||!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)}(t,"string");return"symbol"==o(e)?e:e+""}var h=function(){return function(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),null,[{key:"getPermissions",value:(n=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 n.apply(this,arguments)})},{key:"getPermission",value:(r=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 r.apply(this,arguments)})},{key:"setPermissionsCallback",value:(e=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 e.apply(this,arguments)})},{key:"setCallback",value:(t=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(e,r){return t.apply(this,arguments)})}]);var t,e,r,n}();e.default=h},170:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var n=i(r(291));function i(t){return t&&t.__esModule?t:{default:t}}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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,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,c(n.key),n)}}function c(t){var e=function(t,e){if("object"!=o(t)||!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)}(t,"string");return"symbol"==o(e)?e:e+""}var l=new(i(r(254)).default)("[IND]Crypto"),h=new TextEncoder("utf-8"),f="HMAC",d=e.CryptoUtils=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=null,r=[{key:"createHmac",value:(i=s().mark((function t(e,r){var i,o,a,u,c,d;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i="",!0!==(new n.default).isAvoidCypher()){t.next=6;break}i=r,t.next=18;break;case 6:if(a=null===(o=window)||void 0===o||null===(o=o.crypto)||void 0===o?void 0:o.subtle){t.next=9;break}return t.abrupt("return");case 9:return t.next=11,a.importKey("raw",h.encode(e),{name:f,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 11:return u=t.sent,t.next=14,a.sign(f,u,h.encode(r));case 14:c=t.sent,d=new Uint8Array(c),i=Array.prototype.map.call(d,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),l.d("hmac: ",i).writeLog();case 18:return t.abrupt("return",i);case 21:return t.prev=21,t.t0=t.catch(0),l.e("error:",t.t0).writeLog(),t.abrupt("return");case 25:case"end":return t.stop()}}),t,null,[[0,21]])})),o=function(){var t=this,e=arguments;return new Promise((function(r,n){var o=i.apply(t,e);function s(t){a(o,r,n,s,u,"next",t)}function u(t){a(o,r,n,s,u,"throw",t)}s(void 0)}))},function(t,e){return o.apply(this,arguments)})}],e&&u(t.prototype,e),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i,o}();e.default=d},457:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(735)),i=o(r(234));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,u(n.key),n)}}function u(t){var e=function(t,e){if("object"!=s(t)||!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)}(t,"string");return"symbol"==s(e)?e:e+""}var c=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},(e=[{key:"showError",value:function(t,e,r){if(null!=t){var o=Object.values(t.ErrorCode).indexOf(e);if(o>=0){var s={code:Object.keys(t.ErrorCode)[o],errorId:Object.values(t.ErrorCode)[o]};return new i.default(s,Object.values(t.ErrorMessage)[o],r)}return new i.default(n.default.ErrorCode.GENERAL_ERROR,"general error",r)}}}])&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();e.default=new c},325:(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 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),n)}}function i(t){var e=function(t,e){if("object"!=r(t)||!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)}(t,"string");return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,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}}],(e=null)&&n(t.prototype,e),i&&n(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,i}();e.default=o},254:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(291)),i=o(r(630));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,u(n.key),n)}}function u(t){var e=function(t,e){if("object"!=s(t)||!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)}(t,"string");return"symbol"==s(e)?e:e+""}var c=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=[]}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}),e;var e,r,o}();e.default=c},630:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},662:(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 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),n)}}function i(t){var e=function(t,e){if("object"!=r(t)||!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)}(t,"string");return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},r=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],(e=null)&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();e.default=o},332:(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 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),n)}}function i(t){var e=function(t,e){if("object"!=r(t)||!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)}(t,"string");return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},r=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],(e=null)&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();e.default=o},628:(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,"TopicUtils",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(622)),i=f(r(429)),o=f(r(170)),s=f(r(457)),a=f(r(325)),u=f(r(254)),c=r(630),l=f(r(332)),h=f(r(662));function f(t){return t&&t.__esModule?t:{default:t}}},740:function(t){var e;e=()=>(()=>{var t={710:function(t){var e;e=()=>(()=>{"use strict";var t={330:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.9.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={};r.r(n),r.d(n,{default:()=>Y});var i={};r.r(i),r.d(i,{BaseApplicationRequest:()=>P,BaseClient:()=>S,BaseRequest:()=>O});var o={};r.r(o),r.d(o,{Channel:()=>A,CoreApplication:()=>L,Device:()=>R,DeviceStatus:()=>T,ErrorDictionary:()=>_,ErrorModel:()=>I,EventType:()=>w,TopicSubscribeType:()=>N});var s={};r.r(s),r.d(s,{CommonUtils:()=>C,CorePermissions:()=>D,CryptoUtils:()=>B,ErrorUtils:()=>b,JsonUtils:()=>U,Log:()=>m,LogLevel:()=>y,TopicUtils:()=>j,Validations:()=>V});var a={platform:"webpush",version:"0.0.1"};const u=r(330);a.version=u.version;const c=a=Object.assign(a,{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"}}),l=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!==l.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()}},h=l,f=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}}},d=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!==d.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")}},p=d,E=class{constructor(){this.storage=h,this.db=f,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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"}setItemSessionStorage(t,e){p.setItem(t,e)}getItemSessionStorage(t){return p.getItem(t)}clearSessionStorage(){p.clearMessages()}setStorage(t,e){h.setItem(t,e)}getStorage(t){return h.getItem(t)}clearStorage(){h.clear()}setBrowserPublicKey(t){h.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return h.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){h.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return h.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){h.setItem(this.APP_KEY,t),f&&f.IDB&&await f.setItem(this.APP_KEY,t)}getAppKey(){return h.getItem(this.APP_KEY)}async setDeviceId(t){this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,t),this.db&&this.db.IDB&&await this.db.setItem(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}async getAppKeySync(){if(f&&f.IDB)return await f.getItem(this.APP_KEY)}setVAPID(t){h.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return h.getItem(this.VAPID_PUBLIC)}setEnabled(t){h.setItem(this.ENABLED,t)}getEnabled(){return h.getItem(this.ENABLED)}setServiceSyncTime(t){h.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return h.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){h.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return h.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){h.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return h.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){h.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!h&&h.getItem(this.REQUEST_LOCATION)}async setPlatform(t){h.setItem(this.PLATFORM,t)}getPlatform(){return h&&h.getItem(this.PLATFORM)||c.platform}getVersion(){return c.version}async setBrowserName(t){h.setItem(this.BROWSER_NAME,t)}getBrowserName(){return h.getItem(this.BROWSER_NAME)}setBrowserVersion(t){h.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return h.getItem(this.BROWSER_VERSION)}async setOsName(t){h.setItem(this.OS_NAME,t)}getOsName(){return h.getItem(this.OS_NAME)}setOsVersion(t){h.setItem(this.OS_VERSION,t)}getOsVersion(){return h.getItem(this.OS_VERSION)}setDeviceType(t){h.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return h.getItem(this.DEVICE_TYPE)}setSupported(t){h.setItem(this.SUPPORTED,t)}getSupported(){return h.getItem(this.SUPPORTED)}setServiceTimestamp(t){h.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return h.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){h.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return h.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){h.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return h.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){h.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==h.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){h.setItem(this.LOG_LEVEL,t)}getLogLevel(){return h.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){h.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return h.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){h&&h.isLocalStorageAvailable()&&h.setItem(this.EXTERNAL_ID,t),f&&f.IDB&&await f.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{h&&h.isLocalStorageAvailable()?t=h.getItem(this.EXTERNAL_ID):f&&f.IDB&&(t=await f.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){h.setItem(this.EXTERNAL_ID,t)}getExternalId(){return h.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return h.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){h.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){h.setItem(this.LATITUDE,t)}getLatitude(){return h.getItem(this.LATITUDE)}setLongitude(t){h.setItem(this.LONGITUDE,t)}getLongitude(){return h.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}setAvoidCypher(t){this.setStorage(this.AVOID_CYPHER,t)}isAvoidCypher(){return this.getStorage(this.AVOID_CYPHER)}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)}setPushDisabled(t){this.setStorage(this.PUSH_DISABLED,t)}isPushDisabled(){return this.getStorage(this.PUSH_DISABLED)}getConfigV2ServiceSyncTime(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}setConfigV2ServiceSyncTime(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}getConfigV2(){return this.getStorage(this.CONFIG_V2)}setConfigV2(t){this.setStorage(this.CONFIG_V2,t)}getMaintenanceEnd(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}setMaintenanceEnd(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}getMaintenanceStart(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}setMaintenanceStart(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}},y=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),v=y;class g{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=v.INFO,this.setLogLevel((new E).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=v.DEBUG&&t<=v.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=v.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}i(){if(this.level<=v.INFO)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}w(){if(this.level<=v.WARNING)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}e(){if(this.level<=v.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const m=g,I=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=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"}},b=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);if(n>=0){const e=Object.keys(t.ErrorCode)[n],i=Object.values(t.ErrorCode)[n];return new I({code:e,errorId:i},Object.values(t.ErrorMessage)[n],r)}return new I(_.ErrorCode.GENERAL_ERROR,"general error",r)}}},S=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 m("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(v.DEBUG);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);if(304!=e.status){const 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 I(n.statusCode,n.message))}return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+e.status+"\n").writeLog(),e}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(),b.showError(_,_.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)}},O=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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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_INITIAL_STATUS="initialStatus",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 E).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}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},P=class extends O{constructor(t=null){super(),this.PARAM_APPLICATION_CHANNEL="channel",this.channels=t}getApplicationRequest(){return this.params=this.createQueryString(),this}createQueryString(){let t="";if(this.channels&&this.channels.length>0)for(let e=0;e<this.channels.length;e++)t+=`${this.PARAM_APPLICATION_CHANNEL}=${this.channels[e].toLowerCase()}&`;return t+=`${this.PARAM_PLATFORM}=webpush`,t}},A=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"}),R=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new E).getBrowserPublicKey(),this.browserPrivateKey=(new E).getBrowserPrivateKey(),this.platform=(new E).getPlatform(),this.version=(new E).getVersion(),this.browserName=(new E).getBrowserName(),this.browserVersion=(new E).getBrowserVersion(),this.osName=(new E).getOsName(),this.osVersion=(new E).getOsVersion(),this.deviceId=(new E).getDeviceId(),this.deviceType=(new E).getDeviceType(),(new E).getEnabled()&&(this.enabled="true"===(new E).getEnabled()),(new E).getExternalId()&&(this.externalCode=(new E).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new E).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new E).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}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.deviceId&&(t.deviceId=this.deviceId),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}},T=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=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"}),N=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),L=class{constructor(t,e=!1){const r=new E;if(null!=t){r.setConfigV2(JSON.stringify(t)),t.contentAvailable&&(this.contentAvailable=t.contentAvailable),t.locationAccuracy&&(this.locationAccuracy=t.locationAccuracy),t.locationDistance&&(this.locationDistance=t.locationDistance),t.locationEnabled&&(this.locationEnabled=t.locationEnabled),t.locationUpdateMinutes&&(this.locationUpdateMinutes=t.locationUpdateMinutes),t.maintenanceWindow&&(this.maintenanceWindow=t.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,r.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,r.setMaintenanceEnd(this.maintenanceWindow.end))),t.networkEventsEnabled&&(this.networkEventsEnabled=t.networkEventsEnabled),t.networkUpdateMinutes&&(this.networkUpdateMinutes=t.networkUpdateMinutes);let n=Date.now();if(t.serviceSyncTime?(this.serviceSyncTime=t.serviceSyncTime,n=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):n=new Date(Date.now()+36e5),!e){const t=n.toString();new m("[IND]CoreApplication").d("ServiceSyncTime defined on: "+t).writeLog(),r.setConfigV2ServiceSyncTime(t)}}}},C=class{static isServiceTimestampExceed(){return!(new E).getServiceTimestamp()||(new E).getServiceSyncTime()<=(Date.now()-(new E).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},D=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 m("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},M=new m("[IND]Crypto"),k=new TextEncoder("utf-8"),x="HMAC",B=class{static async createHmac(t,e){try{let r="";if(!0===(new E).isAvoidCypher())r=e;else{const n=window?.crypto?.subtle;if(!n)return;const i=await n.importKey("raw",k.encode(t),{name:x,hash:{name:"SHA-256"}},!1,["sign","verify"]),o=await n.sign(x,i,k.encode(e)),s=new Uint8Array(o);r=Array.prototype.map.call(s,(t=>("00"+t.toString(16)).slice(-2))).join(""),M.d("hmac: ",r).writeLog()}return r}catch(t){return void M.e("error:",t).writeLog()}}},U=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}},V=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},j=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},Y={Repository:E,Config:c,Api:i,Models:o,Utils:s};return n})(),t.exports=e()},315:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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(710));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(610))&&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)}},468:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(254)),i=u(r(234)),o=u(r(457)),s=u(r(735)),a=u(r(630));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="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},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var u=d(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==c(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,u,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(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){h(o,n,i,s,a,"next",t)}function a(t){h(o,n,i,s,a,"throw",t)}s(void 0)}))}}function d(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,p(n.key),n)}}function p(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}var E=function(){return t=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"},e=[{key:"getURL",value:(E=f(l().mark((function t(){return l().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 E.apply(this,arguments)})},{key:"call",value:(p=f(l().mark((function t(e,r,u,c){var h,f,d,p,E;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return h=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&h.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),f=t.t2+t.t3,u.isJourneyRequest()&&(f=f.replace("v1","v2")),d={method:e,headers:u.addHeaders()},e!==this.GET&&(d.body=JSON.stringify(u.getBody())),c&&(d.credentials=c),t.prev=13,t.next=16,fetch(f,d);case 16:if(304==(p=t.sent).status){t.next=28;break}return t.next=20,p.json();case 20:if(E=t.sent,!p.ok){t.next=24;break}return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\nResponse Body:",JSON.stringify(E.data,null,"\t")).writeLog(),t.abrupt("return",E);case 24:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\n").writeLog(),t.abrupt("return",new i.default(E.statusCode,E.message));case 28:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.status+"\n").writeLog(),t.abrupt("return",p);case 30:t.next=36;break;case 32:return t.prev=32,t.t4=t.catch(13),h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 36:case"end":return t.stop()}}),t,this,[[13,32]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(h=f(l().mark((function t(e,r){return l().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 h.apply(this,arguments)})},{key:"post",value:(c=f(l().mark((function t(e,r,n){return l().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 c.apply(this,arguments)})},{key:"put",value:(u=f(l().mark((function t(e,r,n){return l().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:(r=f(l().mark((function t(e,r){return l().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 r.apply(this,arguments)})}],e&&d(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,u,c,h,p,E}();e.default=E},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseApplicationRequest",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=s(r(468)),i=s(r(237)),o=s(r(773));function s(t){return t&&t.__esModule?t:{default:t}}},773:(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)}var i;function o(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,s(n.key),n)}}function s(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(a=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,a()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e)).PARAM_APPLICATION_CHANNEL="channel",t.channels=r,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(e,t),function(t,e){return e&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"getApplicationRequest",value:function(){return this.params=this.createQueryString(),this}},{key:"createQueryString",value:function(){var t="";if(this.channels&&this.channels.length>0)for(var e=0;e<this.channels.length;e++)t+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[e].toLowerCase(),"&");return t+"".concat(this.PARAM_PLATFORM,"=webpush")}}])}(((i=r(237))&&i.__esModule?i:{default:i}).default);e.default=l},237:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e){return e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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_INITIAL_STATUS="initialStatus",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={}}),[{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:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}]);e.default=u},122:(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(904);n.version=i.version,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=n},610:(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=h(r(122)),o=h(r(291)),s=l(r(545)),a=l(r(225)),u=l(r(628));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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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 h(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"});e.default=r},174:(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=s(r(291)),o=s(r(254));function s(t){return t&&t.__esModule?t:{default: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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}var c=function(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=new i.default;if(null!=e){n.setConfigV2(JSON.stringify(e)),e.contentAvailable&&(this.contentAvailable=e.contentAvailable),e.locationAccuracy&&(this.locationAccuracy=e.locationAccuracy),e.locationDistance&&(this.locationDistance=e.locationDistance),e.locationEnabled&&(this.locationEnabled=e.locationEnabled),e.locationUpdateMinutes&&(this.locationUpdateMinutes=e.locationUpdateMinutes),e.maintenanceWindow&&(this.maintenanceWindow=e.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,n.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,n.setMaintenanceEnd(this.maintenanceWindow.end))),e.networkEventsEnabled&&(this.networkEventsEnabled=e.networkEventsEnabled),e.networkUpdateMinutes&&(this.networkUpdateMinutes=e.networkUpdateMinutes);var s=Date.now();if(e.serviceSyncTime?(this.serviceSyncTime=e.serviceSyncTime,s=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):s=new Date(Date.now()+36e5),!r){var a=s.toString();new o.default("[IND]CoreApplication").d("ServiceSyncTime defined on: "+a).writeLog(),n.setConfigV2ServiceSyncTime(a)}}}));e.default=c},395:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e){return e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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.deviceId=(new i.default).getDeviceId(),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()}),[{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.deviceId&&(t.deviceId=this.deviceId),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}}]);e.default=u},89:(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},735:(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},234:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=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=o},953:(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},72:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},225:(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,"CoreApplication",{enumerable:!0,get:function(){return l.default}}),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}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(902),i=h(r(395)),o=h(r(89)),s=h(r(735)),a=h(r(234)),u=h(r(953)),c=h(r(72)),l=h(r(174));function h(t){return t&&t.__esModule?t:{default:t}}},672:(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 e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==r(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=_,s(P,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.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&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=function(){return t=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},e=[{key:"getDB",value:(c=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 c.apply(this,arguments)})},{key:"get",value:(u=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 u.apply(this,arguments)})},{key:"put",value:(a=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 a.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:(i=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 i.apply(this,arguments)})},{key:"getItem",value:(r=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 r.apply(this,arguments)})}],e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i,a,u,c}();e.default=new u},87:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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()}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=o},291:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(122)),i=a(r(87)),o=a(r(672)),s=a(r(238));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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var c=d(t[i],t,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==u(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 h(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 f(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,d(n.key),n)}}function d(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}var p=function(){return t=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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"},e=[{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:(P=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return P.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"setDeviceId",value:(O=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,e),!this.db||!this.db.IDB){t.next=4;break}return t.next=4,this.db.setItem(this.DEVICE_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return O.apply(this,arguments)})},{key:"getDeviceId",value:function(){return this.getStorage(this.DEVICE_ID)}},{key:"getAppKeySync",value:(S=h(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return S.apply(this,arguments)})},{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:(b=h(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 b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(_=h(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 _.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:(I=h(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 I.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:(m=h(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 m.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:(g=h(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 g.apply(this,arguments)})},{key:"getExternalIdRequest",value:(v=h(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 v.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:"getRegisteredByCookie",value:(y=h(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 y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(E=h(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 E.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)}},{key:"setInAppTopicList",value:(p=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(d=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return d.apply(this,arguments)})},{key:"setTopicList",value:(l=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getTopicList",value:(u=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return u.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}},{key:"setAvoidCypher",value:function(t){this.setStorage(this.AVOID_CYPHER,t)}},{key:"isAvoidCypher",value:function(){return this.getStorage(this.AVOID_CYPHER)}},{key:"getUrlDeviceApi",value:(a=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.storage||!this.storage.isLocalStorageAvailable()){t.next=5;break}e=this.getStorage(this.URL_DEVICE_API),t.next=9;break;case 5:if(!this.db||!this.db.IDB){t.next=9;break}return t.next=8,this.db.getItem(this.URL_DEVICE_API);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 a.apply(this,arguments)})},{key:"setUrlDeviceApi",value:(r=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,e),!this.db||!this.db.IDB){t.next=4;break}return t.next=4,this.db.setItem(this.URL_DEVICE_API,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"setPushDisabled",value:function(t){this.setStorage(this.PUSH_DISABLED,t)}},{key:"isPushDisabled",value:function(){return this.getStorage(this.PUSH_DISABLED)}},{key:"getConfigV2ServiceSyncTime",value:function(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}},{key:"setConfigV2ServiceSyncTime",value:function(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}},{key:"getConfigV2",value:function(){return this.getStorage(this.CONFIG_V2)}},{key:"setConfigV2",value:function(t){this.setStorage(this.CONFIG_V2,t)}},{key:"getMaintenanceEnd",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}},{key:"setMaintenanceEnd",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}},{key:"getMaintenanceStart",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}},{key:"setMaintenanceStart",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}}],e&&f(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,a,u,l,d,p,E,y,v,g,m,I,_,b,S,O,P}();e.default=p},238:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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")}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=o},622:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e,r){return r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{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)}}]);e.default=u},429:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(254))&&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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,l(n.key),n)}}function l(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var h=function(){return function(t,e,r){return r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{key:"getPermissions",value:(n=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 n.apply(this,arguments)})},{key:"getPermission",value:(r=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 r.apply(this,arguments)})},{key:"setPermissionsCallback",value:(e=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 e.apply(this,arguments)})},{key:"setCallback",value:(t=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(e,r){return t.apply(this,arguments)})}]);var t,e,r,n}();e.default=h},170:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var n=i(r(291));function i(t){return t&&t.__esModule?t:{default:t}}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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,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,c(n.key),n)}}function c(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var l=new(i(r(254)).default)("[IND]Crypto"),h=new TextEncoder("utf-8"),f="HMAC",d=e.CryptoUtils=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"createHmac",value:(r=s().mark((function t(e,r){var i,o,a,u,c,d;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i="",!0!==(new n.default).isAvoidCypher()){t.next=6;break}i=r,t.next=18;break;case 6:if(a=null===(o=window)||void 0===o||null===(o=o.crypto)||void 0===o?void 0:o.subtle){t.next=9;break}return t.abrupt("return");case 9:return t.next=11,a.importKey("raw",h.encode(e),{name:f,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 11:return u=t.sent,t.next=14,a.sign(f,u,h.encode(r));case 14:c=t.sent,d=new Uint8Array(c),i=Array.prototype.map.call(d,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),l.d("hmac: ",i).writeLog();case 18:return t.abrupt("return",i);case 21:return t.prev=21,t.t0=t.catch(0),l.e("error:",t.t0).writeLog(),t.abrupt("return");case 25:case"end":return t.stop()}}),t,null,[[0,21]])})),i=function(){var t=this,e=arguments;return new Promise((function(n,i){var o=r.apply(t,e);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(t,e){return i.apply(this,arguments)})}],e&&u(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i}();e.default=d},457:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(735)),i=o(r(234));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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var c=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},(e=[{key:"showError",value:function(t,e,r){if(null!=t){var o=Object.values(t.ErrorCode).indexOf(e);if(o>=0){var s={code:Object.keys(t.ErrorCode)[o],errorId:Object.values(t.ErrorCode)[o]};return new i.default(s,Object.values(t.ErrorMessage)[o],r)}return new i.default(n.default.ErrorCode.GENERAL_ERROR,"general error",r)}}}])&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=new c},325:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{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}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},254:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(291)),i=o(r(630));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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var c=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=[]}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}),e;var e,r,o}();e.default=c},630:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},662:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},332:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},628:(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,"TopicUtils",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(622)),i=f(r(429)),o=f(r(170)),s=f(r(457)),a=f(r(325)),u=f(r(254)),c=r(630),l=f(r(332)),h=f(r(662));function f(t){return t&&t.__esModule?t:{default:t}}},904:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.9.2","_id":"indigitall-web-core@4.9.2","_inBundle":false,"_integrity":"sha512-aGTfAnLDU6FrokX4B7XvAWEX2Obl/hlcz9OTPFOI/yQIwIKpjfZJ1BEVeCWvDiSEAYhLek73ppnFdV66cUxcGA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.9.2","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.9.2","saveSpec":null,"fetchSpec":"4.9.2"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.9.2.tgz","_shasum":"710cb6aaf9858cce437e850a450c7fc81cf71a03","_spec":"indigitall-web-core@4.9.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.9.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(315).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(315).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()),e.isPushDisabled()||this.isValidFormat(r)||(n=!1,t.w("deviceId is null or empty").writeLog()),n}},a=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}}},u=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:c}=r(315).Core.Models,l=c.ErrorCode;Object.assign(l,{CUSTOMER_GET_ERROR:4001,CUSTOMER_PARAMS_ERROR:4011,CUSTOMER_GENERAL_ERROR:4600,CUSTOMER_NO_EXTERNAL_CODE:4601,DISABLED_CHANNEL:4404});const h=c.ErrorMessage;Object.assign(h,{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",DISABLED_CHANNEL:"disabled channel"});const f={ErrorCode:l,ErrorMessage:h},{Config:d}=r(315).Core,{BaseClient:p}=r(315).Core.Api,{ErrorModel:E}=r(315).Core.Models,{CommonUtils:y,ErrorUtils:v}=r(315).Core.Utils,g=new class extends p{constructor(){super(),this.URL_BASE=d.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_CUSTOMER_EVENT_JOURNEY=this.ENDPOINT_CUSTOMER+this.ENDPOINT_EVENT+"/custom"}async getURL(){let t=await e.getUrlDeviceApi();return t?t=t.replaceAll("v1","v2"):d.client.CUSTOMER_URL_BASE}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 E)&&e.statusCode>=200&&e.statusCode<300?y.isFunction(r)&&r(new a(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 u(t,e.data[t]));e&&i.length>0&&!(e instanceof E)&&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 E)&&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()}async postCustomJourneyEvent(t,r,n){if(s.isValidFormatRequest()&&s.isValidFormat(e.getExternalId())){const e=await this.post(this.ENDPOINT_CUSTOMER_EVENT_JOURNEY,t.postCustomEventRequest());this.getCustomerResponse(e,r,n)}else y.isFunction(n)&&n(v.showError(f,f.ErrorCode.BAD_REQUEST_SERVER_ERROR))}},{BaseRequest:m}=r(315).Core.Api,{Device:I}=r(315).Core.Models,_=class extends m{constructor(){super(),this.device=new I,null!=e.getExternalId()&&(this.customerId=e.getExternalId()),this.fieldNames,this.link,this.fields,this.eventType,this.customData}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}postCustomEventRequest(){return this.params="",this.body=this.createCustomEventBodyJson(),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&&"none"!=this.channel&&(t.channel=this.channel,this.device&&this.device.deviceId&&(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}createCustomEventBodyJson(){const t={};try{t.customData=this.customData,t.eventType=this.eventType,t.externalCode=this.customerId}catch(t){console.log("Error creating custom event request: "+t)}return t}setFields(t){this.fields=t}setFieldNames(t){this.fieldNames=t}setLink(t){this.link=t}setChannel(t){this.channel=t}setEventType(t){this.eventType=t}setCustomData(t){this.customData=t}},{CommonUtils:b,ErrorUtils:S}=r(315).Core.Utils,O=class{static async getCustomer(t,e){const r=new _;await g.getCustomer(r,t,e)}static async getCustomerInformation(t,e,r){const n=new _;null!=t&&(Array.isArray(t)?n.setFieldNames(t):b.isFunction(r)&&r(S.showError(f,f.ErrorCode.CUSTOMER_ERROR_PARAMS))),await g.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){b.isFunction(r)&&r(S.showError(f,f.ErrorCode.CUSTOMER_ERROR_PARAMS,t))}if(n){const t=new _;t.setFields(n),await g.putCustomerField(t,e,r)}else b.isFunction(r)&&r(S.showError(f,f.ErrorCode.CUSTOMER_ERROR_PARAMS))}static async deleteValuesFromCustomerFields(t,e,r){if(Array.isArray(t)){const n=new _;n.setFieldNames(t),await g.deleteCustomerField(n,e,r)}else b.isFunction(r)&&r(S.showError(f,f.ErrorCode.CUSTOMER_ERROR_PARAMS))}static async link(t,e,r){if("none"===t)return void(b.isFunction(r)&&r(S.showError(f,f.ErrorCode.DISABLED_CHANNEL)));const n=new _;n.setChannel(t),await g.postCustomerLink(n,e,r)}static async unlink(t,e,r){if("none"==t)return void(b.isFunction(r)&&r(S.showError(f,f.ErrorCode.DISABLED_CHANNEL)));const n=new _;n.setChannel(t),await g.deleteCustomerLink(n,e,r)}static async sendCustomerCustomEvent(t,e,r,n){let i,o;try{"string"==typeof e?i=JSON.parse(e):"object"==typeof e&&(i=e),"string"==typeof t&&(o=t)}catch(t){b.isFunction(n)&&n(S.showError(f,f.ErrorCode.CUSTOMER_ERROR_PARAMS))}if(i&&o){const t=new _;t.setCustomData(i),t.setEventType(o),await g.postCustomJourneyEvent(t,r,n)}else b.isFunction(n)&&n(S.showError(f,f.ErrorCode.CUSTOMER_ERROR_PARAMS))}}})(),n})(),t.exports=e()},960:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&{}.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(740));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]}}))}))},126:function(t){var e;e=()=>(()=>{var t={710:function(t){var e;e=()=>(()=>{"use strict";var t={330:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.9.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={};r.r(n),r.d(n,{default:()=>Y});var i={};r.r(i),r.d(i,{BaseApplicationRequest:()=>P,BaseClient:()=>S,BaseRequest:()=>O});var o={};r.r(o),r.d(o,{Channel:()=>A,CoreApplication:()=>L,Device:()=>R,DeviceStatus:()=>T,ErrorDictionary:()=>_,ErrorModel:()=>I,EventType:()=>w,TopicSubscribeType:()=>N});var s={};r.r(s),r.d(s,{CommonUtils:()=>C,CorePermissions:()=>D,CryptoUtils:()=>B,ErrorUtils:()=>b,JsonUtils:()=>U,Log:()=>m,LogLevel:()=>y,TopicUtils:()=>j,Validations:()=>V});var a={platform:"webpush",version:"0.0.1"};const u=r(330);a.version=u.version;const c=a=Object.assign(a,{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"}}),l=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!==l.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()}},h=l,f=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}}},d=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!==d.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")}},p=d,E=class{constructor(){this.storage=h,this.db=f,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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"}setItemSessionStorage(t,e){p.setItem(t,e)}getItemSessionStorage(t){return p.getItem(t)}clearSessionStorage(){p.clearMessages()}setStorage(t,e){h.setItem(t,e)}getStorage(t){return h.getItem(t)}clearStorage(){h.clear()}setBrowserPublicKey(t){h.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return h.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){h.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return h.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){h.setItem(this.APP_KEY,t),f&&f.IDB&&await f.setItem(this.APP_KEY,t)}getAppKey(){return h.getItem(this.APP_KEY)}async setDeviceId(t){this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,t),this.db&&this.db.IDB&&await this.db.setItem(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}async getAppKeySync(){if(f&&f.IDB)return await f.getItem(this.APP_KEY)}setVAPID(t){h.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return h.getItem(this.VAPID_PUBLIC)}setEnabled(t){h.setItem(this.ENABLED,t)}getEnabled(){return h.getItem(this.ENABLED)}setServiceSyncTime(t){h.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return h.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){h.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return h.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){h.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return h.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){h.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!h&&h.getItem(this.REQUEST_LOCATION)}async setPlatform(t){h.setItem(this.PLATFORM,t)}getPlatform(){return h&&h.getItem(this.PLATFORM)||c.platform}getVersion(){return c.version}async setBrowserName(t){h.setItem(this.BROWSER_NAME,t)}getBrowserName(){return h.getItem(this.BROWSER_NAME)}setBrowserVersion(t){h.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return h.getItem(this.BROWSER_VERSION)}async setOsName(t){h.setItem(this.OS_NAME,t)}getOsName(){return h.getItem(this.OS_NAME)}setOsVersion(t){h.setItem(this.OS_VERSION,t)}getOsVersion(){return h.getItem(this.OS_VERSION)}setDeviceType(t){h.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return h.getItem(this.DEVICE_TYPE)}setSupported(t){h.setItem(this.SUPPORTED,t)}getSupported(){return h.getItem(this.SUPPORTED)}setServiceTimestamp(t){h.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return h.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){h.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return h.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){h.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return h.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){h.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==h.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){h.setItem(this.LOG_LEVEL,t)}getLogLevel(){return h.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){h.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return h.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){h&&h.isLocalStorageAvailable()&&h.setItem(this.EXTERNAL_ID,t),f&&f.IDB&&await f.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{h&&h.isLocalStorageAvailable()?t=h.getItem(this.EXTERNAL_ID):f&&f.IDB&&(t=await f.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){h.setItem(this.EXTERNAL_ID,t)}getExternalId(){return h.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return h.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){h.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){h.setItem(this.LATITUDE,t)}getLatitude(){return h.getItem(this.LATITUDE)}setLongitude(t){h.setItem(this.LONGITUDE,t)}getLongitude(){return h.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}setAvoidCypher(t){this.setStorage(this.AVOID_CYPHER,t)}isAvoidCypher(){return this.getStorage(this.AVOID_CYPHER)}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)}setPushDisabled(t){this.setStorage(this.PUSH_DISABLED,t)}isPushDisabled(){return this.getStorage(this.PUSH_DISABLED)}getConfigV2ServiceSyncTime(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}setConfigV2ServiceSyncTime(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}getConfigV2(){return this.getStorage(this.CONFIG_V2)}setConfigV2(t){this.setStorage(this.CONFIG_V2,t)}getMaintenanceEnd(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}setMaintenanceEnd(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}getMaintenanceStart(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}setMaintenanceStart(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}},y=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),v=y;class g{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=v.INFO,this.setLogLevel((new E).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=v.DEBUG&&t<=v.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=v.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}i(){if(this.level<=v.INFO)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}w(){if(this.level<=v.WARNING)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}e(){if(this.level<=v.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const m=g,I=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=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"}},b=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);if(n>=0){const e=Object.keys(t.ErrorCode)[n],i=Object.values(t.ErrorCode)[n];return new I({code:e,errorId:i},Object.values(t.ErrorMessage)[n],r)}return new I(_.ErrorCode.GENERAL_ERROR,"general error",r)}}},S=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 m("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(v.DEBUG);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);if(304!=e.status){const 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 I(n.statusCode,n.message))}return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+e.status+"\n").writeLog(),e}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(),b.showError(_,_.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)}},O=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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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_INITIAL_STATUS="initialStatus",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 E).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}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},P=class extends O{constructor(t=null){super(),this.PARAM_APPLICATION_CHANNEL="channel",this.channels=t}getApplicationRequest(){return this.params=this.createQueryString(),this}createQueryString(){let t="";if(this.channels&&this.channels.length>0)for(let e=0;e<this.channels.length;e++)t+=`${this.PARAM_APPLICATION_CHANNEL}=${this.channels[e].toLowerCase()}&`;return t+=`${this.PARAM_PLATFORM}=webpush`,t}},A=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"}),R=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new E).getBrowserPublicKey(),this.browserPrivateKey=(new E).getBrowserPrivateKey(),this.platform=(new E).getPlatform(),this.version=(new E).getVersion(),this.browserName=(new E).getBrowserName(),this.browserVersion=(new E).getBrowserVersion(),this.osName=(new E).getOsName(),this.osVersion=(new E).getOsVersion(),this.deviceId=(new E).getDeviceId(),this.deviceType=(new E).getDeviceType(),(new E).getEnabled()&&(this.enabled="true"===(new E).getEnabled()),(new E).getExternalId()&&(this.externalCode=(new E).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new E).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new E).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}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.deviceId&&(t.deviceId=this.deviceId),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}},T=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=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"}),N=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),L=class{constructor(t,e=!1){const r=new E;if(null!=t){r.setConfigV2(JSON.stringify(t)),t.contentAvailable&&(this.contentAvailable=t.contentAvailable),t.locationAccuracy&&(this.locationAccuracy=t.locationAccuracy),t.locationDistance&&(this.locationDistance=t.locationDistance),t.locationEnabled&&(this.locationEnabled=t.locationEnabled),t.locationUpdateMinutes&&(this.locationUpdateMinutes=t.locationUpdateMinutes),t.maintenanceWindow&&(this.maintenanceWindow=t.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,r.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,r.setMaintenanceEnd(this.maintenanceWindow.end))),t.networkEventsEnabled&&(this.networkEventsEnabled=t.networkEventsEnabled),t.networkUpdateMinutes&&(this.networkUpdateMinutes=t.networkUpdateMinutes);let n=Date.now();if(t.serviceSyncTime?(this.serviceSyncTime=t.serviceSyncTime,n=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):n=new Date(Date.now()+36e5),!e){const t=n.toString();new m("[IND]CoreApplication").d("ServiceSyncTime defined on: "+t).writeLog(),r.setConfigV2ServiceSyncTime(t)}}}},C=class{static isServiceTimestampExceed(){return!(new E).getServiceTimestamp()||(new E).getServiceSyncTime()<=(Date.now()-(new E).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},D=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 m("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},M=new m("[IND]Crypto"),k=new TextEncoder("utf-8"),x="HMAC",B=class{static async createHmac(t,e){try{let r="";if(!0===(new E).isAvoidCypher())r=e;else{const n=window?.crypto?.subtle;if(!n)return;const i=await n.importKey("raw",k.encode(t),{name:x,hash:{name:"SHA-256"}},!1,["sign","verify"]),o=await n.sign(x,i,k.encode(e)),s=new Uint8Array(o);r=Array.prototype.map.call(s,(t=>("00"+t.toString(16)).slice(-2))).join(""),M.d("hmac: ",r).writeLog()}return r}catch(t){return void M.e("error:",t).writeLog()}}},U=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}},V=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},j=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},Y={Repository:E,Config:c,Api:i,Models:o,Utils:s};return n})(),t.exports=e()},315:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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(710));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(610))&&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)}},468:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(254)),i=u(r(234)),o=u(r(457)),s=u(r(735)),a=u(r(630));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="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},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var u=d(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==c(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,u,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(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){h(o,n,i,s,a,"next",t)}function a(t){h(o,n,i,s,a,"throw",t)}s(void 0)}))}}function d(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,p(n.key),n)}}function p(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}var E=function(){return t=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"},e=[{key:"getURL",value:(E=f(l().mark((function t(){return l().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 E.apply(this,arguments)})},{key:"call",value:(p=f(l().mark((function t(e,r,u,c){var h,f,d,p,E;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return h=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&h.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),f=t.t2+t.t3,u.isJourneyRequest()&&(f=f.replace("v1","v2")),d={method:e,headers:u.addHeaders()},e!==this.GET&&(d.body=JSON.stringify(u.getBody())),c&&(d.credentials=c),t.prev=13,t.next=16,fetch(f,d);case 16:if(304==(p=t.sent).status){t.next=28;break}return t.next=20,p.json();case 20:if(E=t.sent,!p.ok){t.next=24;break}return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\nResponse Body:",JSON.stringify(E.data,null,"\t")).writeLog(),t.abrupt("return",E);case 24:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\n").writeLog(),t.abrupt("return",new i.default(E.statusCode,E.message));case 28:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.status+"\n").writeLog(),t.abrupt("return",p);case 30:t.next=36;break;case 32:return t.prev=32,t.t4=t.catch(13),h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 36:case"end":return t.stop()}}),t,this,[[13,32]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(h=f(l().mark((function t(e,r){return l().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 h.apply(this,arguments)})},{key:"post",value:(c=f(l().mark((function t(e,r,n){return l().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 c.apply(this,arguments)})},{key:"put",value:(u=f(l().mark((function t(e,r,n){return l().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:(r=f(l().mark((function t(e,r){return l().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 r.apply(this,arguments)})}],e&&d(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,u,c,h,p,E}();e.default=E},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseApplicationRequest",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=s(r(468)),i=s(r(237)),o=s(r(773));function s(t){return t&&t.__esModule?t:{default:t}}},773:(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)}var i;function o(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,s(n.key),n)}}function s(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(a=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,a()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e)).PARAM_APPLICATION_CHANNEL="channel",t.channels=r,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(e,t),function(t,e){return e&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"getApplicationRequest",value:function(){return this.params=this.createQueryString(),this}},{key:"createQueryString",value:function(){var t="";if(this.channels&&this.channels.length>0)for(var e=0;e<this.channels.length;e++)t+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[e].toLowerCase(),"&");return t+"".concat(this.PARAM_PLATFORM,"=webpush")}}])}(((i=r(237))&&i.__esModule?i:{default:i}).default);e.default=l},237:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e){return e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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_INITIAL_STATUS="initialStatus",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={}}),[{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:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}]);e.default=u},122:(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(904);n.version=i.version,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=n},610:(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=h(r(122)),o=h(r(291)),s=l(r(545)),a=l(r(225)),u=l(r(628));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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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 h(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"});e.default=r},174:(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=s(r(291)),o=s(r(254));function s(t){return t&&t.__esModule?t:{default: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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}var c=function(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=new i.default;if(null!=e){n.setConfigV2(JSON.stringify(e)),e.contentAvailable&&(this.contentAvailable=e.contentAvailable),e.locationAccuracy&&(this.locationAccuracy=e.locationAccuracy),e.locationDistance&&(this.locationDistance=e.locationDistance),e.locationEnabled&&(this.locationEnabled=e.locationEnabled),e.locationUpdateMinutes&&(this.locationUpdateMinutes=e.locationUpdateMinutes),e.maintenanceWindow&&(this.maintenanceWindow=e.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,n.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,n.setMaintenanceEnd(this.maintenanceWindow.end))),e.networkEventsEnabled&&(this.networkEventsEnabled=e.networkEventsEnabled),e.networkUpdateMinutes&&(this.networkUpdateMinutes=e.networkUpdateMinutes);var s=Date.now();if(e.serviceSyncTime?(this.serviceSyncTime=e.serviceSyncTime,s=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):s=new Date(Date.now()+36e5),!r){var a=s.toString();new o.default("[IND]CoreApplication").d("ServiceSyncTime defined on: "+a).writeLog(),n.setConfigV2ServiceSyncTime(a)}}}));e.default=c},395:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e){return e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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.deviceId=(new i.default).getDeviceId(),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()}),[{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.deviceId&&(t.deviceId=this.deviceId),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}}]);e.default=u},89:(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},735:(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},234:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=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=o},953:(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},72:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},225:(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,"CoreApplication",{enumerable:!0,get:function(){return l.default}}),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}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(902),i=h(r(395)),o=h(r(89)),s=h(r(735)),a=h(r(234)),u=h(r(953)),c=h(r(72)),l=h(r(174));function h(t){return t&&t.__esModule?t:{default:t}}},672:(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 e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==r(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=_,s(P,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.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&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=function(){return t=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},e=[{key:"getDB",value:(c=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 c.apply(this,arguments)})},{key:"get",value:(u=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 u.apply(this,arguments)})},{key:"put",value:(a=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 a.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:(i=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 i.apply(this,arguments)})},{key:"getItem",value:(r=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 r.apply(this,arguments)})}],e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i,a,u,c}();e.default=new u},87:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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()}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=o},291:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(122)),i=a(r(87)),o=a(r(672)),s=a(r(238));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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var c=d(t[i],t,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==u(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 h(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 f(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,d(n.key),n)}}function d(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}var p=function(){return t=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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"},e=[{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:(P=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return P.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"setDeviceId",value:(O=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,e),!this.db||!this.db.IDB){t.next=4;break}return t.next=4,this.db.setItem(this.DEVICE_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return O.apply(this,arguments)})},{key:"getDeviceId",value:function(){return this.getStorage(this.DEVICE_ID)}},{key:"getAppKeySync",value:(S=h(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return S.apply(this,arguments)})},{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:(b=h(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 b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(_=h(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 _.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:(I=h(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 I.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:(m=h(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 m.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:(g=h(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 g.apply(this,arguments)})},{key:"getExternalIdRequest",value:(v=h(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 v.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:"getRegisteredByCookie",value:(y=h(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 y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(E=h(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 E.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)}},{key:"setInAppTopicList",value:(p=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(d=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return d.apply(this,arguments)})},{key:"setTopicList",value:(l=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getTopicList",value:(u=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return u.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}},{key:"setAvoidCypher",value:function(t){this.setStorage(this.AVOID_CYPHER,t)}},{key:"isAvoidCypher",value:function(){return this.getStorage(this.AVOID_CYPHER)}},{key:"getUrlDeviceApi",value:(a=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.storage||!this.storage.isLocalStorageAvailable()){t.next=5;break}e=this.getStorage(this.URL_DEVICE_API),t.next=9;break;case 5:if(!this.db||!this.db.IDB){t.next=9;break}return t.next=8,this.db.getItem(this.URL_DEVICE_API);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 a.apply(this,arguments)})},{key:"setUrlDeviceApi",value:(r=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,e),!this.db||!this.db.IDB){t.next=4;break}return t.next=4,this.db.setItem(this.URL_DEVICE_API,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"setPushDisabled",value:function(t){this.setStorage(this.PUSH_DISABLED,t)}},{key:"isPushDisabled",value:function(){return this.getStorage(this.PUSH_DISABLED)}},{key:"getConfigV2ServiceSyncTime",value:function(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}},{key:"setConfigV2ServiceSyncTime",value:function(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}},{key:"getConfigV2",value:function(){return this.getStorage(this.CONFIG_V2)}},{key:"setConfigV2",value:function(t){this.setStorage(this.CONFIG_V2,t)}},{key:"getMaintenanceEnd",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}},{key:"setMaintenanceEnd",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}},{key:"getMaintenanceStart",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}},{key:"setMaintenanceStart",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}}],e&&f(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,a,u,l,d,p,E,y,v,g,m,I,_,b,S,O,P}();e.default=p},238:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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")}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=o},622:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e,r){return r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{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)}}]);e.default=u},429:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(254))&&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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,l(n.key),n)}}function l(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var h=function(){return function(t,e,r){return r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{key:"getPermissions",value:(n=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 n.apply(this,arguments)})},{key:"getPermission",value:(r=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 r.apply(this,arguments)})},{key:"setPermissionsCallback",value:(e=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 e.apply(this,arguments)})},{key:"setCallback",value:(t=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(e,r){return t.apply(this,arguments)})}]);var t,e,r,n}();e.default=h},170:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var n=i(r(291));function i(t){return t&&t.__esModule?t:{default:t}}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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,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,c(n.key),n)}}function c(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var l=new(i(r(254)).default)("[IND]Crypto"),h=new TextEncoder("utf-8"),f="HMAC",d=e.CryptoUtils=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"createHmac",value:(r=s().mark((function t(e,r){var i,o,a,u,c,d;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i="",!0!==(new n.default).isAvoidCypher()){t.next=6;break}i=r,t.next=18;break;case 6:if(a=null===(o=window)||void 0===o||null===(o=o.crypto)||void 0===o?void 0:o.subtle){t.next=9;break}return t.abrupt("return");case 9:return t.next=11,a.importKey("raw",h.encode(e),{name:f,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 11:return u=t.sent,t.next=14,a.sign(f,u,h.encode(r));case 14:c=t.sent,d=new Uint8Array(c),i=Array.prototype.map.call(d,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),l.d("hmac: ",i).writeLog();case 18:return t.abrupt("return",i);case 21:return t.prev=21,t.t0=t.catch(0),l.e("error:",t.t0).writeLog(),t.abrupt("return");case 25:case"end":return t.stop()}}),t,null,[[0,21]])})),i=function(){var t=this,e=arguments;return new Promise((function(n,i){var o=r.apply(t,e);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(t,e){return i.apply(this,arguments)})}],e&&u(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i}();e.default=d},457:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(735)),i=o(r(234));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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var c=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},(e=[{key:"showError",value:function(t,e,r){if(null!=t){var o=Object.values(t.ErrorCode).indexOf(e);if(o>=0){var s={code:Object.keys(t.ErrorCode)[o],errorId:Object.values(t.ErrorCode)[o]};return new i.default(s,Object.values(t.ErrorMessage)[o],r)}return new i.default(n.default.ErrorCode.GENERAL_ERROR,"general error",r)}}}])&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=new c},325:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{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}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},254:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(291)),i=o(r(630));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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var c=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=[]}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}),e;var e,r,o}();e.default=c},630:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},662:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},332:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},628:(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,"TopicUtils",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(622)),i=f(r(429)),o=f(r(170)),s=f(r(457)),a=f(r(325)),u=f(r(254)),c=r(630),l=f(r(332)),h=f(r(662));function f(t){return t&&t.__esModule?t:{default:t}}},904:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.9.2","_id":"indigitall-web-core@4.9.2","_inBundle":false,"_integrity":"sha512-aGTfAnLDU6FrokX4B7XvAWEX2Obl/hlcz9OTPFOI/yQIwIKpjfZJ1BEVeCWvDiSEAYhLek73ppnFdV66cUxcGA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.9.2","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.9.2","saveSpec":null,"fetchSpec":"4.9.2"},"_requiredBy":["#USER","/","/indigitall-web-customer"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.9.2.tgz","_shasum":"710cb6aaf9858cce437e850a450c7fc81cf71a03","_spec":"indigitall-web-core@4.9.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.9.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:()=>At});const{Repository:t}=r(315).Core,e=new class extends t{constructor(){super(),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.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.INAPP_TOPICS_SYNC=this.REPOSITORY+".INAPP_TOPICS_SYNC",this.AVOID_ACTION=this.REPOSITORY+".AVOID_ACTION",this.CONFIG_INAPP_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_INAPP_V2_SERVICE_SYNC_TIME",this.AUDIENCE_DATE_CACHE_TTL=this.REPOSITORY+".AUDIENCE_DATE_CACHE_TTL",this.INAPP_AUDIENCES=this.REPOSITORY+".INAPP_AUDIENCES",this.INAPP_AUDIENCES_CACHE=this.REPOSITORY+".INAPP_AUDIENCES_CACHE",this.INAPP_AUDIENCES_LAST_UPDATE=this.REPOSITORY+".INAPP_AUDIENCES_LAST_UPDATE"}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)}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)?this.getStorage(this.INAPP_TOPICS).split(","):null}setInAppTopics(t){this.setStorage(this.INAPP_TOPICS,t)}async getInAppTopicsSync(){let t=null;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS_SYNC))}catch(t){}return t}async setInAppTopicsSync(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS_SYNC,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}isAvoidAction(){return this.getStorage(this.AVOID_ACTION)}setAvoidAction(t){this.setStorage(this.AVOID_ACTION,t)}getConfigInAppV2ServiceSyncTime(){return this.getStorage(this.CONFIG_INAPP_V2_SERVICE_SYNC_TIME)}setConfigInAppV2ServiceSyncTime(t){this.setStorage(this.CONFIG_INAPP_V2_SERVICE_SYNC_TIME,t)}getInAppAudienceDateCacheTtl(){return this.getStorage(this.AUDIENCE_DATE_CACHE_TTL)}setInAppAudienceDateCacheTtl(t){this.setStorage(this.AUDIENCE_DATE_CACHE_TTL,t)}getAudienceModel(){return this.getStorage(this.INAPP_AUDIENCES)}setAudienceModel(t){this.setStorage(this.INAPP_AUDIENCES,t)}getAudienceCache(){return this.getStorage(this.INAPP_AUDIENCES_CACHE)}setAudienceCache(t){this.setStorage(this.INAPP_AUDIENCES_CACHE,t)}getAudienceLastUpdate(){return this.getStorage(this.INAPP_AUDIENCES_LAST_UPDATE)}setAudienceLastUpdate(t){this.setStorage(this.INAPP_AUDIENCES_LAST_UPDATE,t)}},{Validations:i,Log:o}=r(315).Core.Utils,s=class extends i{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFieldFormat(t){return null!=t&&""!=t&&"null"!=t}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}static isInAppRegisterFormat(){return!(!this.isValidFormatRequest()||!e.getExternalId()||"null"===e.getExternalId())}},{ErrorDictionary:a}=r(315).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_TOPIC_EMPTY:2104,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_TOPIC_EMPTY:"There is no inApp Topics subscription",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},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.app&&(this.app=t.app),t.no_action&&(this.no_action=t.no_action)}},f=class{constructor(t){t.borderRadius&&(this.borderRadius=t.borderRadius)}},d=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 f(t.layout)),t.action&&(this.action=new h(t.action))}setAction(t){this.action=t}},p=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))}},E=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 updateInApp(t){const r=this.getListInApp(),n=[];let i=!1,o=null;if(null!=r)for(let e=0;e<r.length;e++)r[e].inAppId===t.inAppId&&(i=!0,r[e].filters&&(t.filters=r[e].filters),r[e].name&&(t.name=r[e].name),null!=r[e].properties&&(t.properties=new d(r[e].properties)),null!=r[e].inAppShow&&(t.inAppShow=new p(r[e].inAppShow)),n.push(t),o=t);if(i)return e.setItemStorage(JSON.stringify(n)),o}static deleteInApp(t){let r=!1;const n=this.getListInApp(),i=[];if(null!=n)for(let e=0;e<n.length;e++)n[e].inAppId!=t.inAppId?i.push(n[e]):r=!0;return e.setItemStorage(JSON.stringify(i)),r}static deleteInAppIfOldVersion(t){let e=!1;const r=this.getListInApp(),n=[];if(null!=r)for(let i=0;i<r.length;i++)r[i].inAppId!=t.inAppId?n.push(r[i]):r[i].version<=t.version?e=!0:n.push(r[i]);return e}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}},y=class{constructor(t){t.code&&(this.code=t.code),t.width&&(this.width=t.width),t.height&&(this.height=t.height)}},v=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=k.getDate((new Date).getTime()),t.expiredDate)this.expiredDate=t.expiredDate;else{let t=36e5;this.cacheTtl&&(t=1e3*this.cacheTtl),this.expiredDate=k.getDate((new Date).getTime()+t)}t.schema&&(this.schema=new y(t.schema)),t.properties&&(this.properties=new d(t.properties)),this.inAppShow=new p(t.inAppShow),t.filters&&(this.filters=t.filters),t.name&&(this.name=t.name)}},{BaseRequest:g}=r(315).Core.Api,{Config:m}=r(315).Core,I=class extends g{constructor(){super(),e.getDeviceId()?this.deviceId=e.getDeviceId():this.deviceId=k.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.externalCode=e.getExternalId()),t.inAppId=this.inAppId,t.platform=m.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:_}=r(315).Core.Api,b=class extends _{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:S}=r(315).Core.Api,{Config:O}=r(315).Core,P=class extends S{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=O.platform,t.version=this.version,t}},A=class{static sendEventPrint(t){const e=new I;e.setInAppId(t.inAppId),e.setVersion(t.version),et.postEventPrint(e)}static sendEventClick(t){const e=new I;e.setActionId(t.properties.action.actionId),e.setInAppId(t.inAppId),e.setVersion(t.version),et.postEventClick(e)}static sendEventForm(t,e,r){const n=new P;n.setVersion(e),n.setInAppId(t),n.setJsonForm(r),et.postEventForm(n)}static sendEventFormToCustomer(t){const e=new b;e.setFields(t),et.putCustomerField(e)}},{DeviceStatus:R,Device:T}=r(315).Core.Models,{BaseRequest:w}=r(315).Core.Api,N=class extends w{constructor(){super(),this.device=new T}postDeviceRequest(){return this.body=this.createDeviceJson(),this.status!==R.DEFAULT&&(this.body.enabled=1===this.status),this}createDeviceJson(){let t={};try{t=this.device.toJSON()}catch(t){console.log(t)}return t}},{Log:L,CryptoUtils:C,CorePermissions:D}=r(315).Core.Utils,{EventType:M}=r(315).Core.Models,k=class{constructor(){this.MONTH=24192e5}static onClickAction(t){"false"===e.isAvoidAction()&&t.type==t.URL&&window.open(t.url)}static addNewInApp(t){E.addInApp(t)}static addNewInAppClick(t){t.properties.numberOfClicks&&t.properties.numberOfClicks>0&&E.addInAppNewClick(t),A.sendEventClick(t)}static addNewInApptoDismissForever(t){E.addInAppDismissForever(t)}static isInAppDismissForever(t){const e=E.searchInAppWithInAppId(t.inAppId);return!(null==e||!new v(e).inAppShow.wasDismissed)}static async registerLocation(){const t=new L("[IND]InAppUtils: ");try{navigator.geolocation&&"prompt"===(await D.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()==M.EVENT_TYPE_REJECT||e.setPermissionLocation(M.EVENT_TYPE_REJECT)}))}catch(e){t.e(e).writeLog()}}static generateDeviceId(){et.postDevice(new N,(t=>t),(t=>(console.log(t),null)))}static async setExternalCode(t){let r=t;if(t){const n=e.getAppKey();r=await C.createHmac(n,t)}return e.setExternalId(r),r}static async setExternalCodeWithoutCypher(t){await e.setExternalId(t)}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}`}},{CommonUtils:x,ErrorUtils:B}=r(315).Core.Utils,{Channel:U}=r(315).Core.Models,V=class{static async listTopics(t,r){const n=[],i=await e.getInAppTopics();if(null!=i&&""!=i){for(let t=0;t<i.length;t++)n.push({code:i[t],name:i[t],visible:!0,subscribe:!0,parentCode:i[t],channel:U.INAPP});x.isFunction(t)&&t(n)}else x.isFunction(r)&&r(B.showError(l,l.ErrorCode.INAPP_TOPIC_EMPTY))}static async saveTopics(t,r,n){try{if(t instanceof Array){let n=[];const i=await e.getInAppTopics();if(null!=i&&""!=i&&(n=i),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),await e.setInAppTopicsSync(n);const o=[];for(let t=0;t<n.length;t++)o.push({code:n[t],name:n[t],visible:!0,subscribe:!0,parentCode:"",channel:U.INAPP});x.isFunction(r)&&r(o)}else x.isFunction(n)&&n(B.showError(l,l.ErrorCode.INAPP_INSTANCE_TOPICS_ERROR))}catch(t){x.isFunction(n)&&n(B.showError(l,l.ErrorCode.INAPP_ERROR,t.message))}}static async deleteTopics(t,r,n){if(t instanceof Array){let n=[],i=[];const o=await e.getInAppTopics();null!=o&&""!=o&&(n=o),0!==n.length&&(i=n.filter((e=>!t.includes(e))),e.setInAppTopics(i),await e.setInAppTopicsSync(i));const s=[];if(i.length>0)for(let t=0;t<i.length;t++)s.push({code:i[t],name:i[t],visible:!0,subscribe:!0,parentCode:"",channel:U.INAPP});x.isFunction(r)&&r(s)}else x.isFunction(n)&&n(B.showError(l,l.ErrorCode.INAPP_INSTANCE_TOPICS_ERROR))}static isSubscribe(t){let r=[],n=[];if(e.getInAppTopics()&&(n=e.getInAppTopics()),t&&t.length>0)if(n&&n.length>0)for(let e=0;e<t.length;e++){t[e].subscribed=!1;for(let r=0;r<n.length;r++)t[e].code===n[r]&&(t[e].subscribed=!0);r.push(t[e])}else{for(let e=0;e<t.length;e++)t[e].subscribe=!1;r=t}return r}},{CoreApplication:j}=r(315).Core.Models,Y=class extends j{constructor(t,r=!1){if(super(t,r),t&&t.inapp){const r=t.inapp;r.enabled&&(this.enabled=r.enabled),r.clearCacheList&&(this.clearCacheList=r.clearCacheList),r.clearCacheAll&&(this.clearCacheAll=r.clearCacheAll),r.serviceSyncTime&&(this.serviceSyncTime=r.serviceSyncTime,e.setConfigInAppV2ServiceSyncTime(this.serviceSyncTime)),r.audienceCache&&(this.audienceCache=r.audienceCache,this.audienceCache.deviceTtl&&(this.audienceCacheDeviceTtl=this.audienceCache.deviceTtl),e.setAudienceCache(this.audienceCacheDeviceTtl))}}updateCache(){let t=0;if(this.clearCacheAll)e.clearSessionStorage(),t=!0,e.setAudienceModel(""),e.setAudienceLastUpdate(""),e.setAudienceCache(0),e.setInAppAudienceDateCacheTtl("");else if(this.clearCacheList&&this.clearCacheList.length>0)for(let e=0;e<this.clearCacheList.length;e++){const r=new v(this.clearCacheList[e]);if(r&&0!=r.inAppId){let e=!1;e=0!=r.version?E.deleteInAppIfOldVersion(r):E.deleteInApp(r),e&&t++}}return t}},F=class{constructor(t){t&&(t.audiences&&(this.audiences=t.audiences),t.lastUpdate&&(this.lastUpdate=t.lastUpdate))}},{Log:G}=r(315).Core.Utils,K="[IND]InAppAudienceUtils: ",W=class{static isAudienceCacheFinish(){const t=new G(K+".isAudienceCacheFinish");if(e.getInAppAudienceDateCacheTtl()&&""!=e.getInAppAudienceDateCacheTtl()){const r=new Date(e.getInAppAudienceDateCacheTtl());return!!(r&&r<Date.now())||(t.d(`InApp Audience cache reload on: ${r.toISOString()}`).writeLog(),!1)}return this.saveAudienceCache(e.getAudienceCache()),!0}static saveAudienceCache(t){const r=new G(K+".saveAudienceCache");let n=216e5;t&&0!=t&&(n=1e3*t);const i=new Date(Date.now()+n).toISOString();r.d(`InApp Audience cache reload on: ${i}`).writeLog(),e.setInAppAudienceDateCacheTtl(i)}static saveAudiences(t){t&&t.audiences&&e.setAudienceModel(JSON.stringify(t))}static loadAudiences(){return e.getAudienceModel()&&""!=e.getAudienceModel()?new F(JSON.parse(e.getAudienceModel())):null}},{BaseClient:q}=r(315).Core.Api,{Config:H}=r(315).Core,{Channel:X,ErrorModel:J}=r(315).Core.Models,{TopicUtils:$,CommonUtils:Q,ErrorUtils:z,Log:Z}=r(315).Core.Utils,tt="[IND]InAppApplication: ",et=new class extends q{constructor(){super(),this.ENDPOINT_INAPP="/inapp",this.URL_BASE=H.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_INAPP_AUDIENCE=this.ENDPOINT_DEVICE+"/audiences",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_TOPICS="/topic",this.ENDPOINT_CUSTOMER="/customer",this.ENDPOINT_CUSTOMER_FIELD=this.ENDPOINT_CUSTOMER+"/field",this.ENDPOINT_APPLICATION="/application",this.isCustomerRequest=!1,this.isDeviceRequest=!1,this.isApplicationRequest=!1}async getURL(){if(this.isCustomerRequest){this.isCustomerRequest=!1;let t=await e.getUrlInappApi();return t?t=t.replaceAll("v2","v1"):H.client.CUSTOMER_URL_BASE}if(this.isDeviceRequest){this.isDeviceRequest=!1;let t=await e.getUrlInappApi();return t?t=t.replaceAll("v2","v1"):H.client.URL_BASE}if(this.isApplicationRequest)return this.isApplicationRequest=!1,await e.getUrlInappApi()||H.client.URL_DEVICE_V2;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 J)&&n.data&&Object.keys(n.data).length>0){if(Q.isFunction(e)){const r=new v(n.data);r.properties.numberOfShows>0&&(r.inAppShow.timesShowed=1),r.properties.dismissForever&&(r.inAppShow.wasDismissed=!0),t.isUpdateInApp()||k.addNewInApp(r),e(r)}}else n?Q.isFunction(r)&&r(n):Q.isFunction(r)&&r(z.showError(l,l.ErrorCode.INAPP_ERROR_CONTENT_MESSAGE));return null}async getInAppTopics(t,r,n){if(s.isAppKeyFormat()){const i=await this.get(this.ENDPOINT_DEVICE_TOPICS,t.getDeviceTopicsRequest());if(!i||i instanceof J)i?Q.isFunction(n)&&n(i):Q.isFunction(n)&&n();else{const t=$.setTopicChannel(i.data,X.INAPP),n=V.isSubscribe(t);await e.setInAppTopicList(n),Q.isFunction(r)&&r(n)}}else Q.isFunction(n)&&n(z.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 J?i?Q.isFunction(n)&&n(i):Q.isFunction(n)&&n():(i.data.deviceId&&e.setDeviceId(i.data.deviceId),Q.isFunction(r)&&r(i.data.deviceId))}else Q.isFunction(n)&&n(z.showError(l,l.ErrorCode.INAPP_ERROR));return!0}async getApplicationWithInAppChannel(t,r,n){if(s.isAppKeyFormat()){const i=e.getConfigV2ServiceSyncTime(),o=new Z(tt);if(null!=i&&Date.now()<new Date(i)){o.d(`InApp config cache reload on: ${new Date(i).toISOString()}`).writeLog();const t=JSON.parse(e.getConfigV2());t&&Q.isFunction(r)&&r(new Y(t,!0))}else{null!=i&&o.d(`InApp config cache reload on: ${new Date(i).toISOString()}`).writeLog(),this.isApplicationRequest=!0;const e=await this.get(this.ENDPOINT_APPLICATION,t.getApplicationRequest());if(e&&!(e instanceof J))if(e.data&&Object.keys(e.data).length>0){if(Q.isFunction(r)){const t=new Y(e.data,!1);if(t.enabled){const e=t.updateCache();e>0&&o.d(`Deleted ${e} inapp cache from database`).writeLog()}r(t)}}else e?Q.isFunction(n)&&n(e):Q.isFunction(n)&&n()}}else Q.isFunction(n)&&n(z.showError(l,l.ErrorCode.INAPP_ERROR));return!0}async getAudiences(t,r,n){const i=new Z(`${tt}.getAudiences`);if(s.isInAppRegisterFormat()){const o=await this.get(this.ENDPOINT_INAPP_AUDIENCE,t.getAudiences());if(!o||o instanceof J)o?Q.isFunction(n)&&n(o):Q.isFunction(n)&&n();else{let t;o.data?(t=new F(o.data),t.lastUpdate&&e.setAudienceLastUpdate(t.lastUpdate),t.audiences&&W.saveAudiences(t)):o.status&&304==o.status&&i.d("No audiences modified. No need to sync changes to the device").writeLog(),Q.isFunction(r)&&r(t)}}else Q.isFunction(n)&&n(z.showError(l,l.ErrorCode.INAPP_ERROR,"Bad request, deviceId and externalCode not found"))}},{BaseRequest:rt}=r(315).Core.Api,nt=class extends rt{constructor(){super(),this.update=!1,this.PARAM_DEVICE_TYPE="deviceType",this.PARAM_BROWSER_NAME="browserName",this.PARAM_AUDIENCES="audiences",this.PARAM_AUDIENCES_VERSION="audiencesVersion"}setTag(t){this.tag=t}setUpdateInApp(t){this.update=t}isUpdateInApp(){return this.update}getCampaignTagRequest(){return this.params=this.createQueryString(),this.pathParams["{tag}"]=this.tag,this}createQueryString(){let t="";if(null!=e.getDeviceId()?t+=`${this.PARAM_DEVICE_ID}=${e.getDeviceId()}&`:k.generateDeviceId(),s.isValidFieldFormat(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){const r=e.getInAppTopics();t+=`${this.PARAM_TOPICS}=${encodeURIComponent(r)}&`}const r=W.loadAudiences();return null!=r&&0!==r.audiences.length&&(t+=`${this.PARAM_AUDIENCES}=${encodeURIComponent(r.audiences)}&`),t+=`${this.PARAM_AUDIENCES_VERSION}=v2&`,t+=`${this.PARAM_PLATFORM}=webpush`,t}},it=class{constructor(t,e){this.script=` \n\n let objectFit_${e} = "contain" ;\n const containers_${e} = document.getElementById("${t}").getElementsByClassName("ind_slideshow-container");\n if (containers_${e} && containers_${e}.length > 0 && containers_${e}[0] && containers_${e}[0].getAttribute("data-carousel-adjust-type")) {\n objectFit_${e} = containers_${e}[0].getAttribute("data-carousel-adjust-type"); \n }\n\n var isPartial_${e} = document.getElementById("${t}").getElementsByClassName("ind_slideshow-item-partial").length > 0;\n \n var slideIndex_${e} = isPartial_${e} ? 1 : 0;\n var delta_${e} = 6;\n \n var diffX_${e};\n var diffY_${e};\n var timeSlide_${e} = 10000;\n\n\n var ind_carouselOverlap_${e} = document.getElementById("ind_carouselOverlapContainer_${e}");\n var ind_carouselOverlapLMainView_${e} = document.getElementById("ind_carouselOverlapLMainView_${e}")\n \n const indNext_${e} = document.getElementById("${t}").getElementsByClassName("ind_next");\n const indPrev_${e} = document.getElementById("${t}").getElementsByClassName("ind_prev");\n indNext_${e}.onclick = () => plusSlides_${e}(1);\n indPrev_${e}.onclick = () => plusSlides_${e}(-1);\n\n var slides_${e} = document.getElementById("${t}").getElementsByClassName("ind_slideshow-item") ? document.getElementById("${t}").getElementsByClassName("ind_slideshow-item") : document.getElementById("${t}").getElementsByClassName("ind_slideshow-carousel-item");\n var slider_${e} = document.getElementById("${t}").querySelector('.ind_slider-container-actions');\n var sliderTotal_${e} = document.getElementById("${t}").getElementsByClassName("ind_slideshow-item").length ? document.getElementById("${t}").getElementsByClassName("ind_slideshow-item").length : document.getElementById("${t}").getElementsByClassName("ind_slideshow-carousel-item").length;\n \n var interval_${e} = setInterval(() => {\n newSlide_${e}();\n }, timeSlide_${e});\n\n var imageList_${e} = document.getElementById("${t}").getElementsByClassName("indCOImages_${e}");\n \n if (imageList_${e}) {\n setImagesCarouselOverLap_${e}();\n let docIframeHeight_${e} = document.getElementById("${t}").clientHeight;\n let docIframeWidth_${e} = document.getElementById("${t}").clientWidth;\n \n if (document.getElementById("ind_carouselOverlapLeftView_${e}")) document.getElementById("ind_carouselOverlapLeftView_${e}").style.height = (docIframeHeight_${e}-20)+"px";\n if (document.getElementById("ind_carouselOverlapLRightView_${e}")) document.getElementById("ind_carouselOverlapLRightView_${e}").style.height = (docIframeHeight_${e}-20)+"px";\n if (document.getElementById("ind_carouselOverlapLMainView_${e}")) document.getElementById("ind_carouselOverlapLMainView_${e}").style.height = docIframeHeight_${e} + "px";\n if (document.getElementById("ind_carouselOverlapLMainView_${e}")) document.getElementById("ind_carouselOverlapLMainView_${e}").style.width = docIframeWidth_${e} + "px";\n \n }\n if (document.getElementById("ind_carousel-overlap-container_${e}")) document.getElementById("ind_carousel-overlap-container_${e}").style.width = docIframeWidth_${e} + "px";\n\n function setImagesCarouselOverLap_${e}() { \n var slides_${e} = document.getElementById("${t}").getElementsByClassName("ind_slideshow-carousel-item");\n for (let i = 0; i < slides_${e}.length; i++) {\n if (imageList_${e}[i]) {\n slides_${e}[i].style.backgroundImage = "url('"+imageList_${e}[i].src+"')";\n if (slides_${e}[i].style) {\n \n slides_${e}[i].style.backgroundSize = "cover";\n }\n slides_${e}[i].style.backgroundPosition = "center";\n } \n }\n const mainView = document.getElementById("ind_carouselOverlapLMainView_${e}");\n if (mainView) {\n mainView.style.backgroundSize = objectFit_${e};\n if (slides_${e}[1]) slides_${e}[1].onclick = imageList_${e}[1].onclick; \n }\n }\n\n function shiftRight_${e}() {\n let newArr = new Array(imageList_${e}.length);\n for (var i = 0; i < imageList_${e}.length; i++) {\n if (i == 0) {\n newArr[i] = imageList_${e}[imageList_${e}.length-1];\n } else {\n newArr[i] = imageList_${e}[i-1];\n }\n }\n imageList_${e} = newArr;\n }\n\n function shiftLeft_${e}() {\n let newArr = new Array(imageList_${e}.length);\n for (var i = 0; i < imageList_${e}.length; i++) {\n if (i+1 == imageList_${e}.length) {\n newArr[i] = imageList_${e}[0]; \n } else {\n newArr[i] = imageList_${e}[i+1];\n }\n }\n imageList_${e} = newArr;\n }\n\n \n showSlides_${e}(slideIndex_${e});\n \n let startMove_${e} = null;\n let startMoveY_${e} = null;\n \n \n if (slider_${e} && !ind_carouselOverlap_${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 } else if (ind_carouselOverlap_${e} && ind_carouselOverlapLMainView_${e}) {\n ind_carouselOverlapLMainView_${e}.addEventListener('touchstart', handleStart_${e}, false);\n ind_carouselOverlapLMainView_${e}.addEventListener('touchend', handleEnd_${e}, false);\n ind_carouselOverlapLMainView_${e}.addEventListener('mousedown', mouseStart_${e});\n ind_carouselOverlapLMainView_${e}.addEventListener('mouseup', mouseEnd_${e});\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 const endMove = evt.changedTouches[0].pageX;\n const 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 \n if (startMove_${e} != null) {\n if (startMove_${e} > endMove) {\n if (ind_carouselOverlap_${e}) {\n slideIndex_${e} = -1;\n } else {\n slideIndex_${e}++;\n if (slideIndex_${e} > sliderTotal_${e}) {\n slideIndex_${e} = 1;\n }\n }\n } else {\n if (ind_carouselOverlap_${e}) {\n if (startMove_${e} == endMove) {\n slideIndex_${e} = 0;\n } else {\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 }\n showSlides_${e}(slideIndex_${e});\n setNewInterval_${e}();\n }\n \n }\n\n function plusSlides_${e}(n) {\n if (ind_carouselOverlap_${e}) {\n showSlides_${e}(n == 1 ? -1: 1);\n } else {\n showSlides_${e}(slideIndex_${e} += n);\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}") ? document.getElementById("${t}") : document;\n if (view) {\n if (ind_carouselOverlap_${e}) { \n if (n < 0) {\n shiftLeft_${e}();\n } else if (n > 0) {\n shiftRight_${e}();\n }\n setImagesCarouselOverLap_${e}();\n } else {\n let i;\n const dots = view.getElementsByClassName("ind_dot");\n if (n > slides_${e}.length) {slideIndex_${e} = 1;}\n if (n < 1) {slideIndex_${e} = slides_${e}.length;}\n for (i = 0; i < slides_${e}.length; i++) {\n slides_${e}[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_${e}[slideIndex_${e}-1]) {\n slides_${e}[slideIndex_${e}-1].style.display = "block";\n }\n if (dots[slideIndex_${e}-1]) dots[slideIndex_${e}-1].className += " active";\n }\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_${e}(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.html=" "}},ot=Object.freeze({TEXT:"text",NUMBER:"number",RADIO:"radio",CHECKBOX:"checkbox",SELECT:"select"}),st=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=ot.TEXT;break;case"checkbox":this.type=ot.CHECKBOX;break;case"number":this.type=ot.NUMBER;break;case"radio":this.type=ot.RADIO;break;case"select":this.type=ot.SELECT}t.required&&(this.required=t.required),t.sendToCustomer&&(this.sendToCustomer=t.sendToCustomer)}},at=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 st(t.inputs[e]))}}},{ErrorUtils:ut}=r(315).Core.Utils,ct=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&&A.sendEventForm(t.inAppId,t.inappVersion,e),r&&0!==Object.keys(r).length&&A.sendEventFormToCustomer(r)}static checkInputType(t,e){if(null!=t.id)switch(t.type){case ot.TEXT:if(t.required){if(!e[t.id])return ut.showError(l,2121,t.id);if(!e[t.id]instanceof String)return ut.showError(l,2120,`The field ${t.id} is not text`)}break;case ot.NUMBER:if(t.required){if(!e[t.id])return ut.showError(l,2121,t.id);if(!e[t.id]instanceof String){if(!parseInt(e[t.id]))return ut.showError(l,2120,`The field ${t.id} is not number`)}else if(!e[t.id]instanceof int)return ut.showError(l,2120,`The field ${t.id} is not number`)}break;default:if(t.required&&e[t.id]&&""==e[t.id])return ut.showError(l,2121,t.id)}return null}static editingFormHtml(t,e){return t.replaceAll("InAppIndigitall.onClick",`inAppIndigitallOnClick_${e}`).replaceAll("InAppIndigitall.submit",`inAppIndigitallSubmit_${e}`).replaceAll("plusSlides",`plusSlides_${e}`).replaceAll("indCOImages",`indCOImages_${e}`).replaceAll("ind_carouselOverlapLeftView",`ind_carouselOverlapLeftView_${e}`).replaceAll("ind_carouselOverlapLRightView",`ind_carouselOverlapLRightView_${e}`).replaceAll("ind_carouselOverlapLMainView",`ind_carouselOverlapLMainView_${e}`).replaceAll("ind_carouselOverlapContainer",`ind_carouselOverlapContainer_${e}`).replaceAll("setImagesCarouselOverLap",`setImagesCarouselOverLap_${e}`).replaceAll("shiftRight",`shiftRight_${e}`).replaceAll("shiftLeft",`shiftLeft_${e}`).replaceAll("currentSlide",`currentSlide_${e}`).replaceAll("setNewInterval",`setNewInterval_${e}`).replaceAll("newSlide",`newSlide_${e}`).replaceAll("showSlides",`showSlides_${e}`)}},lt=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=E.searchInAppWithInAppId(r);if(n&&e.action){const t=new v(n),r=new h(e.action);if(t.properties.setAction(r),k.onClickAction(r),t){k.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 at(JSON.parse(t));if(e){const t=ct.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)}}}}},{Log:ht,ErrorUtils:ft,CommonUtils:dt}=r(315).Core.Utils,pt="[IND]ShowInAppUtils: ";class Et{static async inAppWasShown(t,e,r,n,i){const o=new ht(pt);t.schema.code&&this.inAppWasGot(t.schema.code,null,e,(t=>{dt.isFunction(i)&&i(t)}),(()=>{dt.isFunction(i)&&i(t)}),((t,e)=>{o.d("inAppWasShown: "+t.inAppId+" with error: "+e.errorMessage).writeLog()}),r,n)}static inAppWasGot(t,e,r,n,i,o,s,a){const u=E.searchInApp(t),c=(new Date).getTime();if(null!=u){const t=new v(u);if(c<new Date(t.expiredDate).getTime()){const r=this.wasInAppPassedFilterProperties(t);null!=r?(r==l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER&&dt.isFunction(o)&&o(t,ft.showError(l,l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER)),r==l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES&&dt.isFunction(s)&&s(t,ft.showError(l,l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES)),r==l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES&&dt.isFunction(a)&&a(t,ft.showError(l,l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES))):dt.isFunction(n)&&n(t,e)}else dt.isFunction(r)&&r(t,ft.showError(l,l.ErrorCode.INAPP_WAS_EXPIRED)),Et.updateInAppGet(t.schema.code,o,s,a,(t=>{dt.isFunction(n)&&n(t,e)}),(t=>{new ht(pt).e(t).writeLog()}))}else dt.isFunction(i)&&i(t,e)}static wasInAppPassedFilterProperties(t){if(t.properties.dismissForever&&t.inAppShow.wasDismissed)return l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER;{t.properties.dismissForever&&k.addNewInApptoDismissForever(t);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 l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES;E.addInAppNewShow(t)}if(n>0&&null!=i&&i>=n)return l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES}return null}static updateInAppGet(t,e,r,n,i,o){At.getInAppWithUpdate(t,!0,(t=>{const o=E.updateInApp(t),s=this.wasInAppPassedFilterProperties(o);if(null!=s)return s==l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER&&dt.isFunction(e)&&e(t,ft.showError(l,l.ErrorCode.INAPP_WAS_DISMISSED_FOREVER)),s==l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES&&dt.isFunction(r)&&r(t,ft.showError(l,l.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES)),void(s==l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES&&dt.isFunction(n)&&n(t,ft.showError(l,l.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES)));dt.isFunction(i)&&i(o)}),(t=>{dt.isFunction(o)&&o(t)}))}}const yt=Et,{BaseApplicationRequest:vt}=r(315).Core.Api,gt=class extends vt{constructor(){super(["inApp"])}},{BaseApplicationRequest:mt}=r(315).Core.Api,It=class extends mt{constructor(){super(),this.PARAM_LAST_SYNC="lastSync"}getAudiences(){return this.params=this.createQueryString(),this}createQueryString(){let t="";return e.getDeviceId()&&(t+=`${this.PARAM_DEVICE_ID}=${e.getDeviceId()}&`),e.getAudienceLastUpdate()&&(t+=`${this.PARAM_LAST_SYNC}=${encodeURIComponent(e.getAudienceLastUpdate())}&`),e.getExternalId()&&(t+=`${this.PARAM_EXTERNAL_CODE}=${e.getExternalId()}`),t}},{ErrorUtils:_t,CommonUtils:bt,LogLevel:St,Log:Ot}=r(315).Core.Utils;class Pt{constructor(){this.LogLevel=St,this.inAppIndigitallInterface=lt}static async init(t,r,n){null!=t.appKey&&await e.setAppKey(t.appKey),t.urlInAppApi&&e.setUrlInappApi(t.urlInAppApi),e.setAvoidCypher(!!t.avoidCypher),e.setAvoidAction(!!t.avoidAction),t.logLevel&&e.setLogLevel(t.logLevel),!0===t.requestLocation&&k.registerLocation(),et.getApplicationWithInAppChannel(new gt,(t=>{W.isAudienceCacheFinish()?et.getAudiences(new It,(e=>{W.saveAudienceCache(t.audienceCacheDeviceTtl),bt.isFunction(r)&&r(t)}),(e=>{const n=new Ot("[IND]InAppIndigitall: .init");e&&e.errorMessage&&n.e(e.errorMessage).writeLog(),bt.isFunction(r)&&r(t)})):bt.isFunction(r)&&r(t)}),n)}static async showInApp(t,r,n,i){const o={appKey:e.getAppKey(),urlInAppApi:"https://device-api.indigitall.com/v2",requestLocation:!0,logLevel:St.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,h,f){await this.init(t,(d=>{s.isAppKeyFormat()?yt.inAppWasGot(t.inAppCode,t.viewId,r,(async(t,r)=>{t&&t.properties&&this.createInApp(t,r,a,u,c,e,h,f)}),((t,r)=>{this.drawInApp(t,r,e,a,u,c,h,f)}),o,n,i):bt.isFunction(c)&&c(_t.showError(l,l.ErrorCode.BAD_REQUEST_SERVER_ERROR))}),c)}static showMultipleInApp(t,r,n,i){const o={appKey:e.getAppKey(),urlInAppApi:"https://device-api.indigitall.com/v2",requestLocation:!0,logLevel:St.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,h,f){await this.init(t,(d=>{if(s.isAppKeyFormat()){if(t.inAppCodeList.length==t.divList.length&&t.inAppCodeList.length>0)for(var p=0;p<t.inAppCodeList.length;p++)yt.inAppWasGot(t.inAppCodeList[p],t.divList[p],r,(async(t,r)=>{t&&t.properties&&this.createInApp(t,r,a,u,c,e,h,f)}),((t,r)=>{Pt.drawInApp(t,r,e,a,u,c,h,f)}),o,n,i)}else bt.isFunction(c)&&c(_t.showError(l,l.ErrorCode.BAD_REQUEST_SERVER_ERROR))}),c)}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);let c=await u.text();null!=t.customData&&Object.keys(t.customData).forEach((function(e){c=c.replaceAll(`{{${e}}}`,t.customData[e])})),t.version&&(c=c.replaceAll("'inappVersion':'{{version}}'","'inappVersion':"+t.version));const l=e.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,""),h=ct.editingFormHtml(c,l);if(i.innerHTML=h,"undefined"===document.getElementById(`script_${l}`)||null===document.getElementById(`script_${l}`)){const t=document.createElement("script");t.id=`script_${l}`,t.type="text/javascript",t.innerHTML=new it(e,l).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),bt.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}bt.isFunction(n)&&n(t,i),A.sendEventPrint(t)}}catch(r){let n=null;t&&t.schema&&t.schema.code&&(n=t.schema.code),bt.isFunction(i)&&i(r,e,n)}}static topicsList(t,e){return V.listTopics(t,e),!0}static topicsSubscribe(t,e,r){V.saveTopics(t,e,r)}static topicsUnsubscribe(t,e,r){V.deleteTopics(t,e,r)}static inAppGet(t,e,r){this.getInApp(t,e,r)}static getInApp(t,e,r){this.getInAppWithUpdate(t,!1,e,r)}static getInAppWithUpdate(t,e,r,n){if(s.isAppKeyFormat()){const i=new nt;i.setTag(t),i.setUpdateInApp(e),et.getCampaignTag(i,r,n)}else bt.isFunction(n)&&n(_t.showError(l,l.ErrorCode.BAD_REQUEST_SERVER_ERROR))}static addNewInAppToDismissForever(t){k.addNewInApptoDismissForever(t)}static async isInAppDismissForever(t){k.isInAppDismissForever(t)}static async inAppOnClick(t){lt.onClick(t)}static async inAppSubmit(t,e,r){lt.submit(t,e,r)}static async inAppWasShown(t,e,r,n,i){yt.inAppWasShown(t,e,r,n,i)}static async downloadHTML(t){const e=await fetch(t,{method:"GET"});console.log(e)}static async setExternalCode(t,e,r){try{const r=await k.setExternalCode(t);e&&e(r)}catch(t){r&&r(t)}}static async logIn(t,e,r){await this.setExternalCode(t,e,r)}static async logOut(t,e){await this.setExternalCode(null,t,e)}}const At=Pt;window.indigitall||(window.indigitall={}),window.indigitall.InApp=Pt,window.indigitall.InApp.version=e.getVersion(),window.indigitall.InApp.Utils=k,window.indigitall.LogLevel=St})(),n})(),t.exports=e()},326:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&{}.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(126));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]}}))}))},114:function(t){var e;e=()=>(()=>{var t={710:function(t){var e;e=()=>(()=>{"use strict";var t={330:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.9.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={};r.r(n),r.d(n,{default:()=>Y});var i={};r.r(i),r.d(i,{BaseApplicationRequest:()=>P,BaseClient:()=>S,BaseRequest:()=>O});var o={};r.r(o),r.d(o,{Channel:()=>A,CoreApplication:()=>L,Device:()=>R,DeviceStatus:()=>T,ErrorDictionary:()=>_,ErrorModel:()=>I,EventType:()=>w,TopicSubscribeType:()=>N});var s={};r.r(s),r.d(s,{CommonUtils:()=>C,CorePermissions:()=>D,CryptoUtils:()=>B,ErrorUtils:()=>b,JsonUtils:()=>U,Log:()=>m,LogLevel:()=>y,TopicUtils:()=>j,Validations:()=>V});var a={platform:"webpush",version:"0.0.1"};const u=r(330);a.version=u.version;const c=a=Object.assign(a,{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"}}),l=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!==l.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()}},h=l,f=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}}},d=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!==d.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")}},p=d,E=class{constructor(){this.storage=h,this.db=f,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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"}setItemSessionStorage(t,e){p.setItem(t,e)}getItemSessionStorage(t){return p.getItem(t)}clearSessionStorage(){p.clearMessages()}setStorage(t,e){h.setItem(t,e)}getStorage(t){return h.getItem(t)}clearStorage(){h.clear()}setBrowserPublicKey(t){h.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return h.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){h.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return h.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){h.setItem(this.APP_KEY,t),f&&f.IDB&&await f.setItem(this.APP_KEY,t)}getAppKey(){return h.getItem(this.APP_KEY)}async setDeviceId(t){this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,t),this.db&&this.db.IDB&&await this.db.setItem(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}async getAppKeySync(){if(f&&f.IDB)return await f.getItem(this.APP_KEY)}setVAPID(t){h.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return h.getItem(this.VAPID_PUBLIC)}setEnabled(t){h.setItem(this.ENABLED,t)}getEnabled(){return h.getItem(this.ENABLED)}setServiceSyncTime(t){h.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return h.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){h.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return h.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){h.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return h.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){h.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!h&&h.getItem(this.REQUEST_LOCATION)}async setPlatform(t){h.setItem(this.PLATFORM,t)}getPlatform(){return h&&h.getItem(this.PLATFORM)||c.platform}getVersion(){return c.version}async setBrowserName(t){h.setItem(this.BROWSER_NAME,t)}getBrowserName(){return h.getItem(this.BROWSER_NAME)}setBrowserVersion(t){h.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return h.getItem(this.BROWSER_VERSION)}async setOsName(t){h.setItem(this.OS_NAME,t)}getOsName(){return h.getItem(this.OS_NAME)}setOsVersion(t){h.setItem(this.OS_VERSION,t)}getOsVersion(){return h.getItem(this.OS_VERSION)}setDeviceType(t){h.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return h.getItem(this.DEVICE_TYPE)}setSupported(t){h.setItem(this.SUPPORTED,t)}getSupported(){return h.getItem(this.SUPPORTED)}setServiceTimestamp(t){h.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return h.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){h.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return h.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){h.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return h.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){h.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==h.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){h.setItem(this.LOG_LEVEL,t)}getLogLevel(){return h.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){h.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return h.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){h&&h.isLocalStorageAvailable()&&h.setItem(this.EXTERNAL_ID,t),f&&f.IDB&&await f.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{h&&h.isLocalStorageAvailable()?t=h.getItem(this.EXTERNAL_ID):f&&f.IDB&&(t=await f.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){h.setItem(this.EXTERNAL_ID,t)}getExternalId(){return h.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return h.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){h.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){h.setItem(this.LATITUDE,t)}getLatitude(){return h.getItem(this.LATITUDE)}setLongitude(t){h.setItem(this.LONGITUDE,t)}getLongitude(){return h.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}setAvoidCypher(t){this.setStorage(this.AVOID_CYPHER,t)}isAvoidCypher(){return this.getStorage(this.AVOID_CYPHER)}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)}setPushDisabled(t){this.setStorage(this.PUSH_DISABLED,t)}isPushDisabled(){return this.getStorage(this.PUSH_DISABLED)}getConfigV2ServiceSyncTime(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}setConfigV2ServiceSyncTime(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}getConfigV2(){return this.getStorage(this.CONFIG_V2)}setConfigV2(t){this.setStorage(this.CONFIG_V2,t)}getMaintenanceEnd(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}setMaintenanceEnd(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}getMaintenanceStart(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}setMaintenanceStart(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}},y=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),v=y;class g{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=v.INFO,this.setLogLevel((new E).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=v.DEBUG&&t<=v.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=v.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}i(){if(this.level<=v.INFO)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}w(){if(this.level<=v.WARNING)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}e(){if(this.level<=v.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const m=g,I=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=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"}},b=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);if(n>=0){const e=Object.keys(t.ErrorCode)[n],i=Object.values(t.ErrorCode)[n];return new I({code:e,errorId:i},Object.values(t.ErrorMessage)[n],r)}return new I(_.ErrorCode.GENERAL_ERROR,"general error",r)}}},S=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 m("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(v.DEBUG);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);if(304!=e.status){const 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 I(n.statusCode,n.message))}return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+e.status+"\n").writeLog(),e}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(),b.showError(_,_.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)}},O=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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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_INITIAL_STATUS="initialStatus",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 E).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}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},P=class extends O{constructor(t=null){super(),this.PARAM_APPLICATION_CHANNEL="channel",this.channels=t}getApplicationRequest(){return this.params=this.createQueryString(),this}createQueryString(){let t="";if(this.channels&&this.channels.length>0)for(let e=0;e<this.channels.length;e++)t+=`${this.PARAM_APPLICATION_CHANNEL}=${this.channels[e].toLowerCase()}&`;return t+=`${this.PARAM_PLATFORM}=webpush`,t}},A=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"}),R=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new E).getBrowserPublicKey(),this.browserPrivateKey=(new E).getBrowserPrivateKey(),this.platform=(new E).getPlatform(),this.version=(new E).getVersion(),this.browserName=(new E).getBrowserName(),this.browserVersion=(new E).getBrowserVersion(),this.osName=(new E).getOsName(),this.osVersion=(new E).getOsVersion(),this.deviceId=(new E).getDeviceId(),this.deviceType=(new E).getDeviceType(),(new E).getEnabled()&&(this.enabled="true"===(new E).getEnabled()),(new E).getExternalId()&&(this.externalCode=(new E).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new E).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new E).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}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.deviceId&&(t.deviceId=this.deviceId),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}},T=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=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"}),N=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),L=class{constructor(t,e=!1){const r=new E;if(null!=t){r.setConfigV2(JSON.stringify(t)),t.contentAvailable&&(this.contentAvailable=t.contentAvailable),t.locationAccuracy&&(this.locationAccuracy=t.locationAccuracy),t.locationDistance&&(this.locationDistance=t.locationDistance),t.locationEnabled&&(this.locationEnabled=t.locationEnabled),t.locationUpdateMinutes&&(this.locationUpdateMinutes=t.locationUpdateMinutes),t.maintenanceWindow&&(this.maintenanceWindow=t.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,r.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,r.setMaintenanceEnd(this.maintenanceWindow.end))),t.networkEventsEnabled&&(this.networkEventsEnabled=t.networkEventsEnabled),t.networkUpdateMinutes&&(this.networkUpdateMinutes=t.networkUpdateMinutes);let n=Date.now();if(t.serviceSyncTime?(this.serviceSyncTime=t.serviceSyncTime,n=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):n=new Date(Date.now()+36e5),!e){const t=n.toString();new m("[IND]CoreApplication").d("ServiceSyncTime defined on: "+t).writeLog(),r.setConfigV2ServiceSyncTime(t)}}}},C=class{static isServiceTimestampExceed(){return!(new E).getServiceTimestamp()||(new E).getServiceSyncTime()<=(Date.now()-(new E).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},D=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 m("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},M=new m("[IND]Crypto"),k=new TextEncoder("utf-8"),x="HMAC",B=class{static async createHmac(t,e){try{let r="";if(!0===(new E).isAvoidCypher())r=e;else{const n=window?.crypto?.subtle;if(!n)return;const i=await n.importKey("raw",k.encode(t),{name:x,hash:{name:"SHA-256"}},!1,["sign","verify"]),o=await n.sign(x,i,k.encode(e)),s=new Uint8Array(o);r=Array.prototype.map.call(s,(t=>("00"+t.toString(16)).slice(-2))).join(""),M.d("hmac: ",r).writeLog()}return r}catch(t){return void M.e("error:",t).writeLog()}}},U=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}},V=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},j=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},Y={Repository:E,Config:c,Api:i,Models:o,Utils:s};return n})(),t.exports=e()},315:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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(710));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(610))&&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)}},468:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(254)),i=u(r(234)),o=u(r(457)),s=u(r(735)),a=u(r(630));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="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},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var u=d(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==c(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,u,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(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){h(o,n,i,s,a,"next",t)}function a(t){h(o,n,i,s,a,"throw",t)}s(void 0)}))}}function d(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,p(n.key),n)}}function p(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}var E=function(){return t=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"},e=[{key:"getURL",value:(E=f(l().mark((function t(){return l().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 E.apply(this,arguments)})},{key:"call",value:(p=f(l().mark((function t(e,r,u,c){var h,f,d,p,E;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return h=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&h.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),f=t.t2+t.t3,u.isJourneyRequest()&&(f=f.replace("v1","v2")),d={method:e,headers:u.addHeaders()},e!==this.GET&&(d.body=JSON.stringify(u.getBody())),c&&(d.credentials=c),t.prev=13,t.next=16,fetch(f,d);case 16:if(304==(p=t.sent).status){t.next=28;break}return t.next=20,p.json();case 20:if(E=t.sent,!p.ok){t.next=24;break}return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\nResponse Body:",JSON.stringify(E.data,null,"\t")).writeLog(),t.abrupt("return",E);case 24:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\n").writeLog(),t.abrupt("return",new i.default(E.statusCode,E.message));case 28:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.status+"\n").writeLog(),t.abrupt("return",p);case 30:t.next=36;break;case 32:return t.prev=32,t.t4=t.catch(13),h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 36:case"end":return t.stop()}}),t,this,[[13,32]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(h=f(l().mark((function t(e,r){return l().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 h.apply(this,arguments)})},{key:"post",value:(c=f(l().mark((function t(e,r,n){return l().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 c.apply(this,arguments)})},{key:"put",value:(u=f(l().mark((function t(e,r,n){return l().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:(r=f(l().mark((function t(e,r){return l().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 r.apply(this,arguments)})}],e&&d(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,u,c,h,p,E}();e.default=E},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseApplicationRequest",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=s(r(468)),i=s(r(237)),o=s(r(773));function s(t){return t&&t.__esModule?t:{default:t}}},773:(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)}var i;function o(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,s(n.key),n)}}function s(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(a=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,a()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e)).PARAM_APPLICATION_CHANNEL="channel",t.channels=r,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(e,t),function(t,e){return e&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"getApplicationRequest",value:function(){return this.params=this.createQueryString(),this}},{key:"createQueryString",value:function(){var t="";if(this.channels&&this.channels.length>0)for(var e=0;e<this.channels.length;e++)t+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[e].toLowerCase(),"&");return t+"".concat(this.PARAM_PLATFORM,"=webpush")}}])}(((i=r(237))&&i.__esModule?i:{default:i}).default);e.default=l},237:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e){return e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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_INITIAL_STATUS="initialStatus",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={}}),[{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:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}]);e.default=u},122:(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(904);n.version=i.version,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=n},610:(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=h(r(122)),o=h(r(291)),s=l(r(545)),a=l(r(225)),u=l(r(628));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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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 h(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"});e.default=r},174:(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=s(r(291)),o=s(r(254));function s(t){return t&&t.__esModule?t:{default: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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}var c=function(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=new i.default;if(null!=e){n.setConfigV2(JSON.stringify(e)),e.contentAvailable&&(this.contentAvailable=e.contentAvailable),e.locationAccuracy&&(this.locationAccuracy=e.locationAccuracy),e.locationDistance&&(this.locationDistance=e.locationDistance),e.locationEnabled&&(this.locationEnabled=e.locationEnabled),e.locationUpdateMinutes&&(this.locationUpdateMinutes=e.locationUpdateMinutes),e.maintenanceWindow&&(this.maintenanceWindow=e.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,n.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,n.setMaintenanceEnd(this.maintenanceWindow.end))),e.networkEventsEnabled&&(this.networkEventsEnabled=e.networkEventsEnabled),e.networkUpdateMinutes&&(this.networkUpdateMinutes=e.networkUpdateMinutes);var s=Date.now();if(e.serviceSyncTime?(this.serviceSyncTime=e.serviceSyncTime,s=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):s=new Date(Date.now()+36e5),!r){var a=s.toString();new o.default("[IND]CoreApplication").d("ServiceSyncTime defined on: "+a).writeLog(),n.setConfigV2ServiceSyncTime(a)}}}));e.default=c},395:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e){return e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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.deviceId=(new i.default).getDeviceId(),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()}),[{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.deviceId&&(t.deviceId=this.deviceId),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}}]);e.default=u},89:(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},735:(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},234:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=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=o},953:(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},72:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},225:(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,"CoreApplication",{enumerable:!0,get:function(){return l.default}}),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}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(902),i=h(r(395)),o=h(r(89)),s=h(r(735)),a=h(r(234)),u=h(r(953)),c=h(r(72)),l=h(r(174));function h(t){return t&&t.__esModule?t:{default:t}}},672:(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 e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==r(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=_,s(P,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.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&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=function(){return t=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},e=[{key:"getDB",value:(c=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 c.apply(this,arguments)})},{key:"get",value:(u=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 u.apply(this,arguments)})},{key:"put",value:(a=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 a.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:(i=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 i.apply(this,arguments)})},{key:"getItem",value:(r=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 r.apply(this,arguments)})}],e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i,a,u,c}();e.default=new u},87:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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()}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=o},291:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(122)),i=a(r(87)),o=a(r(672)),s=a(r(238));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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var c=d(t[i],t,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==u(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 h(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 f(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,d(n.key),n)}}function d(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}var p=function(){return t=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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"},e=[{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:(P=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return P.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"setDeviceId",value:(O=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,e),!this.db||!this.db.IDB){t.next=4;break}return t.next=4,this.db.setItem(this.DEVICE_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return O.apply(this,arguments)})},{key:"getDeviceId",value:function(){return this.getStorage(this.DEVICE_ID)}},{key:"getAppKeySync",value:(S=h(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return S.apply(this,arguments)})},{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:(b=h(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 b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(_=h(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 _.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:(I=h(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 I.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:(m=h(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 m.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:(g=h(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 g.apply(this,arguments)})},{key:"getExternalIdRequest",value:(v=h(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 v.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:"getRegisteredByCookie",value:(y=h(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 y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(E=h(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 E.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)}},{key:"setInAppTopicList",value:(p=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(d=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return d.apply(this,arguments)})},{key:"setTopicList",value:(l=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getTopicList",value:(u=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return u.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}},{key:"setAvoidCypher",value:function(t){this.setStorage(this.AVOID_CYPHER,t)}},{key:"isAvoidCypher",value:function(){return this.getStorage(this.AVOID_CYPHER)}},{key:"getUrlDeviceApi",value:(a=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.storage||!this.storage.isLocalStorageAvailable()){t.next=5;break}e=this.getStorage(this.URL_DEVICE_API),t.next=9;break;case 5:if(!this.db||!this.db.IDB){t.next=9;break}return t.next=8,this.db.getItem(this.URL_DEVICE_API);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 a.apply(this,arguments)})},{key:"setUrlDeviceApi",value:(r=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,e),!this.db||!this.db.IDB){t.next=4;break}return t.next=4,this.db.setItem(this.URL_DEVICE_API,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"setPushDisabled",value:function(t){this.setStorage(this.PUSH_DISABLED,t)}},{key:"isPushDisabled",value:function(){return this.getStorage(this.PUSH_DISABLED)}},{key:"getConfigV2ServiceSyncTime",value:function(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}},{key:"setConfigV2ServiceSyncTime",value:function(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}},{key:"getConfigV2",value:function(){return this.getStorage(this.CONFIG_V2)}},{key:"setConfigV2",value:function(t){this.setStorage(this.CONFIG_V2,t)}},{key:"getMaintenanceEnd",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}},{key:"setMaintenanceEnd",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}},{key:"getMaintenanceStart",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}},{key:"setMaintenanceStart",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}}],e&&f(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,a,u,l,d,p,E,y,v,g,m,I,_,b,S,O,P}();e.default=p},238:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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")}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=o},622:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e,r){return r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{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)}}]);e.default=u},429:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(254))&&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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,l(n.key),n)}}function l(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var h=function(){return function(t,e,r){return r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{key:"getPermissions",value:(n=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 n.apply(this,arguments)})},{key:"getPermission",value:(r=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 r.apply(this,arguments)})},{key:"setPermissionsCallback",value:(e=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 e.apply(this,arguments)})},{key:"setCallback",value:(t=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(e,r){return t.apply(this,arguments)})}]);var t,e,r,n}();e.default=h},170:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var n=i(r(291));function i(t){return t&&t.__esModule?t:{default:t}}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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,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,c(n.key),n)}}function c(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var l=new(i(r(254)).default)("[IND]Crypto"),h=new TextEncoder("utf-8"),f="HMAC",d=e.CryptoUtils=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"createHmac",value:(r=s().mark((function t(e,r){var i,o,a,u,c,d;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i="",!0!==(new n.default).isAvoidCypher()){t.next=6;break}i=r,t.next=18;break;case 6:if(a=null===(o=window)||void 0===o||null===(o=o.crypto)||void 0===o?void 0:o.subtle){t.next=9;break}return t.abrupt("return");case 9:return t.next=11,a.importKey("raw",h.encode(e),{name:f,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 11:return u=t.sent,t.next=14,a.sign(f,u,h.encode(r));case 14:c=t.sent,d=new Uint8Array(c),i=Array.prototype.map.call(d,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),l.d("hmac: ",i).writeLog();case 18:return t.abrupt("return",i);case 21:return t.prev=21,t.t0=t.catch(0),l.e("error:",t.t0).writeLog(),t.abrupt("return");case 25:case"end":return t.stop()}}),t,null,[[0,21]])})),i=function(){var t=this,e=arguments;return new Promise((function(n,i){var o=r.apply(t,e);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(t,e){return i.apply(this,arguments)})}],e&&u(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i}();e.default=d},457:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(735)),i=o(r(234));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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var c=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},(e=[{key:"showError",value:function(t,e,r){if(null!=t){var o=Object.values(t.ErrorCode).indexOf(e);if(o>=0){var s={code:Object.keys(t.ErrorCode)[o],errorId:Object.values(t.ErrorCode)[o]};return new i.default(s,Object.values(t.ErrorMessage)[o],r)}return new i.default(n.default.ErrorCode.GENERAL_ERROR,"general error",r)}}}])&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=new c},325:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{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}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},254:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(291)),i=o(r(630));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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var c=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=[]}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}),e;var e,r,o}();e.default=c},630:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},662:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},332:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},628:(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,"TopicUtils",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(622)),i=f(r(429)),o=f(r(170)),s=f(r(457)),a=f(r(325)),u=f(r(254)),c=r(630),l=f(r(332)),h=f(r(662));function f(t){return t&&t.__esModule?t:{default:t}}},904:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.9.2","_id":"indigitall-web-core@4.9.2","_inBundle":false,"_integrity":"sha512-aGTfAnLDU6FrokX4B7XvAWEX2Obl/hlcz9OTPFOI/yQIwIKpjfZJ1BEVeCWvDiSEAYhLek73ppnFdV66cUxcGA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.9.2","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.9.2","saveSpec":null,"fetchSpec":"4.9.2"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.9.2.tgz","_shasum":"710cb6aaf9858cce437e850a450c7fc81cf71a03","_spec":"indigitall-web-core@4.9.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.9.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:()=>C});const{Repository:t}=r(315).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(315).Core.Api,{Config:s}=r(315).Core,{ErrorModel:a}=r(315).Core.Models,{CommonUtils:u}=r(315).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 C(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(315).Core.Api,h=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}},f=Object.freeze({SENT:"sent",CLICK:"click",DELETED:"deleted"});window.inboxStatus=f;const d=f,p=Object.freeze({NONE:"none",DEFAULT:"default",WEBHOOK:"webhook"}),{BaseRequest:E}=r(315).Core.Api,y=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()),this.sendingId="",this.sendingIds=null,this.page=0,this.pageSize=0,this.dateFrom="",this.dateTo="",this.status=d.INBOXSTATUS_SENT,this.initialStatus=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_EXTERNAL_ID+"="+this.externalId}createBodyJson(){let t={};const e=[];try{if(t=this.createBodyStatusJson(),null!=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),this.initialStatus&&(t.initialStatus=this.initialStatus),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}setInitialStatus(t){this.initialStatus=t}setStatusList(t){this.statusList=t}},{BaseRequest:v}=r(315).Core.Api,g=class extends v{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_EXTERNAL_ID+"="+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(315).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 S=_.ErrorMessage;Object.assign(S,{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 O={ErrorCode:b,ErrorMessage:S},{Validations:P,Log:A}=r(315).Core.Utils,R=class extends P{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new A("[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:w,Log:N}=r(315).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),this.count=0,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 h;n.setJson(r),c.postInboxAuth(n,t,e)}static getMessagesCountWithAuth(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(w.showError(O,O.ErrorCode.INBOX_GET_ERROR));else T.isFunction(r)&&r(w.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}static getInboxWithAuth(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 getInboxWithPageAuth(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 y;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(w.showError(O,O.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(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(a)&&a(w.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}getNextPage(t,r){const n=new N("[IND]Inbox: ");if(this.isRequestingPage)n.w(O.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 y;(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(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(r)&&r(w.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST));else this.isRequestingPage=!1,T.isFunction(r)&&r(w.showError(O,O.ErrorCode.INBOX_NO_MESSAGES))}massiveEditNotifications(t,e,r,n){let i=d.SENT;e==d.CLICK&&(i=d.SENT),e==d.DELETED&&(i=d.CLICK),this.massiveEditNotifications(t,i,e,r,n)}massiveEditNotificationsWithInitialStatus(t,r,n,i,o){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(n){const e=new y;null!=t&&e.setSendingIds(t),e.setStatus(n),e.setInitialStatus(r),c.putInboxPush(e,i,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPush(e,i,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(o)&&o(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(o)&&o(w.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}getInfoFromNotification(t,r,n){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t){const e=new y;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(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(n)&&n(w.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}modifyStatusFromNotification(t,r,n,i){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t&&r){const e=new y;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(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(i)&&i(w.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}}const C=L})(),n})(),t.exports=e()},824:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&{}.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(114));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]}}))}))},603:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&{}.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(93));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]}}))}))},93:function(t){var e;e=()=>(()=>{var t={710:function(t){var e;e=()=>(()=>{"use strict";var t={330:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.9.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={};r.r(n),r.d(n,{default:()=>Y});var i={};r.r(i),r.d(i,{BaseApplicationRequest:()=>P,BaseClient:()=>S,BaseRequest:()=>O});var o={};r.r(o),r.d(o,{Channel:()=>A,CoreApplication:()=>L,Device:()=>R,DeviceStatus:()=>T,ErrorDictionary:()=>_,ErrorModel:()=>I,EventType:()=>w,TopicSubscribeType:()=>N});var s={};r.r(s),r.d(s,{CommonUtils:()=>C,CorePermissions:()=>D,CryptoUtils:()=>B,ErrorUtils:()=>b,JsonUtils:()=>U,Log:()=>m,LogLevel:()=>y,TopicUtils:()=>j,Validations:()=>V});var a={platform:"webpush",version:"0.0.1"};const u=r(330);a.version=u.version;const c=a=Object.assign(a,{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"}}),l=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!==l.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()}},h=l,f=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}}},d=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!==d.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")}},p=d,E=class{constructor(){this.storage=h,this.db=f,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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"}setItemSessionStorage(t,e){p.setItem(t,e)}getItemSessionStorage(t){return p.getItem(t)}clearSessionStorage(){p.clearMessages()}setStorage(t,e){h.setItem(t,e)}getStorage(t){return h.getItem(t)}clearStorage(){h.clear()}setBrowserPublicKey(t){h.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return h.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){h.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return h.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){h.setItem(this.APP_KEY,t),f&&f.IDB&&await f.setItem(this.APP_KEY,t)}getAppKey(){return h.getItem(this.APP_KEY)}async setDeviceId(t){this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,t),this.db&&this.db.IDB&&await this.db.setItem(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}async getAppKeySync(){if(f&&f.IDB)return await f.getItem(this.APP_KEY)}setVAPID(t){h.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return h.getItem(this.VAPID_PUBLIC)}setEnabled(t){h.setItem(this.ENABLED,t)}getEnabled(){return h.getItem(this.ENABLED)}setServiceSyncTime(t){h.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return h.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){h.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return h.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){h.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return h.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){h.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!h&&h.getItem(this.REQUEST_LOCATION)}async setPlatform(t){h.setItem(this.PLATFORM,t)}getPlatform(){return h&&h.getItem(this.PLATFORM)||c.platform}getVersion(){return c.version}async setBrowserName(t){h.setItem(this.BROWSER_NAME,t)}getBrowserName(){return h.getItem(this.BROWSER_NAME)}setBrowserVersion(t){h.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return h.getItem(this.BROWSER_VERSION)}async setOsName(t){h.setItem(this.OS_NAME,t)}getOsName(){return h.getItem(this.OS_NAME)}setOsVersion(t){h.setItem(this.OS_VERSION,t)}getOsVersion(){return h.getItem(this.OS_VERSION)}setDeviceType(t){h.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return h.getItem(this.DEVICE_TYPE)}setSupported(t){h.setItem(this.SUPPORTED,t)}getSupported(){return h.getItem(this.SUPPORTED)}setServiceTimestamp(t){h.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return h.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){h.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return h.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){h.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return h.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){h.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==h.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){h.setItem(this.LOG_LEVEL,t)}getLogLevel(){return h.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){h.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return h.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){h&&h.isLocalStorageAvailable()&&h.setItem(this.EXTERNAL_ID,t),f&&f.IDB&&await f.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{h&&h.isLocalStorageAvailable()?t=h.getItem(this.EXTERNAL_ID):f&&f.IDB&&(t=await f.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){h.setItem(this.EXTERNAL_ID,t)}getExternalId(){return h.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return h.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){h.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){h.setItem(this.LATITUDE,t)}getLatitude(){return h.getItem(this.LATITUDE)}setLongitude(t){h.setItem(this.LONGITUDE,t)}getLongitude(){return h.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}setAvoidCypher(t){this.setStorage(this.AVOID_CYPHER,t)}isAvoidCypher(){return this.getStorage(this.AVOID_CYPHER)}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)}setPushDisabled(t){this.setStorage(this.PUSH_DISABLED,t)}isPushDisabled(){return this.getStorage(this.PUSH_DISABLED)}getConfigV2ServiceSyncTime(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}setConfigV2ServiceSyncTime(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}getConfigV2(){return this.getStorage(this.CONFIG_V2)}setConfigV2(t){this.setStorage(this.CONFIG_V2,t)}getMaintenanceEnd(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}setMaintenanceEnd(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}getMaintenanceStart(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}setMaintenanceStart(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}},y=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),v=y;class g{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=v.INFO,this.setLogLevel((new E).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=v.DEBUG&&t<=v.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=v.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}i(){if(this.level<=v.INFO)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}w(){if(this.level<=v.WARNING)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}e(){if(this.level<=v.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const m=g,I=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=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"}},b=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);if(n>=0){const e=Object.keys(t.ErrorCode)[n],i=Object.values(t.ErrorCode)[n];return new I({code:e,errorId:i},Object.values(t.ErrorMessage)[n],r)}return new I(_.ErrorCode.GENERAL_ERROR,"general error",r)}}},S=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 m("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(v.DEBUG);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);if(304!=e.status){const 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 I(n.statusCode,n.message))}return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+e.status+"\n").writeLog(),e}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(),b.showError(_,_.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)}},O=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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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_INITIAL_STATUS="initialStatus",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 E).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}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},P=class extends O{constructor(t=null){super(),this.PARAM_APPLICATION_CHANNEL="channel",this.channels=t}getApplicationRequest(){return this.params=this.createQueryString(),this}createQueryString(){let t="";if(this.channels&&this.channels.length>0)for(let e=0;e<this.channels.length;e++)t+=`${this.PARAM_APPLICATION_CHANNEL}=${this.channels[e].toLowerCase()}&`;return t+=`${this.PARAM_PLATFORM}=webpush`,t}},A=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"}),R=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new E).getBrowserPublicKey(),this.browserPrivateKey=(new E).getBrowserPrivateKey(),this.platform=(new E).getPlatform(),this.version=(new E).getVersion(),this.browserName=(new E).getBrowserName(),this.browserVersion=(new E).getBrowserVersion(),this.osName=(new E).getOsName(),this.osVersion=(new E).getOsVersion(),this.deviceId=(new E).getDeviceId(),this.deviceType=(new E).getDeviceType(),(new E).getEnabled()&&(this.enabled="true"===(new E).getEnabled()),(new E).getExternalId()&&(this.externalCode=(new E).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new E).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new E).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}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.deviceId&&(t.deviceId=this.deviceId),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}},T=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=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"}),N=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),L=class{constructor(t,e=!1){const r=new E;if(null!=t){r.setConfigV2(JSON.stringify(t)),t.contentAvailable&&(this.contentAvailable=t.contentAvailable),t.locationAccuracy&&(this.locationAccuracy=t.locationAccuracy),t.locationDistance&&(this.locationDistance=t.locationDistance),t.locationEnabled&&(this.locationEnabled=t.locationEnabled),t.locationUpdateMinutes&&(this.locationUpdateMinutes=t.locationUpdateMinutes),t.maintenanceWindow&&(this.maintenanceWindow=t.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,r.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,r.setMaintenanceEnd(this.maintenanceWindow.end))),t.networkEventsEnabled&&(this.networkEventsEnabled=t.networkEventsEnabled),t.networkUpdateMinutes&&(this.networkUpdateMinutes=t.networkUpdateMinutes);let n=Date.now();if(t.serviceSyncTime?(this.serviceSyncTime=t.serviceSyncTime,n=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):n=new Date(Date.now()+36e5),!e){const t=n.toString();new m("[IND]CoreApplication").d("ServiceSyncTime defined on: "+t).writeLog(),r.setConfigV2ServiceSyncTime(t)}}}},C=class{static isServiceTimestampExceed(){return!(new E).getServiceTimestamp()||(new E).getServiceSyncTime()<=(Date.now()-(new E).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},D=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 m("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},M=new m("[IND]Crypto"),k=new TextEncoder("utf-8"),x="HMAC",B=class{static async createHmac(t,e){try{let r="";if(!0===(new E).isAvoidCypher())r=e;else{const n=window?.crypto?.subtle;if(!n)return;const i=await n.importKey("raw",k.encode(t),{name:x,hash:{name:"SHA-256"}},!1,["sign","verify"]),o=await n.sign(x,i,k.encode(e)),s=new Uint8Array(o);r=Array.prototype.map.call(s,(t=>("00"+t.toString(16)).slice(-2))).join(""),M.d("hmac: ",r).writeLog()}return r}catch(t){return void M.e("error:",t).writeLog()}}},U=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}},V=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},j=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},Y={Repository:E,Config:c,Api:i,Models:o,Utils:s};return n})(),t.exports=e()},315:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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(710));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(610))&&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)}},468:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(254)),i=u(r(234)),o=u(r(457)),s=u(r(735)),a=u(r(630));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="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},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var u=d(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==c(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,u,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(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){h(o,n,i,s,a,"next",t)}function a(t){h(o,n,i,s,a,"throw",t)}s(void 0)}))}}function d(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,p(n.key),n)}}function p(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}var E=function(){return t=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"},e=[{key:"getURL",value:(E=f(l().mark((function t(){return l().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 E.apply(this,arguments)})},{key:"call",value:(p=f(l().mark((function t(e,r,u,c){var h,f,d,p,E;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return h=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&h.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),f=t.t2+t.t3,u.isJourneyRequest()&&(f=f.replace("v1","v2")),d={method:e,headers:u.addHeaders()},e!==this.GET&&(d.body=JSON.stringify(u.getBody())),c&&(d.credentials=c),t.prev=13,t.next=16,fetch(f,d);case 16:if(304==(p=t.sent).status){t.next=28;break}return t.next=20,p.json();case 20:if(E=t.sent,!p.ok){t.next=24;break}return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\nResponse Body:",JSON.stringify(E.data,null,"\t")).writeLog(),t.abrupt("return",E);case 24:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\n").writeLog(),t.abrupt("return",new i.default(E.statusCode,E.message));case 28:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.status+"\n").writeLog(),t.abrupt("return",p);case 30:t.next=36;break;case 32:return t.prev=32,t.t4=t.catch(13),h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 36:case"end":return t.stop()}}),t,this,[[13,32]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(h=f(l().mark((function t(e,r){return l().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 h.apply(this,arguments)})},{key:"post",value:(c=f(l().mark((function t(e,r,n){return l().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 c.apply(this,arguments)})},{key:"put",value:(u=f(l().mark((function t(e,r,n){return l().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:(r=f(l().mark((function t(e,r){return l().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 r.apply(this,arguments)})}],e&&d(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,u,c,h,p,E}();e.default=E},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseApplicationRequest",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=s(r(468)),i=s(r(237)),o=s(r(773));function s(t){return t&&t.__esModule?t:{default:t}}},773:(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)}var i;function o(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,s(n.key),n)}}function s(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(a=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,a()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e)).PARAM_APPLICATION_CHANNEL="channel",t.channels=r,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(e,t),function(t,e){return e&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"getApplicationRequest",value:function(){return this.params=this.createQueryString(),this}},{key:"createQueryString",value:function(){var t="";if(this.channels&&this.channels.length>0)for(var e=0;e<this.channels.length;e++)t+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[e].toLowerCase(),"&");return t+"".concat(this.PARAM_PLATFORM,"=webpush")}}])}(((i=r(237))&&i.__esModule?i:{default:i}).default);e.default=l},237:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e){return e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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_INITIAL_STATUS="initialStatus",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={}}),[{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:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}]);e.default=u},122:(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(904);n.version=i.version,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=n},610:(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=h(r(122)),o=h(r(291)),s=l(r(545)),a=l(r(225)),u=l(r(628));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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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 h(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"});e.default=r},174:(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=s(r(291)),o=s(r(254));function s(t){return t&&t.__esModule?t:{default: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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}var c=function(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=new i.default;if(null!=e){n.setConfigV2(JSON.stringify(e)),e.contentAvailable&&(this.contentAvailable=e.contentAvailable),e.locationAccuracy&&(this.locationAccuracy=e.locationAccuracy),e.locationDistance&&(this.locationDistance=e.locationDistance),e.locationEnabled&&(this.locationEnabled=e.locationEnabled),e.locationUpdateMinutes&&(this.locationUpdateMinutes=e.locationUpdateMinutes),e.maintenanceWindow&&(this.maintenanceWindow=e.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,n.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,n.setMaintenanceEnd(this.maintenanceWindow.end))),e.networkEventsEnabled&&(this.networkEventsEnabled=e.networkEventsEnabled),e.networkUpdateMinutes&&(this.networkUpdateMinutes=e.networkUpdateMinutes);var s=Date.now();if(e.serviceSyncTime?(this.serviceSyncTime=e.serviceSyncTime,s=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):s=new Date(Date.now()+36e5),!r){var a=s.toString();new o.default("[IND]CoreApplication").d("ServiceSyncTime defined on: "+a).writeLog(),n.setConfigV2ServiceSyncTime(a)}}}));e.default=c},395:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e){return e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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.deviceId=(new i.default).getDeviceId(),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()}),[{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.deviceId&&(t.deviceId=this.deviceId),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}}]);e.default=u},89:(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},735:(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},234:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=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=o},953:(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},72:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},225:(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,"CoreApplication",{enumerable:!0,get:function(){return l.default}}),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}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(902),i=h(r(395)),o=h(r(89)),s=h(r(735)),a=h(r(234)),u=h(r(953)),c=h(r(72)),l=h(r(174));function h(t){return t&&t.__esModule?t:{default:t}}},672:(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 e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==r(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=_,s(P,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.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&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=function(){return t=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},e=[{key:"getDB",value:(c=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 c.apply(this,arguments)})},{key:"get",value:(u=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 u.apply(this,arguments)})},{key:"put",value:(a=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 a.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:(i=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 i.apply(this,arguments)})},{key:"getItem",value:(r=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 r.apply(this,arguments)})}],e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i,a,u,c}();e.default=new u},87:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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()}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=o},291:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(122)),i=a(r(87)),o=a(r(672)),s=a(r(238));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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var c=d(t[i],t,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==u(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 h(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 f(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,d(n.key),n)}}function d(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}var p=function(){return t=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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"},e=[{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:(P=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return P.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"setDeviceId",value:(O=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,e),!this.db||!this.db.IDB){t.next=4;break}return t.next=4,this.db.setItem(this.DEVICE_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return O.apply(this,arguments)})},{key:"getDeviceId",value:function(){return this.getStorage(this.DEVICE_ID)}},{key:"getAppKeySync",value:(S=h(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return S.apply(this,arguments)})},{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:(b=h(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 b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(_=h(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 _.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:(I=h(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 I.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:(m=h(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 m.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:(g=h(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 g.apply(this,arguments)})},{key:"getExternalIdRequest",value:(v=h(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 v.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:"getRegisteredByCookie",value:(y=h(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 y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(E=h(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 E.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)}},{key:"setInAppTopicList",value:(p=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(d=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return d.apply(this,arguments)})},{key:"setTopicList",value:(l=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getTopicList",value:(u=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return u.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}},{key:"setAvoidCypher",value:function(t){this.setStorage(this.AVOID_CYPHER,t)}},{key:"isAvoidCypher",value:function(){return this.getStorage(this.AVOID_CYPHER)}},{key:"getUrlDeviceApi",value:(a=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.storage||!this.storage.isLocalStorageAvailable()){t.next=5;break}e=this.getStorage(this.URL_DEVICE_API),t.next=9;break;case 5:if(!this.db||!this.db.IDB){t.next=9;break}return t.next=8,this.db.getItem(this.URL_DEVICE_API);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 a.apply(this,arguments)})},{key:"setUrlDeviceApi",value:(r=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,e),!this.db||!this.db.IDB){t.next=4;break}return t.next=4,this.db.setItem(this.URL_DEVICE_API,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"setPushDisabled",value:function(t){this.setStorage(this.PUSH_DISABLED,t)}},{key:"isPushDisabled",value:function(){return this.getStorage(this.PUSH_DISABLED)}},{key:"getConfigV2ServiceSyncTime",value:function(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}},{key:"setConfigV2ServiceSyncTime",value:function(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}},{key:"getConfigV2",value:function(){return this.getStorage(this.CONFIG_V2)}},{key:"setConfigV2",value:function(t){this.setStorage(this.CONFIG_V2,t)}},{key:"getMaintenanceEnd",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}},{key:"setMaintenanceEnd",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}},{key:"getMaintenanceStart",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}},{key:"setMaintenanceStart",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}}],e&&f(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,a,u,l,d,p,E,y,v,g,m,I,_,b,S,O,P}();e.default=p},238:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=new(function(){return t=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},e=[{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!==o.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")}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=o},622:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var u=function(t,e,r){return r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{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)}}]);e.default=u},429:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(254))&&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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,l(n.key),n)}}function l(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var h=function(){return function(t,e,r){return r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{key:"getPermissions",value:(n=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 n.apply(this,arguments)})},{key:"getPermission",value:(r=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 r.apply(this,arguments)})},{key:"setPermissionsCallback",value:(e=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 e.apply(this,arguments)})},{key:"setCallback",value:(t=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(e,r){return t.apply(this,arguments)})}]);var t,e,r,n}();e.default=h},170:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var n=i(r(291));function i(t){return t&&t.__esModule?t:{default:t}}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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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,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,c(n.key),n)}}function c(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var l=new(i(r(254)).default)("[IND]Crypto"),h=new TextEncoder("utf-8"),f="HMAC",d=e.CryptoUtils=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"createHmac",value:(r=s().mark((function t(e,r){var i,o,a,u,c,d;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i="",!0!==(new n.default).isAvoidCypher()){t.next=6;break}i=r,t.next=18;break;case 6:if(a=null===(o=window)||void 0===o||null===(o=o.crypto)||void 0===o?void 0:o.subtle){t.next=9;break}return t.abrupt("return");case 9:return t.next=11,a.importKey("raw",h.encode(e),{name:f,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 11:return u=t.sent,t.next=14,a.sign(f,u,h.encode(r));case 14:c=t.sent,d=new Uint8Array(c),i=Array.prototype.map.call(d,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),l.d("hmac: ",i).writeLog();case 18:return t.abrupt("return",i);case 21:return t.prev=21,t.t0=t.catch(0),l.e("error:",t.t0).writeLog(),t.abrupt("return");case 25:case"end":return t.stop()}}),t,null,[[0,21]])})),i=function(){var t=this,e=arguments;return new Promise((function(n,i){var o=r.apply(t,e);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(t,e){return i.apply(this,arguments)})}],e&&u(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i}();e.default=d},457:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(735)),i=o(r(234));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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var c=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},(e=[{key:"showError",value:function(t,e,r){if(null!=t){var o=Object.values(t.ErrorCode).indexOf(e);if(o>=0){var s={code:Object.keys(t.ErrorCode)[o],errorId:Object.values(t.ErrorCode)[o]};return new i.default(s,Object.values(t.ErrorMessage)[o],r)}return new i.default(n.default.ErrorCode.GENERAL_ERROR,"general error",r)}}}])&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=new c},325:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{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}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},254:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(291)),i=o(r(630));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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var c=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=[]}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}),e;var e,r,o}();e.default=c},630:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},662:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},332:(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 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),n)}}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=o},628:(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,"TopicUtils",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(622)),i=f(r(429)),o=f(r(170)),s=f(r(457)),a=f(r(325)),u=f(r(254)),c=r(630),l=f(r(332)),h=f(r(662));function f(t){return t&&t.__esModule?t:{default:t}}},114:function(t){var e;e=()=>(()=>{var t={710:function(t){var e;e=()=>(()=>{"use strict";var t={330:t=>{t.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.9.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={};r.r(n),r.d(n,{default:()=>Y});var i={};r.r(i),r.d(i,{BaseApplicationRequest:()=>P,BaseClient:()=>S,BaseRequest:()=>O});var o={};r.r(o),r.d(o,{Channel:()=>A,CoreApplication:()=>L,Device:()=>R,DeviceStatus:()=>T,ErrorDictionary:()=>_,ErrorModel:()=>I,EventType:()=>w,TopicSubscribeType:()=>N});var s={};r.r(s),r.d(s,{CommonUtils:()=>C,CorePermissions:()=>D,CryptoUtils:()=>B,ErrorUtils:()=>b,JsonUtils:()=>U,Log:()=>m,LogLevel:()=>y,TopicUtils:()=>j,Validations:()=>V});var a={platform:"webpush",version:"0.0.1"};const u=r(330);a.version=u.version;const c=a=Object.assign(a,{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"}}),l=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!==l.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()}},h=l,f=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}}},d=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!==d.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")}},p=d,E=class{constructor(){this.storage=h,this.db=f,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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"}setItemSessionStorage(t,e){p.setItem(t,e)}getItemSessionStorage(t){return p.getItem(t)}clearSessionStorage(){p.clearMessages()}setStorage(t,e){h.setItem(t,e)}getStorage(t){return h.getItem(t)}clearStorage(){h.clear()}setBrowserPublicKey(t){h.setItem(this.BROWSER_PUBLIC_KEY,t)}getBrowserPublicKey(){return h.getItem(this.BROWSER_PUBLIC_KEY)}setBrowserPrivateKey(t){h.setItem(this.BROWSER_PRIVATE_KEY,t)}getBrowserPrivateKey(){return h.getItem(this.BROWSER_PRIVATE_KEY)}async setAppKey(t){h.setItem(this.APP_KEY,t),f&&f.IDB&&await f.setItem(this.APP_KEY,t)}getAppKey(){return h.getItem(this.APP_KEY)}async setDeviceId(t){this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,t),this.db&&this.db.IDB&&await this.db.setItem(this.DEVICE_ID,t)}getDeviceId(){return this.getStorage(this.DEVICE_ID)}async getAppKeySync(){if(f&&f.IDB)return await f.getItem(this.APP_KEY)}setVAPID(t){h.setItem(this.VAPID_PUBLIC,t)}getVAPID(){return h.getItem(this.VAPID_PUBLIC)}setEnabled(t){h.setItem(this.ENABLED,t)}getEnabled(){return h.getItem(this.ENABLED)}setServiceSyncTime(t){h.setItem(this.SERVICE_SYNC_TIME,t*this.BASE_TIME)}getServiceSyncTime(){return h.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME}setLocationEnabled(t){h.setItem(this.LOCATION_ENABLED,t)}getLocationEnabled(){return h.getItem(this.LOCATION_ENABLED)}setLocationUpdateMinutes(t){h.setItem(this.LOCATION_UPDATE_MINUTES,t)}getLocationUpdateMinutes(){return h.getItem(this.LOCATION_UPDATE_MINUTES)||30}async setRequestLocation(t){h.setItem(this.REQUEST_LOCATION,t)}getRequestLocation(){return!!h&&h.getItem(this.REQUEST_LOCATION)}async setPlatform(t){h.setItem(this.PLATFORM,t)}getPlatform(){return h&&h.getItem(this.PLATFORM)||c.platform}getVersion(){return c.version}async setBrowserName(t){h.setItem(this.BROWSER_NAME,t)}getBrowserName(){return h.getItem(this.BROWSER_NAME)}setBrowserVersion(t){h.setItem(this.BROWSER_VERSION,t)}getBrowserVersion(){return h.getItem(this.BROWSER_VERSION)}async setOsName(t){h.setItem(this.OS_NAME,t)}getOsName(){return h.getItem(this.OS_NAME)}setOsVersion(t){h.setItem(this.OS_VERSION,t)}getOsVersion(){return h.getItem(this.OS_VERSION)}setDeviceType(t){h.setItem(this.DEVICE_TYPE,t)}getDeviceType(){return h.getItem(this.DEVICE_TYPE)}setSupported(t){h.setItem(this.SUPPORTED,t)}getSupported(){return h.getItem(this.SUPPORTED)}setServiceTimestamp(t){h.setItem(this.SERVICE_TIMESTAMP,t)}getServiceTimestamp(){return h.getItem(this.SERVICE_TIMESTAMP)}setLocationTimestamp(t){h.setItem(this.LOCATION_TIMESTAMP,t)}getLocationTimestamp(){return h.getItem(this.LOCATION_TIMESTAMP)}setPermissionLocation(t){h.setItem(this.PERMISSION_LOCATION,t)}getPermissionLocation(){return h.getItem(this.PERMISSION_LOCATION)}setDebugLog(t){h.setItem(this.SET_LOG_DEBUG,t)}getDebugLog(){return"false"!==h.getItem(this.SET_LOG_DEBUG)}setLogLevel(t){h.setItem(this.LOG_LEVEL,t)}getLogLevel(){return h.getItem(this.LOG_LEVEL)}setNewUserTimestamp(t){h.setItem(this.NEW_USER_TIMESTAMP,t)}getNewUserTimestamp(){return h.getItem(this.NEW_USER_TIMESTAMP)}async setExternalIdRequest(t){h&&h.isLocalStorageAvailable()&&h.setItem(this.EXTERNAL_ID,t),f&&f.IDB&&await f.setItem(this.EXTERNAL_ID,t)}async getExternalIdRequest(){let t;try{h&&h.isLocalStorageAvailable()?t=h.getItem(this.EXTERNAL_ID):f&&f.IDB&&(t=await f.getItem(this.EXTERNAL_ID))}catch(t){}return t}setExternalId(t){h.setItem(this.EXTERNAL_ID,t)}getExternalId(){return h.getItem(this.EXTERNAL_ID)}async getRegisteredByCookie(){return h.getItem(this.REGISTERED_BY_COOKIE)}async setRegisteredByCookie(t){h.setItem(this.REGISTERED_BY_COOKIE,t)}setLatitude(t){h.setItem(this.LATITUDE,t)}getLatitude(){return h.getItem(this.LATITUDE)}setLongitude(t){h.setItem(this.LONGITUDE,t)}getLongitude(){return h.getItem(this.LONGITUDE)}async setInAppTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.INAPP_TOPICS,t)}async getInAppTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.INAPP_TOPICS))}catch(t){}return t}async setTopicList(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_LIST,t)}async getTopicList(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_LIST))}catch(t){}return t}getUrlInappApi(){return this.getStorage(this.URL_INAPP_API)}setUrlInappApi(t){this.setStorage(this.URL_INAPP_API,t)}setInAppEnabled(t){this.setStorage(this.INAPP_ENABLED,t)}isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED)}setAvoidCypher(t){this.setStorage(this.AVOID_CYPHER,t)}isAvoidCypher(){return this.getStorage(this.AVOID_CYPHER)}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)}setPushDisabled(t){this.setStorage(this.PUSH_DISABLED,t)}isPushDisabled(){return this.getStorage(this.PUSH_DISABLED)}getConfigV2ServiceSyncTime(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}setConfigV2ServiceSyncTime(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}getConfigV2(){return this.getStorage(this.CONFIG_V2)}setConfigV2(t){this.setStorage(this.CONFIG_V2,t)}getMaintenanceEnd(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}setMaintenanceEnd(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}getMaintenanceStart(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}setMaintenanceStart(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}},y=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),v=y;class g{constructor(t){this.tag="[IND]",t&&(this.tag=t),this.level=v.INFO,this.setLogLevel((new E).getLogLevel()),this.log=[]}setLogLevel(t){t&&t>=v.DEBUG&&t<=v.ERROR&&(this.level=t)}static addedAsString(t){return"string"==typeof t?t:JSON.stringify(t,null,2)}d(){if(this.level<=v.DEBUG)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}i(){if(this.level<=v.INFO)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}w(){if(this.level<=v.WARNING)for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}e(){if(this.level<=v.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+=`${error.errorCode}: ${error.errorMessage}`;else for(let t=0;t<arguments.length;t++)this.log+=g.addedAsString(arguments[t]);return this}writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[]}}const m=g,I=class{constructor(t,e,r){this.errorCode=t,this.errorMessage=e,null!=r&&(this.exceptionMessage=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"}},b=new class{constructor(){}showError(t,e,r){if(null!=t){const n=Object.values(t.ErrorCode).indexOf(e);if(n>=0){const e=Object.keys(t.ErrorCode)[n],i=Object.values(t.ErrorCode)[n];return new I({code:e,errorId:i},Object.values(t.ErrorMessage)[n],r)}return new I(_.ErrorCode.GENERAL_ERROR,"general error",r)}}},S=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 m("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(v.DEBUG);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);if(304!=e.status){const 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 I(n.statusCode,n.message))}return i.d("Method: "+t+"\nURL: "+o+"\n"+(t!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+e.status+"\n").writeLog(),e}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(),b.showError(_,_.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)}},O=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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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_INITIAL_STATUS="initialStatus",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 E).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}isServiceWorkerRequest(){return this.serviceWorkerRequest}setServiceWorkerRequest(t){this.serviceWorkerRequest=t}isJourneyRequest(){return this.journeyRequest}setJourneyRequest(t){this.journeyRequest=t}},P=class extends O{constructor(t=null){super(),this.PARAM_APPLICATION_CHANNEL="channel",this.channels=t}getApplicationRequest(){return this.params=this.createQueryString(),this}createQueryString(){let t="";if(this.channels&&this.channels.length>0)for(let e=0;e<this.channels.length;e++)t+=`${this.PARAM_APPLICATION_CHANNEL}=${this.channels[e].toLowerCase()}&`;return t+=`${this.PARAM_PLATFORM}=webpush`,t}},A=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"}),R=class{constructor(t=null,e){null==t?(this.browserPublicKey=(new E).getBrowserPublicKey(),this.browserPrivateKey=(new E).getBrowserPrivateKey(),this.platform=(new E).getPlatform(),this.version=(new E).getVersion(),this.browserName=(new E).getBrowserName(),this.browserVersion=(new E).getBrowserVersion(),this.osName=(new E).getOsName(),this.osVersion=(new E).getOsVersion(),this.deviceId=(new E).getDeviceId(),this.deviceType=(new E).getDeviceType(),(new E).getEnabled()&&(this.enabled="true"===(new E).getEnabled()),(new E).getExternalId()&&(this.externalCode=(new E).getExternalId())):e?(t.enabled&&(this.enabled=t.enabled,(new E).setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,(new E).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}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.deviceId&&(t.deviceId=this.deviceId),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}},T=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),w=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"}),N=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),L=class{constructor(t,e=!1){const r=new E;if(null!=t){r.setConfigV2(JSON.stringify(t)),t.contentAvailable&&(this.contentAvailable=t.contentAvailable),t.locationAccuracy&&(this.locationAccuracy=t.locationAccuracy),t.locationDistance&&(this.locationDistance=t.locationDistance),t.locationEnabled&&(this.locationEnabled=t.locationEnabled),t.locationUpdateMinutes&&(this.locationUpdateMinutes=t.locationUpdateMinutes),t.maintenanceWindow&&(this.maintenanceWindow=t.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,r.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,r.setMaintenanceEnd(this.maintenanceWindow.end))),t.networkEventsEnabled&&(this.networkEventsEnabled=t.networkEventsEnabled),t.networkUpdateMinutes&&(this.networkUpdateMinutes=t.networkUpdateMinutes);let n=Date.now();if(t.serviceSyncTime?(this.serviceSyncTime=t.serviceSyncTime,n=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):n=new Date(Date.now()+36e5),!e){const t=n.toString();new m("[IND]CoreApplication").d("ServiceSyncTime defined on: "+t).writeLog(),r.setConfigV2ServiceSyncTime(t)}}}},C=class{static isServiceTimestampExceed(){return!(new E).getServiceTimestamp()||(new E).getServiceSyncTime()<=(Date.now()-(new E).getServiceTimestamp())/6e4}static isFunction(t){return!(!t||"function"!=typeof t)}},D=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 m("[IND]CorePermissions: ").d(t+" permission state has changed from "+n+" to "+r.state).writeLog(),n=r.state,e&&e({name:t,state:r.state})})}}},M=new m("[IND]Crypto"),k=new TextEncoder("utf-8"),x="HMAC",B=class{static async createHmac(t,e){try{let r="";if(!0===(new E).isAvoidCypher())r=e;else{const n=window?.crypto?.subtle;if(!n)return;const i=await n.importKey("raw",k.encode(t),{name:x,hash:{name:"SHA-256"}},!1,["sign","verify"]),o=await n.sign(x,i,k.encode(e)),s=new Uint8Array(o);r=Array.prototype.map.call(s,(t=>("00"+t.toString(16)).slice(-2))).join(""),M.d("hmac: ",r).writeLog()}return r}catch(t){return void M.e("error:",t).writeLog()}}},U=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}},V=class{static isValidFormat(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}},j=class{static setTopicChannel(t,e){const r=[];for(let n=0;n<t.length;n++){const i=t[n];i.channel=e,r.push(i)}return r}},Y={Repository:E,Config:c,Api:i,Models:o,Utils:s};return n})(),t.exports=e()},315:(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){if(t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var e=u(void 0);if(e&&e.has(t))return e.get(t);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,e&&e.set(t,r),r}(r(710));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(610))&&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)}},468:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=u(r(254)),i=u(r(234)),o=u(r(457)),s=u(r(735)),a=u(r(630));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){return c="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},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var u=d(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==c(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,u,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,u,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(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){h(o,n,i,s,a,"next",t)}function a(t){h(o,n,i,s,a,"throw",t)}s(void 0)}))}}function d(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,p(n.key),n)}}function p(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}var E=function(){return t=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"},e=[{key:"getURL",value:(E=f(l().mark((function t(){return l().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 E.apply(this,arguments)})},{key:"call",value:(p=f(l().mark((function t(e,r,u,c){var h,f,d,p,E;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return h=new n.default("[IND]BaseClient: "),u.isServiceWorkerRequest()&&h.setLogLevel(a.default.DEBUG),t.next=4,this.getURL();case 4:return t.t0=t.sent,t.t1=u.getPath(r),t.t2=t.t0+t.t1,t.t3=u.getParams(),f=t.t2+t.t3,u.isJourneyRequest()&&(f=f.replace("v1","v2")),d={method:e,headers:u.addHeaders()},e!==this.GET&&(d.body=JSON.stringify(u.getBody())),c&&(d.credentials=c),t.prev=13,t.next=16,fetch(f,d);case 16:if(304==(p=t.sent).status){t.next=28;break}return t.next=20,p.json();case 20:if(E=t.sent,!p.ok){t.next=24;break}return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\nResponse Body:",JSON.stringify(E.data,null,"\t")).writeLog(),t.abrupt("return",E);case 24:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+E.statusCode+"\nResponse Message: "+E.message+"\n").writeLog(),t.abrupt("return",new i.default(E.statusCode,E.message));case 28:return h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Response Code: "+p.status+"\n").writeLog(),t.abrupt("return",p);case 30:t.next=36;break;case 32:return t.prev=32,t.t4=t.catch(13),h.d("Method: "+e+"\nURL: "+f+"\n"+"".concat(e!==this.GET?"Request Body: "+JSON.stringify(u.getBody(),null,"\t")+"\n":"")+"Error: "+t.t4).writeLog(),t.abrupt("return",o.default.showError(s.default,s.default.ErrorCode.GENERAL_ERROR,t.t4));case 36:case"end":return t.stop()}}),t,this,[[13,32]])}))),function(t,e,r,n){return p.apply(this,arguments)})},{key:"get",value:(h=f(l().mark((function t(e,r){return l().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 h.apply(this,arguments)})},{key:"post",value:(c=f(l().mark((function t(e,r,n){return l().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 c.apply(this,arguments)})},{key:"put",value:(u=f(l().mark((function t(e,r,n){return l().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:(r=f(l().mark((function t(e,r){return l().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 r.apply(this,arguments)})}],e&&d(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,u,c,h,p,E}();e.default=E},545:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseApplicationRequest",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"BaseClient",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"BaseRequest",{enumerable:!0,get:function(){return i.default}});var n=s(r(468)),i=s(r(237)),o=s(r(773));function s(t){return t&&t.__esModule?t:{default:t}}},773:(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)}var i;function o(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(s=function(){return!!t})()}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var c=function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=a(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,s()?Reflect.construct(e,[],a(t).constructor):e.apply(t,r))}(this,e)).PARAM_APPLICATION_CHANNEL="channel",t.channels=r,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(e,t),function(t,e){return e&&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,o(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"getApplicationRequest",value:function(){return this.params=this.createQueryString(),this}},{key:"createQueryString",value:function(){var t="";if(this.channels&&this.channels.length>0)for(var e=0;e<this.channels.length;e++)t+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[e].toLowerCase(),"&");return t+"".concat(this.PARAM_PLATFORM,"=webpush")}}])}(((i=r(237))&&i.__esModule?i:{default:i}).default);e.default=c},237:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var a=function(t,e){return e&&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,s(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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_EXTERNAL_ID="externalId",this.PARAM_EXTERNAL_CODE="externalCode",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_INITIAL_STATUS="initialStatus",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={}}),[{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:"isServiceWorkerRequest",value:function(){return this.serviceWorkerRequest}},{key:"setServiceWorkerRequest",value:function(t){this.serviceWorkerRequest=t}},{key:"isJourneyRequest",value:function(){return this.journeyRequest}},{key:"setJourneyRequest",value:function(t){this.journeyRequest=t}}]);e.default=a},122:(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(904);n.version=i.version,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=n},610:(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=h(r(122)),o=h(r(291)),s=l(r(545)),a=l(r(225)),u=l(r(628));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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&{}.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 h(t){return t&&t.__esModule?t:{default:t}}e.default={Repository:o.default,Config:i.default,Api:s,Models:a,Utils:u}},902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Channel=void 0;var r=e.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"});e.default=r},174:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(291)),i=o(r(254));function o(t){return t&&t.__esModule?t:{default:t}}var s=function(t){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var o=new n.default;if(null!=e){o.setConfigV2(JSON.stringify(e)),e.contentAvailable&&(this.contentAvailable=e.contentAvailable),e.locationAccuracy&&(this.locationAccuracy=e.locationAccuracy),e.locationDistance&&(this.locationDistance=e.locationDistance),e.locationEnabled&&(this.locationEnabled=e.locationEnabled),e.locationUpdateMinutes&&(this.locationUpdateMinutes=e.locationUpdateMinutes),e.maintenanceWindow&&(this.maintenanceWindow=e.maintenanceWindow,this.maintenanceWindow.start&&(this.maintenanceWindowStart=this.maintenanceWindow.start,o.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,o.setMaintenanceEnd(this.maintenanceWindow.end))),e.networkEventsEnabled&&(this.networkEventsEnabled=e.networkEventsEnabled),e.networkUpdateMinutes&&(this.networkUpdateMinutes=e.networkUpdateMinutes);var s=Date.now();if(e.serviceSyncTime?(this.serviceSyncTime=e.serviceSyncTime,s=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):s=new Date(Date.now()+36e5),!r){var a=s.toString();new i.default("[IND]CoreApplication").d("ServiceSyncTime defined on: "+a).writeLog(),o.setConfigV2ServiceSyncTime(a)}}}));e.default=s},395:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var a=function(t,e){return e&&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,s(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}((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.deviceId=(new i.default).getDeviceId(),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()}),[{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.deviceId&&(t.deviceId=this.deviceId),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}}]);e.default=a},89:(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},735:(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"}}},234:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=function(t){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},953:(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},72:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});e.default=r},225:(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,"CoreApplication",{enumerable:!0,get:function(){return l.default}}),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}}),Object.defineProperty(e,"TopicSubscribeType",{enumerable:!0,get:function(){return c.default}});var n=r(902),i=h(r(395)),o=h(r(89)),s=h(r(735)),a=h(r(234)),u=h(r(953)),c=h(r(72)),l=h(r(174));function h(t){return t&&t.__esModule?t:{default:t}}},672:(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 e};var t,e={},i=Object.prototype,o=i.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(n||[]);return s(o,"_invoke",{value:T(t,r,a)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==i&&o.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function n(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==r(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(r(e)+" is not iterable")}return I.prototype=_,s(P,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=o.call(s,"catchLoc"),c=o.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.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&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 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,a(n.key),n)}}function a(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=function(){return t=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},e=[{key:"getDB",value:(c=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 c.apply(this,arguments)})},{key:"get",value:(u=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 u.apply(this,arguments)})},{key:"put",value:(a=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 a.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:(i=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 i.apply(this,arguments)})},{key:"getItem",value:(r=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 r.apply(this,arguments)})}],e&&s(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i,a,u,c}();e.default=new u},87:(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){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){return t=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},e=[{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()}}],e&&function(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=i},291:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(r(122)),i=a(r(87)),o=a(r(672)),s=a(r(238));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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,s,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,s)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,o,s,a){var c=d(t[i],t,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==u(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(u(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,a,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,s,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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 h(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 f(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,d(n.key),n)}}function d(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}var p=function(){return t=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",this.TOPIC_LIST=this.REPOSITORY+".TOPIC_LIST",this.INAPP_ENABLED=this.REPOSITORY+".INAPP_ENABLED",this.URL_INAPP_API=this.REPOSITORY+".URL_INAPP_API",this.INAPP_TOPICS=this.REPOSITORY+".INAPP_TOPICS",this.AVOID_CYPHER=this.REPOSITORY+".AVOID_CYPHER",this.URL_DEVICE_API=this.REPOSITORY+".URL_DEVICE_API",this.PUSH_DISABLED=this.REPOSITORY+".PUSH_DISABLED",this.CONFIG_V2_SERVICE_SYNC_TIME=this.REPOSITORY+".CONFIG_V2_SERVICE_SYNC_TIME",this.CONFIG_V2=this.REPOSITORY+".CONFIG_V2",this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_START_KEY",this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY=this.REPOSITORY+".CONFIG_V2_MAINTENANCE_WINDOW_END_KEY"},e=[{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:(P=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.default.setItem(this.APP_KEY,e),!o.default||!o.default.IDB){t.next=4;break}return t.next=4,o.default.setItem(this.APP_KEY,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return P.apply(this,arguments)})},{key:"getAppKey",value:function(){return i.default.getItem(this.APP_KEY)}},{key:"setDeviceId",value:(O=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,e),!this.db||!this.db.IDB){t.next=4;break}return t.next=4,this.db.setItem(this.DEVICE_ID,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return O.apply(this,arguments)})},{key:"getDeviceId",value:function(){return this.getStorage(this.DEVICE_ID)}},{key:"getAppKeySync",value:(S=h(c().mark((function t(){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.default||!o.default.IDB){t.next=4;break}return t.next=3,o.default.getItem(this.APP_KEY);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(){return S.apply(this,arguments)})},{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:(b=h(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 b.apply(this,arguments)})},{key:"getRequestLocation",value:function(){return!!i.default&&i.default.getItem(this.REQUEST_LOCATION)}},{key:"setPlatform",value:(_=h(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 _.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:(I=h(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 I.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:(m=h(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 m.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:(g=h(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 g.apply(this,arguments)})},{key:"getExternalIdRequest",value:(v=h(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 v.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:"getRegisteredByCookie",value:(y=h(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 y.apply(this,arguments)})},{key:"setRegisteredByCookie",value:(E=h(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 E.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)}},{key:"setInAppTopicList",value:(p=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.INAPP_TOPICS,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"getInAppTopicList",value:(d=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.INAPP_TOPICS);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return d.apply(this,arguments)})},{key:"setTopicList",value:(l=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.db||!this.db.IDB){t.next=3;break}return t.next=3,this.db.setItem(this.TOPIC_LIST,e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getTopicList",value:(u=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.db||!this.db.IDB){t.next=5;break}return t.next=4,this.db.getItem(this.TOPIC_LIST);case 4:e=t.sent;case 5:t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this,[[0,7]])}))),function(){return u.apply(this,arguments)})},{key:"getUrlInappApi",value:function(){return this.getStorage(this.URL_INAPP_API)}},{key:"setUrlInappApi",value:function(t){this.setStorage(this.URL_INAPP_API,t)}},{key:"setInAppEnabled",value:function(t){this.setStorage(this.INAPP_ENABLED,t)}},{key:"isInAppEnabled",value:function(){return this.getStorage(this.INAPP_ENABLED)}},{key:"setAvoidCypher",value:function(t){this.setStorage(this.AVOID_CYPHER,t)}},{key:"isAvoidCypher",value:function(){return this.getStorage(this.AVOID_CYPHER)}},{key:"getUrlDeviceApi",value:(a=h(c().mark((function t(){var e;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.storage||!this.storage.isLocalStorageAvailable()){t.next=5;break}e=this.getStorage(this.URL_DEVICE_API),t.next=9;break;case 5:if(!this.db||!this.db.IDB){t.next=9;break}return t.next=8,this.db.getItem(this.URL_DEVICE_API);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 a.apply(this,arguments)})},{key:"setUrlDeviceApi",value:(r=h(c().mark((function t(e){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,e),!this.db||!this.db.IDB){t.next=4;break}return t.next=4,this.db.setItem(this.URL_DEVICE_API,e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"setPushDisabled",value:function(t){this.setStorage(this.PUSH_DISABLED,t)}},{key:"isPushDisabled",value:function(){return this.getStorage(this.PUSH_DISABLED)}},{key:"getConfigV2ServiceSyncTime",value:function(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME)}},{key:"setConfigV2ServiceSyncTime",value:function(t){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,t)}},{key:"getConfigV2",value:function(){return this.getStorage(this.CONFIG_V2)}},{key:"setConfigV2",value:function(t){this.setStorage(this.CONFIG_V2,t)}},{key:"getMaintenanceEnd",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY)}},{key:"setMaintenanceEnd",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,t)}},{key:"getMaintenanceStart",value:function(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY)}},{key:"setMaintenanceStart",value:function(t){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,t)}}],e&&f(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,a,u,l,d,p,E,y,v,g,m,I,_,b,S,O,P}();e.default=p},238:(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){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=new(function(){return t=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},e=[{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")}}],e&&function(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());e.default=i},622:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(291))&&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){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var a=function(t,e,r){return 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,s(n.key),n)}}(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{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)}}]);e.default=a},429:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,i=(n=r(254))&&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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var l=function(){return function(t,e,r){return 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,c(n.key),n)}}(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}),0,[{key:"getPermissions",value:(n=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 n.apply(this,arguments)})},{key:"getPermission",value:(r=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 r.apply(this,arguments)})},{key:"setPermissionsCallback",value:(e=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 e.apply(this,arguments)})},{key:"setCallback",value:(t=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(e,r){return t.apply(this,arguments)})}]);var t,e,r,n}();e.default=l},170:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CryptoUtils=void 0;var n=i(r(291));function i(t){return t&&t.__esModule?t:{default:t}}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 e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(n||[]);return i(s,"_invoke",{value:T(t,r,a)}),s}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",E="suspendedYield",y="executing",v="completed",g={};function m(){}function I(){}function _(){}var b={};h(b,u,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(D([])));O&&O!==r&&n.call(O,u)&&(b=O);var P=_.prototype=m.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function R(t,e){function r(i,s,a,u){var c=d(t[i],t,s);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==o(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var s;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return s=s?s.then(i,i):i()}})}function T(e,r,n){var i=p;return function(o,s){if(i===y)throw Error("Generator is already running");if(i===v){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var c=d(e,r,n);if("normal"===c.type){if(i=n.done?v:E,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function w(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,w(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}throw new TypeError(o(e)+" is not iterable")}return I.prototype=_,i(P,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:I,configurable:!0}),I.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},A(R.prototype),h(R.prototype,c,(function(){return this})),e.AsyncIterator=R,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new R(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},A(P),h(P,l,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),e.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}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.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,g):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),g},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),L(r),g}},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;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}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){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var c=new(i(r(254)).default)("[IND]Crypto"),l=new TextEncoder("utf-8"),h="HMAC",f=e.CryptoUtils=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"createHmac",value:(r=s().mark((function t(e,r){var i,o,a,u,f,d;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i="",!0!==(new n.default).isAvoidCypher()){t.next=6;break}i=r,t.next=18;break;case 6:if(a=null===(o=window)||void 0===o||null===(o=o.crypto)||void 0===o?void 0:o.subtle){t.next=9;break}return t.abrupt("return");case 9:return t.next=11,a.importKey("raw",l.encode(e),{name:h,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 11:return u=t.sent,t.next=14,a.sign(h,u,l.encode(r));case 14:f=t.sent,d=new Uint8Array(f),i=Array.prototype.map.call(d,(function(t){return("00"+t.toString(16)).slice(-2)})).join(""),c.d("hmac: ",i).writeLog();case 18:return t.abrupt("return",i);case 21:return t.prev=21,t.t0=t.catch(0),c.e("error:",t.t0).writeLog(),t.abrupt("return");case 25:case"end":return t.stop()}}),t,null,[[0,21]])})),i=function(){var t=this,e=arguments;return new Promise((function(n,i){var o=r.apply(t,e);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(t,e){return i.apply(this,arguments)})}],e&&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,u(n.key),n)}}(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,i}();e.default=f},457:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(735)),i=o(r(234));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){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var u=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},(e=[{key:"showError",value:function(t,e,r){if(null!=t){var o=Object.values(t.ErrorCode).indexOf(e);if(o>=0){var s={code:Object.keys(t.ErrorCode)[o],errorId:Object.values(t.ErrorCode)[o]};return new i.default(s,Object.values(t.ErrorMessage)[o],r)}return new i.default(n.default.ErrorCode.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,a(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=new u},325:(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){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{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}}],e&&function(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=i},254:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(291)),i=o(r(630));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,u(n.key),n)}}function u(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var c=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=[]}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}),e;var e,r,o}();e.default=c},630:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LogLevel=void 0;var r=e.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});e.default=r},662:(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){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"setTopicChannel",value:function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n];i.channel=e,r.push(i)}return r}}],e&&function(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=i},332:(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){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"isValidFormat",value:function(t){return null!=t&&""!=t&&"null"!=t&&t.length>8}}],e&&function(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();e.default=i},628:(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,"TopicUtils",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"Validations",{enumerable:!0,get:function(){return l.default}});var n=f(r(622)),i=f(r(429)),o=f(r(170)),s=f(r(457)),a=f(r(325)),u=f(r(254)),c=r(630),l=f(r(332)),h=f(r(662));function f(t){return t&&t.__esModule?t:{default:t}}},904:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.9.2","_id":"indigitall-web-core@4.9.2","_inBundle":false,"_integrity":"sha512-aGTfAnLDU6FrokX4B7XvAWEX2Obl/hlcz9OTPFOI/yQIwIKpjfZJ1BEVeCWvDiSEAYhLek73ppnFdV66cUxcGA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.9.2","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.9.2","saveSpec":null,"fetchSpec":"4.9.2"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.9.2.tgz","_shasum":"710cb6aaf9858cce437e850a450c7fc81cf71a03","_spec":"indigitall-web-core@4.9.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.9.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:()=>C});const{Repository:t}=r(315).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(315).Core.Api,{Config:s}=r(315).Core,{ErrorModel:a}=r(315).Core.Models,{CommonUtils:u}=r(315).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 C(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(315).Core.Api,h=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}},f=Object.freeze({SENT:"sent",CLICK:"click",DELETED:"deleted"});window.inboxStatus=f;const d=f,p=Object.freeze({NONE:"none",DEFAULT:"default",WEBHOOK:"webhook"}),{BaseRequest:E}=r(315).Core.Api,y=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()),this.sendingId="",this.sendingIds=null,this.page=0,this.pageSize=0,this.dateFrom="",this.dateTo="",this.status=d.INBOXSTATUS_SENT,this.initialStatus=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_EXTERNAL_ID+"="+this.externalId}createBodyJson(){let t={};const e=[];try{if(t=this.createBodyStatusJson(),null!=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),this.initialStatus&&(t.initialStatus=this.initialStatus),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}setInitialStatus(t){this.initialStatus=t}setStatusList(t){this.statusList=t}},{BaseRequest:v}=r(315).Core.Api,g=class extends v{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_EXTERNAL_ID+"="+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(315).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 S=_.ErrorMessage;Object.assign(S,{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 O={ErrorCode:b,ErrorMessage:S},{Validations:P,Log:A}=r(315).Core.Utils,R=class extends P{static isAppKeyFormat(){const t=e.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new A("[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:w,Log:N}=r(315).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),this.count=0,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 h;n.setJson(r),c.postInboxAuth(n,t,e)}static getMessagesCountWithAuth(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(w.showError(O,O.ErrorCode.INBOX_GET_ERROR));else T.isFunction(r)&&r(w.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}static getInboxWithAuth(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 getInboxWithPageAuth(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 y;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(w.showError(O,O.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(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(a)&&a(w.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST))}getNextPage(t,r){const n=new N("[IND]Inbox: ");if(this.isRequestingPage)n.w(O.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 y;(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(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(r)&&r(w.showError(O,O.ErrorCode.GENERAL_ERROR_BAD_REQUEST));else this.isRequestingPage=!1,T.isFunction(r)&&r(w.showError(O,O.ErrorCode.INBOX_NO_MESSAGES))}massiveEditNotifications(t,e,r,n){let i=d.SENT;e==d.CLICK&&(i=d.SENT),e==d.DELETED&&(i=d.CLICK),this.massiveEditNotifications(t,i,e,r,n)}massiveEditNotificationsWithInitialStatus(t,r,n,i,o){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(n){const e=new y;null!=t&&e.setSendingIds(t),e.setStatus(n),e.setInitialStatus(r),c.putInboxPush(e,i,(t=>{401===t.errorCode?this.generateAuthToken((()=>{c.putInboxPush(e,i,t)}),t):T.isFunction(t)&&t(t)}))}}else T.isFunction(o)&&o(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(o)&&o(w.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}getInfoFromNotification(t,r,n){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t){const e=new y;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(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(n)&&n(w.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}modifyStatusFromNotification(t,r,n,i){if(R.isValidFormatRequest())if(R.isValidFormat(e.getExternalId())){if(t&&r){const e=new y;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(w.showError(O,O.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));else T.isFunction(i)&&i(w.showError(O,O.ErrorCode.BAD_REQUEST_SERVER_ERROR))}}const C=L})(),n})(),t.exports=e()},824:(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={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&{}.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(114));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]}}))}))},904:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.9.2","_id":"indigitall-web-core@4.9.2","_inBundle":false,"_integrity":"sha512-aGTfAnLDU6FrokX4B7XvAWEX2Obl/hlcz9OTPFOI/yQIwIKpjfZJ1BEVeCWvDiSEAYhLek73ppnFdV66cUxcGA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.9.2","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.9.2","saveSpec":null,"fetchSpec":"4.9.2"},"_requiredBy":["#USER","/","/indigitall-web-inbox"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.9.2.tgz","_shasum":"710cb6aaf9858cce437e850a450c7fc81cf71a03","_spec":"indigitall-web-core@4.9.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.9.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:()=>vt});var t=r(824),e=r.n(t);const{Repository:i}=r(315).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.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.REPOSITORY+".SAFARI_GESTURE_REQUEST_PERMISSION",this.UPDATE_TOPIC_SUBSCRIBE=this.REPOSITORY+".UPDATE_TOPIC_SUBSCRIBE",this.TOPIC_SYNC_TIMESTAMP=this.REPOSITORY+".TOPIC_SYNC_TIMESTAMP",this.TOPIC_SEMAPHORE=this.REPOSITORY+".TOPIC_SEMAPHORE",this.TOPIC_SYNC_IS_PROCESSING=this.REPOSITORY+".TOPIC_SYNC_IS_PROCESSING"}async getDeviceIdSync(){if(this.db&&this.db.IDB)return await this.db.getItem(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 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)}async setUpdateTopicSubscribe(t){this.db&&this.db.IDB&&await this.db.setItem(this.UPDATE_TOPIC_SUBSCRIBE,t)}async getUpdateTopicSubscribe(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.UPDATE_TOPIC_SUBSCRIBE))}catch(t){}return t}async setTopicSyncTimestamp(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_SYNC_TIMESTAMP,t)}async getTopicSyncTimestamp(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_SYNC_TIMESTAMP))}catch(t){}return t}async setTopicSemaphore(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_SEMAPHORE,t)}async getTopicSemaphore(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_SEMAPHORE))}catch(t){}return t}async setTopicSyncIsProcessing(t){this.db&&this.db.IDB&&await this.db.setItem(this.TOPIC_SYNC_IS_PROCESSING,t)}async getTopicSyncIsProcessing(){let t;try{this.db&&this.db.IDB&&(t=await this.db.getItem(this.TOPIC_SYNC_IS_PROCESSING))}catch(t){}return t}},{ErrorDictionary:s}=r(315).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,DISABLED_CHANNEL:4404});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'",DISABLED_CHANNEL:"disabled channel"});const c={ErrorCode:a,ErrorMessage:u},{Device:l}=r(315).Core.Models,h=class extends l{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))}static setDeviceJson(t){o.setDeviceJson(JSON.stringify(t.toJSON()))}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}},{DeviceStatus:f}=r(315).Core.Models,{BaseRequest:d}=r(315).Core.Api,p=class extends d{constructor(t=f.DEFAULT){super(),this.device=new h,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!==f.DEFAULT&&(this.body.enabled=1===this.status),this}putDeviceRequest(t){return this.params=this.createQueryString(),this.body=this.createPUTDeviceJson(t),this.status!==f.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.device.deviceId?this.PARAM_DEVICE_ID+"="+this.device.deviceId:""}createDeviceJson(){let t={};try{t=this.device.toJSON()}catch(t){}return t}createPUTDeviceJson(t){let e={};try{h.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)}},{EventType:E}=r(315).Core.Models,{Config:y}=r(315).Core,v=class{static async requestBackgroundSync(){const t=await navigator.serviceWorker.getRegistration(o.getWorkerPath());return null!=t?t:null}static findIndigitallSW(t){for(let e=0;e<t.length;e++)if(void 0!==t[e]&&t[e].active&&t[e].active.scriptURL&&t[e].active.scriptURL.includes("worker.min.js"))return t[e];return null}static async sendEventRequest(t,e){const r=new I;r.setAppKey(t.appKey),r.setDeviceId(t.deviceId),r.setPlatform(y.platform),r.setPushId(""+t.id),r.setJsonPush(t.jsonPush),r.setSendingId(""+t.sendingId),t.campaignId&&r.setCampaingId(""+t.campaignId),t.journeyStateId&&r.setJourneyStateId(t.journeyStateId),r.setEventType(E.EVENT_TYPE_CLICK),await r.setExternalCodeRequest(),"action-1"==e.action?r.setClickedButton(1):"action-2"==e.action?r.setClickedButton(2):r.setClickedButton(0),r.setServiceWorkerRequest(!0),await D.postEventPushClick(r)}static async topicsSubscribeFromServiceWorker(t,e){const r=new p;r.setTopics(e),r.setAppKey(t.appKey),r.setDeviceId(t.deviceId),await D.postTopicsSubscribeFromServiceWorker(r)}static prepareStatistics(t,e){const r=e,n=JSON.parse(t);return Object.keys(n).forEach((function(t){console.log("gcf key",t),"appkey"!=t&&"pushId"!=t&&"action"!=t&&"buttons"!=t&&"id"!=t&&"title"!=t&&"body"!=t&&"icon"!=t&&"image"!=t&&"gif"!=t&&"layout"!=t&&"data"!=t&&"silent"!=t&&"securedData"!=t&&"securedKey"!=t&&"sendEventAck"!=t&&"applicationId"!=t&&"timezone"!=t&&"monochrome"!=t&&"requireInteraction"!=t&&"contentState"!=t&&"interruptionLevel"!=t&&"fromExternalUrl"!=t&&(r[t]=n[t])})),r}},{BaseRequest:g}=r(315).Core.Api,{EventType:m}=r(315).Core.Models,I=class extends g{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}setJsonPush(t){this.jsonPush=t}postEventPushRequest(){let 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),null!=this.jsonPush&&(t=v.prepareStatistics(this.jsonPush,t)),this.body=t,this}postEventVisitRequest(){const t={};return t.deviceId=o.getDeviceId(),t.eventType=m.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=m.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}},_=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 I;r.setAppKey(o.getAppKey()),r.setDeviceId(o.getDeviceId()),r.setPermissionType(t),r.setEventType(e),D.postEventPermission(r)}static async getPutRequestTimestamp(){return await o.getPutRequestTimestamp()?o.getPutRequestTimestamp():Date.now()+6048e5}},{Validations:b,Log:S}=r(315).Core.Utils,O=class extends b{static isAppKeyFormat(){const t=o.getAppKey();return null!=t&&""!=t&&"null"!=t&&t.length>3}static isValidFormatRequest(){const t=new S("[IND]PushValidations: "),e=o.getDeviceId();let r=!0;return this.isAppKeyFormat()||(r=!1,t.w("appKey is null or empty").writeLog()),o.isPushDisabled()||this.isValidFormat(e)||(r=!1,t.w("deviceId is null or empty").writeLog()),r}static async isPutRequestExceed(){return await _.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)}},{Config:P}=r(315).Core,{BaseClient:A}=r(315).Core.Api,{ErrorModel:R,Channel:T}=r(315).Core.Models,{TopicUtils:w,Log:N,CommonUtils:L,ErrorUtils:C}=r(315).Core.Utils,D=new class extends A{constructor(){super(),this.URL_BASE=P.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 N("[IND]Client: ")}async getURL(){return await o.getUrlDeviceApi()||this.URL_BASE}async getApplicationAll(t,e,r){if(O.isAppKeyFormat()){const n=await this.get(this.ENDPOINT_APPLICATION_ALL,t.getApplicationRequest());!n||n instanceof R?n?L.isFunction(r)&&r(n):L.isFunction(r)&&r():L.isFunction(e)&&e(n)}else L.isFunction(r)&&r(C.showError(c,c.ErrorCode.BAD_REQUEST_SERVER_ERROR));return!0}async postDevice(t,e,r){if(O.isAppKeyFormat()){const n=await this.post(this.ENDPOINT_DEVICE,t.postDeviceRequest(),"include");if(!n||n instanceof R)n?L.isFunction(r)&&r(n):L.isFunction(r)&&r();else{const t={enabled:n.data.enabled,deviceId:n.data.deviceId,registeredByCookie:n.data.registeredByCookie};await o.setDeviceId(t.deviceId),L.isFunction(e)&&e(new h(t,!0))}}else L.isFunction(r)&&r(C.showError(c,c.ErrorCode.GENERAL_ERROR_APPKEY_BAD_REQUEST));return!0}async putDevice(t,e,r){const n=new h,i=await O.isPutRequestExceed();if(t.deviceUpdate||null==await o.getPutRequestTimestamp()||i)if(O.isValidFormatRequest()){o.setPutRequestTimestamp(await _.getPutRequestTimestamp());const i=await this.put(this.ENDPOINT_DEVICE,t.putDeviceRequest(n),"include");if(!i||i instanceof R)i?L.isFunction(r)&&r(i):L.isFunction(r)&&r();else{const t={enabled:i.data.enabled,deviceId:i.data.deviceId,registeredByCookie:i.data.registeredByCookie};L.isFunction(e)&&e(new h(t,!0))}}else L.isFunction(r)&&r(C.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));else L.isFunction(e)&&e(n)}async getDevice(t,e,r){if(O.isValidFormatRequest()){const n=await this.get(this.ENDPOINT_DEVICE,t.getDeviceRequest());if(!n||n instanceof R)n?L.isFunction(r)&&r(n):L.isFunction(r)&&r();else{const t={enabled:n.data.enabled,deviceId:n.data.deviceId};L.isFunction(e)&&e(new h(t,!0))}}else L.isFunction(r)&&r(C.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async getDeviceTopics(t,e,r){if(O.isValidFormatRequest()){const n=await this.get(this.ENDPOINT_DEVICE_TOPICS,t.getDeviceTopicsRequest());!n||n instanceof R?n?L.isFunction(r)&&r(n):L.isFunction(r)&&r():L.isFunction(e)&&e(w.setTopicChannel(n.data.topics,T.PUSH))}else L.isFunction(r)&&r(C.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postDeviceTopics(t,e,r){return O.isValidFormatRequest()?await this.postDeviceTopicsRequest(t,e,r):L.isFunction(r)&&r(C.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST)),!0}async postDeviceTopicsRequest(t,e,r){const n=await this.post(this.ENDPOINT_DEVICE_TOPICS,t.postDeviceTopicsRequest());if(!n||n instanceof R)n?L.isFunction(r)&&r(n):L.isFunction(r)&&r();else{const t=n.data.topics;L.isFunction(e)&&e(t)}}async deleteDeviceTopics(t,e,r){return O.isValidFormatRequest()?this.deleteDeviceTopicsRequest(t,e,r):L.isFunction(r)&&r(C.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST)),!0}async deleteDeviceTopicsRequest(t,e,r){const n=await this.delete(this.ENDPOINT_DEVICE_TOPICS,t.deleteDeviceTopicsRequest());if(!n||n instanceof R)n?L.isFunction(r)&&r(n):L.isFunction(r)&&r();else{const t=n.data.topics;L.isFunction(e)&&e(t)}}async postEventPush(t){O.isValidFormatRequest()&&await this.post(this.ENDPOINT_EVENT_PUSH,t.postEventPushRequest())}postEventVisit(t){O.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_VISIT,t.postEventVisitRequest())}postEventPermission(t){O.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_PERMISSION,t.postEventPermissionRequest())}postEventLocation(t){O.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_LOCATION,t.postEventLocationRequest())}async getBrowser(t,e,r){if(O.isAppKeyFormat()){const n=await this.get(this.ENDPOINT_BROWSER,t);if(!n||n instanceof R)n?L.isFunction(r)&&r(n):L.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),await o.setPlatform("webpush"),L.isFunction(e)&&e(t)}}else L.isFunction(r)&&r(C.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventCustom(t,e,r){if(O.isValidFormatRequest()){const n=await this.post(this.ENDPOINT_EVENT_CUSTOM,t.postEventCustomRequest());!n||n instanceof R?n?L.isFunction(r)&&r(n):L.isFunction(r)&&r():L.isFunction(e)&&e(n)}else L.isFunction(r)&&r(C.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventCustomSync(t,e,r){if(O.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())),L.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)?L.isFunction(e)&&e():L.isFunction(r)&&r()},i.send(JSON.stringify(t.getBody()))}}catch(t){L.isFunction(r)&&r(C.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}else L.isFunction(r)&&r(C.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventJourney(t,e,r){if(O.isValidFormatRequest()){const n=await this.post(this.ENDPOINT_PUSH+this.ENDPOINT_EVENT_CUSTOM,t.postEventCustomRequest());!n||n instanceof R?n?L.isFunction(r)&&r(n):L.isFunction(r)&&r():L.isFunction(e)&&e(n)}else L.isFunction(r)&&r(C.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventJourneySync(t,e,r){if(O.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())),L.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)?L.isFunction(e)&&e():L.isFunction(r)&&r()},i.send(JSON.stringify(t.getBody()))}}catch(t){L.isFunction(r)&&r(C.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}else L.isFunction(r)&&r(C.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));return!0}async postEventPushClick(t){let e="/event/push";t.journeyStateId&&(t.setJourneyRequest(!0),e="/push/event/click"),t.setServiceWorkerRequest(!0),await this.post(e,t.postEventPushRequest())}async postTopicsSubscribeFromServiceWorker(t){t.setServiceWorkerRequest(!0),await this.post("/device/topics",t.postDeviceTopicsRequest())}},{Config:M}=r(315).Core,{BaseRequest:k}=r(315).Core.Api,x=class extends k{getApplicationRequest(){return this.params=this.PARAM_PLATFORM+"="+M.platform,this}},B=Object.freeze({PERMISSION_TYPE_PUSH:"push",PERMISSION_TYPE_LOCATION:"location"}),{CorePermissions:U}=r(315).Core.Utils,V=class{static async getPermissions(){const t=await U.getPermissions(),e=await U.getPermission("push");return e&&(t.push=e.state),null===e&&window.Notification&&window.Notification.permission&&(t.push=window.Notification.permission),t}static async setPermissionsCallback(){U.setPermissionsCallback(),await U.setCallback("push",navigator.indigitallRequestPushPermission)}},{Log:j,CommonUtils:Y,ErrorUtils:F}=r(315).Core.Utils,{EventType:G}=r(315).Core.Models,K="[IND]IndigitallSafari: ",W=class{static isSafariPushNotificationSupported(){return!!O.isSafariBrowserDevice()||!!window?.safari?.pushNotification}static async launchNotificationPermissionForSafari(){const t=new j(K);if(o.getSafariGestureRequestPermission()===G.EVENT_TYPE_ASK)if(o.getSafariWebsitePushId()&&o.getDeviceId())if(O.isSafariBrowserDevice()&&o.getWorkerPath()){const t=await navigator.serviceWorker.register(o.getWorkerPath());"granted"===await window.Notification.requestPermission()&&(o.setPermissionPush(G.EVENT_TYPE_ACCEPT),vt.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 j(K);try{if("default"===t.permission){const t={deviceCode:o.getDeviceId()};e.d("permission default: ",t).writeLog(),o.getPermissionPush()||_.callEventPermission(B.PERMISSION_TYPE_PUSH,G.EVENT_TYPE_ASK),window.safari.pushNotification.requestPermission(await D.getURL()+"/safari",o.getSafariWebsitePushId(),t,window.indigitall.Push.checkRemotePermission)}else"denied"===t.permission?(e.w("permission denied: ",t).writeLog(),o.getPermissionPush()&&o.getPermissionPush()!=G.EVENT_TYPE_REJECT&&(_.callEventPermission(B.PERMISSION_TYPE_PUSH,G.EVENT_TYPE_REJECT),o.setPermissionPush(G.EVENT_TYPE_REJECT))):"granted"===t.permission&&(e.d("permission granted: ",t).writeLog(),o.getPermissionPush()&&o.getPermissionPush()!=G.EVENT_TYPE_ACCEPT&&(_.callEventPermission(B.PERMISSION_TYPE_PUSH,G.EVENT_TYPE_ACCEPT),o.setPermissionPush(G.EVENT_TYPE_ACCEPT)),t.deviceToken&&t.deviceToken!==o.getPushToken()&&(o.setPushToken(t.deviceToken),D.putDevice(new p,(t=>{if(Y.isFunction(navigator.indigitallOnInitialized)){const t={};t.push=o.getPermissionPush(),t.location=o.getPermissionLocation(),navigator.indigitallOnInitialized(t,new h)}Y.isFunction(navigator.indigitallOnNewUserRegistered)&&!o.getNewUserTimestamp()&&(o.setNewUserTimestamp(Date.now()),navigator.indigitallOnNewUserRegistered(t)),vt.registerLocation()}),navigator.indigitallOnError),o.setServiceTimestamp(Date.now())))}catch(t){Y.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(F.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}},q=new class{constructor(){this.TOPIC_SYNC_TIMESTAMP=3e4,this.TOPIC_SYNC_TAG="syncTopics",this.TOPIC_SYNC_SUBSCRIBE_CALLBACK="indigitallSyncTopicSubscribeOnSuccess",this.TOPIC_SYNC_SUBSCRIBE_ERROR_CALLBACK="indigitallSyncTopicSubscribeOnError",this.TOPIC_SYNC_UNSUBSCRIBE_CALLBACK="indigitallSyncTopicUnsubscribeOnSuccess",this.TOPIC_SYNC_UNSUBSCRIBE_ERROR_CALLBACK="indigitallSyncTopicUnsubscribeOnError"}},H=Object.freeze({GREEN:"green",RED:"red"}),{CommonUtils:X}=r(315).Core.Utils,J=class{static async setTopicRequest(t){const e=new p;return e.setAppKey(await o.getAppKeySync()),e.setDeviceId(await o.getDeviceIdSync()),e.setServiceWorkerRequest(!0),e.setTopics(t),e}static async getTopicsList(t,e){try{const r=await o.getTopicList();r&&r.length>0?await st.isTopicTimestampExceed()?this.getDeviceTopicClient(t,e):(await o.setTopicSemaphore(H.GREEN),X.isFunction(t)&&t(r)):this.getDeviceTopicClient(t,e)}catch(t){await o.setTopicSemaphore(H.GREEN)}}static async getDeviceTopicClient(t,e){try{D.getDeviceTopics(new p,(async e=>{await st.setTopicTimestamp(),await o.setTopicList(e),await o.setTopicSemaphore(H.GREEN),X.isFunction(t)&&t(e)}),(async t=>{await st.setTopicTimestamp(),await o.setTopicSemaphore(H.GREEN),X.isFunction(e)&&e(t)}))}catch(t){await o.setTopicSemaphore(H.GREEN),X.isFunction(e)&&e(t)}}},$=class{constructor(t,e){this.code=t,this.type=e}static getAllCodes(t){const e=[];for(let r=0;r<t.length;r++)e.push(t[r].code);return e}toJSON(){const t={};return this.code&&(t.code=this.code),this.type&&(t.type=this.type),t}},{Channel:Q,TopicSubscribeType:z}=r(315).Core.Models,{ErrorUtils:Z,Log:tt}=r(315).Core.Utils;class et{static async syncTopics(){if(!await o.getTopicSyncIsProcessing()){await o.setTopicSyncIsProcessing(!0);const t=setTimeout((async function(){try{await et.sendTopicSync()}catch(t){}await o.setTopicSyncIsProcessing(!1),clearTimeout(t)}),q.TOPIC_SYNC_TIMESTAMP)}}static async sendTopicSync(){const t=await st.filterTopicExistingOnIDB(),e=st.topicFilter(t,z.SUBSCRIBE),r=st.topicFilter(t,z.UNSUBSCRIBE);if(e&&e.length>0)D.postDeviceTopicsRequest(await J.setTopicRequest(e),(async t=>{await st.setTopicTimestamp(),t.channel=Q.PUSH,await o.setTopicList(t),st.indigitallSyncTopicEvent(q.TOPIC_SYNC_SUBSCRIBE_CALLBACK,t)}),(async t=>{st.indigitallSyncTopicEvent(q.TOPIC_SYNC_SUBSCRIBE_ERROR_CALLBACK,t)}));else if(r&&r.length>0)D.deleteDeviceTopicsRequest(await J.setTopicRequest(r),(async t=>{await st.setTopicTimestamp(),await o.setTopicList(t),st.indigitallSyncTopicEvent(q.TOPIC_SYNC_UNSUBSCRIBE_CALLBACK,t)}),(async t=>{st.indigitallSyncTopicEvent(q.TOPIC_SYNC_UNSUBSCRIBE_ERROR_CALLBACK,t)}));else{const t=Z.showError(c,c.ErrorCode.PUSH_TOPICS_ERROR,"there is no topic with one of the codes in the push topic list");st.indigitallSyncTopicEvent(q.TOPIC_SYNC_SUBSCRIBE_ERROR_CALLBACK,t),st.indigitallSyncTopicEvent(q.TOPIC_SYNC_UNSUBSCRIBE_ERROR_CALLBACK,t)}await o.setUpdateTopicSubscribe([])}static async updateTopicAction(t,e){const r=await o.getUpdateTopicSubscribe();if(r&&r.length>0){const n=new tt("[IND]TopicSyncUtils: ");try{const n=[],i=r.filter((e=>t.includes(e.code))),s=t.filter((t=>!$.getAllCodes(r).includes(t)));if(s&&s.length>0)for(let t=0;t<s.length;t++)null!==s[t]&&n.push(new $(s[t],e).toJSON());if(i&&i.length>0)for(let t=0;t<i.length;t++){const n=r.findIndex((e=>e.code===i[t].code)),o=new $(i[t].code,e);r[n]=o.toJSON()}n.length>0&&await o.setUpdateTopicSubscribe(n.concat(r))}catch(t){n.e("updateTopicAction: "+t).writeLog()}}else{const r=[];for(let n=0;n<t.length;n++){const i=t[n];r.push({code:i,type:e})}await o.setUpdateTopicSubscribe(r)}}}const rt=et,{TopicSubscribeType:nt}=r(315).Core.Models,{CommonUtils:it}=r(315).Core.Utils;class ot{static async updateTopic(t,e,r,n){ot.checkTopicSemaphore().then((async()=>{await o.setTopicSemaphore(H.RED),await J.getTopicsList((async i=>{await this.setTopicCallbacks(t,r,n),await this.requestTopicBackground(q.TOPIC_SYNC_TAG),await rt.updateTopicAction(e,t)}),n)}))}static async checkTopicSemaphore(){if(await o.getTopicSemaphore()!=H.RED)return!0;this.topicSemaphoreWaitTime((()=>!0))}static async topicSemaphoreWaitTime(t){const e=setInterval((async function(){await o.getTopicSemaphore()==H.GREEN&&(clearInterval(e),t())}),1e3)}static async setTopicCallbacks(t,e,r){let n=q.TOPIC_SYNC_SUBSCRIBE_CALLBACK,i=q.TOPIC_SYNC_SUBSCRIBE_ERROR_CALLBACK;t===nt.UNSUBSCRIBE&&(n=q.TOPIC_SYNC_UNSUBSCRIBE_CALLBACK,i=q.TOPIC_SYNC_UNSUBSCRIBE_ERROR_CALLBACK);const o=new BroadcastChannel(n);o.onmessage=t=>{it.isFunction(e)&&e(t.data),o.close()};const s=new BroadcastChannel(i);s.onmessage=t=>{it.isFunction(r)&&r(t.data),s.close()}}static async requestTopicBackground(t){const e=await v.requestBackgroundSync();null!=e&&await e.sync.register(t)}static async isTopicTimestampExceed(){const t=await o.getTopicSyncTimestamp();return!(t&&t>Date.now())&&void 0!==t}static async setTopicTimestamp(){const t=Date.now()+q.TOPIC_SYNC_TIMESTAMP;await o.setTopicSyncTimestamp(t)}static indigitallSyncTopicEvent(t,e){new BroadcastChannel(t).postMessage(e)}static topicFilter(t,e){const r=[];if(t)for(let n=0;n<t.length;n++)t[n].type===e&&r.push(t[n].code);return r}static async filterTopicExistingOnIDB(){const t=await o.getUpdateTopicSubscribe(),e=await o.getTopicList(),r=[];for(let n=0;n<t.length;n++)for(let i=0;i<e.length;i++)t[n]&&e[i]&&t[n].code==e[i].code&&(!0===e[i].subscribed&&t[n].type==nt.UNSUBSCRIBE||!1===e[i].subscribed&&t[n].type==nt.SUBSCRIBE)&&r.push(t[n]);return r}}const st=ot,{EventType:at,DeviceStatus:ut}=r(315).Core.Models,{LogLevel:ct,Log:lt,CommonUtils:ht,ErrorUtils:ft,CryptoUtils:dt}=r(315).Core.Utils,{Repository:pt}=r(315).Core,Et="[IND]IndigitallPush: ";class yt{constructor(){this.config=null,this.interval=null}static async init(t){try{let r=new lt(Et);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 lt(Et)):this.config.setDebugLog&&(o.setLogLevel(ct.WARNING),r=new lt(Et));let n="https://device-api.indigitall.com/v1",i="https://inbox-api.indigitall.com/v1",s="https://device-api.indigitall.com/v2";if(this.config.urlDeviceApi&&(n=this.config.urlDeviceApi),this.config.urlInAppApi&&(s=this.config.urlInAppApi),this.config.urlInboxApi&&(i=this.config.urlInboxApi),(new pt).setAvoidCypher(!!this.config.avoidCypher&&this.config.avoidCypher),await o.setUrlDeviceApi(n),e()&&e().setUrlInboxApi(i),ht.isFunction(this.config.requestPushPermission)&&(navigator.indigitallRequestPushPermission=this.config.requestPushPermission),ht.isFunction(this.config.requestLocationPermission)&&(navigator.indigitallRequestLocationPermission=this.config.requestLocationPermission),ht.isFunction(this.config.onNewUserRegistered)&&(navigator.indigitallOnNewUserRegistered=this.config.onNewUserRegistered),ht.isFunction(this.config.onInitialized)&&(navigator.indigitallOnInitialized=this.config.onInitialized),ht.isFunction(this.config.onError)&&(navigator.indigitallOnError=this.config.onError),ht.isFunction(this.config.onLocationUpdated)&&(navigator.indigitallOnLocationUpdated=this.config.onLocationUpdated),this.config.disabledPushService)return this.config.appKey&&await o.setAppKey(this.config.appKey),o.setPushDisabled(!0),r.i("Push Service disabled").writeLog(),ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError("Push Service disabled"),!1;const a=await V.getPermissions();if(V.setPermissionsCallback(),a&&"denied"===a.push)return r.i("Push permission denied").writeLog(),ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError("Push permission denied"),!1;if(!ht.isServiceTimestampExceed())return this.device=new h,V.getPermissions().then((t=>{ht.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(t,new h)})),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,o.setWorkerPath(n)),t){if(await o.setAppKey(t),yt.isServiceWorkerSupported()){const t=new x;return D.getBrowser(t,(t=>{if(t.supported||this.isSafariBrowserDevice()){r.d("browser supported for webpush").writeLog();const i=new x;D.getApplicationAll(i,(async i=>{if(r.d("application ",i).writeLog(),i&&i.data&&i.data.configuration){const t=i.data.configuration;r.d("configuration ",t).writeLog(),t.vapidPublic&&o.setVAPID(t.vapidPublic),t.safariWebsitePushId&&o.setSafariWebsitePushId(t.safariWebsitePushId),t.enabled&&o.setEnabled(t.enabled),t.serviceSyncTime&&o.setServiceSyncTime(t.serviceSyncTime),t.locationEnabled&&o.setLocationEnabled(t.locationEnabled),t.locationUpdateMinutes&&o.setLocationUpdateMinutes(t.locationUpdateMinutes),t.inboxAuthMode&&e()&&e().setInboxAuthMode(t.inboxAuthMode),t.inAppEnabled&&(o.setInAppEnabled(t.inAppEnabled),await o.setUrlInappApi(s))}const a=new p;o.getDeviceId()&&o.getPushToken()?D.putDevice(a,(e=>{try{if(ht.isServiceTimestampExceed()){const t=new I;t.setAppKey(o.getAppKey()),t.setDeviceId(o.getDeviceId()),D.postEventVisit(t)}e.registeredByCookie?(o.setServiceTimestamp(Date.now()),V.getPermissions().then((t=>{const e=new h;e.deviceId&&r.i("deviceId:",e.deviceId).writeLog(),e.pushToken&&r.i("pushToken:",e.pushToken).writeLog(),this.config&&ht.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(t,e)}))):"Safari"!==t.browserName&&yt.registerForPush(n)}catch(t){ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ft.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}),navigator.indigitallOnError):D.postDevice(a,(e=>{try{const r=new I;r.setAppKey(o.getAppKey()),r.setDeviceId(o.getDeviceId()),D.postEventVisit(r),e.registeredByCookie?o.setServiceTimestamp(Date.now()):"Safari"!==t.browserName&&yt.registerForPush(n)}catch(t){ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ft.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}),(t=>{404===t.errorCode&&o.clearStorage(),ht.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){ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ft.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}return!1}static deviceGet(t,e){return D.getDevice(new p,t,e),!0}static deviceEnable(t,e){const r=new p(ut.ENABLE);return r.isDeviceUpdated(!0),D.putDevice(r,t,e),!0}static deviceDisable(t,e){const r=new p(ut.DISABLE);return r.isDeviceUpdated(!0),D.putDevice(r,t,e),!0}static topicsList(t,e){return D.getDeviceTopics(new p,(async e=>{ht.isFunction(t)&&t(e)}),(t=>{ht.isFunction(e)&&e(t)})),!0}static topicsSubscribe(t,e,r){const n=new p;return n.setTopics(t),D.postDeviceTopics(n,(t=>{ht.isFunction(e)&&e(t)}),(t=>{ht.isFunction(r)&&r(t)})),!0}static topicsUnsubscribe(t,e,r){const n=new p;return n.setTopics(t),D.deleteDeviceTopics(n,(t=>{ht.isFunction(e)&&e(t)}),(t=>{ht.isFunction(r)&&r(t)})),!0}static async topicsSubscribeUpdate(t,e,r,n){st.updateTopic(t,e,r,n)}static registerForPush(t){o.setWorkerPath(t),yt.isServiceWorkerSupported()&&yt.launchNotificationPermission(t)}static isSafariPushNotificationSupported(){return W.isSafariPushNotificationSupported()}static isServiceWorkerSupported(){return"serviceWorker"in navigator}static registerServiceWorker(t){const e=new lt(Et);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 launchNotificationPermissionForSafari(){this.registerForPush(o.getWorkerPath())}static isSafariBrowserDevice(){return O.isSafariBrowserDevice()}static launchNotificationPermission(t){const e=new lt(Et);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?yt.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&&yt.subscribeForPushNotification(t)}))))}catch(t){ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ft.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,t))}}))}static async subscribeForPushNotification(t){const e=new lt(Et);try{const r={userVisibleOnly:!0,applicationServerKey:_.urlBase64ToUint8Array(o.getVAPID())};e.d("Registration: ",t).writeLog(),o.getPermissionPush()||_.callEventPermission(B.PERMISSION_TYPE_PUSH,at.EVENT_TYPE_ASK);const n=await t.pushManager.subscribe(r);e.d("Received PushSubscription: "+n).writeLog(),o.getPermissionPush()&&o.getPermissionPush()===at.EVENT_TYPE_ACCEPT||(_.callEventPermission(B.PERMISSION_TYPE_PUSH,at.EVENT_TYPE_ACCEPT),o.setPermissionPush(at.EVENT_TYPE_ACCEPT));const i=n.toJSON();o.setBrowserPublicKey(i.keys.p256dh),o.setBrowserPrivateKey(i.keys.auth),o.setPushToken(i.endpoint),D.putDevice(new p,(t=>{V.getPermissions().then((t=>{ht.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(t,new h)})),ht.isFunction(navigator.indigitallOnNewUserRegistered)&&!o.getNewUserTimestamp()&&(o.setNewUserTimestamp(Date.now()),navigator.indigitallOnNewUserRegistered(t)),yt.registerLocation()}),navigator.indigitallOnError),o.setServiceTimestamp(Date.now())}catch(t){e.e("No Registration: "+t).writeLog(),o.getPermissionPush()&&o.getPermissionPush()===at.EVENT_TYPE_REJECT||(_.callEventPermission(B.PERMISSION_TYPE_PUSH,at.EVENT_TYPE_REJECT),o.setPermissionPush(at.EVENT_TYPE_REJECT)),ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(t)}}static registerLocation(){const t=new lt(Et);try{navigator.geolocation&&o.getRequestLocation()&&o.getLocationEnabled()&&(!o.getLocationTimestamp()||o.getLocationUpdateMinutes()<=(Date.now()-o.getLocationTimestamp())/6e4)&&(o.getPermissionLocation()||_.callEventPermission(B.PERMISSION_TYPE_LOCATION,at.EVENT_TYPE_ASK),navigator.geolocation.getCurrentPosition((t=>{o.getPermissionLocation()||o.getPermissionLocation()==at.EVENT_TYPE_ACCEPT||(_.callEventPermission(B.PERMISSION_TYPE_LOCATION,at.EVENT_TYPE_ACCEPT),o.setPermissionLocation(at.EVENT_TYPE_ACCEPT));const e=new I;e.setLocation(t.coords.latitude,t.coords.longitude),D.postEventLocation(e),ht.isFunction(navigator.indigitallOnLocationUpdated)&&navigator.indigitallOnLocationUpdated(t),o.setLocationTimestamp(Date.now())}),(e=>{t.e("error "+e).writeLog(),o.getPermissionLocation()||o.getPermissionLocation()==at.EVENT_TYPE_REJECT||(_.callEventPermission(B.PERMISSION_TYPE_LOCATION,at.EVENT_TYPE_REJECT),o.setPermissionLocation(at.EVENT_TYPE_REJECT))})))}catch(t){ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ft.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}static requestPushPermission(t){V.getPushPermission().then((e=>{ht.isFunction(t)&&t(e)}))}static onPermissionChange(){V.setPermissionCallback()}static requestLocationPermission(t){V.getLocationPermission().then((e=>{ht.isFunction(t)&&t(e)}))}static logIn(t,e,r){yt.setExternalId(t,e,r)}static logout(t,e){yt.setExternalId(null,t,e)}static setExternalCode(t,e,r){yt.setExternalId(t,e,r)}static async setExternalId(t,e,r){try{const n=o.getAppKey();if(!n)return void(ht.isFunction(r)&&r(ft.showError(c,c.ErrorCode.API_APPKEY_NOT_VALID)));if(null!=t){const i=await dt.createHmac(n,t);i&&this.setExternalIdRequest(i,e,r)}else this.setExternalIdRequest(null,e,r)}catch(t){ht.isFunction(r)&&r(ft.showError(c,c.ErrorCode.PUSH_DEVICE_ERROR,t))}}static async setExternalIdRequest(t,e,r){if(o.setExternalId(t),o.isPushDisabled())ht.isFunction(r)&&r(ft.showError(c,c.ErrorCode.DISABLED_CHANNEL));else{const n=new p;await o.setExternalIdRequest(t),n.setExternalCode(t),n.isDeviceUpdated(!0),D.putDevice(n,(t=>{ht.isFunction(e)&&e(new h(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 I;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?D.postEventJourneySync(a,e,r):D.postEventJourney(a,e,r)):!1===s?D.postEventCustomSync(a,e,r):D.postEventCustom(a,e,r)}catch(t){ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ft.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 I;a.setDeviceId(o.getDeviceId()),a.setExternalCodeRequest(),a.setEventType(n),a.setCustomData(i),a.setJourneyRequest(!0),!1===s?D.postEventJourneySync(a,e,r):D.postEventJourney(a,e,r)}catch(t){ht.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(ft.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,t))}}}const vt=yt;window.indigitall||(window.indigitall={}),window.indigitall.Push=yt,window.indigitall.LogLevel=ct,window.indigitall.version=o.getVersion()})(),n})(),t.exports=e()},904:t=>{"use strict";t.exports=JSON.parse('{"_from":"indigitall-web-core@4.9.2","_id":"indigitall-web-core@4.9.2","_inBundle":false,"_integrity":"sha512-aGTfAnLDU6FrokX4B7XvAWEX2Obl/hlcz9OTPFOI/yQIwIKpjfZJ1BEVeCWvDiSEAYhLek73ppnFdV66cUxcGA==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.9.2","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.9.2","saveSpec":null,"fetchSpec":"4.9.2"},"_requiredBy":["#USER","/","/indigitall-web-notification"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.9.2.tgz","_shasum":"710cb6aaf9858cce437e850a450c7fc81cf71a03","_spec":"indigitall-web-core@4.9.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.9.2"}')},330:t=>{"use strict";t.exports=JSON.parse('{"name":"indigitall-web-sdk","description":"indigitall webpush SDK","version":"4.9.2","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","dependencies":{"indigitall-web-core":"^4.9.2","indigitall-web-customer":"^4.9.2","indigitall-web-inapp":"^4.9.2","indigitall-web-inbox":"^4.9.2","indigitall-web-notification":"^4.9.2"},"devDependencies":{"@babel/preset-env":"^7.18.10","babel-loader":"^8.2.5","filemanager-webpack-plugin":"^7.0.0","idempotent-babel-polyfill":"^7.4.4","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","build-sdk":"npm run build-install-core && npm run build-install-inapp && npm run build","build-install-core":"npm uninstall indigitall-web-core && npm install ../core","build-install-inapp":"npm uninstall indigitall-web-inapp && npm install ../inapp","build-install-customer":"npm uninstall indigitall-web-customer && npm install ../customer","build-install-inbox":"npm uninstall indigitall-web-inbox && npm install ../inbox","build-install-push":"npm uninstall indigitall-web-notification && npm install ../push","install-sdk":"npm install && npm run build","release-install-core":"npm uninstall indigitall-web-core && npm install indigitall-web-core@$npm_package_version","release-install-inapp":"npm uninstall indigitall-web-inapp && npm install indigitall-web-inapp@$npm_package_version ","release-install-customer":"npm uninstall indigitall-web-customer && npm install indigitall-web-customer@$npm_package_version ","release-install-inbox":"npm uninstall indigitall-web-inbox && npm install indigitall-web-inbox@$npm_package_version ","release-install-push":"npm uninstall indigitall-web-notification && npm install indigitall-web-notification@$npm_package_version && npm run release-install-core && npm run release-install-inapp && npm run release-install-inbox && npm run release-install-customer && npm run install-sdk && npm run delete-node-modules","simulate-release-install-sdk":"npm run install-sdk && npm run delete-node-modules","delete-node-modules":"rm -rf node_modules/ && rm -f package-lock.json"}}')}},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(326),e=r.n(t),i=r(824),o=r.n(i),s=r(960),a=r.n(s),u=r(603),c=r.n(u);const{Log:l,LogLevel:h,CommonUtils:f,ErrorUtils:d}=r(315).Core.Utils,{Repository:p}=r(315).Core,E=r(330),{Channel:y}=r(315).Core.Models,v="[IND]Indigitall: ";class g{constructor(){this.config=null}static async init(t){return c().init(t)}static deviceGet(t,e){return c().deviceGet(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((e=>{this.inAppTopicList(e,t,(r=>{new l(v).w(r.message).writeLog(),f.isFunction(t)&&t(e)}))}),(r=>{new l(v).w(r).writeLog(),this.inAppTopicList(null,t,e),f.isFunction(e)&&e(r)}))}static async inAppTopicList(t,r,n){"true"===(new p).isInAppEnabled()?e().topicsList((async e=>{null!=t?(await(new p).setTopicList(t),await(new p).setInAppTopicList(e),f.isFunction(r)&&r(e.concat(t))):(await(new p).setInAppTopicList(e),f.isFunction(r)&&r(e))}),(async e=>{null!=t?(await(new p).setTopicList(t),f.isFunction(r)&&r(t)):f.isFunction(n)&&n(e)})):null!=t?(await(new p).setTopicList(t),f.isFunction(r)&&r(t)):f.isFunction(n)&&n(d.showError(null,null,"Internal error bad topic list"))}static topicsSubscribe(t,r,n){"true"===(new p).isInAppEnabled()?e().topicsSubscribe(t,(e=>{this.pushTopicsSubscribe(t,e,r,n)}),(async e=>{new l(v).w(e).writeLog(),this.pushTopicsSubscribe(t,null,r,n)})):this.pushTopicsSubscribe(t,null,r,n)}static pushTopicsSubscribe(t,e,r,n){c().topicsSubscribe(t,(async t=>{this.topicActionOnSuccess(e,t,r)}),(async t=>{this.topicActionOnError(e,t,r,n)}))}static async topicsUnsubscribe(t,r,n){"true"===(new p).isInAppEnabled()?e().topicsUnsubscribe(t,(e=>{this.pushTopicsUnsubscribe(t,e,r,n)}),(async e=>{new l(v).w(e).writeLog(),this.pushTopicsUnsubscribe(t,null,r,n)})):this.pushTopicsUnsubscribe(t,null,r,n)}static pushTopicsUnsubscribe(t,e,r,n){c().topicsUnsubscribe(t,(async t=>{this.topicActionOnSuccess(e,t,r)}),(async t=>{this.topicActionOnError(e,t,r,n)}))}static async topicActionOnSuccess(t,e,r){let n=[];null!=t&&(n=t,await(new p).setInAppTopicList(t)),null!=e&&await(new p).setTopicList(e),f.isFunction(r)&&r(n.concat(e))}static async topicActionOnError(t,e,r,n){new l(v).w(`${e.errorCode}: ${e.exceptionMessage}`).writeLog(),null!=t?(await(new p).setInAppTopicList(t),f.isFunction(r)&&r(t)):f.isFunction(n)&&n(e)}static async setExternalId(t,e,r){c().setExternalId(t,e,r)}static logIn(t,e,r){g.setExternalId(t,e,r)}static logout(t,e){g.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,h){e().showInAppWithConfig(t,r,n,i,o,s,a,u,c,l,h)}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,h){e().showMultipleInAppWithConfig(t,r,n,i,o,s,a,u,c,l,h)}static getInboxMessagesCount(t,e,r){o().getMessagesCountWithAuth(t,e,r)}static getInbox(t,e,r){o().getInboxWithAuth(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){g.logIn(t,(t=>{a().link(e,r,n)}),(t=>{f.isFunction(n)&&n(t)}))}static unlink(t,e,r){g.logout((n=>{a().unlink(t,e,r)}),(t=>{f.isFunction(r)&&r(t)}))}static sendCustomerCustomEvent(t,e,r,n){a().sendCustomerCustomEvent(t,e,r,n)}}window.indigitall=g,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=y,window.indigitall.LogLevel=h,window.indigitall.version=E.version})(),n})()));