indigitall-web-sdk 4.16.4 → 4.16.6

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.
Files changed (3) hide show
  1. package/package.json +6 -6
  2. package/sdk.js +643 -0
  3. package/sdk.min.js +1 -1
package/sdk.js ADDED
@@ -0,0 +1,643 @@
1
+ "use strict";function _regeneratorValues(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function next(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e};}};}throw new TypeError(_typeof2(e)+" is not iterable");}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray2(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _superPropGet(t,o,e,r){var p=_get12(_getPrototypeOf2(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get12(){return _get12="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get12.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf2(t)););return t;}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray2(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray2(r);}function _createForOfIteratorHelper2(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray2(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0,F=function F(){};return{s:F,n:function(_n59){function n(){return _n59.apply(this,arguments);}n.toString=function(){return _n59.toString();};return n;}(function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]};}),e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function _unsupportedIterableToArray2(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray2(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray2(r,a):void 0;}}function _arrayLikeToArray2(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _defineProperty2(e,r,t){return(r=_toPropertyKey2(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _callSuper2(t,o,e){return o=_getPrototypeOf2(o),_possibleConstructorReturn2(t,_isNativeReflectConstruct2()?Reflect.construct(o,e||[],_getPrototypeOf2(t).constructor):o.apply(t,e));}function _possibleConstructorReturn2(t,e){if(e&&("object"==_typeof2(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized2(t);}function _assertThisInitialized2(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct2(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct2=function _isNativeReflectConstruct2(){return!!t;})();}function _getPrototypeOf2(t){return _getPrototypeOf2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf2(t);}function _inherits2(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&&_setPrototypeOf2(t,e);}function _setPrototypeOf2(t,e){return _setPrototypeOf2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf2(t,e);}function _regenerator2(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine4(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a;}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0));}if(o||r>1)return a;throw y=!0,n;}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0);}else 1===c&&(t=i["return"])&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e;}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break;}catch(t){i=e,c=1,u=t;}finally{f=1;}}return{value:t,done:y};};}(r,o,i),!0),u;}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine4(t={},n,function(){return this;}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine4(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e;}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine4(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine4(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine4(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine4(u),_regeneratorDefine4(u,o,"Generator"),_regeneratorDefine4(u,n,function(){return this;}),_regeneratorDefine4(u,"toString",function(){return"[object Generator]";}),(_regenerator2=function _regenerator2(){return{w:i,m:f};})();}function _regeneratorDefine4(e,r,n,t){var i=Object.defineProperty;try{i({},"",{});}catch(e){i=0;}_regeneratorDefine4=function _regeneratorDefine3(e,r,n,t){function o(r,n){_regeneratorDefine4(e,r,function(e){return this._invoke(r,n,e);});}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2));},_regeneratorDefine4(e,r,n,t);}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator2(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _classCallCheck2(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey2(o.key),o);}}function _createClass2(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey2(t){var i=_toPrimitive2(t,"string");return"symbol"==_typeof2(i)?i:i+"";}function _toPrimitive2(t,r){if("object"!=_typeof2(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof2(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _typeof2(o){"@babel/helpers - typeof";return _typeof2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof2(o);}(function webpackUniversalModuleDefinition(root,factory){if((typeof exports==="undefined"?"undefined":_typeof2(exports))==='object'&&(typeof module==="undefined"?"undefined":_typeof2(module))==='object')module.exports=factory();else if(typeof define==='function'&&define.amd)define([],factory);else{var a=factory();for(var i in a)((typeof exports==="undefined"?"undefined":_typeof2(exports))==='object'?exports:root)[i]=a[i];}})(void 0,function(){return/******/function(){// webpackBootstrap
2
+ /******/var __webpack_modules__={/***/710:function _(module){!function(e,t){if(true)module.exports=t();else// removed by dead control flow
3
+ {var i,s;}}(this,function(){return function(_Class){"use strict";var e={330:function _(e){e.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.16.6","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"}}');}},t={};function s(i){var r=t[i];if(void 0!==r)return r.exports;var n=t[i]={exports:{}};return e[i](n,n.exports,s),n.exports;}s.d=function(e,t){for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]});},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t);},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0});};var i={};s.r(i),s.d(i,{"default":function _default(){return F;}});var r={};s.r(r),s.d(r,{BaseApplicationRequest:function BaseApplicationRequest(){return D;},BaseClient:function BaseClient(){return p;},BaseEventRequest:function BaseEventRequest(){return w;},BaseRequest:function BaseRequest(){return y;}});var n={};s.r(n),s.d(n,{Channel:function Channel(){return M;},CoreApplication:function CoreApplication(){return f;},Device:function Device(){return b;},DeviceStatus:function DeviceStatus(){return v;},EncryptionType:function EncryptionType(){return T;},ErrorDictionary:function ErrorDictionary(){return m;},ErrorModel:function ErrorModel(){return u;},EventType:function EventType(){return U;},TopicSubscribeType:function TopicSubscribeType(){return B;}});var o={};s.r(o),s.d(o,{CommonUtils:function CommonUtils(){return C;},CorePermissions:function CorePermissions(){return V;},CryptoUtils:function CryptoUtils(){return W;},DateUtils:function DateUtils(){return L;},ErrorUtils:function ErrorUtils(){return N;},JsonUtils:function JsonUtils(){return x;},Log:function Log(){return O;},LogLevel:function LogLevel(){return g;},TopicUtils:function TopicUtils(){return k;},Validations:function Validations(){return H;}});var a={platform:"webpush",version:"0.0.1"};var E=s(330);a.version=E.version;var h=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"}});var c=new(/*#__PURE__*/function(){function _class(){_classCallCheck2(this,_class);this.storage=this.isLocalStorageAvailable()?window.localStorage:null;}return _createClass2(_class,[{key:"isLocalStorageAvailable",value:function isLocalStorageAvailable(){try{var _e2=window.localStorage,_t6="__storage_test__";if(_e2)return _e2.setItem(_t6,_t6),_e2.removeItem(_t6),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==c.length;}return!1;}},{key:"setItem",value:function setItem(e,t){return null!=this.storage&&(this.storage.setItem(e,t),!0);}},{key:"getItem",value:function getItem(e){return null!=this.storage?this.storage.getItem(e):null;}},{key:"deleteItem",value:function deleteItem(e){return!!this.storage&&(this.storage.setItem(e,value),!0);}},{key:"clear",value:function clear(){this.storage&&this.storage.clear();}}]);}())(),I=c;var l=new(/*#__PURE__*/function(){function _class2(){_classCallCheck2(this,_class2);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;}return _createClass2(_class2,[{key:"getDB",value:function(){var _getDB2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee16(){var _this4=this;return _regenerator2().w(function(_context16){while(1)switch(_context16.n){case 0:return _context16.a(2,new Promise(function(e,t){var s=_this4.IDB;if(s){var _i2=s.open("indigitall.indexedDB",1);_i2.onupgradeneeded=function(){_i2.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key");},_i2.onsuccess=function(){var t=_i2.result,s=t.transaction("indigitallStore","readwrite"),r=s.objectStore("indigitallStore"),n=r.index("storeIndex");e({db:t,tx:s,store:r,index:n});},_i2.onerror=function(e){t(e);};}else t(!1);}));}},_callee16);}));function getDB(){return _getDB2.apply(this,arguments);}return getDB;}()},{key:"get",value:function(){var _get2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee17(e,t){var _this5=this;return _regenerator2().w(function(_context17){while(1)switch(_context17.n){case 0:return _context17.a(2,new Promise(function(s,i){e||i(!1),e.index.get(t).onsuccess=function(t){t.target.result&&(_this5.close(e),s(t.target.result.store.value)),i(!1);};}));}},_callee17);}));function get(_x13,_x14){return _get2.apply(this,arguments);}return get;}()},{key:"put",value:function(){var _put2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee18(e,t,s){var _this6=this;return _regenerator2().w(function(_context18){while(1)switch(_context18.n){case 0:return _context18.a(2,new Promise(function(i,r){e||r(!1),e.store.put({store:{key:t,value:s}},t).onsuccess=function(t){_this6.close(e),i(s);};}));}},_callee18);}));function put(_x15,_x16,_x17){return _put2.apply(this,arguments);}return put;}()},{key:"close",value:function close(e){if(e.tx)try{e.tx.oncomplete=function(){e.db.close();};}catch(e){console.log(this.TAG,e);}}},{key:"setItem",value:function(){var _setItem2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee19(e,t){var _s,_t7;return _regenerator2().w(function(_context19){while(1)switch(_context19.p=_context19.n){case 0:_context19.p=0;_context19.n=1;return this.getDB();case 1:_s=_context19.v;return _context19.a(2,this.put(_s,e,t));case 2:_context19.p=2;_t7=_context19.v;return _context19.a(2,_t7);}},_callee19,this,[[0,2]]);}));function setItem(_x18,_x19){return _setItem2.apply(this,arguments);}return setItem;}()},{key:"getItem",value:function(){var _getItem2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee20(e){var _t8,_t9;return _regenerator2().w(function(_context20){while(1)switch(_context20.p=_context20.n){case 0:_context20.p=0;_context20.n=1;return this.getDB();case 1:_t8=_context20.v;return _context20.a(2,this.get(_t8,e));case 2:_context20.p=2;_t9=_context20.v;return _context20.a(2,_t9);}},_callee20,this,[[0,2]]);}));function getItem(_x20){return _getItem2.apply(this,arguments);}return getItem;}()}]);}())();var d=new(/*#__PURE__*/function(){function _class3(){_classCallCheck2(this,_class3);this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null;}return _createClass2(_class3,[{key:"isSessionStorageAvailable",value:function isSessionStorageAvailable(){try{var _e3=window.sessionStorage,_t0="__storage_test__";if(_e3)return _e3.setItem(_t0,_t0),_e3.removeItem(_t0),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==d.length;}return!1;}},{key:"getItem",value:function getItem(e){return null!=this.session?this.session.getItem(e):null;}},{key:"setItem",value:function setItem(e,t){return null!=this.session&&(this.session.setItem(e,t),!0);}},{key:"clearMessages",value:function clearMessages(){this.session&&this.session.removeItem("messages");}}]);}())(),_=d,T=Object.freeze({RAW:"raw",HASH:"hash"});var R=/*#__PURE__*/function(){function R(){_classCallCheck2(this,R);this.storage=I,this.db=l,this.BASE_TIME=60,this.REPOSITORY="indigitall.repository",this.APP_KEY=this.REPOSITORY+".APP_KEY",this.VAPID_PUBLIC=this.REPOSITORY+".VAPID_PUBLIC",this.ENABLED=this.REPOSITORY+".ENABLED",this.DEVICE_ID=this.REPOSITORY+".DEVICE_ID",this.SERVICE_SYNC_TIME=this.REPOSITORY+".SERVICE_SYNC_TIME",this.LOCATION_ENABLED=this.REPOSITORY+".LOCATION_ENABLED",this.LOCATION_UPDATE_MINUTES=this.REPOSITORY+".LOCATION_UPDATE_MINUTES",this.REQUEST_LOCATION=this.REPOSITORY+".REQUEST_LOCATION",this.BROWSER_PUBLIC_KEY=this.REPOSITORY+".BROWSER_PUBLIC_KEY",this.BROWSER_PRIVATE_KEY=this.REPOSITORY+".BROWSER_PRIVATE_KEY",this.PLATFORM=this.REPOSITORY+".PLATFORM",this.BROWSER_NAME=this.REPOSITORY+".BROWSER_NAME",this.BROWSER_VERSION=this.REPOSITORY+".BROWSER_VERSION",this.OS_NAME=this.REPOSITORY+".OS_NAME",this.OS_VERSION=this.REPOSITORY+".OS_VERSION",this.DEVICE_TYPE=this.REPOSITORY+".DEVICE_TYPE",this.SUPPORTED=this.REPOSITORY+".SUPPORTED",this.SERVICE_TIMESTAMP=this.REPOSITORY+".SERVICE_TIMESTAMP",this.LOCATION_TIMESTAMP=this.REPOSITORY+".LOCATION_TIMESTAMP",this.PERMISSION_LOCATION=this.REPOSITORY+".PERMISSION_LOCATION",this.SET_LOG_DEBUG=this.REPOSITORY+".SET_LOG_DEBUG",this.NEW_USER_TIMESTAMP=this.REPOSITORY+".NEW_USER_TIMESTAMP",this.EXTERNAL_ID=this.REPOSITORY+".EXTERNAL_ID",this.REGISTERED_BY_COOKIE=this.REPOSITORY+".REGISTERED_BY_COOKIE",this.LOG_LEVEL=this.REPOSITORY+".LOG_LEVEL",this.LATITUDE=this.REPOSITORY+".LATITUDE",this.LONGITUDE=this.REPOSITORY+".LONGITUDE",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.TIMEOUT_REQUESTS=this.REPOSITORY+".TIMEOUT_REQUESTS",this.ENCRYPTION_TYPE=this.REPOSITORY+".ENCRYPTION_TYPE",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";}return _createClass2(R,[{key:"setItemSessionStorage",value:function setItemSessionStorage(e,t){_.setItem(e,t);}},{key:"getItemSessionStorage",value:function getItemSessionStorage(e){return _.getItem(e);}},{key:"clearSessionStorage",value:function clearSessionStorage(){_.clearMessages();}},{key:"setStorage",value:function setStorage(e,t){I.setItem(e,t);}},{key:"getStorage",value:function getStorage(e){return I.getItem(e);}},{key:"clearStorage",value:function clearStorage(){I.clear();}},{key:"setBrowserPublicKey",value:function setBrowserPublicKey(e){I.setItem(this.BROWSER_PUBLIC_KEY,e);}},{key:"getBrowserPublicKey",value:function getBrowserPublicKey(){return I.getItem(this.BROWSER_PUBLIC_KEY);}},{key:"setBrowserPrivateKey",value:function setBrowserPrivateKey(e){I.setItem(this.BROWSER_PRIVATE_KEY,e);}},{key:"getBrowserPrivateKey",value:function getBrowserPrivateKey(){return I.getItem(this.BROWSER_PRIVATE_KEY);}},{key:"setAppKey",value:function(){var _setAppKey2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee21(e){var _t1;return _regenerator2().w(function(_context21){while(1)switch(_context21.n){case 0:I.setItem(this.APP_KEY,e);_t1=l&&l.IDB;if(!_t1){_context21.n=1;break;}_context21.n=1;return l.setItem(this.APP_KEY,e);case 1:return _context21.a(2);}},_callee21,this);}));function setAppKey(_x21){return _setAppKey2.apply(this,arguments);}return setAppKey;}()},{key:"getAppKey",value:function getAppKey(){return I.getItem(this.APP_KEY);}},{key:"setDeviceId",value:function(){var _setDeviceId2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee22(e){var _t10;return _regenerator2().w(function(_context22){while(1)switch(_context22.n){case 0:this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,e);_t10=this.db&&this.db.IDB;if(!_t10){_context22.n=1;break;}_context22.n=1;return this.db.setItem(this.DEVICE_ID,e);case 1:return _context22.a(2);}},_callee22,this);}));function setDeviceId(_x22){return _setDeviceId2.apply(this,arguments);}return setDeviceId;}()},{key:"getDeviceId",value:function getDeviceId(){return this.getStorage(this.DEVICE_ID);}},{key:"getAppKeySync",value:function(){var _getAppKeySync2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee23(){return _regenerator2().w(function(_context23){while(1)switch(_context23.n){case 0:if(!(l&&l.IDB)){_context23.n=2;break;}_context23.n=1;return l.getItem(this.APP_KEY);case 1:return _context23.a(2,_context23.v);case 2:return _context23.a(2);}},_callee23,this);}));function getAppKeySync(){return _getAppKeySync2.apply(this,arguments);}return getAppKeySync;}()},{key:"setVAPID",value:function setVAPID(e){I.setItem(this.VAPID_PUBLIC,e);}},{key:"getVAPID",value:function getVAPID(){return I.getItem(this.VAPID_PUBLIC);}},{key:"setEnabled",value:function setEnabled(e){I.setItem(this.ENABLED,e);}},{key:"getEnabled",value:function getEnabled(){return I.getItem(this.ENABLED);}},{key:"setServiceSyncTime",value:function setServiceSyncTime(e){I.setItem(this.SERVICE_SYNC_TIME,e*this.BASE_TIME);}},{key:"getServiceSyncTime",value:function getServiceSyncTime(){var e=I.getItem(this.SERVICE_SYNC_TIME);return e||1*this.BASE_TIME;}},{key:"setLocationEnabled",value:function setLocationEnabled(e){I.setItem(this.LOCATION_ENABLED,e);}},{key:"getLocationEnabled",value:function getLocationEnabled(){return I.getItem(this.LOCATION_ENABLED);}},{key:"setLocationUpdateMinutes",value:function setLocationUpdateMinutes(e){I.setItem(this.LOCATION_UPDATE_MINUTES,e);}},{key:"getLocationUpdateMinutes",value:function getLocationUpdateMinutes(){var e=I.getItem(this.LOCATION_UPDATE_MINUTES);return e||30;}},{key:"setRequestLocation",value:function(){var _setRequestLocation2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee24(e){return _regenerator2().w(function(_context24){while(1)switch(_context24.n){case 0:I.setItem(this.REQUEST_LOCATION,e);case 1:return _context24.a(2);}},_callee24,this);}));function setRequestLocation(_x23){return _setRequestLocation2.apply(this,arguments);}return setRequestLocation;}()},{key:"getRequestLocation",value:function getRequestLocation(){return!!I&&I.getItem(this.REQUEST_LOCATION);}},{key:"setPlatform",value:function(){var _setPlatform2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee25(e){return _regenerator2().w(function(_context25){while(1)switch(_context25.n){case 0:I.setItem(this.PLATFORM,e);case 1:return _context25.a(2);}},_callee25,this);}));function setPlatform(_x24){return _setPlatform2.apply(this,arguments);}return setPlatform;}()},{key:"getPlatform",value:function getPlatform(){return I&&I.getItem(this.PLATFORM)||h.platform;}},{key:"getVersion",value:function getVersion(){return h.version;}},{key:"setBrowserName",value:function(){var _setBrowserName2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee26(e){return _regenerator2().w(function(_context26){while(1)switch(_context26.n){case 0:I.setItem(this.BROWSER_NAME,e);case 1:return _context26.a(2);}},_callee26,this);}));function setBrowserName(_x25){return _setBrowserName2.apply(this,arguments);}return setBrowserName;}()},{key:"getBrowserName",value:function getBrowserName(){return I.getItem(this.BROWSER_NAME);}},{key:"setBrowserVersion",value:function setBrowserVersion(e){I.setItem(this.BROWSER_VERSION,e);}},{key:"getBrowserVersion",value:function getBrowserVersion(){return I.getItem(this.BROWSER_VERSION);}},{key:"setOsName",value:function(){var _setOsName2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee27(e){return _regenerator2().w(function(_context27){while(1)switch(_context27.n){case 0:I.setItem(this.OS_NAME,e);case 1:return _context27.a(2);}},_callee27,this);}));function setOsName(_x26){return _setOsName2.apply(this,arguments);}return setOsName;}()},{key:"getOsName",value:function getOsName(){return I.getItem(this.OS_NAME);}},{key:"setOsVersion",value:function setOsVersion(e){I.setItem(this.OS_VERSION,e);}},{key:"getOsVersion",value:function getOsVersion(){return I.getItem(this.OS_VERSION);}},{key:"setDeviceType",value:function setDeviceType(e){I.setItem(this.DEVICE_TYPE,e);}},{key:"getDeviceType",value:function getDeviceType(){return I.getItem(this.DEVICE_TYPE);}},{key:"setSupported",value:function setSupported(e){I.setItem(this.SUPPORTED,e);}},{key:"getSupported",value:function getSupported(){return I.getItem(this.SUPPORTED);}},{key:"setServiceTimestamp",value:function setServiceTimestamp(e){I.setItem(this.SERVICE_TIMESTAMP,e);}},{key:"getServiceTimestamp",value:function getServiceTimestamp(){return I.getItem(this.SERVICE_TIMESTAMP);}},{key:"setLocationTimestamp",value:function setLocationTimestamp(e){I.setItem(this.LOCATION_TIMESTAMP,e);}},{key:"getLocationTimestamp",value:function getLocationTimestamp(){return I.getItem(this.LOCATION_TIMESTAMP);}},{key:"setPermissionLocation",value:function setPermissionLocation(e){I.setItem(this.PERMISSION_LOCATION,e);}},{key:"getPermissionLocation",value:function getPermissionLocation(){return I.getItem(this.PERMISSION_LOCATION);}},{key:"setDebugLog",value:function setDebugLog(e){I.setItem(this.SET_LOG_DEBUG,e);}},{key:"getDebugLog",value:function getDebugLog(){return"false"!==I.getItem(this.SET_LOG_DEBUG);}},{key:"setLogLevel",value:function setLogLevel(e){I.setItem(this.LOG_LEVEL,e);}},{key:"getLogLevel",value:function getLogLevel(){return I.getItem(this.LOG_LEVEL);}},{key:"setNewUserTimestamp",value:function setNewUserTimestamp(e){I.setItem(this.NEW_USER_TIMESTAMP,e);}},{key:"getNewUserTimestamp",value:function getNewUserTimestamp(){return I.getItem(this.NEW_USER_TIMESTAMP);}},{key:"setExternalIdRequest",value:function(){var _setExternalIdRequest2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee28(e){var _t11;return _regenerator2().w(function(_context28){while(1)switch(_context28.n){case 0:I&&I.isLocalStorageAvailable()&&I.setItem(this.EXTERNAL_ID,e);_t11=l&&l.IDB;if(!_t11){_context28.n=1;break;}_context28.n=1;return l.setItem(this.EXTERNAL_ID,e);case 1:return _context28.a(2);}},_callee28,this);}));function setExternalIdRequest(_x27){return _setExternalIdRequest2.apply(this,arguments);}return setExternalIdRequest;}()},{key:"getExternalIdRequest",value:function(){var _getExternalIdRequest2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee29(){var e,_t12,_t13;return _regenerator2().w(function(_context29){while(1)switch(_context29.p=_context29.n){case 0:_context29.p=0;if(!(I&&I.isLocalStorageAvailable())){_context29.n=1;break;}e=I.getItem(this.EXTERNAL_ID);_context29.n=3;break;case 1:_t12=l&&l.IDB;if(!_t12){_context29.n=3;break;}_context29.n=2;return l.getItem(this.EXTERNAL_ID);case 2:e=_context29.v;case 3:_context29.n=5;break;case 4:_context29.p=4;_t13=_context29.v;case 5:return _context29.a(2,e);}},_callee29,this,[[0,4]]);}));function getExternalIdRequest(){return _getExternalIdRequest2.apply(this,arguments);}return getExternalIdRequest;}()},{key:"setExternalId",value:function setExternalId(e){I.setItem(this.EXTERNAL_ID,e);}},{key:"getExternalId",value:function getExternalId(){return I.getItem(this.EXTERNAL_ID);}},{key:"getRegisteredByCookie",value:function(){var _getRegisteredByCookie2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee30(){return _regenerator2().w(function(_context30){while(1)switch(_context30.n){case 0:return _context30.a(2,I.getItem(this.REGISTERED_BY_COOKIE));}},_callee30,this);}));function getRegisteredByCookie(){return _getRegisteredByCookie2.apply(this,arguments);}return getRegisteredByCookie;}()},{key:"setRegisteredByCookie",value:function(){var _setRegisteredByCookie2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee31(e){return _regenerator2().w(function(_context31){while(1)switch(_context31.n){case 0:I.setItem(this.REGISTERED_BY_COOKIE,e);case 1:return _context31.a(2);}},_callee31,this);}));function setRegisteredByCookie(_x28){return _setRegisteredByCookie2.apply(this,arguments);}return setRegisteredByCookie;}()},{key:"setLatitude",value:function setLatitude(e){I.setItem(this.LATITUDE,e);}},{key:"getLatitude",value:function getLatitude(){return I.getItem(this.LATITUDE);}},{key:"setLongitude",value:function setLongitude(e){I.setItem(this.LONGITUDE,e);}},{key:"getLongitude",value:function getLongitude(){return I.getItem(this.LONGITUDE);}},{key:"setInAppTopicList",value:function(){var _setInAppTopicList2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee32(e){var _t14;return _regenerator2().w(function(_context32){while(1)switch(_context32.n){case 0:_t14=this.db&&this.db.IDB;if(!_t14){_context32.n=1;break;}_context32.n=1;return this.db.setItem(this.INAPP_TOPICS,e);case 1:return _context32.a(2);}},_callee32,this);}));function setInAppTopicList(_x29){return _setInAppTopicList2.apply(this,arguments);}return setInAppTopicList;}()},{key:"getInAppTopicList",value:function(){var _getInAppTopicList2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee33(){var e,_t15,_t16;return _regenerator2().w(function(_context33){while(1)switch(_context33.p=_context33.n){case 0:_context33.p=0;_t15=this.db&&this.db.IDB;if(!_t15){_context33.n=2;break;}_context33.n=1;return this.db.getItem(this.INAPP_TOPICS);case 1:e=_context33.v;case 2:_context33.n=4;break;case 3:_context33.p=3;_t16=_context33.v;case 4:return _context33.a(2,e);}},_callee33,this,[[0,3]]);}));function getInAppTopicList(){return _getInAppTopicList2.apply(this,arguments);}return getInAppTopicList;}()},{key:"setTopicList",value:function(){var _setTopicList2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee34(e){var _t17;return _regenerator2().w(function(_context34){while(1)switch(_context34.n){case 0:_t17=this.db&&this.db.IDB;if(!_t17){_context34.n=1;break;}_context34.n=1;return this.db.setItem(this.TOPIC_LIST,e);case 1:return _context34.a(2);}},_callee34,this);}));function setTopicList(_x30){return _setTopicList2.apply(this,arguments);}return setTopicList;}()},{key:"getTopicList",value:function(){var _getTopicList2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee35(){var e,_t18,_t19;return _regenerator2().w(function(_context35){while(1)switch(_context35.p=_context35.n){case 0:_context35.p=0;_t18=this.db&&this.db.IDB;if(!_t18){_context35.n=2;break;}_context35.n=1;return this.db.getItem(this.TOPIC_LIST);case 1:e=_context35.v;case 2:_context35.n=4;break;case 3:_context35.p=3;_t19=_context35.v;case 4:return _context35.a(2,e);}},_callee35,this,[[0,3]]);}));function getTopicList(){return _getTopicList2.apply(this,arguments);}return getTopicList;}()},{key:"getUrlInappApi",value:function getUrlInappApi(){return this.getStorage(this.URL_INAPP_API);}},{key:"setUrlInappApi",value:function setUrlInappApi(e){this.setStorage(this.URL_INAPP_API,e);}},{key:"setInAppEnabled",value:function setInAppEnabled(e){this.setStorage(this.INAPP_ENABLED,e);}},{key:"isInAppEnabled",value:function isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED);}},{key:"setAvoidCypher",value:function setAvoidCypher(e){this.setStorage(this.AVOID_CYPHER,!0===e);}},{key:"isAvoidCypher",value:function isAvoidCypher(){return"true"===this.getStorage(this.AVOID_CYPHER);}},{key:"getUrlDeviceApi",value:function(){var _getUrlDeviceApi2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee36(){var e,_t20,_t21;return _regenerator2().w(function(_context36){while(1)switch(_context36.p=_context36.n){case 0:_context36.p=0;if(!(this.storage&&this.storage.isLocalStorageAvailable())){_context36.n=1;break;}e=this.getStorage(this.URL_DEVICE_API);_context36.n=3;break;case 1:_t20=this.db&&this.db.IDB;if(!_t20){_context36.n=3;break;}_context36.n=2;return this.db.getItem(this.URL_DEVICE_API);case 2:e=_context36.v;case 3:_context36.n=5;break;case 4:_context36.p=4;_t21=_context36.v;case 5:return _context36.a(2,e);}},_callee36,this,[[0,4]]);}));function getUrlDeviceApi(){return _getUrlDeviceApi2.apply(this,arguments);}return getUrlDeviceApi;}()},{key:"setUrlDeviceApi",value:function(){var _setUrlDeviceApi2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee37(e){var _t22;return _regenerator2().w(function(_context37){while(1)switch(_context37.n){case 0:this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,e);_t22=this.db&&this.db.IDB;if(!_t22){_context37.n=1;break;}_context37.n=1;return this.db.setItem(this.URL_DEVICE_API,e);case 1:return _context37.a(2);}},_callee37,this);}));function setUrlDeviceApi(_x31){return _setUrlDeviceApi2.apply(this,arguments);}return setUrlDeviceApi;}()},{key:"setPushDisabled",value:function setPushDisabled(e){this.setStorage(this.PUSH_DISABLED,e);}},{key:"isPushDisabled",value:function isPushDisabled(){return this.getStorage(this.PUSH_DISABLED);}},{key:"getConfigV2ServiceSyncTime",value:function getConfigV2ServiceSyncTime(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME);}},{key:"setConfigV2ServiceSyncTime",value:function setConfigV2ServiceSyncTime(e){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,e);}},{key:"getConfigV2",value:function getConfigV2(){return this.getStorage(this.CONFIG_V2);}},{key:"setConfigV2",value:function setConfigV2(e){this.setStorage(this.CONFIG_V2,e);}},{key:"getMaintenanceEnd",value:function getMaintenanceEnd(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY);}},{key:"setMaintenanceEnd",value:function setMaintenanceEnd(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,e);}},{key:"getMaintenanceStart",value:function getMaintenanceStart(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY);}},{key:"setMaintenanceStart",value:function setMaintenanceStart(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,e);}},{key:"getTimeoutRequestsInMilliseconds",value:function getTimeoutRequestsInMilliseconds(){return this.getStorage(this.TIMEOUT_REQUESTS);}},{key:"setTimeoutRequestsInMilliseconds",value:function setTimeoutRequestsInMilliseconds(e){this.setStorage(this.TIMEOUT_REQUESTS,e);}},{key:"getEncryptionType",value:function getEncryptionType(){var e=this.getStorage(this.ENCRYPTION_TYPE);return null===e?T.HASH:e;}},{key:"setEncryptionType",value:function setEncryptionType(e){this.setStorage(this.ENCRYPTION_TYPE,e);}}]);}(),g=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),S=g;var A=/*#__PURE__*/function(){function A(e){_classCallCheck2(this,A);this.tag="[IND]",e&&(this.tag=e),this.level=S.INFO,this.setLogLevel(new R().getLogLevel()),this.log=[];}return _createClass2(A,[{key:"setLogLevel",value:function setLogLevel(e){e&&e>=S.DEBUG&&e<=S.ERROR&&(this.level=e);}},{key:"d",value:function d(){if(this.level<=S.DEBUG)for(var _e4=0;_e4<arguments.length;_e4++)this.log+=A.addedAsString(arguments[_e4]);return this;}},{key:"i",value:function i(){if(this.level<=S.INFO)for(var _e5=0;_e5<arguments.length;_e5++)this.log+=A.addedAsString(arguments[_e5]);return this;}},{key:"w",value:function w(){if(this.level<=S.WARNING)for(var _e6=0;_e6<arguments.length;_e6++)this.log+=A.addedAsString(arguments[_e6]);return this;}},{key:"e",value:function e(){if(this.level<=S.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var _e7=0;_e7<arguments.length;_e7++)this.log+=A.addedAsString(arguments[_e7]);return this;}},{key:"writeLog",value:function writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[];}}],[{key:"addedAsString",value:function addedAsString(e){return"string"==typeof e?e:JSON.stringify(e,null,2);}}]);}();var O=A;var u=/*#__PURE__*/_createClass2(function u(e,t,s){_classCallCheck2(this,u);this.errorCode=e,this.errorMessage=t,null!=s&&(this.exceptionMessage=s);}),P={GENERAL_ERROR:600,TIMEOUT_REQUEST:605,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 m={ErrorCode:P,ErrorMessage:{GENERAL_ERROR:"General Error",TIMEOUT_REQUEST:"connection timeout",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"}};var N=new(/*#__PURE__*/function(){function _class4(){_classCallCheck2(this,_class4);}return _createClass2(_class4,[{key:"showError",value:function showError(e,t,s){if(null!=e){var _i3=Object.values(e.ErrorCode).indexOf(t);if(_i3>=0){var _t23=Object.keys(e.ErrorCode)[_i3],_r=Object.values(e.ErrorCode)[_i3];return new u({code:_t23,errorId:_r},Object.values(e.ErrorMessage)[_i3],s);}return new u(m.ErrorCode.GENERAL_ERROR,"general error",s);}}}]);}())();var p=/*#__PURE__*/function(){function p(){_classCallCheck2(this,p);this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE";}return _createClass2(p,[{key:"getURL",value:function(){var _getURL2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee38(){return _regenerator2().w(function(_context38){while(1)switch(_context38.n){case 0:return _context38.a(2,this.URL_BASE);}},_callee38,this);}));function getURL(){return _getURL2.apply(this,arguments);}return getURL;}()},{key:"call",value:function(){var _call2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee39(e,t,s,i){var r,n,o,_t24,_i4,_a,_t25,_t26,_t27,_t28,_t29,_t30;return _regenerator2().w(function(_context39){while(1)switch(_context39.p=_context39.n){case 0:r=new O("[IND]BaseClient: ");s.isServiceWorkerRequest()&&r.setLogLevel(S.DEBUG);_context39.n=1;return this.getURL();case 1:_t26=_context39.v;_t27=s.getPath(t);_t28=_t26+_t27;_t29=s.getParams();n=_t28+_t29;s.isJourneyRequest()&&(n=n.replace("v1","v2"));o={method:e,headers:s.addHeaders()};e!==this.GET&&(o.body=JSON.stringify(s.getBody())),i&&(o.credentials=i);_context39.p=2;_t24=new AbortController();new R().getTimeoutRequestsInMilliseconds()&&0!=new R().getTimeoutRequestsInMilliseconds()&&(_i4=setTimeout(function(){return _t24.abort();},new R().getTimeoutRequestsInMilliseconds()),o.signal=_t24.signal);_context39.n=3;return fetch(n,o);case 3:_a=_context39.v;if(!(_i4&&clearTimeout(_i4),304!=_a.status)){_context39.n=5;break;}_context39.n=4;return _a.json();case 4:_t25=_context39.v;return _context39.a(2,_a.ok?(r.d("Method: "+e+"\nURL: "+n+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(s.getBody(),null,"\t")+"\n":"")+"Response Code: "+_t25.statusCode+"\nResponse Message: "+_t25.message+"\nResponse Body:",JSON.stringify(_t25.data,null,"\t")).writeLog(),_t25):(r.d("Method: "+e+"\nURL: "+n+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(s.getBody(),null,"\t")+"\n":"")+"Response Code: "+_t25.statusCode+"\nResponse Message: "+_t25.message+"\n").writeLog(),new u(_t25.statusCode,_t25.message)));case 5:return _context39.a(2,(r.d("Method: "+e+"\nURL: "+n+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(s.getBody(),null,"\t")+"\n":"")+"Response Code: "+_a.status+"\n").writeLog(),_a));case 6:_context39.p=6;_t30=_context39.v;return _context39.a(2,"AbortError"===_t30.name?(r.d("Method: "+e+"\nURL: "+n+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(s.getBody(),null,"\t")+"\n":"")+"Error: "+_t30).writeLog(),N.showError(m,m.ErrorCode.TIMEOUT_REQUEST,_t30)):(r.d("Method: "+e+"\nURL: "+n+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(s.getBody(),null,"\t")+"\n":"")+"Error: "+_t30).writeLog(),N.showError(m,m.ErrorCode.GENERAL_ERROR,_t30)));}},_callee39,this,[[2,6]]);}));function call(_x32,_x33,_x34,_x35){return _call2.apply(this,arguments);}return call;}()},{key:"get",value:function(){var _get3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee40(e,t){return _regenerator2().w(function(_context40){while(1)switch(_context40.n){case 0:_context40.n=1;return this.call(this.GET,e,t);case 1:return _context40.a(2,_context40.v);}},_callee40,this);}));function get(_x36,_x37){return _get3.apply(this,arguments);}return get;}()},{key:"post",value:function(){var _post2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee41(e,t,s){return _regenerator2().w(function(_context41){while(1)switch(_context41.n){case 0:_context41.n=1;return this.call(this.POST,e,t,s);case 1:return _context41.a(2,_context41.v);}},_callee41,this);}));function post(_x38,_x39,_x40){return _post2.apply(this,arguments);}return post;}()},{key:"put",value:function(){var _put3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee42(e,t,s){return _regenerator2().w(function(_context42){while(1)switch(_context42.n){case 0:_context42.n=1;return this.call(this.PUT,e,t,s);case 1:return _context42.a(2,_context42.v);}},_callee42,this);}));function put(_x41,_x42,_x43){return _put3.apply(this,arguments);}return put;}()},{key:"delete",value:function(){var _delete3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee43(e,t){return _regenerator2().w(function(_context43){while(1)switch(_context43.n){case 0:_context43.n=1;return this.call(this.DELETE,e,t);case 1:return _context43.a(2,_context43.v);}},_callee43,this);}));function _delete(_x44,_x45){return _delete3.apply(this,arguments);}return _delete;}()}]);}();var y=/*#__PURE__*/function(){function y(){_classCallCheck2(this,y);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_EVENT_ID="eventId",this.PARAM_EVENT_AT="eventAt",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 R().getAppKey(),this.params=null,this.pathParams={},this.headers={};}return _createClass2(y,[{key:"getParams",value:function getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"");}},{key:"getBody",value:function getBody(){return this.body?this.body:"";}},{key:"getPath",value:function getPath(e){var _this7=this;var t=e;return Object.keys(this.pathParams).forEach(function(e){t=t.replace(e,_this7.pathParams[e]);}),t;}},{key:"addHeaders",value:function addHeaders(){var _this8=this;var e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach(function(t){e.append(t,_this8.headers[t]);}),e;}},{key:"isServiceWorkerRequest",value:function isServiceWorkerRequest(){return this.serviceWorkerRequest;}},{key:"setServiceWorkerRequest",value:function setServiceWorkerRequest(e){this.serviceWorkerRequest=e;}},{key:"isJourneyRequest",value:function isJourneyRequest(){return this.journeyRequest;}},{key:"setJourneyRequest",value:function setJourneyRequest(e){this.journeyRequest=e;}}]);}();var D=/*#__PURE__*/function(_y){function D(){var _this9;var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;_classCallCheck2(this,D);_this9=_callSuper2(this,D),_this9.PARAM_APPLICATION_CHANNEL="channel",_this9.channels=e;return _this9;}_inherits2(D,_y);return _createClass2(D,[{key:"getApplicationRequest",value:function getApplicationRequest(){return this.params=this.createQueryString(),this;}},{key:"createQueryString",value:function createQueryString(){var e="";if(this.channels&&this.channels.length>0)for(var _t31=0;_t31<this.channels.length;_t31++)e+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[_t31].toLowerCase(),"&");return e+="".concat(this.PARAM_PLATFORM,"=webpush"),e;}}]);}(y);var C=/*#__PURE__*/function(){function C(){_classCallCheck2(this,C);}return _createClass2(C,null,[{key:"isServiceTimestampExceed",value:function isServiceTimestampExceed(){return!new R().getServiceTimestamp()||new R().getServiceSyncTime()<=(Date.now()-new R().getServiceTimestamp())/6e4;}},{key:"isFunction",value:function isFunction(e){return!(!e||"function"!=typeof e);}},{key:"generateUUID",value:function generateUUID(){var e=new O("[IND]CommonUtils: ");return"undefined"!=typeof crypto&&crypto.randomUUID?(e.d("Using crypto.randomUUID to generate UUID").writeLog(),crypto.randomUUID()):"undefined"!=typeof crypto&&crypto.getRandomValues?(e.d("Using crypto.getRandomValues to generate UUID").writeLog(),([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16);})):null;}}]);}();var L=(_Class=/*#__PURE__*/function(){function L(){_classCallCheck2(this,L);}return _createClass2(L,null,[{key:"normalizeDateString",value:function normalizeDateString(e){if("number"==typeof e||e instanceof Date){var _t32=new Date(e);return isNaN(_t32.getTime())?null:this.formatCanonicalUTC(_t32);}if(!e||"string"!=typeof e)return null;var t=e.trim();if(this.isCanonicalFormat(t))return t;var s=this.tryToParseLeniently(t);return s?this.formatCanonicalUTC(s):null;}},{key:"isCanonicalFormat",value:function isCanonicalFormat(e){return /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(e);}},{key:"tryToParseLeniently",value:function tryToParseLeniently(e){var _iterator2=_createForOfIteratorHelper2(this.LENIENT_DATE_FORMATS),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var _t33=_step2.value;var _s2=this.parseByFormat(e,_t33);if(_s2&&!isNaN(_s2.getTime()))return _s2;}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}return null;}},{key:"parseByFormat",value:function parseByFormat(e,t){switch(t){case"yyyy-MM-dd'T'HH:mm:ss.SSSZ":return new Date(e);case"yyyy-MM-dd'T'HH:mm:ssZ":return e.endsWith("Z")?new Date(e):new Date(e.replaceAll(/([+-]\d{2})(\d{2})$/g,"$1:$2"));case"yyyy-MM-dd'T'HH:mm:ss":return new Date(e+"Z");case"yyyy-MM-dd HH:mm:ss":return new Date(e.replaceAll(" ","T")+"Z");case"yyyy-MM-dd":return new Date(e+"T00:00:00Z");default:return null;}}},{key:"formatCanonicalUTC",value:function formatCanonicalUTC(e){return e.toISOString();}}]);}(),_defineProperty2(_Class,"DATE_FORMAT_PATTERN","yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"),_defineProperty2(_Class,"LENIENT_DATE_FORMATS",["yyyy-MM-dd'T'HH:mm:ss.SSSZ","yyyy-MM-dd'T'HH:mm:ssZ","yyyy-MM-dd'T'HH:mm:ss","yyyy-MM-dd HH:mm:ss","yyyy-MM-dd"]),_Class);var w=/*#__PURE__*/function(_y2){function w(){_classCallCheck2(this,w);return _callSuper2(this,w);}_inherits2(w,_y2);return _createClass2(w,[{key:"setEventId",value:function setEventId(e){this.eventId=e,null==e&&(this.eventId=C.generateUUID());}},{key:"setEventAt",value:function setEventAt(e){this.eventAt=e,null==e&&(this.eventAt=L.normalizeDateString(Date.now()));}}]);}(y),M=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"});var b=/*#__PURE__*/function(){function b(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var t=arguments.length>1?arguments[1]:undefined;_classCallCheck2(this,b);null==e?(this.browserPublicKey=new R().getBrowserPublicKey(),this.browserPrivateKey=new R().getBrowserPrivateKey(),this.platform=new R().getPlatform(),this.version=new R().getVersion(),this.browserName=new R().getBrowserName(),this.browserVersion=new R().getBrowserVersion(),this.osName=new R().getOsName(),this.osVersion=new R().getOsVersion(),this.deviceId=new R().getDeviceId(),this.deviceType=new R().getDeviceType(),new R().getEnabled()&&(this.enabled="true"===new R().getEnabled()),new R().getExternalId()&&(this.externalCode=new R().getExternalId())):t?(e.enabled&&(this.enabled=e.enabled,new R().setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,new R().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();}return _createClass2(b,[{key:"getDeviceId",value:function getDeviceId(){return this.deviceId;}},{key:"setDeviceId",value:function setDeviceId(e){this.deviceId=e;}},{key:"setExternalCode",value:function setExternalCode(e){this.externalCode=e;}},{key:"toJSON",value:function toJSON(){var e={};return this.platform&&(e.platform=this.platform),this.version&&(e.version=this.version),this.productName&&(e.productName=this.productName),this.productVersion&&(e.productVersion=this.productVersion),this.browserName&&(e.browserName=this.browserName),this.browserVersion&&(e.browserVersion=this.browserVersion),this.osName&&(e.osName=this.osName),this.osVersion&&(e.osVersion=this.osVersion),this.deviceType&&(e.deviceType=this.deviceType),this.locale&&(e.locale=this.locale),this.timeZone&&(e.timeZome=this.timeZone),this.timeOffset&&(e.timeOffset=this.timeOffset),this.deviceId&&(e.deviceId=this.deviceId),this.enabled&&(e.enabled=this.enabled),this.browserPublicKey&&(e.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(e.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(e.externalCode=this.externalCode),e;}}]);}(),v=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),U=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"}),B=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});var f=/*#__PURE__*/_createClass2(function f(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;_classCallCheck2(this,f);var s=new R();if(null!=e){s.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,s.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,s.setMaintenanceEnd(this.maintenanceWindow.end))),e.networkEventsEnabled&&(this.networkEventsEnabled=e.networkEventsEnabled),e.networkUpdateMinutes&&(this.networkUpdateMinutes=e.networkUpdateMinutes);var _i5=Date.now();if(e.serviceSyncTime?(this.serviceSyncTime=e.serviceSyncTime,_i5=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):_i5=new Date(Date.now()+36e5),!t){var _e8=_i5.toString();new O("[IND]CoreApplication").d("ServiceSyncTime defined on: "+_e8).writeLog(),s.setConfigV2ServiceSyncTime(_e8);}this.encryptionType=T.HASH,e.encryptionType&&(this.encryptionType=e.encryptionType),s.setEncryptionType(this.encryptionType);}});var V=/*#__PURE__*/function(){function V(){_classCallCheck2(this,V);}return _createClass2(V,null,[{key:"getLocationPermission",value:function(){var _getLocationPermission2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee44(){var e,t;return _regenerator2().w(function(_context44){while(1)switch(_context44.n){case 0:_context44.n=1;return this.getPermission("geolocation");case 1:e=_context44.v;t={};return _context44.a(2,(e&&(t.location=e.state),t));}},_callee44,this);}));function getLocationPermission(){return _getLocationPermission2.apply(this,arguments);}return getLocationPermission;}()},{key:"getPermission",value:function(){var _getPermission2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee45(e){var _t34;return _regenerator2().w(function(_context45){while(1)switch(_context45.p=_context45.n){case 0:_context45.p=0;if(!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){_context45.n=2;break;}_context45.n=1;return navigator.permissions.query({name:e,userVisibleOnly:!0});case 1:return _context45.a(2,_context45.v);case 2:_context45.n=4;break;case 3:_context45.p=3;_t34=_context45.v;return _context45.a(2,null);case 4:return _context45.a(2,null);}},_callee45,null,[[0,3]]);}));function getPermission(_x46){return _getPermission2.apply(this,arguments);}return getPermission;}()},{key:"setPermissionsCallback",value:function(){var _setPermissionsCallback2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee46(){return _regenerator2().w(function(_context46){while(1)switch(_context46.n){case 0:_context46.n=1;return this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 1:return _context46.a(2);}},_callee46,this);}));function setPermissionsCallback(){return _setPermissionsCallback2.apply(this,arguments);}return setPermissionsCallback;}()},{key:"setCallback",value:function(){var _setCallback2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee47(e,t){var s,_i6;return _regenerator2().w(function(_context47){while(1)switch(_context47.n){case 0:_context47.n=1;return this.getPermission(e);case 1:s=_context47.v;if(s){_i6=s.state;"onchange"in s&&(s.onchange=function(){new O("[IND]CorePermissions: ").d(e+" permission state has changed from "+_i6+" to "+s.state).writeLog(),_i6=s.state,t&&t({name:e,state:s.state});});}case 2:return _context47.a(2);}},_callee47,this);}));function setCallback(_x47,_x48){return _setCallback2.apply(this,arguments);}return setCallback;}()}]);}(),Y=new O("[IND]Crypto"),K=new TextEncoder("utf-8"),G="HMAC";var W=/*#__PURE__*/function(){function W(){_classCallCheck2(this,W);}return _createClass2(W,null,[{key:"createHmac",value:function(){var _createHmac2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee48(e,t){var s,_window2,_i7,r,n,o,_t35;return _regenerator2().w(function(_context48){while(1)switch(_context48.p=_context48.n){case 0:_context48.p=0;s=t;if(!(!0===new R().isAvoidCypher()||new R().getEncryptionType()===T.RAW)){_context48.n=1;break;}return _context48.a(2,t);case 1:if(!(new R().getEncryptionType()===T.HASH)){_context48.n=5;break;}_i7=(_window2=window)===null||_window2===void 0||(_window2=_window2.crypto)===null||_window2===void 0?void 0:_window2.subtle;if(_i7){_context48.n=2;break;}return _context48.a(2);case 2:_context48.n=3;return _i7.importKey("raw",K.encode(e),{name:G,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 3:r=_context48.v;_context48.n=4;return _i7.sign(G,r,K.encode(t));case 4:n=_context48.v;o=new Uint8Array(n);s=Array.prototype.map.call(o,function(e){return("00"+e.toString(16)).slice(-2);}).join(""),Y.d("hmac: ",s).writeLog();case 5:return _context48.a(2,s);case 6:_context48.p=6;_t35=_context48.v;return _context48.a(2,void Y.e("error:",_t35).writeLog());}},_callee48,null,[[0,6]]);}));function createHmac(_x49,_x50){return _createHmac2.apply(this,arguments);}return createHmac;}()}]);}();var x=/*#__PURE__*/function(){function x(){_classCallCheck2(this,x);}return _createClass2(x,null,[{key:"compareJSON",value:function compareJSON(e,t){var s=Object.keys(e),i=Object.keys(t);if(s.length!==i.length)return!1;for(var _i8=0,_s3=s;_i8<_s3.length;_i8++){var _i9=_s3[_i8];if(e[_i9]!==t[_i9]){if("object"!=_typeof2(e[_i9])||"object"!=_typeof2(t[_i9]))return!1;if(!isEqual(e[_i9],t[_i9]))return!1;}}return!0;}}]);}();var H=/*#__PURE__*/function(){function H(){_classCallCheck2(this,H);}return _createClass2(H,null,[{key:"isValidFormat",value:function isValidFormat(e){return null!=e&&""!=e&&"null"!=e&&e.length>8;}}]);}();var k=/*#__PURE__*/function(){function k(){_classCallCheck2(this,k);}return _createClass2(k,null,[{key:"setTopicChannel",value:function setTopicChannel(e,t){var s=[];for(var _i0=0;_i0<e.length;_i0++){var r=e[_i0];r.channel=t,s.push(r);}return s;}}]);}(),F={Repository:R,Config:h,Api:r,Models:n,Utils:o};return i;}();});/***/},/***/315:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={Core:true};Object.defineProperty(exports,"Core",{enumerable:true,get:function get(){return _src["default"];}});Object.defineProperty(exports,"default",{enumerable:true,get:function get(){return _coreMin["default"];}});var _coreMin=_interopRequireWildcard(__webpack_require__(710));Object.keys(_coreMin).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_coreMin[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _coreMin[key];}});});var _src=_interopRequireDefault(__webpack_require__(610));function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e};}function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,"default":e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}/***/},/***/468:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _Log=_interopRequireDefault(__webpack_require__(254));var _ErrorModel=_interopRequireDefault(__webpack_require__(234));var _ErrorUtils=_interopRequireDefault(__webpack_require__(457));var _ErrorDictionary=_interopRequireDefault(__webpack_require__(735));var _LogLevel=_interopRequireDefault(__webpack_require__(630));var _Repository=_interopRequireDefault(__webpack_require__(291));function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e};}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a;}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0));}if(o||r>1)return a;throw y=!0,n;}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0);}else 1===c&&(t=i["return"])&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e;}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break;}catch(t){i=e,c=1,u=t;}finally{f=1;}}return{value:t,done:y};};}(r,o,i),!0),u;}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this;}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e;}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this;}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]";}),(_regenerator=function _regenerator(){return{w:i,m:f};})();}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{});}catch(e){i=0;}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e);});}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2));},_regeneratorDefine2(e,r,n,t);}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}/* eslint-disable max-len *//* eslint-disable require-jsdoc */var TAG='[IND]BaseClient: ';var BaseClient=/*#__PURE__*/function(){function BaseClient(){_classCallCheck(this,BaseClient);this.URL_BASE='';this.GET='GET';this.POST='POST';this.PUT='PUT';this.DELETE='DELETE';}return _createClass(BaseClient,[{key:"getURL",value:function(){var _getURL=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(){return _regenerator().w(function(_context){while(1)switch(_context.n){case 0:return _context.a(2,this.URL_BASE);}},_callee,this);}));function getURL(){return _getURL.apply(this,arguments);}return getURL;}()},{key:"call",value:function(){var _call=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(method,endpoint,request,credentials){var log,url,options,controller,timeoutId,response,resData,_t,_t2,_t3,_t4,_t5;return _regenerator().w(function(_context2){while(1)switch(_context2.p=_context2.n){case 0:log=new _Log["default"](TAG);if(request.isServiceWorkerRequest())log.setLogLevel(_LogLevel["default"].DEBUG);_context2.n=1;return this.getURL();case 1:_t=_context2.v;_t2=request.getPath(endpoint);_t3=_t+_t2;_t4=request.getParams();url=_t3+_t4;if(request.isJourneyRequest())url=url.replace('v1','v2');options={method:method,headers:request.addHeaders()};if(method!==this.GET){options.body=JSON.stringify(request.getBody());}if(credentials){options.credentials=credentials;}_context2.p=2;controller=new AbortController();if(new _Repository["default"]().getTimeoutRequestsInMilliseconds()&&new _Repository["default"]().getTimeoutRequestsInMilliseconds()!=0){timeoutId=setTimeout(function(){return controller.abort();},new _Repository["default"]().getTimeoutRequestsInMilliseconds());options.signal=controller.signal;}_context2.n=3;return fetch(url,options);case 3:response=_context2.v;if(timeoutId)clearTimeout(timeoutId);// check inApp audiences no changes
4
+ if(!(response.status!=304)){_context2.n=6;break;}_context2.n=4;return response.json();case 4:resData=_context2.v;if(!response.ok){_context2.n=5;break;}log.d('Method: '+method+'\n'+'URL: '+url+'\n'+"".concat(method!==this.GET?'Request Body: '+JSON.stringify(request.getBody(),null,'\t')+'\n':'')+'Response Code: '+resData.statusCode+'\n'+'Response Message: '+resData.message+'\n'+'Response Body:',JSON.stringify(resData.data,null,'\t')).writeLog();return _context2.a(2,resData);case 5:log.d('Method: '+method+'\n'+'URL: '+url+'\n'+"".concat(method!==this.GET?'Request Body: '+JSON.stringify(request.getBody(),null,'\t')+'\n':'')+'Response Code: '+resData.statusCode+'\n'+'Response Message: '+resData.message+'\n').writeLog();return _context2.a(2,new _ErrorModel["default"](resData.statusCode,resData.message));case 6:log.d('Method: '+method+'\n'+'URL: '+url+'\n'+"".concat(method!==this.GET?'Request Body: '+JSON.stringify(request.getBody(),null,'\t')+'\n':'')+'Response Code: '+response.status+'\n').writeLog();return _context2.a(2,response);case 7:_context2.n=10;break;case 8:_context2.p=8;_t5=_context2.v;if(!(_t5.name==='AbortError')){_context2.n=9;break;}log.d('Method: '+method+'\n'+'URL: '+url+'\n'+"".concat(method!==this.GET?'Request Body: '+JSON.stringify(request.getBody(),null,'\t')+'\n':'')+'Error: '+_t5).writeLog();return _context2.a(2,_ErrorUtils["default"].showError(_ErrorDictionary["default"],_ErrorDictionary["default"].ErrorCode.TIMEOUT_REQUEST,_t5));case 9:log.d('Method: '+method+'\n'+'URL: '+url+'\n'+"".concat(method!==this.GET?'Request Body: '+JSON.stringify(request.getBody(),null,'\t')+'\n':'')+'Error: '+_t5).writeLog();return _context2.a(2,_ErrorUtils["default"].showError(_ErrorDictionary["default"],_ErrorDictionary["default"].ErrorCode.GENERAL_ERROR,_t5));case 10:return _context2.a(2);}},_callee2,this,[[2,8]]);}));function call(_x,_x2,_x3,_x4){return _call.apply(this,arguments);}return call;}()},{key:"get",value:function(){var _get=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(endpoint,request){return _regenerator().w(function(_context3){while(1)switch(_context3.n){case 0:_context3.n=1;return this.call(this.GET,endpoint,request);case 1:return _context3.a(2,_context3.v);}},_callee3,this);}));function get(_x5,_x6){return _get.apply(this,arguments);}return get;}()},{key:"post",value:function(){var _post=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(endpoint,request,credentials){return _regenerator().w(function(_context4){while(1)switch(_context4.n){case 0:_context4.n=1;return this.call(this.POST,endpoint,request,credentials);case 1:return _context4.a(2,_context4.v);}},_callee4,this);}));function post(_x7,_x8,_x9){return _post.apply(this,arguments);}return post;}()},{key:"put",value:function(){var _put=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(endpoint,request,credentials){return _regenerator().w(function(_context5){while(1)switch(_context5.n){case 0:_context5.n=1;return this.call(this.PUT,endpoint,request,credentials);case 1:return _context5.a(2,_context5.v);}},_callee5,this);}));function put(_x0,_x1,_x10){return _put.apply(this,arguments);}return put;}()},{key:"delete",value:function(){var _delete2=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(endpoint,request){return _regenerator().w(function(_context6){while(1)switch(_context6.n){case 0:_context6.n=1;return this.call(this.DELETE,endpoint,request);case 1:return _context6.a(2,_context6.v);}},_callee6,this);}));function _delete(_x11,_x12){return _delete2.apply(this,arguments);}return _delete;}()}]);}();;var _default=exports["default"]=BaseClient;/***/},/***/545:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"BaseApplicationRequest",{enumerable:true,get:function get(){return _BaseApplicationRequest["default"];}});Object.defineProperty(exports,"BaseClient",{enumerable:true,get:function get(){return _BaseClient["default"];}});Object.defineProperty(exports,"BaseEventRequest",{enumerable:true,get:function get(){return _BaseEventRequest["default"];}});Object.defineProperty(exports,"BaseRequest",{enumerable:true,get:function get(){return _BaseRequest["default"];}});var _BaseClient=_interopRequireDefault(__webpack_require__(468));var _BaseRequest=_interopRequireDefault(__webpack_require__(237));var _BaseApplicationRequest=_interopRequireDefault(__webpack_require__(773));var _BaseEventRequest=_interopRequireDefault(__webpack_require__(943));function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e};}/***/},/***/773:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _BaseRequest2=_interopRequireDefault(__webpack_require__(237));function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e};}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(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&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}/* eslint-disable max-len *//* eslint-disable require-jsdoc */var BaseApplicationRequest=/*#__PURE__*/function(_BaseRequest){function BaseApplicationRequest(){var _this;var channels=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;_classCallCheck(this,BaseApplicationRequest);_this=_callSuper(this,BaseApplicationRequest);_this.PARAM_APPLICATION_CHANNEL='channel';_this.channels=channels;return _this;}_inherits(BaseApplicationRequest,_BaseRequest);return _createClass(BaseApplicationRequest,[{key:"getApplicationRequest",value:function getApplicationRequest(){this.params=this.createQueryString();return this;}},{key:"createQueryString",value:function createQueryString(){var query='';if(this.channels&&this.channels.length>0){for(var i=0;i<this.channels.length;i++){query+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[i].toLowerCase(),"&");}}query+="".concat(this.PARAM_PLATFORM,"=webpush");return query;}}]);}(_BaseRequest2["default"]);var _default=exports["default"]=BaseApplicationRequest;/***/},/***/943:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _BaseRequest2=_interopRequireDefault(__webpack_require__(237));var _CommonUtils=_interopRequireDefault(__webpack_require__(622));var _DateUtils=_interopRequireDefault(__webpack_require__(497));function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e};}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(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&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}/* eslint-disable max-len *//* eslint-disable require-jsdoc */var BaseEventRequest=/*#__PURE__*/function(_BaseRequest){function BaseEventRequest(){_classCallCheck(this,BaseEventRequest);return _callSuper(this,BaseEventRequest);}_inherits(BaseEventRequest,_BaseRequest);return _createClass(BaseEventRequest,[{key:"setEventId",value:function setEventId(eventId){this.eventId=eventId;if(eventId==null){this.eventId=_CommonUtils["default"].generateUUID();}}},{key:"setEventAt",value:function setEventAt(eventAt){this.eventAt=eventAt;if(eventAt==null){this.eventAt=_DateUtils["default"].normalizeDateString(Date.now());}}}]);}(_BaseRequest2["default"]);var _default=exports["default"]=BaseEventRequest;/***/},/***/237:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _Repository=_interopRequireDefault(__webpack_require__(291));function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e};}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}/* eslint-disable max-len *//* eslint-disable require-jsdoc */var BaseRequest=/*#__PURE__*/function(){function BaseRequest(){_classCallCheck(this,BaseRequest);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_EVENT_ID='eventId';this.PARAM_EVENT_AT='eventAt';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 _Repository["default"]().getAppKey();this.params=null;this.pathParams={};this.headers={};}return _createClass(BaseRequest,[{key:"getParams",value:function getParams(){return'?'+this.PARAM_APP_KEY+'='+this.appKey+(this.params?'&'+this.params:'');}},{key:"getBody",value:function getBody(){if(this.body){return this.body;}return'';}},{key:"getPath",value:function getPath(endpoint){var _this=this;var path=endpoint;Object.keys(this.pathParams).forEach(function(key){path=path.replace(key,_this.pathParams[key]);});return path;}},{key:"addHeaders",value:function addHeaders(){var _this2=this;var headers=new Headers({'Content-Type':'application/json'});Object.keys(this.headers).forEach(function(key){headers.append(key,_this2.headers[key]);});return headers;}},{key:"isServiceWorkerRequest",value:function isServiceWorkerRequest(){return this.serviceWorkerRequest;}},{key:"setServiceWorkerRequest",value:function setServiceWorkerRequest(state){this.serviceWorkerRequest=state;}},{key:"isJourneyRequest",value:function isJourneyRequest(){return this.journeyRequest;}},{key:"setJourneyRequest",value:function setJourneyRequest(isJourneyRequest){this.journeyRequest=isJourneyRequest;}}]);}();var _default=exports["default"]=BaseRequest;/***/},/***/122:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;/* eslint-disable no-var */var config={platform:'webpush',version:'0.0.1'};var ENVIRONMENT='';var pkg=__webpack_require__(904);// console.log('package: ', pkg);
5
+ config.version=pkg.version;config=Object.assign(config,{client:{URL_BASE:"https://".concat(ENVIRONMENT,"device-api.indigitall.com/v1"),URL_DEVICE_V2:"https://".concat(ENVIRONMENT,"device-api.indigitall.com/v2"),INAPP_URL_BASE:"https://".concat(ENVIRONMENT,"inapp-api.indigitall.com/v1"),INBOX_URL_BASE:"https://".concat(ENVIRONMENT,"inbox-api.indigitall.com/v1"),CUSTOMER_URL_BASE:"https://".concat(ENVIRONMENT,"device-api.indigitall.com/v2")}});// console.log('config', config);
6
+ var _default=exports["default"]=config;/***/},/***/610:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _config=_interopRequireDefault(__webpack_require__(122));var _Repository=_interopRequireDefault(__webpack_require__(291));var Api=_interopRequireWildcard(__webpack_require__(545));var Models=_interopRequireWildcard(__webpack_require__(225));var Utils=_interopRequireWildcard(__webpack_require__(628));function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,"default":e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e};}// export {default as Repository} from './repository/Repository';
7
+ // export {default as Config} from './config';
8
+ // export * as Api from './api';
9
+ // export * as Models from './models';
10
+ // export * as Utils from './utils';
11
+ var _default=exports["default"]={Repository:_Repository["default"],Config:_config["default"],Api:Api,Models:Models,Utils:Utils};// window.Repository = Repository;
12
+ // window.Base = Base;
13
+ // /**
14
+ // * Base
15
+ // */
16
+ // class Base {
17
+ // /**
18
+ // * constructor
19
+ // */
20
+ // constructor() {
21
+ // this.BASE_NAME = 'BASE_NAME';
22
+ // }
23
+ // /**
24
+ // * test
25
+ // */
26
+ // test() {
27
+ // console.log(`test1: ${this.BASE_NAME}`);
28
+ // }
29
+ // /**
30
+ // * test2
31
+ // */
32
+ // test2() {
33
+ // console.log(`test2: ${this.BASE_NAME}`);
34
+ // }
35
+ // }
36
+ // // export default Base;
37
+ /**
38
+ * Tom
39
+ */// class Tom {
40
+ // /**
41
+ // * sayHello
42
+ // * @return {string}
43
+ // */
44
+ // static sayHello() {
45
+ // return 'Hi, I am Tom.';
46
+ // }
47
+ // }
48
+ /***/},/***/902:function _(__unused_webpack_module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=exports.Channel=void 0;/**
49
+ *Channel
50
+ *
51
+ * @enum Channel
52
+ * @static
53
+ * @property PUSH
54
+ * @property INAPP
55
+ * @property CHAT
56
+ *
57
+ */var Channel=exports.Channel=Object.freeze({PUSH:'push',INAPP:'inapp',CHAT:'chat',NONE:'none'});var _default=exports["default"]=Channel;/***/},/***/174:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _Repository=_interopRequireDefault(__webpack_require__(291));var _Log=_interopRequireDefault(__webpack_require__(254));var _EncryptionType=_interopRequireDefault(__webpack_require__(164));function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e};}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}/* eslint-disable max-len *//* eslint-disable require-jsdoc */var CoreApplication=/*#__PURE__*/_createClass(function CoreApplication(json){var fromCache=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;_classCallCheck(this,CoreApplication);var repository=new _Repository["default"]();if(json!=null){repository.setConfigV2(JSON.stringify(json));if(json.contentAvailable)this.contentAvailable=json.contentAvailable;if(json.locationAccuracy)this.locationAccuracy=json.locationAccuracy;if(json.locationDistance)this.locationDistance=json.locationDistance;if(json.locationEnabled)this.locationEnabled=json.locationEnabled;if(json.locationUpdateMinutes)this.locationUpdateMinutes=json.locationUpdateMinutes;if(json.maintenanceWindow){this.maintenanceWindow=json.maintenanceWindow;if(this.maintenanceWindow.start){this.maintenanceWindowStart=this.maintenanceWindow.start;repository.setMaintenanceStart(this.maintenanceWindow.start);}if(this.maintenanceWindow.end){this.maintenanceWindowEnd=this.maintenanceWindow.end;repository.setMaintenanceEnd(this.maintenanceWindow.end);}}if(json.networkEventsEnabled)this.networkEventsEnabled=json.networkEventsEnabled;if(json.networkUpdateMinutes)this.networkUpdateMinutes=json.networkUpdateMinutes;var dateSyncTimeEnd=Date.now();if(json.serviceSyncTime){this.serviceSyncTime=json.serviceSyncTime;dateSyncTimeEnd=new Date(Date.now()+this.serviceSyncTime*60*60*1000);}else{dateSyncTimeEnd=new Date(Date.now()+60*60*1000);}if(!fromCache){var dateSyncTimeEndAsString=dateSyncTimeEnd.toString();var log=new _Log["default"]('[IND]CoreApplication');log.d('ServiceSyncTime defined on: '+dateSyncTimeEndAsString).writeLog();repository.setConfigV2ServiceSyncTime(dateSyncTimeEndAsString);}this.encryptionType=_EncryptionType["default"].HASH;if(json.encryptionType)this.encryptionType=json.encryptionType;repository.setEncryptionType(this.encryptionType);}});var _default=exports["default"]=CoreApplication;/***/},/***/395:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _Repository=_interopRequireDefault(__webpack_require__(291));function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e};}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}/* eslint-disable max-len *//* eslint-disable require-jsdoc *//**
58
+ * Device class
59
+ *
60
+ * @class Device
61
+ * @constructor
62
+ * @param {String} browserPublicKey get the browser public key
63
+ * @param {String} browserPrivateKey get the browser private key
64
+ * @param {String} platform get platform
65
+ * @param {String} version get version
66
+ * @param {String} productName get the product name
67
+ * @param {String} productVersion get the product version
68
+ * @param {String} browserName get browser name
69
+ * @param {String} browserVersion get browser version
70
+ * @param {String} osName get OS name
71
+ * @param {String} osVersion get OS version
72
+ * @param {String} deviceType get device type
73
+ * @param {String} locale get langeuage locale
74
+ * @param {String} timeZone get the timezone
75
+ * @param {Number} timeOffset get the time offset
76
+ * @param {String} enabled get if device enabled
77
+ * @param {String} externalCode get the external code
78
+
79
+ */var Device=/*#__PURE__*/function(){function Device(){var json=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var response=arguments.length>1?arguments[1]:undefined;_classCallCheck(this,Device);if(json==null){this.browserPublicKey=new _Repository["default"]().getBrowserPublicKey();this.browserPrivateKey=new _Repository["default"]().getBrowserPrivateKey();this.platform=new _Repository["default"]().getPlatform();this.version=new _Repository["default"]().getVersion();this.browserName=new _Repository["default"]().getBrowserName();this.browserVersion=new _Repository["default"]().getBrowserVersion();this.osName=new _Repository["default"]().getOsName();this.osVersion=new _Repository["default"]().getOsVersion();this.deviceId=new _Repository["default"]().getDeviceId();this.deviceType=new _Repository["default"]().getDeviceType();if(new _Repository["default"]().getEnabled())this.enabled=new _Repository["default"]().getEnabled()==='true';if(new _Repository["default"]().getExternalId())this.externalCode=new _Repository["default"]().getExternalId();}else{if(response){if(json.enabled){this.enabled=json.enabled;new _Repository["default"]().setEnabled(this.enabled);}if(json.registeredByCookie){this.registeredByCookie=json.registeredByCookie;new _Repository["default"]().setRegisteredByCookie(this.registeredByCookie);}}else{if(json.browserPublicKey)this.browserPublicKey=json.browserPublicKey;if(json.browserPrivateKey)this.browserPrivateKey=json.browserPrivateKey;if(json.platform)this.platform=json.platform;if(json.version)this.version=json.version;if(json.osVersion)this.osVersion=json.osVersion;if(json.browserName)this.browserName=json.browserName;if(json.browserVersion)this.browserVersion=json.browserVersion;if(json.osName)this.osName=json.osName;if(json.deviceType)this.deviceType=json.deviceType;if(json.enabled)this.enabled=json.enabled;if(json.externalCode)this.externalCode=json.externalCode;}}if(this.platform)this.productName=this.platform;if(this.version)this.productVersion=this.version;if(navigator&&'language'in navigator)this.locale=navigator.language;// eslint-disable-next-line new-cap
80
+ if(Intl&&'DateTimeFormat'in Intl)this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone;this.timeOffset=-new Date().getTimezoneOffset();}/**
81
+ * Get Device Id
82
+ *
83
+ * @method getDeviceId
84
+ * @return {String} Returns device Id
85
+ */return _createClass(Device,[{key:"getDeviceId",value:function getDeviceId(){return this.deviceId;}},{key:"setDeviceId",value:function setDeviceId(deviceId){this.deviceId=deviceId;}},{key:"setExternalCode",value:function setExternalCode(externalCode){this.externalCode=externalCode;}/**
86
+ * Create JSon with device Info
87
+ *
88
+ * @method toJSON
89
+ * @return {JSON} Returns JSON
90
+ */},{key:"toJSON",value:function toJSON(){var json={};if(this.platform)json.platform=this.platform;if(this.version)json.version=this.version;if(this.productName)json.productName=this.productName;if(this.productVersion)json.productVersion=this.productVersion;if(this.browserName)json.browserName=this.browserName;if(this.browserVersion)json.browserVersion=this.browserVersion;if(this.osName)json.osName=this.osName;if(this.osVersion)json.osVersion=this.osVersion;if(this.deviceType)json.deviceType=this.deviceType;if(this.locale)json.locale=this.locale;if(this.timeZone)json.timeZome=this.timeZone;if(this.timeOffset)json.timeOffset=this.timeOffset;if(this.deviceId)json.deviceId=this.deviceId;if(this.enabled)json.enabled=this.enabled;// if (this.pushToken) json.pushToken = this.pushToken;
91
+ if(this.browserPublicKey)json.browserPublicKey=this.browserPublicKey;if(this.browserPrivateKey)json.browserPrivateKey=this.browserPrivateKey;if(this.externalCode)json.externalCode=this.externalCode;return json;}}]);}();var _default=exports["default"]=Device;/***/},/***/89:function _(__unused_webpack_module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;/**
92
+ *Device Status
93
+ *
94
+ * @enum DeviceStatus
95
+ * @static
96
+ * @property DEFAULT
97
+ * @property ENABLE
98
+ * @property DISABLE
99
+ */var DeviceStatus=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});var _default=exports["default"]=DeviceStatus;/***/},/***/164:function _(__unused_webpack_module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=exports.EncryptionType=void 0;/**
100
+ * EncryptionType
101
+ *
102
+ * @enum EncryptionType
103
+ * @static
104
+ * @property RAW Raw (no encryption)
105
+ * @property HASH HMAC-SHA256
106
+ *
107
+ */var EncryptionType=exports.EncryptionType=Object.freeze({RAW:'raw',HASH:'hash'});var _default=exports["default"]=EncryptionType;/***/},/***/735:function _(__unused_webpack_module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;/**
108
+ *ErrorCode
109
+ *
110
+ * @enum ErrorCode
111
+ * @static
112
+ * @property GENERAL_ERROR,
113
+ * @property SERVER_ERROR,
114
+ * @property GLOBAL_ERROR,
115
+ * @property INITIALIZATION_ERROR,
116
+ * @property PUSH_RECEPTION_ERROR,
117
+ * @property TOPICS_ERROR,
118
+ * @property DEVICE_ERROR,
119
+ * @property EVENT_ERROR,
120
+ * @property INAPP_ERROR,
121
+ * @property POPUP_ERROR,
122
+ * @property GET_INBOX_ERROR,
123
+ *
124
+ */var ErrorCode={GENERAL_ERROR:600,TIMEOUT_REQUEST:605,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 ErrorMessage={GENERAL_ERROR:'General Error',TIMEOUT_REQUEST:'connection timeout',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'};// eslint-disable-next-line require-jsdoc, no-unused-vars
125
+ function getErrorId(key){return ErrorCode[key];}var ErrorDictionary={ErrorCode:ErrorCode,ErrorMessage:ErrorMessage};var _default=exports["default"]=ErrorDictionary;/***/},/***/234:function _(__unused_webpack_module,exports){"use strict";function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}/* eslint-disable max-len *//* eslint-disable require-jsdoc */var ErrorModel=/*#__PURE__*/_createClass(function ErrorModel(errorCode,errorMessage,exceptionMessage){_classCallCheck(this,ErrorModel);this.errorCode=errorCode;this.errorMessage=errorMessage;if(exceptionMessage!=null)this.exceptionMessage=exceptionMessage;});var _default=exports["default"]=ErrorModel;/***/},/***/953:function _(__unused_webpack_module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;/**
126
+ *Event Type
127
+ *
128
+ * @enum EventType
129
+ * @static
130
+ * @property EVENT_TYPE_CLICK
131
+ * @property EVENT_TYPE_RECEIVE
132
+ * @property EVENT_TYPE_UPDATE
133
+ * @property EVENT_TYPE_ACCEPT
134
+ * @property EVENT_TYPE_REJECT
135
+ * @property EVENT_TYPE_ASK
136
+ * @property PERMISSION_TYPE_LOCATION
137
+ * @property PERMISSION_TYPE_TELEPHONY
138
+ *
139
+ */var EventType=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'});var _default=exports["default"]=EventType;/***/},/***/72:function _(__unused_webpack_module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;/**
140
+ *Topic Subscribe Type
141
+ *
142
+ * @enum TopicSubscribeType
143
+ * @static
144
+ * @property SUBSCRIBE
145
+ * @property UNSUBSCRIBE
146
+ *
147
+ */var TopicSubscribeType=Object.freeze({SUBSCRIBE:'subscribe',UNSUBSCRIBE:'unsubscribe'});var _default=exports["default"]=TopicSubscribeType;/***/},/***/225:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Channel",{enumerable:true,get:function get(){return _Channel.Channel;}});Object.defineProperty(exports,"CoreApplication",{enumerable:true,get:function get(){return _CoreApplication["default"];}});Object.defineProperty(exports,"Device",{enumerable:true,get:function get(){return _Device["default"];}});Object.defineProperty(exports,"DeviceStatus",{enumerable:true,get:function get(){return _DeviceStatus["default"];}});Object.defineProperty(exports,"EncryptionType",{enumerable:true,get:function get(){return _EncryptionType["default"];}});Object.defineProperty(exports,"ErrorDictionary",{enumerable:true,get:function get(){return _ErrorDictionary["default"];}});Object.defineProperty(exports,"ErrorModel",{enumerable:true,get:function get(){return _ErrorModel["default"];}});Object.defineProperty(exports,"EventType",{enumerable:true,get:function get(){return _EventType["default"];}});Object.defineProperty(exports,"TopicSubscribeType",{enumerable:true,get:function get(){return _TopicSubscribeType["default"];}});var _Channel=__webpack_require__(902);var _Device=_interopRequireDefault(__webpack_require__(395));var _DeviceStatus=_interopRequireDefault(__webpack_require__(89));var _ErrorDictionary=_interopRequireDefault(__webpack_require__(735));var _ErrorModel=_interopRequireDefault(__webpack_require__(234));var _EventType=_interopRequireDefault(__webpack_require__(953));var _TopicSubscribeType=_interopRequireDefault(__webpack_require__(72));var _CoreApplication=_interopRequireDefault(__webpack_require__(174));var _EncryptionType=_interopRequireDefault(__webpack_require__(164));function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e};}/***/},/***/672:function _(__unused_webpack_module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a;}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0));}if(o||r>1)return a;throw y=!0,n;}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0);}else 1===c&&(t=i["return"])&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e;}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break;}catch(t){i=e,c=1,u=t;}finally{f=1;}}return{value:t,done:y};};}(r,o,i),!0),u;}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this;}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e;}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this;}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]";}),(_regenerator=function _regenerator(){return{w:i,m:f};})();}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{});}catch(e){i=0;}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e);});}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2));},_regeneratorDefine2(e,r,n,t);}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}/* eslint-disable max-len *//* eslint-disable require-jsdoc */var IndexedDB=/*#__PURE__*/function(){function IndexedDB(){_classCallCheck(this,IndexedDB);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;// this.IDBTransaction = IDBTransaction || webkitIDBTransaction || msIDBTransaction;
148
+ // this.IDBKeyRange = IDBKeyRange || webkitIDBKeyRange || msIDBKeyRange;
149
+ }return _createClass(IndexedDB,[{key:"getDB",value:function(){var _getDB=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(){var _this=this;return _regenerator().w(function(_context){while(1)switch(_context.n){case 0:return _context.a(2,new Promise(function(resolve,reject){var IDB=_this.IDB;// window.indexedDB || mozzIndexedDB || webkitIndexedDB || msIndexedDB;
150
+ if(IDB){// Open (or create) the database
151
+ var open=IDB.open('indigitall.indexedDB',1);// Create the schema
152
+ open.onupgradeneeded=function(){var db=open.result;var store=db.createObjectStore('indigitallStore');// eslint-disable-next-line no-unused-vars
153
+ var index=store.createIndex('storeIndex','store.key');};open.onsuccess=function(){// Start a new transaction
154
+ var db=open.result;var tx=db.transaction('indigitallStore','readwrite');var store=tx.objectStore('indigitallStore');var index=store.index('storeIndex');resolve({db:db,tx:tx,store:store,index:index});};open.onerror=function(event){reject(event);};}else{// eslint-disable-next-line prefer-promise-reject-errors
155
+ reject(false);}}));}},_callee);}));function getDB(){return _getDB.apply(this,arguments);}return getDB;}()},{key:"get",value:function(){var _get=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(indexed,key){var _this2=this;return _regenerator().w(function(_context2){while(1)switch(_context2.n){case 0:return _context2.a(2,new Promise(function(resolve,reject){// eslint-disable-next-line prefer-promise-reject-errors
156
+ if(!indexed)reject(false);indexed.index.get(key).onsuccess=function(event){if(event.target.result){_this2.close(indexed);resolve(event.target.result.store.value);}// eslint-disable-next-line prefer-promise-reject-errors
157
+ reject(false);};}));}},_callee2);}));function get(_x,_x2){return _get.apply(this,arguments);}return get;}()},{key:"put",value:function(){var _put=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(indexed,key,value){var _this3=this;return _regenerator().w(function(_context3){while(1)switch(_context3.n){case 0:return _context3.a(2,new Promise(function(resolve,reject){// eslint-disable-next-line prefer-promise-reject-errors
158
+ if(!indexed)reject(false);indexed.store.put({store:{key:key,value:value}},key).onsuccess=function(event){_this3.close(indexed);resolve(value);};}));}},_callee3);}));function put(_x3,_x4,_x5){return _put.apply(this,arguments);}return put;}()// async delete(indexed, key) {
159
+ // return new Promise((resolve, reject) => {
160
+ // if (!indexed) reject(false);
161
+ // });
162
+ // }
163
+ },{key:"close",value:function close(indexed){if(indexed.tx){try{indexed.tx.oncomplete=function(){indexed.db.close();};}catch(err){console.log(this.TAG,err);}}}},{key:"setItem",value:function(){var _setItem=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(key,value){var db,_t;return _regenerator().w(function(_context4){while(1)switch(_context4.p=_context4.n){case 0:_context4.p=0;_context4.n=1;return this.getDB();case 1:db=_context4.v;return _context4.a(2,this.put(db,key,value));case 2:_context4.p=2;_t=_context4.v;return _context4.a(2,_t);}},_callee4,this,[[0,2]]);}));function setItem(_x6,_x7){return _setItem.apply(this,arguments);}return setItem;}()},{key:"getItem",value:function(){var _getItem=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(key){var db,_t2;return _regenerator().w(function(_context5){while(1)switch(_context5.p=_context5.n){case 0:_context5.p=0;_context5.n=1;return this.getDB();case 1:db=_context5.v;return _context5.a(2,this.get(db,key));case 2:_context5.p=2;_t2=_context5.v;return _context5.a(2,_t2);}},_callee5,this,[[0,2]]);}));function getItem(_x8){return _getItem.apply(this,arguments);}return getItem;}()// deleteItem(key) {
164
+ // try {
165
+ // const db = await this.getDB();
166
+ // return this.delete(db, key);
167
+ // } catch(err) {
168
+ // return err;
169
+ // }
170
+ // }
171
+ // clear() {}
172
+ }]);}();// const indexedDB = new IndexedDB();
173
+ var _default=exports["default"]=new IndexedDB();/***/},/***/87:function _(__unused_webpack_module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}/* eslint-disable max-len *//* eslint-disable require-jsdoc */var LocalStorage=/*#__PURE__*/function(){function LocalStorage(){_classCallCheck(this,LocalStorage);this.storage=this.isLocalStorageAvailable()?window['localStorage']:null;}return _createClass(LocalStorage,[{key:"isLocalStorageAvailable",value:function isLocalStorageAvailable(){try{var _storage=window['localStorage'];var x='__storage_test__';if(_storage){_storage.setItem(x,x);_storage.removeItem(x);return true;}}catch(e){return e instanceof DOMException&&(// everything except Firefox
174
+ e.code===22||// Firefox
175
+ e.code===1014||// test name field too, because code might not be present
176
+ // everything except Firefox
177
+ e.name==='QuotaExceededError'||// Firefox
178
+ e.name==='NS_ERROR_DOM_QUOTA_REACHED')&&// acknowledge QuotaExceededError only if there's something already stored
179
+ storage.length!==0;}return false;}},{key:"setItem",value:function setItem(key,value){if(this.storage!=null){this.storage.setItem(key,value);return true;}return false;}},{key:"getItem",value:function getItem(key){if(this.storage!=null){return this.storage.getItem(key);}return null;}},{key:"deleteItem",value:function deleteItem(key){if(this.storage){this.storage.setItem(key,value);return true;}return false;}},{key:"clear",value:function clear(){if(this.storage){this.storage.clear();}}}]);}();var storage=new LocalStorage();var _default=exports["default"]=storage;/***/},/***/291:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _config=_interopRequireDefault(__webpack_require__(122));var _LocalStorage=_interopRequireDefault(__webpack_require__(87));var _IndexedDB=_interopRequireDefault(__webpack_require__(672));var _SessionStorage=_interopRequireDefault(__webpack_require__(238));var _EncryptionType=_interopRequireDefault(__webpack_require__(164));function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e};}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a;}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0));}if(o||r>1)return a;throw y=!0,n;}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0);}else 1===c&&(t=i["return"])&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e;}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break;}catch(t){i=e,c=1,u=t;}finally{f=1;}}return{value:t,done:y};};}(r,o,i),!0),u;}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this;}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e;}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this;}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]";}),(_regenerator=function _regenerator(){return{w:i,m:f};})();}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{});}catch(e){i=0;}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e);});}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2));},_regeneratorDefine2(e,r,n,t);}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}/* eslint-disable max-len *//* eslint-disable require-jsdoc */var Repository=/*#__PURE__*/function(){function Repository(){_classCallCheck(this,Repository);this.storage=_LocalStorage["default"];this.db=_IndexedDB["default"];this.BASE_TIME=60;// 60 minutes
180
+ 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.TIMEOUT_REQUESTS=this.REPOSITORY+'.TIMEOUT_REQUESTS';this.ENCRYPTION_TYPE=this.REPOSITORY+'.ENCRYPTION_TYPE';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';}return _createClass(Repository,[{key:"setItemSessionStorage",value:function setItemSessionStorage(key,value){_SessionStorage["default"].setItem(key,value);}},{key:"getItemSessionStorage",value:function getItemSessionStorage(key){return _SessionStorage["default"].getItem(key);}},{key:"clearSessionStorage",value:function clearSessionStorage(){_SessionStorage["default"].clearMessages();}},{key:"setStorage",value:function setStorage(key,value){_LocalStorage["default"].setItem(key,value);}},{key:"getStorage",value:function getStorage(key){return _LocalStorage["default"].getItem(key);}},{key:"clearStorage",value:function clearStorage(){_LocalStorage["default"].clear();}},{key:"setBrowserPublicKey",value:function setBrowserPublicKey(browserPublicKey){_LocalStorage["default"].setItem(this.BROWSER_PUBLIC_KEY,browserPublicKey);}},{key:"getBrowserPublicKey",value:function getBrowserPublicKey(){return _LocalStorage["default"].getItem(this.BROWSER_PUBLIC_KEY);}},{key:"setBrowserPrivateKey",value:function setBrowserPrivateKey(browserPrivateKey){_LocalStorage["default"].setItem(this.BROWSER_PRIVATE_KEY,browserPrivateKey);}},{key:"getBrowserPrivateKey",value:function getBrowserPrivateKey(){return _LocalStorage["default"].getItem(this.BROWSER_PRIVATE_KEY);}},{key:"setAppKey",value:function(){var _setAppKey=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(appKey){return _regenerator().w(function(_context){while(1)switch(_context.n){case 0:_LocalStorage["default"].setItem(this.APP_KEY,appKey);if(!(_IndexedDB["default"]&&_IndexedDB["default"].IDB)){_context.n=1;break;}_context.n=1;return _IndexedDB["default"].setItem(this.APP_KEY,appKey);case 1:return _context.a(2);}},_callee,this);}));function setAppKey(_x){return _setAppKey.apply(this,arguments);}return setAppKey;}()},{key:"getAppKey",value:function getAppKey(){return _LocalStorage["default"].getItem(this.APP_KEY);}},{key:"setDeviceId",value:function(){var _setDeviceId=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(deviceId){return _regenerator().w(function(_context2){while(1)switch(_context2.n){case 0:if(this.storage&&this.storage.isLocalStorageAvailable())this.setStorage(this.DEVICE_ID,deviceId);if(!(this.db&&this.db.IDB)){_context2.n=1;break;}_context2.n=1;return this.db.setItem(this.DEVICE_ID,deviceId);case 1:return _context2.a(2);}},_callee2,this);}));function setDeviceId(_x2){return _setDeviceId.apply(this,arguments);}return setDeviceId;}()},{key:"getDeviceId",value:function getDeviceId(){return this.getStorage(this.DEVICE_ID);}},{key:"getAppKeySync",value:function(){var _getAppKeySync=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(){return _regenerator().w(function(_context3){while(1)switch(_context3.n){case 0:if(!(_IndexedDB["default"]&&_IndexedDB["default"].IDB)){_context3.n=2;break;}_context3.n=1;return _IndexedDB["default"].getItem(this.APP_KEY);case 1:return _context3.a(2,_context3.v);case 2:return _context3.a(2);}},_callee3,this);}));function getAppKeySync(){return _getAppKeySync.apply(this,arguments);}return getAppKeySync;}()},{key:"setVAPID",value:function setVAPID(vapid){_LocalStorage["default"].setItem(this.VAPID_PUBLIC,vapid);}},{key:"getVAPID",value:function getVAPID(){return _LocalStorage["default"].getItem(this.VAPID_PUBLIC);}},{key:"setEnabled",value:function setEnabled(enabled){_LocalStorage["default"].setItem(this.ENABLED,enabled);}},{key:"getEnabled",value:function getEnabled(){return _LocalStorage["default"].getItem(this.ENABLED);}},{key:"setServiceSyncTime",value:function setServiceSyncTime(serviceSyncTime){_LocalStorage["default"].setItem(this.SERVICE_SYNC_TIME,serviceSyncTime*this.BASE_TIME);}},{key:"getServiceSyncTime",value:function getServiceSyncTime(){var serviceSyncTime=_LocalStorage["default"].getItem(this.SERVICE_SYNC_TIME);return serviceSyncTime?serviceSyncTime:1*this.BASE_TIME;}},{key:"setLocationEnabled",value:function setLocationEnabled(locationEnabled){_LocalStorage["default"].setItem(this.LOCATION_ENABLED,locationEnabled);}},{key:"getLocationEnabled",value:function getLocationEnabled(){return _LocalStorage["default"].getItem(this.LOCATION_ENABLED);}},{key:"setLocationUpdateMinutes",value:function setLocationUpdateMinutes(locationUpdateMinutes){_LocalStorage["default"].setItem(this.LOCATION_UPDATE_MINUTES,locationUpdateMinutes);}},{key:"getLocationUpdateMinutes",value:function getLocationUpdateMinutes(){var locationUpdateMinutes=_LocalStorage["default"].getItem(this.LOCATION_UPDATE_MINUTES);return locationUpdateMinutes?locationUpdateMinutes:30;}},{key:"setRequestLocation",value:function(){var _setRequestLocation=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(requestLocation){return _regenerator().w(function(_context4){while(1)switch(_context4.n){case 0:_LocalStorage["default"].setItem(this.REQUEST_LOCATION,requestLocation);case 1:return _context4.a(2);}},_callee4,this);}));function setRequestLocation(_x3){return _setRequestLocation.apply(this,arguments);}return setRequestLocation;}()},{key:"getRequestLocation",value:function getRequestLocation(){if(_LocalStorage["default"]){return _LocalStorage["default"].getItem(this.REQUEST_LOCATION);}return false;}},{key:"setPlatform",value:function(){var _setPlatform=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(platform){return _regenerator().w(function(_context5){while(1)switch(_context5.n){case 0:_LocalStorage["default"].setItem(this.PLATFORM,platform);case 1:return _context5.a(2);}},_callee5,this);}));function setPlatform(_x4){return _setPlatform.apply(this,arguments);}return setPlatform;}()},{key:"getPlatform",value:function getPlatform(){if(_LocalStorage["default"]){return _LocalStorage["default"].getItem(this.PLATFORM)||_config["default"].platform;}return _config["default"].platform;}},{key:"getVersion",value:function getVersion(){return _config["default"].version;}},{key:"setBrowserName",value:function(){var _setBrowserName=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(browserName){return _regenerator().w(function(_context6){while(1)switch(_context6.n){case 0:_LocalStorage["default"].setItem(this.BROWSER_NAME,browserName);case 1:return _context6.a(2);}},_callee6,this);}));function setBrowserName(_x5){return _setBrowserName.apply(this,arguments);}return setBrowserName;}()},{key:"getBrowserName",value:function getBrowserName(){return _LocalStorage["default"].getItem(this.BROWSER_NAME);}},{key:"setBrowserVersion",value:function setBrowserVersion(browserVersion){_LocalStorage["default"].setItem(this.BROWSER_VERSION,browserVersion);}},{key:"getBrowserVersion",value:function getBrowserVersion(){return _LocalStorage["default"].getItem(this.BROWSER_VERSION);}},{key:"setOsName",value:function(){var _setOsName=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(osName){return _regenerator().w(function(_context7){while(1)switch(_context7.n){case 0:_LocalStorage["default"].setItem(this.OS_NAME,osName);case 1:return _context7.a(2);}},_callee7,this);}));function setOsName(_x6){return _setOsName.apply(this,arguments);}return setOsName;}()},{key:"getOsName",value:function getOsName(){return _LocalStorage["default"].getItem(this.OS_NAME);}},{key:"setOsVersion",value:function setOsVersion(osVersion){_LocalStorage["default"].setItem(this.OS_VERSION,osVersion);}},{key:"getOsVersion",value:function getOsVersion(){return _LocalStorage["default"].getItem(this.OS_VERSION);}},{key:"setDeviceType",value:function setDeviceType(deviceType){_LocalStorage["default"].setItem(this.DEVICE_TYPE,deviceType);}},{key:"getDeviceType",value:function getDeviceType(){return _LocalStorage["default"].getItem(this.DEVICE_TYPE);}},{key:"setSupported",value:function setSupported(supported){_LocalStorage["default"].setItem(this.SUPPORTED,supported);}},{key:"getSupported",value:function getSupported(){return _LocalStorage["default"].getItem(this.SUPPORTED);}},{key:"setServiceTimestamp",value:function setServiceTimestamp(serviceTimestamp){_LocalStorage["default"].setItem(this.SERVICE_TIMESTAMP,serviceTimestamp);}},{key:"getServiceTimestamp",value:function getServiceTimestamp(){return _LocalStorage["default"].getItem(this.SERVICE_TIMESTAMP);}},{key:"setLocationTimestamp",value:function setLocationTimestamp(locationTimestamp){_LocalStorage["default"].setItem(this.LOCATION_TIMESTAMP,locationTimestamp);}},{key:"getLocationTimestamp",value:function getLocationTimestamp(){return _LocalStorage["default"].getItem(this.LOCATION_TIMESTAMP);}},{key:"setPermissionLocation",value:function setPermissionLocation(permissionLocation){_LocalStorage["default"].setItem(this.PERMISSION_LOCATION,permissionLocation);}},{key:"getPermissionLocation",value:function getPermissionLocation(){return _LocalStorage["default"].getItem(this.PERMISSION_LOCATION);}},{key:"setDebugLog",value:function setDebugLog(debugLog){_LocalStorage["default"].setItem(this.SET_LOG_DEBUG,debugLog);}},{key:"getDebugLog",value:function getDebugLog(){return _LocalStorage["default"].getItem(this.SET_LOG_DEBUG)!=='false';}},{key:"setLogLevel",value:function setLogLevel(logLevel){_LocalStorage["default"].setItem(this.LOG_LEVEL,logLevel);}},{key:"getLogLevel",value:function getLogLevel(){return _LocalStorage["default"].getItem(this.LOG_LEVEL);}},{key:"setNewUserTimestamp",value:function setNewUserTimestamp(newUserTimestamp){_LocalStorage["default"].setItem(this.NEW_USER_TIMESTAMP,newUserTimestamp);}},{key:"getNewUserTimestamp",value:function getNewUserTimestamp(){return _LocalStorage["default"].getItem(this.NEW_USER_TIMESTAMP);}},{key:"setExternalIdRequest",value:function(){var _setExternalIdRequest=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8(externalId){return _regenerator().w(function(_context8){while(1)switch(_context8.n){case 0:if(_LocalStorage["default"]&&_LocalStorage["default"].isLocalStorageAvailable())_LocalStorage["default"].setItem(this.EXTERNAL_ID,externalId);if(!(_IndexedDB["default"]&&_IndexedDB["default"].IDB)){_context8.n=1;break;}_context8.n=1;return _IndexedDB["default"].setItem(this.EXTERNAL_ID,externalId);case 1:return _context8.a(2);}},_callee8,this);}));function setExternalIdRequest(_x7){return _setExternalIdRequest.apply(this,arguments);}return setExternalIdRequest;}()},{key:"getExternalIdRequest",value:function(){var _getExternalIdRequest=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9(){var externalId,_t;return _regenerator().w(function(_context9){while(1)switch(_context9.p=_context9.n){case 0:_context9.p=0;if(!(_LocalStorage["default"]&&_LocalStorage["default"].isLocalStorageAvailable())){_context9.n=1;break;}externalId=_LocalStorage["default"].getItem(this.EXTERNAL_ID);_context9.n=3;break;case 1:if(!(_IndexedDB["default"]&&_IndexedDB["default"].IDB)){_context9.n=3;break;}_context9.n=2;return _IndexedDB["default"].getItem(this.EXTERNAL_ID);case 2:externalId=_context9.v;case 3:_context9.n=5;break;case 4:_context9.p=4;_t=_context9.v;case 5:return _context9.a(2,externalId);}},_callee9,this,[[0,4]]);}));function getExternalIdRequest(){return _getExternalIdRequest.apply(this,arguments);}return getExternalIdRequest;}()},{key:"setExternalId",value:function setExternalId(externalId){_LocalStorage["default"].setItem(this.EXTERNAL_ID,externalId);}},{key:"getExternalId",value:function getExternalId(){return _LocalStorage["default"].getItem(this.EXTERNAL_ID);}},{key:"getRegisteredByCookie",value:function(){var _getRegisteredByCookie=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(){return _regenerator().w(function(_context0){while(1)switch(_context0.n){case 0:return _context0.a(2,_LocalStorage["default"].getItem(this.REGISTERED_BY_COOKIE));}},_callee0,this);}));function getRegisteredByCookie(){return _getRegisteredByCookie.apply(this,arguments);}return getRegisteredByCookie;}()},{key:"setRegisteredByCookie",value:function(){var _setRegisteredByCookie=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1(value){return _regenerator().w(function(_context1){while(1)switch(_context1.n){case 0:_LocalStorage["default"].setItem(this.REGISTERED_BY_COOKIE,value);case 1:return _context1.a(2);}},_callee1,this);}));function setRegisteredByCookie(_x8){return _setRegisteredByCookie.apply(this,arguments);}return setRegisteredByCookie;}()},{key:"setLatitude",value:function setLatitude(value){_LocalStorage["default"].setItem(this.LATITUDE,value);}},{key:"getLatitude",value:function getLatitude(){return _LocalStorage["default"].getItem(this.LATITUDE);}},{key:"setLongitude",value:function setLongitude(value){_LocalStorage["default"].setItem(this.LONGITUDE,value);}},{key:"getLongitude",value:function getLongitude(){return _LocalStorage["default"].getItem(this.LONGITUDE);}},{key:"setInAppTopicList",value:function(){var _setInAppTopicList=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee10(value){return _regenerator().w(function(_context10){while(1)switch(_context10.n){case 0:if(!(this.db&&this.db.IDB)){_context10.n=1;break;}_context10.n=1;return this.db.setItem(this.INAPP_TOPICS,value);case 1:return _context10.a(2);}},_callee10,this);}));function setInAppTopicList(_x9){return _setInAppTopicList.apply(this,arguments);}return setInAppTopicList;}()},{key:"getInAppTopicList",value:function(){var _getInAppTopicList=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee11(){var getValue,_t2;return _regenerator().w(function(_context11){while(1)switch(_context11.p=_context11.n){case 0:_context11.p=0;if(!(this.db&&this.db.IDB)){_context11.n=2;break;}_context11.n=1;return this.db.getItem(this.INAPP_TOPICS);case 1:getValue=_context11.v;case 2:_context11.n=4;break;case 3:_context11.p=3;_t2=_context11.v;case 4:return _context11.a(2,getValue);}},_callee11,this,[[0,3]]);}));function getInAppTopicList(){return _getInAppTopicList.apply(this,arguments);}return getInAppTopicList;}()},{key:"setTopicList",value:function(){var _setTopicList=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee12(value){return _regenerator().w(function(_context12){while(1)switch(_context12.n){case 0:if(!(this.db&&this.db.IDB)){_context12.n=1;break;}_context12.n=1;return this.db.setItem(this.TOPIC_LIST,value);case 1:return _context12.a(2);}},_callee12,this);}));function setTopicList(_x0){return _setTopicList.apply(this,arguments);}return setTopicList;}()},{key:"getTopicList",value:function(){var _getTopicList=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee13(){var getValue,_t3;return _regenerator().w(function(_context13){while(1)switch(_context13.p=_context13.n){case 0:_context13.p=0;if(!(this.db&&this.db.IDB)){_context13.n=2;break;}_context13.n=1;return this.db.getItem(this.TOPIC_LIST);case 1:getValue=_context13.v;case 2:_context13.n=4;break;case 3:_context13.p=3;_t3=_context13.v;case 4:return _context13.a(2,getValue);}},_callee13,this,[[0,3]]);}));function getTopicList(){return _getTopicList.apply(this,arguments);}return getTopicList;}()},{key:"getUrlInappApi",value:function getUrlInappApi(){return this.getStorage(this.URL_INAPP_API);}},{key:"setUrlInappApi",value:function setUrlInappApi(value){this.setStorage(this.URL_INAPP_API,value);}},{key:"setInAppEnabled",value:function setInAppEnabled(enabled){this.setStorage(this.INAPP_ENABLED,enabled);}},{key:"isInAppEnabled",value:function isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED);}},{key:"setAvoidCypher",value:function setAvoidCypher(avoidCypher){this.setStorage(this.AVOID_CYPHER,avoidCypher===true);}},{key:"isAvoidCypher",value:function isAvoidCypher(){return this.getStorage(this.AVOID_CYPHER)==='true';}},{key:"getUrlDeviceApi",value:function(){var _getUrlDeviceApi=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee14(){var urlDeviceApi,_t4;return _regenerator().w(function(_context14){while(1)switch(_context14.p=_context14.n){case 0:_context14.p=0;if(!(this.storage&&this.storage.isLocalStorageAvailable())){_context14.n=1;break;}urlDeviceApi=this.getStorage(this.URL_DEVICE_API);_context14.n=3;break;case 1:if(!(this.db&&this.db.IDB)){_context14.n=3;break;}_context14.n=2;return this.db.getItem(this.URL_DEVICE_API);case 2:urlDeviceApi=_context14.v;case 3:_context14.n=5;break;case 4:_context14.p=4;_t4=_context14.v;case 5:return _context14.a(2,urlDeviceApi);}},_callee14,this,[[0,4]]);}));function getUrlDeviceApi(){return _getUrlDeviceApi.apply(this,arguments);}return getUrlDeviceApi;}()},{key:"setUrlDeviceApi",value:function(){var _setUrlDeviceApi=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee15(value){return _regenerator().w(function(_context15){while(1)switch(_context15.n){case 0:if(this.storage&&this.storage.isLocalStorageAvailable())this.setStorage(this.URL_DEVICE_API,value);if(!(this.db&&this.db.IDB)){_context15.n=1;break;}_context15.n=1;return this.db.setItem(this.URL_DEVICE_API,value);case 1:return _context15.a(2);}},_callee15,this);}));function setUrlDeviceApi(_x1){return _setUrlDeviceApi.apply(this,arguments);}return setUrlDeviceApi;}()},{key:"setPushDisabled",value:function setPushDisabled(value){this.setStorage(this.PUSH_DISABLED,value);}},{key:"isPushDisabled",value:function isPushDisabled(){return this.getStorage(this.PUSH_DISABLED);}},{key:"getConfigV2ServiceSyncTime",value:function getConfigV2ServiceSyncTime(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME);}},{key:"setConfigV2ServiceSyncTime",value:function setConfigV2ServiceSyncTime(value){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,value);}},{key:"getConfigV2",value:function getConfigV2(){return this.getStorage(this.CONFIG_V2);}},{key:"setConfigV2",value:function setConfigV2(value){this.setStorage(this.CONFIG_V2,value);}},{key:"getMaintenanceEnd",value:function getMaintenanceEnd(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY);}},{key:"setMaintenanceEnd",value:function setMaintenanceEnd(value){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,value);}},{key:"getMaintenanceStart",value:function getMaintenanceStart(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY);}},{key:"setMaintenanceStart",value:function setMaintenanceStart(value){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,value);}},{key:"getTimeoutRequestsInMilliseconds",value:function getTimeoutRequestsInMilliseconds(){return this.getStorage(this.TIMEOUT_REQUESTS);}},{key:"setTimeoutRequestsInMilliseconds",value:function setTimeoutRequestsInMilliseconds(value){this.setStorage(this.TIMEOUT_REQUESTS,value);}},{key:"getEncryptionType",value:function getEncryptionType(){var type=this.getStorage(this.ENCRYPTION_TYPE);if(type===null){return _EncryptionType["default"].HASH;}return type;}},{key:"setEncryptionType",value:function setEncryptionType(value){this.setStorage(this.ENCRYPTION_TYPE,value);}}]);}();// const repository = new Repository();
181
+ var _default=exports["default"]=Repository;/***/},/***/238:function _(__unused_webpack_module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}/* eslint-disable max-len *//* eslint-disable require-jsdoc */var SessionStorage=/*#__PURE__*/function(){function SessionStorage(){_classCallCheck(this,SessionStorage);this.SESSION='indigitall.session.storage';this.session=this.isSessionStorageAvailable()?window['sessionStorage']:null;}return _createClass(SessionStorage,[{key:"isSessionStorageAvailable",value:function isSessionStorageAvailable(){try{var _session=window['sessionStorage'];var x='__storage_test__';if(_session){_session.setItem(x,x);_session.removeItem(x);return true;}}catch(e){return e instanceof DOMException&&(// everything except Firefox
182
+ e.code===22||// Firefox
183
+ e.code===1014||// test name field too, because code might not be present
184
+ // everything except Firefox
185
+ e.name==='QuotaExceededError'||// Firefox
186
+ e.name==='NS_ERROR_DOM_QUOTA_REACHED')&&// acknowledge QuotaExceededError only if there's something already stored
187
+ session.length!==0;}return false;}},{key:"getItem",value:function getItem(name){if(this.session!=null){return this.session.getItem(name);}return null;}},{key:"setItem",value:function setItem(name,value){if(this.session!=null){this.session.setItem(name,value);return true;}return false;}},{key:"clearMessages",value:function clearMessages(){if(this.session){this.session.removeItem('messages');}}}]);}();var session=new SessionStorage();var _default=exports["default"]=session;/***/},/***/622:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _Repository=_interopRequireDefault(__webpack_require__(291));var _Log=_interopRequireDefault(__webpack_require__(254));function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e};}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}/* eslint-disable max-len *//* eslint-disable require-jsdoc */var CommonUtils=/*#__PURE__*/function(){function CommonUtils(){_classCallCheck(this,CommonUtils);}return _createClass(CommonUtils,null,[{key:"isServiceTimestampExceed",value:function isServiceTimestampExceed(){return!new _Repository["default"]().getServiceTimestamp()||new _Repository["default"]().getServiceSyncTime()<=(Date.now()-new _Repository["default"]().getServiceTimestamp())/60000;}},{key:"isFunction",value:function isFunction(method){if(method&&typeof method==='function'){return true;}else{return false;}}},{key:"generateUUID",value:function generateUUID(){var log=new _Log["default"]('[IND]CommonUtils: ');if(typeof crypto!=='undefined'&&crypto.randomUUID){log.d('Using crypto.randomUUID to generate UUID').writeLog();return crypto.randomUUID();}if(typeof crypto!=='undefined'&&crypto.getRandomValues){log.d('Using crypto.getRandomValues to generate UUID').writeLog();return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(c){return(c^crypto.getRandomValues(new Uint8Array(1))[0]&15>>c/4).toString(16);});}return null;}}]);}();var _default=exports["default"]=CommonUtils;/***/},/***/429:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _Log=_interopRequireDefault(__webpack_require__(254));function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e};}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a;}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0));}if(o||r>1)return a;throw y=!0,n;}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0);}else 1===c&&(t=i["return"])&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e;}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break;}catch(t){i=e,c=1,u=t;}finally{f=1;}}return{value:t,done:y};};}(r,o,i),!0),u;}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this;}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e;}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this;}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]";}),(_regenerator=function _regenerator(){return{w:i,m:f};})();}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{});}catch(e){i=0;}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e);});}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2));},_regeneratorDefine2(e,r,n,t);}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}/* eslint-disable max-len *//* eslint-disable require-jsdoc */var TAG='[IND]CorePermissions: ';var CorePermissions=/*#__PURE__*/function(){function CorePermissions(){_classCallCheck(this,CorePermissions);}return _createClass(CorePermissions,null,[{key:"getLocationPermission",value:function(){var _getLocationPermission=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(){var location,permissions;return _regenerator().w(function(_context){while(1)switch(_context.n){case 0:_context.n=1;return this.getPermission('geolocation');case 1:location=_context.v;permissions={};if(location)permissions.location=location.state;// console.log('get permissions: ', permissions);
188
+ return _context.a(2,permissions);}},_callee,this);}));function getLocationPermission(){return _getLocationPermission.apply(this,arguments);}return getLocationPermission;}()},{key:"getPermission",value:function(){var _getPermission=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(name){var _t;return _regenerator().w(function(_context2){while(1)switch(_context2.p=_context2.n){case 0:_context2.p=0;if(!(navigator&&navigator.permissions&&navigator.permissions.query&&name)){_context2.n=2;break;}_context2.n=1;return navigator.permissions.query({name:name,userVisibleOnly:true});case 1:return _context2.a(2,_context2.v);case 2:_context2.n=4;break;case 3:_context2.p=3;_t=_context2.v;return _context2.a(2,null);case 4:return _context2.a(2,null);}},_callee2,null,[[0,3]]);}));function getPermission(_x){return _getPermission.apply(this,arguments);}return getPermission;}()},{key:"setPermissionsCallback",value:function(){var _setPermissionsCallback=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(){return _regenerator().w(function(_context3){while(1)switch(_context3.n){case 0:_context3.n=1;return this.setCallback('geolocation',navigator.indigitallRequestLocationPermission);case 1:return _context3.a(2);}},_callee3,this);}));function setPermissionsCallback(){return _setPermissionsCallback.apply(this,arguments);}return setPermissionsCallback;}()},{key:"setCallback",value:function(){var _setCallback=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(name,callback){var permission,oldPermission;return _regenerator().w(function(_context4){while(1)switch(_context4.n){case 0:_context4.n=1;return this.getPermission(name);case 1:permission=_context4.v;if(permission){oldPermission=permission.state;if('onchange'in permission){permission.onchange=function(){var log=new _Log["default"](TAG);log.d(name+' permission state has changed from '+oldPermission+' to '+permission.state).writeLog();oldPermission=permission.state;if(callback){callback({name:name,state:permission.state});}};}}case 2:return _context4.a(2);}},_callee4,this);}));function setCallback(_x2,_x3){return _setCallback.apply(this,arguments);}return setCallback;}()}]);}();var _default=exports["default"]=CorePermissions;/***/},/***/170:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=exports.CryptoUtils=void 0;var _models=__webpack_require__(225);var _Repository=_interopRequireDefault(__webpack_require__(291));var _Log=_interopRequireDefault(__webpack_require__(254));function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e};}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a;}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0));}if(o||r>1)return a;throw y=!0,n;}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0);}else 1===c&&(t=i["return"])&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e;}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break;}catch(t){i=e,c=1,u=t;}finally{f=1;}}return{value:t,done:y};};}(r,o,i),!0),u;}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this;}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e;}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this;}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]";}),(_regenerator=function _regenerator(){return{w:i,m:f};})();}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{});}catch(e){i=0;}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e);});}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2));},_regeneratorDefine2(e,r,n,t);}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}/* eslint-disable max-len *//* eslint-disable require-jsdoc */var log=new _Log["default"]('[IND]Crypto');var encoder=new TextEncoder('utf-8');var FORMAT_RAW='raw';var ALGORITHM_HMAC='HMAC';var HASH_SHA256='SHA-256';var CryptoUtils=exports.CryptoUtils=/*#__PURE__*/function(){function CryptoUtils(){_classCallCheck(this,CryptoUtils);}return _createClass(CryptoUtils,null,[{key:"createHmac",value:function(){var _createHmac=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(secretKey,data){var hmac,encryptionType,_window,crypto,key,signature,byteArray,_t;return _regenerator().w(function(_context){while(1)switch(_context.p=_context.n){case 0:_context.p=0;hmac=data;if(!(new _Repository["default"]().isAvoidCypher()===true||new _Repository["default"]().getEncryptionType()===_models.EncryptionType.RAW)){_context.n=1;break;}return _context.a(2,data);case 1:encryptionType=new _Repository["default"]().getEncryptionType();if(!(encryptionType===_models.EncryptionType.HASH)){_context.n=5;break;}crypto=(_window=window)===null||_window===void 0||(_window=_window.crypto)===null||_window===void 0?void 0:_window.subtle;//require('crypto');
189
+ if(crypto){_context.n=2;break;}return _context.a(2);case 2:_context.n=3;return crypto.importKey(FORMAT_RAW,// raw format of the key - should be Uint8Array
190
+ encoder.encode(secretKey),// encoded secretKey
191
+ {// algorithm details
192
+ name:ALGORITHM_HMAC,hash:{name:HASH_SHA256}},false,// export = false
193
+ ['sign','verify']// what this key can do
194
+ );case 3:key=_context.v;_context.n=4;return crypto.sign(ALGORITHM_HMAC,key,encoder.encode(data));case 4:signature=_context.v;// log.d('signature:', signature).writeLog();
195
+ byteArray=new Uint8Array(signature);hmac=Array.prototype.map.call(byteArray,function(x){return('00'+x.toString(16)).slice(-2);}).join('');log.d('hmac: ',hmac).writeLog();case 5:return _context.a(2,hmac);case 6:_context.p=6;_t=_context.v;log.e('error:',_t).writeLog();return _context.a(2);}},_callee,null,[[0,6]]);}));function createHmac(_x,_x2){return _createHmac.apply(this,arguments);}return createHmac;}()}]);}();;var _default=exports["default"]=CryptoUtils;/***/},/***/497:function _(__unused_webpack_module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]};},e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}var DateUtils=/*#__PURE__*/function(){function DateUtils(){_classCallCheck(this,DateUtils);}return _createClass(DateUtils,null,[{key:"normalizeDateString",value:/**
196
+ * Normalizes a date string into the canonical UTC format
197
+ * "yyyy-MM-dd'T'HH:mm:ss.SSSZ".
198
+ *
199
+ * @param {string|number|Date} dateInput
200
+ * @returns {string|null}
201
+ */function normalizeDateString(dateInput){if(typeof dateInput==='number'||dateInput instanceof Date){var _date=new Date(dateInput);return!isNaN(_date.getTime())?this.formatCanonicalUTC(_date):null;}if(!dateInput||typeof dateInput!=='string'){return null;}var stringValue=dateInput.trim();if(this.isCanonicalFormat(stringValue)){return stringValue;}var date=this.tryToParseLeniently(stringValue);return date?this.formatCanonicalUTC(date):null;}// ---------- Private helpers ----------
202
+ },{key:"isCanonicalFormat",value:function isCanonicalFormat(value){var canonicalRegex=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;return canonicalRegex.test(value);}},{key:"tryToParseLeniently",value:function tryToParseLeniently(value){var _iterator=_createForOfIteratorHelper(this.LENIENT_DATE_FORMATS),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var format=_step.value;var date=this.parseByFormat(value,format);if(date&&!isNaN(date.getTime())){return date;}}}catch(err){_iterator.e(err);}finally{_iterator.f();}return null;}},{key:"parseByFormat",value:function parseByFormat(value,format){switch(format){case"yyyy-MM-dd'T'HH:mm:ss.SSSZ":return new Date(value);case"yyyy-MM-dd'T'HH:mm:ssZ":if(value.endsWith("Z")){return new Date(value);}return new Date(value.replaceAll(/([+-]\d{2})(\d{2})$/g,"$1:$2"));case"yyyy-MM-dd'T'HH:mm:ss":return new Date(value+"Z");case"yyyy-MM-dd HH:mm:ss":return new Date(value.replaceAll(" ","T")+"Z");case"yyyy-MM-dd":return new Date(value+"T00:00:00Z");default:return null;}}},{key:"formatCanonicalUTC",value:function formatCanonicalUTC(date){return date.toISOString();}}]);}();_defineProperty(DateUtils,"DATE_FORMAT_PATTERN","yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");_defineProperty(DateUtils,"LENIENT_DATE_FORMATS",["yyyy-MM-dd'T'HH:mm:ss.SSSZ","yyyy-MM-dd'T'HH:mm:ssZ","yyyy-MM-dd'T'HH:mm:ss","yyyy-MM-dd HH:mm:ss","yyyy-MM-dd"]);var _default=exports["default"]=DateUtils;/***/},/***/457:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _ErrorDictionary=_interopRequireDefault(__webpack_require__(735));var _ErrorModel=_interopRequireDefault(__webpack_require__(234));function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e};}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}/* eslint-disable max-len *//* eslint-disable require-jsdoc */var ErrorUtils=/*#__PURE__*/function(){function ErrorUtils(){_classCallCheck(this,ErrorUtils);}return _createClass(ErrorUtils,[{key:"showError",value:function showError(errorDictionary,statusCode,excepcionMessage){if(errorDictionary!=null){var id=Object.values(errorDictionary.ErrorCode).indexOf(statusCode);if(id>=0){var keyObject=Object.keys(errorDictionary.ErrorCode)[id];var valueObject=Object.values(errorDictionary.ErrorCode)[id];var key={code:keyObject,errorId:valueObject};return new _ErrorModel["default"](key,Object.values(errorDictionary.ErrorMessage)[id],excepcionMessage);}else{return new _ErrorModel["default"](_ErrorDictionary["default"].ErrorCode.GENERAL_ERROR,'general error',excepcionMessage);}}}}]);}();var _default=exports["default"]=new ErrorUtils();/***/},/***/325:function _(__unused_webpack_module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}/* eslint-disable max-len *//* eslint-disable require-jsdoc */var JsonUtils=/*#__PURE__*/function(){function JsonUtils(){_classCallCheck(this,JsonUtils);}return _createClass(JsonUtils,null,[{key:"compareJSON",value:function compareJSON(jsonOne,jsonTwo){var obj1Keys=Object.keys(jsonOne);var obj2Keys=Object.keys(jsonTwo);if(obj1Keys.length!==obj2Keys.length){return false;}for(var _i=0,_obj1Keys=obj1Keys;_i<_obj1Keys.length;_i++){var objKey=_obj1Keys[_i];if(jsonOne[objKey]!==jsonTwo[objKey]){if(_typeof(jsonOne[objKey])=='object'&&_typeof(jsonTwo[objKey])=='object'){if(!isEqual(jsonOne[objKey],jsonTwo[objKey])){return false;}}else{return false;}}}return true;}}]);}();var _default=exports["default"]=JsonUtils;/***/},/***/254:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _Repository=_interopRequireDefault(__webpack_require__(291));var _LogLevel=_interopRequireDefault(__webpack_require__(630));function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e};}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}/* eslint-disable prefer-rest-params *//* eslint-disable max-len *//* eslint-disable require-jsdoc */var Log=/*#__PURE__*/function(){function Log(tag){_classCallCheck(this,Log);this.tag='[IND]';if(tag)this.tag=tag;this.level=_LogLevel["default"].INFO;this.setLogLevel(new _Repository["default"]().getLogLevel());this.log=[];}return _createClass(Log,[{key:"setLogLevel",value:function setLogLevel(logLevel){if(logLevel&&logLevel>=_LogLevel["default"].DEBUG&&logLevel<=_LogLevel["default"].ERROR){this.level=logLevel;}}},{key:"d",value:function d(){if(this.level<=_LogLevel["default"].DEBUG){for(var i=0;i<arguments.length;i++){// console.log('args: ', typeof(arguments[i]), arguments[i]);
203
+ this.log+=Log.addedAsString(arguments[i]);}}return this;}},{key:"i",value:function i(){if(this.level<=_LogLevel["default"].INFO){for(var _i=0;_i<arguments.length;_i++){this.log+=Log.addedAsString(arguments[_i]);}}return this;}},{key:"w",value:function w(){if(this.level<=_LogLevel["default"].WARNING){for(var i=0;i<arguments.length;i++){this.log+=Log.addedAsString(arguments[i]);}}return this;}},{key:"e",value:function e(){if(this.level<=_LogLevel["default"].ERROR){if(arguments.length==1&&arguments.errorCode){this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);}else{for(var i=0;i<arguments.length;i++){this.log+=Log.addedAsString(arguments[i]);}}}return this;}},{key:"writeLog",value:function writeLog(){// console.log('level: ', this.level);
204
+ if(this.log.length>0){if(this.tag&&this.log)console.log(this.tag,this.log);}this.log=[];}}],[{key:"addedAsString",value:function addedAsString(arg){if(typeof arg==='string'){return arg;}else{return JSON.stringify(arg,null,2);}}}]);}();var _default=exports["default"]=Log;/***/},/***/630:function _(__unused_webpack_module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=exports.LogLevel=void 0;var LogLevel=exports.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});var _default=exports["default"]=LogLevel;/***/},/***/662:function _(__unused_webpack_module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}/* eslint-disable max-len *//* eslint-disable require-jsdoc */var TopicUtils=/*#__PURE__*/function(){function TopicUtils(){_classCallCheck(this,TopicUtils);}return _createClass(TopicUtils,null,[{key:"setTopicChannel",value:function setTopicChannel(topicsList,channel){var topics=[];for(var i=0;i<topicsList.length;i++){var topic=topicsList[i];topic.channel=channel;topics.push(topic);}return topics;}}]);}();var _default=exports["default"]=TopicUtils;/***/},/***/332:function _(__unused_webpack_module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}/* eslint-disable max-len *//* eslint-disable require-jsdoc */var Validations=/*#__PURE__*/function(){function Validations(){_classCallCheck(this,Validations);}return _createClass(Validations,null,[{key:"isValidFormat",value:function isValidFormat(field){return field!=null&&field!=''&&field!='null'&&field.length>8;}}]);}();var _default=exports["default"]=Validations;/***/},/***/628:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"CommonUtils",{enumerable:true,get:function get(){return _CommonUtils["default"];}});Object.defineProperty(exports,"CorePermissions",{enumerable:true,get:function get(){return _CorePermissions["default"];}});Object.defineProperty(exports,"CryptoUtils",{enumerable:true,get:function get(){return _CryptoUtils["default"];}});Object.defineProperty(exports,"DateUtils",{enumerable:true,get:function get(){return _DateUtils["default"];}});Object.defineProperty(exports,"ErrorUtils",{enumerable:true,get:function get(){return _ErrorUtils["default"];}});Object.defineProperty(exports,"JsonUtils",{enumerable:true,get:function get(){return _JsonUtils["default"];}});Object.defineProperty(exports,"Log",{enumerable:true,get:function get(){return _Log["default"];}});Object.defineProperty(exports,"LogLevel",{enumerable:true,get:function get(){return _LogLevel.LogLevel;}});Object.defineProperty(exports,"TopicUtils",{enumerable:true,get:function get(){return _TopicUtils["default"];}});Object.defineProperty(exports,"Validations",{enumerable:true,get:function get(){return _Validations["default"];}});var _CommonUtils=_interopRequireDefault(__webpack_require__(622));var _CorePermissions=_interopRequireDefault(__webpack_require__(429));var _CryptoUtils=_interopRequireDefault(__webpack_require__(170));var _ErrorUtils=_interopRequireDefault(__webpack_require__(457));var _JsonUtils=_interopRequireDefault(__webpack_require__(325));var _Log=_interopRequireDefault(__webpack_require__(254));var _LogLevel=__webpack_require__(630);var _Validations=_interopRequireDefault(__webpack_require__(332));var _TopicUtils=_interopRequireDefault(__webpack_require__(662));var _DateUtils=_interopRequireDefault(__webpack_require__(497));function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e};}/***/},/***/740:function _(module){/*! For license information please see customer.min.js.LICENSE.txt */!function(e,t){if(true)module.exports=t();else// removed by dead control flow
205
+ {var n,r;}}(this,function(){return function(){var e={710:function _(e){var t;t=function t(){return function(_Class2){"use strict";var e={330:function _(e){e.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.16.6","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"}}');}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports;}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]});},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t);},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0});};var n={};r.r(n),r.d(n,{"default":function _default(){return x;}});var i={};r.r(i),r.d(i,{BaseApplicationRequest:function BaseApplicationRequest(){return T;},BaseClient:function BaseClient(){return O;},BaseEventRequest:function BaseEventRequest(){return w;},BaseRequest:function BaseRequest(){return R;}});var o={};r.r(o),r.d(o,{Channel:function Channel(){return N;},CoreApplication:function CoreApplication(){return U;},Device:function Device(){return C;},DeviceStatus:function DeviceStatus(){return D;},EncryptionType:function EncryptionType(){return y;},ErrorDictionary:function ErrorDictionary(){return b;},ErrorModel:function ErrorModel(){return g;},EventType:function EventType(){return M;},TopicSubscribeType:function TopicSubscribeType(){return L;}});var s={};r.r(s),r.d(s,{CommonUtils:function CommonUtils(){return P;},CorePermissions:function CorePermissions(){return B;},CryptoUtils:function CryptoUtils(){return Y;},DateUtils:function DateUtils(){return A;},ErrorUtils:function ErrorUtils(){return S;},JsonUtils:function JsonUtils(){return F;},Log:function Log(){return _;},LogLevel:function LogLevel(){return m;},TopicUtils:function TopicUtils(){return K;},Validations:function Validations(){return G;}});var a={platform:"webpush",version:"0.0.1"};var u=r(330);a.version=u.version;var 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(/*#__PURE__*/function(){function _class5(){_classCallCheck2(this,_class5);this.storage=this.isLocalStorageAvailable()?window.localStorage:null;}return _createClass2(_class5,[{key:"isLocalStorageAvailable",value:function isLocalStorageAvailable(){try{var _e9=window.localStorage,_t36="__storage_test__";if(_e9)return _e9.setItem(_t36,_t36),_e9.removeItem(_t36),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==l.length;}return!1;}},{key:"setItem",value:function setItem(e,t){return null!=this.storage&&(this.storage.setItem(e,t),!0);}},{key:"getItem",value:function getItem(e){return null!=this.storage?this.storage.getItem(e):null;}},{key:"deleteItem",value:function deleteItem(e){return!!this.storage&&(this.storage.setItem(e,value),!0);}},{key:"clear",value:function clear(){this.storage&&this.storage.clear();}}]);}())(),f=l,d=new(/*#__PURE__*/function(){function _class6(){_classCallCheck2(this,_class6);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;}return _createClass2(_class6,[{key:"getDB",value:function(){var _getDB3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee49(){var _this0=this;return _regenerator2().w(function(_context49){while(1)switch(_context49.n){case 0:return _context49.a(2,new Promise(function(e,t){var r=_this0.IDB;if(r){var _n2=r.open("indigitall.indexedDB",1);_n2.onupgradeneeded=function(){_n2.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key");},_n2.onsuccess=function(){var t=_n2.result,r=t.transaction("indigitallStore","readwrite"),i=r.objectStore("indigitallStore"),o=i.index("storeIndex");e({db:t,tx:r,store:i,index:o});},_n2.onerror=function(e){t(e);};}else t(!1);}));}},_callee49);}));function getDB(){return _getDB3.apply(this,arguments);}return getDB;}()},{key:"get",value:function(){var _get4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee50(e,t){var _this1=this;return _regenerator2().w(function(_context50){while(1)switch(_context50.n){case 0:return _context50.a(2,new Promise(function(r,n){e||n(!1),e.index.get(t).onsuccess=function(t){t.target.result&&(_this1.close(e),r(t.target.result.store.value)),n(!1);};}));}},_callee50);}));function get(_x51,_x52){return _get4.apply(this,arguments);}return get;}()},{key:"put",value:function(){var _put4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee51(e,t,r){var _this10=this;return _regenerator2().w(function(_context51){while(1)switch(_context51.n){case 0:return _context51.a(2,new Promise(function(n,i){e||i(!1),e.store.put({store:{key:t,value:r}},t).onsuccess=function(t){_this10.close(e),n(r);};}));}},_callee51);}));function put(_x53,_x54,_x55){return _put4.apply(this,arguments);}return put;}()},{key:"close",value:function close(e){if(e.tx)try{e.tx.oncomplete=function(){e.db.close();};}catch(e){console.log(this.TAG,e);}}},{key:"setItem",value:function(){var _setItem3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee52(e,t){var _r2,_t37;return _regenerator2().w(function(_context52){while(1)switch(_context52.p=_context52.n){case 0:_context52.p=0;_context52.n=1;return this.getDB();case 1:_r2=_context52.v;return _context52.a(2,this.put(_r2,e,t));case 2:_context52.p=2;_t37=_context52.v;return _context52.a(2,_t37);}},_callee52,this,[[0,2]]);}));function setItem(_x56,_x57){return _setItem3.apply(this,arguments);}return setItem;}()},{key:"getItem",value:function(){var _getItem3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee53(e){var _t38,_t39;return _regenerator2().w(function(_context53){while(1)switch(_context53.p=_context53.n){case 0:_context53.p=0;_context53.n=1;return this.getDB();case 1:_t38=_context53.v;return _context53.a(2,this.get(_t38,e));case 2:_context53.p=2;_t39=_context53.v;return _context53.a(2,_t39);}},_callee53,this,[[0,2]]);}));function getItem(_x58){return _getItem3.apply(this,arguments);}return getItem;}()}]);}())(),h=new(/*#__PURE__*/function(){function _class7(){_classCallCheck2(this,_class7);this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null;}return _createClass2(_class7,[{key:"isSessionStorageAvailable",value:function isSessionStorageAvailable(){try{var _e0=window.sessionStorage,_t40="__storage_test__";if(_e0)return _e0.setItem(_t40,_t40),_e0.removeItem(_t40),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==h.length;}return!1;}},{key:"getItem",value:function getItem(e){return null!=this.session?this.session.getItem(e):null;}},{key:"setItem",value:function setItem(e,t){return null!=this.session&&(this.session.setItem(e,t),!0);}},{key:"clearMessages",value:function clearMessages(){this.session&&this.session.removeItem("messages");}}]);}())(),E=h,y=Object.freeze({RAW:"raw",HASH:"hash"}),p=/*#__PURE__*/function(){function p(){_classCallCheck2(this,p);this.storage=f,this.db=d,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.TIMEOUT_REQUESTS=this.REPOSITORY+".TIMEOUT_REQUESTS",this.ENCRYPTION_TYPE=this.REPOSITORY+".ENCRYPTION_TYPE",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";}return _createClass2(p,[{key:"setItemSessionStorage",value:function setItemSessionStorage(e,t){E.setItem(e,t);}},{key:"getItemSessionStorage",value:function getItemSessionStorage(e){return E.getItem(e);}},{key:"clearSessionStorage",value:function clearSessionStorage(){E.clearMessages();}},{key:"setStorage",value:function setStorage(e,t){f.setItem(e,t);}},{key:"getStorage",value:function getStorage(e){return f.getItem(e);}},{key:"clearStorage",value:function clearStorage(){f.clear();}},{key:"setBrowserPublicKey",value:function setBrowserPublicKey(e){f.setItem(this.BROWSER_PUBLIC_KEY,e);}},{key:"getBrowserPublicKey",value:function getBrowserPublicKey(){return f.getItem(this.BROWSER_PUBLIC_KEY);}},{key:"setBrowserPrivateKey",value:function setBrowserPrivateKey(e){f.setItem(this.BROWSER_PRIVATE_KEY,e);}},{key:"getBrowserPrivateKey",value:function getBrowserPrivateKey(){return f.getItem(this.BROWSER_PRIVATE_KEY);}},{key:"setAppKey",value:function(){var _setAppKey3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee54(e){var _t41;return _regenerator2().w(function(_context54){while(1)switch(_context54.n){case 0:f.setItem(this.APP_KEY,e);_t41=d&&d.IDB;if(!_t41){_context54.n=1;break;}_context54.n=1;return d.setItem(this.APP_KEY,e);case 1:return _context54.a(2);}},_callee54,this);}));function setAppKey(_x59){return _setAppKey3.apply(this,arguments);}return setAppKey;}()},{key:"getAppKey",value:function getAppKey(){return f.getItem(this.APP_KEY);}},{key:"setDeviceId",value:function(){var _setDeviceId3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee55(e){var _t42;return _regenerator2().w(function(_context55){while(1)switch(_context55.n){case 0:this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,e);_t42=this.db&&this.db.IDB;if(!_t42){_context55.n=1;break;}_context55.n=1;return this.db.setItem(this.DEVICE_ID,e);case 1:return _context55.a(2);}},_callee55,this);}));function setDeviceId(_x60){return _setDeviceId3.apply(this,arguments);}return setDeviceId;}()},{key:"getDeviceId",value:function getDeviceId(){return this.getStorage(this.DEVICE_ID);}},{key:"getAppKeySync",value:function(){var _getAppKeySync3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee56(){return _regenerator2().w(function(_context56){while(1)switch(_context56.n){case 0:if(!(d&&d.IDB)){_context56.n=2;break;}_context56.n=1;return d.getItem(this.APP_KEY);case 1:return _context56.a(2,_context56.v);case 2:return _context56.a(2);}},_callee56,this);}));function getAppKeySync(){return _getAppKeySync3.apply(this,arguments);}return getAppKeySync;}()},{key:"setVAPID",value:function setVAPID(e){f.setItem(this.VAPID_PUBLIC,e);}},{key:"getVAPID",value:function getVAPID(){return f.getItem(this.VAPID_PUBLIC);}},{key:"setEnabled",value:function setEnabled(e){f.setItem(this.ENABLED,e);}},{key:"getEnabled",value:function getEnabled(){return f.getItem(this.ENABLED);}},{key:"setServiceSyncTime",value:function setServiceSyncTime(e){f.setItem(this.SERVICE_SYNC_TIME,e*this.BASE_TIME);}},{key:"getServiceSyncTime",value:function getServiceSyncTime(){return f.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME;}},{key:"setLocationEnabled",value:function setLocationEnabled(e){f.setItem(this.LOCATION_ENABLED,e);}},{key:"getLocationEnabled",value:function getLocationEnabled(){return f.getItem(this.LOCATION_ENABLED);}},{key:"setLocationUpdateMinutes",value:function setLocationUpdateMinutes(e){f.setItem(this.LOCATION_UPDATE_MINUTES,e);}},{key:"getLocationUpdateMinutes",value:function getLocationUpdateMinutes(){return f.getItem(this.LOCATION_UPDATE_MINUTES)||30;}},{key:"setRequestLocation",value:function(){var _setRequestLocation3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee57(e){return _regenerator2().w(function(_context57){while(1)switch(_context57.n){case 0:f.setItem(this.REQUEST_LOCATION,e);case 1:return _context57.a(2);}},_callee57,this);}));function setRequestLocation(_x61){return _setRequestLocation3.apply(this,arguments);}return setRequestLocation;}()},{key:"getRequestLocation",value:function getRequestLocation(){return!!f&&f.getItem(this.REQUEST_LOCATION);}},{key:"setPlatform",value:function(){var _setPlatform3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee58(e){return _regenerator2().w(function(_context58){while(1)switch(_context58.n){case 0:f.setItem(this.PLATFORM,e);case 1:return _context58.a(2);}},_callee58,this);}));function setPlatform(_x62){return _setPlatform3.apply(this,arguments);}return setPlatform;}()},{key:"getPlatform",value:function getPlatform(){return f&&f.getItem(this.PLATFORM)||c.platform;}},{key:"getVersion",value:function getVersion(){return c.version;}},{key:"setBrowserName",value:function(){var _setBrowserName3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee59(e){return _regenerator2().w(function(_context59){while(1)switch(_context59.n){case 0:f.setItem(this.BROWSER_NAME,e);case 1:return _context59.a(2);}},_callee59,this);}));function setBrowserName(_x63){return _setBrowserName3.apply(this,arguments);}return setBrowserName;}()},{key:"getBrowserName",value:function getBrowserName(){return f.getItem(this.BROWSER_NAME);}},{key:"setBrowserVersion",value:function setBrowserVersion(e){f.setItem(this.BROWSER_VERSION,e);}},{key:"getBrowserVersion",value:function getBrowserVersion(){return f.getItem(this.BROWSER_VERSION);}},{key:"setOsName",value:function(){var _setOsName3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee60(e){return _regenerator2().w(function(_context60){while(1)switch(_context60.n){case 0:f.setItem(this.OS_NAME,e);case 1:return _context60.a(2);}},_callee60,this);}));function setOsName(_x64){return _setOsName3.apply(this,arguments);}return setOsName;}()},{key:"getOsName",value:function getOsName(){return f.getItem(this.OS_NAME);}},{key:"setOsVersion",value:function setOsVersion(e){f.setItem(this.OS_VERSION,e);}},{key:"getOsVersion",value:function getOsVersion(){return f.getItem(this.OS_VERSION);}},{key:"setDeviceType",value:function setDeviceType(e){f.setItem(this.DEVICE_TYPE,e);}},{key:"getDeviceType",value:function getDeviceType(){return f.getItem(this.DEVICE_TYPE);}},{key:"setSupported",value:function setSupported(e){f.setItem(this.SUPPORTED,e);}},{key:"getSupported",value:function getSupported(){return f.getItem(this.SUPPORTED);}},{key:"setServiceTimestamp",value:function setServiceTimestamp(e){f.setItem(this.SERVICE_TIMESTAMP,e);}},{key:"getServiceTimestamp",value:function getServiceTimestamp(){return f.getItem(this.SERVICE_TIMESTAMP);}},{key:"setLocationTimestamp",value:function setLocationTimestamp(e){f.setItem(this.LOCATION_TIMESTAMP,e);}},{key:"getLocationTimestamp",value:function getLocationTimestamp(){return f.getItem(this.LOCATION_TIMESTAMP);}},{key:"setPermissionLocation",value:function setPermissionLocation(e){f.setItem(this.PERMISSION_LOCATION,e);}},{key:"getPermissionLocation",value:function getPermissionLocation(){return f.getItem(this.PERMISSION_LOCATION);}},{key:"setDebugLog",value:function setDebugLog(e){f.setItem(this.SET_LOG_DEBUG,e);}},{key:"getDebugLog",value:function getDebugLog(){return"false"!==f.getItem(this.SET_LOG_DEBUG);}},{key:"setLogLevel",value:function setLogLevel(e){f.setItem(this.LOG_LEVEL,e);}},{key:"getLogLevel",value:function getLogLevel(){return f.getItem(this.LOG_LEVEL);}},{key:"setNewUserTimestamp",value:function setNewUserTimestamp(e){f.setItem(this.NEW_USER_TIMESTAMP,e);}},{key:"getNewUserTimestamp",value:function getNewUserTimestamp(){return f.getItem(this.NEW_USER_TIMESTAMP);}},{key:"setExternalIdRequest",value:function(){var _setExternalIdRequest3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee61(e){var _t43;return _regenerator2().w(function(_context61){while(1)switch(_context61.n){case 0:f&&f.isLocalStorageAvailable()&&f.setItem(this.EXTERNAL_ID,e);_t43=d&&d.IDB;if(!_t43){_context61.n=1;break;}_context61.n=1;return d.setItem(this.EXTERNAL_ID,e);case 1:return _context61.a(2);}},_callee61,this);}));function setExternalIdRequest(_x65){return _setExternalIdRequest3.apply(this,arguments);}return setExternalIdRequest;}()},{key:"getExternalIdRequest",value:function(){var _getExternalIdRequest3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee62(){var e,_t44,_t45;return _regenerator2().w(function(_context62){while(1)switch(_context62.p=_context62.n){case 0:_context62.p=0;if(!(f&&f.isLocalStorageAvailable())){_context62.n=1;break;}e=f.getItem(this.EXTERNAL_ID);_context62.n=3;break;case 1:_t44=d&&d.IDB;if(!_t44){_context62.n=3;break;}_context62.n=2;return d.getItem(this.EXTERNAL_ID);case 2:e=_context62.v;case 3:_context62.n=5;break;case 4:_context62.p=4;_t45=_context62.v;case 5:return _context62.a(2,e);}},_callee62,this,[[0,4]]);}));function getExternalIdRequest(){return _getExternalIdRequest3.apply(this,arguments);}return getExternalIdRequest;}()},{key:"setExternalId",value:function setExternalId(e){f.setItem(this.EXTERNAL_ID,e);}},{key:"getExternalId",value:function getExternalId(){return f.getItem(this.EXTERNAL_ID);}},{key:"getRegisteredByCookie",value:function(){var _getRegisteredByCookie3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee63(){return _regenerator2().w(function(_context63){while(1)switch(_context63.n){case 0:return _context63.a(2,f.getItem(this.REGISTERED_BY_COOKIE));}},_callee63,this);}));function getRegisteredByCookie(){return _getRegisteredByCookie3.apply(this,arguments);}return getRegisteredByCookie;}()},{key:"setRegisteredByCookie",value:function(){var _setRegisteredByCookie3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee64(e){return _regenerator2().w(function(_context64){while(1)switch(_context64.n){case 0:f.setItem(this.REGISTERED_BY_COOKIE,e);case 1:return _context64.a(2);}},_callee64,this);}));function setRegisteredByCookie(_x66){return _setRegisteredByCookie3.apply(this,arguments);}return setRegisteredByCookie;}()},{key:"setLatitude",value:function setLatitude(e){f.setItem(this.LATITUDE,e);}},{key:"getLatitude",value:function getLatitude(){return f.getItem(this.LATITUDE);}},{key:"setLongitude",value:function setLongitude(e){f.setItem(this.LONGITUDE,e);}},{key:"getLongitude",value:function getLongitude(){return f.getItem(this.LONGITUDE);}},{key:"setInAppTopicList",value:function(){var _setInAppTopicList3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee65(e){var _t46;return _regenerator2().w(function(_context65){while(1)switch(_context65.n){case 0:_t46=this.db&&this.db.IDB;if(!_t46){_context65.n=1;break;}_context65.n=1;return this.db.setItem(this.INAPP_TOPICS,e);case 1:return _context65.a(2);}},_callee65,this);}));function setInAppTopicList(_x67){return _setInAppTopicList3.apply(this,arguments);}return setInAppTopicList;}()},{key:"getInAppTopicList",value:function(){var _getInAppTopicList3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee66(){var e,_t47,_t48;return _regenerator2().w(function(_context66){while(1)switch(_context66.p=_context66.n){case 0:_context66.p=0;_t47=this.db&&this.db.IDB;if(!_t47){_context66.n=2;break;}_context66.n=1;return this.db.getItem(this.INAPP_TOPICS);case 1:e=_context66.v;case 2:_context66.n=4;break;case 3:_context66.p=3;_t48=_context66.v;case 4:return _context66.a(2,e);}},_callee66,this,[[0,3]]);}));function getInAppTopicList(){return _getInAppTopicList3.apply(this,arguments);}return getInAppTopicList;}()},{key:"setTopicList",value:function(){var _setTopicList3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee67(e){var _t49;return _regenerator2().w(function(_context67){while(1)switch(_context67.n){case 0:_t49=this.db&&this.db.IDB;if(!_t49){_context67.n=1;break;}_context67.n=1;return this.db.setItem(this.TOPIC_LIST,e);case 1:return _context67.a(2);}},_callee67,this);}));function setTopicList(_x68){return _setTopicList3.apply(this,arguments);}return setTopicList;}()},{key:"getTopicList",value:function(){var _getTopicList3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee68(){var e,_t50,_t51;return _regenerator2().w(function(_context68){while(1)switch(_context68.p=_context68.n){case 0:_context68.p=0;_t50=this.db&&this.db.IDB;if(!_t50){_context68.n=2;break;}_context68.n=1;return this.db.getItem(this.TOPIC_LIST);case 1:e=_context68.v;case 2:_context68.n=4;break;case 3:_context68.p=3;_t51=_context68.v;case 4:return _context68.a(2,e);}},_callee68,this,[[0,3]]);}));function getTopicList(){return _getTopicList3.apply(this,arguments);}return getTopicList;}()},{key:"getUrlInappApi",value:function getUrlInappApi(){return this.getStorage(this.URL_INAPP_API);}},{key:"setUrlInappApi",value:function setUrlInappApi(e){this.setStorage(this.URL_INAPP_API,e);}},{key:"setInAppEnabled",value:function setInAppEnabled(e){this.setStorage(this.INAPP_ENABLED,e);}},{key:"isInAppEnabled",value:function isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED);}},{key:"setAvoidCypher",value:function setAvoidCypher(e){this.setStorage(this.AVOID_CYPHER,!0===e);}},{key:"isAvoidCypher",value:function isAvoidCypher(){return"true"===this.getStorage(this.AVOID_CYPHER);}},{key:"getUrlDeviceApi",value:function(){var _getUrlDeviceApi3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee69(){var e,_t52,_t53;return _regenerator2().w(function(_context69){while(1)switch(_context69.p=_context69.n){case 0:_context69.p=0;if(!(this.storage&&this.storage.isLocalStorageAvailable())){_context69.n=1;break;}e=this.getStorage(this.URL_DEVICE_API);_context69.n=3;break;case 1:_t52=this.db&&this.db.IDB;if(!_t52){_context69.n=3;break;}_context69.n=2;return this.db.getItem(this.URL_DEVICE_API);case 2:e=_context69.v;case 3:_context69.n=5;break;case 4:_context69.p=4;_t53=_context69.v;case 5:return _context69.a(2,e);}},_callee69,this,[[0,4]]);}));function getUrlDeviceApi(){return _getUrlDeviceApi3.apply(this,arguments);}return getUrlDeviceApi;}()},{key:"setUrlDeviceApi",value:function(){var _setUrlDeviceApi3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee70(e){var _t54;return _regenerator2().w(function(_context70){while(1)switch(_context70.n){case 0:this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,e);_t54=this.db&&this.db.IDB;if(!_t54){_context70.n=1;break;}_context70.n=1;return this.db.setItem(this.URL_DEVICE_API,e);case 1:return _context70.a(2);}},_callee70,this);}));function setUrlDeviceApi(_x69){return _setUrlDeviceApi3.apply(this,arguments);}return setUrlDeviceApi;}()},{key:"setPushDisabled",value:function setPushDisabled(e){this.setStorage(this.PUSH_DISABLED,e);}},{key:"isPushDisabled",value:function isPushDisabled(){return this.getStorage(this.PUSH_DISABLED);}},{key:"getConfigV2ServiceSyncTime",value:function getConfigV2ServiceSyncTime(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME);}},{key:"setConfigV2ServiceSyncTime",value:function setConfigV2ServiceSyncTime(e){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,e);}},{key:"getConfigV2",value:function getConfigV2(){return this.getStorage(this.CONFIG_V2);}},{key:"setConfigV2",value:function setConfigV2(e){this.setStorage(this.CONFIG_V2,e);}},{key:"getMaintenanceEnd",value:function getMaintenanceEnd(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY);}},{key:"setMaintenanceEnd",value:function setMaintenanceEnd(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,e);}},{key:"getMaintenanceStart",value:function getMaintenanceStart(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY);}},{key:"setMaintenanceStart",value:function setMaintenanceStart(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,e);}},{key:"getTimeoutRequestsInMilliseconds",value:function getTimeoutRequestsInMilliseconds(){return this.getStorage(this.TIMEOUT_REQUESTS);}},{key:"setTimeoutRequestsInMilliseconds",value:function setTimeoutRequestsInMilliseconds(e){this.setStorage(this.TIMEOUT_REQUESTS,e);}},{key:"getEncryptionType",value:function getEncryptionType(){var e=this.getStorage(this.ENCRYPTION_TYPE);return null===e?y.HASH:e;}},{key:"setEncryptionType",value:function setEncryptionType(e){this.setStorage(this.ENCRYPTION_TYPE,e);}}]);}(),m=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),I=m;var v=/*#__PURE__*/function(){function v(e){_classCallCheck2(this,v);this.tag="[IND]",e&&(this.tag=e),this.level=I.INFO,this.setLogLevel(new p().getLogLevel()),this.log=[];}return _createClass2(v,[{key:"setLogLevel",value:function setLogLevel(e){e&&e>=I.DEBUG&&e<=I.ERROR&&(this.level=e);}},{key:"d",value:function d(){if(this.level<=I.DEBUG)for(var _e1=0;_e1<arguments.length;_e1++)this.log+=v.addedAsString(arguments[_e1]);return this;}},{key:"i",value:function i(){if(this.level<=I.INFO)for(var _e10=0;_e10<arguments.length;_e10++)this.log+=v.addedAsString(arguments[_e10]);return this;}},{key:"w",value:function w(){if(this.level<=I.WARNING)for(var _e11=0;_e11<arguments.length;_e11++)this.log+=v.addedAsString(arguments[_e11]);return this;}},{key:"e",value:function e(){if(this.level<=I.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var _e12=0;_e12<arguments.length;_e12++)this.log+=v.addedAsString(arguments[_e12]);return this;}},{key:"writeLog",value:function writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[];}}],[{key:"addedAsString",value:function addedAsString(e){return"string"==typeof e?e:JSON.stringify(e,null,2);}}]);}();var _=v,g=/*#__PURE__*/_createClass2(function g(e,t,r){_classCallCheck2(this,g);this.errorCode=e,this.errorMessage=t,null!=r&&(this.exceptionMessage=r);}),b={ErrorCode:{GENERAL_ERROR:600,TIMEOUT_REQUEST:605,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",TIMEOUT_REQUEST:"connection timeout",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"}},S=new(/*#__PURE__*/function(){function _class8(){_classCallCheck2(this,_class8);}return _createClass2(_class8,[{key:"showError",value:function showError(e,t,r){if(null!=e){var _n3=Object.values(e.ErrorCode).indexOf(t);if(_n3>=0){var _t55=Object.keys(e.ErrorCode)[_n3],_i1=Object.values(e.ErrorCode)[_n3];return new g({code:_t55,errorId:_i1},Object.values(e.ErrorMessage)[_n3],r);}return new g(b.ErrorCode.GENERAL_ERROR,"general error",r);}}}]);}())(),O=/*#__PURE__*/function(){function O(){_classCallCheck2(this,O);this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE";}return _createClass2(O,[{key:"getURL",value:function(){var _getURL3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee71(){return _regenerator2().w(function(_context71){while(1)switch(_context71.n){case 0:return _context71.a(2,this.URL_BASE);}},_callee71,this);}));function getURL(){return _getURL3.apply(this,arguments);}return getURL;}()},{key:"call",value:function(){var _call3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee72(e,t,r,n){var i,o,s,_t56,_n4,_a2,_t57,_t58,_t59,_t60,_t61,_t62;return _regenerator2().w(function(_context72){while(1)switch(_context72.p=_context72.n){case 0:i=new _("[IND]BaseClient: ");r.isServiceWorkerRequest()&&i.setLogLevel(I.DEBUG);_context72.n=1;return this.getURL();case 1:_t58=_context72.v;_t59=r.getPath(t);_t60=_t58+_t59;_t61=r.getParams();o=_t60+_t61;r.isJourneyRequest()&&(o=o.replace("v1","v2"));s={method:e,headers:r.addHeaders()};e!==this.GET&&(s.body=JSON.stringify(r.getBody())),n&&(s.credentials=n);_context72.p=2;_t56=new AbortController();new p().getTimeoutRequestsInMilliseconds()&&0!=new p().getTimeoutRequestsInMilliseconds()&&(_n4=setTimeout(function(){return _t56.abort();},new p().getTimeoutRequestsInMilliseconds()),s.signal=_t56.signal);_context72.n=3;return fetch(o,s);case 3:_a2=_context72.v;if(!(_n4&&clearTimeout(_n4),304!=_a2.status)){_context72.n=5;break;}_context72.n=4;return _a2.json();case 4:_t57=_context72.v;return _context72.a(2,_a2.ok?(i.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+_t57.statusCode+"\nResponse Message: "+_t57.message+"\nResponse Body:",JSON.stringify(_t57.data,null,"\t")).writeLog(),_t57):(i.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+_t57.statusCode+"\nResponse Message: "+_t57.message+"\n").writeLog(),new g(_t57.statusCode,_t57.message)));case 5:return _context72.a(2,(i.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Response Code: "+_a2.status+"\n").writeLog(),_a2));case 6:_context72.p=6;_t62=_context72.v;return _context72.a(2,"AbortError"===_t62.name?(i.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+_t62).writeLog(),S.showError(b,b.ErrorCode.TIMEOUT_REQUEST,_t62)):(i.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(r.getBody(),null,"\t")+"\n":"")+"Error: "+_t62).writeLog(),S.showError(b,b.ErrorCode.GENERAL_ERROR,_t62)));}},_callee72,this,[[2,6]]);}));function call(_x70,_x71,_x72,_x73){return _call3.apply(this,arguments);}return call;}()},{key:"get",value:function(){var _get5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee73(e,t){return _regenerator2().w(function(_context73){while(1)switch(_context73.n){case 0:_context73.n=1;return this.call(this.GET,e,t);case 1:return _context73.a(2,_context73.v);}},_callee73,this);}));function get(_x74,_x75){return _get5.apply(this,arguments);}return get;}()},{key:"post",value:function(){var _post3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee74(e,t,r){return _regenerator2().w(function(_context74){while(1)switch(_context74.n){case 0:_context74.n=1;return this.call(this.POST,e,t,r);case 1:return _context74.a(2,_context74.v);}},_callee74,this);}));function post(_x76,_x77,_x78){return _post3.apply(this,arguments);}return post;}()},{key:"put",value:function(){var _put5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee75(e,t,r){return _regenerator2().w(function(_context75){while(1)switch(_context75.n){case 0:_context75.n=1;return this.call(this.PUT,e,t,r);case 1:return _context75.a(2,_context75.v);}},_callee75,this);}));function put(_x79,_x80,_x81){return _put5.apply(this,arguments);}return put;}()},{key:"delete",value:function(){var _delete4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee76(e,t){return _regenerator2().w(function(_context76){while(1)switch(_context76.n){case 0:_context76.n=1;return this.call(this.DELETE,e,t);case 1:return _context76.a(2,_context76.v);}},_callee76,this);}));function _delete(_x82,_x83){return _delete4.apply(this,arguments);}return _delete;}()}]);}(),R=/*#__PURE__*/function(){function R(){_classCallCheck2(this,R);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_EVENT_ID="eventId",this.PARAM_EVENT_AT="eventAt",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 p().getAppKey(),this.params=null,this.pathParams={},this.headers={};}return _createClass2(R,[{key:"getParams",value:function getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"");}},{key:"getBody",value:function getBody(){return this.body?this.body:"";}},{key:"getPath",value:function getPath(e){var _this11=this;var t=e;return Object.keys(this.pathParams).forEach(function(e){t=t.replace(e,_this11.pathParams[e]);}),t;}},{key:"addHeaders",value:function addHeaders(){var _this12=this;var e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach(function(t){e.append(t,_this12.headers[t]);}),e;}},{key:"isServiceWorkerRequest",value:function isServiceWorkerRequest(){return this.serviceWorkerRequest;}},{key:"setServiceWorkerRequest",value:function setServiceWorkerRequest(e){this.serviceWorkerRequest=e;}},{key:"isJourneyRequest",value:function isJourneyRequest(){return this.journeyRequest;}},{key:"setJourneyRequest",value:function setJourneyRequest(e){this.journeyRequest=e;}}]);}(),T=/*#__PURE__*/function(_R){function T(){var _this13;var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;_classCallCheck2(this,T);_this13=_callSuper2(this,T),_this13.PARAM_APPLICATION_CHANNEL="channel",_this13.channels=e;return _this13;}_inherits2(T,_R);return _createClass2(T,[{key:"getApplicationRequest",value:function getApplicationRequest(){return this.params=this.createQueryString(),this;}},{key:"createQueryString",value:function createQueryString(){var e="";if(this.channels&&this.channels.length>0)for(var _t63=0;_t63<this.channels.length;_t63++)e+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[_t63].toLowerCase(),"&");return e+="".concat(this.PARAM_PLATFORM,"=webpush"),e;}}]);}(R),P=/*#__PURE__*/function(){function P(){_classCallCheck2(this,P);}return _createClass2(P,null,[{key:"isServiceTimestampExceed",value:function isServiceTimestampExceed(){return!new p().getServiceTimestamp()||new p().getServiceSyncTime()<=(Date.now()-new p().getServiceTimestamp())/6e4;}},{key:"isFunction",value:function isFunction(e){return!(!e||"function"!=typeof e);}},{key:"generateUUID",value:function generateUUID(){var e=new _("[IND]CommonUtils: ");return"undefined"!=typeof crypto&&crypto.randomUUID?(e.d("Using crypto.randomUUID to generate UUID").writeLog(),crypto.randomUUID()):"undefined"!=typeof crypto&&crypto.getRandomValues?(e.d("Using crypto.getRandomValues to generate UUID").writeLog(),([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16);})):null;}}]);}(),A=(_Class2=/*#__PURE__*/function(){function A(){_classCallCheck2(this,A);}return _createClass2(A,null,[{key:"normalizeDateString",value:function normalizeDateString(e){if("number"==typeof e||e instanceof Date){var _t64=new Date(e);return isNaN(_t64.getTime())?null:this.formatCanonicalUTC(_t64);}if(!e||"string"!=typeof e)return null;var t=e.trim();if(this.isCanonicalFormat(t))return t;var r=this.tryToParseLeniently(t);return r?this.formatCanonicalUTC(r):null;}},{key:"isCanonicalFormat",value:function isCanonicalFormat(e){return /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(e);}},{key:"tryToParseLeniently",value:function tryToParseLeniently(e){var _iterator3=_createForOfIteratorHelper2(this.LENIENT_DATE_FORMATS),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var _t65=_step3.value;var _r3=this.parseByFormat(e,_t65);if(_r3&&!isNaN(_r3.getTime()))return _r3;}}catch(err){_iterator3.e(err);}finally{_iterator3.f();}return null;}},{key:"parseByFormat",value:function parseByFormat(e,t){switch(t){case"yyyy-MM-dd'T'HH:mm:ss.SSSZ":return new Date(e);case"yyyy-MM-dd'T'HH:mm:ssZ":return e.endsWith("Z")?new Date(e):new Date(e.replaceAll(/([+-]\d{2})(\d{2})$/g,"$1:$2"));case"yyyy-MM-dd'T'HH:mm:ss":return new Date(e+"Z");case"yyyy-MM-dd HH:mm:ss":return new Date(e.replaceAll(" ","T")+"Z");case"yyyy-MM-dd":return new Date(e+"T00:00:00Z");default:return null;}}},{key:"formatCanonicalUTC",value:function formatCanonicalUTC(e){return e.toISOString();}}]);}(),_defineProperty2(_Class2,"DATE_FORMAT_PATTERN","yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"),_defineProperty2(_Class2,"LENIENT_DATE_FORMATS",["yyyy-MM-dd'T'HH:mm:ss.SSSZ","yyyy-MM-dd'T'HH:mm:ssZ","yyyy-MM-dd'T'HH:mm:ss","yyyy-MM-dd HH:mm:ss","yyyy-MM-dd"]),_Class2),w=/*#__PURE__*/function(_R2){function w(){_classCallCheck2(this,w);return _callSuper2(this,w);}_inherits2(w,_R2);return _createClass2(w,[{key:"setEventId",value:function setEventId(e){this.eventId=e,null==e&&(this.eventId=P.generateUUID());}},{key:"setEventAt",value:function setEventAt(e){this.eventAt=e,null==e&&(this.eventAt=A.normalizeDateString(Date.now()));}}]);}(R),N=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"}),C=/*#__PURE__*/function(){function C(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var t=arguments.length>1?arguments[1]:undefined;_classCallCheck2(this,C);null==e?(this.browserPublicKey=new p().getBrowserPublicKey(),this.browserPrivateKey=new p().getBrowserPrivateKey(),this.platform=new p().getPlatform(),this.version=new p().getVersion(),this.browserName=new p().getBrowserName(),this.browserVersion=new p().getBrowserVersion(),this.osName=new p().getOsName(),this.osVersion=new p().getOsVersion(),this.deviceId=new p().getDeviceId(),this.deviceType=new p().getDeviceType(),new p().getEnabled()&&(this.enabled="true"===new p().getEnabled()),new p().getExternalId()&&(this.externalCode=new p().getExternalId())):t?(e.enabled&&(this.enabled=e.enabled,new p().setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,new p().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();}return _createClass2(C,[{key:"getDeviceId",value:function getDeviceId(){return this.deviceId;}},{key:"setDeviceId",value:function setDeviceId(e){this.deviceId=e;}},{key:"setExternalCode",value:function setExternalCode(e){this.externalCode=e;}},{key:"toJSON",value:function toJSON(){var e={};return this.platform&&(e.platform=this.platform),this.version&&(e.version=this.version),this.productName&&(e.productName=this.productName),this.productVersion&&(e.productVersion=this.productVersion),this.browserName&&(e.browserName=this.browserName),this.browserVersion&&(e.browserVersion=this.browserVersion),this.osName&&(e.osName=this.osName),this.osVersion&&(e.osVersion=this.osVersion),this.deviceType&&(e.deviceType=this.deviceType),this.locale&&(e.locale=this.locale),this.timeZone&&(e.timeZome=this.timeZone),this.timeOffset&&(e.timeOffset=this.timeOffset),this.deviceId&&(e.deviceId=this.deviceId),this.enabled&&(e.enabled=this.enabled),this.browserPublicKey&&(e.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(e.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(e.externalCode=this.externalCode),e;}}]);}(),D=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),M=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"}),L=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),U=/*#__PURE__*/_createClass2(function U(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;_classCallCheck2(this,U);var r=new p();if(null!=e){r.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,r.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,r.setMaintenanceEnd(this.maintenanceWindow.end))),e.networkEventsEnabled&&(this.networkEventsEnabled=e.networkEventsEnabled),e.networkUpdateMinutes&&(this.networkUpdateMinutes=e.networkUpdateMinutes);var _n5=Date.now();if(e.serviceSyncTime?(this.serviceSyncTime=e.serviceSyncTime,_n5=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):_n5=new Date(Date.now()+36e5),!t){var _e13=_n5.toString();new _("[IND]CoreApplication").d("ServiceSyncTime defined on: "+_e13).writeLog(),r.setConfigV2ServiceSyncTime(_e13);}this.encryptionType=y.HASH,e.encryptionType&&(this.encryptionType=e.encryptionType),r.setEncryptionType(this.encryptionType);}}),B=/*#__PURE__*/function(){function B(){_classCallCheck2(this,B);}return _createClass2(B,null,[{key:"getLocationPermission",value:function(){var _getLocationPermission3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee77(){var e,t;return _regenerator2().w(function(_context77){while(1)switch(_context77.n){case 0:_context77.n=1;return this.getPermission("geolocation");case 1:e=_context77.v;t={};return _context77.a(2,(e&&(t.location=e.state),t));}},_callee77,this);}));function getLocationPermission(){return _getLocationPermission3.apply(this,arguments);}return getLocationPermission;}()},{key:"getPermission",value:function(){var _getPermission3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee78(e){var _t66;return _regenerator2().w(function(_context78){while(1)switch(_context78.p=_context78.n){case 0:_context78.p=0;if(!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){_context78.n=2;break;}_context78.n=1;return navigator.permissions.query({name:e,userVisibleOnly:!0});case 1:return _context78.a(2,_context78.v);case 2:_context78.n=4;break;case 3:_context78.p=3;_t66=_context78.v;return _context78.a(2,null);case 4:return _context78.a(2,null);}},_callee78,null,[[0,3]]);}));function getPermission(_x84){return _getPermission3.apply(this,arguments);}return getPermission;}()},{key:"setPermissionsCallback",value:function(){var _setPermissionsCallback3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee79(){return _regenerator2().w(function(_context79){while(1)switch(_context79.n){case 0:_context79.n=1;return this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 1:return _context79.a(2);}},_callee79,this);}));function setPermissionsCallback(){return _setPermissionsCallback3.apply(this,arguments);}return setPermissionsCallback;}()},{key:"setCallback",value:function(){var _setCallback3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee80(e,t){var r,_n6;return _regenerator2().w(function(_context80){while(1)switch(_context80.n){case 0:_context80.n=1;return this.getPermission(e);case 1:r=_context80.v;if(r){_n6=r.state;"onchange"in r&&(r.onchange=function(){new _("[IND]CorePermissions: ").d(e+" permission state has changed from "+_n6+" to "+r.state).writeLog(),_n6=r.state,t&&t({name:e,state:r.state});});}case 2:return _context80.a(2);}},_callee80,this);}));function setCallback(_x85,_x86){return _setCallback3.apply(this,arguments);}return setCallback;}()}]);}(),k=new _("[IND]Crypto"),V=new TextEncoder("utf-8"),j="HMAC",Y=/*#__PURE__*/function(){function Y(){_classCallCheck2(this,Y);}return _createClass2(Y,null,[{key:"createHmac",value:function(){var _createHmac3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee81(e,t){var _r4,_window3,_n7,i,o,s,_t67;return _regenerator2().w(function(_context81){while(1)switch(_context81.p=_context81.n){case 0:_context81.p=0;_r4=t;if(!(!0===new p().isAvoidCypher()||new p().getEncryptionType()===y.RAW)){_context81.n=1;break;}return _context81.a(2,t);case 1:if(!(new p().getEncryptionType()===y.HASH)){_context81.n=5;break;}_n7=(_window3=window)===null||_window3===void 0||(_window3=_window3.crypto)===null||_window3===void 0?void 0:_window3.subtle;if(_n7){_context81.n=2;break;}return _context81.a(2);case 2:_context81.n=3;return _n7.importKey("raw",V.encode(e),{name:j,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 3:i=_context81.v;_context81.n=4;return _n7.sign(j,i,V.encode(t));case 4:o=_context81.v;s=new Uint8Array(o);_r4=Array.prototype.map.call(s,function(e){return("00"+e.toString(16)).slice(-2);}).join(""),k.d("hmac: ",_r4).writeLog();case 5:return _context81.a(2,_r4);case 6:_context81.p=6;_t67=_context81.v;return _context81.a(2,void k.e("error:",_t67).writeLog());}},_callee81,null,[[0,6]]);}));function createHmac(_x87,_x88){return _createHmac3.apply(this,arguments);}return createHmac;}()}]);}(),F=/*#__PURE__*/function(){function F(){_classCallCheck2(this,F);}return _createClass2(F,null,[{key:"compareJSON",value:function compareJSON(e,t){var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var _i10=0,_r5=r;_i10<_r5.length;_i10++){var _n8=_r5[_i10];if(e[_n8]!==t[_n8]){if("object"!=_typeof2(e[_n8])||"object"!=_typeof2(t[_n8]))return!1;if(!isEqual(e[_n8],t[_n8]))return!1;}}return!0;}}]);}(),G=/*#__PURE__*/function(){function G(){_classCallCheck2(this,G);}return _createClass2(G,null,[{key:"isValidFormat",value:function isValidFormat(e){return null!=e&&""!=e&&"null"!=e&&e.length>8;}}]);}(),K=/*#__PURE__*/function(){function K(){_classCallCheck2(this,K);}return _createClass2(K,null,[{key:"setTopicChannel",value:function setTopicChannel(e,t){var r=[];for(var _n9=0;_n9<e.length;_n9++){var i=e[_n9];i.channel=t,r.push(i);}return r;}}]);}(),x={Repository:p,Config:c,Api:i,Models:o,Utils:s};return n;}();},e.exports=t();},315:function _(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}Object.defineProperty(t,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(t,"Core",{enumerable:!0,get:function get(){return a["default"];}}),Object.defineProperty(t,"default",{enumerable:!0,get:function get(){return o["default"];}});var o=function(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),i=new WeakMap();return function(e,t){if(!t&&e&&e.__esModule)return e;var o,s,a={__proto__:null,"default":e};if(null===e||"object"!=n(e)&&"function"!=typeof e)return a;if(o=t?i:r){if(o.has(e))return o.get(e);o.set(e,a);}for(var u in e)"default"!==u&&{}.hasOwnProperty.call(e,u)&&((s=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,u))&&(s.get||s.set)?o(a,u,s):a[u]=e[u]);return a;}(e,t);}(r(710));Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function get(){return o[e];}}));});var s,a=(s=r(610))&&s.__esModule?s:{"default":s};},468:function _(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n=c(r(254)),i=c(r(234)),o=c(r(457)),s=c(r(735)),a=c(r(630)),u=c(r(291));function c(e){return e&&e.__esModule?e:{"default":e};}function l(e){return l="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},l(e);}function f(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(r,n,i,o){var u=n&&n.prototype instanceof a?n:a,c=Object.create(u.prototype);return _d2(c,"_invoke",function(r,n,i){var o,a,u,c=0,l=i||[],f=!1,_d={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function d(t,r){return o=t,a=0,u=e,_d.n=r,s;}};function h(r,n){for(a=r,u=n,t=0;!f&&c&&!i&&t<l.length;t++){var i,o=l[t],h=_d.p,E=o[2];r>3?(i=E===n)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=r<2&&h<o[1])?(a=0,_d.v=n,_d.n=o[1]):h<E&&(i=r<3||o[0]>n||n>E)&&(o[4]=r,o[5]=n,_d.n=E,a=0));}if(i||r>1)return s;throw f=!0,n;}return function(i,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,E),a=l,u=E;(t=a<2?e:u)||!f;){o||(a?a<3?(a>1&&(_d.n=-1),h(a,u)):_d.n=u:_d.v=u);try{if(c=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0);}else 1===a&&(t=o["return"])&&t.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e;}else if((t=(f=_d.n<0)?u:r.call(n,_d))!==s)break;}catch(t){o=e,a=1,u=t;}finally{c=1;}}return{value:t,done:f};};}(r,i,o),!0),c;}var s={};function a(){}function u(){}function c(){}t=Object.getPrototypeOf;var l=[][n]?t(t([][n]())):(_d2(t={},n,function(){return this;}),t),h=c.prototype=a.prototype=Object.create(l);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_d2(e,i,"GeneratorFunction")),e.prototype=Object.create(h),e;}return u.prototype=c,_d2(h,"constructor",c),_d2(c,"constructor",u),u.displayName="GeneratorFunction",_d2(c,i,"GeneratorFunction"),_d2(h),_d2(h,i,"Generator"),_d2(h,n,function(){return this;}),_d2(h,"toString",function(){return"[object Generator]";}),(f=function f(){return{w:o,m:E};})();}function _d2(e,t,r,n){var i=Object.defineProperty;try{i({},"",{});}catch(e){i=0;}_d2=function d(e,t,r,n){function o(t,r){_d2(e,t,function(e){return this._invoke(t,r,e);});}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(o("next",0),o("throw",1),o("return",2));},_d2(e,t,r,n);}function h(e,t,r,n,i,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void r(e);}a.done?t(u):Promise.resolve(u).then(n,i);}function E(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function s(e){h(o,n,i,s,a,"next",e);}function a(e){h(o,n,i,s,a,"throw",e);}s(void 0);});};}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n);}}function p(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==l(t)?t:t+"";}var m=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE";},t=[{key:"getURL",value:(m=E(f().m(function e(){return f().w(function(e){for(;;)if(0===e.n)return e.a(2,this.URL_BASE);},e,this);})),function(){return m.apply(this,arguments);})},{key:"call",value:(p=E(f().m(function e(t,r,c,l){var d,h,E,y,p,m,I,v,_,g,b,S;return f().w(function(e){for(;;)switch(e.p=e.n){case 0:return d=new n["default"]("[IND]BaseClient: "),c.isServiceWorkerRequest()&&d.setLogLevel(a["default"].DEBUG),e.n=1,this.getURL();case 1:return v=e.v,_=c.getPath(r),g=v+_,b=c.getParams(),h=g+b,c.isJourneyRequest()&&(h=h.replace("v1","v2")),E={method:t,headers:c.addHeaders()},t!==this.GET&&(E.body=JSON.stringify(c.getBody())),l&&(E.credentials=l),e.p=2,y=new AbortController(),new u["default"]().getTimeoutRequestsInMilliseconds()&&0!=new u["default"]().getTimeoutRequestsInMilliseconds()&&(p=setTimeout(function(){return y.abort();},new u["default"]().getTimeoutRequestsInMilliseconds()),E.signal=y.signal),e.n=3,fetch(h,E);case 3:if(m=e.v,p&&clearTimeout(p),304==m.status){e.n=6;break;}return e.n=4,m.json();case 4:if(I=e.v,!m.ok){e.n=5;break;}return d.d("Method: "+t+"\nURL: "+h+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Response Code: "+I.statusCode+"\nResponse Message: "+I.message+"\nResponse Body:",JSON.stringify(I.data,null,"\t")).writeLog(),e.a(2,I);case 5:return d.d("Method: "+t+"\nURL: "+h+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Response Code: "+I.statusCode+"\nResponse Message: "+I.message+"\n").writeLog(),e.a(2,new i["default"](I.statusCode,I.message));case 6:return d.d("Method: "+t+"\nURL: "+h+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Response Code: "+m.status+"\n").writeLog(),e.a(2,m);case 7:e.n=10;break;case 8:if(e.p=8,"AbortError"!==(S=e.v).name){e.n=9;break;}return d.d("Method: "+t+"\nURL: "+h+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Error: "+S).writeLog(),e.a(2,o["default"].showError(s["default"],s["default"].ErrorCode.TIMEOUT_REQUEST,S));case 9:return d.d("Method: "+t+"\nURL: "+h+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Error: "+S).writeLog(),e.a(2,o["default"].showError(s["default"],s["default"].ErrorCode.GENERAL_ERROR,S));case 10:return e.a(2);}},e,this,[[2,8]]);})),function(e,t,r,n){return p.apply(this,arguments);})},{key:"get",value:(h=E(f().m(function e(t,r){return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.GET,t,r);case 1:return e.a(2,e.v);}},e,this);})),function(e,t){return h.apply(this,arguments);})},{key:"post",value:(d=E(f().m(function e(t,r,n){return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.POST,t,r,n);case 1:return e.a(2,e.v);}},e,this);})),function(e,t,r){return d.apply(this,arguments);})},{key:"put",value:(l=E(f().m(function e(t,r,n){return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.PUT,t,r,n);case 1:return e.a(2,e.v);}},e,this);})),function(e,t,r){return l.apply(this,arguments);})},{key:"delete",value:(c=E(f().m(function e(t,r){return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.DELETE,t,r);case 1:return e.a(2,e.v);}},e,this);})),function(e,t){return c.apply(this,arguments);})}],t&&y(e.prototype,t),r&&y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
206
+ var e,t,r,c,l,d,h,p,m;}();t["default"]=m;},545:function _(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BaseApplicationRequest",{enumerable:!0,get:function get(){return o["default"];}}),Object.defineProperty(t,"BaseClient",{enumerable:!0,get:function get(){return n["default"];}}),Object.defineProperty(t,"BaseEventRequest",{enumerable:!0,get:function get(){return s["default"];}}),Object.defineProperty(t,"BaseRequest",{enumerable:!0,get:function get(){return i["default"];}});var n=a(r(468)),i=a(r(237)),o=a(r(773)),s=a(r(943));function a(e){return e&&e.__esModule?e:{"default":e};}},773:function _(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}var i;function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n);}}function s(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}function a(e,t,r){return t=c(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}(e);}(e,u()?Reflect.construct(t,r||[],c(e).constructor):t.apply(e,r));}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(e){}return(u=function u(){return!!e;})();}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e);},c(e);}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e;},l(e,t);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var f=function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),(e=a(this,t)).PARAM_APPLICATION_CHANNEL="channel",e.channels=r,e;}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t);}(t,e),function(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;}(t,[{key:"getApplicationRequest",value:function value(){return this.params=this.createQueryString(),this;}},{key:"createQueryString",value:function value(){var e="";if(this.channels&&this.channels.length>0)for(var t=0;t<this.channels.length;t++)e+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[t].toLowerCase(),"&");return e+="".concat(this.PARAM_PLATFORM,"=webpush");}}]);}(((i=r(237))&&i.__esModule?i:{"default":i})["default"]);t["default"]=f;},943:function _(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=a(r(237)),o=a(r(622)),s=a(r(497));function a(e){return e&&e.__esModule?e:{"default":e};}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n);}}function c(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}function l(e,t,r){return t=d(t),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}(e);}(e,f()?Reflect.construct(t,r||[],d(e).constructor):t.apply(e,r));}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(e){}return(f=function f(){return!!e;})();}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e);},d(e);}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e;},h(e,t);}var E=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),l(this,t);}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t);}(t,e),r=t,(n=[{key:"setEventId",value:function value(e){this.eventId=e,null==e&&(this.eventId=o["default"].generateUUID());}},{key:"setEventAt",value:function value(e){this.eventAt=e,null==e&&(this.eventAt=s["default"].normalizeDateString(Date.now()));}}])&&u(r.prototype,n),i&&u(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r;// removed by dead control flow
207
+ var r,n,i;}(i["default"]);t["default"]=E;},237:function _(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n,i=(n=r(291))&&n.__esModule?n:{"default":n};function o(e){return o="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},o(e);}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n);}}function a(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==o(t)?t:t+"";}var u=function(){return function(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;}(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),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_EVENT_ID="eventId",this.PARAM_EVENT_AT="eventAt",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 value(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"");}},{key:"getBody",value:function value(){return this.body?this.body:"";}},{key:"getPath",value:function value(e){var t=this,r=e;return Object.keys(this.pathParams).forEach(function(e){r=r.replace(e,t.pathParams[e]);}),r;}},{key:"addHeaders",value:function value(){var e=this,t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach(function(r){t.append(r,e.headers[r]);}),t;}},{key:"isServiceWorkerRequest",value:function value(){return this.serviceWorkerRequest;}},{key:"setServiceWorkerRequest",value:function value(e){this.serviceWorkerRequest=e;}},{key:"isJourneyRequest",value:function value(){return this.journeyRequest;}},{key:"setJourneyRequest",value:function value(e){this.journeyRequest=e;}}]);}();t["default"]=u;},122:function _(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["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")}});t["default"]=n;},610:function _(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=l(r(122)),o=l(r(291)),s=c(r(545)),a=c(r(225)),u=c(r(628));function c(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),i=new WeakMap();return(c=function c(e,t){if(!t&&e&&e.__esModule)return e;var o,s,a={__proto__:null,"default":e};if(null===e||"object"!=n(e)&&"function"!=typeof e)return a;if(o=t?i:r){if(o.has(e))return o.get(e);o.set(e,a);}for(var u in e)"default"!==u&&{}.hasOwnProperty.call(e,u)&&((s=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,u))&&(s.get||s.set)?o(a,u,s):a[u]=e[u]);return a;})(e,t);}function l(e){return e&&e.__esModule?e:{"default":e};}t["default"]={Repository:o["default"],Config:i["default"],Api:s,Models:a,Utils:u};},902:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.Channel=void 0;var r=t.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"});t["default"]=r;},174:function _(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=a(r(291)),o=a(r(254)),s=a(r(164));function a(e){return e&&e.__esModule?e:{"default":e};}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n);}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;}function l(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}var f=c(function e(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);var n=new i["default"]();if(null!=t){n.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,n.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,n.setMaintenanceEnd(this.maintenanceWindow.end))),t.networkEventsEnabled&&(this.networkEventsEnabled=t.networkEventsEnabled),t.networkUpdateMinutes&&(this.networkUpdateMinutes=t.networkUpdateMinutes);var a=Date.now();if(t.serviceSyncTime?(this.serviceSyncTime=t.serviceSyncTime,a=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):a=new Date(Date.now()+36e5),!r){var u=a.toString();new o["default"]("[IND]CoreApplication").d("ServiceSyncTime defined on: "+u).writeLog(),n.setConfigV2ServiceSyncTime(u);}this.encryptionType=s["default"].HASH,t.encryptionType&&(this.encryptionType=t.encryptionType),n.setEncryptionType(this.encryptionType);}});t["default"]=f;},395:function _(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n,i=(n=r(291))&&n.__esModule?n:{"default":n};function o(e){return o="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},o(e);}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n);}}function a(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==o(t)?t:t+"";}var u=function(){return function(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;}(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),null==t?(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?(t.enabled&&(this.enabled=t.enabled,new i["default"]().setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,new i["default"]().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();},[{key:"getDeviceId",value:function value(){return this.deviceId;}},{key:"setDeviceId",value:function value(e){this.deviceId=e;}},{key:"setExternalCode",value:function value(e){this.externalCode=e;}},{key:"toJSON",value:function value(){var e={};return this.platform&&(e.platform=this.platform),this.version&&(e.version=this.version),this.productName&&(e.productName=this.productName),this.productVersion&&(e.productVersion=this.productVersion),this.browserName&&(e.browserName=this.browserName),this.browserVersion&&(e.browserVersion=this.browserVersion),this.osName&&(e.osName=this.osName),this.osVersion&&(e.osVersion=this.osVersion),this.deviceType&&(e.deviceType=this.deviceType),this.locale&&(e.locale=this.locale),this.timeZone&&(e.timeZome=this.timeZone),this.timeOffset&&(e.timeOffset=this.timeOffset),this.deviceId&&(e.deviceId=this.deviceId),this.enabled&&(e.enabled=this.enabled),this.browserPublicKey&&(e.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(e.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(e.externalCode=this.externalCode),e;}}]);}();t["default"]=u;},89:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});t["default"]=r;},164:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.EncryptionType=void 0;var r=t.EncryptionType=Object.freeze({RAW:"raw",HASH:"hash"});t["default"]=r;},735:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r={GENERAL_ERROR:600,TIMEOUT_REQUEST:605,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",TIMEOUT_REQUEST:"connection timeout",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"}};t["default"]=n;},234:function _(e,t){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},r(e);}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n);}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;}function o(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==r(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var s=i(function e(t,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.errorCode=t,this.errorMessage=r,null!=n&&(this.exceptionMessage=n);});t["default"]=s;},953:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["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"});t["default"]=r;},72:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});t["default"]=r;},225:function _(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Channel",{enumerable:!0,get:function get(){return n.Channel;}}),Object.defineProperty(t,"CoreApplication",{enumerable:!0,get:function get(){return l["default"];}}),Object.defineProperty(t,"Device",{enumerable:!0,get:function get(){return i["default"];}}),Object.defineProperty(t,"DeviceStatus",{enumerable:!0,get:function get(){return o["default"];}}),Object.defineProperty(t,"EncryptionType",{enumerable:!0,get:function get(){return f["default"];}}),Object.defineProperty(t,"ErrorDictionary",{enumerable:!0,get:function get(){return s["default"];}}),Object.defineProperty(t,"ErrorModel",{enumerable:!0,get:function get(){return a["default"];}}),Object.defineProperty(t,"EventType",{enumerable:!0,get:function get(){return u["default"];}}),Object.defineProperty(t,"TopicSubscribeType",{enumerable:!0,get:function get(){return c["default"];}});var n=r(902),i=d(r(395)),o=d(r(89)),s=d(r(735)),a=d(r(234)),u=d(r(953)),c=d(r(72)),l=d(r(174)),f=d(r(164));function d(e){return e&&e.__esModule?e:{"default":e};}},672:function _(e,t){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},r(e);}function n(){var e,t,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.toStringTag||"@@toStringTag";function a(r,n,o,s){var a=n&&n.prototype instanceof c?n:c,l=Object.create(a.prototype);return _i11(l,"_invoke",function(r,n,i){var o,s,a,c=0,l=i||[],f=!1,_d3={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function d(t,r){return o=t,s=0,a=e,_d3.n=r,u;}};function h(r,n){for(s=r,a=n,t=0;!f&&c&&!i&&t<l.length;t++){var i,o=l[t],h=_d3.p,E=o[2];r>3?(i=E===n)&&(a=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=r<2&&h<o[1])?(s=0,_d3.v=n,_d3.n=o[1]):h<E&&(i=r<3||o[0]>n||n>E)&&(o[4]=r,o[5]=n,_d3.n=E,s=0));}if(i||r>1)return u;throw f=!0,n;}return function(i,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,E),s=l,a=E;(t=s<2?e:a)||!f;){o||(s?s<3?(s>1&&(_d3.n=-1),h(s,a)):_d3.n=a:_d3.v=a);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,a)))throw TypeError("iterator result is not an object");if(!t.done)return t;a=t.value,s<2&&(s=0);}else 1===s&&(t=o["return"])&&t.call(o),s<2&&(a=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e;}else if((t=(f=_d3.n<0)?a:r.call(n,_d3))!==u)break;}catch(t){o=e,s=1,a=t;}finally{c=1;}}return{value:t,done:f};};}(r,o,s),!0),l;}var u={};function c(){}function l(){}function f(){}t=Object.getPrototypeOf;var d=[][o]?t(t([][o]())):(_i11(t={},o,function(){return this;}),t),h=f.prototype=c.prototype=Object.create(d);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,_i11(e,s,"GeneratorFunction")),e.prototype=Object.create(h),e;}return l.prototype=f,_i11(h,"constructor",f),_i11(f,"constructor",l),l.displayName="GeneratorFunction",_i11(f,s,"GeneratorFunction"),_i11(h),_i11(h,s,"Generator"),_i11(h,o,function(){return this;}),_i11(h,"toString",function(){return"[object Generator]";}),(n=function n(){return{w:a,m:E};})();}function _i11(e,t,r,n){var o=Object.defineProperty;try{o({},"",{});}catch(e){o=0;}_i11=function i(e,t,r,n){function s(t,r){_i11(e,t,function(e){return this._invoke(t,r,e);});}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(s("next",0),s("throw",1),s("return",2));},_i11(e,t,r,n);}function o(e,t,r,n,i,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void r(e);}a.done?t(u):Promise.resolve(u).then(n,i);}function s(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var s=e.apply(t,r);function a(e){o(s,n,i,a,u,"next",e);}function u(e){o(s,n,i,a,u,"throw",e);}a(void 0);});};}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n);}}function u(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==r(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var c=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),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;},t=[{key:"getDB",value:(l=s(n().m(function e(){var t=this;return n().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,r){var n=t.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 t=i.result,r=t.transaction("indigitallStore","readwrite"),n=r.objectStore("indigitallStore"),o=n.index("storeIndex");e({db:t,tx:r,store:n,index:o});},i.onerror=function(e){r(e);};}else r(!1);}));},e);})),function(){return l.apply(this,arguments);})},{key:"get",value:(c=s(n().m(function e(t,r){var i=this;return n().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,n){t||n(!1),t.index.get(r).onsuccess=function(r){r.target.result&&(i.close(t),e(r.target.result.store.value)),n(!1);};}));},e);})),function(e,t){return c.apply(this,arguments);})},{key:"put",value:(u=s(n().m(function e(t,r,i){var o=this;return n().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,n){t||n(!1),t.store.put({store:{key:r,value:i}},r).onsuccess=function(r){o.close(t),e(i);};}));},e);})),function(e,t,r){return u.apply(this,arguments);})},{key:"close",value:function value(e){if(e.tx)try{e.tx.oncomplete=function(){e.db.close();};}catch(e){console.log(this.TAG,e);}}},{key:"setItem",value:(o=s(n().m(function e(t,r){var i,o;return n().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this.getDB();case 1:return i=e.v,e.a(2,this.put(i,t,r));case 2:return e.p=2,o=e.v,e.a(2,o);}},e,this,[[0,2]]);})),function(e,t){return o.apply(this,arguments);})},{key:"getItem",value:(i=s(n().m(function e(t){var r,i;return n().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this.getDB();case 1:return r=e.v,e.a(2,this.get(r,t));case 2:return e.p=2,i=e.v,e.a(2,i);}},e,this,[[0,2]]);})),function(e){return i.apply(this,arguments);})}],t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
208
+ var e,t,r,i,o,u,c,l;}();t["default"]=new c();},87:function _(e,t){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},r(e);}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n);}}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==r(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.storage=this.isLocalStorageAvailable()?window.localStorage:null;},t=[{key:"isLocalStorageAvailable",value:function value(){try{var e=window.localStorage,t="__storage_test__";if(e)return e.setItem(t,t),e.removeItem(t),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==o.length;}return!1;}},{key:"setItem",value:function value(e,t){return null!=this.storage&&(this.storage.setItem(e,t),!0);}},{key:"getItem",value:function value(e){return null!=this.storage?this.storage.getItem(e):null;}},{key:"deleteItem",value:function(_value){function value(_x89){return _value.apply(this,arguments);}value.toString=function(){return _value.toString();};return value;}(function(e){return!!this.storage&&(this.storage.setItem(e,value),!0);})},{key:"clear",value:function value(){this.storage&&this.storage.clear();}}],t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
209
+ var e,t,r;}())();t["default"]=o;},291:function _(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n=u(r(122)),i=u(r(87)),o=u(r(672)),s=u(r(238)),a=u(r(164));function u(e){return e&&e.__esModule?e:{"default":e};}function c(e){return c="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},c(e);}function l(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(r,n,i,o){var u=n&&n.prototype instanceof a?n:a,c=Object.create(u.prototype);return _f(c,"_invoke",function(r,n,i){var o,a,u,c=0,l=i||[],f=!1,_d4={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function d(t,r){return o=t,a=0,u=e,_d4.n=r,s;}};function h(r,n){for(a=r,u=n,t=0;!f&&c&&!i&&t<l.length;t++){var i,o=l[t],h=_d4.p,E=o[2];r>3?(i=E===n)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=r<2&&h<o[1])?(a=0,_d4.v=n,_d4.n=o[1]):h<E&&(i=r<3||o[0]>n||n>E)&&(o[4]=r,o[5]=n,_d4.n=E,a=0));}if(i||r>1)return s;throw f=!0,n;}return function(i,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,E),a=l,u=E;(t=a<2?e:u)||!f;){o||(a?a<3?(a>1&&(_d4.n=-1),h(a,u)):_d4.n=u:_d4.v=u);try{if(c=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0);}else 1===a&&(t=o["return"])&&t.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e;}else if((t=(f=_d4.n<0)?u:r.call(n,_d4))!==s)break;}catch(t){o=e,a=1,u=t;}finally{c=1;}}return{value:t,done:f};};}(r,i,o),!0),c;}var s={};function a(){}function u(){}function c(){}t=Object.getPrototypeOf;var d=[][n]?t(t([][n]())):(_f(t={},n,function(){return this;}),t),h=c.prototype=a.prototype=Object.create(d);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_f(e,i,"GeneratorFunction")),e.prototype=Object.create(h),e;}return u.prototype=c,_f(h,"constructor",c),_f(c,"constructor",u),u.displayName="GeneratorFunction",_f(c,i,"GeneratorFunction"),_f(h),_f(h,i,"Generator"),_f(h,n,function(){return this;}),_f(h,"toString",function(){return"[object Generator]";}),(l=function l(){return{w:o,m:E};})();}function _f(e,t,r,n){var i=Object.defineProperty;try{i({},"",{});}catch(e){i=0;}_f=function f(e,t,r,n){function o(t,r){_f(e,t,function(e){return this._invoke(t,r,e);});}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(o("next",0),o("throw",1),o("return",2));},_f(e,t,r,n);}function d(e,t,r,n,i,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void r(e);}a.done?t(u):Promise.resolve(u).then(n,i);}function h(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function s(e){d(o,n,i,s,a,"next",e);}function a(e){d(o,n,i,s,a,"throw",e);}s(void 0);});};}function E(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n);}}function y(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==c(t)?t:t+"";}var p=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),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.TIMEOUT_REQUESTS=this.REPOSITORY+".TIMEOUT_REQUESTS",this.ENCRYPTION_TYPE=this.REPOSITORY+".ENCRYPTION_TYPE",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";},t=[{key:"setItemSessionStorage",value:function value(e,t){s["default"].setItem(e,t);}},{key:"getItemSessionStorage",value:function value(e){return s["default"].getItem(e);}},{key:"clearSessionStorage",value:function value(){s["default"].clearMessages();}},{key:"setStorage",value:function value(e,t){i["default"].setItem(e,t);}},{key:"getStorage",value:function value(e){return i["default"].getItem(e);}},{key:"clearStorage",value:function value(){i["default"].clear();}},{key:"setBrowserPublicKey",value:function value(e){i["default"].setItem(this.BROWSER_PUBLIC_KEY,e);}},{key:"getBrowserPublicKey",value:function value(){return i["default"].getItem(this.BROWSER_PUBLIC_KEY);}},{key:"setBrowserPrivateKey",value:function value(e){i["default"].setItem(this.BROWSER_PRIVATE_KEY,e);}},{key:"getBrowserPrivateKey",value:function value(){return i["default"].getItem(this.BROWSER_PRIVATE_KEY);}},{key:"setAppKey",value:(P=h(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(i["default"].setItem(this.APP_KEY,t),!o["default"]||!o["default"].IDB){e.n=1;break;}return e.n=1,o["default"].setItem(this.APP_KEY,t);case 1:return e.a(2);}},e,this);})),function(e){return P.apply(this,arguments);})},{key:"getAppKey",value:function value(){return i["default"].getItem(this.APP_KEY);}},{key:"setDeviceId",value:(T=h(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,t),!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.DEVICE_ID,t);case 1:return e.a(2);}},e,this);})),function(e){return T.apply(this,arguments);})},{key:"getDeviceId",value:function value(){return this.getStorage(this.DEVICE_ID);}},{key:"getAppKeySync",value:(R=h(l().m(function e(){return l().w(function(e){for(;;)switch(e.n){case 0:if(!o["default"]||!o["default"].IDB){e.n=2;break;}return e.n=1,o["default"].getItem(this.APP_KEY);case 1:return e.a(2,e.v);case 2:return e.a(2);}},e,this);})),function(){return R.apply(this,arguments);})},{key:"setVAPID",value:function value(e){i["default"].setItem(this.VAPID_PUBLIC,e);}},{key:"getVAPID",value:function value(){return i["default"].getItem(this.VAPID_PUBLIC);}},{key:"setEnabled",value:function value(e){i["default"].setItem(this.ENABLED,e);}},{key:"getEnabled",value:function value(){return i["default"].getItem(this.ENABLED);}},{key:"setServiceSyncTime",value:function value(e){i["default"].setItem(this.SERVICE_SYNC_TIME,e*this.BASE_TIME);}},{key:"getServiceSyncTime",value:function value(){var e=i["default"].getItem(this.SERVICE_SYNC_TIME);return e||1*this.BASE_TIME;}},{key:"setLocationEnabled",value:function value(e){i["default"].setItem(this.LOCATION_ENABLED,e);}},{key:"getLocationEnabled",value:function value(){return i["default"].getItem(this.LOCATION_ENABLED);}},{key:"setLocationUpdateMinutes",value:function value(e){i["default"].setItem(this.LOCATION_UPDATE_MINUTES,e);}},{key:"getLocationUpdateMinutes",value:function value(){var e=i["default"].getItem(this.LOCATION_UPDATE_MINUTES);return e||30;}},{key:"setRequestLocation",value:(O=h(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:i["default"].setItem(this.REQUEST_LOCATION,t);case 1:return e.a(2);}},e,this);})),function(e){return O.apply(this,arguments);})},{key:"getRequestLocation",value:function value(){return!!i["default"]&&i["default"].getItem(this.REQUEST_LOCATION);}},{key:"setPlatform",value:(S=h(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:i["default"].setItem(this.PLATFORM,t);case 1:return e.a(2);}},e,this);})),function(e){return S.apply(this,arguments);})},{key:"getPlatform",value:function value(){return i["default"]&&i["default"].getItem(this.PLATFORM)||n["default"].platform;}},{key:"getVersion",value:function value(){return n["default"].version;}},{key:"setBrowserName",value:(b=h(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:i["default"].setItem(this.BROWSER_NAME,t);case 1:return e.a(2);}},e,this);})),function(e){return b.apply(this,arguments);})},{key:"getBrowserName",value:function value(){return i["default"].getItem(this.BROWSER_NAME);}},{key:"setBrowserVersion",value:function value(e){i["default"].setItem(this.BROWSER_VERSION,e);}},{key:"getBrowserVersion",value:function value(){return i["default"].getItem(this.BROWSER_VERSION);}},{key:"setOsName",value:(g=h(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:i["default"].setItem(this.OS_NAME,t);case 1:return e.a(2);}},e,this);})),function(e){return g.apply(this,arguments);})},{key:"getOsName",value:function value(){return i["default"].getItem(this.OS_NAME);}},{key:"setOsVersion",value:function value(e){i["default"].setItem(this.OS_VERSION,e);}},{key:"getOsVersion",value:function value(){return i["default"].getItem(this.OS_VERSION);}},{key:"setDeviceType",value:function value(e){i["default"].setItem(this.DEVICE_TYPE,e);}},{key:"getDeviceType",value:function value(){return i["default"].getItem(this.DEVICE_TYPE);}},{key:"setSupported",value:function value(e){i["default"].setItem(this.SUPPORTED,e);}},{key:"getSupported",value:function value(){return i["default"].getItem(this.SUPPORTED);}},{key:"setServiceTimestamp",value:function value(e){i["default"].setItem(this.SERVICE_TIMESTAMP,e);}},{key:"getServiceTimestamp",value:function value(){return i["default"].getItem(this.SERVICE_TIMESTAMP);}},{key:"setLocationTimestamp",value:function value(e){i["default"].setItem(this.LOCATION_TIMESTAMP,e);}},{key:"getLocationTimestamp",value:function value(){return i["default"].getItem(this.LOCATION_TIMESTAMP);}},{key:"setPermissionLocation",value:function value(e){i["default"].setItem(this.PERMISSION_LOCATION,e);}},{key:"getPermissionLocation",value:function value(){return i["default"].getItem(this.PERMISSION_LOCATION);}},{key:"setDebugLog",value:function value(e){i["default"].setItem(this.SET_LOG_DEBUG,e);}},{key:"getDebugLog",value:function value(){return"false"!==i["default"].getItem(this.SET_LOG_DEBUG);}},{key:"setLogLevel",value:function value(e){i["default"].setItem(this.LOG_LEVEL,e);}},{key:"getLogLevel",value:function value(){return i["default"].getItem(this.LOG_LEVEL);}},{key:"setNewUserTimestamp",value:function value(e){i["default"].setItem(this.NEW_USER_TIMESTAMP,e);}},{key:"getNewUserTimestamp",value:function value(){return i["default"].getItem(this.NEW_USER_TIMESTAMP);}},{key:"setExternalIdRequest",value:(_=h(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(i["default"]&&i["default"].isLocalStorageAvailable()&&i["default"].setItem(this.EXTERNAL_ID,t),!o["default"]||!o["default"].IDB){e.n=1;break;}return e.n=1,o["default"].setItem(this.EXTERNAL_ID,t);case 1:return e.a(2);}},e,this);})),function(e){return _.apply(this,arguments);})},{key:"getExternalIdRequest",value:(v=h(l().m(function e(){var t;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!i["default"]||!i["default"].isLocalStorageAvailable()){e.n=1;break;}t=i["default"].getItem(this.EXTERNAL_ID),e.n=3;break;case 1:if(!o["default"]||!o["default"].IDB){e.n=3;break;}return e.n=2,o["default"].getItem(this.EXTERNAL_ID);case 2:t=e.v;case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2,t);}},e,this,[[0,4]]);})),function(){return v.apply(this,arguments);})},{key:"setExternalId",value:function value(e){i["default"].setItem(this.EXTERNAL_ID,e);}},{key:"getExternalId",value:function value(){return i["default"].getItem(this.EXTERNAL_ID);}},{key:"getRegisteredByCookie",value:(I=h(l().m(function e(){return l().w(function(e){for(;;)if(0===e.n)return e.a(2,i["default"].getItem(this.REGISTERED_BY_COOKIE));},e,this);})),function(){return I.apply(this,arguments);})},{key:"setRegisteredByCookie",value:(m=h(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:i["default"].setItem(this.REGISTERED_BY_COOKIE,t);case 1:return e.a(2);}},e,this);})),function(e){return m.apply(this,arguments);})},{key:"setLatitude",value:function value(e){i["default"].setItem(this.LATITUDE,e);}},{key:"getLatitude",value:function value(){return i["default"].getItem(this.LATITUDE);}},{key:"setLongitude",value:function value(e){i["default"].setItem(this.LONGITUDE,e);}},{key:"getLongitude",value:function value(){return i["default"].getItem(this.LONGITUDE);}},{key:"setInAppTopicList",value:(p=h(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.INAPP_TOPICS,t);case 1:return e.a(2);}},e,this);})),function(e){return p.apply(this,arguments);})},{key:"getInAppTopicList",value:(y=h(l().m(function e(){var t;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!this.db||!this.db.IDB){e.n=2;break;}return e.n=1,this.db.getItem(this.INAPP_TOPICS);case 1:t=e.v;case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2,t);}},e,this,[[0,3]]);})),function(){return y.apply(this,arguments);})},{key:"setTopicList",value:(d=h(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.TOPIC_LIST,t);case 1:return e.a(2);}},e,this);})),function(e){return d.apply(this,arguments);})},{key:"getTopicList",value:(f=h(l().m(function e(){var t;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!this.db||!this.db.IDB){e.n=2;break;}return e.n=1,this.db.getItem(this.TOPIC_LIST);case 1:t=e.v;case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2,t);}},e,this,[[0,3]]);})),function(){return f.apply(this,arguments);})},{key:"getUrlInappApi",value:function value(){return this.getStorage(this.URL_INAPP_API);}},{key:"setUrlInappApi",value:function value(e){this.setStorage(this.URL_INAPP_API,e);}},{key:"setInAppEnabled",value:function value(e){this.setStorage(this.INAPP_ENABLED,e);}},{key:"isInAppEnabled",value:function value(){return this.getStorage(this.INAPP_ENABLED);}},{key:"setAvoidCypher",value:function value(e){this.setStorage(this.AVOID_CYPHER,!0===e);}},{key:"isAvoidCypher",value:function value(){return"true"===this.getStorage(this.AVOID_CYPHER);}},{key:"getUrlDeviceApi",value:(c=h(l().m(function e(){var t;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!this.storage||!this.storage.isLocalStorageAvailable()){e.n=1;break;}t=this.getStorage(this.URL_DEVICE_API),e.n=3;break;case 1:if(!this.db||!this.db.IDB){e.n=3;break;}return e.n=2,this.db.getItem(this.URL_DEVICE_API);case 2:t=e.v;case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2,t);}},e,this,[[0,4]]);})),function(){return c.apply(this,arguments);})},{key:"setUrlDeviceApi",value:(u=h(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,t),!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.URL_DEVICE_API,t);case 1:return e.a(2);}},e,this);})),function(e){return u.apply(this,arguments);})},{key:"setPushDisabled",value:function value(e){this.setStorage(this.PUSH_DISABLED,e);}},{key:"isPushDisabled",value:function value(){return this.getStorage(this.PUSH_DISABLED);}},{key:"getConfigV2ServiceSyncTime",value:function value(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME);}},{key:"setConfigV2ServiceSyncTime",value:function value(e){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,e);}},{key:"getConfigV2",value:function value(){return this.getStorage(this.CONFIG_V2);}},{key:"setConfigV2",value:function value(e){this.setStorage(this.CONFIG_V2,e);}},{key:"getMaintenanceEnd",value:function value(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY);}},{key:"setMaintenanceEnd",value:function value(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,e);}},{key:"getMaintenanceStart",value:function value(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY);}},{key:"setMaintenanceStart",value:function value(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,e);}},{key:"getTimeoutRequestsInMilliseconds",value:function value(){return this.getStorage(this.TIMEOUT_REQUESTS);}},{key:"setTimeoutRequestsInMilliseconds",value:function value(e){this.setStorage(this.TIMEOUT_REQUESTS,e);}},{key:"getEncryptionType",value:function value(){var e=this.getStorage(this.ENCRYPTION_TYPE);return null===e?a["default"].HASH:e;}},{key:"setEncryptionType",value:function value(e){this.setStorage(this.ENCRYPTION_TYPE,e);}}],t&&E(e.prototype,t),r&&E(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
210
+ var e,t,r,u,c,f,d,y,p,m,I,v,_,g,b,S,O,R,T,P;}();t["default"]=p;},238:function _(e,t){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},r(e);}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n);}}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==r(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null;},t=[{key:"isSessionStorageAvailable",value:function value(){try{var e=window.sessionStorage,t="__storage_test__";if(e)return e.setItem(t,t),e.removeItem(t),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==o.length;}return!1;}},{key:"getItem",value:function value(e){return null!=this.session?this.session.getItem(e):null;}},{key:"setItem",value:function value(e,t){return null!=this.session&&(this.session.setItem(e,t),!0);}},{key:"clearMessages",value:function value(){this.session&&this.session.removeItem("messages");}}],t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
211
+ var e,t,r;}())();t["default"]=o;},622:function _(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n=o(r(291)),i=o(r(254));function o(e){return e&&e.__esModule?e:{"default":e};}function s(e){return s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},s(e);}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n);}}function u(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==s(t)?t:t+"";}var c=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},r=[{key:"isServiceTimestampExceed",value:function value(){return!new n["default"]().getServiceTimestamp()||new n["default"]().getServiceSyncTime()<=(Date.now()-new n["default"]().getServiceTimestamp())/6e4;}},{key:"isFunction",value:function value(e){return!(!e||"function"!=typeof e);}},{key:"generateUUID",value:function value(){var e=new i["default"]("[IND]CommonUtils: ");return"undefined"!=typeof crypto&&crypto.randomUUID?(e.d("Using crypto.randomUUID to generate UUID").writeLog(),crypto.randomUUID()):"undefined"!=typeof crypto&&crypto.getRandomValues?(e.d("Using crypto.getRandomValues to generate UUID").writeLog(),([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16);})):null;}}],(t=null)&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
212
+ var e,t,r;}();t["default"]=c;},429:function _(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n,i=(n=r(254))&&n.__esModule?n:{"default":n};function o(e){return o="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},o(e);}function s(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(r,n,i,o){var s=n&&n.prototype instanceof c?n:c,l=Object.create(s.prototype);return _a3(l,"_invoke",function(r,n,i){var o,s,a,c=0,l=i||[],f=!1,_d5={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function d(t,r){return o=t,s=0,a=e,_d5.n=r,u;}};function h(r,n){for(s=r,a=n,t=0;!f&&c&&!i&&t<l.length;t++){var i,o=l[t],h=_d5.p,E=o[2];r>3?(i=E===n)&&(a=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=r<2&&h<o[1])?(s=0,_d5.v=n,_d5.n=o[1]):h<E&&(i=r<3||o[0]>n||n>E)&&(o[4]=r,o[5]=n,_d5.n=E,s=0));}if(i||r>1)return u;throw f=!0,n;}return function(i,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,E),s=l,a=E;(t=s<2?e:a)||!f;){o||(s?s<3?(s>1&&(_d5.n=-1),h(s,a)):_d5.n=a:_d5.v=a);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,a)))throw TypeError("iterator result is not an object");if(!t.done)return t;a=t.value,s<2&&(s=0);}else 1===s&&(t=o["return"])&&t.call(o),s<2&&(a=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e;}else if((t=(f=_d5.n<0)?a:r.call(n,_d5))!==u)break;}catch(t){o=e,s=1,a=t;}finally{c=1;}}return{value:t,done:f};};}(r,i,o),!0),l;}var u={};function c(){}function l(){}function f(){}t=Object.getPrototypeOf;var d=[][n]?t(t([][n]())):(_a3(t={},n,function(){return this;}),t),h=f.prototype=c.prototype=Object.create(d);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,_a3(e,i,"GeneratorFunction")),e.prototype=Object.create(h),e;}return l.prototype=f,_a3(h,"constructor",f),_a3(f,"constructor",l),l.displayName="GeneratorFunction",_a3(f,i,"GeneratorFunction"),_a3(h),_a3(h,i,"Generator"),_a3(h,n,function(){return this;}),_a3(h,"toString",function(){return"[object Generator]";}),(s=function s(){return{w:o,m:E};})();}function _a3(e,t,r,n){var i=Object.defineProperty;try{i({},"",{});}catch(e){i=0;}_a3=function a(e,t,r,n){function o(t,r){_a3(e,t,function(e){return this._invoke(t,r,e);});}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(o("next",0),o("throw",1),o("return",2));},_a3(e,t,r,n);}function u(e,t,r,n,i,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void r(e);}a.done?t(u):Promise.resolve(u).then(n,i);}function c(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function s(e){u(o,n,i,s,a,"next",e);}function a(e){u(o,n,i,s,a,"throw",e);}s(void 0);});};}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n);}}function f(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==o(t)?t:t+"";}var d=function(){return function(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;}(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},null,[{key:"getLocationPermission",value:(n=c(s().m(function e(){var t,r;return s().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getPermission("geolocation");case 1:return t=e.v,r={},t&&(r.location=t.state),e.a(2,r);}},e,this);})),function(){return n.apply(this,arguments);})},{key:"getPermission",value:(r=c(s().m(function e(t){return s().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&t)){e.n=2;break;}return e.n=1,navigator.permissions.query({name:t,userVisibleOnly:!0});case 1:return e.a(2,e.v);case 2:e.n=4;break;case 3:return e.p=3,e.v,e.a(2,null);case 4:return e.a(2,null);}},e,null,[[0,3]]);})),function(e){return r.apply(this,arguments);})},{key:"setPermissionsCallback",value:(t=c(s().m(function e(){return s().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 1:return e.a(2);}},e,this);})),function(){return t.apply(this,arguments);})},{key:"setCallback",value:(e=c(s().m(function e(t,r){var n,o;return s().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getPermission(t);case 1:(n=e.v)&&(o=n.state,"onchange"in n&&(n.onchange=function(){new i["default"]("[IND]CorePermissions: ").d(t+" permission state has changed from "+o+" to "+n.state).writeLog(),o=n.state,r&&r({name:t,state:n.state});}));case 2:return e.a(2);}},e,this);})),function(t,r){return e.apply(this,arguments);})}]);// removed by dead control flow
213
+ var e,t,r,n;}();t["default"]=d;},170:function _(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.CryptoUtils=void 0;var n=r(225),i=o(r(291));function o(e){return e&&e.__esModule?e:{"default":e};}function s(e){return s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},s(e);}function a(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(r,n,i,o){var a=n&&n.prototype instanceof c?n:c,l=Object.create(a.prototype);return _u(l,"_invoke",function(r,n,i){var o,a,u,c=0,l=i||[],f=!1,_d6={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function d(t,r){return o=t,a=0,u=e,_d6.n=r,s;}};function h(r,n){for(a=r,u=n,t=0;!f&&c&&!i&&t<l.length;t++){var i,o=l[t],h=_d6.p,E=o[2];r>3?(i=E===n)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=r<2&&h<o[1])?(a=0,_d6.v=n,_d6.n=o[1]):h<E&&(i=r<3||o[0]>n||n>E)&&(o[4]=r,o[5]=n,_d6.n=E,a=0));}if(i||r>1)return s;throw f=!0,n;}return function(i,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,E),a=l,u=E;(t=a<2?e:u)||!f;){o||(a?a<3?(a>1&&(_d6.n=-1),h(a,u)):_d6.n=u:_d6.v=u);try{if(c=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0);}else 1===a&&(t=o["return"])&&t.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e;}else if((t=(f=_d6.n<0)?u:r.call(n,_d6))!==s)break;}catch(t){o=e,a=1,u=t;}finally{c=1;}}return{value:t,done:f};};}(r,i,o),!0),l;}var s={};function c(){}function l(){}function f(){}t=Object.getPrototypeOf;var d=[][n]?t(t([][n]())):(_u(t={},n,function(){return this;}),t),h=f.prototype=c.prototype=Object.create(d);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,_u(e,i,"GeneratorFunction")),e.prototype=Object.create(h),e;}return l.prototype=f,_u(h,"constructor",f),_u(f,"constructor",l),l.displayName="GeneratorFunction",_u(f,i,"GeneratorFunction"),_u(h),_u(h,i,"Generator"),_u(h,n,function(){return this;}),_u(h,"toString",function(){return"[object Generator]";}),(a=function a(){return{w:o,m:E};})();}function _u(e,t,r,n){var i=Object.defineProperty;try{i({},"",{});}catch(e){i=0;}_u=function u(e,t,r,n){function o(t,r){_u(e,t,function(e){return this._invoke(t,r,e);});}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(o("next",0),o("throw",1),o("return",2));},_u(e,t,r,n);}function c(e,t,r,n,i,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void r(e);}a.done?t(u):Promise.resolve(u).then(n,i);}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n);}}function f(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==s(t)?t:t+"";}var d=new(o(r(254))["default"])("[IND]Crypto"),h=new TextEncoder("utf-8"),E="HMAC",y=t.CryptoUtils=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},t=null,r=[{key:"createHmac",value:(o=a().m(function e(t,r){var o,s,u,c,l,f,y;return a().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,o=r,!0!==new i["default"]().isAvoidCypher()&&new i["default"]().getEncryptionType()!==n.EncryptionType.RAW){e.n=1;break;}return e.a(2,r);case 1:if(new i["default"]().getEncryptionType()!==n.EncryptionType.HASH){e.n=5;break;}if(u=null===(s=window)||void 0===s||null===(s=s.crypto)||void 0===s?void 0:s.subtle){e.n=2;break;}return e.a(2);case 2:return e.n=3,u.importKey("raw",h.encode(t),{name:E,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 3:return c=e.v,e.n=4,u.sign(E,c,h.encode(r));case 4:l=e.v,f=new Uint8Array(l),o=Array.prototype.map.call(f,function(e){return("00"+e.toString(16)).slice(-2);}).join(""),d.d("hmac: ",o).writeLog();case 5:return e.a(2,o);case 6:return e.p=6,y=e.v,d.e("error:",y).writeLog(),e.a(2);}},e,null,[[0,6]]);}),s=function s(){var e=this,t=arguments;return new Promise(function(r,n){var i=o.apply(e,t);function s(e){c(i,r,n,s,a,"next",e);}function a(e){c(i,r,n,s,a,"throw",e);}s(void 0);});},function(e,t){return s.apply(this,arguments);})}],t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
214
+ var e,t,r,o,s;}();t["default"]=y;},497:function _(e,t){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},r(e);}function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0;}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var _n0=0,o=function o(){};return{s:o,n:function n(){return _n0>=e.length?{done:!0}:{done:!1,value:e[_n0++]};},e:function e(_e14){throw _e14;},f:o};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var s,a=!0,u=!1;return{s:function s(){r=r.call(e);},n:function n(){var e=r.next();return a=e.done,e;},e:function e(_e15){u=!0,s=_e15;},f:function f(){try{a||null==r["return"]||r["return"]();}finally{if(u)throw s;}}};}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n;}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n);}}function s(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e;}function a(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==r(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var u=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},r=[{key:"normalizeDateString",value:function value(e){if("number"==typeof e||e instanceof Date){var t=new Date(e);return isNaN(t.getTime())?null:this.formatCanonicalUTC(t);}if(!e||"string"!=typeof e)return null;var r=e.trim();if(this.isCanonicalFormat(r))return r;var n=this.tryToParseLeniently(r);return n?this.formatCanonicalUTC(n):null;}},{key:"isCanonicalFormat",value:function value(e){return /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(e);}},{key:"tryToParseLeniently",value:function value(e){var t,r=n(this.LENIENT_DATE_FORMATS);try{for(r.s();!(t=r.n()).done;){var i=t.value,o=this.parseByFormat(e,i);if(o&&!isNaN(o.getTime()))return o;}}catch(e){r.e(e);}finally{r.f();}return null;}},{key:"parseByFormat",value:function value(e,t){switch(t){case"yyyy-MM-dd'T'HH:mm:ss.SSSZ":return new Date(e);case"yyyy-MM-dd'T'HH:mm:ssZ":return e.endsWith("Z")?new Date(e):new Date(e.replaceAll(/([+-]\d{2})(\d{2})$/g,"$1:$2"));case"yyyy-MM-dd'T'HH:mm:ss":return new Date(e+"Z");case"yyyy-MM-dd HH:mm:ss":return new Date(e.replaceAll(" ","T")+"Z");case"yyyy-MM-dd":return new Date(e+"T00:00:00Z");default:return null;}}},{key:"formatCanonicalUTC",value:function value(e){return e.toISOString();}}],(t=null)&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
215
+ var e,t,r;}();s(u,"DATE_FORMAT_PATTERN","yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"),s(u,"LENIENT_DATE_FORMATS",["yyyy-MM-dd'T'HH:mm:ss.SSSZ","yyyy-MM-dd'T'HH:mm:ssZ","yyyy-MM-dd'T'HH:mm:ss","yyyy-MM-dd HH:mm:ss","yyyy-MM-dd"]);t["default"]=u;},457:function _(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n=o(r(735)),i=o(r(234));function o(e){return e&&e.__esModule?e:{"default":e};}function s(e){return s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},s(e);}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n);}}function u(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==s(t)?t:t+"";}var c=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},(t=[{key:"showError",value:function value(e,t,r){if(null!=e){var o=Object.values(e.ErrorCode).indexOf(t);if(o>=0){var s={code:Object.keys(e.ErrorCode)[o],errorId:Object.values(e.ErrorCode)[o]};return new i["default"](s,Object.values(e.ErrorMessage)[o],r);}return new i["default"](n["default"].ErrorCode.GENERAL_ERROR,"general error",r);}}}])&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
216
+ var e,t,r;}();t["default"]=new c();},325:function _(e,t){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},r(e);}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n);}}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==r(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},i=[{key:"compareJSON",value:function value(e,t){var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(e[a]!==t[a]){if("object"!=r(e[a])||"object"!=r(t[a]))return!1;if(!isEqual(e[a],t[a]))return!1;}}return!0;}}],(t=null)&&n(e.prototype,t),i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
217
+ var e,t,i;}();t["default"]=o;},254:function _(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n=o(r(291)),i=o(r(630));function o(e){return e&&e.__esModule?e:{"default":e};}function s(e){return s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},s(e);}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n);}}function u(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==s(t)?t:t+"";}var c=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.tag="[IND]",t&&(this.tag=t),this.level=i["default"].INFO,this.setLogLevel(new n["default"]().getLogLevel()),this.log=[];}return t=e,r=[{key:"setLogLevel",value:function value(e){e&&e>=i["default"].DEBUG&&e<=i["default"].ERROR&&(this.level=e);}},{key:"d",value:function value(){if(this.level<=i["default"].DEBUG)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"i",value:function value(){if(this.level<=i["default"].INFO)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"w",value:function value(){if(this.level<=i["default"].WARNING)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"e",value:function value(){if(this.level<=i["default"].ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"writeLog",value:function value(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[];}}],o=[{key:"addedAsString",value:function value(e){return"string"==typeof e?e:JSON.stringify(e,null,2);}}],r&&a(t.prototype,r),o&&a(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;// removed by dead control flow
218
+ var t,r,o;}();t["default"]=c;},630:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.LogLevel=void 0;var r=t.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});t["default"]=r;},662:function _(e,t){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},r(e);}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n);}}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==r(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},r=[{key:"setTopicChannel",value:function value(e,t){for(var r=[],n=0;n<e.length;n++){var i=e[n];i.channel=t,r.push(i);}return r;}}],(t=null)&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
219
+ var e,t,r;}();t["default"]=o;},332:function _(e,t){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},r(e);}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n);}}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==r(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},r=[{key:"isValidFormat",value:function value(e){return null!=e&&""!=e&&"null"!=e&&e.length>8;}}],(t=null)&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
220
+ var e,t,r;}();t["default"]=o;},628:function _(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CommonUtils",{enumerable:!0,get:function get(){return n["default"];}}),Object.defineProperty(t,"CorePermissions",{enumerable:!0,get:function get(){return i["default"];}}),Object.defineProperty(t,"CryptoUtils",{enumerable:!0,get:function get(){return o["default"];}}),Object.defineProperty(t,"DateUtils",{enumerable:!0,get:function get(){return d["default"];}}),Object.defineProperty(t,"ErrorUtils",{enumerable:!0,get:function get(){return s["default"];}}),Object.defineProperty(t,"JsonUtils",{enumerable:!0,get:function get(){return a["default"];}}),Object.defineProperty(t,"Log",{enumerable:!0,get:function get(){return u["default"];}}),Object.defineProperty(t,"LogLevel",{enumerable:!0,get:function get(){return c.LogLevel;}}),Object.defineProperty(t,"TopicUtils",{enumerable:!0,get:function get(){return f["default"];}}),Object.defineProperty(t,"Validations",{enumerable:!0,get:function get(){return l["default"];}});var n=h(r(622)),i=h(r(429)),o=h(r(170)),s=h(r(457)),a=h(r(325)),u=h(r(254)),c=r(630),l=h(r(332)),f=h(r(662)),d=h(r(497));function h(e){return e&&e.__esModule?e:{"default":e};}},904:function _(e){"use strict";e.exports=JSON.parse('{"_from":"indigitall-web-core@4.16.6","_id":"indigitall-web-core@4.16.6","_inBundle":false,"_integrity":"sha512-045LGrA/PpWZIGvHBx0xkXDeksNgYV7dHmOMMC8Ij91HirZRH7l7yOLaSFQTbFC1l5vAIJxdPNRqvwDUTGjvCQ==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.16.6","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.16.6","saveSpec":null,"fetchSpec":"4.16.6"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.16.6.tgz","_shasum":"76f7bf9db6a6a2777bf5e32fa1c8a0ed4e033ef9","_spec":"indigitall-web-core@4.16.6","_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.16.6"}');}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports;}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]});},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t);},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0});};var n={};return function(){"use strict";r.r(n),r.d(n,{"default":function _default(){return P;}});var e=r(315).Core.Repository;var t=new(/*#__PURE__*/function(_e16){function _class9(){var _this14;_classCallCheck2(this,_class9);_this14=_callSuper2(this,_class9),_this14.DEVICE_ID=_this14.REPOSITORY+".DEVICE_ID";return _this14;}_inherits2(_class9,_e16);return _createClass2(_class9,[{key:"setDeviceId",value:function(){var _setDeviceId4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee82(e){return _regenerator2().w(function(_context82){while(1)switch(_context82.n){case 0:this.setStorage(this.DEVICE_ID,e);case 1:return _context82.a(2);}},_callee82,this);}));function setDeviceId(_x90){return _setDeviceId4.apply(this,arguments);}return setDeviceId;}()},{key:"getDeviceId",value:function getDeviceId(){return this.getStorage(this.DEVICE_ID);}}]);}(e))(),_r$Core$Utils=r(315).Core.Utils,i=_r$Core$Utils.Validations,o=_r$Core$Utils.Log;var s=/*#__PURE__*/function(_i12){function s(){_classCallCheck2(this,s);return _callSuper2(this,s,arguments);}_inherits2(s,_i12);return _createClass2(s,null,[{key:"isAppKeyFormat",value:function isAppKeyFormat(){var e=t.getAppKey();return null!=e&&""!=e&&"null"!=e&&e.length>3;}},{key:"isValidFormatRequest",value:function isValidFormatRequest(){var e=new o("[IND]CustomerValidations: "),r=t.getDeviceId();var n=!0;return this.isAppKeyFormat()||(n=!1,e.w("appKey is null or empty").writeLog()),t.isPushDisabled()||this.isValidFormat(r)||(n=!1,e.w("deviceId is null or empty").writeLog()),n;}}]);}(i);var a=/*#__PURE__*/function(){function a(e){_classCallCheck2(this,a);e.id&&(this.id=e.id),e.customerId&&(this.customerId=e.customerId),e.applicationId&&(this.applicationId=e.applicationId),e.createdAt&&(this.createdAt=e.createdAt),e.updatedAt&&(this.updatedAt=e.updatedAt);}return _createClass2(a,[{key:"getCustomerId",value:function getCustomerId(){return this.customerId;}},{key:"getApplicationId",value:function getApplicationId(){return this.applicationId;}},{key:"getId",value:function getId(){return this.id;}},{key:"getCreatedAt",value:function getCreatedAt(){return this.createdAt;}},{key:"getUpdatedAt",value:function getUpdatedAt(){return this.updatedAt;}},{key:"toJSON",value:function toJSON(){return{id:this.id,customerId:this.customerId,applicationId:this.applicationId,createdAt:this.createdAt,updatedAt:this.updatedAt};}}]);}();var u=/*#__PURE__*/function(){function u(e,t){_classCallCheck2(this,u);this.customerFieldKey=e,this.customerFieldValue=t;}return _createClass2(u,[{key:"getCustomerFieldKey",value:function getCustomerFieldKey(){return this.customerFieldKey;}},{key:"getCustomerFieldValue",value:function getCustomerFieldValue(){return this.customerFieldValue;}},{key:"toJSON",value:function toJSON(){return JSON.parse("\"".concat(this.customerFieldKey,"\":\"").concat(this.customerFieldValue,"\""));}}]);}(),c=r(315).Core.Models.ErrorDictionary,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});var f=c.ErrorMessage;Object.assign(f,{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"});var d={ErrorCode:l,ErrorMessage:f},h=r(315).Core.Config,E=r(315).Core.Api.BaseClient,y=r(315).Core.Models.ErrorModel,_r$Core$Utils2=r(315).Core.Utils,p=_r$Core$Utils2.CommonUtils,m=_r$Core$Utils2.ErrorUtils;var I=new(/*#__PURE__*/function(_E){function _class0(){var _this15;_classCallCheck2(this,_class0);_this15=_callSuper2(this,_class0),_this15.URL_BASE=h.client.CUSTOMER_URL_BASE,_this15.ENDPOINT_CUSTOMER="/customer",_this15.ENDPOINT_CUSTOMER_FIELD=_this15.ENDPOINT_CUSTOMER+"/field",_this15.ENDPOINT_CUSTOMER_LINK=_this15.ENDPOINT_CUSTOMER+"/link",_this15.ENDPOINT_EVENT="/event",_this15.ENDPOINT_CUSTOMER_EVENT_JOURNEY=_this15.ENDPOINT_CUSTOMER+_this15.ENDPOINT_EVENT+"/custom";return _this15;}_inherits2(_class0,_E);return _createClass2(_class0,[{key:"getURL",value:function(){var _getURL4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee83(){var e;return _regenerator2().w(function(_context83){while(1)switch(_context83.n){case 0:_context83.n=1;return t.getUrlDeviceApi();case 1:e=_context83.v;return _context83.a(2,e?e=e.replaceAll("v1","v2"):h.client.CUSTOMER_URL_BASE);}},_callee83);}));function getURL(){return _getURL4.apply(this,arguments);}return getURL;}()},{key:"getCustomer",value:function(){var _getCustomer=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee84(e,r,n){var _t68;return _regenerator2().w(function(_context84){while(1)switch(_context84.n){case 0:if(!(s.isAppKeyFormat()&&s.isValidFormat(t.getExternalId()))){_context84.n=2;break;}_context84.n=1;return this.get(this.ENDPOINT_CUSTOMER,e.getCustomerRequest());case 1:_t68=_context84.v;_t68&&!(_t68 instanceof y)&&_t68.statusCode>=200&&_t68.statusCode<300?p.isFunction(r)&&r(new a(_t68.data)):_t68?p.isFunction(n)&&n(_t68):p.isFunction(n)&&n();_context84.n=3;break;case 2:p.isFunction(n)&&n(m.showError(d,d.ErrorCode.BAD_REQUEST_SERVER_ERROR));case 3:return _context84.a(2);}},_callee84,this);}));function getCustomer(_x91,_x92,_x93){return _getCustomer.apply(this,arguments);}return getCustomer;}()},{key:"getCustomerField",value:function(){var _getCustomerField=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee85(e,r,n){var _t69,_i13,_e17;return _regenerator2().w(function(_context85){while(1)switch(_context85.n){case 0:if(!(s.isAppKeyFormat()&&s.isValidFormat(t.getExternalId()))){_context85.n=2;break;}_context85.n=1;return this.get(this.ENDPOINT_CUSTOMER_FIELD,e.getCustomerFieldRequest());case 1:_t69=_context85.v;_i13=[];for(_e17 in _t69.data)_t69.data.hasOwnProperty(_e17)&&_i13.push(new u(_e17,_t69.data[_e17]));_t69&&_i13.length>0&&!(_t69 instanceof y)&&_t69.statusCode>=200&&_t69.statusCode<300?p.isFunction(r)&&r(_i13):_t69?p.isFunction(n)&&n(_t69):p.isFunction(n)&&n();_context85.n=3;break;case 2:p.isFunction(n)&&n(m.showError(d,d.ErrorCode.BAD_REQUEST_SERVER_ERROR));case 3:return _context85.a(2);}},_callee85,this);}));function getCustomerField(_x94,_x95,_x96){return _getCustomerField.apply(this,arguments);}return getCustomerField;}()},{key:"putCustomerField",value:function(){var _putCustomerField=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee86(e,r,n){var _t70;return _regenerator2().w(function(_context86){while(1)switch(_context86.n){case 0:if(!(s.isAppKeyFormat()&&s.isValidFormat(t.getExternalId()))){_context86.n=2;break;}_context86.n=1;return this.put(this.ENDPOINT_CUSTOMER_FIELD,e.putCustomerFieldRequest());case 1:_t70=_context86.v;this.getCustomerResponse(_t70,r,n);_context86.n=3;break;case 2:p.isFunction(n)&&n(m.showError(d,d.ErrorCode.BAD_REQUEST_SERVER_ERROR));case 3:return _context86.a(2);}},_callee86,this);}));function putCustomerField(_x97,_x98,_x99){return _putCustomerField.apply(this,arguments);}return putCustomerField;}()},{key:"deleteCustomerField",value:function(){var _deleteCustomerField=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee87(e,r,n){var _t71;return _regenerator2().w(function(_context87){while(1)switch(_context87.n){case 0:if(!(s.isAppKeyFormat()&&s.isValidFormat(t.getExternalId()))){_context87.n=2;break;}_context87.n=1;return this["delete"](this.ENDPOINT_CUSTOMER_FIELD,e.deleteCustomerFieldRequest());case 1:_t71=_context87.v;this.getCustomerResponse(_t71,r,n);_context87.n=3;break;case 2:p.isFunction(n)&&n(m.showError(d,d.ErrorCode.BAD_REQUEST_SERVER_ERROR));case 3:return _context87.a(2);}},_callee87,this);}));function deleteCustomerField(_x100,_x101,_x102){return _deleteCustomerField.apply(this,arguments);}return deleteCustomerField;}()},{key:"postCustomerLink",value:function(){var _postCustomerLink=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee88(e,r,n){var _t72;return _regenerator2().w(function(_context88){while(1)switch(_context88.n){case 0:if(!(s.isValidFormatRequest()&&s.isValidFormat(t.getExternalId()))){_context88.n=2;break;}_context88.n=1;return this.post(this.ENDPOINT_CUSTOMER_LINK,e.postAndDeleteCustomerLinkRequest());case 1:_t72=_context88.v;this.getCustomerResponse(_t72,r,n);_context88.n=3;break;case 2:p.isFunction(n)&&n(m.showError(d,d.ErrorCode.BAD_REQUEST_SERVER_ERROR));case 3:return _context88.a(2);}},_callee88,this);}));function postCustomerLink(_x103,_x104,_x105){return _postCustomerLink.apply(this,arguments);}return postCustomerLink;}()},{key:"deleteCustomerLink",value:function(){var _deleteCustomerLink=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee89(e,r,n){var _t73;return _regenerator2().w(function(_context89){while(1)switch(_context89.n){case 0:if(!(s.isValidFormatRequest()&&s.isValidFormat(t.getExternalId()))){_context89.n=2;break;}_context89.n=1;return this["delete"](this.ENDPOINT_CUSTOMER_LINK,e.postAndDeleteCustomerLinkRequest());case 1:_t73=_context89.v;this.getCustomerResponse(_t73,r,n);_context89.n=3;break;case 2:p.isFunction(n)&&n(m.showError(d,d.ErrorCode.BAD_REQUEST_SERVER_ERROR));case 3:return _context89.a(2);}},_callee89,this);}));function deleteCustomerLink(_x106,_x107,_x108){return _deleteCustomerLink.apply(this,arguments);}return deleteCustomerLink;}()},{key:"getCustomerResponse",value:function(){var _getCustomerResponse=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee90(e,t,r){return _regenerator2().w(function(_context90){while(1)switch(_context90.n){case 0:e&&!(e instanceof y)&&e.statusCode>=200&&e.statusCode<300?p.isFunction(t)&&(""!=e.data?t(e.data):t()):e?p.isFunction(r)&&r(e):p.isFunction(r)&&r();case 1:return _context90.a(2);}},_callee90);}));function getCustomerResponse(_x109,_x110,_x111){return _getCustomerResponse.apply(this,arguments);}return getCustomerResponse;}()},{key:"postCustomJourneyEvent",value:function(){var _postCustomJourneyEvent=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee91(e,r,n){var _t74;return _regenerator2().w(function(_context91){while(1)switch(_context91.n){case 0:if(!(s.isValidFormatRequest()&&s.isValidFormat(t.getExternalId()))){_context91.n=2;break;}_context91.n=1;return this.post(this.ENDPOINT_CUSTOMER_EVENT_JOURNEY,e.postCustomEventRequest());case 1:_t74=_context91.v;this.getCustomerResponse(_t74,r,n);_context91.n=3;break;case 2:p.isFunction(n)&&n(m.showError(d,d.ErrorCode.BAD_REQUEST_SERVER_ERROR));case 3:return _context91.a(2);}},_callee91,this);}));function postCustomJourneyEvent(_x112,_x113,_x114){return _postCustomJourneyEvent.apply(this,arguments);}return postCustomJourneyEvent;}()}]);}(E))(),v=r(315).Core.Api.BaseEventRequest,_=r(315).Core.Models.Device;var g=/*#__PURE__*/function(_v){function g(){var _this16;_classCallCheck2(this,g);_this16=_callSuper2(this,g),null!=t.getExternalId()&&(_this16.customerId=t.getExternalId());return _this16;}_inherits2(g,_v);return _createClass2(g,[{key:"postCustomEventRequest",value:function postCustomEventRequest(){return this.params="",this.body=this.createCustomEventBodyJson(),this;}},{key:"createCustomEventBodyJson",value:function createCustomEventBodyJson(){var e={};try{e.customData=this.customData,e.eventType=this.eventType,e.externalCode=this.customerId,e.eventId=this.eventId,e.eventAt=this.eventAt;}catch(e){console.log("Error creating custom event request: "+e);}return e;}},{key:"setEventType",value:function setEventType(e){this.eventType=e;}},{key:"setCustomData",value:function setCustomData(e){this.customData=e;}}]);}(v),b=r(315).Core.Api.BaseRequest,S=r(315).Core.Models.Device;var O=/*#__PURE__*/function(_b){function O(){var _this17;_classCallCheck2(this,O);_this17=_callSuper2(this,O),_this17.device=new S(),null!=t.getExternalId()&&(_this17.customerId=t.getExternalId()),_this17.fieldNames,_this17.link,_this17.fields,_this17.eventType,_this17.customData;return _this17;}_inherits2(O,_b);return _createClass2(O,[{key:"getCustomerRequest",value:function getCustomerRequest(){return this.params=this.createQueryStringCustomerId(),this;}},{key:"getCustomerFieldRequest",value:function getCustomerFieldRequest(){return this.params=this.createQueryString(),this;}},{key:"putCustomerFieldRequest",value:function putCustomerFieldRequest(){return this.params=this.createQueryStringCustomerId(),this.body=this.createBodyJson(),this;}},{key:"deleteCustomerFieldRequest",value:function deleteCustomerFieldRequest(){return this.params=this.createQueryStringCustomerId(),this.body=this.createDeleteBodyJson(),this;}},{key:"postAndDeleteCustomerLinkRequest",value:function postAndDeleteCustomerLinkRequest(){return this.params="",this.body=this.createBodyJson(),this;}},{key:"createQueryString",value:function createQueryString(){var e="";return e+=this.createQueryStringCustomerId(),this.fieldNames&&(e+="&".concat(this.PARAM_CUSTOMER_FIELD_NAMES,"=").concat(this.fieldNames)),this.fields&&(e+="&".concat(this.PARAM_CUSTOMER_FIELDS,"=").concat(this.fields)),this.link&&(e+="&".concat(this.PARAM_CUSTOMER_LINK,"=").concat(this.link)),e;}},{key:"createQueryStringCustomerId",value:function createQueryStringCustomerId(){return this.PARAM_CUSTOMER_ID+"="+this.customerId;}},{key:"createBodyJson",value:function createBodyJson(){var e={};try{this.channel&&"none"!=this.channel&&(e.channel=this.channel,this.device&&this.device.deviceId&&(e.deviceId=this.device.deviceId),this.customerId&&(e.customerId=this.customerId)),this.link&&(e.link=this.link),this.fields&&(e=this.fields);}catch(e){console.log("Error fieldNames request :"+e);}return e;}},{key:"createDeleteBodyJson",value:function createDeleteBodyJson(){var e={},t=[];try{if(this.fieldNames){for(var _e18=0;_e18<this.fieldNames.length;_e18++)t.push(this.fieldNames[_e18]);e.fields=t;}}catch(e){console.log("Error fieldNames request :"+e);}return e;}},{key:"setFields",value:function setFields(e){this.fields=e;}},{key:"setFieldNames",value:function setFieldNames(e){this.fieldNames=e;}},{key:"setLink",value:function setLink(e){this.link=e;}},{key:"setChannel",value:function setChannel(e){this.channel=e;}},{key:"setEventType",value:function setEventType(e){this.eventType=e;}},{key:"setCustomData",value:function setCustomData(e){this.customData=e;}}]);}(b),_r$Core$Utils3=r(315).Core.Utils,R=_r$Core$Utils3.CommonUtils,T=_r$Core$Utils3.ErrorUtils;var P=/*#__PURE__*/function(){function P(){_classCallCheck2(this,P);}return _createClass2(P,null,[{key:"getCustomer",value:function(){var _getCustomer2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee92(e,t){var r;return _regenerator2().w(function(_context92){while(1)switch(_context92.n){case 0:r=new O();_context92.n=1;return I.getCustomer(r,e,t);case 1:return _context92.a(2);}},_callee92);}));function getCustomer(_x115,_x116){return _getCustomer2.apply(this,arguments);}return getCustomer;}()},{key:"getCustomerInformation",value:function(){var _getCustomerInformation=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee93(e,t,r){var n;return _regenerator2().w(function(_context93){while(1)switch(_context93.n){case 0:n=new O();null!=e&&(Array.isArray(e)?n.setFieldNames(e):R.isFunction(r)&&r(T.showError(d,d.ErrorCode.CUSTOMER_ERROR_PARAMS)));_context93.n=1;return I.getCustomerField(n,t,r);case 1:return _context93.a(2);}},_callee93);}));function getCustomerInformation(_x117,_x118,_x119){return _getCustomerInformation.apply(this,arguments);}return getCustomerInformation;}()},{key:"assignOrUpdateValueToCustomerFields",value:function(){var _assignOrUpdateValueToCustomerFields=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee94(e,t,r){var n,_e19;return _regenerator2().w(function(_context94){while(1)switch(_context94.n){case 0:try{"string"==typeof e?n=JSON.parse(n):"object"==_typeof2(e)&&(n=e);}catch(e){R.isFunction(r)&&r(T.showError(d,d.ErrorCode.CUSTOMER_ERROR_PARAMS,e));}if(!n){_context94.n=2;break;}_e19=new O();_e19.setFields(n);_context94.n=1;return I.putCustomerField(_e19,t,r);case 1:_context94.n=3;break;case 2:R.isFunction(r)&&r(T.showError(d,d.ErrorCode.CUSTOMER_ERROR_PARAMS));case 3:return _context94.a(2);}},_callee94);}));function assignOrUpdateValueToCustomerFields(_x120,_x121,_x122){return _assignOrUpdateValueToCustomerFields.apply(this,arguments);}return assignOrUpdateValueToCustomerFields;}()},{key:"deleteValuesFromCustomerFields",value:function(){var _deleteValuesFromCustomerFields=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee95(e,t,r){var n;return _regenerator2().w(function(_context95){while(1)switch(_context95.n){case 0:if(!Array.isArray(e)){_context95.n=2;break;}n=new O();n.setFieldNames(e);_context95.n=1;return I.deleteCustomerField(n,t,r);case 1:_context95.n=3;break;case 2:R.isFunction(r)&&r(T.showError(d,d.ErrorCode.CUSTOMER_ERROR_PARAMS));case 3:return _context95.a(2);}},_callee95);}));function deleteValuesFromCustomerFields(_x123,_x124,_x125){return _deleteValuesFromCustomerFields.apply(this,arguments);}return deleteValuesFromCustomerFields;}()},{key:"link",value:function(){var _link=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee96(e,t,r){var n;return _regenerator2().w(function(_context96){while(1)switch(_context96.n){case 0:if(!("none"===e)){_context96.n=1;break;}return _context96.a(2,void(R.isFunction(r)&&r(T.showError(d,d.ErrorCode.DISABLED_CHANNEL))));case 1:n=new O();n.setChannel(e);_context96.n=2;return I.postCustomerLink(n,t,r);case 2:return _context96.a(2);}},_callee96);}));function link(_x126,_x127,_x128){return _link.apply(this,arguments);}return link;}()},{key:"unlink",value:function(){var _unlink=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee97(e,t,r){var n;return _regenerator2().w(function(_context97){while(1)switch(_context97.n){case 0:if(!("none"==e)){_context97.n=1;break;}return _context97.a(2,void(R.isFunction(r)&&r(T.showError(d,d.ErrorCode.DISABLED_CHANNEL))));case 1:n=new O();n.setChannel(e);_context97.n=2;return I.deleteCustomerLink(n,t,r);case 2:return _context97.a(2);}},_callee97);}));function unlink(_x129,_x130,_x131){return _unlink.apply(this,arguments);}return unlink;}()},{key:"sendCustomerCustomEvent",value:function(){var _sendCustomerCustomEvent=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee98(e,t){var r,n,i,o,s,a,_e20,_args81=arguments;return _regenerator2().w(function(_context98){while(1)switch(_context98.n){case 0:r=_args81.length>2&&_args81[2]!==undefined?_args81[2]:null;n=_args81.length>3&&_args81[3]!==undefined?_args81[3]:null;i=_args81.length>4?_args81[4]:undefined;o=_args81.length>5?_args81[5]:undefined;try{"string"==typeof t?s=JSON.parse(t):"object"==_typeof2(t)&&(s=t),"string"==typeof e&&(a=e);}catch(e){R.isFunction(o)&&o(T.showError(d,d.ErrorCode.CUSTOMER_ERROR_PARAMS));}if(!(s&&a)){_context98.n=2;break;}_e20=new g();_e20.setCustomData(s);_e20.setEventType(a);_e20.setEventId(r);_e20.setEventAt(n);_context98.n=1;return I.postCustomJourneyEvent(_e20,i,o);case 1:_context98.n=3;break;case 2:R.isFunction(o)&&o(T.showError(d,d.ErrorCode.CUSTOMER_ERROR_PARAMS));case 3:return _context98.a(2);}},_callee98);}));function sendCustomerCustomEvent(_x132,_x133){return _sendCustomerCustomEvent.apply(this,arguments);}return sendCustomerCustomEvent;}()}]);}();}(),n;}();});/***/},/***/960:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={};Object.defineProperty(exports,"default",{enumerable:true,get:function get(){return _customerMin["default"];}});var _customerMin=_interopRequireWildcard(__webpack_require__(740));Object.keys(_customerMin).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_customerMin[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _customerMin[key];}});});function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,"default":e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}/***/},/***/126:function _(module){/*! For license information please see inapp.min.js.LICENSE.txt */!function(e,t){if(true)module.exports=t();else// removed by dead control flow
221
+ {var i,n;}}(this,function(){return function(){var e={710:function _(e){var t;t=function t(){return function(_Class3){"use strict";var e={330:function _(e){e.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.16.6","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"}}');}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports;}n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]});},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t);},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0});};var i={};n.r(i),n.d(i,{"default":function _default(){return W;}});var r={};n.r(r),n.d(r,{BaseApplicationRequest:function BaseApplicationRequest(){return O;},BaseClient:function BaseClient(){return P;},BaseEventRequest:function BaseEventRequest(){return w;},BaseRequest:function BaseRequest(){return T;}});var s={};n.r(s),n.d(s,{Channel:function Channel(){return N;},CoreApplication:function CoreApplication(){return U;},Device:function Device(){return C;},DeviceStatus:function DeviceStatus(){return D;},EncryptionType:function EncryptionType(){return I;},ErrorDictionary:function ErrorDictionary(){return v;},ErrorModel:function ErrorModel(){return g;},EventType:function EventType(){return L;},TopicSubscribeType:function TopicSubscribeType(){return M;}});var o={};n.r(o),n.d(o,{CommonUtils:function CommonUtils(){return b;},CorePermissions:function CorePermissions(){return k;},CryptoUtils:function CryptoUtils(){return $;},DateUtils:function DateUtils(){return R;},ErrorUtils:function ErrorUtils(){return S;},JsonUtils:function JsonUtils(){return j;},Log:function Log(){return m;},LogLevel:function LogLevel(){return _;},TopicUtils:function TopicUtils(){return x;},Validations:function Validations(){return Y;}});var a={platform:"webpush",version:"0.0.1"};var l=n(330);a.version=l.version;var 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"}}),u=new(/*#__PURE__*/function(){function _class1(){_classCallCheck2(this,_class1);this.storage=this.isLocalStorageAvailable()?window.localStorage:null;}return _createClass2(_class1,[{key:"isLocalStorageAvailable",value:function isLocalStorageAvailable(){try{var _e21=window.localStorage,_t75="__storage_test__";if(_e21)return _e21.setItem(_t75,_t75),_e21.removeItem(_t75),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==u.length;}return!1;}},{key:"setItem",value:function setItem(e,t){return null!=this.storage&&(this.storage.setItem(e,t),!0);}},{key:"getItem",value:function getItem(e){return null!=this.storage?this.storage.getItem(e):null;}},{key:"deleteItem",value:function deleteItem(e){return!!this.storage&&(this.storage.setItem(e,value),!0);}},{key:"clear",value:function clear(){this.storage&&this.storage.clear();}}]);}())(),d=u,p=new(/*#__PURE__*/function(){function _class10(){_classCallCheck2(this,_class10);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;}return _createClass2(_class10,[{key:"getDB",value:function(){var _getDB4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee99(){var _this18=this;return _regenerator2().w(function(_context99){while(1)switch(_context99.n){case 0:return _context99.a(2,new Promise(function(e,t){var n=_this18.IDB;if(n){var _i14=n.open("indigitall.indexedDB",1);_i14.onupgradeneeded=function(){_i14.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key");},_i14.onsuccess=function(){var t=_i14.result,n=t.transaction("indigitallStore","readwrite"),r=n.objectStore("indigitallStore"),s=r.index("storeIndex");e({db:t,tx:n,store:r,index:s});},_i14.onerror=function(e){t(e);};}else t(!1);}));}},_callee99);}));function getDB(){return _getDB4.apply(this,arguments);}return getDB;}()},{key:"get",value:function(){var _get6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee100(e,t){var _this19=this;return _regenerator2().w(function(_context100){while(1)switch(_context100.n){case 0:return _context100.a(2,new Promise(function(n,i){e||i(!1),e.index.get(t).onsuccess=function(t){t.target.result&&(_this19.close(e),n(t.target.result.store.value)),i(!1);};}));}},_callee100);}));function get(_x134,_x135){return _get6.apply(this,arguments);}return get;}()},{key:"put",value:function(){var _put6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee101(e,t,n){var _this20=this;return _regenerator2().w(function(_context101){while(1)switch(_context101.n){case 0:return _context101.a(2,new Promise(function(i,r){e||r(!1),e.store.put({store:{key:t,value:n}},t).onsuccess=function(t){_this20.close(e),i(n);};}));}},_callee101);}));function put(_x136,_x137,_x138){return _put6.apply(this,arguments);}return put;}()},{key:"close",value:function close(e){if(e.tx)try{e.tx.oncomplete=function(){e.db.close();};}catch(e){console.log(this.TAG,e);}}},{key:"setItem",value:function(){var _setItem4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee102(e,t){var _n1,_t76;return _regenerator2().w(function(_context102){while(1)switch(_context102.p=_context102.n){case 0:_context102.p=0;_context102.n=1;return this.getDB();case 1:_n1=_context102.v;return _context102.a(2,this.put(_n1,e,t));case 2:_context102.p=2;_t76=_context102.v;return _context102.a(2,_t76);}},_callee102,this,[[0,2]]);}));function setItem(_x139,_x140){return _setItem4.apply(this,arguments);}return setItem;}()},{key:"getItem",value:function(){var _getItem4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee103(e){var _t77,_t78;return _regenerator2().w(function(_context103){while(1)switch(_context103.p=_context103.n){case 0:_context103.p=0;_context103.n=1;return this.getDB();case 1:_t77=_context103.v;return _context103.a(2,this.get(_t77,e));case 2:_context103.p=2;_t78=_context103.v;return _context103.a(2,_t78);}},_callee103,this,[[0,2]]);}));function getItem(_x141){return _getItem4.apply(this,arguments);}return getItem;}()}]);}())(),h=new(/*#__PURE__*/function(){function _class11(){_classCallCheck2(this,_class11);this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null;}return _createClass2(_class11,[{key:"isSessionStorageAvailable",value:function isSessionStorageAvailable(){try{var _e22=window.sessionStorage,_t79="__storage_test__";if(_e22)return _e22.setItem(_t79,_t79),_e22.removeItem(_t79),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==h.length;}return!1;}},{key:"getItem",value:function getItem(e){return null!=this.session?this.session.getItem(e):null;}},{key:"setItem",value:function setItem(e,t){return null!=this.session&&(this.session.setItem(e,t),!0);}},{key:"clearMessages",value:function clearMessages(){this.session&&this.session.removeItem("messages");}}]);}())(),f=h,I=Object.freeze({RAW:"raw",HASH:"hash"}),E=/*#__PURE__*/function(){function E(){_classCallCheck2(this,E);this.storage=d,this.db=p,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.TIMEOUT_REQUESTS=this.REPOSITORY+".TIMEOUT_REQUESTS",this.ENCRYPTION_TYPE=this.REPOSITORY+".ENCRYPTION_TYPE",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";}return _createClass2(E,[{key:"setItemSessionStorage",value:function setItemSessionStorage(e,t){f.setItem(e,t);}},{key:"getItemSessionStorage",value:function getItemSessionStorage(e){return f.getItem(e);}},{key:"clearSessionStorage",value:function clearSessionStorage(){f.clearMessages();}},{key:"setStorage",value:function setStorage(e,t){d.setItem(e,t);}},{key:"getStorage",value:function getStorage(e){return d.getItem(e);}},{key:"clearStorage",value:function clearStorage(){d.clear();}},{key:"setBrowserPublicKey",value:function setBrowserPublicKey(e){d.setItem(this.BROWSER_PUBLIC_KEY,e);}},{key:"getBrowserPublicKey",value:function getBrowserPublicKey(){return d.getItem(this.BROWSER_PUBLIC_KEY);}},{key:"setBrowserPrivateKey",value:function setBrowserPrivateKey(e){d.setItem(this.BROWSER_PRIVATE_KEY,e);}},{key:"getBrowserPrivateKey",value:function getBrowserPrivateKey(){return d.getItem(this.BROWSER_PRIVATE_KEY);}},{key:"setAppKey",value:function(){var _setAppKey4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee104(e){var _t80;return _regenerator2().w(function(_context104){while(1)switch(_context104.n){case 0:d.setItem(this.APP_KEY,e);_t80=p&&p.IDB;if(!_t80){_context104.n=1;break;}_context104.n=1;return p.setItem(this.APP_KEY,e);case 1:return _context104.a(2);}},_callee104,this);}));function setAppKey(_x142){return _setAppKey4.apply(this,arguments);}return setAppKey;}()},{key:"getAppKey",value:function getAppKey(){return d.getItem(this.APP_KEY);}},{key:"setDeviceId",value:function(){var _setDeviceId5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee105(e){var _t81;return _regenerator2().w(function(_context105){while(1)switch(_context105.n){case 0:this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,e);_t81=this.db&&this.db.IDB;if(!_t81){_context105.n=1;break;}_context105.n=1;return this.db.setItem(this.DEVICE_ID,e);case 1:return _context105.a(2);}},_callee105,this);}));function setDeviceId(_x143){return _setDeviceId5.apply(this,arguments);}return setDeviceId;}()},{key:"getDeviceId",value:function getDeviceId(){return this.getStorage(this.DEVICE_ID);}},{key:"getAppKeySync",value:function(){var _getAppKeySync4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee106(){return _regenerator2().w(function(_context106){while(1)switch(_context106.n){case 0:if(!(p&&p.IDB)){_context106.n=2;break;}_context106.n=1;return p.getItem(this.APP_KEY);case 1:return _context106.a(2,_context106.v);case 2:return _context106.a(2);}},_callee106,this);}));function getAppKeySync(){return _getAppKeySync4.apply(this,arguments);}return getAppKeySync;}()},{key:"setVAPID",value:function setVAPID(e){d.setItem(this.VAPID_PUBLIC,e);}},{key:"getVAPID",value:function getVAPID(){return d.getItem(this.VAPID_PUBLIC);}},{key:"setEnabled",value:function setEnabled(e){d.setItem(this.ENABLED,e);}},{key:"getEnabled",value:function getEnabled(){return d.getItem(this.ENABLED);}},{key:"setServiceSyncTime",value:function setServiceSyncTime(e){d.setItem(this.SERVICE_SYNC_TIME,e*this.BASE_TIME);}},{key:"getServiceSyncTime",value:function getServiceSyncTime(){return d.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME;}},{key:"setLocationEnabled",value:function setLocationEnabled(e){d.setItem(this.LOCATION_ENABLED,e);}},{key:"getLocationEnabled",value:function getLocationEnabled(){return d.getItem(this.LOCATION_ENABLED);}},{key:"setLocationUpdateMinutes",value:function setLocationUpdateMinutes(e){d.setItem(this.LOCATION_UPDATE_MINUTES,e);}},{key:"getLocationUpdateMinutes",value:function getLocationUpdateMinutes(){return d.getItem(this.LOCATION_UPDATE_MINUTES)||30;}},{key:"setRequestLocation",value:function(){var _setRequestLocation4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee107(e){return _regenerator2().w(function(_context107){while(1)switch(_context107.n){case 0:d.setItem(this.REQUEST_LOCATION,e);case 1:return _context107.a(2);}},_callee107,this);}));function setRequestLocation(_x144){return _setRequestLocation4.apply(this,arguments);}return setRequestLocation;}()},{key:"getRequestLocation",value:function getRequestLocation(){return!!d&&d.getItem(this.REQUEST_LOCATION);}},{key:"setPlatform",value:function(){var _setPlatform4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee108(e){return _regenerator2().w(function(_context108){while(1)switch(_context108.n){case 0:d.setItem(this.PLATFORM,e);case 1:return _context108.a(2);}},_callee108,this);}));function setPlatform(_x145){return _setPlatform4.apply(this,arguments);}return setPlatform;}()},{key:"getPlatform",value:function getPlatform(){return d&&d.getItem(this.PLATFORM)||c.platform;}},{key:"getVersion",value:function getVersion(){return c.version;}},{key:"setBrowserName",value:function(){var _setBrowserName4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee109(e){return _regenerator2().w(function(_context109){while(1)switch(_context109.n){case 0:d.setItem(this.BROWSER_NAME,e);case 1:return _context109.a(2);}},_callee109,this);}));function setBrowserName(_x146){return _setBrowserName4.apply(this,arguments);}return setBrowserName;}()},{key:"getBrowserName",value:function getBrowserName(){return d.getItem(this.BROWSER_NAME);}},{key:"setBrowserVersion",value:function setBrowserVersion(e){d.setItem(this.BROWSER_VERSION,e);}},{key:"getBrowserVersion",value:function getBrowserVersion(){return d.getItem(this.BROWSER_VERSION);}},{key:"setOsName",value:function(){var _setOsName4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee110(e){return _regenerator2().w(function(_context110){while(1)switch(_context110.n){case 0:d.setItem(this.OS_NAME,e);case 1:return _context110.a(2);}},_callee110,this);}));function setOsName(_x147){return _setOsName4.apply(this,arguments);}return setOsName;}()},{key:"getOsName",value:function getOsName(){return d.getItem(this.OS_NAME);}},{key:"setOsVersion",value:function setOsVersion(e){d.setItem(this.OS_VERSION,e);}},{key:"getOsVersion",value:function getOsVersion(){return d.getItem(this.OS_VERSION);}},{key:"setDeviceType",value:function setDeviceType(e){d.setItem(this.DEVICE_TYPE,e);}},{key:"getDeviceType",value:function getDeviceType(){return d.getItem(this.DEVICE_TYPE);}},{key:"setSupported",value:function setSupported(e){d.setItem(this.SUPPORTED,e);}},{key:"getSupported",value:function getSupported(){return d.getItem(this.SUPPORTED);}},{key:"setServiceTimestamp",value:function setServiceTimestamp(e){d.setItem(this.SERVICE_TIMESTAMP,e);}},{key:"getServiceTimestamp",value:function getServiceTimestamp(){return d.getItem(this.SERVICE_TIMESTAMP);}},{key:"setLocationTimestamp",value:function setLocationTimestamp(e){d.setItem(this.LOCATION_TIMESTAMP,e);}},{key:"getLocationTimestamp",value:function getLocationTimestamp(){return d.getItem(this.LOCATION_TIMESTAMP);}},{key:"setPermissionLocation",value:function setPermissionLocation(e){d.setItem(this.PERMISSION_LOCATION,e);}},{key:"getPermissionLocation",value:function getPermissionLocation(){return d.getItem(this.PERMISSION_LOCATION);}},{key:"setDebugLog",value:function setDebugLog(e){d.setItem(this.SET_LOG_DEBUG,e);}},{key:"getDebugLog",value:function getDebugLog(){return"false"!==d.getItem(this.SET_LOG_DEBUG);}},{key:"setLogLevel",value:function setLogLevel(e){d.setItem(this.LOG_LEVEL,e);}},{key:"getLogLevel",value:function getLogLevel(){return d.getItem(this.LOG_LEVEL);}},{key:"setNewUserTimestamp",value:function setNewUserTimestamp(e){d.setItem(this.NEW_USER_TIMESTAMP,e);}},{key:"getNewUserTimestamp",value:function getNewUserTimestamp(){return d.getItem(this.NEW_USER_TIMESTAMP);}},{key:"setExternalIdRequest",value:function(){var _setExternalIdRequest4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee111(e){var _t82;return _regenerator2().w(function(_context111){while(1)switch(_context111.n){case 0:d&&d.isLocalStorageAvailable()&&d.setItem(this.EXTERNAL_ID,e);_t82=p&&p.IDB;if(!_t82){_context111.n=1;break;}_context111.n=1;return p.setItem(this.EXTERNAL_ID,e);case 1:return _context111.a(2);}},_callee111,this);}));function setExternalIdRequest(_x148){return _setExternalIdRequest4.apply(this,arguments);}return setExternalIdRequest;}()},{key:"getExternalIdRequest",value:function(){var _getExternalIdRequest4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee112(){var e,_t83,_t84;return _regenerator2().w(function(_context112){while(1)switch(_context112.p=_context112.n){case 0:_context112.p=0;if(!(d&&d.isLocalStorageAvailable())){_context112.n=1;break;}e=d.getItem(this.EXTERNAL_ID);_context112.n=3;break;case 1:_t83=p&&p.IDB;if(!_t83){_context112.n=3;break;}_context112.n=2;return p.getItem(this.EXTERNAL_ID);case 2:e=_context112.v;case 3:_context112.n=5;break;case 4:_context112.p=4;_t84=_context112.v;case 5:return _context112.a(2,e);}},_callee112,this,[[0,4]]);}));function getExternalIdRequest(){return _getExternalIdRequest4.apply(this,arguments);}return getExternalIdRequest;}()},{key:"setExternalId",value:function setExternalId(e){d.setItem(this.EXTERNAL_ID,e);}},{key:"getExternalId",value:function getExternalId(){return d.getItem(this.EXTERNAL_ID);}},{key:"getRegisteredByCookie",value:function(){var _getRegisteredByCookie4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee113(){return _regenerator2().w(function(_context113){while(1)switch(_context113.n){case 0:return _context113.a(2,d.getItem(this.REGISTERED_BY_COOKIE));}},_callee113,this);}));function getRegisteredByCookie(){return _getRegisteredByCookie4.apply(this,arguments);}return getRegisteredByCookie;}()},{key:"setRegisteredByCookie",value:function(){var _setRegisteredByCookie4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee114(e){return _regenerator2().w(function(_context114){while(1)switch(_context114.n){case 0:d.setItem(this.REGISTERED_BY_COOKIE,e);case 1:return _context114.a(2);}},_callee114,this);}));function setRegisteredByCookie(_x149){return _setRegisteredByCookie4.apply(this,arguments);}return setRegisteredByCookie;}()},{key:"setLatitude",value:function setLatitude(e){d.setItem(this.LATITUDE,e);}},{key:"getLatitude",value:function getLatitude(){return d.getItem(this.LATITUDE);}},{key:"setLongitude",value:function setLongitude(e){d.setItem(this.LONGITUDE,e);}},{key:"getLongitude",value:function getLongitude(){return d.getItem(this.LONGITUDE);}},{key:"setInAppTopicList",value:function(){var _setInAppTopicList4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee115(e){var _t85;return _regenerator2().w(function(_context115){while(1)switch(_context115.n){case 0:_t85=this.db&&this.db.IDB;if(!_t85){_context115.n=1;break;}_context115.n=1;return this.db.setItem(this.INAPP_TOPICS,e);case 1:return _context115.a(2);}},_callee115,this);}));function setInAppTopicList(_x150){return _setInAppTopicList4.apply(this,arguments);}return setInAppTopicList;}()},{key:"getInAppTopicList",value:function(){var _getInAppTopicList4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee116(){var e,_t86,_t87;return _regenerator2().w(function(_context116){while(1)switch(_context116.p=_context116.n){case 0:_context116.p=0;_t86=this.db&&this.db.IDB;if(!_t86){_context116.n=2;break;}_context116.n=1;return this.db.getItem(this.INAPP_TOPICS);case 1:e=_context116.v;case 2:_context116.n=4;break;case 3:_context116.p=3;_t87=_context116.v;case 4:return _context116.a(2,e);}},_callee116,this,[[0,3]]);}));function getInAppTopicList(){return _getInAppTopicList4.apply(this,arguments);}return getInAppTopicList;}()},{key:"setTopicList",value:function(){var _setTopicList4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee117(e){var _t88;return _regenerator2().w(function(_context117){while(1)switch(_context117.n){case 0:_t88=this.db&&this.db.IDB;if(!_t88){_context117.n=1;break;}_context117.n=1;return this.db.setItem(this.TOPIC_LIST,e);case 1:return _context117.a(2);}},_callee117,this);}));function setTopicList(_x151){return _setTopicList4.apply(this,arguments);}return setTopicList;}()},{key:"getTopicList",value:function(){var _getTopicList4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee118(){var e,_t89,_t90;return _regenerator2().w(function(_context118){while(1)switch(_context118.p=_context118.n){case 0:_context118.p=0;_t89=this.db&&this.db.IDB;if(!_t89){_context118.n=2;break;}_context118.n=1;return this.db.getItem(this.TOPIC_LIST);case 1:e=_context118.v;case 2:_context118.n=4;break;case 3:_context118.p=3;_t90=_context118.v;case 4:return _context118.a(2,e);}},_callee118,this,[[0,3]]);}));function getTopicList(){return _getTopicList4.apply(this,arguments);}return getTopicList;}()},{key:"getUrlInappApi",value:function getUrlInappApi(){return this.getStorage(this.URL_INAPP_API);}},{key:"setUrlInappApi",value:function setUrlInappApi(e){this.setStorage(this.URL_INAPP_API,e);}},{key:"setInAppEnabled",value:function setInAppEnabled(e){this.setStorage(this.INAPP_ENABLED,e);}},{key:"isInAppEnabled",value:function isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED);}},{key:"setAvoidCypher",value:function setAvoidCypher(e){this.setStorage(this.AVOID_CYPHER,!0===e);}},{key:"isAvoidCypher",value:function isAvoidCypher(){return"true"===this.getStorage(this.AVOID_CYPHER);}},{key:"getUrlDeviceApi",value:function(){var _getUrlDeviceApi4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee119(){var e,_t91,_t92;return _regenerator2().w(function(_context119){while(1)switch(_context119.p=_context119.n){case 0:_context119.p=0;if(!(this.storage&&this.storage.isLocalStorageAvailable())){_context119.n=1;break;}e=this.getStorage(this.URL_DEVICE_API);_context119.n=3;break;case 1:_t91=this.db&&this.db.IDB;if(!_t91){_context119.n=3;break;}_context119.n=2;return this.db.getItem(this.URL_DEVICE_API);case 2:e=_context119.v;case 3:_context119.n=5;break;case 4:_context119.p=4;_t92=_context119.v;case 5:return _context119.a(2,e);}},_callee119,this,[[0,4]]);}));function getUrlDeviceApi(){return _getUrlDeviceApi4.apply(this,arguments);}return getUrlDeviceApi;}()},{key:"setUrlDeviceApi",value:function(){var _setUrlDeviceApi4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee120(e){var _t93;return _regenerator2().w(function(_context120){while(1)switch(_context120.n){case 0:this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,e);_t93=this.db&&this.db.IDB;if(!_t93){_context120.n=1;break;}_context120.n=1;return this.db.setItem(this.URL_DEVICE_API,e);case 1:return _context120.a(2);}},_callee120,this);}));function setUrlDeviceApi(_x152){return _setUrlDeviceApi4.apply(this,arguments);}return setUrlDeviceApi;}()},{key:"setPushDisabled",value:function setPushDisabled(e){this.setStorage(this.PUSH_DISABLED,e);}},{key:"isPushDisabled",value:function isPushDisabled(){return this.getStorage(this.PUSH_DISABLED);}},{key:"getConfigV2ServiceSyncTime",value:function getConfigV2ServiceSyncTime(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME);}},{key:"setConfigV2ServiceSyncTime",value:function setConfigV2ServiceSyncTime(e){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,e);}},{key:"getConfigV2",value:function getConfigV2(){return this.getStorage(this.CONFIG_V2);}},{key:"setConfigV2",value:function setConfigV2(e){this.setStorage(this.CONFIG_V2,e);}},{key:"getMaintenanceEnd",value:function getMaintenanceEnd(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY);}},{key:"setMaintenanceEnd",value:function setMaintenanceEnd(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,e);}},{key:"getMaintenanceStart",value:function getMaintenanceStart(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY);}},{key:"setMaintenanceStart",value:function setMaintenanceStart(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,e);}},{key:"getTimeoutRequestsInMilliseconds",value:function getTimeoutRequestsInMilliseconds(){return this.getStorage(this.TIMEOUT_REQUESTS);}},{key:"setTimeoutRequestsInMilliseconds",value:function setTimeoutRequestsInMilliseconds(e){this.setStorage(this.TIMEOUT_REQUESTS,e);}},{key:"getEncryptionType",value:function getEncryptionType(){var e=this.getStorage(this.ENCRYPTION_TYPE);return null===e?I.HASH:e;}},{key:"setEncryptionType",value:function setEncryptionType(e){this.setStorage(this.ENCRYPTION_TYPE,e);}}]);}(),_=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),y=_;var A=/*#__PURE__*/function(){function A(e){_classCallCheck2(this,A);this.tag="[IND]",e&&(this.tag=e),this.level=y.INFO,this.setLogLevel(new E().getLogLevel()),this.log=[];}return _createClass2(A,[{key:"setLogLevel",value:function setLogLevel(e){e&&e>=y.DEBUG&&e<=y.ERROR&&(this.level=e);}},{key:"d",value:function d(){if(this.level<=y.DEBUG)for(var _e23=0;_e23<arguments.length;_e23++)this.log+=A.addedAsString(arguments[_e23]);return this;}},{key:"i",value:function i(){if(this.level<=y.INFO)for(var _e24=0;_e24<arguments.length;_e24++)this.log+=A.addedAsString(arguments[_e24]);return this;}},{key:"w",value:function w(){if(this.level<=y.WARNING)for(var _e25=0;_e25<arguments.length;_e25++)this.log+=A.addedAsString(arguments[_e25]);return this;}},{key:"e",value:function e(){if(this.level<=y.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var _e26=0;_e26<arguments.length;_e26++)this.log+=A.addedAsString(arguments[_e26]);return this;}},{key:"writeLog",value:function writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[];}}],[{key:"addedAsString",value:function addedAsString(e){return"string"==typeof e?e:JSON.stringify(e,null,2);}}]);}();var m=A,g=/*#__PURE__*/_createClass2(function g(e,t,n){_classCallCheck2(this,g);this.errorCode=e,this.errorMessage=t,null!=n&&(this.exceptionMessage=n);}),v={ErrorCode:{GENERAL_ERROR:600,TIMEOUT_REQUEST:605,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",TIMEOUT_REQUEST:"connection timeout",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"}},S=new(/*#__PURE__*/function(){function _class12(){_classCallCheck2(this,_class12);}return _createClass2(_class12,[{key:"showError",value:function showError(e,t,n){if(null!=e){var _i15=Object.values(e.ErrorCode).indexOf(t);if(_i15>=0){var _t94=Object.keys(e.ErrorCode)[_i15],_r6=Object.values(e.ErrorCode)[_i15];return new g({code:_t94,errorId:_r6},Object.values(e.ErrorMessage)[_i15],n);}return new g(v.ErrorCode.GENERAL_ERROR,"general error",n);}}}]);}())(),P=/*#__PURE__*/function(){function P(){_classCallCheck2(this,P);this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE";}return _createClass2(P,[{key:"getURL",value:function(){var _getURL5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee121(){return _regenerator2().w(function(_context121){while(1)switch(_context121.n){case 0:return _context121.a(2,this.URL_BASE);}},_callee121,this);}));function getURL(){return _getURL5.apply(this,arguments);}return getURL;}()},{key:"call",value:function(){var _call4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee122(e,t,n,i){var r,s,o,_t95,_i16,_a4,_t96,_t97,_t98,_t99,_t100,_t101;return _regenerator2().w(function(_context122){while(1)switch(_context122.p=_context122.n){case 0:r=new m("[IND]BaseClient: ");n.isServiceWorkerRequest()&&r.setLogLevel(y.DEBUG);_context122.n=1;return this.getURL();case 1:_t97=_context122.v;_t98=n.getPath(t);_t99=_t97+_t98;_t100=n.getParams();s=_t99+_t100;n.isJourneyRequest()&&(s=s.replace("v1","v2"));o={method:e,headers:n.addHeaders()};e!==this.GET&&(o.body=JSON.stringify(n.getBody())),i&&(o.credentials=i);_context122.p=2;_t95=new AbortController();new E().getTimeoutRequestsInMilliseconds()&&0!=new E().getTimeoutRequestsInMilliseconds()&&(_i16=setTimeout(function(){return _t95.abort();},new E().getTimeoutRequestsInMilliseconds()),o.signal=_t95.signal);_context122.n=3;return fetch(s,o);case 3:_a4=_context122.v;if(!(_i16&&clearTimeout(_i16),304!=_a4.status)){_context122.n=5;break;}_context122.n=4;return _a4.json();case 4:_t96=_context122.v;return _context122.a(2,_a4.ok?(r.d("Method: "+e+"\nURL: "+s+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Response Code: "+_t96.statusCode+"\nResponse Message: "+_t96.message+"\nResponse Body:",JSON.stringify(_t96.data,null,"\t")).writeLog(),_t96):(r.d("Method: "+e+"\nURL: "+s+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Response Code: "+_t96.statusCode+"\nResponse Message: "+_t96.message+"\n").writeLog(),new g(_t96.statusCode,_t96.message)));case 5:return _context122.a(2,(r.d("Method: "+e+"\nURL: "+s+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Response Code: "+_a4.status+"\n").writeLog(),_a4));case 6:_context122.p=6;_t101=_context122.v;return _context122.a(2,"AbortError"===_t101.name?(r.d("Method: "+e+"\nURL: "+s+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Error: "+_t101).writeLog(),S.showError(v,v.ErrorCode.TIMEOUT_REQUEST,_t101)):(r.d("Method: "+e+"\nURL: "+s+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Error: "+_t101).writeLog(),S.showError(v,v.ErrorCode.GENERAL_ERROR,_t101)));}},_callee122,this,[[2,6]]);}));function call(_x153,_x154,_x155,_x156){return _call4.apply(this,arguments);}return call;}()},{key:"get",value:function(){var _get7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee123(e,t){return _regenerator2().w(function(_context123){while(1)switch(_context123.n){case 0:_context123.n=1;return this.call(this.GET,e,t);case 1:return _context123.a(2,_context123.v);}},_callee123,this);}));function get(_x157,_x158){return _get7.apply(this,arguments);}return get;}()},{key:"post",value:function(){var _post4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee124(e,t,n){return _regenerator2().w(function(_context124){while(1)switch(_context124.n){case 0:_context124.n=1;return this.call(this.POST,e,t,n);case 1:return _context124.a(2,_context124.v);}},_callee124,this);}));function post(_x159,_x160,_x161){return _post4.apply(this,arguments);}return post;}()},{key:"put",value:function(){var _put7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee125(e,t,n){return _regenerator2().w(function(_context125){while(1)switch(_context125.n){case 0:_context125.n=1;return this.call(this.PUT,e,t,n);case 1:return _context125.a(2,_context125.v);}},_callee125,this);}));function put(_x162,_x163,_x164){return _put7.apply(this,arguments);}return put;}()},{key:"delete",value:function(){var _delete5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee126(e,t){return _regenerator2().w(function(_context126){while(1)switch(_context126.n){case 0:_context126.n=1;return this.call(this.DELETE,e,t);case 1:return _context126.a(2,_context126.v);}},_callee126,this);}));function _delete(_x165,_x166){return _delete5.apply(this,arguments);}return _delete;}()}]);}(),T=/*#__PURE__*/function(){function T(){_classCallCheck2(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_EVENT_ID="eventId",this.PARAM_EVENT_AT="eventAt",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={};}return _createClass2(T,[{key:"getParams",value:function getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"");}},{key:"getBody",value:function getBody(){return this.body?this.body:"";}},{key:"getPath",value:function getPath(e){var _this21=this;var t=e;return Object.keys(this.pathParams).forEach(function(e){t=t.replace(e,_this21.pathParams[e]);}),t;}},{key:"addHeaders",value:function addHeaders(){var _this22=this;var e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach(function(t){e.append(t,_this22.headers[t]);}),e;}},{key:"isServiceWorkerRequest",value:function isServiceWorkerRequest(){return this.serviceWorkerRequest;}},{key:"setServiceWorkerRequest",value:function setServiceWorkerRequest(e){this.serviceWorkerRequest=e;}},{key:"isJourneyRequest",value:function isJourneyRequest(){return this.journeyRequest;}},{key:"setJourneyRequest",value:function setJourneyRequest(e){this.journeyRequest=e;}}]);}(),O=/*#__PURE__*/function(_T){function O(){var _this23;var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;_classCallCheck2(this,O);_this23=_callSuper2(this,O),_this23.PARAM_APPLICATION_CHANNEL="channel",_this23.channels=e;return _this23;}_inherits2(O,_T);return _createClass2(O,[{key:"getApplicationRequest",value:function getApplicationRequest(){return this.params=this.createQueryString(),this;}},{key:"createQueryString",value:function createQueryString(){var e="";if(this.channels&&this.channels.length>0)for(var _t102=0;_t102<this.channels.length;_t102++)e+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[_t102].toLowerCase(),"&");return e+="".concat(this.PARAM_PLATFORM,"=webpush"),e;}}]);}(T),b=/*#__PURE__*/function(){function b(){_classCallCheck2(this,b);}return _createClass2(b,null,[{key:"isServiceTimestampExceed",value:function isServiceTimestampExceed(){return!new E().getServiceTimestamp()||new E().getServiceSyncTime()<=(Date.now()-new E().getServiceTimestamp())/6e4;}},{key:"isFunction",value:function isFunction(e){return!(!e||"function"!=typeof e);}},{key:"generateUUID",value:function generateUUID(){var e=new m("[IND]CommonUtils: ");return"undefined"!=typeof crypto&&crypto.randomUUID?(e.d("Using crypto.randomUUID to generate UUID").writeLog(),crypto.randomUUID()):"undefined"!=typeof crypto&&crypto.getRandomValues?(e.d("Using crypto.getRandomValues to generate UUID").writeLog(),([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16);})):null;}}]);}(),R=(_Class3=/*#__PURE__*/function(){function R(){_classCallCheck2(this,R);}return _createClass2(R,null,[{key:"normalizeDateString",value:function normalizeDateString(e){if("number"==typeof e||e instanceof Date){var _t103=new Date(e);return isNaN(_t103.getTime())?null:this.formatCanonicalUTC(_t103);}if(!e||"string"!=typeof e)return null;var t=e.trim();if(this.isCanonicalFormat(t))return t;var n=this.tryToParseLeniently(t);return n?this.formatCanonicalUTC(n):null;}},{key:"isCanonicalFormat",value:function isCanonicalFormat(e){return /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(e);}},{key:"tryToParseLeniently",value:function tryToParseLeniently(e){var _iterator4=_createForOfIteratorHelper2(this.LENIENT_DATE_FORMATS),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var _t104=_step4.value;var _n10=this.parseByFormat(e,_t104);if(_n10&&!isNaN(_n10.getTime()))return _n10;}}catch(err){_iterator4.e(err);}finally{_iterator4.f();}return null;}},{key:"parseByFormat",value:function parseByFormat(e,t){switch(t){case"yyyy-MM-dd'T'HH:mm:ss.SSSZ":return new Date(e);case"yyyy-MM-dd'T'HH:mm:ssZ":return e.endsWith("Z")?new Date(e):new Date(e.replaceAll(/([+-]\d{2})(\d{2})$/g,"$1:$2"));case"yyyy-MM-dd'T'HH:mm:ss":return new Date(e+"Z");case"yyyy-MM-dd HH:mm:ss":return new Date(e.replaceAll(" ","T")+"Z");case"yyyy-MM-dd":return new Date(e+"T00:00:00Z");default:return null;}}},{key:"formatCanonicalUTC",value:function formatCanonicalUTC(e){return e.toISOString();}}]);}(),_defineProperty2(_Class3,"DATE_FORMAT_PATTERN","yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"),_defineProperty2(_Class3,"LENIENT_DATE_FORMATS",["yyyy-MM-dd'T'HH:mm:ss.SSSZ","yyyy-MM-dd'T'HH:mm:ssZ","yyyy-MM-dd'T'HH:mm:ss","yyyy-MM-dd HH:mm:ss","yyyy-MM-dd"]),_Class3),w=/*#__PURE__*/function(_T2){function w(){_classCallCheck2(this,w);return _callSuper2(this,w);}_inherits2(w,_T2);return _createClass2(w,[{key:"setEventId",value:function setEventId(e){this.eventId=e,null==e&&(this.eventId=b.generateUUID());}},{key:"setEventAt",value:function setEventAt(e){this.eventAt=e,null==e&&(this.eventAt=R.normalizeDateString(Date.now()));}}]);}(T),N=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"}),C=/*#__PURE__*/function(){function C(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var t=arguments.length>1?arguments[1]:undefined;_classCallCheck2(this,C);null==e?(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())):t?(e.enabled&&(this.enabled=e.enabled,new E().setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,new E().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();}return _createClass2(C,[{key:"getDeviceId",value:function getDeviceId(){return this.deviceId;}},{key:"setDeviceId",value:function setDeviceId(e){this.deviceId=e;}},{key:"setExternalCode",value:function setExternalCode(e){this.externalCode=e;}},{key:"toJSON",value:function toJSON(){var e={};return this.platform&&(e.platform=this.platform),this.version&&(e.version=this.version),this.productName&&(e.productName=this.productName),this.productVersion&&(e.productVersion=this.productVersion),this.browserName&&(e.browserName=this.browserName),this.browserVersion&&(e.browserVersion=this.browserVersion),this.osName&&(e.osName=this.osName),this.osVersion&&(e.osVersion=this.osVersion),this.deviceType&&(e.deviceType=this.deviceType),this.locale&&(e.locale=this.locale),this.timeZone&&(e.timeZome=this.timeZone),this.timeOffset&&(e.timeOffset=this.timeOffset),this.deviceId&&(e.deviceId=this.deviceId),this.enabled&&(e.enabled=this.enabled),this.browserPublicKey&&(e.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(e.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(e.externalCode=this.externalCode),e;}}]);}(),D=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),L=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"}),M=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),U=/*#__PURE__*/_createClass2(function U(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;_classCallCheck2(this,U);var n=new E();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 _i17=Date.now();if(e.serviceSyncTime?(this.serviceSyncTime=e.serviceSyncTime,_i17=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):_i17=new Date(Date.now()+36e5),!t){var _e27=_i17.toString();new m("[IND]CoreApplication").d("ServiceSyncTime defined on: "+_e27).writeLog(),n.setConfigV2ServiceSyncTime(_e27);}this.encryptionType=I.HASH,e.encryptionType&&(this.encryptionType=e.encryptionType),n.setEncryptionType(this.encryptionType);}}),k=/*#__PURE__*/function(){function k(){_classCallCheck2(this,k);}return _createClass2(k,null,[{key:"getLocationPermission",value:function(){var _getLocationPermission4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee127(){var e,t;return _regenerator2().w(function(_context127){while(1)switch(_context127.n){case 0:_context127.n=1;return this.getPermission("geolocation");case 1:e=_context127.v;t={};return _context127.a(2,(e&&(t.location=e.state),t));}},_callee127,this);}));function getLocationPermission(){return _getLocationPermission4.apply(this,arguments);}return getLocationPermission;}()},{key:"getPermission",value:function(){var _getPermission4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee128(e){var _t105;return _regenerator2().w(function(_context128){while(1)switch(_context128.p=_context128.n){case 0:_context128.p=0;if(!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){_context128.n=2;break;}_context128.n=1;return navigator.permissions.query({name:e,userVisibleOnly:!0});case 1:return _context128.a(2,_context128.v);case 2:_context128.n=4;break;case 3:_context128.p=3;_t105=_context128.v;return _context128.a(2,null);case 4:return _context128.a(2,null);}},_callee128,null,[[0,3]]);}));function getPermission(_x167){return _getPermission4.apply(this,arguments);}return getPermission;}()},{key:"setPermissionsCallback",value:function(){var _setPermissionsCallback4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee129(){return _regenerator2().w(function(_context129){while(1)switch(_context129.n){case 0:_context129.n=1;return this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 1:return _context129.a(2);}},_callee129,this);}));function setPermissionsCallback(){return _setPermissionsCallback4.apply(this,arguments);}return setPermissionsCallback;}()},{key:"setCallback",value:function(){var _setCallback4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee130(e,t){var n,_i18;return _regenerator2().w(function(_context130){while(1)switch(_context130.n){case 0:_context130.n=1;return this.getPermission(e);case 1:n=_context130.v;if(n){_i18=n.state;"onchange"in n&&(n.onchange=function(){new m("[IND]CorePermissions: ").d(e+" permission state has changed from "+_i18+" to "+n.state).writeLog(),_i18=n.state,t&&t({name:e,state:n.state});});}case 2:return _context130.a(2);}},_callee130,this);}));function setCallback(_x168,_x169){return _setCallback4.apply(this,arguments);}return setCallback;}()}]);}(),B=new m("[IND]Crypto"),V=new TextEncoder("utf-8"),F="HMAC",$=/*#__PURE__*/function(){function $(){_classCallCheck2(this,$);}return _createClass2($,null,[{key:"createHmac",value:function(){var _createHmac4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee131(e,t){var _n11,_window4,_i19,r,s,o,_t106;return _regenerator2().w(function(_context131){while(1)switch(_context131.p=_context131.n){case 0:_context131.p=0;_n11=t;if(!(!0===new E().isAvoidCypher()||new E().getEncryptionType()===I.RAW)){_context131.n=1;break;}return _context131.a(2,t);case 1:if(!(new E().getEncryptionType()===I.HASH)){_context131.n=5;break;}_i19=(_window4=window)===null||_window4===void 0||(_window4=_window4.crypto)===null||_window4===void 0?void 0:_window4.subtle;if(_i19){_context131.n=2;break;}return _context131.a(2);case 2:_context131.n=3;return _i19.importKey("raw",V.encode(e),{name:F,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 3:r=_context131.v;_context131.n=4;return _i19.sign(F,r,V.encode(t));case 4:s=_context131.v;o=new Uint8Array(s);_n11=Array.prototype.map.call(o,function(e){return("00"+e.toString(16)).slice(-2);}).join(""),B.d("hmac: ",_n11).writeLog();case 5:return _context131.a(2,_n11);case 6:_context131.p=6;_t106=_context131.v;return _context131.a(2,void B.e("error:",_t106).writeLog());}},_callee131,null,[[0,6]]);}));function createHmac(_x170,_x171){return _createHmac4.apply(this,arguments);}return createHmac;}()}]);}(),j=/*#__PURE__*/function(){function j(){_classCallCheck2(this,j);}return _createClass2(j,null,[{key:"compareJSON",value:function compareJSON(e,t){var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var _i20=0,_n12=n;_i20<_n12.length;_i20++){var _i21=_n12[_i20];if(e[_i21]!==t[_i21]){if("object"!=_typeof2(e[_i21])||"object"!=_typeof2(t[_i21]))return!1;if(!isEqual(e[_i21],t[_i21]))return!1;}}return!0;}}]);}(),Y=/*#__PURE__*/function(){function Y(){_classCallCheck2(this,Y);}return _createClass2(Y,null,[{key:"isValidFormat",value:function isValidFormat(e){return null!=e&&""!=e&&"null"!=e&&e.length>8;}}]);}(),x=/*#__PURE__*/function(){function x(){_classCallCheck2(this,x);}return _createClass2(x,null,[{key:"setTopicChannel",value:function setTopicChannel(e,t){var n=[];for(var _i22=0;_i22<e.length;_i22++){var r=e[_i22];r.channel=t,n.push(r);}return n;}}]);}(),W={Repository:E,Config:c,Api:r,Models:s,Utils:o};return i;}();},e.exports=t();},315:function _(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},i(e);}Object.defineProperty(t,"__esModule",{value:!0});var r={Core:!0};Object.defineProperty(t,"Core",{enumerable:!0,get:function get(){return a["default"];}}),Object.defineProperty(t,"default",{enumerable:!0,get:function get(){return s["default"];}});var s=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap(),r=new WeakMap();return function(e,t){if(!t&&e&&e.__esModule)return e;var s,o,a={__proto__:null,"default":e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return a;if(s=t?r:n){if(s.has(e))return s.get(e);s.set(e,a);}for(var l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((o=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(o.get||o.set)?s(a,l,o):a[l]=e[l]);return a;}(e,t);}(n(710));Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function get(){return s[e];}}));});var o,a=(o=n(610))&&o.__esModule?o:{"default":o};},468:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=c(n(254)),r=c(n(234)),s=c(n(457)),o=c(n(735)),a=c(n(630)),l=c(n(291));function c(e){return e&&e.__esModule?e:{"default":e};}function u(e){return u="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},u(e);}function d(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function s(n,i,r,s){var l=i&&i.prototype instanceof a?i:a,c=Object.create(l.prototype);return _p(c,"_invoke",function(n,i,r){var s,a,l,c=0,u=r||[],d=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function d(t,n){return s=t,a=0,l=e,p.n=n,o;}};function h(n,i){for(a=n,l=i,t=0;!d&&c&&!r&&t<u.length;t++){var r,s=u[t],h=p.p,f=s[2];n>3?(r=f===i)&&(l=s[(a=s[4])?5:(a=3,3)],s[4]=s[5]=e):s[0]<=h&&((r=n<2&&h<s[1])?(a=0,p.v=i,p.n=s[1]):h<f&&(r=n<3||s[0]>i||i>f)&&(s[4]=n,s[5]=i,p.n=f,a=0));}if(r||n>1)return o;throw d=!0,i;}return function(r,u,f){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,f),a=u,l=f;(t=a<2?e:l)||!d;){s||(a?a<3?(a>1&&(p.n=-1),h(a,l)):p.n=l:p.v=l);try{if(c=2,s){if(a||(r="next"),t=s[r]){if(!(t=t.call(s,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,a<2&&(a=0);}else 1===a&&(t=s["return"])&&t.call(s),a<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),a=1);s=e;}else if((t=(d=p.n<0)?l:n.call(i,p))!==o)break;}catch(t){s=e,a=1,l=t;}finally{c=1;}}return{value:t,done:d};};}(n,r,s),!0),c;}var o={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][i]?t(t([][i]())):(_p(t={},i,function(){return this;}),t),h=c.prototype=a.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_p(e,r,"GeneratorFunction")),e.prototype=Object.create(h),e;}return l.prototype=c,_p(h,"constructor",c),_p(c,"constructor",l),l.displayName="GeneratorFunction",_p(c,r,"GeneratorFunction"),_p(h),_p(h,r,"Generator"),_p(h,i,function(){return this;}),_p(h,"toString",function(){return"[object Generator]";}),(d=function d(){return{w:s,m:f};})();}function _p(e,t,n,i){var r=Object.defineProperty;try{r({},"",{});}catch(e){r=0;}_p=function p(e,t,n,i){function s(t,n){_p(e,t,function(e){return this._invoke(t,n,e);});}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(s("next",0),s("throw",1),s("return",2));},_p(e,t,n,i);}function h(e,t,n,i,r,s,o){try{var a=e[s](o),l=a.value;}catch(e){return void n(e);}a.done?t(l):Promise.resolve(l).then(i,r);}function f(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var s=e.apply(t,n);function o(e){h(s,i,r,o,a,"next",e);}function a(e){h(s,i,r,o,a,"throw",e);}o(void 0);});};}function I(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,E(i.key),i);}}function E(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=u(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==u(t)?t:t+"";}var _=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE";},t=[{key:"getURL",value:(_=f(d().m(function e(){return d().w(function(e){for(;;)if(0===e.n)return e.a(2,this.URL_BASE);},e,this);})),function(){return _.apply(this,arguments);})},{key:"call",value:(E=f(d().m(function e(t,n,c,u){var p,h,f,I,E,_,y,A,m,g,v,S;return d().w(function(e){for(;;)switch(e.p=e.n){case 0:return p=new i["default"]("[IND]BaseClient: "),c.isServiceWorkerRequest()&&p.setLogLevel(a["default"].DEBUG),e.n=1,this.getURL();case 1:return A=e.v,m=c.getPath(n),g=A+m,v=c.getParams(),h=g+v,c.isJourneyRequest()&&(h=h.replace("v1","v2")),f={method:t,headers:c.addHeaders()},t!==this.GET&&(f.body=JSON.stringify(c.getBody())),u&&(f.credentials=u),e.p=2,I=new AbortController(),new l["default"]().getTimeoutRequestsInMilliseconds()&&0!=new l["default"]().getTimeoutRequestsInMilliseconds()&&(E=setTimeout(function(){return I.abort();},new l["default"]().getTimeoutRequestsInMilliseconds()),f.signal=I.signal),e.n=3,fetch(h,f);case 3:if(_=e.v,E&&clearTimeout(E),304==_.status){e.n=6;break;}return e.n=4,_.json();case 4:if(y=e.v,!_.ok){e.n=5;break;}return p.d("Method: "+t+"\nURL: "+h+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\nResponse Body:",JSON.stringify(y.data,null,"\t")).writeLog(),e.a(2,y);case 5:return p.d("Method: "+t+"\nURL: "+h+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Response Code: "+y.statusCode+"\nResponse Message: "+y.message+"\n").writeLog(),e.a(2,new r["default"](y.statusCode,y.message));case 6:return p.d("Method: "+t+"\nURL: "+h+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Response Code: "+_.status+"\n").writeLog(),e.a(2,_);case 7:e.n=10;break;case 8:if(e.p=8,"AbortError"!==(S=e.v).name){e.n=9;break;}return p.d("Method: "+t+"\nURL: "+h+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Error: "+S).writeLog(),e.a(2,s["default"].showError(o["default"],o["default"].ErrorCode.TIMEOUT_REQUEST,S));case 9:return p.d("Method: "+t+"\nURL: "+h+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Error: "+S).writeLog(),e.a(2,s["default"].showError(o["default"],o["default"].ErrorCode.GENERAL_ERROR,S));case 10:return e.a(2);}},e,this,[[2,8]]);})),function(e,t,n,i){return E.apply(this,arguments);})},{key:"get",value:(h=f(d().m(function e(t,n){return d().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.GET,t,n);case 1:return e.a(2,e.v);}},e,this);})),function(e,t){return h.apply(this,arguments);})},{key:"post",value:(p=f(d().m(function e(t,n,i){return d().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.POST,t,n,i);case 1:return e.a(2,e.v);}},e,this);})),function(e,t,n){return p.apply(this,arguments);})},{key:"put",value:(u=f(d().m(function e(t,n,i){return d().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.PUT,t,n,i);case 1:return e.a(2,e.v);}},e,this);})),function(e,t,n){return u.apply(this,arguments);})},{key:"delete",value:(c=f(d().m(function e(t,n){return d().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.DELETE,t,n);case 1:return e.a(2,e.v);}},e,this);})),function(e,t){return c.apply(this,arguments);})}],t&&I(e.prototype,t),n&&I(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
222
+ var e,t,n,c,u,p,h,E,_;}();t["default"]=_;},545:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BaseApplicationRequest",{enumerable:!0,get:function get(){return s["default"];}}),Object.defineProperty(t,"BaseClient",{enumerable:!0,get:function get(){return i["default"];}}),Object.defineProperty(t,"BaseEventRequest",{enumerable:!0,get:function get(){return o["default"];}}),Object.defineProperty(t,"BaseRequest",{enumerable:!0,get:function get(){return r["default"];}});var i=a(n(468)),r=a(n(237)),s=a(n(773)),o=a(n(943));function a(e){return e&&e.__esModule?e:{"default":e};}},773:function _(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},i(e);}var r;function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,o(i.key),i);}}function o(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==i(t)?t:t+"";}function a(e,t,n){return t=c(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}(e);}(e,l()?Reflect.construct(t,n||[],c(e).constructor):t.apply(e,n));}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(e){}return(l=function l(){return!!e;})();}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e);},c(e);}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e;},u(e,t);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var d=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),(e=a(this,t)).PARAM_APPLICATION_CHANNEL="channel",e.channels=n,e;}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t);}(t,e),function(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}(t,[{key:"getApplicationRequest",value:function value(){return this.params=this.createQueryString(),this;}},{key:"createQueryString",value:function value(){var e="";if(this.channels&&this.channels.length>0)for(var t=0;t<this.channels.length;t++)e+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[t].toLowerCase(),"&");return e+="".concat(this.PARAM_PLATFORM,"=webpush");}}]);}(((r=n(237))&&r.__esModule?r:{"default":r})["default"]);t["default"]=d;},943:function _(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},i(e);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r=a(n(237)),s=a(n(622)),o=a(n(497));function a(e){return e&&e.__esModule?e:{"default":e};}function l(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,c(i.key),i);}}function c(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==i(t)?t:t+"";}function u(e,t,n){return t=p(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}(e);}(e,d()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n));}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(e){}return(d=function d(){return!!e;})();}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e);},p(e);}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e;},h(e,t);}var f=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),u(this,t);}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t);}(t,e),n=t,(i=[{key:"setEventId",value:function value(e){this.eventId=e,null==e&&(this.eventId=s["default"].generateUUID());}},{key:"setEventAt",value:function value(e){this.eventAt=e,null==e&&(this.eventAt=o["default"].normalizeDateString(Date.now()));}}])&&l(n.prototype,i),r&&l(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n;// removed by dead control flow
223
+ var n,i,r;}(r["default"]);t["default"]=f;},237:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i,r=(i=n(291))&&i.__esModule?i:{"default":i};function s(e){return s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},s(e);}function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,a(i.key),i);}}function a(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==s(t)?t:t+"";}var l=function(){return function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),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_EVENT_ID="eventId",this.PARAM_EVENT_AT="eventAt",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 r["default"]().getAppKey(),this.params=null,this.pathParams={},this.headers={};},[{key:"getParams",value:function value(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"");}},{key:"getBody",value:function value(){return this.body?this.body:"";}},{key:"getPath",value:function value(e){var t=this,n=e;return Object.keys(this.pathParams).forEach(function(e){n=n.replace(e,t.pathParams[e]);}),n;}},{key:"addHeaders",value:function value(){var e=this,t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach(function(n){t.append(n,e.headers[n]);}),t;}},{key:"isServiceWorkerRequest",value:function value(){return this.serviceWorkerRequest;}},{key:"setServiceWorkerRequest",value:function value(e){this.serviceWorkerRequest=e;}},{key:"isJourneyRequest",value:function value(){return this.journeyRequest;}},{key:"setJourneyRequest",value:function value(e){this.journeyRequest=e;}}]);}();t["default"]=l;},122:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i={platform:"webpush",version:"0.0.1"},r=n(904);i.version=r.version,i=Object.assign(i,{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")}});t["default"]=i;},610:function _(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},i(e);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r=u(n(122)),s=u(n(291)),o=c(n(545)),a=c(n(225)),l=c(n(628));function c(e,t){if("function"==typeof WeakMap)var n=new WeakMap(),r=new WeakMap();return(c=function c(e,t){if(!t&&e&&e.__esModule)return e;var s,o,a={__proto__:null,"default":e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return a;if(s=t?r:n){if(s.has(e))return s.get(e);s.set(e,a);}for(var l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((o=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(o.get||o.set)?s(a,l,o):a[l]=e[l]);return a;})(e,t);}function u(e){return e&&e.__esModule?e:{"default":e};}t["default"]={Repository:s["default"],Config:r["default"],Api:o,Models:a,Utils:l};},902:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.Channel=void 0;var n=t.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"});t["default"]=n;},174:function _(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},i(e);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r=a(n(291)),s=a(n(254)),o=a(n(164));function a(e){return e&&e.__esModule?e:{"default":e};}function l(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,u(i.key),i);}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}function u(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==i(t)?t:t+"";}var d=c(function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);var i=new r["default"]();if(null!=t){i.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,i.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,i.setMaintenanceEnd(this.maintenanceWindow.end))),t.networkEventsEnabled&&(this.networkEventsEnabled=t.networkEventsEnabled),t.networkUpdateMinutes&&(this.networkUpdateMinutes=t.networkUpdateMinutes);var a=Date.now();if(t.serviceSyncTime?(this.serviceSyncTime=t.serviceSyncTime,a=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):a=new Date(Date.now()+36e5),!n){var l=a.toString();new s["default"]("[IND]CoreApplication").d("ServiceSyncTime defined on: "+l).writeLog(),i.setConfigV2ServiceSyncTime(l);}this.encryptionType=o["default"].HASH,t.encryptionType&&(this.encryptionType=t.encryptionType),i.setEncryptionType(this.encryptionType);}});t["default"]=d;},395:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i,r=(i=n(291))&&i.__esModule?i:{"default":i};function s(e){return s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},s(e);}function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,a(i.key),i);}}function a(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==s(t)?t:t+"";}var l=function(){return function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),null==t?(this.browserPublicKey=new r["default"]().getBrowserPublicKey(),this.browserPrivateKey=new r["default"]().getBrowserPrivateKey(),this.platform=new r["default"]().getPlatform(),this.version=new r["default"]().getVersion(),this.browserName=new r["default"]().getBrowserName(),this.browserVersion=new r["default"]().getBrowserVersion(),this.osName=new r["default"]().getOsName(),this.osVersion=new r["default"]().getOsVersion(),this.deviceId=new r["default"]().getDeviceId(),this.deviceType=new r["default"]().getDeviceType(),new r["default"]().getEnabled()&&(this.enabled="true"===new r["default"]().getEnabled()),new r["default"]().getExternalId()&&(this.externalCode=new r["default"]().getExternalId())):n?(t.enabled&&(this.enabled=t.enabled,new r["default"]().setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,new r["default"]().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();},[{key:"getDeviceId",value:function value(){return this.deviceId;}},{key:"setDeviceId",value:function value(e){this.deviceId=e;}},{key:"setExternalCode",value:function value(e){this.externalCode=e;}},{key:"toJSON",value:function value(){var e={};return this.platform&&(e.platform=this.platform),this.version&&(e.version=this.version),this.productName&&(e.productName=this.productName),this.productVersion&&(e.productVersion=this.productVersion),this.browserName&&(e.browserName=this.browserName),this.browserVersion&&(e.browserVersion=this.browserVersion),this.osName&&(e.osName=this.osName),this.osVersion&&(e.osVersion=this.osVersion),this.deviceType&&(e.deviceType=this.deviceType),this.locale&&(e.locale=this.locale),this.timeZone&&(e.timeZome=this.timeZone),this.timeOffset&&(e.timeOffset=this.timeOffset),this.deviceId&&(e.deviceId=this.deviceId),this.enabled&&(e.enabled=this.enabled),this.browserPublicKey&&(e.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(e.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(e.externalCode=this.externalCode),e;}}]);}();t["default"]=l;},89:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});t["default"]=n;},164:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.EncryptionType=void 0;var n=t.EncryptionType=Object.freeze({RAW:"raw",HASH:"hash"});t["default"]=n;},735:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n={GENERAL_ERROR:600,TIMEOUT_REQUEST:605,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 i={ErrorCode:n,ErrorMessage:{GENERAL_ERROR:"General Error",TIMEOUT_REQUEST:"connection timeout",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"}};t["default"]=i;},234:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,s(i.key),i);}}function r(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}function s(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(function e(t,n,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.errorCode=t,this.errorMessage=n,null!=i&&(this.exceptionMessage=i);});t["default"]=o;},953:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n=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"});t["default"]=n;},72:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});t["default"]=n;},225:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Channel",{enumerable:!0,get:function get(){return i.Channel;}}),Object.defineProperty(t,"CoreApplication",{enumerable:!0,get:function get(){return u["default"];}}),Object.defineProperty(t,"Device",{enumerable:!0,get:function get(){return r["default"];}}),Object.defineProperty(t,"DeviceStatus",{enumerable:!0,get:function get(){return s["default"];}}),Object.defineProperty(t,"EncryptionType",{enumerable:!0,get:function get(){return d["default"];}}),Object.defineProperty(t,"ErrorDictionary",{enumerable:!0,get:function get(){return o["default"];}}),Object.defineProperty(t,"ErrorModel",{enumerable:!0,get:function get(){return a["default"];}}),Object.defineProperty(t,"EventType",{enumerable:!0,get:function get(){return l["default"];}}),Object.defineProperty(t,"TopicSubscribeType",{enumerable:!0,get:function get(){return c["default"];}});var i=n(902),r=p(n(395)),s=p(n(89)),o=p(n(735)),a=p(n(234)),l=p(n(953)),c=p(n(72)),u=p(n(174)),d=p(n(164));function p(e){return e&&e.__esModule?e:{"default":e};}},672:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(){var e,t,n="function"==typeof Symbol?Symbol:{},s=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,i,s,o){var a=i&&i.prototype instanceof c?i:c,u=Object.create(a.prototype);return _r7(u,"_invoke",function(n,i,r){var s,o,a,c=0,u=r||[],d=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function d(t,n){return s=t,o=0,a=e,p.n=n,l;}};function h(n,i){for(o=n,a=i,t=0;!d&&c&&!r&&t<u.length;t++){var r,s=u[t],h=p.p,f=s[2];n>3?(r=f===i)&&(a=s[(o=s[4])?5:(o=3,3)],s[4]=s[5]=e):s[0]<=h&&((r=n<2&&h<s[1])?(o=0,p.v=i,p.n=s[1]):h<f&&(r=n<3||s[0]>i||i>f)&&(s[4]=n,s[5]=i,p.n=f,o=0));}if(r||n>1)return l;throw d=!0,i;}return function(r,u,f){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,f),o=u,a=f;(t=o<2?e:a)||!d;){s||(o?o<3?(o>1&&(p.n=-1),h(o,a)):p.n=a:p.v=a);try{if(c=2,s){if(o||(r="next"),t=s[r]){if(!(t=t.call(s,a)))throw TypeError("iterator result is not an object");if(!t.done)return t;a=t.value,o<2&&(o=0);}else 1===o&&(t=s["return"])&&t.call(s),o<2&&(a=TypeError("The iterator does not provide a '"+r+"' method"),o=1);s=e;}else if((t=(d=p.n<0)?a:n.call(i,p))!==l)break;}catch(t){s=e,o=1,a=t;}finally{c=1;}}return{value:t,done:d};};}(n,s,o),!0),u;}var l={};function c(){}function u(){}function d(){}t=Object.getPrototypeOf;var p=[][s]?t(t([][s]())):(_r7(t={},s,function(){return this;}),t),h=d.prototype=c.prototype=Object.create(p);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,_r7(e,o,"GeneratorFunction")),e.prototype=Object.create(h),e;}return u.prototype=d,_r7(h,"constructor",d),_r7(d,"constructor",u),u.displayName="GeneratorFunction",_r7(d,o,"GeneratorFunction"),_r7(h),_r7(h,o,"Generator"),_r7(h,s,function(){return this;}),_r7(h,"toString",function(){return"[object Generator]";}),(i=function i(){return{w:a,m:f};})();}function _r7(e,t,n,i){var s=Object.defineProperty;try{s({},"",{});}catch(e){s=0;}_r7=function r(e,t,n,i){function o(t,n){_r7(e,t,function(e){return this._invoke(t,n,e);});}t?s?s(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(o("next",0),o("throw",1),o("return",2));},_r7(e,t,n,i);}function s(e,t,n,i,r,s,o){try{var a=e[s](o),l=a.value;}catch(e){return void n(e);}a.done?t(l):Promise.resolve(l).then(i,r);}function o(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(e){s(o,i,r,a,l,"next",e);}function l(e){s(o,i,r,a,l,"throw",e);}a(void 0);});};}function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,l(i.key),i);}}function l(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var c=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),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;},t=[{key:"getDB",value:(u=o(i().m(function e(){var t=this;return i().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,n){var i=t.IDB;if(i){var r=i.open("indigitall.indexedDB",1);r.onupgradeneeded=function(){r.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key");},r.onsuccess=function(){var t=r.result,n=t.transaction("indigitallStore","readwrite"),i=n.objectStore("indigitallStore"),s=i.index("storeIndex");e({db:t,tx:n,store:i,index:s});},r.onerror=function(e){n(e);};}else n(!1);}));},e);})),function(){return u.apply(this,arguments);})},{key:"get",value:(c=o(i().m(function e(t,n){var r=this;return i().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,i){t||i(!1),t.index.get(n).onsuccess=function(n){n.target.result&&(r.close(t),e(n.target.result.store.value)),i(!1);};}));},e);})),function(e,t){return c.apply(this,arguments);})},{key:"put",value:(l=o(i().m(function e(t,n,r){var s=this;return i().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,i){t||i(!1),t.store.put({store:{key:n,value:r}},n).onsuccess=function(n){s.close(t),e(r);};}));},e);})),function(e,t,n){return l.apply(this,arguments);})},{key:"close",value:function value(e){if(e.tx)try{e.tx.oncomplete=function(){e.db.close();};}catch(e){console.log(this.TAG,e);}}},{key:"setItem",value:(s=o(i().m(function e(t,n){var r,s;return i().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this.getDB();case 1:return r=e.v,e.a(2,this.put(r,t,n));case 2:return e.p=2,s=e.v,e.a(2,s);}},e,this,[[0,2]]);})),function(e,t){return s.apply(this,arguments);})},{key:"getItem",value:(r=o(i().m(function e(t){var n,r;return i().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this.getDB();case 1:return n=e.v,e.a(2,this.get(n,t));case 2:return e.p=2,r=e.v,e.a(2,r);}},e,this,[[0,2]]);})),function(e){return r.apply(this,arguments);})}],t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
224
+ var e,t,n,r,s,l,c,u;}();t["default"]=new c();},87:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i);}}function r(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var s=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.storage=this.isLocalStorageAvailable()?window.localStorage:null;},t=[{key:"isLocalStorageAvailable",value:function value(){try{var e=window.localStorage,t="__storage_test__";if(e)return e.setItem(t,t),e.removeItem(t),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==s.length;}return!1;}},{key:"setItem",value:function value(e,t){return null!=this.storage&&(this.storage.setItem(e,t),!0);}},{key:"getItem",value:function value(e){return null!=this.storage?this.storage.getItem(e):null;}},{key:"deleteItem",value:function(_value2){function value(_x172){return _value2.apply(this,arguments);}value.toString=function(){return _value2.toString();};return value;}(function(e){return!!this.storage&&(this.storage.setItem(e,value),!0);})},{key:"clear",value:function value(){this.storage&&this.storage.clear();}}],t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
225
+ var e,t,n;}())();t["default"]=s;},291:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=l(n(122)),r=l(n(87)),s=l(n(672)),o=l(n(238)),a=l(n(164));function l(e){return e&&e.__esModule?e:{"default":e};}function c(e){return c="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},c(e);}function u(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function s(n,i,r,s){var l=i&&i.prototype instanceof a?i:a,c=Object.create(l.prototype);return _d7(c,"_invoke",function(n,i,r){var s,a,l,c=0,u=r||[],d=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function d(t,n){return s=t,a=0,l=e,p.n=n,o;}};function h(n,i){for(a=n,l=i,t=0;!d&&c&&!r&&t<u.length;t++){var r,s=u[t],h=p.p,f=s[2];n>3?(r=f===i)&&(l=s[(a=s[4])?5:(a=3,3)],s[4]=s[5]=e):s[0]<=h&&((r=n<2&&h<s[1])?(a=0,p.v=i,p.n=s[1]):h<f&&(r=n<3||s[0]>i||i>f)&&(s[4]=n,s[5]=i,p.n=f,a=0));}if(r||n>1)return o;throw d=!0,i;}return function(r,u,f){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,f),a=u,l=f;(t=a<2?e:l)||!d;){s||(a?a<3?(a>1&&(p.n=-1),h(a,l)):p.n=l:p.v=l);try{if(c=2,s){if(a||(r="next"),t=s[r]){if(!(t=t.call(s,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,a<2&&(a=0);}else 1===a&&(t=s["return"])&&t.call(s),a<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),a=1);s=e;}else if((t=(d=p.n<0)?l:n.call(i,p))!==o)break;}catch(t){s=e,a=1,l=t;}finally{c=1;}}return{value:t,done:d};};}(n,r,s),!0),c;}var o={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var p=[][i]?t(t([][i]())):(_d7(t={},i,function(){return this;}),t),h=c.prototype=a.prototype=Object.create(p);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_d7(e,r,"GeneratorFunction")),e.prototype=Object.create(h),e;}return l.prototype=c,_d7(h,"constructor",c),_d7(c,"constructor",l),l.displayName="GeneratorFunction",_d7(c,r,"GeneratorFunction"),_d7(h),_d7(h,r,"Generator"),_d7(h,i,function(){return this;}),_d7(h,"toString",function(){return"[object Generator]";}),(u=function u(){return{w:s,m:f};})();}function _d7(e,t,n,i){var r=Object.defineProperty;try{r({},"",{});}catch(e){r=0;}_d7=function d(e,t,n,i){function s(t,n){_d7(e,t,function(e){return this._invoke(t,n,e);});}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(s("next",0),s("throw",1),s("return",2));},_d7(e,t,n,i);}function p(e,t,n,i,r,s,o){try{var a=e[s](o),l=a.value;}catch(e){return void n(e);}a.done?t(l):Promise.resolve(l).then(i,r);}function h(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var s=e.apply(t,n);function o(e){p(s,i,r,o,a,"next",e);}function a(e){p(s,i,r,o,a,"throw",e);}o(void 0);});};}function f(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,I(i.key),i);}}function I(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=c(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==c(t)?t:t+"";}var E=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.storage=r["default"],this.db=s["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.TIMEOUT_REQUESTS=this.REPOSITORY+".TIMEOUT_REQUESTS",this.ENCRYPTION_TYPE=this.REPOSITORY+".ENCRYPTION_TYPE",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";},t=[{key:"setItemSessionStorage",value:function value(e,t){o["default"].setItem(e,t);}},{key:"getItemSessionStorage",value:function value(e){return o["default"].getItem(e);}},{key:"clearSessionStorage",value:function value(){o["default"].clearMessages();}},{key:"setStorage",value:function value(e,t){r["default"].setItem(e,t);}},{key:"getStorage",value:function value(e){return r["default"].getItem(e);}},{key:"clearStorage",value:function value(){r["default"].clear();}},{key:"setBrowserPublicKey",value:function value(e){r["default"].setItem(this.BROWSER_PUBLIC_KEY,e);}},{key:"getBrowserPublicKey",value:function value(){return r["default"].getItem(this.BROWSER_PUBLIC_KEY);}},{key:"setBrowserPrivateKey",value:function value(e){r["default"].setItem(this.BROWSER_PRIVATE_KEY,e);}},{key:"getBrowserPrivateKey",value:function value(){return r["default"].getItem(this.BROWSER_PRIVATE_KEY);}},{key:"setAppKey",value:(b=h(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:if(r["default"].setItem(this.APP_KEY,t),!s["default"]||!s["default"].IDB){e.n=1;break;}return e.n=1,s["default"].setItem(this.APP_KEY,t);case 1:return e.a(2);}},e,this);})),function(e){return b.apply(this,arguments);})},{key:"getAppKey",value:function value(){return r["default"].getItem(this.APP_KEY);}},{key:"setDeviceId",value:(O=h(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,t),!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.DEVICE_ID,t);case 1:return e.a(2);}},e,this);})),function(e){return O.apply(this,arguments);})},{key:"getDeviceId",value:function value(){return this.getStorage(this.DEVICE_ID);}},{key:"getAppKeySync",value:(T=h(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:if(!s["default"]||!s["default"].IDB){e.n=2;break;}return e.n=1,s["default"].getItem(this.APP_KEY);case 1:return e.a(2,e.v);case 2:return e.a(2);}},e,this);})),function(){return T.apply(this,arguments);})},{key:"setVAPID",value:function value(e){r["default"].setItem(this.VAPID_PUBLIC,e);}},{key:"getVAPID",value:function value(){return r["default"].getItem(this.VAPID_PUBLIC);}},{key:"setEnabled",value:function value(e){r["default"].setItem(this.ENABLED,e);}},{key:"getEnabled",value:function value(){return r["default"].getItem(this.ENABLED);}},{key:"setServiceSyncTime",value:function value(e){r["default"].setItem(this.SERVICE_SYNC_TIME,e*this.BASE_TIME);}},{key:"getServiceSyncTime",value:function value(){var e=r["default"].getItem(this.SERVICE_SYNC_TIME);return e||1*this.BASE_TIME;}},{key:"setLocationEnabled",value:function value(e){r["default"].setItem(this.LOCATION_ENABLED,e);}},{key:"getLocationEnabled",value:function value(){return r["default"].getItem(this.LOCATION_ENABLED);}},{key:"setLocationUpdateMinutes",value:function value(e){r["default"].setItem(this.LOCATION_UPDATE_MINUTES,e);}},{key:"getLocationUpdateMinutes",value:function value(){var e=r["default"].getItem(this.LOCATION_UPDATE_MINUTES);return e||30;}},{key:"setRequestLocation",value:(P=h(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:r["default"].setItem(this.REQUEST_LOCATION,t);case 1:return e.a(2);}},e,this);})),function(e){return P.apply(this,arguments);})},{key:"getRequestLocation",value:function value(){return!!r["default"]&&r["default"].getItem(this.REQUEST_LOCATION);}},{key:"setPlatform",value:(S=h(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:r["default"].setItem(this.PLATFORM,t);case 1:return e.a(2);}},e,this);})),function(e){return S.apply(this,arguments);})},{key:"getPlatform",value:function value(){return r["default"]&&r["default"].getItem(this.PLATFORM)||i["default"].platform;}},{key:"getVersion",value:function value(){return i["default"].version;}},{key:"setBrowserName",value:(v=h(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:r["default"].setItem(this.BROWSER_NAME,t);case 1:return e.a(2);}},e,this);})),function(e){return v.apply(this,arguments);})},{key:"getBrowserName",value:function value(){return r["default"].getItem(this.BROWSER_NAME);}},{key:"setBrowserVersion",value:function value(e){r["default"].setItem(this.BROWSER_VERSION,e);}},{key:"getBrowserVersion",value:function value(){return r["default"].getItem(this.BROWSER_VERSION);}},{key:"setOsName",value:(g=h(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:r["default"].setItem(this.OS_NAME,t);case 1:return e.a(2);}},e,this);})),function(e){return g.apply(this,arguments);})},{key:"getOsName",value:function value(){return r["default"].getItem(this.OS_NAME);}},{key:"setOsVersion",value:function value(e){r["default"].setItem(this.OS_VERSION,e);}},{key:"getOsVersion",value:function value(){return r["default"].getItem(this.OS_VERSION);}},{key:"setDeviceType",value:function value(e){r["default"].setItem(this.DEVICE_TYPE,e);}},{key:"getDeviceType",value:function value(){return r["default"].getItem(this.DEVICE_TYPE);}},{key:"setSupported",value:function value(e){r["default"].setItem(this.SUPPORTED,e);}},{key:"getSupported",value:function value(){return r["default"].getItem(this.SUPPORTED);}},{key:"setServiceTimestamp",value:function value(e){r["default"].setItem(this.SERVICE_TIMESTAMP,e);}},{key:"getServiceTimestamp",value:function value(){return r["default"].getItem(this.SERVICE_TIMESTAMP);}},{key:"setLocationTimestamp",value:function value(e){r["default"].setItem(this.LOCATION_TIMESTAMP,e);}},{key:"getLocationTimestamp",value:function value(){return r["default"].getItem(this.LOCATION_TIMESTAMP);}},{key:"setPermissionLocation",value:function value(e){r["default"].setItem(this.PERMISSION_LOCATION,e);}},{key:"getPermissionLocation",value:function value(){return r["default"].getItem(this.PERMISSION_LOCATION);}},{key:"setDebugLog",value:function value(e){r["default"].setItem(this.SET_LOG_DEBUG,e);}},{key:"getDebugLog",value:function value(){return"false"!==r["default"].getItem(this.SET_LOG_DEBUG);}},{key:"setLogLevel",value:function value(e){r["default"].setItem(this.LOG_LEVEL,e);}},{key:"getLogLevel",value:function value(){return r["default"].getItem(this.LOG_LEVEL);}},{key:"setNewUserTimestamp",value:function value(e){r["default"].setItem(this.NEW_USER_TIMESTAMP,e);}},{key:"getNewUserTimestamp",value:function value(){return r["default"].getItem(this.NEW_USER_TIMESTAMP);}},{key:"setExternalIdRequest",value:(m=h(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:if(r["default"]&&r["default"].isLocalStorageAvailable()&&r["default"].setItem(this.EXTERNAL_ID,t),!s["default"]||!s["default"].IDB){e.n=1;break;}return e.n=1,s["default"].setItem(this.EXTERNAL_ID,t);case 1:return e.a(2);}},e,this);})),function(e){return m.apply(this,arguments);})},{key:"getExternalIdRequest",value:(A=h(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!r["default"]||!r["default"].isLocalStorageAvailable()){e.n=1;break;}t=r["default"].getItem(this.EXTERNAL_ID),e.n=3;break;case 1:if(!s["default"]||!s["default"].IDB){e.n=3;break;}return e.n=2,s["default"].getItem(this.EXTERNAL_ID);case 2:t=e.v;case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2,t);}},e,this,[[0,4]]);})),function(){return A.apply(this,arguments);})},{key:"setExternalId",value:function value(e){r["default"].setItem(this.EXTERNAL_ID,e);}},{key:"getExternalId",value:function value(){return r["default"].getItem(this.EXTERNAL_ID);}},{key:"getRegisteredByCookie",value:(y=h(u().m(function e(){return u().w(function(e){for(;;)if(0===e.n)return e.a(2,r["default"].getItem(this.REGISTERED_BY_COOKIE));},e,this);})),function(){return y.apply(this,arguments);})},{key:"setRegisteredByCookie",value:(_=h(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:r["default"].setItem(this.REGISTERED_BY_COOKIE,t);case 1:return e.a(2);}},e,this);})),function(e){return _.apply(this,arguments);})},{key:"setLatitude",value:function value(e){r["default"].setItem(this.LATITUDE,e);}},{key:"getLatitude",value:function value(){return r["default"].getItem(this.LATITUDE);}},{key:"setLongitude",value:function value(e){r["default"].setItem(this.LONGITUDE,e);}},{key:"getLongitude",value:function value(){return r["default"].getItem(this.LONGITUDE);}},{key:"setInAppTopicList",value:(E=h(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:if(!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.INAPP_TOPICS,t);case 1:return e.a(2);}},e,this);})),function(e){return E.apply(this,arguments);})},{key:"getInAppTopicList",value:(I=h(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!this.db||!this.db.IDB){e.n=2;break;}return e.n=1,this.db.getItem(this.INAPP_TOPICS);case 1:t=e.v;case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2,t);}},e,this,[[0,3]]);})),function(){return I.apply(this,arguments);})},{key:"setTopicList",value:(p=h(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:if(!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.TOPIC_LIST,t);case 1:return e.a(2);}},e,this);})),function(e){return p.apply(this,arguments);})},{key:"getTopicList",value:(d=h(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!this.db||!this.db.IDB){e.n=2;break;}return e.n=1,this.db.getItem(this.TOPIC_LIST);case 1:t=e.v;case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2,t);}},e,this,[[0,3]]);})),function(){return d.apply(this,arguments);})},{key:"getUrlInappApi",value:function value(){return this.getStorage(this.URL_INAPP_API);}},{key:"setUrlInappApi",value:function value(e){this.setStorage(this.URL_INAPP_API,e);}},{key:"setInAppEnabled",value:function value(e){this.setStorage(this.INAPP_ENABLED,e);}},{key:"isInAppEnabled",value:function value(){return this.getStorage(this.INAPP_ENABLED);}},{key:"setAvoidCypher",value:function value(e){this.setStorage(this.AVOID_CYPHER,!0===e);}},{key:"isAvoidCypher",value:function value(){return"true"===this.getStorage(this.AVOID_CYPHER);}},{key:"getUrlDeviceApi",value:(c=h(u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!this.storage||!this.storage.isLocalStorageAvailable()){e.n=1;break;}t=this.getStorage(this.URL_DEVICE_API),e.n=3;break;case 1:if(!this.db||!this.db.IDB){e.n=3;break;}return e.n=2,this.db.getItem(this.URL_DEVICE_API);case 2:t=e.v;case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2,t);}},e,this,[[0,4]]);})),function(){return c.apply(this,arguments);})},{key:"setUrlDeviceApi",value:(l=h(u().m(function e(t){return u().w(function(e){for(;;)switch(e.n){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,t),!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.URL_DEVICE_API,t);case 1:return e.a(2);}},e,this);})),function(e){return l.apply(this,arguments);})},{key:"setPushDisabled",value:function value(e){this.setStorage(this.PUSH_DISABLED,e);}},{key:"isPushDisabled",value:function value(){return this.getStorage(this.PUSH_DISABLED);}},{key:"getConfigV2ServiceSyncTime",value:function value(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME);}},{key:"setConfigV2ServiceSyncTime",value:function value(e){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,e);}},{key:"getConfigV2",value:function value(){return this.getStorage(this.CONFIG_V2);}},{key:"setConfigV2",value:function value(e){this.setStorage(this.CONFIG_V2,e);}},{key:"getMaintenanceEnd",value:function value(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY);}},{key:"setMaintenanceEnd",value:function value(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,e);}},{key:"getMaintenanceStart",value:function value(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY);}},{key:"setMaintenanceStart",value:function value(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,e);}},{key:"getTimeoutRequestsInMilliseconds",value:function value(){return this.getStorage(this.TIMEOUT_REQUESTS);}},{key:"setTimeoutRequestsInMilliseconds",value:function value(e){this.setStorage(this.TIMEOUT_REQUESTS,e);}},{key:"getEncryptionType",value:function value(){var e=this.getStorage(this.ENCRYPTION_TYPE);return null===e?a["default"].HASH:e;}},{key:"setEncryptionType",value:function value(e){this.setStorage(this.ENCRYPTION_TYPE,e);}}],t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
226
+ var e,t,n,l,c,d,p,I,E,_,y,A,m,g,v,S,P,T,O,b;}();t["default"]=E;},238:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i);}}function r(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var s=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null;},t=[{key:"isSessionStorageAvailable",value:function value(){try{var e=window.sessionStorage,t="__storage_test__";if(e)return e.setItem(t,t),e.removeItem(t),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==s.length;}return!1;}},{key:"getItem",value:function value(e){return null!=this.session?this.session.getItem(e):null;}},{key:"setItem",value:function value(e,t){return null!=this.session&&(this.session.setItem(e,t),!0);}},{key:"clearMessages",value:function value(){this.session&&this.session.removeItem("messages");}}],t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
227
+ var e,t,n;}())();t["default"]=s;},622:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=s(n(291)),r=s(n(254));function s(e){return e&&e.__esModule?e:{"default":e};}function o(e){return o="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},o(e);}function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,l(i.key),i);}}function l(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==o(t)?t:t+"";}var c=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},n=[{key:"isServiceTimestampExceed",value:function value(){return!new i["default"]().getServiceTimestamp()||new i["default"]().getServiceSyncTime()<=(Date.now()-new i["default"]().getServiceTimestamp())/6e4;}},{key:"isFunction",value:function value(e){return!(!e||"function"!=typeof e);}},{key:"generateUUID",value:function value(){var e=new r["default"]("[IND]CommonUtils: ");return"undefined"!=typeof crypto&&crypto.randomUUID?(e.d("Using crypto.randomUUID to generate UUID").writeLog(),crypto.randomUUID()):"undefined"!=typeof crypto&&crypto.getRandomValues?(e.d("Using crypto.getRandomValues to generate UUID").writeLog(),([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16);})):null;}}],(t=null)&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
228
+ var e,t,n;}();t["default"]=c;},429:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i,r=(i=n(254))&&i.__esModule?i:{"default":i};function s(e){return s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},s(e);}function o(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function s(n,i,r,s){var o=i&&i.prototype instanceof c?i:c,u=Object.create(o.prototype);return _a5(u,"_invoke",function(n,i,r){var s,o,a,c=0,u=r||[],d=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function d(t,n){return s=t,o=0,a=e,p.n=n,l;}};function h(n,i){for(o=n,a=i,t=0;!d&&c&&!r&&t<u.length;t++){var r,s=u[t],h=p.p,f=s[2];n>3?(r=f===i)&&(a=s[(o=s[4])?5:(o=3,3)],s[4]=s[5]=e):s[0]<=h&&((r=n<2&&h<s[1])?(o=0,p.v=i,p.n=s[1]):h<f&&(r=n<3||s[0]>i||i>f)&&(s[4]=n,s[5]=i,p.n=f,o=0));}if(r||n>1)return l;throw d=!0,i;}return function(r,u,f){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,f),o=u,a=f;(t=o<2?e:a)||!d;){s||(o?o<3?(o>1&&(p.n=-1),h(o,a)):p.n=a:p.v=a);try{if(c=2,s){if(o||(r="next"),t=s[r]){if(!(t=t.call(s,a)))throw TypeError("iterator result is not an object");if(!t.done)return t;a=t.value,o<2&&(o=0);}else 1===o&&(t=s["return"])&&t.call(s),o<2&&(a=TypeError("The iterator does not provide a '"+r+"' method"),o=1);s=e;}else if((t=(d=p.n<0)?a:n.call(i,p))!==l)break;}catch(t){s=e,o=1,a=t;}finally{c=1;}}return{value:t,done:d};};}(n,r,s),!0),u;}var l={};function c(){}function u(){}function d(){}t=Object.getPrototypeOf;var p=[][i]?t(t([][i]())):(_a5(t={},i,function(){return this;}),t),h=d.prototype=c.prototype=Object.create(p);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,_a5(e,r,"GeneratorFunction")),e.prototype=Object.create(h),e;}return u.prototype=d,_a5(h,"constructor",d),_a5(d,"constructor",u),u.displayName="GeneratorFunction",_a5(d,r,"GeneratorFunction"),_a5(h),_a5(h,r,"Generator"),_a5(h,i,function(){return this;}),_a5(h,"toString",function(){return"[object Generator]";}),(o=function o(){return{w:s,m:f};})();}function _a5(e,t,n,i){var r=Object.defineProperty;try{r({},"",{});}catch(e){r=0;}_a5=function a(e,t,n,i){function s(t,n){_a5(e,t,function(e){return this._invoke(t,n,e);});}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(s("next",0),s("throw",1),s("return",2));},_a5(e,t,n,i);}function l(e,t,n,i,r,s,o){try{var a=e[s](o),l=a.value;}catch(e){return void n(e);}a.done?t(l):Promise.resolve(l).then(i,r);}function c(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var s=e.apply(t,n);function o(e){l(s,i,r,o,a,"next",e);}function a(e){l(s,i,r,o,a,"throw",e);}o(void 0);});};}function u(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,d(i.key),i);}}function d(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==s(t)?t:t+"";}var p=function(){return function(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},null,[{key:"getLocationPermission",value:(i=c(o().m(function e(){var t,n;return o().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getPermission("geolocation");case 1:return t=e.v,n={},t&&(n.location=t.state),e.a(2,n);}},e,this);})),function(){return i.apply(this,arguments);})},{key:"getPermission",value:(n=c(o().m(function e(t){return o().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&t)){e.n=2;break;}return e.n=1,navigator.permissions.query({name:t,userVisibleOnly:!0});case 1:return e.a(2,e.v);case 2:e.n=4;break;case 3:return e.p=3,e.v,e.a(2,null);case 4:return e.a(2,null);}},e,null,[[0,3]]);})),function(e){return n.apply(this,arguments);})},{key:"setPermissionsCallback",value:(t=c(o().m(function e(){return o().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 1:return e.a(2);}},e,this);})),function(){return t.apply(this,arguments);})},{key:"setCallback",value:(e=c(o().m(function e(t,n){var i,s;return o().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getPermission(t);case 1:(i=e.v)&&(s=i.state,"onchange"in i&&(i.onchange=function(){new r["default"]("[IND]CorePermissions: ").d(t+" permission state has changed from "+s+" to "+i.state).writeLog(),s=i.state,n&&n({name:t,state:i.state});}));case 2:return e.a(2);}},e,this);})),function(t,n){return e.apply(this,arguments);})}]);// removed by dead control flow
229
+ var e,t,n,i;}();t["default"]=p;},170:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.CryptoUtils=void 0;var i=n(225),r=s(n(291));function s(e){return e&&e.__esModule?e:{"default":e};}function o(e){return o="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},o(e);}function a(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function s(n,i,r,s){var a=i&&i.prototype instanceof c?i:c,u=Object.create(a.prototype);return _l(u,"_invoke",function(n,i,r){var s,a,l,c=0,u=r||[],d=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function d(t,n){return s=t,a=0,l=e,p.n=n,o;}};function h(n,i){for(a=n,l=i,t=0;!d&&c&&!r&&t<u.length;t++){var r,s=u[t],h=p.p,f=s[2];n>3?(r=f===i)&&(l=s[(a=s[4])?5:(a=3,3)],s[4]=s[5]=e):s[0]<=h&&((r=n<2&&h<s[1])?(a=0,p.v=i,p.n=s[1]):h<f&&(r=n<3||s[0]>i||i>f)&&(s[4]=n,s[5]=i,p.n=f,a=0));}if(r||n>1)return o;throw d=!0,i;}return function(r,u,f){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,f),a=u,l=f;(t=a<2?e:l)||!d;){s||(a?a<3?(a>1&&(p.n=-1),h(a,l)):p.n=l:p.v=l);try{if(c=2,s){if(a||(r="next"),t=s[r]){if(!(t=t.call(s,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,a<2&&(a=0);}else 1===a&&(t=s["return"])&&t.call(s),a<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),a=1);s=e;}else if((t=(d=p.n<0)?l:n.call(i,p))!==o)break;}catch(t){s=e,a=1,l=t;}finally{c=1;}}return{value:t,done:d};};}(n,r,s),!0),u;}var o={};function c(){}function u(){}function d(){}t=Object.getPrototypeOf;var p=[][i]?t(t([][i]())):(_l(t={},i,function(){return this;}),t),h=d.prototype=c.prototype=Object.create(p);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,_l(e,r,"GeneratorFunction")),e.prototype=Object.create(h),e;}return u.prototype=d,_l(h,"constructor",d),_l(d,"constructor",u),u.displayName="GeneratorFunction",_l(d,r,"GeneratorFunction"),_l(h),_l(h,r,"Generator"),_l(h,i,function(){return this;}),_l(h,"toString",function(){return"[object Generator]";}),(a=function a(){return{w:s,m:f};})();}function _l(e,t,n,i){var r=Object.defineProperty;try{r({},"",{});}catch(e){r=0;}_l=function l(e,t,n,i){function s(t,n){_l(e,t,function(e){return this._invoke(t,n,e);});}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(s("next",0),s("throw",1),s("return",2));},_l(e,t,n,i);}function c(e,t,n,i,r,s,o){try{var a=e[s](o),l=a.value;}catch(e){return void n(e);}a.done?t(l):Promise.resolve(l).then(i,r);}function u(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,d(i.key),i);}}function d(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==o(t)?t:t+"";}var p=new(s(n(254))["default"])("[IND]Crypto"),h=new TextEncoder("utf-8"),f="HMAC",I=t.CryptoUtils=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},t=null,n=[{key:"createHmac",value:(s=a().m(function e(t,n){var s,o,l,c,u,d,I;return a().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,s=n,!0!==new r["default"]().isAvoidCypher()&&new r["default"]().getEncryptionType()!==i.EncryptionType.RAW){e.n=1;break;}return e.a(2,n);case 1:if(new r["default"]().getEncryptionType()!==i.EncryptionType.HASH){e.n=5;break;}if(l=null===(o=window)||void 0===o||null===(o=o.crypto)||void 0===o?void 0:o.subtle){e.n=2;break;}return e.a(2);case 2:return e.n=3,l.importKey("raw",h.encode(t),{name:f,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 3:return c=e.v,e.n=4,l.sign(f,c,h.encode(n));case 4:u=e.v,d=new Uint8Array(u),s=Array.prototype.map.call(d,function(e){return("00"+e.toString(16)).slice(-2);}).join(""),p.d("hmac: ",s).writeLog();case 5:return e.a(2,s);case 6:return e.p=6,I=e.v,p.e("error:",I).writeLog(),e.a(2);}},e,null,[[0,6]]);}),o=function o(){var e=this,t=arguments;return new Promise(function(n,i){var r=s.apply(e,t);function o(e){c(r,n,i,o,a,"next",e);}function a(e){c(r,n,i,o,a,"throw",e);}o(void 0);});},function(e,t){return o.apply(this,arguments);})}],t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
230
+ var e,t,n,s,o;}();t["default"]=I;},497:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){var _n13="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!_n13){if(Array.isArray(e)||(_n13=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0;}}(e))||t&&e&&"number"==typeof e.length){_n13&&(e=_n13);var i=0,s=function s(){};return{s:s,n:function n(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]};},e:function e(_e28){throw _e28;},f:s};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,l=!1;return{s:function s(){_n13=_n13.call(e);},n:function n(){var e=_n13.next();return a=e.done,e;},e:function e(_e29){l=!0,o=_e29;},f:function f(){try{a||null==_n13["return"]||_n13["return"]();}finally{if(l)throw o;}}};}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i;}function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,a(i.key),i);}}function o(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;}function a(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var l=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},n=[{key:"normalizeDateString",value:function value(e){if("number"==typeof e||e instanceof Date){var t=new Date(e);return isNaN(t.getTime())?null:this.formatCanonicalUTC(t);}if(!e||"string"!=typeof e)return null;var n=e.trim();if(this.isCanonicalFormat(n))return n;var i=this.tryToParseLeniently(n);return i?this.formatCanonicalUTC(i):null;}},{key:"isCanonicalFormat",value:function value(e){return /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(e);}},{key:"tryToParseLeniently",value:function value(e){var t,n=i(this.LENIENT_DATE_FORMATS);try{for(n.s();!(t=n.n()).done;){var r=t.value,s=this.parseByFormat(e,r);if(s&&!isNaN(s.getTime()))return s;}}catch(e){n.e(e);}finally{n.f();}return null;}},{key:"parseByFormat",value:function value(e,t){switch(t){case"yyyy-MM-dd'T'HH:mm:ss.SSSZ":return new Date(e);case"yyyy-MM-dd'T'HH:mm:ssZ":return e.endsWith("Z")?new Date(e):new Date(e.replaceAll(/([+-]\d{2})(\d{2})$/g,"$1:$2"));case"yyyy-MM-dd'T'HH:mm:ss":return new Date(e+"Z");case"yyyy-MM-dd HH:mm:ss":return new Date(e.replaceAll(" ","T")+"Z");case"yyyy-MM-dd":return new Date(e+"T00:00:00Z");default:return null;}}},{key:"formatCanonicalUTC",value:function value(e){return e.toISOString();}}],(t=null)&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
231
+ var e,t,n;}();o(l,"DATE_FORMAT_PATTERN","yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"),o(l,"LENIENT_DATE_FORMATS",["yyyy-MM-dd'T'HH:mm:ss.SSSZ","yyyy-MM-dd'T'HH:mm:ssZ","yyyy-MM-dd'T'HH:mm:ss","yyyy-MM-dd HH:mm:ss","yyyy-MM-dd"]);t["default"]=l;},457:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=s(n(735)),r=s(n(234));function s(e){return e&&e.__esModule?e:{"default":e};}function o(e){return o="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},o(e);}function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,l(i.key),i);}}function l(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==o(t)?t:t+"";}var c=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},(t=[{key:"showError",value:function value(e,t,n){if(null!=e){var s=Object.values(e.ErrorCode).indexOf(t);if(s>=0){var o={code:Object.keys(e.ErrorCode)[s],errorId:Object.values(e.ErrorCode)[s]};return new r["default"](o,Object.values(e.ErrorMessage)[s],n);}return new r["default"](i["default"].ErrorCode.GENERAL_ERROR,"general error",n);}}}])&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
232
+ var e,t,n;}();t["default"]=new c();},325:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i);}}function r(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var s=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},r=[{key:"compareJSON",value:function value(e,t){var i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(var s=0,o=i;s<o.length;s++){var a=o[s];if(e[a]!==t[a]){if("object"!=n(e[a])||"object"!=n(t[a]))return!1;if(!isEqual(e[a],t[a]))return!1;}}return!0;}}],(t=null)&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
233
+ var e,t,r;}();t["default"]=s;},254:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=s(n(291)),r=s(n(630));function s(e){return e&&e.__esModule?e:{"default":e};}function o(e){return o="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},o(e);}function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,l(i.key),i);}}function l(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==o(t)?t:t+"";}var c=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.tag="[IND]",t&&(this.tag=t),this.level=r["default"].INFO,this.setLogLevel(new i["default"]().getLogLevel()),this.log=[];}return t=e,n=[{key:"setLogLevel",value:function value(e){e&&e>=r["default"].DEBUG&&e<=r["default"].ERROR&&(this.level=e);}},{key:"d",value:function value(){if(this.level<=r["default"].DEBUG)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"i",value:function value(){if(this.level<=r["default"].INFO)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"w",value:function value(){if(this.level<=r["default"].WARNING)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"e",value:function value(){if(this.level<=r["default"].ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"writeLog",value:function value(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[];}}],s=[{key:"addedAsString",value:function value(e){return"string"==typeof e?e:JSON.stringify(e,null,2);}}],n&&a(t.prototype,n),s&&a(t,s),Object.defineProperty(t,"prototype",{writable:!1}),t;// removed by dead control flow
234
+ var t,n,s;}();t["default"]=c;},630:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.LogLevel=void 0;var n=t.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});t["default"]=n;},662:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i);}}function r(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var s=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},n=[{key:"setTopicChannel",value:function value(e,t){for(var n=[],i=0;i<e.length;i++){var r=e[i];r.channel=t,n.push(r);}return n;}}],(t=null)&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
235
+ var e,t,n;}();t["default"]=s;},332:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i);}}function r(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var s=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},n=[{key:"isValidFormat",value:function value(e){return null!=e&&""!=e&&"null"!=e&&e.length>8;}}],(t=null)&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
236
+ var e,t,n;}();t["default"]=s;},628:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CommonUtils",{enumerable:!0,get:function get(){return i["default"];}}),Object.defineProperty(t,"CorePermissions",{enumerable:!0,get:function get(){return r["default"];}}),Object.defineProperty(t,"CryptoUtils",{enumerable:!0,get:function get(){return s["default"];}}),Object.defineProperty(t,"DateUtils",{enumerable:!0,get:function get(){return p["default"];}}),Object.defineProperty(t,"ErrorUtils",{enumerable:!0,get:function get(){return o["default"];}}),Object.defineProperty(t,"JsonUtils",{enumerable:!0,get:function get(){return a["default"];}}),Object.defineProperty(t,"Log",{enumerable:!0,get:function get(){return l["default"];}}),Object.defineProperty(t,"LogLevel",{enumerable:!0,get:function get(){return c.LogLevel;}}),Object.defineProperty(t,"TopicUtils",{enumerable:!0,get:function get(){return d["default"];}}),Object.defineProperty(t,"Validations",{enumerable:!0,get:function get(){return u["default"];}});var i=h(n(622)),r=h(n(429)),s=h(n(170)),o=h(n(457)),a=h(n(325)),l=h(n(254)),c=n(630),u=h(n(332)),d=h(n(662)),p=h(n(497));function h(e){return e&&e.__esModule?e:{"default":e};}},904:function _(e){"use strict";e.exports=JSON.parse('{"_from":"indigitall-web-core@4.16.6","_id":"indigitall-web-core@4.16.6","_inBundle":false,"_integrity":"sha512-045LGrA/PpWZIGvHBx0xkXDeksNgYV7dHmOMMC8Ij91HirZRH7l7yOLaSFQTbFC1l5vAIJxdPNRqvwDUTGjvCQ==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.16.6","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.16.6","saveSpec":null,"fetchSpec":"4.16.6"},"_requiredBy":["#USER","/","/indigitall-web-customer"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.16.6.tgz","_shasum":"76f7bf9db6a6a2777bf5e32fa1c8a0ed4e033ef9","_spec":"indigitall-web-core@4.16.6","_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.16.6"}');}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var s=t[i]={exports:{}};return e[i].call(s.exports,s,s.exports,n),s.exports;}n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]});},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t);},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0});};var i={};return function(_Class4){"use strict";n.r(i),n.d(i,{"default":function _default(){return $e;}});var e=n(315).Core.Api.BaseRequest;var t=/*#__PURE__*/function(_e30){function t(){var _this24;_classCallCheck2(this,t);_this24=_callSuper2(this,t),_this24.PARAM_INAPP_LIMIT="limit",_this24.PARAM_INAPP_PAGE="page",_this24.INAPP_TOPIC_LIST_LIMIT=20,_this24.page=0;return _this24;}_inherits2(t,_e30);return _createClass2(t,[{key:"getTopicsRequest",value:function getTopicsRequest(){return this.params=this.getTopicsQuery(),this;}},{key:"getTopicsQuery",value:function getTopicsQuery(){var e="";return e+="".concat(this.PARAM_INAPP_LIMIT,"=").concat(s.getInAppTopicPageLimit(),"&"),e+="".concat(this.PARAM_INAPP_PAGE,"=").concat(this.page),e;}}]);}(e),r=n(315).Core.Repository;var s=new(/*#__PURE__*/function(_r8){function _class13(){var _this25;_classCallCheck2(this,_class13);_this25=_callSuper2(this,_class13),_this25.INAPP_SHOW_ONCE=_this25.REPOSITORY+".INAPP_SHOW_ONCE",_this25.INAPP_TIMES_CLICKED=_this25.REPOSITORY+".INAPP_TIMES_CLICKED",_this25.INAPP_DISMISS_FOREVER=_this25.REPOSITORY+".INAPP_DISMISS_FOREVER",_this25.URL_DEVICE_API=_this25.REPOSITORY+".URL_DEVICE_API",_this25.INAPP_TOPICS_SYNC=_this25.REPOSITORY+".INAPP_TOPICS_SYNC",_this25.AVOID_ACTION=_this25.REPOSITORY+".AVOID_ACTION",_this25.CONFIG_INAPP_V2_SERVICE_SYNC_TIME=_this25.REPOSITORY+".CONFIG_INAPP_V2_SERVICE_SYNC_TIME",_this25.AUDIENCE_DATE_CACHE_TTL=_this25.REPOSITORY+".AUDIENCE_DATE_CACHE_TTL",_this25.INAPP_AUDIENCES=_this25.REPOSITORY+".INAPP_AUDIENCES",_this25.INAPP_AUDIENCES_CACHE=_this25.REPOSITORY+".INAPP_AUDIENCES_CACHE",_this25.INAPP_AUDIENCES_LAST_UPDATE=_this25.REPOSITORY+".INAPP_AUDIENCES_LAST_UPDATE",_this25.INAPP_CACHE=_this25.REPOSITORY+".INAPP_CACHE",_this25.INAPP_LIMIT_TO_IGNORE=_this25.REPOSITORY+".INAPP_LIMIT_TO_IGNORE",_this25.INAPP_PROFILE=_this25.REPOSITORY+".INAPP_PROFILE",_this25.INAPP_TIME_SLIDE_CAROUSEL=_this25.REPOSITORY+".INAPP_TIME_SLIDE_CAROUSEL",_this25.INAPP_TOPIC_PAGE_LIMIT=_this25.REPOSITORY+".INAPP_TOPIC_PAGE_LIMIT",_this25.INAPP_AUDIENCE_DEVICE_ID_ENABLED=_this25.REPOSITORY+".INAPP_AUDIENCE_DEVICE_ID_ENABLED";return _this25;}_inherits2(_class13,_r8);return _createClass2(_class13,[{key:"setItemStorage",value:function(){var _setItemStorage=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee132(e){var _t107;return _regenerator2().w(function(_context132){while(1)switch(_context132.n){case 0:_t107=this.db&&this.db.IDB;if(!_t107){_context132.n=1;break;}_context132.n=1;return this.db.setItem(this.INAPP_CACHE,e);case 1:this.setItemSessionStorage(this.REPOSITORY,e);case 2:return _context132.a(2);}},_callee132,this);}));function setItemStorage(_x173){return _setItemStorage.apply(this,arguments);}return setItemStorage;}()},{key:"getItemStorage",value:function(){var _getItemStorage=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee133(){var e,_t108,_t109;return _regenerator2().w(function(_context133){while(1)switch(_context133.p=_context133.n){case 0:_context133.p=0;this.storage&&this.storage.isLocalStorageAvailable()&&(e=this.getItemSessionStorage(this.REPOSITORY));_t108=!e&&this.db&&this.db.IDB;if(!_t108){_context133.n=2;break;}_context133.n=1;return this.db.getItem(this.INAPP_CACHE);case 1:e=_context133.v;case 2:_context133.n=4;break;case 3:_context133.p=3;_t109=_context133.v;case 4:return _context133.a(2,e);}},_callee133,this,[[0,3]]);}));function getItemStorage(){return _getItemStorage.apply(this,arguments);}return getItemStorage;}()},{key:"setDeviceId",value:function setDeviceId(e){this.setStorage(this.DEVICE_ID,e);}},{key:"getDeviceId",value:function getDeviceId(){return this.getStorage(this.DEVICE_ID);}},{key:"getInAppShowOnce",value:function getInAppShowOnce(){return this.getStorage(this.INAPP_SHOW_ONCE);}},{key:"setInAppShowOnce",value:function setInAppShowOnce(e){this.setStorage(this.INAPP_SHOW_ONCE,e);}},{key:"getInAppTimesClicked",value:function getInAppTimesClicked(){return this.getStorage(this.INAPP_TIMES_CLICKED);}},{key:"setInAppTimesClicked",value:function setInAppTimesClicked(e){this.setStorage(this.INAPP_TIMES_CLICKED,e);}},{key:"getInAppDismissForever",value:function getInAppDismissForever(){return this.getStorage(this.INAPP_DISMISS_FOREVER);}},{key:"setInAppDismissForever",value:function setInAppDismissForever(e){this.setStorage(this.INAPP_DISMISS_FOREVER,e);}},{key:"getInAppTopics",value:function getInAppTopics(){return this.getStorage(this.INAPP_TOPICS)?this.getStorage(this.INAPP_TOPICS).split(","):null;}},{key:"setInAppTopics",value:function setInAppTopics(e){this.setStorage(this.INAPP_TOPICS,e);}},{key:"getInAppTopicsSync",value:function(){var _getInAppTopicsSync=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee134(){var e,_t110,_t111;return _regenerator2().w(function(_context134){while(1)switch(_context134.p=_context134.n){case 0:e=null;_context134.p=1;_t110=this.db&&this.db.IDB;if(!_t110){_context134.n=3;break;}_context134.n=2;return this.db.getItem(this.INAPP_TOPICS_SYNC);case 2:e=_context134.v;case 3:_context134.n=5;break;case 4:_context134.p=4;_t111=_context134.v;case 5:return _context134.a(2,e);}},_callee134,this,[[1,4]]);}));function getInAppTopicsSync(){return _getInAppTopicsSync.apply(this,arguments);}return getInAppTopicsSync;}()},{key:"setInAppTopicsSync",value:function(){var _setInAppTopicsSync=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee135(e){var _t112;return _regenerator2().w(function(_context135){while(1)switch(_context135.n){case 0:_t112=this.db&&this.db.IDB;if(!_t112){_context135.n=1;break;}_context135.n=1;return this.db.setItem(this.INAPP_TOPICS_SYNC,e);case 1:return _context135.a(2);}},_callee135,this);}));function setInAppTopicsSync(_x174){return _setInAppTopicsSync.apply(this,arguments);}return setInAppTopicsSync;}()},{key:"getUrlDeviceApi",value:function(){var _getUrlDeviceApi5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee136(){var e,_t113,_t114;return _regenerator2().w(function(_context136){while(1)switch(_context136.p=_context136.n){case 0:_context136.p=0;if(!(this.storage&&this.storage.isLocalStorageAvailable())){_context136.n=1;break;}e=this.getStorage(this.URL_DEVICE_API);_context136.n=3;break;case 1:_t113=this.db&&this.db.IDB;if(!_t113){_context136.n=3;break;}_context136.n=2;return this.db.getItem(this.URL_DEVICE_API);case 2:e=_context136.v;case 3:_context136.n=5;break;case 4:_context136.p=4;_t114=_context136.v;case 5:return _context136.a(2,e);}},_callee136,this,[[0,4]]);}));function getUrlDeviceApi(){return _getUrlDeviceApi5.apply(this,arguments);}return getUrlDeviceApi;}()},{key:"isAvoidAction",value:function isAvoidAction(){return this.getStorage(this.AVOID_ACTION);}},{key:"setAvoidAction",value:function setAvoidAction(e){this.setStorage(this.AVOID_ACTION,e);}},{key:"getConfigInAppV2ServiceSyncTime",value:function getConfigInAppV2ServiceSyncTime(){return this.getStorage(this.CONFIG_INAPP_V2_SERVICE_SYNC_TIME);}},{key:"setConfigInAppV2ServiceSyncTime",value:function setConfigInAppV2ServiceSyncTime(e){this.setStorage(this.CONFIG_INAPP_V2_SERVICE_SYNC_TIME,e);}},{key:"getInAppAudienceDateCacheTtl",value:function getInAppAudienceDateCacheTtl(){return this.getStorage(this.AUDIENCE_DATE_CACHE_TTL);}},{key:"setInAppAudienceDateCacheTtl",value:function setInAppAudienceDateCacheTtl(e){this.setStorage(this.AUDIENCE_DATE_CACHE_TTL,e);}},{key:"getAudienceModel",value:function getAudienceModel(){return this.getStorage(this.INAPP_AUDIENCES);}},{key:"setAudienceModel",value:function setAudienceModel(e){this.setStorage(this.INAPP_AUDIENCES,e);}},{key:"getAudienceCache",value:function getAudienceCache(){return this.getStorage(this.INAPP_AUDIENCES_CACHE);}},{key:"setAudienceCache",value:function setAudienceCache(e){this.setStorage(this.INAPP_AUDIENCES_CACHE,e);}},{key:"getAudienceLastUpdate",value:function getAudienceLastUpdate(){return this.getStorage(this.INAPP_AUDIENCES_LAST_UPDATE);}},{key:"setAudienceLastUpdate",value:function setAudienceLastUpdate(e){this.setStorage(this.INAPP_AUDIENCES_LAST_UPDATE,e);}},{key:"getInAppCache",value:function getInAppCache(){var e=this.getStorage(this.INAPP_CACHE);try{return e?JSON.parse(e):[];}catch(e){return console.log("getInAppCache: invalid JSON in storage",e),[];}}},{key:"setInAppCache",value:function setInAppCache(e){if(Array.isArray(e))try{var _t115=JSON.stringify(e);this.setStorage(this.INAPP_CACHE,_t115);}catch(e){console.log("setInAppCache: error stringifying value",e);}else console.log("setInAppCache: value must be a JSON array");}},{key:"getInAppLimitToIgnore",value:function getInAppLimitToIgnore(){return this.getStorage(this.INAPP_LIMIT_TO_IGNORE);}},{key:"setInAppLimitToIgnore",value:function setInAppLimitToIgnore(e){this.setStorage(this.INAPP_LIMIT_TO_IGNORE,e);}},{key:"getInAppProfile",value:function getInAppProfile(){var e=this.getStorage(this.INAPP_PROFILE);return null==e||""===e?null:e;}},{key:"setInAppProfile",value:function setInAppProfile(e){var t="";null!==e&&(t=e),this.setStorage(this.INAPP_PROFILE,t);}},{key:"getInAppTopicPageLimit",value:function getInAppTopicPageLimit(){var e=this.getStorage(this.INAPP_TOPIC_PAGE_LIMIT);return 0==e?new t().INAPP_TOPIC_LIST_LIMIT:e;}},{key:"setInAppTopicPageLimit",value:function setInAppTopicPageLimit(e){this.setStorage(this.INAPP_TOPIC_PAGE_LIMIT,e);}},{key:"getTimeSlideForCarousel",value:function getTimeSlideForCarousel(){return this.getStorage(this.INAPP_TIME_SLIDE_CAROUSEL);}},{key:"setTimeSlideForCarousel",value:function setTimeSlideForCarousel(e){this.setStorage(this.INAPP_TIME_SLIDE_CAROUSEL,e);}},{key:"isAudienceDeviceIdEnabled",value:function isAudienceDeviceIdEnabled(){return!!this.getStorage(this.INAPP_AUDIENCE_DEVICE_ID_ENABLED)&&this.getStorage(this.INAPP_AUDIENCE_DEVICE_ID_ENABLED);}},{key:"setAudienceDeviceIdEnabled",value:function setAudienceDeviceIdEnabled(e){this.setStorage(this.INAPP_AUDIENCE_DEVICE_ID_ENABLED,e);}}]);}(r))(),_n$Core$Utils=n(315).Core.Utils,o=_n$Core$Utils.Validations,a=_n$Core$Utils.Log;var l=/*#__PURE__*/function(_o){function l(){_classCallCheck2(this,l);return _callSuper2(this,l,arguments);}_inherits2(l,_o);return _createClass2(l,null,[{key:"isAppKeyFormat",value:function isAppKeyFormat(){var e=s.getAppKey();return null!=e&&""!=e&&"null"!=e&&e.length>3;}},{key:"isValidFieldFormat",value:function isValidFieldFormat(e){return null!=e&&""!=e&&"null"!=e;}},{key:"isValidFormatRequest",value:function isValidFormatRequest(){var e=new a("[IND]InAppValidations: "),t=s.getDeviceId();var n=!0;return this.isAppKeyFormat()||(n=!1,e.w("appKey is null or empty").writeLog()),this.isValidFormat(t)||(n=!1,e.w("deviceId is null or empty").writeLog()),n;}},{key:"getInAppRegisterInvalidFields",value:function getInAppRegisterInvalidFields(){var e=[],t=this.isValidFormatRequest(),n=this.isValidFieldFormat(s.getExternalId());return t||e.push("deviceId"),s.isAudienceDeviceIdEnabled()||n||e.push("externalCode"),e;}}]);}(o),c=n(315).Core.Models.ErrorDictionary,u=c.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_TOPIC_LIST_NO_MORE_PAGES:2005,INAPP_CAMPAIGN_NOT_EXIST:2403,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,INAPP_AUDIENCES_BAD_REQUEST:4803,INAPP_AUDIENCE_NO_CHANGE:304});var d=c.ErrorMessage;Object.assign(d,{INAPP_ERROR:"inApp error",INAPP_SHOW_INAPP_ERROR:"error on show inApp",INAPP_WAS_EXPIRED:"InApp cache has timed out",INAPP_WAS_SHOWN_MANY_TIMES:"InApp was shown more than $x times",INAPP_WAS_CLICKED_MANY_TIMES:"InApp was clicked more than $x times",INAPP_TOPIC_EMPTY:"There is no inApp Topics subscription",INAPP_TOPIC_LIST_NO_MORE_PAGES:"No more pages for inApp topics",INAPP_CAMPAIGN_NOT_EXIST:"Campaign doesn't exist with the code",INAPP_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",INAPP_AUDIENCES_BAD_REQUEST:"Audience bad request",INAPP_AUDIENCE_NO_CHANGE:"Audience with no change"});var p={ErrorCode:u,ErrorMessage:d};var h=/*#__PURE__*/_createClass2(function h(e){_classCallCheck2(this,h);this.URL="url",e.actionId&&(this.actionId=e.actionId),e.destroy&&(this.destroy=e.destroy),e.topics&&(this.topics=e.topics),e.type&&(this.type=e.type),e.url&&(this.url=e.url),e.app&&(this.app=e.app),e.no_action&&(this.no_action=e.no_action);});var f=/*#__PURE__*/_createClass2(function f(e){_classCallCheck2(this,f);e.borderRadius&&(this.borderRadius=e.borderRadius);});var I=/*#__PURE__*/function(){function I(e){_classCallCheck2(this,I);e.contentUrl&&(this.contentUrl=e.contentUrl),e.showTime&&(this.showTime=e.showTime),e.numberOfShows&&(this.numberOfShows=e.numberOfShows),e.numberOfClicks&&(this.numberOfClicks=e.numberOfClicks),e.dismissForever&&(this.dismissForever=e.dismissForever),e.layout&&(this.layout=new f(e.layout)),e.action&&(this.action=new h(e.action));}return _createClass2(I,[{key:"setAction",value:function setAction(e){this.action=e;}}]);}();var E=/*#__PURE__*/_createClass2(function E(e){_classCallCheck2(this,E);this.timesShowed=0,this.timesClicked=0,this.wasDismissed=!1,e&&(e.timesShowed&&(this.timesShowed=e.timesShowed),e.timesClicked&&(this.timesClicked=e.timesClicked),e.wasDismissed&&(this.wasDismissed=e.wasDismissed));});var _=/*#__PURE__*/function(){function _(){_classCallCheck2(this,_);}return _createClass2(_,null,[{key:"searchInApp",value:function(){var _searchInApp=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee137(e){var t;return _regenerator2().w(function(_context137){while(1)switch(_context137.n){case 0:console.warn("searchInApp is deprecated. Use searchInAppWithInApp(inApp) instead.");_context137.n=1;return this.getListInApp();case 1:t=_context137.v;return _context137.a(2,null==t?null:this.findInAppFromInAppList(t,e));}},_callee137,this);}));function searchInApp(_x175){return _searchInApp.apply(this,arguments);}return searchInApp;}()},{key:"searchListInAppWithCode",value:function(){var _searchListInAppWithCode=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee138(e){var t;return _regenerator2().w(function(_context138){while(1)switch(_context138.n){case 0:_context138.n=1;return this.getListInApp();case 1:t=_context138.v;return _context138.a(2,null==t?null:this.findInAppsFromInAppList(t,e));}},_callee138,this);}));function searchListInAppWithCode(_x176){return _searchListInAppWithCode.apply(this,arguments);}return searchListInAppWithCode;}()},{key:"searchInAppWithInAppIdAndSchema",value:function(){var _searchInAppWithInAppIdAndSchema=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee139(e,t){var n;return _regenerator2().w(function(_context139){while(1)switch(_context139.n){case 0:console.warn("searchInAppWithInAppIdAndSchema is deprecated. Use searchInAppWithInApp(inApp) instead.");_context139.n=1;return this.getListInApp();case 1:n=_context139.v;return _context139.a(2,null==n?null:this.getInAppFromIdAndCode(n,e,t));}},_callee139,this);}));function searchInAppWithInAppIdAndSchema(_x177,_x178){return _searchInAppWithInAppIdAndSchema.apply(this,arguments);}return searchInAppWithInAppIdAndSchema;}()},{key:"searchInAppWithInAppId",value:function(){var _searchInAppWithInAppId=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee140(e){var t;return _regenerator2().w(function(_context140){while(1)switch(_context140.n){case 0:console.warn("searchInAppWithInAppId is deprecated. Use searchInAppWithInApp(inApp) instead.");_context140.n=1;return this.getListInApp();case 1:t=_context140.v;return _context140.a(2,null==t?null:this.findInAppFromInAppListWithInAppId(t,e));}},_callee140,this);}));function searchInAppWithInAppId(_x179){return _searchInAppWithInAppId.apply(this,arguments);}return searchInAppWithInAppId;}()},{key:"searchInAppWithInApp",value:function(){var _searchInAppWithInApp=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee141(e){var t;return _regenerator2().w(function(_context141){while(1)switch(_context141.n){case 0:_context141.n=1;return this.getListInApp();case 1:t=_context141.v;return _context141.a(2,null==t?null:this.findInAppsFromInAppListWithInApp(t,e));}},_callee141,this);}));function searchInAppWithInApp(_x180){return _searchInAppWithInApp.apply(this,arguments);}return searchInAppWithInApp;}()},{key:"addInApp",value:function(){var _addInApp=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee142(e){var t;return _regenerator2().w(function(_context142){while(1)switch(_context142.n){case 0:_context142.n=1;return this.getListInApp();case 1:t=_context142.v;null!=t?t.push(e):t=[e];_context142.n=2;return s.setItemStorage(JSON.stringify(t));case 2:return _context142.a(2);}},_callee142,this);}));function addInApp(_x181){return _addInApp.apply(this,arguments);}return addInApp;}()},{key:"getListInApp",value:function(){var _getListInApp=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee143(){var e,_t116,_t117;return _regenerator2().w(function(_context143){while(1)switch(_context143.p=_context143.n){case 0:e=null;_context143.p=1;_context143.n=2;return s.getItemStorage();case 2:_t116=_context143.v;_t116&&(e=JSON.parse(_t116));_context143.n=4;break;case 3:_context143.p=3;_t117=_context143.v;console.log(_t117);case 4:return _context143.a(2,e);}},_callee143,null,[[1,3]]);}));function getListInApp(){return _getListInApp.apply(this,arguments);}return getListInApp;}()},{key:"addInAppNewClick",value:function(){var _addInAppNewClick=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee144(e){return _regenerator2().w(function(_context144){while(1)switch(_context144.n){case 0:this.updateInAppField(e,!0,null,null);case 1:return _context144.a(2);}},_callee144,this);}));function addInAppNewClick(_x182){return _addInAppNewClick.apply(this,arguments);}return addInAppNewClick;}()},{key:"addInAppNewShow",value:function(){var _addInAppNewShow=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee145(e){return _regenerator2().w(function(_context145){while(1)switch(_context145.n){case 0:this.updateInAppField(e,null,!0,null);case 1:return _context145.a(2);}},_callee145,this);}));function addInAppNewShow(_x183){return _addInAppNewShow.apply(this,arguments);}return addInAppNewShow;}()},{key:"addInAppDismissForever",value:function(){var _addInAppDismissForever=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee146(e){return _regenerator2().w(function(_context146){while(1)switch(_context146.n){case 0:this.updateInAppField(e,null,null,!0);case 1:return _context146.a(2);}},_callee146,this);}));function addInAppDismissForever(_x184){return _addInAppDismissForever.apply(this,arguments);}return addInAppDismissForever;}()},{key:"updateInAppField",value:function(){var _updateInAppField=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee147(e,t,n,i){var r,o,_a6,_s4;return _regenerator2().w(function(_context147){while(1)switch(_context147.n){case 0:_context147.n=1;return this.getListInApp();case 1:r=_context147.v;o=[];if(null!=r){_a6=s.getInAppProfile();for(_s4=0;_s4<r.length;_s4++)_a6?r[_s4].inAppId==e.inAppId&&r[_s4].profile&&r[_s4].profile==_a6&&(null!=t&&(r[_s4].inAppShow.timesClicked+=1),null!=n&&(r[_s4].inAppShow.timesShowed+=1),null!=i&&(r[_s4].inAppShow.wasDismissed=!0)):r[_s4].inAppId!=e.inAppId||void 0!==r[_s4].profile&&null!==r[_s4].profile&&""!==r[_s4].profile||(null!=t&&(r[_s4].inAppShow.timesClicked+=1),null!=n&&(r[_s4].inAppShow.timesShowed+=1),null!=i&&(r[_s4].inAppShow.wasDismissed=!0)),o.push(r[_s4]);}_context147.n=2;return s.setItemStorage(JSON.stringify(o));case 2:return _context147.a(2);}},_callee147,this);}));function updateInAppField(_x185,_x186,_x187,_x188){return _updateInAppField.apply(this,arguments);}return updateInAppField;}()},{key:"updateInApp",value:function(){var _updateInApp=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee148(e){var t,n,i,r,o,_s5;return _regenerator2().w(function(_context148){while(1)switch(_context148.n){case 0:_context148.n=1;return this.getListInApp();case 1:t=_context148.v;n=[];i=null,r=!1;o=s.getInAppProfile();if(null!=t)for(_s5=0;_s5<t.length;_s5++)o?t[_s5].inAppId===e.inAppId&&t[_s5].schema.code===e.schema.code&&t[_s5].profile===o?(e.profile=o,r=!0):n.push(t[_s5]):t[_s5].inAppId===e.inAppId&&t[_s5].schema.code===e.schema.code?r=!0:n.push(t[_s5]),r&&(t[_s5].filters&&(e.filters=t[_s5].filters),t[_s5].name&&(e.name=t[_s5].name),null!=t[_s5].properties&&(e.properties=new I(t[_s5].properties)),null!=t[_s5].inAppShow&&(e.inAppShow=new E(t[_s5].inAppShow)),n.push(e),i=e);_context148.n=2;return s.setItemStorage(JSON.stringify(n));case 2:return _context148.a(2,i);}},_callee148,this);}));function updateInApp(_x189){return _updateInApp.apply(this,arguments);}return updateInApp;}()},{key:"deleteInApp",value:function(){var _deleteInApp=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee149(e){var t,n,i,r;return _regenerator2().w(function(_context149){while(1)switch(_context149.n){case 0:t=!1;_context149.n=1;return this.getListInApp();case 1:n=_context149.v;i=[];if(null!=n)for(r=0;r<n.length;r++)n[r].inAppId!=e.inAppId?i.push(n[r]):t=!0;_context149.n=2;return s.setItemStorage(JSON.stringify(i));case 2:return _context149.a(2,t);}},_callee149,this);}));function deleteInApp(_x190){return _deleteInApp.apply(this,arguments);}return deleteInApp;}()},{key:"deleteInAppIfOldVersion",value:function(){var _deleteInAppIfOldVersion=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee150(e){var t,n,i,r;return _regenerator2().w(function(_context150){while(1)switch(_context150.n){case 0:t=!1;_context150.n=1;return this.getListInApp();case 1:n=_context150.v;i=[];if(null!=n)for(r=0;r<n.length;r++)n[r].inAppId!=e.inAppId?i.push(n[r]):n[r].version<=e.version?t=!0:i.push(n[r]);return _context150.a(2,t);}},_callee150,this);}));function deleteInAppIfOldVersion(_x191){return _deleteInAppIfOldVersion.apply(this,arguments);}return deleteInAppIfOldVersion;}()},{key:"findInAppsFromInAppListWithInApp",value:function(){var _findInAppsFromInAppListWithInApp=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee151(e,t){var n,i;return _regenerator2().w(function(_context151){while(1)switch(_context151.n){case 0:if(!(null!=e)){_context151.n=5;break;}n=s.getInAppProfile();i=0;case 1:if(!(i<e.length)){_context151.n=5;break;}if(!n){_context151.n=3;break;}if(!(e[i].inAppId&&e[i].inAppId==t.inAppId&&e[i].schema.code&&e[i].schema.code==t.schema.code&&e[i].profile&&e[i].profile==n)){_context151.n=2;break;}return _context151.a(2,e[i]);case 2:_context151.n=4;break;case 3:if(!(e[i].inAppId&&e[i].inAppId==t.inAppId&&e[i].schema.code&&e[i].schema.code==t.schema.code&&(void 0===e[i].profile||null===e[i].profile||""===e[i].profile))){_context151.n=4;break;}return _context151.a(2,e[i]);case 4:i++;_context151.n=1;break;case 5:return _context151.a(2,null);}},_callee151);}));function findInAppsFromInAppListWithInApp(_x192,_x193){return _findInAppsFromInAppListWithInApp.apply(this,arguments);}return findInAppsFromInAppListWithInApp;}()},{key:"findInAppFromInAppListWithInAppId",value:function(){var _findInAppFromInAppListWithInAppId=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee152(e,t){var n,i;return _regenerator2().w(function(_context152){while(1)switch(_context152.n){case 0:if(!(null!=e)){_context152.n=5;break;}n=s.getInAppProfile();i=0;case 1:if(!(i<e.length)){_context152.n=5;break;}if(!n){_context152.n=3;break;}if(!(e[i].inAppId&&e[i].inAppId==t&&e[i].profile&&e[i].profile==n)){_context152.n=2;break;}return _context152.a(2,e[i]);case 2:_context152.n=4;break;case 3:if(!(e[i].inAppId&&e[i].inAppId==t&&(void 0===e[i].profile||null===e[i].profile||""===e[i].profile))){_context152.n=4;break;}return _context152.a(2,e[i]);case 4:i++;_context152.n=1;break;case 5:return _context152.a(2,null);}},_callee152);}));function findInAppFromInAppListWithInAppId(_x194,_x195){return _findInAppFromInAppListWithInAppId.apply(this,arguments);}return findInAppFromInAppListWithInAppId;}()},{key:"findInAppFromInAppList",value:function(){var _findInAppFromInAppList=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee153(e,t){var n,i;return _regenerator2().w(function(_context153){while(1)switch(_context153.n){case 0:if(!(null!=e)){_context153.n=5;break;}n=s.getInAppProfile();i=0;case 1:if(!(i<e.length)){_context153.n=5;break;}if(!n){_context153.n=3;break;}if(!(e[i].profile&&e[i].profile==n&&e[i].schema&&e[i].schema.code&&e[i].schema.code==t)){_context153.n=2;break;}return _context153.a(2,e[i]);case 2:_context153.n=4;break;case 3:if(!(e[i].schema&&e[i].schema.code&&e[i].schema.code==t)){_context153.n=4;break;}return _context153.a(2,e[i]);case 4:i++;_context153.n=1;break;case 5:return _context153.a(2,null);}},_callee153);}));function findInAppFromInAppList(_x196,_x197){return _findInAppFromInAppList.apply(this,arguments);}return findInAppFromInAppList;}()},{key:"findInAppsFromInAppList",value:function(){var _findInAppsFromInAppList=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee154(e,t){var n,i,r;return _regenerator2().w(function(_context154){while(1)switch(_context154.n){case 0:n=[];if(null!=e){i=s.getInAppProfile();for(r=0;r<e.length;r++)i?e[r].schema&&e[r].schema.code&&e[r].schema.code==t&&e[r].profile&&e[r].profile==i&&n.push(e[r]):e[r].schema&&e[r].schema.code&&e[r].schema.code==t&&(void 0===e[r].profile||null===e[r].profile||""===e[r].profile)&&n.push(e[r]);}return _context154.a(2,n);}},_callee154);}));function findInAppsFromInAppList(_x198,_x199){return _findInAppsFromInAppList.apply(this,arguments);}return findInAppsFromInAppList;}()},{key:"getInAppFromIdAndCode",value:function(){var _getInAppFromIdAndCode=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee155(e,t,n){var i,r;return _regenerator2().w(function(_context155){while(1)switch(_context155.n){case 0:i=null;if(null!=e)for(r=0;r<e.length;r++)e[r].schema&&e[r].schema.code&&e[r].schema.code==n&&e[r].inAppId&&e[r].inAppId==t&&(i=e[r]);return _context155.a(2,i);}},_callee155);}));function getInAppFromIdAndCode(_x200,_x201,_x202){return _getInAppFromIdAndCode.apply(this,arguments);}return getInAppFromIdAndCode;}()}]);}();var y=/*#__PURE__*/function(){function y(){_classCallCheck2(this,y);}return _createClass2(y,null,[{key:"inAppWasCached",value:function inAppWasCached(e){var t=s.getInAppCache();for(var n=0;n<t.length;n++){var i=t[n],r=new g("string"==typeof i?JSON.parse(i):i);var o=s.getInAppProfile();if(o){if(r.schema.code===e&&r.profile===o)return r;}else if(r.schema.code===e&&(void 0===r.profile||null===r.profile))return r;}return null;}},{key:"addNewInAppToCache",value:function addNewInAppToCache(e){var t=s.getInAppCache();var n=!1;for(var i=0;i<t.length;i++)try{var r=t[i],o=new g("string"==typeof r?JSON.parse(r):r);var _a7=s.getInAppProfile();if(_a7){if(o.profile&&o.profile===_a7&&o.inAppId===e.inAppId&&o.schema.code===e.schema.code){n=!0;break;}}else if((void 0===o.profile||null===o.profile||""===o.profile)&&o.inAppId===e.inAppId&&o.schema.code===e.schema.code){n=!0;break;}}catch(e){console.log("addNewInAppToCache: JSON parse error",e);}if(!n){e.creationDate=$.getDate(new Date().getTime());var _n14=y.TIME_CACHE;e.cacheTtl&&(_n14=1e3*e.cacheTtl),e.expiredDate=$.getDate(new Date().getTime()+_n14),t.push(e);}s.setInAppCache(t);}},{key:"deleteInAppFromCache",value:function deleteInAppFromCache(e){var t=s.getInAppCache(),n=t.length;return t=t.filter(function(t){try{return!(new g("string"==typeof t?JSON.parse(t):t).schema.code===e.schema.code);}catch(e){return console.log("deleteInAppFromCache: JSON parse error",e),!0;}}),s.setInAppCache(t),n>t.length;}}]);}();_defineProperty2(y,"TIME_CACHE",36e5);var A=y;var m=/*#__PURE__*/_createClass2(function m(e){_classCallCheck2(this,m);e.code&&(this.code=e.code),e.width&&(this.width=e.width),e.height&&(this.height=e.height);});var g=/*#__PURE__*/_createClass2(function g(e){_classCallCheck2(this,g);if(e.cacheTtl&&(this.cacheTtl=e.cacheTtl),e.inAppId&&(this.inAppId=e.inAppId),e.showOnce&&(this.showOnce=e.showOnce),e.version&&(this.version=e.version),e.customData&&(this.customData=e.customData),e.creationDate?this.creationDate=e.creationDate:this.creationDate=$.getDate(new Date().getTime()),e.expiredDate)this.expiredDate=e.expiredDate;else{var _e31=A.TIME_CACHE;this.cacheTtl&&(_e31=1e3*this.cacheTtl),this.expiredDate=$.getDate(new Date().getTime()+_e31);}e.schema&&(this.schema=new m(e.schema)),e.properties&&(this.properties=new I(e.properties)),this.inAppShow=new E(e.inAppShow),e.filters&&(this.filters=e.filters),e.name&&(this.name=e.name),e.profile&&(this.profile=e.profile);}),v=n(315).Core.Api.BaseRequest,S=n(315).Core.Config;var P=/*#__PURE__*/function(_v2){function P(){var _this26;_classCallCheck2(this,P);_this26=_callSuper2(this,P),s.getDeviceId()?_this26.deviceId=s.getDeviceId():_this26.deviceId=$.generateDeviceId();return _this26;}_inherits2(P,_v2);return _createClass2(P,[{key:"setEventType",value:function setEventType(e){this.eventType=e;}},{key:"setInAppId",value:function setInAppId(e){this.inAppId=e;}},{key:"setActionId",value:function setActionId(e){this.actionId=e;}},{key:"setClickedButton",value:function setClickedButton(e){this.clickedButton=e;}},{key:"setLastVersionId",value:function setLastVersionId(e){this.lastVersionId=e;}},{key:"setVersion",value:function setVersion(e){this.version=e;}},{key:"setDeviceId",value:function setDeviceId(e){this.deviceId=e;}},{key:"setPlatform",value:function setPlatform(e){this.platform=e;}},{key:"postEventPrintRequest",value:function postEventPrintRequest(){var e=this.fillJsonEventRequest();return this.body=e,this;}},{key:"postEventClickRequest",value:function postEventClickRequest(){var e=this.fillJsonEventRequest();return e.actionId=this.actionId,this.body=e,this;}},{key:"fillJsonEventRequest",value:function fillJsonEventRequest(){var e={};return e.deviceId=this.deviceId,s.getExternalId()&&(e.externalCode=s.getExternalId()),e.inAppId=this.inAppId,e.platform=S.platform,e.version=this.version,e;}},{key:"postEventInAppRequest",value:function postEventInAppRequest(){var e={};return e.inAppId=this.inAppId,e.lastVersionId=this.lastVersionId,e.deviceId=this.deviceId,this.eventType&&(e.eventType=this.eventType),e.platform=this.platform,e.clickedButton=this.clickedButton,this.body=e,this;}}]);}(v),T=n(315).Core.Api.BaseRequest,O=n(315).Core.Models.EncryptionType;var b=/*#__PURE__*/function(_T3){function b(){var _this27;_classCallCheck2(this,b);_this27=_callSuper2(this,b),l.isValidFieldFormat(s.getExternalId())&&(_this27.customerId=s.getExternalId(),!0!==s.isAvoidCypher()&&s.getEncryptionType()!=O.RAW||(_this27.customerId=encodeURIComponent(s.getExternalId()))),null!=s.getDeviceId()&&(_this27.deviceId=s.getDeviceId());return _this27;}_inherits2(b,_T3);return _createClass2(b,[{key:"setFields",value:function setFields(e){this.fields=e;}},{key:"putCustomerFieldRequest",value:function putCustomerFieldRequest(){return this.params=this.createQueryStringCustomerId(),this.body=this.createBodyJson(),this;}},{key:"createQueryStringCustomerId",value:function createQueryStringCustomerId(){return this.PARAM_CUSTOMER_ID+"="+this.customerId;}},{key:"createBodyJson",value:function createBodyJson(){var e={};try{e.channel="inapp",this.deviceId&&(e.deviceId=this.deviceId),s.getExternalId()&&(e.customerId=s.getExternalId()),this.fields&&(e=this.fields);}catch(e){console.log("Error fieldNames request :"+e);}return e;}}]);}(T),R=n(315).Core.Api.BaseRequest,w=n(315).Core.Config;var N=/*#__PURE__*/function(_R3){function N(){_classCallCheck2(this,N);return _callSuper2(this,N);}_inherits2(N,_R3);return _createClass2(N,[{key:"setInAppId",value:function setInAppId(e){this.inAppId=e;}},{key:"setVersion",value:function setVersion(e){this.version=e;}},{key:"setJsonForm",value:function setJsonForm(e){this.jsonForm=e;}},{key:"postForm",value:function postForm(){return this.body=this.createBody(),this;}},{key:"createBody",value:function createBody(){var e={};return s.getDeviceId()&&(e.deviceId=s.getDeviceId()),s.getExternalId()&&(e.externalCode=s.getExternalId()),this.jsonForm&&(e.form=this.jsonForm),e.inAppId=this.inAppId,e.platform=w.platform,e.version=this.version,e;}}]);}(R);var C=/*#__PURE__*/function(){function C(){_classCallCheck2(this,C);}return _createClass2(C,null,[{key:"sendEventPrint",value:function sendEventPrint(e){var t=new P();t.setInAppId(e.inAppId),t.setVersion(e.version),de.postEventPrint(t);}},{key:"sendEventClick",value:function sendEventClick(e){var t=new P();t.setActionId(e.properties.action.actionId),t.setInAppId(e.inAppId),t.setVersion(e.version),de.postEventClick(t);}},{key:"sendEventForm",value:function sendEventForm(e,t,n){var i=new N();i.setVersion(t),i.setInAppId(e),i.setJsonForm(n),de.postEventForm(i);}},{key:"sendEventFormToCustomer",value:function sendEventFormToCustomer(e){var t=new b();t.setFields(e),de.putCustomerField(t);}}]);}(),_n$Core$Models=n(315).Core.Models,D=_n$Core$Models.DeviceStatus,L=_n$Core$Models.Device,M=n(315).Core.Api.BaseRequest;var U=/*#__PURE__*/function(_M){function U(){var _this28;_classCallCheck2(this,U);_this28=_callSuper2(this,U),_this28.device=new L();return _this28;}_inherits2(U,_M);return _createClass2(U,[{key:"postDeviceRequest",value:function postDeviceRequest(){return this.body=this.createDeviceJson(),this.status!==D.DEFAULT&&(this.body.enabled=1===this.status),this;}},{key:"createDeviceJson",value:function createDeviceJson(){var e={};try{e=this.device.toJSON();}catch(e){console.log(e);}return e;}}]);}(M),_n$Core$Utils2=n(315).Core.Utils,k=_n$Core$Utils2.Log,B=_n$Core$Utils2.CryptoUtils,V=_n$Core$Utils2.CorePermissions,F=n(315).Core.Models.EventType;var $=/*#__PURE__*/function(){function $(){_classCallCheck2(this,$);this.MONTH=24192e5;}return _createClass2($,null,[{key:"onClickAction",value:function onClickAction(e){"false"===s.isAvoidAction()&&e.type==e.URL&&window.open(e.url);}},{key:"addNewInApp",value:function(){var _addNewInApp=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee156(e){return _regenerator2().w(function(_context156){while(1)switch(_context156.n){case 0:_context156.n=1;return _.addInApp(e);case 1:return _context156.a(2);}},_callee156);}));function addNewInApp(_x203){return _addNewInApp.apply(this,arguments);}return addNewInApp;}()},{key:"addNewInAppClick",value:function addNewInAppClick(e){e.properties.numberOfClicks&&e.properties.numberOfClicks>0&&_.addInAppNewClick(e),C.sendEventClick(e);}},{key:"addNewInApptoDismissForever",value:function addNewInApptoDismissForever(e){_.addInAppDismissForever(e);}},{key:"isInAppDismissForever",value:function(){var _isInAppDismissForever=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee157(e){var t;return _regenerator2().w(function(_context157){while(1)switch(_context157.n){case 0:_context157.n=1;return _.searchInAppWithInApp(e);case 1:t=_context157.v;if(!(null!=t)){_context157.n=2;break;}if(!new g(t).inAppShow.wasDismissed){_context157.n=2;break;}return _context157.a(2,!0);case 2:return _context157.a(2,!1);}},_callee157);}));function isInAppDismissForever(_x204){return _isInAppDismissForever.apply(this,arguments);}return isInAppDismissForever;}()},{key:"registerLocation",value:function(){var _registerLocation=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee158(){var e,_t118,_t119;return _regenerator2().w(function(_context158){while(1)switch(_context158.p=_context158.n){case 0:e=new k("[IND]InAppUtils: ");_context158.p=1;if(!("undefined"==typeof navigator||!navigator.geolocation)){_context158.n=2;break;}return _context158.a(2);case 2:_context158.n=3;return V.getLocationPermission();case 3:_t118=_context158.v;"prompt"!==_t118.location&&"granted"!==_t118.location||navigator.geolocation.getCurrentPosition(function(e){s.setLatitude(e.coords.latitude),s.setLongitude(e.coords.longitude);},function(t){e.e("error ".concat((t===null||t===void 0?void 0:t.message)||t)).writeLog();var n=s.getPermissionLocation();n||n===F.EVENT_TYPE_REJECT||s.setPermissionLocation(F.EVENT_TYPE_REJECT);});_context158.n=5;break;case 4:_context158.p=4;_t119=_context158.v;e.e(_t119).writeLog();case 5:return _context158.a(2);}},_callee158,null,[[1,4]]);}));function registerLocation(){return _registerLocation.apply(this,arguments);}return registerLocation;}()},{key:"generateDeviceId",value:function generateDeviceId(){de.postDevice(new U(),function(e){return e;},function(e){return console.log(e),null;});}},{key:"setExternalCode",value:function(){var _setExternalCode=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee159(e){var t,_n15;return _regenerator2().w(function(_context159){while(1)switch(_context159.n){case 0:t=e;if(!e){_context159.n=2;break;}_n15=s.getAppKey();_context159.n=1;return B.createHmac(_n15,e);case 1:t=_context159.v;case 2:return _context159.a(2,(s.setExternalId(t),t));}},_callee159);}));function setExternalCode(_x205){return _setExternalCode.apply(this,arguments);}return setExternalCode;}()},{key:"setExternalCodeWithoutCypher",value:function(){var _setExternalCodeWithoutCypher=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee160(e){return _regenerator2().w(function(_context160){while(1)switch(_context160.n){case 0:_context160.n=1;return s.setExternalId(e);case 1:return _context160.a(2);}},_callee160);}));function setExternalCodeWithoutCypher(_x206){return _setExternalCodeWithoutCypher.apply(this,arguments);}return setExternalCodeWithoutCypher;}()},{key:"convertToJSONArray",value:function(){var _convertToJSONArray=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee161(e){return _regenerator2().w(function(_context161){while(1)switch(_context161.n){case 0:if(!(e&&""!=e)){_context161.n=2;break;}_context161.n=1;return Promise.resolve(e).then(function(e){return JSON.parse(e);});case 1:return _context161.a(2,_context161.v);case 2:return _context161.a(2);}},_callee161);}));function convertToJSONArray(_x207){return _convertToJSONArray.apply(this,arguments);}return convertToJSONArray;}()},{key:"getDate",value:function getDate(e){var t=new Date(e);var n=""+(t.getMonth()+1),i=""+t.getDate();var r=t.getFullYear();var s=t.getHours(),o=t.getMinutes(),a=t.getSeconds();return n.length<2&&(n="0"+n),i.length<2&&(i="0"+i),s.length<2&&(s="0"+s),o.length<2&&(o="0"+o),a.length<2&&(a="0"+a),"".concat(r,"-").concat(n,"-").concat(i," ").concat(s,":").concat(o,":").concat(a);}}]);}(),_n$Core$Models2=n(315).Core.Models,j=_n$Core$Models2.ErrorModel,Y=_n$Core$Models2.ErrorDictionary;var x=new(/*#__PURE__*/function(){function _class14(){_classCallCheck2(this,_class14);}return _createClass2(_class14,[{key:"showError",value:function showError(e,t,n,i){if(null!=e){var _r9=Object.values(e.ErrorCode).indexOf(t);if(_r9>=0){var _t120={code:Object.keys(e.ErrorCode)[_r9],errorId:Object.values(e.ErrorCode)[_r9]};var _s6=Object.values(e.ErrorMessage)[_r9];return _s6&&i&&(_s6=_s6.replaceAll("$x",i)),new j(_t120,_s6,n);}return new j(Y.ErrorCode.GENERAL_ERROR,"general error",n);}}}]);}())(),_n$Core$Utils3=n(315).Core.Utils,W=_n$Core$Utils3.CommonUtils,G=_n$Core$Utils3.ErrorUtils,K=n(315).Core.Models.Channel;var H=/*#__PURE__*/function(){function H(){_classCallCheck2(this,H);}return _createClass2(H,null,[{key:"listTopics",value:function(){var _listTopics=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee162(e,t){var n,i,_e32;return _regenerator2().w(function(_context162){while(1)switch(_context162.n){case 0:n=[],i=this.getTopicsFromLocalStorage();if(null!=i&&""!=i){for(_e32=0;_e32<i.length;_e32++)n.push({code:i[_e32],name:i[_e32],visible:!0,subscribe:!0,parentCode:i[_e32],channel:K.INAPP});W.isFunction(e)&&e(n);}else W.isFunction(t)&&t(x.showError(p,p.ErrorCode.INAPP_TOPIC_EMPTY));case 1:return _context162.a(2);}},_callee162,this);}));function listTopics(_x208,_x209){return _listTopics.apply(this,arguments);}return listTopics;}()},{key:"saveTopics",value:function(){var _saveTopics=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee163(e,t,n){var _n16,_i23,_t121,_t122,_r0,_e33;return _regenerator2().w(function(_context163){while(1)switch(_context163.n){case 0:try{if(e instanceof Array){_n16=[];_i23=this.getTopicsFromLocalStorage();if(null!=_i23&&""!=_i23&&(_n16=_i23),0!==_n16.length){_t121=e.filter(function(e){return!_n16.includes(e);});0!==_t121.length&&_n16.push(_t121);}else for(_t122=0;_t122<e.length;_t122++)_n16.push(e[_t122]);this.setTopicsFromLocalStorage(_n16);_r0=[];for(_e33=0;_e33<_n16.length;_e33++)_r0.push({code:_n16[_e33],name:_n16[_e33],visible:!0,subscribe:!0,parentCode:"",channel:K.INAPP});W.isFunction(t)&&t(_r0);}else W.isFunction(n)&&n(x.showError(p,p.ErrorCode.INAPP_INSTANCE_TOPICS_ERROR));}catch(e){W.isFunction(n)&&n(x.showError(p,p.ErrorCode.INAPP_ERROR,e.message));}case 1:return _context163.a(2);}},_callee163,this);}));function saveTopics(_x210,_x211,_x212){return _saveTopics.apply(this,arguments);}return saveTopics;}()},{key:"deleteAllTopics",value:function(){var _deleteAllTopics=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee164(e,t){var _t123;return _regenerator2().w(function(_context164){while(1)switch(_context164.n){case 0:try{_t123=[];this.setTopicsFromLocalStorage([]),W.isFunction(e)&&e(_t123);}catch(e){W.isFunction(t)&&t(x.showError(p,p.ErrorCode.INAPP_ERROR,e.message));}case 1:return _context164.a(2);}},_callee164,this);}));function deleteAllTopics(_x213,_x214){return _deleteAllTopics.apply(this,arguments);}return deleteAllTopics;}()},{key:"deleteTopics",value:function(){var _deleteTopics=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee165(e,t,n){var _n17,_i24,_r1,_s7,_e34;return _regenerator2().w(function(_context165){while(1)switch(_context165.n){case 0:if(e instanceof Array){_n17=[],_i24=[];_r1=this.getTopicsFromLocalStorage();null!=_r1&&""!=_r1&&(_n17=_r1),0!==_n17.length&&(_i24=_n17.filter(function(t){return!e.includes(t);}),this.setTopicsFromLocalStorage(_i24));_s7=[];if(_i24.length>0)for(_e34=0;_e34<_i24.length;_e34++)_s7.push({code:_i24[_e34],name:_i24[_e34],visible:!0,subscribe:!0,parentCode:"",channel:K.INAPP});W.isFunction(t)&&t(_s7);}else W.isFunction(n)&&n(x.showError(p,p.ErrorCode.INAPP_INSTANCE_TOPICS_ERROR));case 1:return _context165.a(2);}},_callee165,this);}));function deleteTopics(_x215,_x216,_x217){return _deleteTopics.apply(this,arguments);}return deleteTopics;}()},{key:"isSubscribe",value:function isSubscribe(e){var t=[],n=[];if(s.getInAppTopics()&&(n=this.getTopicsFromLocalStorage()),e&&e.length>0)if(n&&n.length>0)for(var _i25=0;_i25<e.length;_i25++){e[_i25].subscribed=!1;for(var _t124=0;_t124<n.length;_t124++)e[_i25].code===n[_t124]&&(e[_i25].subscribed=!0);t.push(e[_i25]);}else{for(var _t125=0;_t125<e.length;_t125++)e[_t125].subscribe=!1;t=e;}return t;}},{key:"getTopicsFromLocalStorage",value:function getTopicsFromLocalStorage(){var e=s.getInAppProfile();var t=[];var n=s.getInAppTopics();if(n&&n.length>0)if(e)for(var _i26=0;_i26<n.length;_i26++)n[_i26].startsWith("".concat(e,"_"))&&t.push(this.removeProfile(n[_i26]));else t=n;return t;}},{key:"setTopicsFromLocalStorage",value:function(){var _setTopicsFromLocalStorage=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee166(e){var t,n,_i27;return _regenerator2().w(function(_context166){while(1)switch(_context166.n){case 0:t=s.getInAppProfile(),n=[];if(e&&e.length>0)for(_i27=0;_i27<e.length;_i27++)t?n.push("".concat(t,"_").concat(e[_i27])):n.push(e[_i27]);s.setInAppTopics(n);case 1:return _context166.a(2);}},_callee166);}));function setTopicsFromLocalStorage(_x218){return _setTopicsFromLocalStorage.apply(this,arguments);}return setTopicsFromLocalStorage;}()},{key:"removeProfile",value:function removeProfile(e){var t=s.getInAppProfile();return t&&e.startsWith("".concat(t,"_"))?e.slice("".concat(t,"_").length):e;}}]);}(),q=n(315).Core.Models.CoreApplication;var J=/*#__PURE__*/function(_q){function J(e){var _this29;var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;_classCallCheck2(this,J);if(_this29=_callSuper2(this,J,[e,t]),e&&e.inapp){var _t126=e.inapp;_t126.enabled&&(_this29.enabled=_t126.enabled),_t126.clearCacheList&&(_this29.clearCacheList=_t126.clearCacheList),_t126.clearCacheAll&&(_this29.clearCacheAll=_t126.clearCacheAll),_t126.clearDatabaseList&&(_this29.clearDatabaseList=_t126.clearDatabaseList),_t126.clearDatabaseAll&&(_this29.clearDatabaseAll=_t126.clearDatabaseAll),_t126.serviceSyncTime&&(_this29.serviceSyncTime=_t126.serviceSyncTime,s.setConfigInAppV2ServiceSyncTime(_this29.serviceSyncTime)),_t126.audienceCache&&(_this29.audienceCache=_t126.audienceCache,_this29.audienceCache.deviceTtl&&(_this29.audienceCacheDeviceTtl=_this29.audienceCache.deviceTtl),s.setAudienceCache(_this29.audienceCacheDeviceTtl)),_this29.inAppLimitToIgnore=50,_t126.inAppLimitToIgnore&&(_this29.inAppLimitToIgnore=_t126.inAppLimitToIgnore),s.setInAppLimitToIgnore(_this29.inAppLimitToIgnore),s.setAudienceDeviceIdEnabled(!1),_t126.audienceDeviceIdEnabled&&s.setAudienceDeviceIdEnabled(_t126.audienceDeviceIdEnabled);}return _this29;}_inherits2(J,_q);return _createClass2(J,[{key:"updateCache",value:function(){var _updateCache=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee167(){var e,_t127,_n18,_t128,_n19,_t129,_t130;return _regenerator2().w(function(_context167){while(1)switch(_context167.n){case 0:e=0;if(this.clearCacheAll&&(s.setAudienceModel(""),s.setAudienceLastUpdate(""),s.setAudienceCache(0),s.setInAppAudienceDateCacheTtl(""),s.setInAppCache([])),this.clearCacheList&&this.clearCacheList.length>0)for(_t127=0;_t127<this.clearCacheList.length;_t127++){_n18=new g(this.clearCacheList[_t127]);if(_n18&&0!=_n18.inAppId){A.deleteInAppFromCache(_n18)&&e++;}}if(this.clearDatabaseAll){e=s.getInAppCache().length,s.clearSessionStorage();}if(!(this.clearDatabaseList&&this.clearDatabaseList.length>0)){_context167.n=7;break;}_t128=0;case 1:if(!(_t128<this.clearDatabaseList.length)){_context167.n=7;break;}_n19=new g(this.clearDatabaseList[_t128]);if(!(_n19&&0!=_n19.inAppId)){_context167.n=6;break;}_t129=!1;if(!(0!=_n19.version)){_context167.n=3;break;}_context167.n=2;return _.deleteInAppIfOldVersion(_n19);case 2:_t130=_context167.v;_context167.n=5;break;case 3:_context167.n=4;return _.deleteInApp(_n19);case 4:_t130=_context167.v;case 5:_t129=_t130;_t129&&e++;case 6:_t128++;_context167.n=1;break;case 7:return _context167.a(2,e);}},_callee167,this);}));function updateCache(){return _updateCache.apply(this,arguments);}return updateCache;}()}]);}(q);var X=/*#__PURE__*/_createClass2(function X(e){_classCallCheck2(this,X);e&&(e.audiences&&(this.audiences=e.audiences),e.lastUpdate&&(this.lastUpdate=e.lastUpdate));}),Q=n(315).Core.Utils.Log,Z="[IND]InAppAudienceUtils";var z=/*#__PURE__*/function(){function z(){_classCallCheck2(this,z);}return _createClass2(z,null,[{key:"isAudienceCacheFinish",value:function isAudienceCacheFinish(){var e=new Q(Z+".isAudienceCacheFinish");if(s.getInAppAudienceDateCacheTtl()&&""!=s.getInAppAudienceDateCacheTtl()){var _t131=new Date(s.getInAppAudienceDateCacheTtl());return!!(_t131&&_t131<Date.now())||(e.d("InApp Audience cache reload on: ".concat(_t131.toISOString())).writeLog(),!1);}return this.saveAudienceCache(s.getAudienceCache()),!0;}},{key:"saveAudienceCache",value:function saveAudienceCache(e){var t=new Q(Z+".saveAudienceCache");var n=216e5;e&&0!=e&&(n=1e3*e);var i=new Date(Date.now()+n).toISOString();t.d("InApp Audience cache reload on: ".concat(i)).writeLog(),s.setInAppAudienceDateCacheTtl(i);}},{key:"saveAudiences",value:function saveAudiences(e){e&&e.audiences&&s.setAudienceModel(JSON.stringify(e));}},{key:"loadAudiences",value:function loadAudiences(){return s.getAudienceModel()&&""!=s.getAudienceModel()?new X(JSON.parse(s.getAudienceModel())):null;}}]);}(),ee=n(315).Core.Utils.CommonUtils;var te=/*#__PURE__*/function(){function te(e,t,n,i,r){_classCallCheck2(this,te);this.topics=e,this.currentPage=t||0,this.totalElements=n,this.limit=s.getInAppTopicPageLimit()||20,this.totalPages=n/this.limit,this.onSuccess=i,this.onError=r;}return _createClass2(te,[{key:"hasNextPage",value:function hasNextPage(){return this.currentPage+1<=this.totalPages;}},{key:"loadNextPage",value:function loadNextPage(){if(this.currentPage+1>this.totalPages)return void(ee.isFunction(onError)&&onError(x.showError(p,p.ErrorCode.INAPP_TOPIC_LIST_NO_MORE_PAGES)));this.currentPage=this.currentPage+1;var e=new t();e.page=this.currentPage,de.getInAppTopicsFromConsole(e,this.onSuccess,this.onError);}}]);}(),ne=n(315).Core.Api.BaseClient,ie=n(315).Core.Config,_n$Core$Models3=n(315).Core.Models,re=_n$Core$Models3.Channel,se=_n$Core$Models3.ErrorModel,_n$Core$Utils4=n(315).Core.Utils,oe=_n$Core$Utils4.TopicUtils,ae=_n$Core$Utils4.CommonUtils,le=_n$Core$Utils4.ErrorUtils,ce=_n$Core$Utils4.Log,ue="[IND]InAppApplication: ";var de=new(/*#__PURE__*/function(_ne){function _class15(){var _this30;_classCallCheck2(this,_class15);_this30=_callSuper2(this,_class15),_this30.ENDPOINT_INAPP="/inapp",_this30.URL_BASE=ie.client.URL_DEVICE_V2+_this30.ENDPOINT_INAPP,_this30.ENDPOINT_CAMPAIGN="/campaign",_this30.ENDPOINT_CAMPAIGN_TAG=_this30.ENDPOINT_CAMPAIGN+"/{tag}",_this30.ENDPOINT_DEVICE="/device",_this30.ENDPOINT_INAPP_AUDIENCE=_this30.ENDPOINT_DEVICE+"/audiences",_this30.ENDPOINT_EVENT_INAPP="/event",_this30.ENDPOINT_EVENT_INAPP_PRINT=_this30.ENDPOINT_EVENT_INAPP+"/print",_this30.ENDPOINT_EVENT_INAPP_CLICK=_this30.ENDPOINT_EVENT_INAPP+"/click",_this30.ENDPOINT_EVENT_INAPP_FORM=_this30.ENDPOINT_EVENT_INAPP+"/form",_this30.ENDPOINT_DEVICE_TOPICS="/topic",_this30.ENDPOINT_CUSTOMER="/customer",_this30.ENDPOINT_CUSTOMER_FIELD=_this30.ENDPOINT_CUSTOMER+"/field",_this30.ENDPOINT_APPLICATION="/application",_this30.isCustomerRequest=!1,_this30.isDeviceRequest=!1,_this30.isApplicationRequest=!1;return _this30;}_inherits2(_class15,_ne);return _createClass2(_class15,[{key:"getURL",value:function(){var _getURL6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee168(){var _e35,_e36,_e37,e;return _regenerator2().w(function(_context168){while(1)switch(_context168.n){case 0:if(!this.isCustomerRequest){_context168.n=2;break;}this.isCustomerRequest=!1;_context168.n=1;return s.getUrlInappApi();case 1:_e35=_context168.v;return _context168.a(2,_e35?_e35=_e35.replaceAll("/".concat(this.ENDPOINT_INAPP),""):ie.client.CUSTOMER_URL_BASE);case 2:if(!this.isDeviceRequest){_context168.n=4;break;}this.isDeviceRequest=!1;_context168.n=3;return s.getUrlInappApi();case 3:_e36=_context168.v;return _context168.a(2,_e36?_e36=_e36.replaceAll("v2","v1"):ie.client.URL_BASE);case 4:if(!this.isApplicationRequest){_context168.n=6;break;}this.isApplicationRequest=!1;_context168.n=5;return s.getUrlInappApi();case 5:_e37=_context168.v;return _context168.a(2,_e37||ie.client.URL_DEVICE_V2);case 6:_context168.n=7;return s.getUrlInappApi();case 7:e=_context168.v;return _context168.a(2,e?e+this.ENDPOINT_INAPP:this.URL_BASE);}},_callee168,this);}));function getURL(){return _getURL6.apply(this,arguments);}return getURL;}()},{key:"getCampaignTag",value:function(){var _getCampaignTag=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee169(e,t,n){var i,_n20,_r10,_o2,_t132,_t133,_t134;return _regenerator2().w(function(_context169){while(1)switch(_context169.n){case 0:_context169.n=1;return this.get(this.ENDPOINT_CAMPAIGN_TAG,e.getCampaignTagRequest());case 1:i=_context169.v;if(!(i&&!(i instanceof se)&&i.data&&Object.keys(i.data).length>0)){_context169.n=6;break;}if(!ae.isFunction(t)){_context169.n=5;break;}_n20=i.data,_r10=s.getInAppProfile();_r10&&(_n20.profile=_r10);_o2=new g(_n20);_o2.properties.numberOfShows>0&&(_o2.inAppShow.timesShowed=1);_o2.properties.dismissForever&&(_o2.inAppShow.wasDismissed=!0);_t132=e.isUpdateInApp();if(_t132){_context169.n=3;break;}_context169.n=2;return _.searchInAppWithInApp(_o2);case 2:_t133=_context169.v;_t132=null!=_t133;case 3:_t134=_t132;if(_t134){_context169.n=4;break;}_context169.n=4;return $.addNewInApp(_o2);case 4:t(_o2);case 5:_context169.n=7;break;case 6:i?i.data&&0===Object.keys(i.data).length&&i.data.constructor===Object&&200==i.statusCode?ae.isFunction(n)&&n(x.showError(p,p.ErrorCode.INAPP_CAMPAIGN_NOT_EXIST)):ae.isFunction(n)&&n(i):ae.isFunction(n)&&n(x.showError(p,p.ErrorCode.INAPP_ERROR_CONTENT_MESSAGE));case 7:return _context169.a(2,null);}},_callee169,this);}));function getCampaignTag(_x219,_x220,_x221){return _getCampaignTag.apply(this,arguments);}return getCampaignTag;}()},{key:"getInAppTopicsFromConsole",value:function(){var _getInAppTopicsFromConsole=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee170(e,t,n){var _i28,_r11,_s8,_o3,_a8;return _regenerator2().w(function(_context170){while(1)switch(_context170.n){case 0:if(!l.isAppKeyFormat()){_context170.n=2;break;}_context170.n=1;return this.get(this.ENDPOINT_DEVICE_TOPICS,e.getTopicsRequest());case 1:_i28=_context170.v;if(!_i28||_i28 instanceof se)_i28?ae.isFunction(n)&&n(_i28):ae.isFunction(n)&&n();else{_r11=oe.setTopicChannel(_i28.data,re.INAPP),_s8=_i28.count?_i28.count:0,_o3=e.page||0,_a8=new te(_r11,_o3,_s8,t,n);ae.isFunction(t)&&t(_a8);}_context170.n=3;break;case 2:ae.isFunction(n)&&n(x.showError(p,p.ErrorCode.INAPP_GENERAL_ERROR));case 3:return _context170.a(2,!0);}},_callee170,this);}));function getInAppTopicsFromConsole(_x222,_x223,_x224){return _getInAppTopicsFromConsole.apply(this,arguments);}return getInAppTopicsFromConsole;}()},{key:"postEventClick",value:function postEventClick(e){l.isAppKeyFormat()&&this.post(this.ENDPOINT_EVENT_INAPP_CLICK,e.postEventClickRequest());}},{key:"postEventPrint",value:function postEventPrint(e){l.isAppKeyFormat()&&this.post(this.ENDPOINT_EVENT_INAPP_PRINT,e.postEventClickRequest());}},{key:"postEventForm",value:function postEventForm(e){l.isAppKeyFormat()&&this.post(this.ENDPOINT_EVENT_INAPP_FORM,e.postForm());}},{key:"putCustomerField",value:function putCustomerField(e){l.isAppKeyFormat()&&(this.isCustomerRequest=!0,this.put(this.ENDPOINT_CUSTOMER_FIELD,e.putCustomerFieldRequest()));}},{key:"postDevice",value:function(){var _postDevice=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee171(e,t,n){var _i29;return _regenerator2().w(function(_context171){while(1)switch(_context171.n){case 0:if(!l.isAppKeyFormat()){_context171.n=2;break;}this.isDeviceRequest=!0;_context171.n=1;return this.post(this.ENDPOINT_DEVICE,e.postDeviceRequest(),"include");case 1:_i29=_context171.v;!_i29||_i29 instanceof se?_i29?ae.isFunction(n)&&n(_i29):ae.isFunction(n)&&n():(_i29.data.deviceId&&s.setDeviceId(_i29.data.deviceId),ae.isFunction(t)&&t(_i29.data.deviceId));_context171.n=3;break;case 2:ae.isFunction(n)&&n(x.showError(p,p.ErrorCode.INAPP_ERROR));case 3:return _context171.a(2,!0);}},_callee171,this);}));function postDevice(_x225,_x226,_x227){return _postDevice.apply(this,arguments);}return postDevice;}()},{key:"getApplicationWithInAppChannel",value:function(){var _getApplicationWithInAppChannel=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee172(e,t,n){var _i30,_r12,_e38,_s9,_e39,_t135;return _regenerator2().w(function(_context172){while(1)switch(_context172.n){case 0:if(!l.isAppKeyFormat()){_context172.n=8;break;}_i30=s.getConfigV2ServiceSyncTime(),_r12=new ce(ue);if(!(null!=_i30&&Date.now()<new Date(_i30))){_context172.n=1;break;}_r12.d("InApp config cache reload on: ".concat(new Date(_i30).toISOString())).writeLog();_e38=JSON.parse(s.getConfigV2());_e38&&ae.isFunction(t)&&t(new J(_e38,!0));_context172.n=7;break;case 1:null!=_i30&&_r12.d("InApp config cache reload on: ".concat(new Date(_i30).toISOString())).writeLog(),this.isApplicationRequest=!0;_context172.n=2;return this.get(this.ENDPOINT_APPLICATION,e.getApplicationRequest());case 2:_s9=_context172.v;if(!(_s9&&!(_s9 instanceof se))){_context172.n=7;break;}if(!(_s9.data&&Object.keys(_s9.data).length>0)){_context172.n=6;break;}if(!ae.isFunction(t)){_context172.n=5;break;}_e39=new J(_s9.data,!1);if(!_e39.enabled){_context172.n=4;break;}_context172.n=3;return _e39.updateCache();case 3:_t135=_context172.v;_t135>0&&_r12.d("Deleted ".concat(_t135," inapp cache from database")).writeLog();case 4:t(_e39);case 5:_context172.n=7;break;case 6:_s9?ae.isFunction(n)&&n(_s9):ae.isFunction(n)&&n();case 7:_context172.n=9;break;case 8:ae.isFunction(n)&&n(x.showError(p,p.ErrorCode.INAPP_ERROR));case 9:return _context172.a(2,!0);}},_callee172,this);}));function getApplicationWithInAppChannel(_x228,_x229,_x230){return _getApplicationWithInAppChannel.apply(this,arguments);}return getApplicationWithInAppChannel;}()},{key:"getAudiences",value:function(){var _getAudiences=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee173(e,t,n){var i,r,_r13,_e40,_e41;return _regenerator2().w(function(_context173){while(1)switch(_context173.n){case 0:i=new ce("".concat(ue,".getAudiences")),r=l.getInAppRegisterInvalidFields();if(!(0===r.length)){_context173.n=2;break;}_context173.n=1;return this.get(this.ENDPOINT_INAPP_AUDIENCE,e.getAudiences());case 1:_r13=_context173.v;if(!_r13||_r13 instanceof se)_r13?ae.isFunction(n)&&n(_r13):ae.isFunction(n)&&n();else{_r13.data?(_e40=new X(_r13.data),_e40.lastUpdate&&s.setAudienceLastUpdate(_e40.lastUpdate),_e40.audiences&&z.saveAudiences(_e40)):_r13.status&&304==_r13.status&&i.d("No audiences modified. No need to sync changes to the device").writeLog(),ae.isFunction(t)&&t(_e40);}_context173.n=3;break;case 2:_e41="Bad request, getAudiences: audience device enabled set to ".concat(s.isAudienceDeviceIdEnabled()," and fields ").concat(r.join(" and ")," not found");ae.isFunction(n)&&n(x.showError(p,p.ErrorCode.INAPP_AUDIENCES_BAD_REQUEST,_e41));case 3:return _context173.a(2);}},_callee173,this);}));function getAudiences(_x231,_x232,_x233){return _getAudiences.apply(this,arguments);}return getAudiences;}()}]);}(ne))(),pe=n(315).Core.Utils.Log;var he=/*#__PURE__*/function(){function he(){_classCallCheck2(this,he);}return _createClass2(he,null,[{key:"getInAppIdFromArraylistOfInAppWithSchemaCode",value:function(){var _getInAppIdFromArraylistOfInAppWithSchemaCode=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee174(e){var t,n,_e42;return _regenerator2().w(function(_context174){while(1)switch(_context174.n){case 0:t=[];_context174.n=1;return this.getAllInAppToIgnoreWithSchemaCode(e);case 1:n=_context174.v;if(n&&n.length>0)for(_e42=0;_e42<n.length;_e42++)0!=n[_e42].inAppId&&t.push(String(n[_e42].inAppId));return _context174.a(2,t);}},_callee174,this);}));function getInAppIdFromArraylistOfInAppWithSchemaCode(_x234){return _getInAppIdFromArraylistOfInAppWithSchemaCode.apply(this,arguments);}return getInAppIdFromArraylistOfInAppWithSchemaCode;}()},{key:"getAllInAppToIgnoreWithSchemaCode",value:function(){var _getAllInAppToIgnoreWithSchemaCode=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee175(e){var t,n,i,_iterator5,_step5,_e43,_n21,_r14,_s0,_o4;return _regenerator2().w(function(_context175){while(1)switch(_context175.n){case 0:t=new pe("[IND]InAppFiltersUtils.getAllInAppToIgnoreWithSchemaCode");_context175.n=1;return _.searchListInAppWithCode(e);case 1:n=_context175.v;i=[];if(n&&n.length>0){_iterator5=_createForOfIteratorHelper2(n);try{for(_iterator5.s();!(_step5=_iterator5.n()).done;){_e43=_step5.value;_n21=_e43.properties.numberOfShows,_r14=_e43.inAppShow.timesShowed,_s0=_e43.properties.numberOfClicks,_o4=_e43.inAppShow.timesClicked;_n21>0&&_r14>=_n21?(i.push(_e43),t.d("inApp ".concat(_e43.inAppId," ").concat(_e43.profile?"with profile ".concat(_e43.profile):"without profile"," was ignored because was shown ").concat(_n21," times")).writeLog()):_s0>0&&_o4>=_s0?(i.push(_e43),t.d("inApp ".concat(_e43.inAppId," ").concat(_e43.profile?"with profile ".concat(_e43.profile):"without profile"," was ignored because was clicked ").concat(_s0," times")).writeLog()):_e43.properties.dismissForever&&_e43.inAppShow.wasDismissed&&(i.push(_e43),t.d("inApp ".concat(_e43.inAppId," ").concat(_e43.profile?"with profile ".concat(_e43.profile):"without profile"," was ignored because was dismissed forever")).writeLog());}}catch(err){_iterator5.e(err);}finally{_iterator5.f();}}else t.d("No InApp on sessionStorage with code ".concat(e," ").concat(s.getInAppProfile()?"and profile ".concat(s.getInAppProfile()):"without profile")).writeLog();return _context175.a(2,this.filterInAppToIgnoreWithInAppList(i));}},_callee175,this);}));function getAllInAppToIgnoreWithSchemaCode(_x235){return _getAllInAppToIgnoreWithSchemaCode.apply(this,arguments);}return getAllInAppToIgnoreWithSchemaCode;}()},{key:"filterInAppToIgnoreWithInAppList",value:function filterInAppToIgnoreWithInAppList(e){var t=s.getInAppLimitToIgnore();if(e.length>t){return _toConsumableArray(e).sort(function(e,t){var n=new Date(e.creationDate||0);return new Date(t.creationDate||0)-n;}).slice(0,t);}return _toConsumableArray(e);}}]);}(),fe=n(315).Core.Api.BaseRequest,Ie=n(315).Core.Models.EncryptionType;var Ee=/*#__PURE__*/function(_fe){function Ee(){var _this31;_classCallCheck2(this,Ee);_this31=_callSuper2(this,Ee),_this31.update=!1,_this31.PARAM_DEVICE_TYPE="deviceType",_this31.PARAM_BROWSER_NAME="browserName",_this31.PARAM_AUDIENCES="audiences",_this31.PARAM_AUDIENCES_VERSION="audiencesVersion",_this31.PARAM_IGNORE_INAPP_ID="ignoreInAppId",_this31.ignoreInAppIds=[];return _this31;}_inherits2(Ee,_fe);return _createClass2(Ee,[{key:"setTag",value:function setTag(e){this.tag=e;}},{key:"setUpdateInApp",value:function setUpdateInApp(e){this.update=e;}},{key:"isUpdateInApp",value:function isUpdateInApp(){return this.update;}},{key:"setIgnoreInAppIds",value:function(){var _setIgnoreInAppIds=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee176(e){return _regenerator2().w(function(_context176){while(1)switch(_context176.n){case 0:_context176.n=1;return he.getInAppIdFromArraylistOfInAppWithSchemaCode(e);case 1:this.ignoreInAppIds=_context176.v;case 2:return _context176.a(2);}},_callee176,this);}));function setIgnoreInAppIds(_x236){return _setIgnoreInAppIds.apply(this,arguments);}return setIgnoreInAppIds;}()},{key:"getCampaignTagRequest",value:function getCampaignTagRequest(){return this.params=this.createQueryString(),this.pathParams["{tag}"]=this.tag,this;}},{key:"createQueryString",value:function createQueryString(){var e="";if(null!=s.getDeviceId()?e+="".concat(this.PARAM_DEVICE_ID,"=").concat(s.getDeviceId(),"&"):$.generateDeviceId(),l.isValidFieldFormat(s.getExternalId())){var _t136=s.getExternalId();!0!==s.isAvoidCypher()&&s.getEncryptionType()!=Ie.RAW||(_t136=encodeURIComponent(s.getExternalId())),e+="".concat(this.PARAM_EXTERNAL_CODE,"=").concat(_t136,"&");}null!=s.getDeviceType()&&(e+="".concat(this.PARAM_DEVICE_TYPE,"=").concat(s.getDeviceType(),"&")),null!=s.getBrowserName()&&(e+="".concat(this.PARAM_BROWSER_NAME,"=").concat(s.getBrowserName(),"&")),null!=s.getLatitude()&&(e+="".concat(this.PARAM_LATITUDE,"=").concat(s.getLatitude(),"&")),null!=s.getLongitude()&&(e+="".concat(this.PARAM_LONGITUDE,"=").concat(s.getLongitude(),"&"));var t=H.getTopicsFromLocalStorage();null!=t&&0!==t.length&&(e+="".concat(this.PARAM_TOPICS,"=").concat(encodeURIComponent(t),"&"));var n=z.loadAudiences();return null!=n&&0!==n.audiences.length&&(e+="".concat(this.PARAM_AUDIENCES,"=").concat(encodeURIComponent(n.audiences),"&")),e+="".concat(this.PARAM_AUDIENCES_VERSION,"=v2&"),this.ignoreInAppIds&&this.ignoreInAppIds.length>0&&(e+="".concat(this.PARAM_IGNORE_INAPP_ID,"=").concat(encodeURIComponent(this.ignoreInAppIds),"&")),e+="".concat(this.PARAM_PLATFORM,"=webpush"),e;}}]);}(fe);var _e=(_Class4=/*#__PURE__*/_createClass2(function _e(e,t){_classCallCheck2(this,_e);this.script=" \n\n var objectFit_".concat(t," = \"contain\" ;\n var containers_").concat(t," = document.getElementById(\"").concat(e,"\").getElementsByClassName(\"ind_slideshow-container\");\n if (containers_").concat(t," && containers_").concat(t,".length > 0 && containers_").concat(t,"[0] && containers_").concat(t,"[0].getAttribute(\"data-carousel-adjust-type\")) {\n objectFit_").concat(t," = containers_").concat(t,"[0].getAttribute(\"data-carousel-adjust-type\"); \n }\n\n var isPartial_").concat(t," = document.getElementById(\"").concat(e,"\").getElementsByClassName(\"ind_slideshow-item-partial\").length > 0;\n \n var slideIndex_").concat(t," = isPartial_").concat(t," ? 1 : 0;\n var delta_").concat(t," = 6;\n \n var diffX_").concat(t,";\n var diffY_").concat(t,";\n var timeSlide_").concat(t," = ").concat(s.getTimeSlideForCarousel(),";\n\n\n var ind_carouselOverlap_").concat(t," = document.getElementById(\"ind_carouselOverlapContainer_").concat(t,"\");\n var ind_carouselOverlapLMainView_").concat(t," = document.getElementById(\"ind_carouselOverlapLMainView_").concat(t,"\")\n \n var indNext_").concat(t," = document.getElementById(\"").concat(e,"\").getElementsByClassName(\"ind_next\");\n var indPrev_").concat(t," = document.getElementById(\"").concat(e,"\").getElementsByClassName(\"ind_prev\");\n indNext_").concat(t,".onclick = () => plusSlides_").concat(t,"(1);\n indPrev_").concat(t,".onclick = () => plusSlides_").concat(t,"(-1);\n\n var slides_").concat(t," = document.getElementById(\"").concat(e,"\").getElementsByClassName(\"ind_slideshow-item\") ? document.getElementById(\"").concat(e,"\").getElementsByClassName(\"ind_slideshow-item\") : document.getElementById(\"").concat(e,"\").getElementsByClassName(\"ind_slideshow-carousel-item\");\n var slider_").concat(t," = document.getElementById(\"").concat(e,"\").querySelector('.ind_slider-container-actions');\n var sliderTotal_").concat(t," = document.getElementById(\"").concat(e,"\").getElementsByClassName(\"ind_slideshow-item\").length ? document.getElementById(\"").concat(e,"\").getElementsByClassName(\"ind_slideshow-item\").length : document.getElementById(\"").concat(e,"\").getElementsByClassName(\"ind_slideshow-carousel-item\").length;\n \n var interval_").concat(t," = setInterval(() => {\n newSlide_").concat(t,"();\n }, timeSlide_").concat(t,");\n\n var imageList_").concat(t," = document.getElementById(\"").concat(e,"\").getElementsByClassName(\"indCOImages_").concat(t,"\");\n \n if (imageList_").concat(t,") {\n setImagesCarouselOverLap_").concat(t,"();\n let docIframeHeight_").concat(t," = document.getElementById(\"").concat(e,"\").clientHeight;\n let docIframeWidth_").concat(t," = document.getElementById(\"").concat(e,"\").clientWidth;\n \n if (document.getElementById(\"ind_carouselOverlapLeftView_").concat(t,"\")) document.getElementById(\"ind_carouselOverlapLeftView_").concat(t,"\").style.height = (docIframeHeight_").concat(t,"-20)+\"px\";\n if (document.getElementById(\"ind_carouselOverlapLRightView_").concat(t,"\")) document.getElementById(\"ind_carouselOverlapLRightView_").concat(t,"\").style.height = (docIframeHeight_").concat(t,"-20)+\"px\";\n if (document.getElementById(\"ind_carouselOverlapLMainView_").concat(t,"\")) document.getElementById(\"ind_carouselOverlapLMainView_").concat(t,"\").style.height = docIframeHeight_").concat(t," + \"px\";\n if (document.getElementById(\"ind_carouselOverlapLMainView_").concat(t,"\")) document.getElementById(\"ind_carouselOverlapLMainView_").concat(t,"\").style.width = docIframeWidth_").concat(t," + \"px\";\n \n }\n if (document.getElementById(\"ind_carousel-overlap-container_").concat(t,"\")) document.getElementById(\"ind_carousel-overlap-container_").concat(t,"\").style.width = docIframeWidth_").concat(t," + \"px\";\n\n function setImagesCarouselOverLap_").concat(t,"() { \n var slides_").concat(t," = document.getElementById(\"").concat(e,"\").getElementsByClassName(\"ind_slideshow-carousel-item\");\n for (let i = 0; i < slides_").concat(t,".length; i++) {\n if (imageList_").concat(t,"[i]) {\n slides_").concat(t,"[i].style.backgroundImage = \"url('\"+imageList_").concat(t,"[i].src+\"')\";\n if (slides_").concat(t,"[i].style) {\n \n slides_").concat(t,"[i].style.backgroundSize = \"cover\";\n }\n slides_").concat(t,"[i].style.backgroundPosition = \"center\";\n } \n }\n const mainView = document.getElementById(\"ind_carouselOverlapLMainView_").concat(t,"\");\n if (mainView) {\n mainView.style.backgroundSize = objectFit_").concat(t,";\n if (slides_").concat(t,"[1]) slides_").concat(t,"[1].onclick = imageList_").concat(t,"[1].onclick; \n }\n }\n\n function shiftRight_").concat(t,"() {\n let newArr = new Array(imageList_").concat(t,".length);\n for (var i = 0; i < imageList_").concat(t,".length; i++) {\n if (i == 0) {\n newArr[i] = imageList_").concat(t,"[imageList_").concat(t,".length-1];\n } else {\n newArr[i] = imageList_").concat(t,"[i-1];\n }\n }\n imageList_").concat(t," = newArr;\n }\n\n function shiftLeft_").concat(t,"() {\n let newArr = new Array(imageList_").concat(t,".length);\n for (var i = 0; i < imageList_").concat(t,".length; i++) {\n if (i+1 == imageList_").concat(t,".length) {\n newArr[i] = imageList_").concat(t,"[0]; \n } else {\n newArr[i] = imageList_").concat(t,"[i+1];\n }\n }\n imageList_").concat(t," = newArr;\n }\n\n \n showSlides_").concat(t,"(slideIndex_").concat(t,");\n \n var startMove_").concat(t," = null;\n var startMoveY_").concat(t," = null;\n \n \n if (slider_").concat(t," && !ind_carouselOverlap_").concat(t,") {\n slider_").concat(t,".addEventListener('touchstart', handleStart_").concat(t,", false);\n slider_").concat(t,".addEventListener('touchend', handleEnd_").concat(t,", false);\n slider_").concat(t,".addEventListener('mousedown', mouseStart_").concat(t,");\n slider_").concat(t,".addEventListener('mouseup', mouseEnd_").concat(t,"); \n } else if (ind_carouselOverlap_").concat(t," && ind_carouselOverlapLMainView_").concat(t,") {\n ind_carouselOverlapLMainView_").concat(t,".addEventListener('touchstart', handleStart_").concat(t,", false);\n ind_carouselOverlapLMainView_").concat(t,".addEventListener('touchend', handleEnd_").concat(t,", false);\n ind_carouselOverlapLMainView_").concat(t,".addEventListener('mousedown', mouseStart_").concat(t,");\n ind_carouselOverlapLMainView_").concat(t,".addEventListener('mouseup', mouseEnd_").concat(t,");\n }\n\n function mouseStart_").concat(t,"(evt) {\n evt.preventDefault();\n startMove_").concat(t," = evt.clientX;\n startMoveY_").concat(t," = evt.clientY;\n }\n\n function mouseEnd_").concat(t,"(evt) {\n evt.preventDefault();\n var endMove = evt.clientX;\n var endMoveY = evt.clientY;\n setEndMove_").concat(t,"(endMove, endMoveY);\n }\n\n function handleStart_").concat(t,"(evt) {\n evt.preventDefault();\n startMove_").concat(t," = evt.touches[0].clientX;\n startMoveY_").concat(t," = evt.touches[0].clientY;\n }\n function handleEnd_").concat(t,"(evt) {\n evt.preventDefault();\n const endMove = evt.changedTouches[0].pageX;\n const endMoveY = evt.changedTouches[0].pageY;\n setEndMove_").concat(t,"(endMove, endMoveY);\n }\n\n function setEndMove_").concat(t,"(endMove, endMoveY) {\n diffX_").concat(t," = Math.abs(endMove - startMove_").concat(t,");\n diffY_").concat(t," = Math.abs(endMoveY - startMoveY_").concat(t,");\n \n if (startMove_").concat(t," != null) {\n if (startMove_").concat(t," > endMove) {\n if (ind_carouselOverlap_").concat(t,") {\n slideIndex_").concat(t," = -1;\n } else {\n slideIndex_").concat(t,"++;\n if (slideIndex_").concat(t," > sliderTotal_").concat(t,") {\n slideIndex_").concat(t," = 1;\n }\n }\n } else {\n if (ind_carouselOverlap_").concat(t,") {\n if (startMove_").concat(t," == endMove) {\n slideIndex_").concat(t," = 0;\n } else {\n slideIndex_").concat(t," = 1;\n }\n } else {\n if (slideIndex_").concat(t," == 0) {\n slideIndex_").concat(t," = sliderTotal_").concat(t,";\n } else {\n slideIndex_").concat(t,"--;\n }\n }\n }\n showSlides_").concat(t,"(slideIndex_").concat(t,");\n setNewInterval_").concat(t,"();\n }\n \n }\n\n function plusSlides_").concat(t,"(n) {\n if (ind_carouselOverlap_").concat(t,") {\n showSlides_").concat(t,"(n == 1 ? -1: 1);\n } else {\n showSlides_").concat(t,"(slideIndex_").concat(t," += n);\n }\n setNewInterval_").concat(t,"();\n }\n\n function currentSlide_").concat(t,"(n) {\n showSlides_").concat(t,"(slideIndex_").concat(t," = n);\n }\n\n function setNewInterval_").concat(t,"() {\n clearInterval(interval_").concat(t,");\n interval_").concat(t," = setInterval(() => {\n newSlide_").concat(t,"();\n }, timeSlide_").concat(t,");\n }\n\n function newSlide_").concat(t,"(){\n slideIndex_").concat(t,"++;\n if (slideIndex_").concat(t," > sliderTotal_").concat(t,") {\n slideIndex_").concat(t," = 1;\n }\n showSlides_").concat(t,"(slideIndex_").concat(t,");\n }\n\n function showSlides_").concat(t,"(n) {\n let view = document.getElementById(\"").concat(e,"\") ? document.getElementById(\"").concat(e,"\") : document;\n if (view) {\n if (ind_carouselOverlap_").concat(t,") { \n if (n < 0) {\n shiftLeft_").concat(t,"();\n } else if (n > 0) {\n shiftRight_").concat(t,"();\n }\n setImagesCarouselOverLap_").concat(t,"();\n } else {\n let i;\n const dots = view.getElementsByClassName(\"ind_dot\");\n if (n > slides_").concat(t,".length) {slideIndex_").concat(t," = 1;}\n if (n < 1) {slideIndex_").concat(t," = slides_").concat(t,".length;}\n for (i = 0; i < slides_").concat(t,".length; i++) {\n slides_").concat(t,"[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_").concat(t,"[slideIndex_").concat(t,"-1]) {\n slides_").concat(t,"[slideIndex_").concat(t,"-1].style.display = \"block\";\n }\n if (dots[slideIndex_").concat(t,"-1]) dots[slideIndex_").concat(t,"-1].className += \" active\";\n }\n }\n }\n\n\n function inAppIndigitallOnClick_").concat(t,"(action) {\n if (diffX_").concat(t," && diffY_").concat(t,") {\n if (diffX_").concat(t," < delta_").concat(t," && diffY_").concat(t," < delta_").concat(t,") {\n indigitall.InApp.inAppOnClick(action);\n }\n } else {\n indigitall.InApp.inAppOnClick(action);\n }\n }\n\n function inAppIndigitallSubmit_").concat(t,"(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=" ";}),_defineProperty2(_Class4,"INAPP_TIME_SLIDE_CAROUSEL",1e4),_Class4),ye=Object.freeze({TEXT:"text",NUMBER:"number",RADIO:"radio",CHECKBOX:"checkbox",SELECT:"select"});var Ae=/*#__PURE__*/_createClass2(function Ae(e){_classCallCheck2(this,Ae);if(e.id&&(this.id=e.id),e.name&&(this.name=e.name),e.type)switch(e.type){case"text":this.type=ye.TEXT;break;case"checkbox":this.type=ye.CHECKBOX;break;case"number":this.type=ye.NUMBER;break;case"radio":this.type=ye.RADIO;break;case"select":this.type=ye.SELECT;}e.required&&(this.required=e.required),e.sendToCustomer&&(this.sendToCustomer=e.sendToCustomer);});var me=/*#__PURE__*/_createClass2(function me(e){_classCallCheck2(this,me);if(e.inAppId&&(this.inAppId=e.inAppId),e.formId&&(this.formId=e.formId),e.inappVersion&&(this.inappVersion=e.inappVersion),e.inputs&&Array.isArray(e.inputs)){this.inputs=[];for(var _t137=0;_t137<e.inputs.length;_t137++)this.inputs.push(new Ae(e.inputs[_t137]));}}),ge=n(315).Core.Utils.ErrorUtils;var ve=/*#__PURE__*/function(){function ve(){_classCallCheck2(this,ve);}return _createClass2(ve,null,[{key:"checkFieldsForm",value:function checkFieldsForm(e,t,n){var i=[];if(t&&e.inputs&&e.inputs.length>0)for(var _n22=0;_n22<e.inputs.length;_n22++){var _r15=this.checkInputType(e.inputs[_n22],t);null!=_r15&&i.push(_r15);}if(i.length>0)return i;t&&0!==Object.keys(t).length&&C.sendEventForm(e.inAppId,e.inappVersion,t),n&&0!==Object.keys(n).length&&C.sendEventFormToCustomer(n);}},{key:"checkInputType",value:function checkInputType(e,t){if(null!=e.id)switch(e.type){case ye.TEXT:if(e.required){if(!t[e.id])return x.showError(p,2121,e.id);if(!t[e.id]instanceof String)return x.showError(p,2120,"The field ".concat(e.id," is not text"));}break;case ye.NUMBER:if(e.required){if(!t[e.id])return x.showError(p,2121,e.id);if(!t[e.id]instanceof String){if(!parseInt(t[e.id]))return x.showError(p,2120,"The field ".concat(e.id," is not number"));}else if(!t[e.id]instanceof int)return x.showError(p,2120,"The field ".concat(e.id," is not number"));}break;default:if(e.required&&t[e.id]&&""==t[e.id])return x.showError(p,2121,e.id);}return null;}},{key:"editingFormHtml",value:function editingFormHtml(e,t){return e.replaceAll("InAppIndigitall.onClick","inAppIndigitallOnClick_".concat(t)).replaceAll("InAppIndigitall.submit","inAppIndigitallSubmit_".concat(t)).replaceAll("plusSlides","plusSlides_".concat(t)).replaceAll("indCOImages","indCOImages_".concat(t)).replaceAll("ind_carouselOverlapLeftView","ind_carouselOverlapLeftView_".concat(t)).replaceAll("ind_carouselOverlapLRightView","ind_carouselOverlapLRightView_".concat(t)).replaceAll("ind_carouselOverlapLMainView","ind_carouselOverlapLMainView_".concat(t)).replaceAll("ind_carouselOverlapContainer","ind_carouselOverlapContainer_".concat(t)).replaceAll("setImagesCarouselOverLap","setImagesCarouselOverLap_".concat(t)).replaceAll("shiftRight","shiftRight_".concat(t)).replaceAll("shiftLeft","shiftLeft_".concat(t)).replaceAll("currentSlide","currentSlide_".concat(t)).replaceAll("setNewInterval","setNewInterval_".concat(t)).replaceAll("newSlide","newSlide_".concat(t)).replaceAll("showSlides","showSlides_".concat(t));}}]);}();var Se=/*#__PURE__*/function(){function Se(){_classCallCheck2(this,Se);}return _createClass2(Se,null,[{key:"onClick",value:function(){var _onClick=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee177(e){var _t138,_n23,_i31,_e44,_n24,_t139;return _regenerator2().w(function(_context177){while(1)switch(_context177.n){case 0:if(!e){_context177.n=2;break;}_t138=JSON.parse(e);_t138.inAppId&&(_n23=_t138.inAppId),_t138.inappId&&(_n23=_t138.inappId);_context177.n=1;return _.searchInAppWithInAppId(_n23);case 1:_i31=_context177.v;if(_i31&&_t138.action){_e44=new g(_i31),_n24=new h(_t138.action);if(_e44.properties.setAction(_n24),$.onClickAction(_n24),_e44){$.addNewInAppClick(_e44);_t139=new CustomEvent("didClicked",{detail:{action:_n24},bubbles:!0,cancelable:!0,composed:!1});self.dispatchEvent(_t139);}}else console.log("InApp ".concat(_t138.schema," not found"));_context177.n=3;break;case 2:console.log("InApp action is empty");case 3:return _context177.a(2);}},_callee177);}));function onClick(_x237){return _onClick.apply(this,arguments);}return onClick;}()},{key:"submit",value:function submit(e,t,n){if(e){var _i32=new me(JSON.parse(e));if(t){var _e45=ve.checkFieldsForm(_i32,JSON.parse(t),JSON.parse(n));if(_e45&&_e45.length>0){var _t140=new CustomEvent("didFormError",{detail:{errorList:_e45},bubbles:!0,cancelable:!0,composed:!1});self.dispatchEvent(_t140);}else{var _e46=new CustomEvent("didFormSubmit",{detail:{jsonForm:JSON.parse(t)},bubbles:!0,cancelable:!0,composed:!1});self.dispatchEvent(_e46);}}}}}]);}(),_n$Core$Utils5=n(315).Core.Utils,Pe=_n$Core$Utils5.Log,Te=_n$Core$Utils5.ErrorUtils,Oe=_n$Core$Utils5.CommonUtils,be="[IND]ShowInAppUtils: ";var Re=/*#__PURE__*/function(){function Re(){_classCallCheck2(this,Re);}return _createClass2(Re,null,[{key:"inAppWasGot",value:function(){var _inAppWasGot=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee178(e,t,n,i,r,s,o,a,l){var c,u,d,_e47,_r16,_n25,_r17;return _regenerator2().w(function(_context178){while(1)switch(_context178.n){case 0:c=A.inAppWasCached(e),u=new Date().getTime(),d=new Pe(be);if(!(null!=c)){_context178.n=4;break;}_e47=new g(c),_r16=new Date(_e47.expiredDate).getTime();if(!(d.d("InApp ".concat(_e47.inAppId," ").concat(_e47.schema.code," cache reload on: ").concat(new Date(_r16).toLocaleString())).writeLog(),u<_r16)){_context178.n=2;break;}_context178.n=1;return _.searchInAppWithInApp(_e47);case 1:_n25=_context178.v;_r17=this.wasInAppPassedFilterProperties(_n25);null!=_r17?this.setErrorFilter(_n25,_r17,s,o,a):Oe.isFunction(i)&&i(_n25||_e47,t);_context178.n=3;break;case 2:Oe.isFunction(n)&&n(_e47,x.showError(p,p.ErrorCode.INAPP_WAS_EXPIRED)),d.d("InApp ".concat(_e47.inAppId,": ").concat(p.ErrorMessage.INAPP_WAS_EXPIRED)).writeLog(),A.deleteInAppFromCache(_e47),Re.updateInAppGet(_e47.schema.code,s,o,a,function(e){Oe.isFunction(i)&&i(e,t);},function(e){Oe.isFunction(l)&&l(e);});case 3:_context178.n=5;break;case 4:Oe.isFunction(r)&&r(e,t);case 5:return _context178.a(2);}},_callee178,this);}));function inAppWasGot(_x238,_x239,_x240,_x241,_x242,_x243,_x244,_x245,_x246){return _inAppWasGot.apply(this,arguments);}return inAppWasGot;}()},{key:"wasInAppPassedFilterProperties",value:function wasInAppPassedFilterProperties(e){var t=new Pe(be);if(e&&e.properties){if(e.properties.dismissForever&&e.inAppShow.wasDismissed)return p.ErrorCode.INAPP_WAS_DISMISSED_FOREVER;{e.properties.dismissForever&&$.addNewInApptoDismissForever(e);var _n26=e.properties.numberOfShows,_i33=e.inAppShow?e.inAppShow.timesShowed:null,_r18=e.properties.numberOfClicks,_s1=e.inAppShow?e.inAppShow.timesClicked:null;if(_n26>0){if(!(null!=_i33&&_i33<_n26))return p.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES;t.d("inApp ".concat(e.inAppId," ").concat(e.profile?"with profile ".concat(e.profile):"without profile"," was shown ").concat(_i33+1," times and will stop showing after ").concat(_n26," times")).writeLog(),_.addInAppNewShow(e);}if(_r18>0){if(null!=_s1&&_s1>=_r18)return p.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES;t.d("inApp ".concat(e.inAppId," ").concat(e.profile?"with profile ".concat(e.profile):"without profile"," was clicked ").concat(_s1," times and will stop showing with ").concat(_r18," clicks")).writeLog();}}}return null;}},{key:"updateInAppGet",value:function(){var _updateInAppGet=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee180(e,t,n,i,r,s){var _this32=this;return _regenerator2().w(function(_context180){while(1)switch(_context180.n){case 0:$e.getInAppWithUpdate(e,!0,/*#__PURE__*/function(){var _ref=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee179(e){var s,_e48;return _regenerator2().w(function(_context179){while(1)switch(_context179.n){case 0:_context179.n=1;return _.updateInApp(e);case 1:s=_context179.v;if(!s){_context179.n=3;break;}_e48=_this32.wasInAppPassedFilterProperties(s);if(!(null!=_e48)){_context179.n=2;break;}return _context179.a(2,void _this32.setErrorFilter(s,_e48,t,n,i));case 2:_context179.n=5;break;case 3:_context179.n=4;return $.addNewInApp(e);case 4:s=e;case 5:A.addNewInAppToCache(s),Oe.isFunction(r)&&r(s);case 6:return _context179.a(2);}},_callee179);}));return function(_x253){return _ref.apply(this,arguments);};}(),function(e){e.data&&e.data=={}&&200==e.statusCode?Oe.isFunction(s)&&s(x.showError(p,p.ErrorCode.INAPP_CAMPAIGN_NOT_EXIST)):Oe.isFunction(s)&&s(e);});case 1:return _context180.a(2);}},_callee180);}));function updateInAppGet(_x247,_x248,_x249,_x250,_x251,_x252){return _updateInAppGet.apply(this,arguments);}return updateInAppGet;}()},{key:"isInAppSaveOnDDBBAndFilters",value:function(){var _isInAppSaveOnDDBBAndFilters=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee181(e,t,n,i){var r,_s10,_o5;return _regenerator2().w(function(_context181){while(1)switch(_context181.n){case 0:_context181.n=1;return _.searchInAppWithInApp(e);case 1:r=_context181.v;if(!(null!=r)){_context181.n=2;break;}_s10=A.TIME_CACHE;_o5=this.wasInAppPassedFilterProperties(r);return _context181.a(2,null!=_o5?(this.setErrorFilter(r,_o5,t,n,i),e.cacheTtl&&(_s10=1e3*r.cacheTtl),r.expiredDate=$.getDate(new Date().getTime()+_s10),A.addNewInAppToCache(r),!1):(e.cacheTtl&&(_s10=1e3*r.cacheTtl),r.expiredDate=$.getDate(new Date().getTime()+_s10),A.addNewInAppToCache(r),!0));case 2:_context181.n=3;return $.addNewInApp(e);case 3:A.addNewInAppToCache(e);return _context181.a(2,!0);}},_callee181,this);}));function isInAppSaveOnDDBBAndFilters(_x254,_x255,_x256,_x257){return _isInAppSaveOnDDBBAndFilters.apply(this,arguments);}return isInAppSaveOnDDBBAndFilters;}()},{key:"setErrorFilter",value:function setErrorFilter(e,t,n,i,r){t==p.ErrorCode.INAPP_WAS_DISMISSED_FOREVER&&Oe.isFunction(n)&&n(e,x.showError(p,null,p.ErrorCode.INAPP_WAS_DISMISSED_FOREVER)),t==p.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES&&Oe.isFunction(i)&&i(e,x.showError(p,e.properties.numberOfShows,p.ErrorCode.INAPP_WAS_SHOWN_MANY_TIMES)),t==p.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES&&Oe.isFunction(r)&&r(e,x.showError(p,e.properties.numberOfClicks,p.ErrorCode.INAPP_WAS_CLICKED_MANY_TIMES));}},{key:"inAppWasShown",value:function(){var _inAppWasShown=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee182(e,t,n,i,r){var s;return _regenerator2().w(function(_context182){while(1)switch(_context182.n){case 0:s=new Pe(be);e.schema.code&&this.inAppWasGot(e.schema.code,null,t,function(e){Oe.isFunction(r)&&r(e);},function(){Oe.isFunction(r)&&r(e);},function(e,t){s.d("inAppWasShown: "+e.inAppId+" with error: "+t.errorMessage).writeLog();},n,i);case 1:return _context182.a(2);}},_callee182,this);}));function inAppWasShown(_x258,_x259,_x260,_x261,_x262){return _inAppWasShown.apply(this,arguments);}return inAppWasShown;}()}]);}();var we=Re,Ne=n(315).Core.Api.BaseApplicationRequest;var Ce=/*#__PURE__*/function(_Ne){function Ce(){_classCallCheck2(this,Ce);return _callSuper2(this,Ce,[["inApp"]]);}_inherits2(Ce,_Ne);return _createClass2(Ce);}(Ne),De=n(315).Core.Models.EncryptionType,Le=n(315).Core.Api.BaseApplicationRequest;var Me=/*#__PURE__*/function(_Le){function Me(){var _this33;_classCallCheck2(this,Me);_this33=_callSuper2(this,Me),_this33.PARAM_LAST_SYNC="lastSync";return _this33;}_inherits2(Me,_Le);return _createClass2(Me,[{key:"getAudiences",value:function getAudiences(){return this.params=this.createQueryString(),this;}},{key:"createQueryString",value:function createQueryString(){var e=[];if(s.getDeviceId()&&e.push("".concat(this.PARAM_DEVICE_ID,"=").concat(s.getDeviceId())),s.getAudienceLastUpdate()&&e.push("".concat(this.PARAM_LAST_SYNC,"=").concat(encodeURIComponent(s.getAudienceLastUpdate()))),l.isValidFieldFormat(s.getExternalId())){var _t141=s.getExternalId();!0!==s.isAvoidCypher()&&s.getEncryptionType()!=De.RAW||(_t141=encodeURIComponent(_t141)),e.push("".concat(this.PARAM_EXTERNAL_CODE,"=").concat(_t141));}return e.join("&");}}]);}(Le),_n$Core$Utils6=n(315).Core.Utils,Ue=_n$Core$Utils6.ErrorUtils,ke=_n$Core$Utils6.CommonUtils,Be=_n$Core$Utils6.LogLevel,Ve=_n$Core$Utils6.Log;var Fe=/*#__PURE__*/function(){function Fe(){_classCallCheck2(this,Fe);_defineProperty2(this,"private",void 0);this.LogLevel=Be,this.inAppIndigitallInterface=Se;}return _createClass2(Fe,null,[{key:"init",value:function(){var _init=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee183(e,t,n){var _t142;return _regenerator2().w(function(_context183){while(1)switch(_context183.n){case 0:_t142=null!=e.appKey;if(!_t142){_context183.n=1;break;}_context183.n=1;return s.setAppKey(e.appKey);case 1:e.urlInAppApi&&s.setUrlInappApi(e.urlInAppApi);s.setAvoidCypher(!!e.avoidCypher);s.setAvoidAction(!!e.avoidAction);e.logLevel&&s.setLogLevel(e.logLevel);!0===e.requestLocation&&$.registerLocation();s.setInAppProfile("");e.profile&&s.setInAppProfile(e.profile);s.setTimeoutRequestsInMilliseconds(0);e.timeoutRequestsInMilliseconds&&s.setTimeoutRequestsInMilliseconds(e.timeoutRequestsInMilliseconds);s.setTimeSlideForCarousel(e.timeSlideForCarousel?e.timeSlideForCarousel:_e.INAPP_TIME_SLIDE_CAROUSEL);de.getApplicationWithInAppChannel(new Ce(),function(e){z.isAudienceCacheFinish()?de.getAudiences(new Me(),function(n){z.saveAudienceCache(e.audienceCacheDeviceTtl),ke.isFunction(t)&&t(e);},function(i){var r=new Ve("[IND]InAppIndigitall: .init: getApplicationWithInAppChannel");i&&i.errorMessage&&r.e(i.exceptionMessage).writeLog(),ke.isFunction(n)&&n(i),ke.isFunction(t)&&t(e);}):ke.isFunction(t)&&t(e);},n);case 2:return _context183.a(2);}},_callee183);}));function init(_x263,_x264,_x265){return _init.apply(this,arguments);}return init;}()},{key:"showInApp",value:function(){var _showInApp=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee184(e,t,n,i){var r;return _regenerator2().w(function(_context184){while(1)switch(_context184.n){case 0:r={appKey:s.getAppKey(),urlInAppApi:"https://device-api.indigitall.com/v2",requestLocation:!0,logLevel:Be.DEBUG,inAppCode:e,viewId:t};this.showInAppWithConfig(r,null,null,null,null,null,null,n,i,null,null);case 1:return _context184.a(2);}},_callee184,this);}));function showInApp(_x266,_x267,_x268,_x269){return _showInApp.apply(this,arguments);}return showInApp;}()},{key:"showInAppWithCallback",value:function(){var _showInAppWithCallback=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee185(e){var t,n,_args168=arguments;return _regenerator2().w(function(_context185){while(1)switch(_context185.n){case 0:t=_args168.length>1&&_args168[1]!==undefined?_args168[1]:{};n=["onShowTimeFinished","didExpired","didShowManyTimes","didClickOut","didDismissForever","didClicked","success","error","didFormError","didFormSubmit"].map(function(e){return function(){"function"==typeof t[e]&&t[e].apply(t,arguments);};});return _context185.a(2,this.showInAppWithConfig.apply(this,[e].concat(_toConsumableArray(n))));}},_callee185,this);}));function showInAppWithCallback(_x270){return _showInAppWithCallback.apply(this,arguments);}return showInAppWithCallback;}()},{key:"showInAppWithConfig",value:function(){var _showInAppWithConfig=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee187(e,t,n,i,r,s,o,a,c,u,d){var _this34=this;return _regenerator2().w(function(_context187){while(1)switch(_context187.n){case 0:_context187.n=1;return this.init(e,function(n){l.isAppKeyFormat()?we.inAppWasGot(e.inAppCode,e.viewId,null,/*#__PURE__*/function(){var _ref2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee186(e,n){return _regenerator2().w(function(_context186){while(1)switch(_context186.n){case 0:e&&e.properties&&_this34.createInApp(e,n,o,a,c,t,u,d);case 1:return _context186.a(2);}},_callee186);}));return function(_x282,_x283){return _ref2.apply(this,arguments);};}(),function(e,n){_this34.drawInApp(e,n,t,o,a,c,u,d,s,i,r);},s,i,r,c):ke.isFunction(c)&&c(x.showError(p,p.ErrorCode.BAD_REQUEST_SERVER_ERROR));},c);case 1:return _context187.a(2);}},_callee187,this);}));function showInAppWithConfig(_x271,_x272,_x273,_x274,_x275,_x276,_x277,_x278,_x279,_x280,_x281){return _showInAppWithConfig.apply(this,arguments);}return showInAppWithConfig;}()},{key:"showMultipleInApp",value:function showMultipleInApp(e,t,n,i){var r={appKey:s.getAppKey(),urlInAppApi:"https://device-api.indigitall.com/v2",requestLocation:!0,logLevel:Be.DEBUG,inAppCodeList:e,divList:t};this.showMultipleInAppWithConfig(r,null,null,null,null,null,null,n,i,null,null);}},{key:"showMultipleInAppWithCallback",value:function(){var _showMultipleInAppWithCallback=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee188(e){var t,n,_args171=arguments;return _regenerator2().w(function(_context188){while(1)switch(_context188.n){case 0:t=_args171.length>1&&_args171[1]!==undefined?_args171[1]:{};n=["onShowTimeFinished","didExpired","didShowManyTimes","didClickOut","didDismissForever","didClicked","success","error","didFormError","didFormSubmit"].map(function(e){return function(){"function"==typeof t[e]&&t[e].apply(t,arguments);};});return _context188.a(2,this.showMultipleInAppWithConfig.apply(this,[e].concat(_toConsumableArray(n))));}},_callee188,this);}));function showMultipleInAppWithCallback(_x284){return _showMultipleInAppWithCallback.apply(this,arguments);}return showMultipleInAppWithCallback;}()},{key:"showMultipleInAppWithConfig",value:function(){var _showMultipleInAppWithConfig=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee190(e,t,n,i,r,s,o,a,c,u,d){var _this35=this;return _regenerator2().w(function(_context190){while(1)switch(_context190.n){case 0:_context190.n=1;return this.init(e,function(n){if(l.isAppKeyFormat()){if(e.inAppCodeList.length==e.divList.length&&e.inAppCodeList.length>0)for(var h=0;h<e.inAppCodeList.length;h++)we.inAppWasGot(e.inAppCodeList[h],e.divList[h],null,/*#__PURE__*/function(){var _ref3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee189(e,n){return _regenerator2().w(function(_context189){while(1)switch(_context189.n){case 0:e&&e.properties&&_this35.createInApp(e,n,o,a,c,t,u,d);case 1:return _context189.a(2);}},_callee189);}));return function(_x296,_x297){return _ref3.apply(this,arguments);};}(),function(e,n){Fe.drawInApp(e,n,t,o,a,c,u,d,s,i,r);},s,i,r);}else ke.isFunction(c)&&c(x.showError(p,p.ErrorCode.BAD_REQUEST_SERVER_ERROR));},c);case 1:return _context190.a(2);}},_callee190,this);}));function showMultipleInAppWithConfig(_x285,_x286,_x287,_x288,_x289,_x290,_x291,_x292,_x293,_x294,_x295){return _showMultipleInAppWithConfig.apply(this,arguments);}return showMultipleInAppWithConfig;}()},{key:"drawInApp",value:function(){var _drawInApp=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee192(e,t,n,i,r,s,o,a,l,c,u){var _this36=this;return _regenerator2().w(function(_context192){while(1)switch(_context192.n){case 0:this.getInApp(e,/*#__PURE__*/function(){var _ref4=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee191(e){var _t143,_t144;return _regenerator2().w(function(_context191){while(1)switch(_context191.n){case 0:_t143=e&&e.properties;if(!_t143){_context191.n=2;break;}_context191.n=1;return we.isInAppSaveOnDDBBAndFilters(e,l,c,u);case 1:_t143=_context191.v;case 2:_t144=_t143;if(!_t144){_context191.n=3;break;}_this36.createInApp(e,t,i,r,s,n,o,a);case 3:return _context191.a(2);}},_callee191);}));return function(_x309){return _ref4.apply(this,arguments);};}(),s);case 1:return _context192.a(2);}},_callee192,this);}));function drawInApp(_x298,_x299,_x300,_x301,_x302,_x303,_x304,_x305,_x306,_x307,_x308){return _drawInApp.apply(this,arguments);}return drawInApp;}()},{key:"createInApp",value:function(){var _createInApp=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee193(e,t,n,i,r,s,o,a){var _r19,_l2,_c,_u2,_d8,_e49,_t145,_n27,_t146,_i34,_t147;return _regenerator2().w(function(_context193){while(1)switch(_context193.p=_context193.n){case 0:if(!(e&&e.properties&&e.properties.contentUrl)){_context193.n=6;break;}_context193.p=1;_r19=document.getElementById(t);if(!_r19){_context193.n=4;break;}_r19.style.position="relative",_r19.style.overflow="hidden";_context193.n=2;return fetch(e.properties.contentUrl);case 2:_l2=_context193.v;_context193.n=3;return _l2.text();case 3:_c=_context193.v;null!=e.customData&&Object.keys(e.customData).forEach(function(t){_c=_c.replaceAll("{{".concat(t,"}}"),e.customData[t]);}),e.version&&(_c=_c.replaceAll("'inappVersion':'{{version}}'","'inappVersion':"+e.version));_u2=t.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,""),_d8=ve.editingFormHtml(_c,_u2);if(_r19.innerHTML=_d8,"undefined"===document.getElementById("script_".concat(_u2))||null===document.getElementById("script_".concat(_u2))){_e49=document.createElement("script");_e49.id="script_".concat(_u2),_e49.type="text/javascript",_e49.innerHTML=new _e(t,_u2).script,_r19.appendChild(_e49);}if(e._eventListeners||(e._eventListeners={}),e._eventListeners.didClicked&&self.removeEventListener("didClicked",e._eventListeners.didClicked),e._eventListeners.didFormError&&self.removeEventListener("didFormError",e._eventListeners.didFormError),e._eventListeners.didFormSubmit&&self.removeEventListener("didFormSubmit",e._eventListeners.didFormSubmit),e._eventListeners.didClicked=function(t){var _t$detail;n&&n(e,t===null||t===void 0||(_t$detail=t.detail)===null||_t$detail===void 0?void 0:_t$detail.action);},e._eventListeners.didFormError=function(t){var _t$detail2;o&&o(e,t===null||t===void 0||(_t$detail2=t.detail)===null||_t$detail2===void 0?void 0:_t$detail2.errorList);},e._eventListeners.didFormSubmit=function(t){var _t$detail3;var n=t===null||t===void 0||(_t$detail3=t.detail)===null||_t$detail3===void 0?void 0:_t$detail3.jsonForm;a&&a(e,n);},self.addEventListener("didClicked",e._eventListeners.didClicked),self.addEventListener("didFormError",e._eventListeners.didFormError),self.addEventListener("didFormSubmit",e._eventListeners.didFormSubmit),e.properties.showTime){_t145=0;_n27=setInterval(function(){_t145++,_t145==parseInt(e.properties.showTime)&&(_r19.style.display="none",clearInterval(_n27),ke.isFunction(s)&&s(e,_r19,1e3*e.properties.showTime));},1e3);}if(e.properties.layout&&e.properties.layout.borderRadius){_t146="".concat(parseInt(e.properties.layout.borderRadius),"px");_r19.style.borderRadius=_t146;}ke.isFunction(i)&&i(e,_r19),C.sendEventPrint(e);case 4:_context193.n=6;break;case 5:_context193.p=5;_t147=_context193.v;_i34=null;e&&e.schema&&e.schema.code&&(_i34=e.schema.code),ke.isFunction(r)&&r(_t147,t,_i34);case 6:return _context193.a(2);}},_callee193,null,[[1,5]]);}));function createInApp(_x310,_x311,_x312,_x313,_x314,_x315,_x316,_x317){return _createInApp.apply(this,arguments);}return createInApp;}()},{key:"topicsList",value:function topicsList(e,t){return H.listTopics(e,t),!0;}},{key:"topicsListFromConsole",value:function topicsListFromConsole(e,n,i){var r=20;return e&&(e.limit>20&&(r=e.limit),e.urlInAppApi&&s.setUrlInappApi(e.urlInAppApi),e.appKey&&!s.getAppKey()&&s.setAppKey(e.appKey)),s.setInAppTopicPageLimit(r),de.getInAppTopicsFromConsole(new t(),n,i),!0;}},{key:"topicsSubscribe",value:function topicsSubscribe(e,t,n){H.saveTopics(e,t,n);}},{key:"topicsUnsubscribe",value:function topicsUnsubscribe(e,t,n){H.deleteTopics(e,t,n);}},{key:"topicsUnsubscribeAll",value:function topicsUnsubscribeAll(e,t){H.deleteAllTopics(e,t);}},{key:"inAppGet",value:function inAppGet(e,t,n){this.getInApp(e,t,n);}},{key:"getInApp",value:function getInApp(e,t,n){this.getInAppWithUpdate(e,!1,t,n);}},{key:"getInAppWithUpdate",value:function getInAppWithUpdate(e,t,n,i){if(l.isAppKeyFormat()){var _r20=new Ee();_r20.setTag(e),_r20.setUpdateInApp(t),_r20.setIgnoreInAppIds(e),de.getCampaignTag(_r20,n,i);}else ke.isFunction(i)&&i(x.showError(p,p.ErrorCode.BAD_REQUEST_SERVER_ERROR));}},{key:"addNewInAppToDismissForever",value:function addNewInAppToDismissForever(e){$.addNewInApptoDismissForever(e);}},{key:"isInAppDismissForever",value:function(){var _isInAppDismissForever2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee194(e){return _regenerator2().w(function(_context194){while(1)switch(_context194.n){case 0:_context194.n=1;return $.isInAppDismissForever(e);case 1:return _context194.a(2);}},_callee194);}));function isInAppDismissForever(_x318){return _isInAppDismissForever2.apply(this,arguments);}return isInAppDismissForever;}()},{key:"inAppOnClick",value:function(){var _inAppOnClick=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee195(e){return _regenerator2().w(function(_context195){while(1)switch(_context195.n){case 0:_context195.n=1;return Se.onClick(e);case 1:return _context195.a(2);}},_callee195);}));function inAppOnClick(_x319){return _inAppOnClick.apply(this,arguments);}return inAppOnClick;}()},{key:"inAppSubmit",value:function(){var _inAppSubmit=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee196(e,t,n){return _regenerator2().w(function(_context196){while(1)switch(_context196.n){case 0:Se.submit(e,t,n);case 1:return _context196.a(2);}},_callee196);}));function inAppSubmit(_x320,_x321,_x322){return _inAppSubmit.apply(this,arguments);}return inAppSubmit;}()},{key:"inAppWasShown",value:function(){var _inAppWasShown2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee197(e,t,n,i,r){return _regenerator2().w(function(_context197){while(1)switch(_context197.n){case 0:we.inAppWasShown(e,t,n,i,r);case 1:return _context197.a(2);}},_callee197);}));function inAppWasShown(_x323,_x324,_x325,_x326,_x327){return _inAppWasShown2.apply(this,arguments);}return inAppWasShown;}()},{key:"downloadHTML",value:function(){var _downloadHTML=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee198(e){var t;return _regenerator2().w(function(_context198){while(1)switch(_context198.n){case 0:_context198.n=1;return fetch(e,{method:"GET"});case 1:t=_context198.v;console.log(t);case 2:return _context198.a(2);}},_callee198);}));function downloadHTML(_x328){return _downloadHTML.apply(this,arguments);}return downloadHTML;}()},{key:"setExternalCode",value:function(){var _setExternalCode2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee199(e,t,n){var _n28,_t148;return _regenerator2().w(function(_context199){while(1)switch(_context199.p=_context199.n){case 0:_context199.p=0;_context199.n=1;return $.setExternalCode(e);case 1:_n28=_context199.v;t&&t(_n28);_context199.n=3;break;case 2:_context199.p=2;_t148=_context199.v;n&&n(_t148);case 3:return _context199.a(2);}},_callee199,null,[[0,2]]);}));function setExternalCode(_x329,_x330,_x331){return _setExternalCode2.apply(this,arguments);}return setExternalCode;}()},{key:"logIn",value:function(){var _logIn=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee200(e,t,n){return _regenerator2().w(function(_context200){while(1)switch(_context200.n){case 0:_context200.n=1;return this.setExternalCode(e,t,n);case 1:return _context200.a(2);}},_callee200,this);}));function logIn(_x332,_x333,_x334){return _logIn.apply(this,arguments);}return logIn;}()},{key:"logOut",value:function(){var _logOut=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee201(e,t){return _regenerator2().w(function(_context201){while(1)switch(_context201.n){case 0:_context201.n=1;return this.setExternalCode(null,e,t);case 1:return _context201.a(2);}},_callee201,this);}));function logOut(_x335,_x336){return _logOut.apply(this,arguments);}return logOut;}()}]);}();var $e=Fe;window.indigitall||(window.indigitall={}),window.indigitall.InApp=Fe,window.indigitall.InApp.version=s.getVersion(),window.indigitall.InApp.Utils=$,window.indigitall.LogLevel=Be;}(),i;}();});/***/},/***/326:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={};Object.defineProperty(exports,"default",{enumerable:true,get:function get(){return _inappMin["default"];}});var _inappMin=_interopRequireWildcard(__webpack_require__(126));Object.keys(_inappMin).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_inappMin[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _inappMin[key];}});});function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,"default":e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}/***/},/***/114:function _(module){/*! For license information please see inbox.min.js.LICENSE.txt */!function(e,t){if(true)module.exports=t();else// removed by dead control flow
237
+ {var r,n;}}(this,function(){return function(){var e={710:function _(e){var t;t=function t(){return function(_Class5){"use strict";var e={330:function _(e){e.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.16.6","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"}}');}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports;}n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]});},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t);},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0});};var r={};n.r(r),n.d(r,{"default":function _default(){return W;}});var i={};n.r(i),n.d(i,{BaseApplicationRequest:function BaseApplicationRequest(){return R;},BaseClient:function BaseClient(){return O;},BaseEventRequest:function BaseEventRequest(){return N;},BaseRequest:function BaseRequest(){return T;}});var o={};n.r(o),n.d(o,{Channel:function Channel(){return w;},CoreApplication:function CoreApplication(){return B;},Device:function Device(){return C;},DeviceStatus:function DeviceStatus(){return D;},EncryptionType:function EncryptionType(){return y;},ErrorDictionary:function ErrorDictionary(){return v;},ErrorModel:function ErrorModel(){return b;},EventType:function EventType(){return M;},TopicSubscribeType:function TopicSubscribeType(){return L;}});var s={};n.r(s),n.d(s,{CommonUtils:function CommonUtils(){return P;},CorePermissions:function CorePermissions(){return U;},CryptoUtils:function CryptoUtils(){return x;},DateUtils:function DateUtils(){return A;},ErrorUtils:function ErrorUtils(){return S;},JsonUtils:function JsonUtils(){return Y;},Log:function Log(){return m;},LogLevel:function LogLevel(){return I;},TopicUtils:function TopicUtils(){return F;},Validations:function Validations(){return G;}});var a={platform:"webpush",version:"0.0.1"};var u=n(330);a.version=u.version;var 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(/*#__PURE__*/function(){function _class16(){_classCallCheck2(this,_class16);this.storage=this.isLocalStorageAvailable()?window.localStorage:null;}return _createClass2(_class16,[{key:"isLocalStorageAvailable",value:function isLocalStorageAvailable(){try{var _e50=window.localStorage,_t149="__storage_test__";if(_e50)return _e50.setItem(_t149,_t149),_e50.removeItem(_t149),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==l.length;}return!1;}},{key:"setItem",value:function setItem(e,t){return null!=this.storage&&(this.storage.setItem(e,t),!0);}},{key:"getItem",value:function getItem(e){return null!=this.storage?this.storage.getItem(e):null;}},{key:"deleteItem",value:function deleteItem(e){return!!this.storage&&(this.storage.setItem(e,value),!0);}},{key:"clear",value:function clear(){this.storage&&this.storage.clear();}}]);}())(),f=l,h=new(/*#__PURE__*/function(){function _class17(){_classCallCheck2(this,_class17);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;}return _createClass2(_class17,[{key:"getDB",value:function(){var _getDB5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee202(){var _this37=this;return _regenerator2().w(function(_context202){while(1)switch(_context202.n){case 0:return _context202.a(2,new Promise(function(e,t){var n=_this37.IDB;if(n){var _r21=n.open("indigitall.indexedDB",1);_r21.onupgradeneeded=function(){_r21.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key");},_r21.onsuccess=function(){var t=_r21.result,n=t.transaction("indigitallStore","readwrite"),i=n.objectStore("indigitallStore"),o=i.index("storeIndex");e({db:t,tx:n,store:i,index:o});},_r21.onerror=function(e){t(e);};}else t(!1);}));}},_callee202);}));function getDB(){return _getDB5.apply(this,arguments);}return getDB;}()},{key:"get",value:function(){var _get8=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee203(e,t){var _this38=this;return _regenerator2().w(function(_context203){while(1)switch(_context203.n){case 0:return _context203.a(2,new Promise(function(n,r){e||r(!1),e.index.get(t).onsuccess=function(t){t.target.result&&(_this38.close(e),n(t.target.result.store.value)),r(!1);};}));}},_callee203);}));function get(_x337,_x338){return _get8.apply(this,arguments);}return get;}()},{key:"put",value:function(){var _put8=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee204(e,t,n){var _this39=this;return _regenerator2().w(function(_context204){while(1)switch(_context204.n){case 0:return _context204.a(2,new Promise(function(r,i){e||i(!1),e.store.put({store:{key:t,value:n}},t).onsuccess=function(t){_this39.close(e),r(n);};}));}},_callee204);}));function put(_x339,_x340,_x341){return _put8.apply(this,arguments);}return put;}()},{key:"close",value:function close(e){if(e.tx)try{e.tx.oncomplete=function(){e.db.close();};}catch(e){console.log(this.TAG,e);}}},{key:"setItem",value:function(){var _setItem5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee205(e,t){var _n29,_t150;return _regenerator2().w(function(_context205){while(1)switch(_context205.p=_context205.n){case 0:_context205.p=0;_context205.n=1;return this.getDB();case 1:_n29=_context205.v;return _context205.a(2,this.put(_n29,e,t));case 2:_context205.p=2;_t150=_context205.v;return _context205.a(2,_t150);}},_callee205,this,[[0,2]]);}));function setItem(_x342,_x343){return _setItem5.apply(this,arguments);}return setItem;}()},{key:"getItem",value:function(){var _getItem5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee206(e){var _t151,_t152;return _regenerator2().w(function(_context206){while(1)switch(_context206.p=_context206.n){case 0:_context206.p=0;_context206.n=1;return this.getDB();case 1:_t151=_context206.v;return _context206.a(2,this.get(_t151,e));case 2:_context206.p=2;_t152=_context206.v;return _context206.a(2,_t152);}},_callee206,this,[[0,2]]);}));function getItem(_x344){return _getItem5.apply(this,arguments);}return getItem;}()}]);}())(),d=new(/*#__PURE__*/function(){function _class18(){_classCallCheck2(this,_class18);this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null;}return _createClass2(_class18,[{key:"isSessionStorageAvailable",value:function isSessionStorageAvailable(){try{var _e51=window.sessionStorage,_t153="__storage_test__";if(_e51)return _e51.setItem(_t153,_t153),_e51.removeItem(_t153),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==d.length;}return!1;}},{key:"getItem",value:function getItem(e){return null!=this.session?this.session.getItem(e):null;}},{key:"setItem",value:function setItem(e,t){return null!=this.session&&(this.session.setItem(e,t),!0);}},{key:"clearMessages",value:function clearMessages(){this.session&&this.session.removeItem("messages");}}]);}())(),E=d,y=Object.freeze({RAW:"raw",HASH:"hash"}),p=/*#__PURE__*/function(){function p(){_classCallCheck2(this,p);this.storage=f,this.db=h,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.TIMEOUT_REQUESTS=this.REPOSITORY+".TIMEOUT_REQUESTS",this.ENCRYPTION_TYPE=this.REPOSITORY+".ENCRYPTION_TYPE",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";}return _createClass2(p,[{key:"setItemSessionStorage",value:function setItemSessionStorage(e,t){E.setItem(e,t);}},{key:"getItemSessionStorage",value:function getItemSessionStorage(e){return E.getItem(e);}},{key:"clearSessionStorage",value:function clearSessionStorage(){E.clearMessages();}},{key:"setStorage",value:function setStorage(e,t){f.setItem(e,t);}},{key:"getStorage",value:function getStorage(e){return f.getItem(e);}},{key:"clearStorage",value:function clearStorage(){f.clear();}},{key:"setBrowserPublicKey",value:function setBrowserPublicKey(e){f.setItem(this.BROWSER_PUBLIC_KEY,e);}},{key:"getBrowserPublicKey",value:function getBrowserPublicKey(){return f.getItem(this.BROWSER_PUBLIC_KEY);}},{key:"setBrowserPrivateKey",value:function setBrowserPrivateKey(e){f.setItem(this.BROWSER_PRIVATE_KEY,e);}},{key:"getBrowserPrivateKey",value:function getBrowserPrivateKey(){return f.getItem(this.BROWSER_PRIVATE_KEY);}},{key:"setAppKey",value:function(){var _setAppKey5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee207(e){var _t154;return _regenerator2().w(function(_context207){while(1)switch(_context207.n){case 0:f.setItem(this.APP_KEY,e);_t154=h&&h.IDB;if(!_t154){_context207.n=1;break;}_context207.n=1;return h.setItem(this.APP_KEY,e);case 1:return _context207.a(2);}},_callee207,this);}));function setAppKey(_x345){return _setAppKey5.apply(this,arguments);}return setAppKey;}()},{key:"getAppKey",value:function getAppKey(){return f.getItem(this.APP_KEY);}},{key:"setDeviceId",value:function(){var _setDeviceId6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee208(e){var _t155;return _regenerator2().w(function(_context208){while(1)switch(_context208.n){case 0:this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,e);_t155=this.db&&this.db.IDB;if(!_t155){_context208.n=1;break;}_context208.n=1;return this.db.setItem(this.DEVICE_ID,e);case 1:return _context208.a(2);}},_callee208,this);}));function setDeviceId(_x346){return _setDeviceId6.apply(this,arguments);}return setDeviceId;}()},{key:"getDeviceId",value:function getDeviceId(){return this.getStorage(this.DEVICE_ID);}},{key:"getAppKeySync",value:function(){var _getAppKeySync5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee209(){return _regenerator2().w(function(_context209){while(1)switch(_context209.n){case 0:if(!(h&&h.IDB)){_context209.n=2;break;}_context209.n=1;return h.getItem(this.APP_KEY);case 1:return _context209.a(2,_context209.v);case 2:return _context209.a(2);}},_callee209,this);}));function getAppKeySync(){return _getAppKeySync5.apply(this,arguments);}return getAppKeySync;}()},{key:"setVAPID",value:function setVAPID(e){f.setItem(this.VAPID_PUBLIC,e);}},{key:"getVAPID",value:function getVAPID(){return f.getItem(this.VAPID_PUBLIC);}},{key:"setEnabled",value:function setEnabled(e){f.setItem(this.ENABLED,e);}},{key:"getEnabled",value:function getEnabled(){return f.getItem(this.ENABLED);}},{key:"setServiceSyncTime",value:function setServiceSyncTime(e){f.setItem(this.SERVICE_SYNC_TIME,e*this.BASE_TIME);}},{key:"getServiceSyncTime",value:function getServiceSyncTime(){return f.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME;}},{key:"setLocationEnabled",value:function setLocationEnabled(e){f.setItem(this.LOCATION_ENABLED,e);}},{key:"getLocationEnabled",value:function getLocationEnabled(){return f.getItem(this.LOCATION_ENABLED);}},{key:"setLocationUpdateMinutes",value:function setLocationUpdateMinutes(e){f.setItem(this.LOCATION_UPDATE_MINUTES,e);}},{key:"getLocationUpdateMinutes",value:function getLocationUpdateMinutes(){return f.getItem(this.LOCATION_UPDATE_MINUTES)||30;}},{key:"setRequestLocation",value:function(){var _setRequestLocation5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee210(e){return _regenerator2().w(function(_context210){while(1)switch(_context210.n){case 0:f.setItem(this.REQUEST_LOCATION,e);case 1:return _context210.a(2);}},_callee210,this);}));function setRequestLocation(_x347){return _setRequestLocation5.apply(this,arguments);}return setRequestLocation;}()},{key:"getRequestLocation",value:function getRequestLocation(){return!!f&&f.getItem(this.REQUEST_LOCATION);}},{key:"setPlatform",value:function(){var _setPlatform5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee211(e){return _regenerator2().w(function(_context211){while(1)switch(_context211.n){case 0:f.setItem(this.PLATFORM,e);case 1:return _context211.a(2);}},_callee211,this);}));function setPlatform(_x348){return _setPlatform5.apply(this,arguments);}return setPlatform;}()},{key:"getPlatform",value:function getPlatform(){return f&&f.getItem(this.PLATFORM)||c.platform;}},{key:"getVersion",value:function getVersion(){return c.version;}},{key:"setBrowserName",value:function(){var _setBrowserName5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee212(e){return _regenerator2().w(function(_context212){while(1)switch(_context212.n){case 0:f.setItem(this.BROWSER_NAME,e);case 1:return _context212.a(2);}},_callee212,this);}));function setBrowserName(_x349){return _setBrowserName5.apply(this,arguments);}return setBrowserName;}()},{key:"getBrowserName",value:function getBrowserName(){return f.getItem(this.BROWSER_NAME);}},{key:"setBrowserVersion",value:function setBrowserVersion(e){f.setItem(this.BROWSER_VERSION,e);}},{key:"getBrowserVersion",value:function getBrowserVersion(){return f.getItem(this.BROWSER_VERSION);}},{key:"setOsName",value:function(){var _setOsName5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee213(e){return _regenerator2().w(function(_context213){while(1)switch(_context213.n){case 0:f.setItem(this.OS_NAME,e);case 1:return _context213.a(2);}},_callee213,this);}));function setOsName(_x350){return _setOsName5.apply(this,arguments);}return setOsName;}()},{key:"getOsName",value:function getOsName(){return f.getItem(this.OS_NAME);}},{key:"setOsVersion",value:function setOsVersion(e){f.setItem(this.OS_VERSION,e);}},{key:"getOsVersion",value:function getOsVersion(){return f.getItem(this.OS_VERSION);}},{key:"setDeviceType",value:function setDeviceType(e){f.setItem(this.DEVICE_TYPE,e);}},{key:"getDeviceType",value:function getDeviceType(){return f.getItem(this.DEVICE_TYPE);}},{key:"setSupported",value:function setSupported(e){f.setItem(this.SUPPORTED,e);}},{key:"getSupported",value:function getSupported(){return f.getItem(this.SUPPORTED);}},{key:"setServiceTimestamp",value:function setServiceTimestamp(e){f.setItem(this.SERVICE_TIMESTAMP,e);}},{key:"getServiceTimestamp",value:function getServiceTimestamp(){return f.getItem(this.SERVICE_TIMESTAMP);}},{key:"setLocationTimestamp",value:function setLocationTimestamp(e){f.setItem(this.LOCATION_TIMESTAMP,e);}},{key:"getLocationTimestamp",value:function getLocationTimestamp(){return f.getItem(this.LOCATION_TIMESTAMP);}},{key:"setPermissionLocation",value:function setPermissionLocation(e){f.setItem(this.PERMISSION_LOCATION,e);}},{key:"getPermissionLocation",value:function getPermissionLocation(){return f.getItem(this.PERMISSION_LOCATION);}},{key:"setDebugLog",value:function setDebugLog(e){f.setItem(this.SET_LOG_DEBUG,e);}},{key:"getDebugLog",value:function getDebugLog(){return"false"!==f.getItem(this.SET_LOG_DEBUG);}},{key:"setLogLevel",value:function setLogLevel(e){f.setItem(this.LOG_LEVEL,e);}},{key:"getLogLevel",value:function getLogLevel(){return f.getItem(this.LOG_LEVEL);}},{key:"setNewUserTimestamp",value:function setNewUserTimestamp(e){f.setItem(this.NEW_USER_TIMESTAMP,e);}},{key:"getNewUserTimestamp",value:function getNewUserTimestamp(){return f.getItem(this.NEW_USER_TIMESTAMP);}},{key:"setExternalIdRequest",value:function(){var _setExternalIdRequest5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee214(e){var _t156;return _regenerator2().w(function(_context214){while(1)switch(_context214.n){case 0:f&&f.isLocalStorageAvailable()&&f.setItem(this.EXTERNAL_ID,e);_t156=h&&h.IDB;if(!_t156){_context214.n=1;break;}_context214.n=1;return h.setItem(this.EXTERNAL_ID,e);case 1:return _context214.a(2);}},_callee214,this);}));function setExternalIdRequest(_x351){return _setExternalIdRequest5.apply(this,arguments);}return setExternalIdRequest;}()},{key:"getExternalIdRequest",value:function(){var _getExternalIdRequest5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee215(){var e,_t157,_t158;return _regenerator2().w(function(_context215){while(1)switch(_context215.p=_context215.n){case 0:_context215.p=0;if(!(f&&f.isLocalStorageAvailable())){_context215.n=1;break;}e=f.getItem(this.EXTERNAL_ID);_context215.n=3;break;case 1:_t157=h&&h.IDB;if(!_t157){_context215.n=3;break;}_context215.n=2;return h.getItem(this.EXTERNAL_ID);case 2:e=_context215.v;case 3:_context215.n=5;break;case 4:_context215.p=4;_t158=_context215.v;case 5:return _context215.a(2,e);}},_callee215,this,[[0,4]]);}));function getExternalIdRequest(){return _getExternalIdRequest5.apply(this,arguments);}return getExternalIdRequest;}()},{key:"setExternalId",value:function setExternalId(e){f.setItem(this.EXTERNAL_ID,e);}},{key:"getExternalId",value:function getExternalId(){return f.getItem(this.EXTERNAL_ID);}},{key:"getRegisteredByCookie",value:function(){var _getRegisteredByCookie5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee216(){return _regenerator2().w(function(_context216){while(1)switch(_context216.n){case 0:return _context216.a(2,f.getItem(this.REGISTERED_BY_COOKIE));}},_callee216,this);}));function getRegisteredByCookie(){return _getRegisteredByCookie5.apply(this,arguments);}return getRegisteredByCookie;}()},{key:"setRegisteredByCookie",value:function(){var _setRegisteredByCookie5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee217(e){return _regenerator2().w(function(_context217){while(1)switch(_context217.n){case 0:f.setItem(this.REGISTERED_BY_COOKIE,e);case 1:return _context217.a(2);}},_callee217,this);}));function setRegisteredByCookie(_x352){return _setRegisteredByCookie5.apply(this,arguments);}return setRegisteredByCookie;}()},{key:"setLatitude",value:function setLatitude(e){f.setItem(this.LATITUDE,e);}},{key:"getLatitude",value:function getLatitude(){return f.getItem(this.LATITUDE);}},{key:"setLongitude",value:function setLongitude(e){f.setItem(this.LONGITUDE,e);}},{key:"getLongitude",value:function getLongitude(){return f.getItem(this.LONGITUDE);}},{key:"setInAppTopicList",value:function(){var _setInAppTopicList5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee218(e){var _t159;return _regenerator2().w(function(_context218){while(1)switch(_context218.n){case 0:_t159=this.db&&this.db.IDB;if(!_t159){_context218.n=1;break;}_context218.n=1;return this.db.setItem(this.INAPP_TOPICS,e);case 1:return _context218.a(2);}},_callee218,this);}));function setInAppTopicList(_x353){return _setInAppTopicList5.apply(this,arguments);}return setInAppTopicList;}()},{key:"getInAppTopicList",value:function(){var _getInAppTopicList5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee219(){var e,_t160,_t161;return _regenerator2().w(function(_context219){while(1)switch(_context219.p=_context219.n){case 0:_context219.p=0;_t160=this.db&&this.db.IDB;if(!_t160){_context219.n=2;break;}_context219.n=1;return this.db.getItem(this.INAPP_TOPICS);case 1:e=_context219.v;case 2:_context219.n=4;break;case 3:_context219.p=3;_t161=_context219.v;case 4:return _context219.a(2,e);}},_callee219,this,[[0,3]]);}));function getInAppTopicList(){return _getInAppTopicList5.apply(this,arguments);}return getInAppTopicList;}()},{key:"setTopicList",value:function(){var _setTopicList5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee220(e){var _t162;return _regenerator2().w(function(_context220){while(1)switch(_context220.n){case 0:_t162=this.db&&this.db.IDB;if(!_t162){_context220.n=1;break;}_context220.n=1;return this.db.setItem(this.TOPIC_LIST,e);case 1:return _context220.a(2);}},_callee220,this);}));function setTopicList(_x354){return _setTopicList5.apply(this,arguments);}return setTopicList;}()},{key:"getTopicList",value:function(){var _getTopicList5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee221(){var e,_t163,_t164;return _regenerator2().w(function(_context221){while(1)switch(_context221.p=_context221.n){case 0:_context221.p=0;_t163=this.db&&this.db.IDB;if(!_t163){_context221.n=2;break;}_context221.n=1;return this.db.getItem(this.TOPIC_LIST);case 1:e=_context221.v;case 2:_context221.n=4;break;case 3:_context221.p=3;_t164=_context221.v;case 4:return _context221.a(2,e);}},_callee221,this,[[0,3]]);}));function getTopicList(){return _getTopicList5.apply(this,arguments);}return getTopicList;}()},{key:"getUrlInappApi",value:function getUrlInappApi(){return this.getStorage(this.URL_INAPP_API);}},{key:"setUrlInappApi",value:function setUrlInappApi(e){this.setStorage(this.URL_INAPP_API,e);}},{key:"setInAppEnabled",value:function setInAppEnabled(e){this.setStorage(this.INAPP_ENABLED,e);}},{key:"isInAppEnabled",value:function isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED);}},{key:"setAvoidCypher",value:function setAvoidCypher(e){this.setStorage(this.AVOID_CYPHER,!0===e);}},{key:"isAvoidCypher",value:function isAvoidCypher(){return"true"===this.getStorage(this.AVOID_CYPHER);}},{key:"getUrlDeviceApi",value:function(){var _getUrlDeviceApi6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee222(){var e,_t165,_t166;return _regenerator2().w(function(_context222){while(1)switch(_context222.p=_context222.n){case 0:_context222.p=0;if(!(this.storage&&this.storage.isLocalStorageAvailable())){_context222.n=1;break;}e=this.getStorage(this.URL_DEVICE_API);_context222.n=3;break;case 1:_t165=this.db&&this.db.IDB;if(!_t165){_context222.n=3;break;}_context222.n=2;return this.db.getItem(this.URL_DEVICE_API);case 2:e=_context222.v;case 3:_context222.n=5;break;case 4:_context222.p=4;_t166=_context222.v;case 5:return _context222.a(2,e);}},_callee222,this,[[0,4]]);}));function getUrlDeviceApi(){return _getUrlDeviceApi6.apply(this,arguments);}return getUrlDeviceApi;}()},{key:"setUrlDeviceApi",value:function(){var _setUrlDeviceApi5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee223(e){var _t167;return _regenerator2().w(function(_context223){while(1)switch(_context223.n){case 0:this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,e);_t167=this.db&&this.db.IDB;if(!_t167){_context223.n=1;break;}_context223.n=1;return this.db.setItem(this.URL_DEVICE_API,e);case 1:return _context223.a(2);}},_callee223,this);}));function setUrlDeviceApi(_x355){return _setUrlDeviceApi5.apply(this,arguments);}return setUrlDeviceApi;}()},{key:"setPushDisabled",value:function setPushDisabled(e){this.setStorage(this.PUSH_DISABLED,e);}},{key:"isPushDisabled",value:function isPushDisabled(){return this.getStorage(this.PUSH_DISABLED);}},{key:"getConfigV2ServiceSyncTime",value:function getConfigV2ServiceSyncTime(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME);}},{key:"setConfigV2ServiceSyncTime",value:function setConfigV2ServiceSyncTime(e){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,e);}},{key:"getConfigV2",value:function getConfigV2(){return this.getStorage(this.CONFIG_V2);}},{key:"setConfigV2",value:function setConfigV2(e){this.setStorage(this.CONFIG_V2,e);}},{key:"getMaintenanceEnd",value:function getMaintenanceEnd(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY);}},{key:"setMaintenanceEnd",value:function setMaintenanceEnd(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,e);}},{key:"getMaintenanceStart",value:function getMaintenanceStart(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY);}},{key:"setMaintenanceStart",value:function setMaintenanceStart(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,e);}},{key:"getTimeoutRequestsInMilliseconds",value:function getTimeoutRequestsInMilliseconds(){return this.getStorage(this.TIMEOUT_REQUESTS);}},{key:"setTimeoutRequestsInMilliseconds",value:function setTimeoutRequestsInMilliseconds(e){this.setStorage(this.TIMEOUT_REQUESTS,e);}},{key:"getEncryptionType",value:function getEncryptionType(){var e=this.getStorage(this.ENCRYPTION_TYPE);return null===e?y.HASH:e;}},{key:"setEncryptionType",value:function setEncryptionType(e){this.setStorage(this.ENCRYPTION_TYPE,e);}}]);}(),I=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),g=I;var _=/*#__PURE__*/function(){function _(e){_classCallCheck2(this,_);this.tag="[IND]",e&&(this.tag=e),this.level=g.INFO,this.setLogLevel(new p().getLogLevel()),this.log=[];}return _createClass2(_,[{key:"setLogLevel",value:function setLogLevel(e){e&&e>=g.DEBUG&&e<=g.ERROR&&(this.level=e);}},{key:"d",value:function d(){if(this.level<=g.DEBUG)for(var _e52=0;_e52<arguments.length;_e52++)this.log+=_.addedAsString(arguments[_e52]);return this;}},{key:"i",value:function i(){if(this.level<=g.INFO)for(var _e53=0;_e53<arguments.length;_e53++)this.log+=_.addedAsString(arguments[_e53]);return this;}},{key:"w",value:function w(){if(this.level<=g.WARNING)for(var _e54=0;_e54<arguments.length;_e54++)this.log+=_.addedAsString(arguments[_e54]);return this;}},{key:"e",value:function e(){if(this.level<=g.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var _e55=0;_e55<arguments.length;_e55++)this.log+=_.addedAsString(arguments[_e55]);return this;}},{key:"writeLog",value:function writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[];}}],[{key:"addedAsString",value:function addedAsString(e){return"string"==typeof e?e:JSON.stringify(e,null,2);}}]);}();var m=_,b=/*#__PURE__*/_createClass2(function b(e,t,n){_classCallCheck2(this,b);this.errorCode=e,this.errorMessage=t,null!=n&&(this.exceptionMessage=n);}),v={ErrorCode:{GENERAL_ERROR:600,TIMEOUT_REQUEST:605,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",TIMEOUT_REQUEST:"connection timeout",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"}},S=new(/*#__PURE__*/function(){function _class19(){_classCallCheck2(this,_class19);}return _createClass2(_class19,[{key:"showError",value:function showError(e,t,n){if(null!=e){var _r22=Object.values(e.ErrorCode).indexOf(t);if(_r22>=0){var _t168=Object.keys(e.ErrorCode)[_r22],_i35=Object.values(e.ErrorCode)[_r22];return new b({code:_t168,errorId:_i35},Object.values(e.ErrorMessage)[_r22],n);}return new b(v.ErrorCode.GENERAL_ERROR,"general error",n);}}}]);}())(),O=/*#__PURE__*/function(){function O(){_classCallCheck2(this,O);this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE";}return _createClass2(O,[{key:"getURL",value:function(){var _getURL7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee224(){return _regenerator2().w(function(_context224){while(1)switch(_context224.n){case 0:return _context224.a(2,this.URL_BASE);}},_callee224,this);}));function getURL(){return _getURL7.apply(this,arguments);}return getURL;}()},{key:"call",value:function(){var _call5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee225(e,t,n,r){var i,o,s,_t169,_r23,_a9,_t170,_t171,_t172,_t173,_t174,_t175;return _regenerator2().w(function(_context225){while(1)switch(_context225.p=_context225.n){case 0:i=new m("[IND]BaseClient: ");n.isServiceWorkerRequest()&&i.setLogLevel(g.DEBUG);_context225.n=1;return this.getURL();case 1:_t171=_context225.v;_t172=n.getPath(t);_t173=_t171+_t172;_t174=n.getParams();o=_t173+_t174;n.isJourneyRequest()&&(o=o.replace("v1","v2"));s={method:e,headers:n.addHeaders()};e!==this.GET&&(s.body=JSON.stringify(n.getBody())),r&&(s.credentials=r);_context225.p=2;_t169=new AbortController();new p().getTimeoutRequestsInMilliseconds()&&0!=new p().getTimeoutRequestsInMilliseconds()&&(_r23=setTimeout(function(){return _t169.abort();},new p().getTimeoutRequestsInMilliseconds()),s.signal=_t169.signal);_context225.n=3;return fetch(o,s);case 3:_a9=_context225.v;if(!(_r23&&clearTimeout(_r23),304!=_a9.status)){_context225.n=5;break;}_context225.n=4;return _a9.json();case 4:_t170=_context225.v;return _context225.a(2,_a9.ok?(i.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Response Code: "+_t170.statusCode+"\nResponse Message: "+_t170.message+"\nResponse Body:",JSON.stringify(_t170.data,null,"\t")).writeLog(),_t170):(i.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Response Code: "+_t170.statusCode+"\nResponse Message: "+_t170.message+"\n").writeLog(),new b(_t170.statusCode,_t170.message)));case 5:return _context225.a(2,(i.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Response Code: "+_a9.status+"\n").writeLog(),_a9));case 6:_context225.p=6;_t175=_context225.v;return _context225.a(2,"AbortError"===_t175.name?(i.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Error: "+_t175).writeLog(),S.showError(v,v.ErrorCode.TIMEOUT_REQUEST,_t175)):(i.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Error: "+_t175).writeLog(),S.showError(v,v.ErrorCode.GENERAL_ERROR,_t175)));}},_callee225,this,[[2,6]]);}));function call(_x356,_x357,_x358,_x359){return _call5.apply(this,arguments);}return call;}()},{key:"get",value:function(){var _get9=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee226(e,t){return _regenerator2().w(function(_context226){while(1)switch(_context226.n){case 0:_context226.n=1;return this.call(this.GET,e,t);case 1:return _context226.a(2,_context226.v);}},_callee226,this);}));function get(_x360,_x361){return _get9.apply(this,arguments);}return get;}()},{key:"post",value:function(){var _post5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee227(e,t,n){return _regenerator2().w(function(_context227){while(1)switch(_context227.n){case 0:_context227.n=1;return this.call(this.POST,e,t,n);case 1:return _context227.a(2,_context227.v);}},_callee227,this);}));function post(_x362,_x363,_x364){return _post5.apply(this,arguments);}return post;}()},{key:"put",value:function(){var _put9=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee228(e,t,n){return _regenerator2().w(function(_context228){while(1)switch(_context228.n){case 0:_context228.n=1;return this.call(this.PUT,e,t,n);case 1:return _context228.a(2,_context228.v);}},_callee228,this);}));function put(_x365,_x366,_x367){return _put9.apply(this,arguments);}return put;}()},{key:"delete",value:function(){var _delete6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee229(e,t){return _regenerator2().w(function(_context229){while(1)switch(_context229.n){case 0:_context229.n=1;return this.call(this.DELETE,e,t);case 1:return _context229.a(2,_context229.v);}},_callee229,this);}));function _delete(_x368,_x369){return _delete6.apply(this,arguments);}return _delete;}()}]);}(),T=/*#__PURE__*/function(){function T(){_classCallCheck2(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_EVENT_ID="eventId",this.PARAM_EVENT_AT="eventAt",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 p().getAppKey(),this.params=null,this.pathParams={},this.headers={};}return _createClass2(T,[{key:"getParams",value:function getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"");}},{key:"getBody",value:function getBody(){return this.body?this.body:"";}},{key:"getPath",value:function getPath(e){var _this40=this;var t=e;return Object.keys(this.pathParams).forEach(function(e){t=t.replace(e,_this40.pathParams[e]);}),t;}},{key:"addHeaders",value:function addHeaders(){var _this41=this;var e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach(function(t){e.append(t,_this41.headers[t]);}),e;}},{key:"isServiceWorkerRequest",value:function isServiceWorkerRequest(){return this.serviceWorkerRequest;}},{key:"setServiceWorkerRequest",value:function setServiceWorkerRequest(e){this.serviceWorkerRequest=e;}},{key:"isJourneyRequest",value:function isJourneyRequest(){return this.journeyRequest;}},{key:"setJourneyRequest",value:function setJourneyRequest(e){this.journeyRequest=e;}}]);}(),R=/*#__PURE__*/function(_T4){function R(){var _this42;var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;_classCallCheck2(this,R);_this42=_callSuper2(this,R),_this42.PARAM_APPLICATION_CHANNEL="channel",_this42.channels=e;return _this42;}_inherits2(R,_T4);return _createClass2(R,[{key:"getApplicationRequest",value:function getApplicationRequest(){return this.params=this.createQueryString(),this;}},{key:"createQueryString",value:function createQueryString(){var e="";if(this.channels&&this.channels.length>0)for(var _t176=0;_t176<this.channels.length;_t176++)e+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[_t176].toLowerCase(),"&");return e+="".concat(this.PARAM_PLATFORM,"=webpush"),e;}}]);}(T),P=/*#__PURE__*/function(){function P(){_classCallCheck2(this,P);}return _createClass2(P,null,[{key:"isServiceTimestampExceed",value:function isServiceTimestampExceed(){return!new p().getServiceTimestamp()||new p().getServiceSyncTime()<=(Date.now()-new p().getServiceTimestamp())/6e4;}},{key:"isFunction",value:function isFunction(e){return!(!e||"function"!=typeof e);}},{key:"generateUUID",value:function generateUUID(){var e=new m("[IND]CommonUtils: ");return"undefined"!=typeof crypto&&crypto.randomUUID?(e.d("Using crypto.randomUUID to generate UUID").writeLog(),crypto.randomUUID()):"undefined"!=typeof crypto&&crypto.getRandomValues?(e.d("Using crypto.getRandomValues to generate UUID").writeLog(),([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16);})):null;}}]);}(),A=(_Class5=/*#__PURE__*/function(){function A(){_classCallCheck2(this,A);}return _createClass2(A,null,[{key:"normalizeDateString",value:function normalizeDateString(e){if("number"==typeof e||e instanceof Date){var _t177=new Date(e);return isNaN(_t177.getTime())?null:this.formatCanonicalUTC(_t177);}if(!e||"string"!=typeof e)return null;var t=e.trim();if(this.isCanonicalFormat(t))return t;var n=this.tryToParseLeniently(t);return n?this.formatCanonicalUTC(n):null;}},{key:"isCanonicalFormat",value:function isCanonicalFormat(e){return /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(e);}},{key:"tryToParseLeniently",value:function tryToParseLeniently(e){var _iterator6=_createForOfIteratorHelper2(this.LENIENT_DATE_FORMATS),_step6;try{for(_iterator6.s();!(_step6=_iterator6.n()).done;){var _t178=_step6.value;var _n30=this.parseByFormat(e,_t178);if(_n30&&!isNaN(_n30.getTime()))return _n30;}}catch(err){_iterator6.e(err);}finally{_iterator6.f();}return null;}},{key:"parseByFormat",value:function parseByFormat(e,t){switch(t){case"yyyy-MM-dd'T'HH:mm:ss.SSSZ":return new Date(e);case"yyyy-MM-dd'T'HH:mm:ssZ":return e.endsWith("Z")?new Date(e):new Date(e.replaceAll(/([+-]\d{2})(\d{2})$/g,"$1:$2"));case"yyyy-MM-dd'T'HH:mm:ss":return new Date(e+"Z");case"yyyy-MM-dd HH:mm:ss":return new Date(e.replaceAll(" ","T")+"Z");case"yyyy-MM-dd":return new Date(e+"T00:00:00Z");default:return null;}}},{key:"formatCanonicalUTC",value:function formatCanonicalUTC(e){return e.toISOString();}}]);}(),_defineProperty2(_Class5,"DATE_FORMAT_PATTERN","yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"),_defineProperty2(_Class5,"LENIENT_DATE_FORMATS",["yyyy-MM-dd'T'HH:mm:ss.SSSZ","yyyy-MM-dd'T'HH:mm:ssZ","yyyy-MM-dd'T'HH:mm:ss","yyyy-MM-dd HH:mm:ss","yyyy-MM-dd"]),_Class5),N=/*#__PURE__*/function(_T5){function N(){_classCallCheck2(this,N);return _callSuper2(this,N);}_inherits2(N,_T5);return _createClass2(N,[{key:"setEventId",value:function setEventId(e){this.eventId=e,null==e&&(this.eventId=P.generateUUID());}},{key:"setEventAt",value:function setEventAt(e){this.eventAt=e,null==e&&(this.eventAt=A.normalizeDateString(Date.now()));}}]);}(T),w=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"}),C=/*#__PURE__*/function(){function C(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var t=arguments.length>1?arguments[1]:undefined;_classCallCheck2(this,C);null==e?(this.browserPublicKey=new p().getBrowserPublicKey(),this.browserPrivateKey=new p().getBrowserPrivateKey(),this.platform=new p().getPlatform(),this.version=new p().getVersion(),this.browserName=new p().getBrowserName(),this.browserVersion=new p().getBrowserVersion(),this.osName=new p().getOsName(),this.osVersion=new p().getOsVersion(),this.deviceId=new p().getDeviceId(),this.deviceType=new p().getDeviceType(),new p().getEnabled()&&(this.enabled="true"===new p().getEnabled()),new p().getExternalId()&&(this.externalCode=new p().getExternalId())):t?(e.enabled&&(this.enabled=e.enabled,new p().setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,new p().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();}return _createClass2(C,[{key:"getDeviceId",value:function getDeviceId(){return this.deviceId;}},{key:"setDeviceId",value:function setDeviceId(e){this.deviceId=e;}},{key:"setExternalCode",value:function setExternalCode(e){this.externalCode=e;}},{key:"toJSON",value:function toJSON(){var e={};return this.platform&&(e.platform=this.platform),this.version&&(e.version=this.version),this.productName&&(e.productName=this.productName),this.productVersion&&(e.productVersion=this.productVersion),this.browserName&&(e.browserName=this.browserName),this.browserVersion&&(e.browserVersion=this.browserVersion),this.osName&&(e.osName=this.osName),this.osVersion&&(e.osVersion=this.osVersion),this.deviceType&&(e.deviceType=this.deviceType),this.locale&&(e.locale=this.locale),this.timeZone&&(e.timeZome=this.timeZone),this.timeOffset&&(e.timeOffset=this.timeOffset),this.deviceId&&(e.deviceId=this.deviceId),this.enabled&&(e.enabled=this.enabled),this.browserPublicKey&&(e.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(e.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(e.externalCode=this.externalCode),e;}}]);}(),D=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),M=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"}),L=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),B=/*#__PURE__*/_createClass2(function B(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;_classCallCheck2(this,B);var n=new p();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 _r24=Date.now();if(e.serviceSyncTime?(this.serviceSyncTime=e.serviceSyncTime,_r24=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):_r24=new Date(Date.now()+36e5),!t){var _e56=_r24.toString();new m("[IND]CoreApplication").d("ServiceSyncTime defined on: "+_e56).writeLog(),n.setConfigV2ServiceSyncTime(_e56);}this.encryptionType=y.HASH,e.encryptionType&&(this.encryptionType=e.encryptionType),n.setEncryptionType(this.encryptionType);}}),U=/*#__PURE__*/function(){function U(){_classCallCheck2(this,U);}return _createClass2(U,null,[{key:"getLocationPermission",value:function(){var _getLocationPermission5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee230(){var e,t;return _regenerator2().w(function(_context230){while(1)switch(_context230.n){case 0:_context230.n=1;return this.getPermission("geolocation");case 1:e=_context230.v;t={};return _context230.a(2,(e&&(t.location=e.state),t));}},_callee230,this);}));function getLocationPermission(){return _getLocationPermission5.apply(this,arguments);}return getLocationPermission;}()},{key:"getPermission",value:function(){var _getPermission5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee231(e){var _t179;return _regenerator2().w(function(_context231){while(1)switch(_context231.p=_context231.n){case 0:_context231.p=0;if(!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){_context231.n=2;break;}_context231.n=1;return navigator.permissions.query({name:e,userVisibleOnly:!0});case 1:return _context231.a(2,_context231.v);case 2:_context231.n=4;break;case 3:_context231.p=3;_t179=_context231.v;return _context231.a(2,null);case 4:return _context231.a(2,null);}},_callee231,null,[[0,3]]);}));function getPermission(_x370){return _getPermission5.apply(this,arguments);}return getPermission;}()},{key:"setPermissionsCallback",value:function(){var _setPermissionsCallback5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee232(){return _regenerator2().w(function(_context232){while(1)switch(_context232.n){case 0:_context232.n=1;return this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 1:return _context232.a(2);}},_callee232,this);}));function setPermissionsCallback(){return _setPermissionsCallback5.apply(this,arguments);}return setPermissionsCallback;}()},{key:"setCallback",value:function(){var _setCallback5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee233(e,t){var n,_r25;return _regenerator2().w(function(_context233){while(1)switch(_context233.n){case 0:_context233.n=1;return this.getPermission(e);case 1:n=_context233.v;if(n){_r25=n.state;"onchange"in n&&(n.onchange=function(){new m("[IND]CorePermissions: ").d(e+" permission state has changed from "+_r25+" to "+n.state).writeLog(),_r25=n.state,t&&t({name:e,state:n.state});});}case 2:return _context233.a(2);}},_callee233,this);}));function setCallback(_x371,_x372){return _setCallback5.apply(this,arguments);}return setCallback;}()}]);}(),k=new m("[IND]Crypto"),j=new TextEncoder("utf-8"),V="HMAC",x=/*#__PURE__*/function(){function x(){_classCallCheck2(this,x);}return _createClass2(x,null,[{key:"createHmac",value:function(){var _createHmac5=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee234(e,t){var _n31,_window5,_r26,_i36,o,s,_t180;return _regenerator2().w(function(_context234){while(1)switch(_context234.p=_context234.n){case 0:_context234.p=0;_n31=t;if(!(!0===new p().isAvoidCypher()||new p().getEncryptionType()===y.RAW)){_context234.n=1;break;}return _context234.a(2,t);case 1:if(!(new p().getEncryptionType()===y.HASH)){_context234.n=5;break;}_r26=(_window5=window)===null||_window5===void 0||(_window5=_window5.crypto)===null||_window5===void 0?void 0:_window5.subtle;if(_r26){_context234.n=2;break;}return _context234.a(2);case 2:_context234.n=3;return _r26.importKey("raw",j.encode(e),{name:V,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 3:_i36=_context234.v;_context234.n=4;return _r26.sign(V,_i36,j.encode(t));case 4:o=_context234.v;s=new Uint8Array(o);_n31=Array.prototype.map.call(s,function(e){return("00"+e.toString(16)).slice(-2);}).join(""),k.d("hmac: ",_n31).writeLog();case 5:return _context234.a(2,_n31);case 6:_context234.p=6;_t180=_context234.v;return _context234.a(2,void k.e("error:",_t180).writeLog());}},_callee234,null,[[0,6]]);}));function createHmac(_x373,_x374){return _createHmac5.apply(this,arguments);}return createHmac;}()}]);}(),Y=/*#__PURE__*/function(){function Y(){_classCallCheck2(this,Y);}return _createClass2(Y,null,[{key:"compareJSON",value:function compareJSON(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var _i37=0,_n32=n;_i37<_n32.length;_i37++){var _r27=_n32[_i37];if(e[_r27]!==t[_r27]){if("object"!=_typeof2(e[_r27])||"object"!=_typeof2(t[_r27]))return!1;if(!isEqual(e[_r27],t[_r27]))return!1;}}return!0;}}]);}(),G=/*#__PURE__*/function(){function G(){_classCallCheck2(this,G);}return _createClass2(G,null,[{key:"isValidFormat",value:function isValidFormat(e){return null!=e&&""!=e&&"null"!=e&&e.length>8;}}]);}(),F=/*#__PURE__*/function(){function F(){_classCallCheck2(this,F);}return _createClass2(F,null,[{key:"setTopicChannel",value:function setTopicChannel(e,t){var n=[];for(var _r28=0;_r28<e.length;_r28++){var _i38=e[_r28];_i38.channel=t,n.push(_i38);}return n;}}]);}(),W={Repository:p,Config:c,Api:i,Models:o,Utils:s};return r;}();},e.exports=t();},315:function _(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},r(e);}Object.defineProperty(t,"__esModule",{value:!0});var i={Core:!0};Object.defineProperty(t,"Core",{enumerable:!0,get:function get(){return a["default"];}}),Object.defineProperty(t,"default",{enumerable:!0,get:function get(){return o["default"];}});var o=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap(),i=new WeakMap();return function(e,t){if(!t&&e&&e.__esModule)return e;var o,s,a={__proto__:null,"default":e};if(null===e||"object"!=r(e)&&"function"!=typeof e)return a;if(o=t?i:n){if(o.has(e))return o.get(e);o.set(e,a);}for(var u in e)"default"!==u&&{}.hasOwnProperty.call(e,u)&&((s=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,u))&&(s.get||s.set)?o(a,u,s):a[u]=e[u]);return a;}(e,t);}(n(710));Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function get(){return o[e];}}));});var s,a=(s=n(610))&&s.__esModule?s:{"default":s};},468:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r=c(n(254)),i=c(n(234)),o=c(n(457)),s=c(n(735)),a=c(n(630)),u=c(n(291));function c(e){return e&&e.__esModule?e:{"default":e};}function l(e){return l="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},l(e);}function f(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof a?r:a,c=Object.create(u.prototype);return _h(c,"_invoke",function(n,r,i){var o,a,u,c=0,l=i||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,n){return o=t,a=0,u=e,h.n=n,s;}};function d(n,r){for(a=n,u=r,t=0;!f&&c&&!i&&t<l.length;t++){var i,o=l[t],d=h.p,E=o[2];n>3?(i=E===r)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=d&&((i=n<2&&d<o[1])?(a=0,h.v=r,h.n=o[1]):d<E&&(i=n<3||o[0]>r||r>E)&&(o[4]=n,o[5]=r,h.n=E,a=0));}if(i||n>1)return s;throw f=!0,r;}return function(i,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,E),a=l,u=E;(t=a<2?e:u)||!f;){o||(a?a<3?(a>1&&(h.n=-1),d(a,u)):h.n=u:h.v=u);try{if(c=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0);}else 1===a&&(t=o["return"])&&t.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e;}else if((t=(f=h.n<0)?u:n.call(r,h))!==s)break;}catch(t){o=e,a=1,u=t;}finally{c=1;}}return{value:t,done:f};};}(n,i,o),!0),c;}var s={};function a(){}function u(){}function c(){}t=Object.getPrototypeOf;var l=[][r]?t(t([][r]())):(_h(t={},r,function(){return this;}),t),d=c.prototype=a.prototype=Object.create(l);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_h(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e;}return u.prototype=c,_h(d,"constructor",c),_h(c,"constructor",u),u.displayName="GeneratorFunction",_h(c,i,"GeneratorFunction"),_h(d),_h(d,i,"Generator"),_h(d,r,function(){return this;}),_h(d,"toString",function(){return"[object Generator]";}),(f=function f(){return{w:o,m:E};})();}function _h(e,t,n,r){var i=Object.defineProperty;try{i({},"",{});}catch(e){i=0;}_h=function h(e,t,n,r){function o(t,n){_h(e,t,function(e){return this._invoke(t,n,e);});}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2));},_h(e,t,n,r);}function d(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void n(e);}a.done?t(u):Promise.resolve(u).then(r,i);}function E(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(e){d(o,r,i,s,a,"next",e);}function a(e){d(o,r,i,s,a,"throw",e);}s(void 0);});};}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,p(r.key),r);}}function p(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==l(t)?t:t+"";}var I=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE";},t=[{key:"getURL",value:(I=E(f().m(function e(){return f().w(function(e){for(;;)if(0===e.n)return e.a(2,this.URL_BASE);},e,this);})),function(){return I.apply(this,arguments);})},{key:"call",value:(p=E(f().m(function e(t,n,c,l){var h,d,E,y,p,I,g,_,m,b,v,S;return f().w(function(e){for(;;)switch(e.p=e.n){case 0:return h=new r["default"]("[IND]BaseClient: "),c.isServiceWorkerRequest()&&h.setLogLevel(a["default"].DEBUG),e.n=1,this.getURL();case 1:return _=e.v,m=c.getPath(n),b=_+m,v=c.getParams(),d=b+v,c.isJourneyRequest()&&(d=d.replace("v1","v2")),E={method:t,headers:c.addHeaders()},t!==this.GET&&(E.body=JSON.stringify(c.getBody())),l&&(E.credentials=l),e.p=2,y=new AbortController(),new u["default"]().getTimeoutRequestsInMilliseconds()&&0!=new u["default"]().getTimeoutRequestsInMilliseconds()&&(p=setTimeout(function(){return y.abort();},new u["default"]().getTimeoutRequestsInMilliseconds()),E.signal=y.signal),e.n=3,fetch(d,E);case 3:if(I=e.v,p&&clearTimeout(p),304==I.status){e.n=6;break;}return e.n=4,I.json();case 4:if(g=e.v,!I.ok){e.n=5;break;}return h.d("Method: "+t+"\nURL: "+d+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Response Code: "+g.statusCode+"\nResponse Message: "+g.message+"\nResponse Body:",JSON.stringify(g.data,null,"\t")).writeLog(),e.a(2,g);case 5:return h.d("Method: "+t+"\nURL: "+d+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Response Code: "+g.statusCode+"\nResponse Message: "+g.message+"\n").writeLog(),e.a(2,new i["default"](g.statusCode,g.message));case 6:return h.d("Method: "+t+"\nURL: "+d+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Response Code: "+I.status+"\n").writeLog(),e.a(2,I);case 7:e.n=10;break;case 8:if(e.p=8,"AbortError"!==(S=e.v).name){e.n=9;break;}return h.d("Method: "+t+"\nURL: "+d+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Error: "+S).writeLog(),e.a(2,o["default"].showError(s["default"],s["default"].ErrorCode.TIMEOUT_REQUEST,S));case 9:return h.d("Method: "+t+"\nURL: "+d+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Error: "+S).writeLog(),e.a(2,o["default"].showError(s["default"],s["default"].ErrorCode.GENERAL_ERROR,S));case 10:return e.a(2);}},e,this,[[2,8]]);})),function(e,t,n,r){return p.apply(this,arguments);})},{key:"get",value:(d=E(f().m(function e(t,n){return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.GET,t,n);case 1:return e.a(2,e.v);}},e,this);})),function(e,t){return d.apply(this,arguments);})},{key:"post",value:(h=E(f().m(function e(t,n,r){return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.POST,t,n,r);case 1:return e.a(2,e.v);}},e,this);})),function(e,t,n){return h.apply(this,arguments);})},{key:"put",value:(l=E(f().m(function e(t,n,r){return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.PUT,t,n,r);case 1:return e.a(2,e.v);}},e,this);})),function(e,t,n){return l.apply(this,arguments);})},{key:"delete",value:(c=E(f().m(function e(t,n){return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.DELETE,t,n);case 1:return e.a(2,e.v);}},e,this);})),function(e,t){return c.apply(this,arguments);})}],t&&y(e.prototype,t),n&&y(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
238
+ var e,t,n,c,l,h,d,p,I;}();t["default"]=I;},545:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BaseApplicationRequest",{enumerable:!0,get:function get(){return o["default"];}}),Object.defineProperty(t,"BaseClient",{enumerable:!0,get:function get(){return r["default"];}}),Object.defineProperty(t,"BaseEventRequest",{enumerable:!0,get:function get(){return s["default"];}}),Object.defineProperty(t,"BaseRequest",{enumerable:!0,get:function get(){return i["default"];}});var r=a(n(468)),i=a(n(237)),o=a(n(773)),s=a(n(943));function a(e){return e&&e.__esModule?e:{"default":e};}},773:function _(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},r(e);}var i;function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s(r.key),r);}}function s(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==r(t)?t:t+"";}function a(e,t,n){return t=c(t),function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}(e);}(e,u()?Reflect.construct(t,n||[],c(e).constructor):t.apply(e,n));}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(e){}return(u=function u(){return!!e;})();}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e);},c(e);}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e;},l(e,t);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var f=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),(e=a(this,t)).PARAM_APPLICATION_CHANNEL="channel",e.channels=n,e;}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t);}(t,e),function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}(t,[{key:"getApplicationRequest",value:function value(){return this.params=this.createQueryString(),this;}},{key:"createQueryString",value:function value(){var e="";if(this.channels&&this.channels.length>0)for(var t=0;t<this.channels.length;t++)e+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[t].toLowerCase(),"&");return e+="".concat(this.PARAM_PLATFORM,"=webpush");}}]);}(((i=n(237))&&i.__esModule?i:{"default":i})["default"]);t["default"]=f;},943:function _(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},r(e);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=a(n(237)),o=a(n(622)),s=a(n(497));function a(e){return e&&e.__esModule?e:{"default":e};}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r);}}function c(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==r(t)?t:t+"";}function l(e,t,n){return t=h(t),function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}(e);}(e,f()?Reflect.construct(t,n||[],h(e).constructor):t.apply(e,n));}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(e){}return(f=function f(){return!!e;})();}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e);},h(e);}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e;},d(e,t);}var E=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),l(this,t);}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t);}(t,e),n=t,(r=[{key:"setEventId",value:function value(e){this.eventId=e,null==e&&(this.eventId=o["default"].generateUUID());}},{key:"setEventAt",value:function value(e){this.eventAt=e,null==e&&(this.eventAt=s["default"].normalizeDateString(Date.now()));}}])&&u(n.prototype,r),i&&u(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;// removed by dead control flow
239
+ var n,r,i;}(i["default"]);t["default"]=E;},237:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r,i=(r=n(291))&&r.__esModule?r:{"default":r};function o(e){return o="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},o(e);}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r);}}function a(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==o(t)?t:t+"";}var u=function(){return function(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),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_EVENT_ID="eventId",this.PARAM_EVENT_AT="eventAt",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 value(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"");}},{key:"getBody",value:function value(){return this.body?this.body:"";}},{key:"getPath",value:function value(e){var t=this,n=e;return Object.keys(this.pathParams).forEach(function(e){n=n.replace(e,t.pathParams[e]);}),n;}},{key:"addHeaders",value:function value(){var e=this,t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach(function(n){t.append(n,e.headers[n]);}),t;}},{key:"isServiceWorkerRequest",value:function value(){return this.serviceWorkerRequest;}},{key:"setServiceWorkerRequest",value:function value(e){this.serviceWorkerRequest=e;}},{key:"isJourneyRequest",value:function value(){return this.journeyRequest;}},{key:"setJourneyRequest",value:function value(e){this.journeyRequest=e;}}]);}();t["default"]=u;},122:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r={platform:"webpush",version:"0.0.1"},i=n(904);r.version=i.version,r=Object.assign(r,{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")}});t["default"]=r;},610:function _(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},r(e);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=l(n(122)),o=l(n(291)),s=c(n(545)),a=c(n(225)),u=c(n(628));function c(e,t){if("function"==typeof WeakMap)var n=new WeakMap(),i=new WeakMap();return(c=function c(e,t){if(!t&&e&&e.__esModule)return e;var o,s,a={__proto__:null,"default":e};if(null===e||"object"!=r(e)&&"function"!=typeof e)return a;if(o=t?i:n){if(o.has(e))return o.get(e);o.set(e,a);}for(var u in e)"default"!==u&&{}.hasOwnProperty.call(e,u)&&((s=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,u))&&(s.get||s.set)?o(a,u,s):a[u]=e[u]);return a;})(e,t);}function l(e){return e&&e.__esModule?e:{"default":e};}t["default"]={Repository:o["default"],Config:i["default"],Api:s,Models:a,Utils:u};},902:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.Channel=void 0;var n=t.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"});t["default"]=n;},174:function _(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},r(e);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=a(n(291)),o=a(n(254)),s=a(n(164));function a(e){return e&&e.__esModule?e:{"default":e};}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r);}}function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}function l(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==r(t)?t:t+"";}var f=c(function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);var r=new i["default"]();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);var a=Date.now();if(t.serviceSyncTime?(this.serviceSyncTime=t.serviceSyncTime,a=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):a=new Date(Date.now()+36e5),!n){var u=a.toString();new o["default"]("[IND]CoreApplication").d("ServiceSyncTime defined on: "+u).writeLog(),r.setConfigV2ServiceSyncTime(u);}this.encryptionType=s["default"].HASH,t.encryptionType&&(this.encryptionType=t.encryptionType),r.setEncryptionType(this.encryptionType);}});t["default"]=f;},395:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r,i=(r=n(291))&&r.__esModule?r:{"default":r};function o(e){return o="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},o(e);}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r);}}function a(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==o(t)?t:t+"";}var u=function(){return function(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),null==t?(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())):n?(t.enabled&&(this.enabled=t.enabled,new i["default"]().setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,new i["default"]().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();},[{key:"getDeviceId",value:function value(){return this.deviceId;}},{key:"setDeviceId",value:function value(e){this.deviceId=e;}},{key:"setExternalCode",value:function value(e){this.externalCode=e;}},{key:"toJSON",value:function value(){var e={};return this.platform&&(e.platform=this.platform),this.version&&(e.version=this.version),this.productName&&(e.productName=this.productName),this.productVersion&&(e.productVersion=this.productVersion),this.browserName&&(e.browserName=this.browserName),this.browserVersion&&(e.browserVersion=this.browserVersion),this.osName&&(e.osName=this.osName),this.osVersion&&(e.osVersion=this.osVersion),this.deviceType&&(e.deviceType=this.deviceType),this.locale&&(e.locale=this.locale),this.timeZone&&(e.timeZome=this.timeZone),this.timeOffset&&(e.timeOffset=this.timeOffset),this.deviceId&&(e.deviceId=this.deviceId),this.enabled&&(e.enabled=this.enabled),this.browserPublicKey&&(e.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(e.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(e.externalCode=this.externalCode),e;}}]);}();t["default"]=u;},89:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});t["default"]=n;},164:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.EncryptionType=void 0;var n=t.EncryptionType=Object.freeze({RAW:"raw",HASH:"hash"});t["default"]=n;},735:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n={GENERAL_ERROR:600,TIMEOUT_REQUEST:605,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 r={ErrorCode:n,ErrorMessage:{GENERAL_ERROR:"General Error",TIMEOUT_REQUEST:"connection timeout",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"}};t["default"]=r;},234:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r);}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}function o(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var s=i(function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.errorCode=t,this.errorMessage=n,null!=r&&(this.exceptionMessage=r);});t["default"]=s;},953:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n=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"});t["default"]=n;},72:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});t["default"]=n;},225:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Channel",{enumerable:!0,get:function get(){return r.Channel;}}),Object.defineProperty(t,"CoreApplication",{enumerable:!0,get:function get(){return l["default"];}}),Object.defineProperty(t,"Device",{enumerable:!0,get:function get(){return i["default"];}}),Object.defineProperty(t,"DeviceStatus",{enumerable:!0,get:function get(){return o["default"];}}),Object.defineProperty(t,"EncryptionType",{enumerable:!0,get:function get(){return f["default"];}}),Object.defineProperty(t,"ErrorDictionary",{enumerable:!0,get:function get(){return s["default"];}}),Object.defineProperty(t,"ErrorModel",{enumerable:!0,get:function get(){return a["default"];}}),Object.defineProperty(t,"EventType",{enumerable:!0,get:function get(){return u["default"];}}),Object.defineProperty(t,"TopicSubscribeType",{enumerable:!0,get:function get(){return c["default"];}});var r=n(902),i=h(n(395)),o=h(n(89)),s=h(n(735)),a=h(n(234)),u=h(n(953)),c=h(n(72)),l=h(n(174)),f=h(n(164));function h(e){return e&&e.__esModule?e:{"default":e};}},672:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function r(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",s=n.toStringTag||"@@toStringTag";function a(n,r,o,s){var a=r&&r.prototype instanceof c?r:c,l=Object.create(a.prototype);return i(l,"_invoke",function(n,r,i){var o,s,a,c=0,l=i||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,n){return o=t,s=0,a=e,h.n=n,u;}};function d(n,r){for(s=n,a=r,t=0;!f&&c&&!i&&t<l.length;t++){var i,o=l[t],d=h.p,E=o[2];n>3?(i=E===r)&&(a=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=d&&((i=n<2&&d<o[1])?(s=0,h.v=r,h.n=o[1]):d<E&&(i=n<3||o[0]>r||r>E)&&(o[4]=n,o[5]=r,h.n=E,s=0));}if(i||n>1)return u;throw f=!0,r;}return function(i,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,E),s=l,a=E;(t=s<2?e:a)||!f;){o||(s?s<3?(s>1&&(h.n=-1),d(s,a)):h.n=a:h.v=a);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,a)))throw TypeError("iterator result is not an object");if(!t.done)return t;a=t.value,s<2&&(s=0);}else 1===s&&(t=o["return"])&&t.call(o),s<2&&(a=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e;}else if((t=(f=h.n<0)?a:n.call(r,h))!==u)break;}catch(t){o=e,s=1,a=t;}finally{c=1;}}return{value:t,done:f};};}(n,o,s),!0),l;}var u={};function c(){}function l(){}function f(){}t=Object.getPrototypeOf;var h=[][o]?t(t([][o]())):(i(t={},o,function(){return this;}),t),d=f.prototype=c.prototype=Object.create(h);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,i(e,s,"GeneratorFunction")),e.prototype=Object.create(d),e;}return l.prototype=f,i(d,"constructor",f),i(f,"constructor",l),l.displayName="GeneratorFunction",i(f,s,"GeneratorFunction"),i(d),i(d,s,"Generator"),i(d,o,function(){return this;}),i(d,"toString",function(){return"[object Generator]";}),(r=function r(){return{w:a,m:E};})();}function i(e,t,n,r){var o=Object.defineProperty;try{o({},"",{});}catch(e){o=0;}i=function(_i39){function i(_x375,_x376,_x377,_x378){return _i39.apply(this,arguments);}i.toString=function(){return _i39.toString();};return i;}(function(e,t,n,r){function s(t,n){i(e,t,function(e){return this._invoke(t,n,e);});}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(s("next",0),s("throw",1),s("return",2));}),i(e,t,n,r);}function o(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void n(e);}a.done?t(u):Promise.resolve(u).then(r,i);}function s(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function a(e){o(s,r,i,a,u,"next",e);}function u(e){o(s,r,i,a,u,"throw",e);}a(void 0);});};}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r);}}function u(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var c=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),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;},t=[{key:"getDB",value:(l=s(r().m(function e(){var t=this;return r().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,n){var r=t.IDB;if(r){var i=r.open("indigitall.indexedDB",1);i.onupgradeneeded=function(){i.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key");},i.onsuccess=function(){var t=i.result,n=t.transaction("indigitallStore","readwrite"),r=n.objectStore("indigitallStore"),o=r.index("storeIndex");e({db:t,tx:n,store:r,index:o});},i.onerror=function(e){n(e);};}else n(!1);}));},e);})),function(){return l.apply(this,arguments);})},{key:"get",value:(c=s(r().m(function e(t,n){var i=this;return r().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,r){t||r(!1),t.index.get(n).onsuccess=function(n){n.target.result&&(i.close(t),e(n.target.result.store.value)),r(!1);};}));},e);})),function(e,t){return c.apply(this,arguments);})},{key:"put",value:(u=s(r().m(function e(t,n,i){var o=this;return r().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,r){t||r(!1),t.store.put({store:{key:n,value:i}},n).onsuccess=function(n){o.close(t),e(i);};}));},e);})),function(e,t,n){return u.apply(this,arguments);})},{key:"close",value:function value(e){if(e.tx)try{e.tx.oncomplete=function(){e.db.close();};}catch(e){console.log(this.TAG,e);}}},{key:"setItem",value:(o=s(r().m(function e(t,n){var i,o;return r().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this.getDB();case 1:return i=e.v,e.a(2,this.put(i,t,n));case 2:return e.p=2,o=e.v,e.a(2,o);}},e,this,[[0,2]]);})),function(e,t){return o.apply(this,arguments);})},{key:"getItem",value:(i=s(r().m(function e(t){var n,i;return r().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this.getDB();case 1:return n=e.v,e.a(2,this.get(n,t));case 2:return e.p=2,i=e.v,e.a(2,i);}},e,this,[[0,2]]);})),function(e){return i.apply(this,arguments);})}],t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
240
+ var e,t,n,i,o,u,c,l;}();t["default"]=new c();},87:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r);}}function i(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.storage=this.isLocalStorageAvailable()?window.localStorage:null;},t=[{key:"isLocalStorageAvailable",value:function value(){try{var e=window.localStorage,t="__storage_test__";if(e)return e.setItem(t,t),e.removeItem(t),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==o.length;}return!1;}},{key:"setItem",value:function value(e,t){return null!=this.storage&&(this.storage.setItem(e,t),!0);}},{key:"getItem",value:function value(e){return null!=this.storage?this.storage.getItem(e):null;}},{key:"deleteItem",value:function(_value3){function value(_x379){return _value3.apply(this,arguments);}value.toString=function(){return _value3.toString();};return value;}(function(e){return!!this.storage&&(this.storage.setItem(e,value),!0);})},{key:"clear",value:function value(){this.storage&&this.storage.clear();}}],t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
241
+ var e,t,n;}())();t["default"]=o;},291:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r=u(n(122)),i=u(n(87)),o=u(n(672)),s=u(n(238)),a=u(n(164));function u(e){return e&&e.__esModule?e:{"default":e};}function c(e){return c="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},c(e);}function l(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof a?r:a,c=Object.create(u.prototype);return _f2(c,"_invoke",function(n,r,i){var o,a,u,c=0,l=i||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,n){return o=t,a=0,u=e,h.n=n,s;}};function d(n,r){for(a=n,u=r,t=0;!f&&c&&!i&&t<l.length;t++){var i,o=l[t],d=h.p,E=o[2];n>3?(i=E===r)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=d&&((i=n<2&&d<o[1])?(a=0,h.v=r,h.n=o[1]):d<E&&(i=n<3||o[0]>r||r>E)&&(o[4]=n,o[5]=r,h.n=E,a=0));}if(i||n>1)return s;throw f=!0,r;}return function(i,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,E),a=l,u=E;(t=a<2?e:u)||!f;){o||(a?a<3?(a>1&&(h.n=-1),d(a,u)):h.n=u:h.v=u);try{if(c=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0);}else 1===a&&(t=o["return"])&&t.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e;}else if((t=(f=h.n<0)?u:n.call(r,h))!==s)break;}catch(t){o=e,a=1,u=t;}finally{c=1;}}return{value:t,done:f};};}(n,i,o),!0),c;}var s={};function a(){}function u(){}function c(){}t=Object.getPrototypeOf;var h=[][r]?t(t([][r]())):(_f2(t={},r,function(){return this;}),t),d=c.prototype=a.prototype=Object.create(h);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_f2(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e;}return u.prototype=c,_f2(d,"constructor",c),_f2(c,"constructor",u),u.displayName="GeneratorFunction",_f2(c,i,"GeneratorFunction"),_f2(d),_f2(d,i,"Generator"),_f2(d,r,function(){return this;}),_f2(d,"toString",function(){return"[object Generator]";}),(l=function l(){return{w:o,m:E};})();}function _f2(e,t,n,r){var i=Object.defineProperty;try{i({},"",{});}catch(e){i=0;}_f2=function f(e,t,n,r){function o(t,n){_f2(e,t,function(e){return this._invoke(t,n,e);});}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2));},_f2(e,t,n,r);}function h(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void n(e);}a.done?t(u):Promise.resolve(u).then(r,i);}function d(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(e){h(o,r,i,s,a,"next",e);}function a(e){h(o,r,i,s,a,"throw",e);}s(void 0);});};}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y(r.key),r);}}function y(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==c(t)?t:t+"";}var p=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),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.TIMEOUT_REQUESTS=this.REPOSITORY+".TIMEOUT_REQUESTS",this.ENCRYPTION_TYPE=this.REPOSITORY+".ENCRYPTION_TYPE",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";},t=[{key:"setItemSessionStorage",value:function value(e,t){s["default"].setItem(e,t);}},{key:"getItemSessionStorage",value:function value(e){return s["default"].getItem(e);}},{key:"clearSessionStorage",value:function value(){s["default"].clearMessages();}},{key:"setStorage",value:function value(e,t){i["default"].setItem(e,t);}},{key:"getStorage",value:function value(e){return i["default"].getItem(e);}},{key:"clearStorage",value:function value(){i["default"].clear();}},{key:"setBrowserPublicKey",value:function value(e){i["default"].setItem(this.BROWSER_PUBLIC_KEY,e);}},{key:"getBrowserPublicKey",value:function value(){return i["default"].getItem(this.BROWSER_PUBLIC_KEY);}},{key:"setBrowserPrivateKey",value:function value(e){i["default"].setItem(this.BROWSER_PRIVATE_KEY,e);}},{key:"getBrowserPrivateKey",value:function value(){return i["default"].getItem(this.BROWSER_PRIVATE_KEY);}},{key:"setAppKey",value:(P=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(i["default"].setItem(this.APP_KEY,t),!o["default"]||!o["default"].IDB){e.n=1;break;}return e.n=1,o["default"].setItem(this.APP_KEY,t);case 1:return e.a(2);}},e,this);})),function(e){return P.apply(this,arguments);})},{key:"getAppKey",value:function value(){return i["default"].getItem(this.APP_KEY);}},{key:"setDeviceId",value:(R=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,t),!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.DEVICE_ID,t);case 1:return e.a(2);}},e,this);})),function(e){return R.apply(this,arguments);})},{key:"getDeviceId",value:function value(){return this.getStorage(this.DEVICE_ID);}},{key:"getAppKeySync",value:(T=d(l().m(function e(){return l().w(function(e){for(;;)switch(e.n){case 0:if(!o["default"]||!o["default"].IDB){e.n=2;break;}return e.n=1,o["default"].getItem(this.APP_KEY);case 1:return e.a(2,e.v);case 2:return e.a(2);}},e,this);})),function(){return T.apply(this,arguments);})},{key:"setVAPID",value:function value(e){i["default"].setItem(this.VAPID_PUBLIC,e);}},{key:"getVAPID",value:function value(){return i["default"].getItem(this.VAPID_PUBLIC);}},{key:"setEnabled",value:function value(e){i["default"].setItem(this.ENABLED,e);}},{key:"getEnabled",value:function value(){return i["default"].getItem(this.ENABLED);}},{key:"setServiceSyncTime",value:function value(e){i["default"].setItem(this.SERVICE_SYNC_TIME,e*this.BASE_TIME);}},{key:"getServiceSyncTime",value:function value(){var e=i["default"].getItem(this.SERVICE_SYNC_TIME);return e||1*this.BASE_TIME;}},{key:"setLocationEnabled",value:function value(e){i["default"].setItem(this.LOCATION_ENABLED,e);}},{key:"getLocationEnabled",value:function value(){return i["default"].getItem(this.LOCATION_ENABLED);}},{key:"setLocationUpdateMinutes",value:function value(e){i["default"].setItem(this.LOCATION_UPDATE_MINUTES,e);}},{key:"getLocationUpdateMinutes",value:function value(){var e=i["default"].getItem(this.LOCATION_UPDATE_MINUTES);return e||30;}},{key:"setRequestLocation",value:(O=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:i["default"].setItem(this.REQUEST_LOCATION,t);case 1:return e.a(2);}},e,this);})),function(e){return O.apply(this,arguments);})},{key:"getRequestLocation",value:function value(){return!!i["default"]&&i["default"].getItem(this.REQUEST_LOCATION);}},{key:"setPlatform",value:(S=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:i["default"].setItem(this.PLATFORM,t);case 1:return e.a(2);}},e,this);})),function(e){return S.apply(this,arguments);})},{key:"getPlatform",value:function value(){return i["default"]&&i["default"].getItem(this.PLATFORM)||r["default"].platform;}},{key:"getVersion",value:function value(){return r["default"].version;}},{key:"setBrowserName",value:(v=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:i["default"].setItem(this.BROWSER_NAME,t);case 1:return e.a(2);}},e,this);})),function(e){return v.apply(this,arguments);})},{key:"getBrowserName",value:function value(){return i["default"].getItem(this.BROWSER_NAME);}},{key:"setBrowserVersion",value:function value(e){i["default"].setItem(this.BROWSER_VERSION,e);}},{key:"getBrowserVersion",value:function value(){return i["default"].getItem(this.BROWSER_VERSION);}},{key:"setOsName",value:(b=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:i["default"].setItem(this.OS_NAME,t);case 1:return e.a(2);}},e,this);})),function(e){return b.apply(this,arguments);})},{key:"getOsName",value:function value(){return i["default"].getItem(this.OS_NAME);}},{key:"setOsVersion",value:function value(e){i["default"].setItem(this.OS_VERSION,e);}},{key:"getOsVersion",value:function value(){return i["default"].getItem(this.OS_VERSION);}},{key:"setDeviceType",value:function value(e){i["default"].setItem(this.DEVICE_TYPE,e);}},{key:"getDeviceType",value:function value(){return i["default"].getItem(this.DEVICE_TYPE);}},{key:"setSupported",value:function value(e){i["default"].setItem(this.SUPPORTED,e);}},{key:"getSupported",value:function value(){return i["default"].getItem(this.SUPPORTED);}},{key:"setServiceTimestamp",value:function value(e){i["default"].setItem(this.SERVICE_TIMESTAMP,e);}},{key:"getServiceTimestamp",value:function value(){return i["default"].getItem(this.SERVICE_TIMESTAMP);}},{key:"setLocationTimestamp",value:function value(e){i["default"].setItem(this.LOCATION_TIMESTAMP,e);}},{key:"getLocationTimestamp",value:function value(){return i["default"].getItem(this.LOCATION_TIMESTAMP);}},{key:"setPermissionLocation",value:function value(e){i["default"].setItem(this.PERMISSION_LOCATION,e);}},{key:"getPermissionLocation",value:function value(){return i["default"].getItem(this.PERMISSION_LOCATION);}},{key:"setDebugLog",value:function value(e){i["default"].setItem(this.SET_LOG_DEBUG,e);}},{key:"getDebugLog",value:function value(){return"false"!==i["default"].getItem(this.SET_LOG_DEBUG);}},{key:"setLogLevel",value:function value(e){i["default"].setItem(this.LOG_LEVEL,e);}},{key:"getLogLevel",value:function value(){return i["default"].getItem(this.LOG_LEVEL);}},{key:"setNewUserTimestamp",value:function value(e){i["default"].setItem(this.NEW_USER_TIMESTAMP,e);}},{key:"getNewUserTimestamp",value:function value(){return i["default"].getItem(this.NEW_USER_TIMESTAMP);}},{key:"setExternalIdRequest",value:(m=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(i["default"]&&i["default"].isLocalStorageAvailable()&&i["default"].setItem(this.EXTERNAL_ID,t),!o["default"]||!o["default"].IDB){e.n=1;break;}return e.n=1,o["default"].setItem(this.EXTERNAL_ID,t);case 1:return e.a(2);}},e,this);})),function(e){return m.apply(this,arguments);})},{key:"getExternalIdRequest",value:(_=d(l().m(function e(){var t;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!i["default"]||!i["default"].isLocalStorageAvailable()){e.n=1;break;}t=i["default"].getItem(this.EXTERNAL_ID),e.n=3;break;case 1:if(!o["default"]||!o["default"].IDB){e.n=3;break;}return e.n=2,o["default"].getItem(this.EXTERNAL_ID);case 2:t=e.v;case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2,t);}},e,this,[[0,4]]);})),function(){return _.apply(this,arguments);})},{key:"setExternalId",value:function value(e){i["default"].setItem(this.EXTERNAL_ID,e);}},{key:"getExternalId",value:function value(){return i["default"].getItem(this.EXTERNAL_ID);}},{key:"getRegisteredByCookie",value:(g=d(l().m(function e(){return l().w(function(e){for(;;)if(0===e.n)return e.a(2,i["default"].getItem(this.REGISTERED_BY_COOKIE));},e,this);})),function(){return g.apply(this,arguments);})},{key:"setRegisteredByCookie",value:(I=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:i["default"].setItem(this.REGISTERED_BY_COOKIE,t);case 1:return e.a(2);}},e,this);})),function(e){return I.apply(this,arguments);})},{key:"setLatitude",value:function value(e){i["default"].setItem(this.LATITUDE,e);}},{key:"getLatitude",value:function value(){return i["default"].getItem(this.LATITUDE);}},{key:"setLongitude",value:function value(e){i["default"].setItem(this.LONGITUDE,e);}},{key:"getLongitude",value:function value(){return i["default"].getItem(this.LONGITUDE);}},{key:"setInAppTopicList",value:(p=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.INAPP_TOPICS,t);case 1:return e.a(2);}},e,this);})),function(e){return p.apply(this,arguments);})},{key:"getInAppTopicList",value:(y=d(l().m(function e(){var t;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!this.db||!this.db.IDB){e.n=2;break;}return e.n=1,this.db.getItem(this.INAPP_TOPICS);case 1:t=e.v;case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2,t);}},e,this,[[0,3]]);})),function(){return y.apply(this,arguments);})},{key:"setTopicList",value:(h=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.TOPIC_LIST,t);case 1:return e.a(2);}},e,this);})),function(e){return h.apply(this,arguments);})},{key:"getTopicList",value:(f=d(l().m(function e(){var t;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!this.db||!this.db.IDB){e.n=2;break;}return e.n=1,this.db.getItem(this.TOPIC_LIST);case 1:t=e.v;case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2,t);}},e,this,[[0,3]]);})),function(){return f.apply(this,arguments);})},{key:"getUrlInappApi",value:function value(){return this.getStorage(this.URL_INAPP_API);}},{key:"setUrlInappApi",value:function value(e){this.setStorage(this.URL_INAPP_API,e);}},{key:"setInAppEnabled",value:function value(e){this.setStorage(this.INAPP_ENABLED,e);}},{key:"isInAppEnabled",value:function value(){return this.getStorage(this.INAPP_ENABLED);}},{key:"setAvoidCypher",value:function value(e){this.setStorage(this.AVOID_CYPHER,!0===e);}},{key:"isAvoidCypher",value:function value(){return"true"===this.getStorage(this.AVOID_CYPHER);}},{key:"getUrlDeviceApi",value:(c=d(l().m(function e(){var t;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!this.storage||!this.storage.isLocalStorageAvailable()){e.n=1;break;}t=this.getStorage(this.URL_DEVICE_API),e.n=3;break;case 1:if(!this.db||!this.db.IDB){e.n=3;break;}return e.n=2,this.db.getItem(this.URL_DEVICE_API);case 2:t=e.v;case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2,t);}},e,this,[[0,4]]);})),function(){return c.apply(this,arguments);})},{key:"setUrlDeviceApi",value:(u=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,t),!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.URL_DEVICE_API,t);case 1:return e.a(2);}},e,this);})),function(e){return u.apply(this,arguments);})},{key:"setPushDisabled",value:function value(e){this.setStorage(this.PUSH_DISABLED,e);}},{key:"isPushDisabled",value:function value(){return this.getStorage(this.PUSH_DISABLED);}},{key:"getConfigV2ServiceSyncTime",value:function value(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME);}},{key:"setConfigV2ServiceSyncTime",value:function value(e){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,e);}},{key:"getConfigV2",value:function value(){return this.getStorage(this.CONFIG_V2);}},{key:"setConfigV2",value:function value(e){this.setStorage(this.CONFIG_V2,e);}},{key:"getMaintenanceEnd",value:function value(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY);}},{key:"setMaintenanceEnd",value:function value(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,e);}},{key:"getMaintenanceStart",value:function value(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY);}},{key:"setMaintenanceStart",value:function value(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,e);}},{key:"getTimeoutRequestsInMilliseconds",value:function value(){return this.getStorage(this.TIMEOUT_REQUESTS);}},{key:"setTimeoutRequestsInMilliseconds",value:function value(e){this.setStorage(this.TIMEOUT_REQUESTS,e);}},{key:"getEncryptionType",value:function value(){var e=this.getStorage(this.ENCRYPTION_TYPE);return null===e?a["default"].HASH:e;}},{key:"setEncryptionType",value:function value(e){this.setStorage(this.ENCRYPTION_TYPE,e);}}],t&&E(e.prototype,t),n&&E(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
242
+ var e,t,n,u,c,f,h,y,p,I,g,_,m,b,v,S,O,T,R,P;}();t["default"]=p;},238:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r);}}function i(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null;},t=[{key:"isSessionStorageAvailable",value:function value(){try{var e=window.sessionStorage,t="__storage_test__";if(e)return e.setItem(t,t),e.removeItem(t),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==o.length;}return!1;}},{key:"getItem",value:function value(e){return null!=this.session?this.session.getItem(e):null;}},{key:"setItem",value:function value(e,t){return null!=this.session&&(this.session.setItem(e,t),!0);}},{key:"clearMessages",value:function value(){this.session&&this.session.removeItem("messages");}}],t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
243
+ var e,t,n;}())();t["default"]=o;},622:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r=o(n(291)),i=o(n(254));function o(e){return e&&e.__esModule?e:{"default":e};}function s(e){return s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},s(e);}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r);}}function u(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==s(t)?t:t+"";}var c=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},n=[{key:"isServiceTimestampExceed",value:function value(){return!new r["default"]().getServiceTimestamp()||new r["default"]().getServiceSyncTime()<=(Date.now()-new r["default"]().getServiceTimestamp())/6e4;}},{key:"isFunction",value:function value(e){return!(!e||"function"!=typeof e);}},{key:"generateUUID",value:function value(){var e=new i["default"]("[IND]CommonUtils: ");return"undefined"!=typeof crypto&&crypto.randomUUID?(e.d("Using crypto.randomUUID to generate UUID").writeLog(),crypto.randomUUID()):"undefined"!=typeof crypto&&crypto.getRandomValues?(e.d("Using crypto.getRandomValues to generate UUID").writeLog(),([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16);})):null;}}],(t=null)&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
244
+ var e,t,n;}();t["default"]=c;},429:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r,i=(r=n(254))&&r.__esModule?r:{"default":r};function o(e){return o="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},o(e);}function s(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof c?r:c,l=Object.create(s.prototype);return _a0(l,"_invoke",function(n,r,i){var o,s,a,c=0,l=i||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,n){return o=t,s=0,a=e,h.n=n,u;}};function d(n,r){for(s=n,a=r,t=0;!f&&c&&!i&&t<l.length;t++){var i,o=l[t],d=h.p,E=o[2];n>3?(i=E===r)&&(a=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=d&&((i=n<2&&d<o[1])?(s=0,h.v=r,h.n=o[1]):d<E&&(i=n<3||o[0]>r||r>E)&&(o[4]=n,o[5]=r,h.n=E,s=0));}if(i||n>1)return u;throw f=!0,r;}return function(i,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,E),s=l,a=E;(t=s<2?e:a)||!f;){o||(s?s<3?(s>1&&(h.n=-1),d(s,a)):h.n=a:h.v=a);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,a)))throw TypeError("iterator result is not an object");if(!t.done)return t;a=t.value,s<2&&(s=0);}else 1===s&&(t=o["return"])&&t.call(o),s<2&&(a=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e;}else if((t=(f=h.n<0)?a:n.call(r,h))!==u)break;}catch(t){o=e,s=1,a=t;}finally{c=1;}}return{value:t,done:f};};}(n,i,o),!0),l;}var u={};function c(){}function l(){}function f(){}t=Object.getPrototypeOf;var h=[][r]?t(t([][r]())):(_a0(t={},r,function(){return this;}),t),d=f.prototype=c.prototype=Object.create(h);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,_a0(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e;}return l.prototype=f,_a0(d,"constructor",f),_a0(f,"constructor",l),l.displayName="GeneratorFunction",_a0(f,i,"GeneratorFunction"),_a0(d),_a0(d,i,"Generator"),_a0(d,r,function(){return this;}),_a0(d,"toString",function(){return"[object Generator]";}),(s=function s(){return{w:o,m:E};})();}function _a0(e,t,n,r){var i=Object.defineProperty;try{i({},"",{});}catch(e){i=0;}_a0=function a(e,t,n,r){function o(t,n){_a0(e,t,function(e){return this._invoke(t,n,e);});}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2));},_a0(e,t,n,r);}function u(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void n(e);}a.done?t(u):Promise.resolve(u).then(r,i);}function c(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(e){u(o,r,i,s,a,"next",e);}function a(e){u(o,r,i,s,a,"throw",e);}s(void 0);});};}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r);}}function f(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==o(t)?t:t+"";}var h=function(){return function(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},null,[{key:"getLocationPermission",value:(r=c(s().m(function e(){var t,n;return s().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getPermission("geolocation");case 1:return t=e.v,n={},t&&(n.location=t.state),e.a(2,n);}},e,this);})),function(){return r.apply(this,arguments);})},{key:"getPermission",value:(n=c(s().m(function e(t){return s().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&t)){e.n=2;break;}return e.n=1,navigator.permissions.query({name:t,userVisibleOnly:!0});case 1:return e.a(2,e.v);case 2:e.n=4;break;case 3:return e.p=3,e.v,e.a(2,null);case 4:return e.a(2,null);}},e,null,[[0,3]]);})),function(e){return n.apply(this,arguments);})},{key:"setPermissionsCallback",value:(t=c(s().m(function e(){return s().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 1:return e.a(2);}},e,this);})),function(){return t.apply(this,arguments);})},{key:"setCallback",value:(e=c(s().m(function e(t,n){var r,o;return s().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getPermission(t);case 1:(r=e.v)&&(o=r.state,"onchange"in r&&(r.onchange=function(){new i["default"]("[IND]CorePermissions: ").d(t+" permission state has changed from "+o+" to "+r.state).writeLog(),o=r.state,n&&n({name:t,state:r.state});}));case 2:return e.a(2);}},e,this);})),function(t,n){return e.apply(this,arguments);})}]);// removed by dead control flow
245
+ var e,t,n,r;}();t["default"]=h;},170:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.CryptoUtils=void 0;var r=n(225),i=o(n(291));function o(e){return e&&e.__esModule?e:{"default":e};}function s(e){return s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},s(e);}function a(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof c?r:c,l=Object.create(a.prototype);return _u3(l,"_invoke",function(n,r,i){var o,a,u,c=0,l=i||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,n){return o=t,a=0,u=e,h.n=n,s;}};function d(n,r){for(a=n,u=r,t=0;!f&&c&&!i&&t<l.length;t++){var i,o=l[t],d=h.p,E=o[2];n>3?(i=E===r)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=d&&((i=n<2&&d<o[1])?(a=0,h.v=r,h.n=o[1]):d<E&&(i=n<3||o[0]>r||r>E)&&(o[4]=n,o[5]=r,h.n=E,a=0));}if(i||n>1)return s;throw f=!0,r;}return function(i,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,E),a=l,u=E;(t=a<2?e:u)||!f;){o||(a?a<3?(a>1&&(h.n=-1),d(a,u)):h.n=u:h.v=u);try{if(c=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0);}else 1===a&&(t=o["return"])&&t.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e;}else if((t=(f=h.n<0)?u:n.call(r,h))!==s)break;}catch(t){o=e,a=1,u=t;}finally{c=1;}}return{value:t,done:f};};}(n,i,o),!0),l;}var s={};function c(){}function l(){}function f(){}t=Object.getPrototypeOf;var h=[][r]?t(t([][r]())):(_u3(t={},r,function(){return this;}),t),d=f.prototype=c.prototype=Object.create(h);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,_u3(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e;}return l.prototype=f,_u3(d,"constructor",f),_u3(f,"constructor",l),l.displayName="GeneratorFunction",_u3(f,i,"GeneratorFunction"),_u3(d),_u3(d,i,"Generator"),_u3(d,r,function(){return this;}),_u3(d,"toString",function(){return"[object Generator]";}),(a=function a(){return{w:o,m:E};})();}function _u3(e,t,n,r){var i=Object.defineProperty;try{i({},"",{});}catch(e){i=0;}_u3=function u(e,t,n,r){function o(t,n){_u3(e,t,function(e){return this._invoke(t,n,e);});}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2));},_u3(e,t,n,r);}function c(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void n(e);}a.done?t(u):Promise.resolve(u).then(r,i);}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r);}}function f(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==s(t)?t:t+"";}var h=new(o(n(254))["default"])("[IND]Crypto"),d=new TextEncoder("utf-8"),E="HMAC",y=t.CryptoUtils=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},t=null,n=[{key:"createHmac",value:(o=a().m(function e(t,n){var o,s,u,c,l,f,y;return a().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,o=n,!0!==new i["default"]().isAvoidCypher()&&new i["default"]().getEncryptionType()!==r.EncryptionType.RAW){e.n=1;break;}return e.a(2,n);case 1:if(new i["default"]().getEncryptionType()!==r.EncryptionType.HASH){e.n=5;break;}if(u=null===(s=window)||void 0===s||null===(s=s.crypto)||void 0===s?void 0:s.subtle){e.n=2;break;}return e.a(2);case 2:return e.n=3,u.importKey("raw",d.encode(t),{name:E,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 3:return c=e.v,e.n=4,u.sign(E,c,d.encode(n));case 4:l=e.v,f=new Uint8Array(l),o=Array.prototype.map.call(f,function(e){return("00"+e.toString(16)).slice(-2);}).join(""),h.d("hmac: ",o).writeLog();case 5:return e.a(2,o);case 6:return e.p=6,y=e.v,h.e("error:",y).writeLog(),e.a(2);}},e,null,[[0,6]]);}),s=function s(){var e=this,t=arguments;return new Promise(function(n,r){var i=o.apply(e,t);function s(e){c(i,n,r,s,a,"next",e);}function a(e){c(i,n,r,s,a,"throw",e);}s(void 0);});},function(e,t){return s.apply(this,arguments);})}],t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
246
+ var e,t,n,o,s;}();t["default"]=y;},497:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0;}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function o(){};return{s:o,n:function n(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};},e:function e(_e57){throw _e57;},f:o};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var s,a=!0,u=!1;return{s:function s(){n=n.call(e);},n:function(_n33){function n(){return _n33.apply(this,arguments);}n.toString=function(){return _n33.toString();};return n;}(function(){var e=n.next();return a=e.done,e;}),e:function e(_e58){u=!0,s=_e58;},f:function f(){try{a||null==n["return"]||n["return"]();}finally{if(u)throw s;}}};}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r;}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r);}}function s(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;}function a(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var u=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},n=[{key:"normalizeDateString",value:function value(e){if("number"==typeof e||e instanceof Date){var t=new Date(e);return isNaN(t.getTime())?null:this.formatCanonicalUTC(t);}if(!e||"string"!=typeof e)return null;var n=e.trim();if(this.isCanonicalFormat(n))return n;var r=this.tryToParseLeniently(n);return r?this.formatCanonicalUTC(r):null;}},{key:"isCanonicalFormat",value:function value(e){return /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(e);}},{key:"tryToParseLeniently",value:function value(e){var t,n=r(this.LENIENT_DATE_FORMATS);try{for(n.s();!(t=n.n()).done;){var i=t.value,o=this.parseByFormat(e,i);if(o&&!isNaN(o.getTime()))return o;}}catch(e){n.e(e);}finally{n.f();}return null;}},{key:"parseByFormat",value:function value(e,t){switch(t){case"yyyy-MM-dd'T'HH:mm:ss.SSSZ":return new Date(e);case"yyyy-MM-dd'T'HH:mm:ssZ":return e.endsWith("Z")?new Date(e):new Date(e.replaceAll(/([+-]\d{2})(\d{2})$/g,"$1:$2"));case"yyyy-MM-dd'T'HH:mm:ss":return new Date(e+"Z");case"yyyy-MM-dd HH:mm:ss":return new Date(e.replaceAll(" ","T")+"Z");case"yyyy-MM-dd":return new Date(e+"T00:00:00Z");default:return null;}}},{key:"formatCanonicalUTC",value:function value(e){return e.toISOString();}}],(t=null)&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
247
+ var e,t,n;}();s(u,"DATE_FORMAT_PATTERN","yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"),s(u,"LENIENT_DATE_FORMATS",["yyyy-MM-dd'T'HH:mm:ss.SSSZ","yyyy-MM-dd'T'HH:mm:ssZ","yyyy-MM-dd'T'HH:mm:ss","yyyy-MM-dd HH:mm:ss","yyyy-MM-dd"]);t["default"]=u;},457:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r=o(n(735)),i=o(n(234));function o(e){return e&&e.__esModule?e:{"default":e};}function s(e){return s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},s(e);}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r);}}function u(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==s(t)?t:t+"";}var c=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},(t=[{key:"showError",value:function value(e,t,n){if(null!=e){var o=Object.values(e.ErrorCode).indexOf(t);if(o>=0){var s={code:Object.keys(e.ErrorCode)[o],errorId:Object.values(e.ErrorCode)[o]};return new i["default"](s,Object.values(e.ErrorMessage)[o],n);}return new i["default"](r["default"].ErrorCode.GENERAL_ERROR,"general error",n);}}}])&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
248
+ var e,t,n;}();t["default"]=new c();},325:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r);}}function i(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},i=[{key:"compareJSON",value:function value(e,t){var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var o=0,s=r;o<s.length;o++){var a=s[o];if(e[a]!==t[a]){if("object"!=n(e[a])||"object"!=n(t[a]))return!1;if(!isEqual(e[a],t[a]))return!1;}}return!0;}}],(t=null)&&r(e.prototype,t),i&&r(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
249
+ var e,t,i;}();t["default"]=o;},254:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r=o(n(291)),i=o(n(630));function o(e){return e&&e.__esModule?e:{"default":e};}function s(e){return s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},s(e);}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r);}}function u(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==s(t)?t:t+"";}var c=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.tag="[IND]",t&&(this.tag=t),this.level=i["default"].INFO,this.setLogLevel(new r["default"]().getLogLevel()),this.log=[];}return t=e,n=[{key:"setLogLevel",value:function value(e){e&&e>=i["default"].DEBUG&&e<=i["default"].ERROR&&(this.level=e);}},{key:"d",value:function value(){if(this.level<=i["default"].DEBUG)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"i",value:function value(){if(this.level<=i["default"].INFO)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"w",value:function value(){if(this.level<=i["default"].WARNING)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"e",value:function value(){if(this.level<=i["default"].ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"writeLog",value:function value(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[];}}],o=[{key:"addedAsString",value:function value(e){return"string"==typeof e?e:JSON.stringify(e,null,2);}}],n&&a(t.prototype,n),o&&a(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;// removed by dead control flow
250
+ var t,n,o;}();t["default"]=c;},630:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.LogLevel=void 0;var n=t.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});t["default"]=n;},662:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r);}}function i(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},n=[{key:"setTopicChannel",value:function value(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];i.channel=t,n.push(i);}return n;}}],(t=null)&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
251
+ var e,t,n;}();t["default"]=o;},332:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r);}}function i(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},n=[{key:"isValidFormat",value:function value(e){return null!=e&&""!=e&&"null"!=e&&e.length>8;}}],(t=null)&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
252
+ var e,t,n;}();t["default"]=o;},628:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CommonUtils",{enumerable:!0,get:function get(){return r["default"];}}),Object.defineProperty(t,"CorePermissions",{enumerable:!0,get:function get(){return i["default"];}}),Object.defineProperty(t,"CryptoUtils",{enumerable:!0,get:function get(){return o["default"];}}),Object.defineProperty(t,"DateUtils",{enumerable:!0,get:function get(){return h["default"];}}),Object.defineProperty(t,"ErrorUtils",{enumerable:!0,get:function get(){return s["default"];}}),Object.defineProperty(t,"JsonUtils",{enumerable:!0,get:function get(){return a["default"];}}),Object.defineProperty(t,"Log",{enumerable:!0,get:function get(){return u["default"];}}),Object.defineProperty(t,"LogLevel",{enumerable:!0,get:function get(){return c.LogLevel;}}),Object.defineProperty(t,"TopicUtils",{enumerable:!0,get:function get(){return f["default"];}}),Object.defineProperty(t,"Validations",{enumerable:!0,get:function get(){return l["default"];}});var r=d(n(622)),i=d(n(429)),o=d(n(170)),s=d(n(457)),a=d(n(325)),u=d(n(254)),c=n(630),l=d(n(332)),f=d(n(662)),h=d(n(497));function d(e){return e&&e.__esModule?e:{"default":e};}},904:function _(e){"use strict";e.exports=JSON.parse('{"_from":"indigitall-web-core@4.16.6","_id":"indigitall-web-core@4.16.6","_inBundle":false,"_integrity":"sha512-045LGrA/PpWZIGvHBx0xkXDeksNgYV7dHmOMMC8Ij91HirZRH7l7yOLaSFQTbFC1l5vAIJxdPNRqvwDUTGjvCQ==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.16.6","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.16.6","saveSpec":null,"fetchSpec":"4.16.6"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.16.6.tgz","_shasum":"76f7bf9db6a6a2777bf5e32fa1c8a0ed4e033ef9","_spec":"indigitall-web-core@4.16.6","_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.16.6"}');}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports;}n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]});},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t);},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0});};var r={};return function(){"use strict";n.r(r),n.d(r,{"default":function _default(){return M;}});var e=n(315).Core.Repository;var t=new(/*#__PURE__*/function(_e59){function _class20(){var _this43;_classCallCheck2(this,_class20);_this43=_callSuper2(this,_class20),_this43.AUTH_TOKEN=_this43.REPOSITORY+".AUTH_TOKEN",_this43.INBOX_AUTH_MODE=_this43.REPOSITORY+".INBOX_AUTH_MODE",_this43.URL_INBOX_API=_this43.REPOSITORY+".URL_INBOX_API";return _this43;}_inherits2(_class20,_e59);return _createClass2(_class20,[{key:"setDeviceId",value:function(){var _setDeviceId7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee235(e){return _regenerator2().w(function(_context235){while(1)switch(_context235.n){case 0:this.setStorage(this.DEVICE_ID,e);case 1:return _context235.a(2);}},_callee235,this);}));function setDeviceId(_x380){return _setDeviceId7.apply(this,arguments);}return setDeviceId;}()},{key:"getDeviceId",value:function getDeviceId(){return this.getStorage(this.DEVICE_ID);}},{key:"setAuthToken",value:function setAuthToken(e){this.setStorage(this.AUTH_TOKEN,e);}},{key:"getAuthToken",value:function getAuthToken(){return this.getStorage(this.AUTH_TOKEN);}},{key:"setInboxAuthMode",value:function setInboxAuthMode(e){this.setStorage(this.INBOX_AUTH_MODE,e);}},{key:"getInboxAuthMode",value:function getInboxAuthMode(){return this.getStorage(this.INBOX_AUTH_MODE);}},{key:"getUrlInboxApi",value:function(){var _getUrlInboxApi=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee236(){return _regenerator2().w(function(_context236){while(1)switch(_context236.n){case 0:return _context236.a(2,this.getStorage(this.URL_INBOX_API));}},_callee236,this);}));function getUrlInboxApi(){return _getUrlInboxApi.apply(this,arguments);}return getUrlInboxApi;}()},{key:"setUrlInboxApi",value:function(){var _setUrlInboxApi=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee237(e){return _regenerator2().w(function(_context237){while(1)switch(_context237.n){case 0:this.setStorage(this.URL_INBOX_API,e);case 1:return _context237.a(2);}},_callee237,this);}));function setUrlInboxApi(_x381){return _setUrlInboxApi.apply(this,arguments);}return setUrlInboxApi;}()}]);}(e))();var i=/*#__PURE__*/_createClass2(function i(e,t){_classCallCheck2(this,i);e&&(e.id&&(this.id=e.id),e.externalId&&(this.externalId=e.externalId),e.sentAt&&(this.sentAt=e.sentAt),e.status&&(this.status=e.status),e.sendingId&&(this.sendingId=e.sendingId),e.message&&(this.message=e.message),e.campaignId&&(this.campaignId=e.campaignId),this.read=!1,this.sentAt&&t&&this.sentAt<t&&(this.read=!0));});window.inboxNotification=i;var o=i,s=n(315).Core.Api.BaseClient,a=n(315).Core.Config,u=n(315).Core.Models.ErrorModel,c=n(315).Core.Utils.CommonUtils;var l=new(/*#__PURE__*/function(_s11){function _class21(){var _this44;_classCallCheck2(this,_class21);_this44=_callSuper2(this,_class21),_this44.URL_BASE=a.client.INBOX_URL_BASE,_this44.ENDPOINT_INBOX_NOTIFICATIONS="/notification",_this44.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID=_this44.ENDPOINT_INBOX_NOTIFICATIONS+"/{sendingId}",_this44.ENDPOINT_INBOX_COUNTER="/counters",_this44.ENDPOINT_INBOX_AUTH="/auth/webhook";return _this44;}_inherits2(_class21,_s11);return _createClass2(_class21,[{key:"getURL",value:function(){var _getURL8=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee238(){var e;return _regenerator2().w(function(_context238){while(1)switch(_context238.n){case 0:_context238.n=1;return t.getUrlInboxApi();case 1:e=_context238.v;return _context238.a(2,e||this.URL_BASE);}},_callee238,this);}));function getURL(){return _getURL8.apply(this,arguments);}return getURL;}()},{key:"postInboxAuth",value:function(){var _postInboxAuth=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee239(e,n,r){var i,_e60;return _regenerator2().w(function(_context239){while(1)switch(_context239.n){case 0:_context239.n=1;return this.post(this.ENDPOINT_INBOX_AUTH,e.postInboxAuth());case 1:i=_context239.v;if(!i||i instanceof u||!i.data)i?c.isFunction(r)&&r(i):c.isFunction(r)&&r();else{_e60=i.data.token;t.setAuthToken(_e60),c.isFunction(n)&&n(i);}return _context239.a(2,!0);}},_callee239,this);}));function postInboxAuth(_x382,_x383,_x384){return _postInboxAuth.apply(this,arguments);}return postInboxAuth;}()},{key:"getInbox",value:function(){var _getInbox=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee240(e,t,n){var r;return _regenerator2().w(function(_context240){while(1)switch(_context240.n){case 0:_context240.n=1;return this.get(this.ENDPOINT_INBOX_NOTIFICATIONS,e.getInboxPushRequest());case 1:r=_context240.v;return _context240.a(2,(this.getInboxResponseStatus(r,t,n),!0));}},_callee240,this);}));function getInbox(_x385,_x386,_x387){return _getInbox.apply(this,arguments);}return getInbox;}()},{key:"putInboxPush",value:function(){var _putInboxPush=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee241(e,t,n){var r;return _regenerator2().w(function(_context241){while(1)switch(_context241.n){case 0:_context241.n=1;return this.put(this.ENDPOINT_INBOX_NOTIFICATIONS,e.putInboxPushRequest());case 1:r=_context241.v;return _context241.a(2,(this.getInboxResponseEdit(r,t,n),!0));}},_callee241,this);}));function putInboxPush(_x388,_x389,_x390){return _putInboxPush.apply(this,arguments);}return putInboxPush;}()},{key:"getInboxPushWithSendingId",value:function(){var _getInboxPushWithSendingId=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee242(e,t,n,r){var i;return _regenerator2().w(function(_context242){while(1)switch(_context242.n){case 0:_context242.n=1;return this.get(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,e.getInboxPushRequestWithSendingId());case 1:i=_context242.v;return _context242.a(2,(this.getNotificationResponseStatus(i,t,n,r),!0));}},_callee242,this);}));function getInboxPushWithSendingId(_x391,_x392,_x393,_x394){return _getInboxPushWithSendingId.apply(this,arguments);}return getInboxPushWithSendingId;}()},{key:"putInboxPushWithSendingId",value:function(){var _putInboxPushWithSendingId=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee243(e,t,n,r){var i;return _regenerator2().w(function(_context243){while(1)switch(_context243.n){case 0:_context243.n=1;return this.put(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,e.putInboxWithSendingId());case 1:i=_context243.v;return _context243.a(2,(this.getNotificationResponseStatus(i,t,n,r),!0));}},_callee243,this);}));function putInboxPushWithSendingId(_x395,_x396,_x397,_x398){return _putInboxPushWithSendingId.apply(this,arguments);}return putInboxPushWithSendingId;}()},{key:"getInboxCounter",value:function(){var _getInboxCounter=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee244(e,t,n){var r;return _regenerator2().w(function(_context244){while(1)switch(_context244.n){case 0:_context244.n=1;return this.get(this.ENDPOINT_INBOX_COUNTER,e.getCounter());case 1:r=_context244.v;this.getCounterStatus(r,t,n);case 2:return _context244.a(2);}},_callee244,this);}));function getInboxCounter(_x399,_x400,_x401){return _getInboxCounter.apply(this,arguments);}return getInboxCounter;}()},{key:"getInboxResponseStatus",value:function(){var _getInboxResponseStatus=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee245(e,t,n){var _n34;return _regenerator2().w(function(_context245){while(1)switch(_context245.n){case 0:if(e&&!(e instanceof u)&&e.statusCode>=200&&e.statusCode<300){_n34=new M(e.data);c.isFunction(t)&&t(_n34);}else e?c.isFunction(n)&&n(e):c.isFunction(n)&&n();case 1:return _context245.a(2);}},_callee245);}));function getInboxResponseStatus(_x402,_x403,_x404){return _getInboxResponseStatus.apply(this,arguments);}return getInboxResponseStatus;}()},{key:"getInboxResponseEdit",value:function(){var _getInboxResponseEdit=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee246(e,t,n){return _regenerator2().w(function(_context246){while(1)switch(_context246.n){case 0:e&&!(e instanceof u)&&e.statusCode>=200&&e.statusCode<300?c.isFunction(t)&&t():e?c.isFunction(n)&&n(e):c.isFunction(n)&&n();case 1:return _context246.a(2);}},_callee246);}));function getInboxResponseEdit(_x405,_x406,_x407){return _getInboxResponseEdit.apply(this,arguments);}return getInboxResponseEdit;}()},{key:"getNotifications",value:function getNotifications(e,t){var n=[];for(var _r29=0;_r29<e.length;_r29++){var _i40=new o(e[_r29],t);n.push(_i40);}return n;}},{key:"getNotificationResponseStatus",value:function(){var _getNotificationResponseStatus=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee247(e,t,n,r){var _r30;return _regenerator2().w(function(_context247){while(1)switch(_context247.n){case 0:if(e&&!(e instanceof u)&&e.statusCode>=200&&e.statusCode<300){_r30=new o(e.data,t);c.isFunction(n)&&n(_r30);}else e?c.isFunction(r)&&r(e):c.isFunction(r)&&r();case 1:return _context247.a(2);}},_callee247);}));function getNotificationResponseStatus(_x408,_x409,_x410,_x411){return _getNotificationResponseStatus.apply(this,arguments);}return getNotificationResponseStatus;}()},{key:"getCounterStatus",value:function(){var _getCounterStatus=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee248(e,t,n){var _n35;return _regenerator2().w(function(_context248){while(1)switch(_context248.n){case 0:if(e&&!(e instanceof u)&&e.statusCode>=200&&e.statusCode<300){_n35={click:e.data.click,sent:e.data.sent,deleted:e.data.deleted,unread:this.getUnreadCounters(e.data.unread)};c.isFunction(t)&&t(_n35);}else e?c.isFunction(n)&&n(e):c.isFunction(n)&&n();case 1:return _context248.a(2);}},_callee248,this);}));function getCounterStatus(_x412,_x413,_x414){return _getCounterStatus.apply(this,arguments);}return getCounterStatus;}()},{key:"getUnreadCounters",value:function getUnreadCounters(e){return{count:e.count,lastAccess:e.lastAccess};}}]);}(s))(),f=n(315).Core.Api.BaseRequest;var h=/*#__PURE__*/function(_f3){function h(){_classCallCheck2(this,h);return _callSuper2(this,h);}_inherits2(h,_f3);return _createClass2(h,[{key:"postInboxAuth",value:function postInboxAuth(){return this.body=this.json,this;}},{key:"setJson",value:function setJson(e){this.json=e;}},{key:"addHeaders",value:function addHeaders(){var _this45=this;var e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach(function(t){e.append(t,_this45.headers[t]);}),e;}}]);}(f),d=Object.freeze({SENT:"sent",CLICK:"click",DELETED:"deleted"});window.inboxStatus=d;var E=d,y=Object.freeze({NONE:"none",DEFAULT:"default",WEBHOOK:"webhook"}),p=n(315).Core.Api.BaseRequest,I=n(315).Core.Models.EncryptionType;var g=/*#__PURE__*/function(_p2){function g(){var _this46;_classCallCheck2(this,g);_this46=_callSuper2(this,g),_this46.externalId=null,_this46.headers={},t.getExternalId()&&(_this46.externalId=t.getExternalId(),!0!==t.isAvoidCypher()&&t.getEncryptionType()!=I.RAW||(_this46.externalId=encodeURIComponent(t.getExternalId()))),null!=t.getAuthToken()&&t.getInboxAuthMode()==y.WEBHOOK&&(_this46.headers.Authorization="Bearer "+t.getAuthToken()),_this46.sendingId="",_this46.sendingIds=null,_this46.page=0,_this46.pageSize=0,_this46.dateFrom="",_this46.dateTo="",_this46.status=E.INBOXSTATUS_SENT,_this46.initialStatus=E.INBOXSTATUS_SENT,_this46.statusList=null;return _this46;}_inherits2(g,_p2);return _createClass2(g,[{key:"getInboxPushRequest",value:function getInboxPushRequest(){return this.params=this.createQueryString(),this;}},{key:"putInboxPushRequest",value:function putInboxPushRequest(){return this.params=this.createQueryStringExternalId(),this.body=this.createBodyJson(),this;}},{key:"getInboxPushRequestWithSendingId",value:function getInboxPushRequestWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this;}},{key:"putInboxWithSendingId",value:function putInboxWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this.body=this.createBodyStatusJson(),this;}},{key:"addHeaders",value:function addHeaders(){var _this47=this;var e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach(function(t){e.append(t,_this47.headers[t]);}),e;}},{key:"createQueryString",value:function createQueryString(){var e="";if(this.page&&(e+=this.PARAM_INBOX_PAGE+"="+this.page+"&"),this.pageSize&&(e+=this.PARAM_INBOX_PAGE_SIZE+"="+this.pageSize+"&"),this.dateFrom&&(e+=this.PARAM_INBOX_DATE_FROM+"="+this.dateFrom+"&"),this.dateTo&&(e+=this.PARAM_INBOX_DATE_TO+"="+this.dateTo+"&"),this.statusList){var _t181="";for(var _e61=0;_e61<this.statusList.length;_e61++)_t181+=this.statusList[_e61],_e61!=this.statusList.length-1&&(_t181+=",");e+=this.PARAM_INBOX_STATUS+"="+_t181+"&";}return e+this.createQueryStringExternalId();}},{key:"createQueryStringExternalId",value:function createQueryStringExternalId(){return this.PARAM_EXTERNAL_ID+"="+this.externalId;}},{key:"createBodyJson",value:function createBodyJson(){var e={};var t=[];try{if(e=this.createBodyStatusJson(),null!=this.sendingIds){for(var _e62=0;_e62<this.sendingIds.length;_e62++)t.push(this.sendingIds[_e62]);e.sendingIds=t;}}catch(e){console.log("Error Inbox request :"+e);}return e;}},{key:"createBodyStatusJson",value:function createBodyStatusJson(){var e={};return this.status&&(e.status=this.status),this.initialStatus&&(e.initialStatus=this.initialStatus),e;}},{key:"setSendingId",value:function setSendingId(e){this.sendingId=e;}},{key:"setSendingIds",value:function setSendingIds(e){this.sendingIds=e;}},{key:"setPage",value:function setPage(e){this.page=e;}},{key:"setPageSize",value:function setPageSize(e){this.pageSize=e;}},{key:"setDateFrom",value:function setDateFrom(e){this.dateFrom=e;}},{key:"setDateTo",value:function setDateTo(e){this.dateTo=e;}},{key:"setStatus",value:function setStatus(e){this.status=e;}},{key:"setInitialStatus",value:function setInitialStatus(e){this.initialStatus=e;}},{key:"setStatusList",value:function setStatusList(e){this.statusList=e;}}]);}(p),_=n(315).Core.Api.BaseRequest,m=n(315).Core.Models.EncryptionType;var b=/*#__PURE__*/function(_ref5){function b(){var _this48;_classCallCheck2(this,b);_this48=_callSuper2(this,b),_this48.externalId=null,_this48.headers={},t.getExternalId()&&(_this48.externalId=t.getExternalId(),!0!==t.isAvoidCypher()&&t.getEncryptionType()!=m.RAW||(_this48.externalId=encodeURIComponent(t.getExternalId()))),null!=t.getAuthToken()&&t.getInboxAuthMode()==y.WEBHOOK&&(_this48.headers.Authorization="Bearer "+t.getAuthToken());return _this48;}_inherits2(b,_ref5);return _createClass2(b,[{key:"getCounter",value:function getCounter(){return this.params=this.createQueryStringExternalId(),this;}},{key:"addHeaders",value:function addHeaders(){var _this49=this;var e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach(function(t){e.append(t,_this49.headers[t]);}),e;}},{key:"createQueryStringExternalId",value:function createQueryStringExternalId(){return this.PARAM_EXTERNAL_ID+"="+this.externalId;}}]);}(_),v=n(315).Core.Models.ErrorDictionary,S=v.ErrorCode;Object.assign(S,{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});var O=v.ErrorMessage;Object.assign(O,{INBOX_GET_ERROR:"inbox GET request error",INBOX_GET_PAGE_ERROR:"error inbox get page",INBOX_EXTERNAL_ID_NO_REGISTERED:"external Id is not registered",INBOX_NO_MESSAGES:"There are no more messages on Inbox",INBOX_IS_REQUESTING_PAGE:"Wait. Is Requesting new page",INBOX_EMPTY:"There are no messages on Inbox",INBOX_GENERAL_ERROR:"general error"});var T={ErrorCode:S,ErrorMessage:O},_n$Core$Utils7=n(315).Core.Utils,R=_n$Core$Utils7.Validations,P=_n$Core$Utils7.Log;var A=/*#__PURE__*/function(_R4){function A(){_classCallCheck2(this,A);return _callSuper2(this,A,arguments);}_inherits2(A,_R4);return _createClass2(A,null,[{key:"isAppKeyFormat",value:function isAppKeyFormat(){var e=t.getAppKey();return null!=e&&""!=e&&"null"!=e&&e.length>3;}},{key:"isValidFormatRequest",value:function isValidFormatRequest(){var e=new P("[IND]InboxValidations: "),n=t.getDeviceId();var r=!0;return this.isAppKeyFormat()||(r=!1,e.w("appKey is null or empty").writeLog()),this.isValidFormat(n)||(r=!1,e.w("deviceId is null or empty").writeLog()),r;}}]);}(R),_n$Core$Utils8=n(315).Core.Utils,N=_n$Core$Utils8.CommonUtils,w=_n$Core$Utils8.ErrorUtils,C=_n$Core$Utils8.Log;var D=/*#__PURE__*/function(){function D(e){_classCallCheck2(this,D);if(e){if(e.lastAccess&&(this.lastAccess=e.lastAccess),e.numPage?this.page=e.numPage:this.page=0,e.pageSize&&(this.pageSize=e.pageSize),this.count=0,e.count&&(this.count=e.count),e.notifications){this.notifications=[];var _t182=e.notifications;for(var _e63=0;_e63<_t182.length;_e63++){var _n36=new o(_t182[_e63],this.lastAccess);this.notifications.push(_n36);}}this.totalPages=Math.trunc(this.count/this.pageSize);}this.dateFrom=null,this.dateTo=null,this.statusList=null,this.newNotifications=[o],this.isRequestingPage=!1;}return _createClass2(D,[{key:"getNextPage",value:function getNextPage(e,n){var _this50=this;var r=new C("[IND]Inbox: ");if(this.isRequestingPage)r.w(T.ErrorMessage.INBOX_IS_REQUESTING_PAGE).writeLog();else if(this.isRequestingPage=!0,this.page+1<this.totalPages){if(A.isValidFormatRequest()){if(A.isValidFormat(t.getExternalId())){var _t183=new g();(this.page||0==this.page)&&_t183.setPage(this.page+1),this.pageSize&&_t183.setPageSize(this.pageSize),this.dateFrom&&_t183.setDateFrom(this.dateFrom),this.dateTo&&_t183.setDateTo(this.dateTo),this.statusList&&_t183.setStatusList(this.statusList),l.getInbox(_t183,function(t){_this50.notifications=_this50.notifications.concat(t.notifications),_this50.newNotifications=t.notifications,_this50.lastAccess=t.lastAccess,_this50.count=t.count,_this50.page=t.page,_this50.pageSize=t.pageSize,_this50.totalPages=t.totalPages,_this50.isRequestingPage=!1,N.isFunction(e)&&e(_this50,_this50.newNotifications);},function(n){401===n.errorCode?_this50.generateAuthToken(function(){l.getInbox(_t183,function(t){_this50.notifications=_this50.notifications.concat(t.notifications),_this50.newNotifications=t.notifications,_this50.lastAccess=t.lastAccess,_this50.count=t.count,_this50.page=t.page,_this50.pageSize=t.pageSize,_this50.totalPages=t.totalPages,_this50.isRequestingPage=!1,N.isFunction(e)&&e(_this50,_this50.newNotifications);},n);},n):(_this50.isRequestingPage=!1,N.isFunction(n)&&n());});}else this.isRequestingPage=!1,N.isFunction(n)&&n(w.showError(T,T.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));}else N.isFunction(n)&&n(w.showError(T,T.ErrorCode.GENERAL_ERROR_BAD_REQUEST));}else this.isRequestingPage=!1,N.isFunction(n)&&n(w.showError(T,T.ErrorCode.INBOX_NO_MESSAGES));}},{key:"massiveEditNotifications",value:function massiveEditNotifications(e,t,n,r){var i=E.SENT;t==E.CLICK&&(i=E.SENT),t==E.DELETED&&(i=E.CLICK),this.massiveEditNotifications(e,i,t,n,r);}},{key:"massiveEditNotificationsWithInitialStatus",value:function massiveEditNotificationsWithInitialStatus(e,n,r,i,o){var _this51=this;if(A.isValidFormatRequest()){if(A.isValidFormat(t.getExternalId())){if(r){var _t184=new g();null!=e&&_t184.setSendingIds(e),_t184.setStatus(r),_t184.setInitialStatus(n),l.putInboxPush(_t184,i,function(e){401===e.errorCode?_this51.generateAuthToken(function(){l.putInboxPush(_t184,i,e);},e):N.isFunction(e)&&e(e);});}}else N.isFunction(o)&&o(w.showError(T,T.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));}else N.isFunction(o)&&o(w.showError(T,T.ErrorCode.BAD_REQUEST_SERVER_ERROR));}},{key:"getInfoFromNotification",value:function getInfoFromNotification(e,n,r){var _this52=this;if(A.isValidFormatRequest()){if(A.isValidFormat(t.getExternalId())){if(e){var _t185=new g();_t185.setSendingId(e),l.getInboxPushWithSendingId(_t185,this.lastAccess,n,function(e){401===e.errorCode?_this52.generateAuthToken(function(){l.getInboxPushWithSendingId(_t185,_this52.lastAccess,n,e);},e):N.isFunction(e)&&e(e);});}}else N.isFunction(r)&&r(w.showError(T,T.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));}else N.isFunction(r)&&r(w.showError(T,T.ErrorCode.BAD_REQUEST_SERVER_ERROR));}},{key:"modifyStatusFromNotification",value:function modifyStatusFromNotification(e,n,r,i){var _this53=this;if(A.isValidFormatRequest()){if(A.isValidFormat(t.getExternalId())){if(e&&n){var _t186=new g();_t186.setSendingId(e),_t186.setStatus(n),l.putInboxPushWithSendingId(_t186,this.lastAccess,r,function(e){401===e.errorCode?_this53.generateAuthToken(function(){l.putInboxPushWithSendingId(_t186,_this53.lastAccess,r,e);},e):N.isFunction(e)&&e(e);});}}else N.isFunction(i)&&i(w.showError(T,T.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));}else N.isFunction(i)&&i(w.showError(T,T.ErrorCode.BAD_REQUEST_SERVER_ERROR));}}],[{key:"generateAuthToken",value:function generateAuthToken(e,t){var n={};navigator.indigitallGetAuthConfig&&N.isFunction(navigator.indigitallGetAuthConfig)&&(n=navigator.indigitallGetAuthConfig());var r=new h();r.setJson(n),l.postInboxAuth(r,e,t);}},{key:"getMessagesCountWithAuth",value:function getMessagesCountWithAuth(e,t,n){N.isFunction(e.getAuthConfig)&&(navigator.indigitallGetAuthConfig=e.getAuthConfig),D.getMessagesCount(t,n);}},{key:"setUrlInboxApi",value:function setUrlInboxApi(e){t.setUrlInboxApi(e);}},{key:"setInboxAuthMode",value:function setInboxAuthMode(e){t.setInboxAuthMode(e);}},{key:"getMessagesCount",value:function getMessagesCount(e,n){var _this54=this;if(A.isValidFormatRequest()){if(A.isValidFormat(t.getExternalId())){var _t187=new b();l.getInboxCounter(_t187,e,function(n){401===n.errorCode?_this54.generateAuthToken(function(){l.getInboxCounter(_t187,e,n);},n):N.isFunction(n)&&n(n);});}else N.isFunction(n)&&n(w.showError(T,T.ErrorCode.INBOX_GET_ERROR));}else N.isFunction(n)&&n(w.showError(T,T.ErrorCode.GENERAL_ERROR_BAD_REQUEST));}},{key:"getInboxWithAuth",value:function getInboxWithAuth(e,t,n){N.isFunction(e.getAuthConfig)&&(navigator.indigitallGetAuthConfig=e.getAuthConfig),D.getInbox(t,n);}},{key:"getInbox",value:function getInbox(e,t){D.getInboxWithPage(null,null,null,null,null,e,t);}},{key:"getInboxWithPageAuth",value:function getInboxWithPageAuth(e,t,n,r,i,o,s,a){N.isFunction(e.getAuthConfig)&&(navigator.indigitallGetAuthConfig=e.getAuthConfig),D.getInboxWithPage(t,n,r,i,o,s,a);}},{key:"getInboxWithPage",value:function getInboxWithPage(e,n,r,i,o,s,a){var _this55=this;if(A.isValidFormatRequest()){if(A.isValidFormat(t.getExternalId())){var _t188=new g();e&&_t188.setPage(e),n&&_t188.setPageSize(n),r&&(_t188.setDateFrom(r),this.dateFrom=r),i&&(_t188.setDateTo(i),this.dateTo=i),o&&(_t188.setStatusList(o),this.statusList=o),l.getInbox(_t188,function(e){_this55.totalPages=e.totalPages,0!==e.count?N.isFunction(s)&&s(e):N.isFunction(a)&&a(w.showError(T,T.ErrorCode.INBOX_GET_PAGE_ERROR));},function(e){401==e.errorCode?_this55.generateAuthToken(function(){l.getInbox(_t188,function(e){_this55.totalPages=e.totalPages,N.isFunction(s)&&s(e);},e);},e):N.isFunction(e)&&e(e);});}else N.isFunction(a)&&a(w.showError(T,T.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));}else N.isFunction(a)&&a(w.showError(T,T.ErrorCode.GENERAL_ERROR_BAD_REQUEST));}}]);}();var M=D;}(),r;}();});/***/},/***/824:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={};Object.defineProperty(exports,"default",{enumerable:true,get:function get(){return _inboxMin["default"];}});var _inboxMin=_interopRequireWildcard(__webpack_require__(114));Object.keys(_inboxMin).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_inboxMin[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _inboxMin[key];}});});function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,"default":e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}/***/},/***/603:function _(__unused_webpack_module,exports,__webpack_require__){"use strict";function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={};Object.defineProperty(exports,"default",{enumerable:true,get:function get(){return _pushMin["default"];}});var _pushMin=_interopRequireWildcard(__webpack_require__(93));Object.keys(_pushMin).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_pushMin[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _pushMin[key];}});});function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,"default":e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}/***/},/***/93:function _(module){/*! For license information please see push.min.js.LICENSE.txt */!function(e,t){if(true)module.exports=t();else// removed by dead control flow
253
+ {var i,n;}}(this,function(){return function(){var e={710:function _(e){var t;t=function t(){return function(_Class6){"use strict";var e={330:function _(e){e.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.16.6","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"}}');}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports;}n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]});},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t);},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0});};var i={};n.r(i),n.d(i,{"default":function _default(){return K;}});var r={};n.r(r),n.d(r,{BaseApplicationRequest:function BaseApplicationRequest(){return O;},BaseClient:function BaseClient(){return b;},BaseEventRequest:function BaseEventRequest(){return N;},BaseRequest:function BaseRequest(){return P;}});var o={};n.r(o),n.d(o,{Channel:function Channel(){return w;},CoreApplication:function CoreApplication(){return U;},Device:function Device(){return C;},DeviceStatus:function DeviceStatus(){return D;},EncryptionType:function EncryptionType(){return p;},ErrorDictionary:function ErrorDictionary(){return S;},ErrorModel:function ErrorModel(){return v;},EventType:function EventType(){return L;},TopicSubscribeType:function TopicSubscribeType(){return M;}});var s={};n.r(s),n.d(s,{CommonUtils:function CommonUtils(){return R;},CorePermissions:function CorePermissions(){return B;},CryptoUtils:function CryptoUtils(){return Y;},DateUtils:function DateUtils(){return A;},ErrorUtils:function ErrorUtils(){return T;},JsonUtils:function JsonUtils(){return F;},Log:function Log(){return m;},LogLevel:function LogLevel(){return I;},TopicUtils:function TopicUtils(){return G;},Validations:function Validations(){return x;}});var a={platform:"webpush",version:"0.0.1"};var u=n(330);a.version=u.version;var 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(/*#__PURE__*/function(){function _class22(){_classCallCheck2(this,_class22);this.storage=this.isLocalStorageAvailable()?window.localStorage:null;}return _createClass2(_class22,[{key:"isLocalStorageAvailable",value:function isLocalStorageAvailable(){try{var _e64=window.localStorage,_t189="__storage_test__";if(_e64)return _e64.setItem(_t189,_t189),_e64.removeItem(_t189),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==l.length;}return!1;}},{key:"setItem",value:function setItem(e,t){return null!=this.storage&&(this.storage.setItem(e,t),!0);}},{key:"getItem",value:function getItem(e){return null!=this.storage?this.storage.getItem(e):null;}},{key:"deleteItem",value:function deleteItem(e){return!!this.storage&&(this.storage.setItem(e,value),!0);}},{key:"clear",value:function clear(){this.storage&&this.storage.clear();}}]);}())(),f=l,h=new(/*#__PURE__*/function(){function _class23(){_classCallCheck2(this,_class23);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;}return _createClass2(_class23,[{key:"getDB",value:function(){var _getDB6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee249(){var _this56=this;return _regenerator2().w(function(_context249){while(1)switch(_context249.n){case 0:return _context249.a(2,new Promise(function(e,t){var n=_this56.IDB;if(n){var _i41=n.open("indigitall.indexedDB",1);_i41.onupgradeneeded=function(){_i41.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key");},_i41.onsuccess=function(){var t=_i41.result,n=t.transaction("indigitallStore","readwrite"),r=n.objectStore("indigitallStore"),o=r.index("storeIndex");e({db:t,tx:n,store:r,index:o});},_i41.onerror=function(e){t(e);};}else t(!1);}));}},_callee249);}));function getDB(){return _getDB6.apply(this,arguments);}return getDB;}()},{key:"get",value:function(){var _get0=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee250(e,t){var _this57=this;return _regenerator2().w(function(_context250){while(1)switch(_context250.n){case 0:return _context250.a(2,new Promise(function(n,i){e||i(!1),e.index.get(t).onsuccess=function(t){t.target.result&&(_this57.close(e),n(t.target.result.store.value)),i(!1);};}));}},_callee250);}));function get(_x415,_x416){return _get0.apply(this,arguments);}return get;}()},{key:"put",value:function(){var _put0=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee251(e,t,n){var _this58=this;return _regenerator2().w(function(_context251){while(1)switch(_context251.n){case 0:return _context251.a(2,new Promise(function(i,r){e||r(!1),e.store.put({store:{key:t,value:n}},t).onsuccess=function(t){_this58.close(e),i(n);};}));}},_callee251);}));function put(_x417,_x418,_x419){return _put0.apply(this,arguments);}return put;}()},{key:"close",value:function close(e){if(e.tx)try{e.tx.oncomplete=function(){e.db.close();};}catch(e){console.log(this.TAG,e);}}},{key:"setItem",value:function(){var _setItem6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee252(e,t){var _n37,_t190;return _regenerator2().w(function(_context252){while(1)switch(_context252.p=_context252.n){case 0:_context252.p=0;_context252.n=1;return this.getDB();case 1:_n37=_context252.v;return _context252.a(2,this.put(_n37,e,t));case 2:_context252.p=2;_t190=_context252.v;return _context252.a(2,_t190);}},_callee252,this,[[0,2]]);}));function setItem(_x420,_x421){return _setItem6.apply(this,arguments);}return setItem;}()},{key:"getItem",value:function(){var _getItem6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee253(e){var _t191,_t192;return _regenerator2().w(function(_context253){while(1)switch(_context253.p=_context253.n){case 0:_context253.p=0;_context253.n=1;return this.getDB();case 1:_t191=_context253.v;return _context253.a(2,this.get(_t191,e));case 2:_context253.p=2;_t192=_context253.v;return _context253.a(2,_t192);}},_callee253,this,[[0,2]]);}));function getItem(_x422){return _getItem6.apply(this,arguments);}return getItem;}()}]);}())(),d=new(/*#__PURE__*/function(){function _class24(){_classCallCheck2(this,_class24);this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null;}return _createClass2(_class24,[{key:"isSessionStorageAvailable",value:function isSessionStorageAvailable(){try{var _e65=window.sessionStorage,_t193="__storage_test__";if(_e65)return _e65.setItem(_t193,_t193),_e65.removeItem(_t193),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==d.length;}return!1;}},{key:"getItem",value:function getItem(e){return null!=this.session?this.session.getItem(e):null;}},{key:"setItem",value:function setItem(e,t){return null!=this.session&&(this.session.setItem(e,t),!0);}},{key:"clearMessages",value:function clearMessages(){this.session&&this.session.removeItem("messages");}}]);}())(),E=d,p=Object.freeze({RAW:"raw",HASH:"hash"}),y=/*#__PURE__*/function(){function y(){_classCallCheck2(this,y);this.storage=f,this.db=h,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.TIMEOUT_REQUESTS=this.REPOSITORY+".TIMEOUT_REQUESTS",this.ENCRYPTION_TYPE=this.REPOSITORY+".ENCRYPTION_TYPE",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";}return _createClass2(y,[{key:"setItemSessionStorage",value:function setItemSessionStorage(e,t){E.setItem(e,t);}},{key:"getItemSessionStorage",value:function getItemSessionStorage(e){return E.getItem(e);}},{key:"clearSessionStorage",value:function clearSessionStorage(){E.clearMessages();}},{key:"setStorage",value:function setStorage(e,t){f.setItem(e,t);}},{key:"getStorage",value:function getStorage(e){return f.getItem(e);}},{key:"clearStorage",value:function clearStorage(){f.clear();}},{key:"setBrowserPublicKey",value:function setBrowserPublicKey(e){f.setItem(this.BROWSER_PUBLIC_KEY,e);}},{key:"getBrowserPublicKey",value:function getBrowserPublicKey(){return f.getItem(this.BROWSER_PUBLIC_KEY);}},{key:"setBrowserPrivateKey",value:function setBrowserPrivateKey(e){f.setItem(this.BROWSER_PRIVATE_KEY,e);}},{key:"getBrowserPrivateKey",value:function getBrowserPrivateKey(){return f.getItem(this.BROWSER_PRIVATE_KEY);}},{key:"setAppKey",value:function(){var _setAppKey6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee254(e){var _t194;return _regenerator2().w(function(_context254){while(1)switch(_context254.n){case 0:f.setItem(this.APP_KEY,e);_t194=h&&h.IDB;if(!_t194){_context254.n=1;break;}_context254.n=1;return h.setItem(this.APP_KEY,e);case 1:return _context254.a(2);}},_callee254,this);}));function setAppKey(_x423){return _setAppKey6.apply(this,arguments);}return setAppKey;}()},{key:"getAppKey",value:function getAppKey(){return f.getItem(this.APP_KEY);}},{key:"setDeviceId",value:function(){var _setDeviceId8=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee255(e){var _t195;return _regenerator2().w(function(_context255){while(1)switch(_context255.n){case 0:this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,e);_t195=this.db&&this.db.IDB;if(!_t195){_context255.n=1;break;}_context255.n=1;return this.db.setItem(this.DEVICE_ID,e);case 1:return _context255.a(2);}},_callee255,this);}));function setDeviceId(_x424){return _setDeviceId8.apply(this,arguments);}return setDeviceId;}()},{key:"getDeviceId",value:function getDeviceId(){return this.getStorage(this.DEVICE_ID);}},{key:"getAppKeySync",value:function(){var _getAppKeySync6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee256(){return _regenerator2().w(function(_context256){while(1)switch(_context256.n){case 0:if(!(h&&h.IDB)){_context256.n=2;break;}_context256.n=1;return h.getItem(this.APP_KEY);case 1:return _context256.a(2,_context256.v);case 2:return _context256.a(2);}},_callee256,this);}));function getAppKeySync(){return _getAppKeySync6.apply(this,arguments);}return getAppKeySync;}()},{key:"setVAPID",value:function setVAPID(e){f.setItem(this.VAPID_PUBLIC,e);}},{key:"getVAPID",value:function getVAPID(){return f.getItem(this.VAPID_PUBLIC);}},{key:"setEnabled",value:function setEnabled(e){f.setItem(this.ENABLED,e);}},{key:"getEnabled",value:function getEnabled(){return f.getItem(this.ENABLED);}},{key:"setServiceSyncTime",value:function setServiceSyncTime(e){f.setItem(this.SERVICE_SYNC_TIME,e*this.BASE_TIME);}},{key:"getServiceSyncTime",value:function getServiceSyncTime(){return f.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME;}},{key:"setLocationEnabled",value:function setLocationEnabled(e){f.setItem(this.LOCATION_ENABLED,e);}},{key:"getLocationEnabled",value:function getLocationEnabled(){return f.getItem(this.LOCATION_ENABLED);}},{key:"setLocationUpdateMinutes",value:function setLocationUpdateMinutes(e){f.setItem(this.LOCATION_UPDATE_MINUTES,e);}},{key:"getLocationUpdateMinutes",value:function getLocationUpdateMinutes(){return f.getItem(this.LOCATION_UPDATE_MINUTES)||30;}},{key:"setRequestLocation",value:function(){var _setRequestLocation6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee257(e){return _regenerator2().w(function(_context257){while(1)switch(_context257.n){case 0:f.setItem(this.REQUEST_LOCATION,e);case 1:return _context257.a(2);}},_callee257,this);}));function setRequestLocation(_x425){return _setRequestLocation6.apply(this,arguments);}return setRequestLocation;}()},{key:"getRequestLocation",value:function getRequestLocation(){return!!f&&f.getItem(this.REQUEST_LOCATION);}},{key:"setPlatform",value:function(){var _setPlatform6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee258(e){return _regenerator2().w(function(_context258){while(1)switch(_context258.n){case 0:f.setItem(this.PLATFORM,e);case 1:return _context258.a(2);}},_callee258,this);}));function setPlatform(_x426){return _setPlatform6.apply(this,arguments);}return setPlatform;}()},{key:"getPlatform",value:function getPlatform(){return f&&f.getItem(this.PLATFORM)||c.platform;}},{key:"getVersion",value:function getVersion(){return c.version;}},{key:"setBrowserName",value:function(){var _setBrowserName6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee259(e){return _regenerator2().w(function(_context259){while(1)switch(_context259.n){case 0:f.setItem(this.BROWSER_NAME,e);case 1:return _context259.a(2);}},_callee259,this);}));function setBrowserName(_x427){return _setBrowserName6.apply(this,arguments);}return setBrowserName;}()},{key:"getBrowserName",value:function getBrowserName(){return f.getItem(this.BROWSER_NAME);}},{key:"setBrowserVersion",value:function setBrowserVersion(e){f.setItem(this.BROWSER_VERSION,e);}},{key:"getBrowserVersion",value:function getBrowserVersion(){return f.getItem(this.BROWSER_VERSION);}},{key:"setOsName",value:function(){var _setOsName6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee260(e){return _regenerator2().w(function(_context260){while(1)switch(_context260.n){case 0:f.setItem(this.OS_NAME,e);case 1:return _context260.a(2);}},_callee260,this);}));function setOsName(_x428){return _setOsName6.apply(this,arguments);}return setOsName;}()},{key:"getOsName",value:function getOsName(){return f.getItem(this.OS_NAME);}},{key:"setOsVersion",value:function setOsVersion(e){f.setItem(this.OS_VERSION,e);}},{key:"getOsVersion",value:function getOsVersion(){return f.getItem(this.OS_VERSION);}},{key:"setDeviceType",value:function setDeviceType(e){f.setItem(this.DEVICE_TYPE,e);}},{key:"getDeviceType",value:function getDeviceType(){return f.getItem(this.DEVICE_TYPE);}},{key:"setSupported",value:function setSupported(e){f.setItem(this.SUPPORTED,e);}},{key:"getSupported",value:function getSupported(){return f.getItem(this.SUPPORTED);}},{key:"setServiceTimestamp",value:function setServiceTimestamp(e){f.setItem(this.SERVICE_TIMESTAMP,e);}},{key:"getServiceTimestamp",value:function getServiceTimestamp(){return f.getItem(this.SERVICE_TIMESTAMP);}},{key:"setLocationTimestamp",value:function setLocationTimestamp(e){f.setItem(this.LOCATION_TIMESTAMP,e);}},{key:"getLocationTimestamp",value:function getLocationTimestamp(){return f.getItem(this.LOCATION_TIMESTAMP);}},{key:"setPermissionLocation",value:function setPermissionLocation(e){f.setItem(this.PERMISSION_LOCATION,e);}},{key:"getPermissionLocation",value:function getPermissionLocation(){return f.getItem(this.PERMISSION_LOCATION);}},{key:"setDebugLog",value:function setDebugLog(e){f.setItem(this.SET_LOG_DEBUG,e);}},{key:"getDebugLog",value:function getDebugLog(){return"false"!==f.getItem(this.SET_LOG_DEBUG);}},{key:"setLogLevel",value:function setLogLevel(e){f.setItem(this.LOG_LEVEL,e);}},{key:"getLogLevel",value:function getLogLevel(){return f.getItem(this.LOG_LEVEL);}},{key:"setNewUserTimestamp",value:function setNewUserTimestamp(e){f.setItem(this.NEW_USER_TIMESTAMP,e);}},{key:"getNewUserTimestamp",value:function getNewUserTimestamp(){return f.getItem(this.NEW_USER_TIMESTAMP);}},{key:"setExternalIdRequest",value:function(){var _setExternalIdRequest6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee261(e){var _t196;return _regenerator2().w(function(_context261){while(1)switch(_context261.n){case 0:f&&f.isLocalStorageAvailable()&&f.setItem(this.EXTERNAL_ID,e);_t196=h&&h.IDB;if(!_t196){_context261.n=1;break;}_context261.n=1;return h.setItem(this.EXTERNAL_ID,e);case 1:return _context261.a(2);}},_callee261,this);}));function setExternalIdRequest(_x429){return _setExternalIdRequest6.apply(this,arguments);}return setExternalIdRequest;}()},{key:"getExternalIdRequest",value:function(){var _getExternalIdRequest6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee262(){var e,_t197,_t198;return _regenerator2().w(function(_context262){while(1)switch(_context262.p=_context262.n){case 0:_context262.p=0;if(!(f&&f.isLocalStorageAvailable())){_context262.n=1;break;}e=f.getItem(this.EXTERNAL_ID);_context262.n=3;break;case 1:_t197=h&&h.IDB;if(!_t197){_context262.n=3;break;}_context262.n=2;return h.getItem(this.EXTERNAL_ID);case 2:e=_context262.v;case 3:_context262.n=5;break;case 4:_context262.p=4;_t198=_context262.v;case 5:return _context262.a(2,e);}},_callee262,this,[[0,4]]);}));function getExternalIdRequest(){return _getExternalIdRequest6.apply(this,arguments);}return getExternalIdRequest;}()},{key:"setExternalId",value:function setExternalId(e){f.setItem(this.EXTERNAL_ID,e);}},{key:"getExternalId",value:function getExternalId(){return f.getItem(this.EXTERNAL_ID);}},{key:"getRegisteredByCookie",value:function(){var _getRegisteredByCookie6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee263(){return _regenerator2().w(function(_context263){while(1)switch(_context263.n){case 0:return _context263.a(2,f.getItem(this.REGISTERED_BY_COOKIE));}},_callee263,this);}));function getRegisteredByCookie(){return _getRegisteredByCookie6.apply(this,arguments);}return getRegisteredByCookie;}()},{key:"setRegisteredByCookie",value:function(){var _setRegisteredByCookie6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee264(e){return _regenerator2().w(function(_context264){while(1)switch(_context264.n){case 0:f.setItem(this.REGISTERED_BY_COOKIE,e);case 1:return _context264.a(2);}},_callee264,this);}));function setRegisteredByCookie(_x430){return _setRegisteredByCookie6.apply(this,arguments);}return setRegisteredByCookie;}()},{key:"setLatitude",value:function setLatitude(e){f.setItem(this.LATITUDE,e);}},{key:"getLatitude",value:function getLatitude(){return f.getItem(this.LATITUDE);}},{key:"setLongitude",value:function setLongitude(e){f.setItem(this.LONGITUDE,e);}},{key:"getLongitude",value:function getLongitude(){return f.getItem(this.LONGITUDE);}},{key:"setInAppTopicList",value:function(){var _setInAppTopicList6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee265(e){var _t199;return _regenerator2().w(function(_context265){while(1)switch(_context265.n){case 0:_t199=this.db&&this.db.IDB;if(!_t199){_context265.n=1;break;}_context265.n=1;return this.db.setItem(this.INAPP_TOPICS,e);case 1:return _context265.a(2);}},_callee265,this);}));function setInAppTopicList(_x431){return _setInAppTopicList6.apply(this,arguments);}return setInAppTopicList;}()},{key:"getInAppTopicList",value:function(){var _getInAppTopicList6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee266(){var e,_t200,_t201;return _regenerator2().w(function(_context266){while(1)switch(_context266.p=_context266.n){case 0:_context266.p=0;_t200=this.db&&this.db.IDB;if(!_t200){_context266.n=2;break;}_context266.n=1;return this.db.getItem(this.INAPP_TOPICS);case 1:e=_context266.v;case 2:_context266.n=4;break;case 3:_context266.p=3;_t201=_context266.v;case 4:return _context266.a(2,e);}},_callee266,this,[[0,3]]);}));function getInAppTopicList(){return _getInAppTopicList6.apply(this,arguments);}return getInAppTopicList;}()},{key:"setTopicList",value:function(){var _setTopicList6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee267(e){var _t202;return _regenerator2().w(function(_context267){while(1)switch(_context267.n){case 0:_t202=this.db&&this.db.IDB;if(!_t202){_context267.n=1;break;}_context267.n=1;return this.db.setItem(this.TOPIC_LIST,e);case 1:return _context267.a(2);}},_callee267,this);}));function setTopicList(_x432){return _setTopicList6.apply(this,arguments);}return setTopicList;}()},{key:"getTopicList",value:function(){var _getTopicList6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee268(){var e,_t203,_t204;return _regenerator2().w(function(_context268){while(1)switch(_context268.p=_context268.n){case 0:_context268.p=0;_t203=this.db&&this.db.IDB;if(!_t203){_context268.n=2;break;}_context268.n=1;return this.db.getItem(this.TOPIC_LIST);case 1:e=_context268.v;case 2:_context268.n=4;break;case 3:_context268.p=3;_t204=_context268.v;case 4:return _context268.a(2,e);}},_callee268,this,[[0,3]]);}));function getTopicList(){return _getTopicList6.apply(this,arguments);}return getTopicList;}()},{key:"getUrlInappApi",value:function getUrlInappApi(){return this.getStorage(this.URL_INAPP_API);}},{key:"setUrlInappApi",value:function setUrlInappApi(e){this.setStorage(this.URL_INAPP_API,e);}},{key:"setInAppEnabled",value:function setInAppEnabled(e){this.setStorage(this.INAPP_ENABLED,e);}},{key:"isInAppEnabled",value:function isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED);}},{key:"setAvoidCypher",value:function setAvoidCypher(e){this.setStorage(this.AVOID_CYPHER,!0===e);}},{key:"isAvoidCypher",value:function isAvoidCypher(){return"true"===this.getStorage(this.AVOID_CYPHER);}},{key:"getUrlDeviceApi",value:function(){var _getUrlDeviceApi7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee269(){var e,_t205,_t206;return _regenerator2().w(function(_context269){while(1)switch(_context269.p=_context269.n){case 0:_context269.p=0;if(!(this.storage&&this.storage.isLocalStorageAvailable())){_context269.n=1;break;}e=this.getStorage(this.URL_DEVICE_API);_context269.n=3;break;case 1:_t205=this.db&&this.db.IDB;if(!_t205){_context269.n=3;break;}_context269.n=2;return this.db.getItem(this.URL_DEVICE_API);case 2:e=_context269.v;case 3:_context269.n=5;break;case 4:_context269.p=4;_t206=_context269.v;case 5:return _context269.a(2,e);}},_callee269,this,[[0,4]]);}));function getUrlDeviceApi(){return _getUrlDeviceApi7.apply(this,arguments);}return getUrlDeviceApi;}()},{key:"setUrlDeviceApi",value:function(){var _setUrlDeviceApi6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee270(e){var _t207;return _regenerator2().w(function(_context270){while(1)switch(_context270.n){case 0:this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,e);_t207=this.db&&this.db.IDB;if(!_t207){_context270.n=1;break;}_context270.n=1;return this.db.setItem(this.URL_DEVICE_API,e);case 1:return _context270.a(2);}},_callee270,this);}));function setUrlDeviceApi(_x433){return _setUrlDeviceApi6.apply(this,arguments);}return setUrlDeviceApi;}()},{key:"setPushDisabled",value:function setPushDisabled(e){this.setStorage(this.PUSH_DISABLED,e);}},{key:"isPushDisabled",value:function isPushDisabled(){return this.getStorage(this.PUSH_DISABLED);}},{key:"getConfigV2ServiceSyncTime",value:function getConfigV2ServiceSyncTime(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME);}},{key:"setConfigV2ServiceSyncTime",value:function setConfigV2ServiceSyncTime(e){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,e);}},{key:"getConfigV2",value:function getConfigV2(){return this.getStorage(this.CONFIG_V2);}},{key:"setConfigV2",value:function setConfigV2(e){this.setStorage(this.CONFIG_V2,e);}},{key:"getMaintenanceEnd",value:function getMaintenanceEnd(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY);}},{key:"setMaintenanceEnd",value:function setMaintenanceEnd(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,e);}},{key:"getMaintenanceStart",value:function getMaintenanceStart(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY);}},{key:"setMaintenanceStart",value:function setMaintenanceStart(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,e);}},{key:"getTimeoutRequestsInMilliseconds",value:function getTimeoutRequestsInMilliseconds(){return this.getStorage(this.TIMEOUT_REQUESTS);}},{key:"setTimeoutRequestsInMilliseconds",value:function setTimeoutRequestsInMilliseconds(e){this.setStorage(this.TIMEOUT_REQUESTS,e);}},{key:"getEncryptionType",value:function getEncryptionType(){var e=this.getStorage(this.ENCRYPTION_TYPE);return null===e?p.HASH:e;}},{key:"setEncryptionType",value:function setEncryptionType(e){this.setStorage(this.ENCRYPTION_TYPE,e);}}]);}(),I=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),g=I;var _=/*#__PURE__*/function(){function _(e){_classCallCheck2(this,_);this.tag="[IND]",e&&(this.tag=e),this.level=g.INFO,this.setLogLevel(new y().getLogLevel()),this.log=[];}return _createClass2(_,[{key:"setLogLevel",value:function setLogLevel(e){e&&e>=g.DEBUG&&e<=g.ERROR&&(this.level=e);}},{key:"d",value:function d(){if(this.level<=g.DEBUG)for(var _e66=0;_e66<arguments.length;_e66++)this.log+=_.addedAsString(arguments[_e66]);return this;}},{key:"i",value:function i(){if(this.level<=g.INFO)for(var _e67=0;_e67<arguments.length;_e67++)this.log+=_.addedAsString(arguments[_e67]);return this;}},{key:"w",value:function w(){if(this.level<=g.WARNING)for(var _e68=0;_e68<arguments.length;_e68++)this.log+=_.addedAsString(arguments[_e68]);return this;}},{key:"e",value:function e(){if(this.level<=g.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var _e69=0;_e69<arguments.length;_e69++)this.log+=_.addedAsString(arguments[_e69]);return this;}},{key:"writeLog",value:function writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[];}}],[{key:"addedAsString",value:function addedAsString(e){return"string"==typeof e?e:JSON.stringify(e,null,2);}}]);}();var m=_,v=/*#__PURE__*/_createClass2(function v(e,t,n){_classCallCheck2(this,v);this.errorCode=e,this.errorMessage=t,null!=n&&(this.exceptionMessage=n);}),S={ErrorCode:{GENERAL_ERROR:600,TIMEOUT_REQUEST:605,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",TIMEOUT_REQUEST:"connection timeout",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"}},T=new(/*#__PURE__*/function(){function _class25(){_classCallCheck2(this,_class25);}return _createClass2(_class25,[{key:"showError",value:function showError(e,t,n){if(null!=e){var _i42=Object.values(e.ErrorCode).indexOf(t);if(_i42>=0){var _t208=Object.keys(e.ErrorCode)[_i42],_r31=Object.values(e.ErrorCode)[_i42];return new v({code:_t208,errorId:_r31},Object.values(e.ErrorMessage)[_i42],n);}return new v(S.ErrorCode.GENERAL_ERROR,"general error",n);}}}]);}())(),b=/*#__PURE__*/function(){function b(){_classCallCheck2(this,b);this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE";}return _createClass2(b,[{key:"getURL",value:function(){var _getURL9=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee271(){return _regenerator2().w(function(_context271){while(1)switch(_context271.n){case 0:return _context271.a(2,this.URL_BASE);}},_callee271,this);}));function getURL(){return _getURL9.apply(this,arguments);}return getURL;}()},{key:"call",value:function(){var _call6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee272(e,t,n,i){var r,o,s,_t209,_i43,_a1,_t210,_t211,_t212,_t213,_t214,_t215;return _regenerator2().w(function(_context272){while(1)switch(_context272.p=_context272.n){case 0:r=new m("[IND]BaseClient: ");n.isServiceWorkerRequest()&&r.setLogLevel(g.DEBUG);_context272.n=1;return this.getURL();case 1:_t211=_context272.v;_t212=n.getPath(t);_t213=_t211+_t212;_t214=n.getParams();o=_t213+_t214;n.isJourneyRequest()&&(o=o.replace("v1","v2"));s={method:e,headers:n.addHeaders()};e!==this.GET&&(s.body=JSON.stringify(n.getBody())),i&&(s.credentials=i);_context272.p=2;_t209=new AbortController();new y().getTimeoutRequestsInMilliseconds()&&0!=new y().getTimeoutRequestsInMilliseconds()&&(_i43=setTimeout(function(){return _t209.abort();},new y().getTimeoutRequestsInMilliseconds()),s.signal=_t209.signal);_context272.n=3;return fetch(o,s);case 3:_a1=_context272.v;if(!(_i43&&clearTimeout(_i43),304!=_a1.status)){_context272.n=5;break;}_context272.n=4;return _a1.json();case 4:_t210=_context272.v;return _context272.a(2,_a1.ok?(r.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Response Code: "+_t210.statusCode+"\nResponse Message: "+_t210.message+"\nResponse Body:",JSON.stringify(_t210.data,null,"\t")).writeLog(),_t210):(r.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Response Code: "+_t210.statusCode+"\nResponse Message: "+_t210.message+"\n").writeLog(),new v(_t210.statusCode,_t210.message)));case 5:return _context272.a(2,(r.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Response Code: "+_a1.status+"\n").writeLog(),_a1));case 6:_context272.p=6;_t215=_context272.v;return _context272.a(2,"AbortError"===_t215.name?(r.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Error: "+_t215).writeLog(),T.showError(S,S.ErrorCode.TIMEOUT_REQUEST,_t215)):(r.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Error: "+_t215).writeLog(),T.showError(S,S.ErrorCode.GENERAL_ERROR,_t215)));}},_callee272,this,[[2,6]]);}));function call(_x434,_x435,_x436,_x437){return _call6.apply(this,arguments);}return call;}()},{key:"get",value:function(){var _get1=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee273(e,t){return _regenerator2().w(function(_context273){while(1)switch(_context273.n){case 0:_context273.n=1;return this.call(this.GET,e,t);case 1:return _context273.a(2,_context273.v);}},_callee273,this);}));function get(_x438,_x439){return _get1.apply(this,arguments);}return get;}()},{key:"post",value:function(){var _post6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee274(e,t,n){return _regenerator2().w(function(_context274){while(1)switch(_context274.n){case 0:_context274.n=1;return this.call(this.POST,e,t,n);case 1:return _context274.a(2,_context274.v);}},_callee274,this);}));function post(_x440,_x441,_x442){return _post6.apply(this,arguments);}return post;}()},{key:"put",value:function(){var _put1=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee275(e,t,n){return _regenerator2().w(function(_context275){while(1)switch(_context275.n){case 0:_context275.n=1;return this.call(this.PUT,e,t,n);case 1:return _context275.a(2,_context275.v);}},_callee275,this);}));function put(_x443,_x444,_x445){return _put1.apply(this,arguments);}return put;}()},{key:"delete",value:function(){var _delete7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee276(e,t){return _regenerator2().w(function(_context276){while(1)switch(_context276.n){case 0:_context276.n=1;return this.call(this.DELETE,e,t);case 1:return _context276.a(2,_context276.v);}},_callee276,this);}));function _delete(_x446,_x447){return _delete7.apply(this,arguments);}return _delete;}()}]);}(),P=/*#__PURE__*/function(){function P(){_classCallCheck2(this,P);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_EVENT_ID="eventId",this.PARAM_EVENT_AT="eventAt",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 y().getAppKey(),this.params=null,this.pathParams={},this.headers={};}return _createClass2(P,[{key:"getParams",value:function getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"");}},{key:"getBody",value:function getBody(){return this.body?this.body:"";}},{key:"getPath",value:function getPath(e){var _this59=this;var t=e;return Object.keys(this.pathParams).forEach(function(e){t=t.replace(e,_this59.pathParams[e]);}),t;}},{key:"addHeaders",value:function addHeaders(){var _this60=this;var e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach(function(t){e.append(t,_this60.headers[t]);}),e;}},{key:"isServiceWorkerRequest",value:function isServiceWorkerRequest(){return this.serviceWorkerRequest;}},{key:"setServiceWorkerRequest",value:function setServiceWorkerRequest(e){this.serviceWorkerRequest=e;}},{key:"isJourneyRequest",value:function isJourneyRequest(){return this.journeyRequest;}},{key:"setJourneyRequest",value:function setJourneyRequest(e){this.journeyRequest=e;}}]);}(),O=/*#__PURE__*/function(_P){function O(){var _this61;var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;_classCallCheck2(this,O);_this61=_callSuper2(this,O),_this61.PARAM_APPLICATION_CHANNEL="channel",_this61.channels=e;return _this61;}_inherits2(O,_P);return _createClass2(O,[{key:"getApplicationRequest",value:function getApplicationRequest(){return this.params=this.createQueryString(),this;}},{key:"createQueryString",value:function createQueryString(){var e="";if(this.channels&&this.channels.length>0)for(var _t216=0;_t216<this.channels.length;_t216++)e+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[_t216].toLowerCase(),"&");return e+="".concat(this.PARAM_PLATFORM,"=webpush"),e;}}]);}(P),R=/*#__PURE__*/function(){function R(){_classCallCheck2(this,R);}return _createClass2(R,null,[{key:"isServiceTimestampExceed",value:function isServiceTimestampExceed(){return!new y().getServiceTimestamp()||new y().getServiceSyncTime()<=(Date.now()-new y().getServiceTimestamp())/6e4;}},{key:"isFunction",value:function isFunction(e){return!(!e||"function"!=typeof e);}},{key:"generateUUID",value:function generateUUID(){var e=new m("[IND]CommonUtils: ");return"undefined"!=typeof crypto&&crypto.randomUUID?(e.d("Using crypto.randomUUID to generate UUID").writeLog(),crypto.randomUUID()):"undefined"!=typeof crypto&&crypto.getRandomValues?(e.d("Using crypto.getRandomValues to generate UUID").writeLog(),([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16);})):null;}}]);}(),A=(_Class6=/*#__PURE__*/function(){function A(){_classCallCheck2(this,A);}return _createClass2(A,null,[{key:"normalizeDateString",value:function normalizeDateString(e){if("number"==typeof e||e instanceof Date){var _t217=new Date(e);return isNaN(_t217.getTime())?null:this.formatCanonicalUTC(_t217);}if(!e||"string"!=typeof e)return null;var t=e.trim();if(this.isCanonicalFormat(t))return t;var n=this.tryToParseLeniently(t);return n?this.formatCanonicalUTC(n):null;}},{key:"isCanonicalFormat",value:function isCanonicalFormat(e){return /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(e);}},{key:"tryToParseLeniently",value:function tryToParseLeniently(e){var _iterator7=_createForOfIteratorHelper2(this.LENIENT_DATE_FORMATS),_step7;try{for(_iterator7.s();!(_step7=_iterator7.n()).done;){var _t218=_step7.value;var _n38=this.parseByFormat(e,_t218);if(_n38&&!isNaN(_n38.getTime()))return _n38;}}catch(err){_iterator7.e(err);}finally{_iterator7.f();}return null;}},{key:"parseByFormat",value:function parseByFormat(e,t){switch(t){case"yyyy-MM-dd'T'HH:mm:ss.SSSZ":return new Date(e);case"yyyy-MM-dd'T'HH:mm:ssZ":return e.endsWith("Z")?new Date(e):new Date(e.replaceAll(/([+-]\d{2})(\d{2})$/g,"$1:$2"));case"yyyy-MM-dd'T'HH:mm:ss":return new Date(e+"Z");case"yyyy-MM-dd HH:mm:ss":return new Date(e.replaceAll(" ","T")+"Z");case"yyyy-MM-dd":return new Date(e+"T00:00:00Z");default:return null;}}},{key:"formatCanonicalUTC",value:function formatCanonicalUTC(e){return e.toISOString();}}]);}(),_defineProperty2(_Class6,"DATE_FORMAT_PATTERN","yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"),_defineProperty2(_Class6,"LENIENT_DATE_FORMATS",["yyyy-MM-dd'T'HH:mm:ss.SSSZ","yyyy-MM-dd'T'HH:mm:ssZ","yyyy-MM-dd'T'HH:mm:ss","yyyy-MM-dd HH:mm:ss","yyyy-MM-dd"]),_Class6),N=/*#__PURE__*/function(_P2){function N(){_classCallCheck2(this,N);return _callSuper2(this,N);}_inherits2(N,_P2);return _createClass2(N,[{key:"setEventId",value:function setEventId(e){this.eventId=e,null==e&&(this.eventId=R.generateUUID());}},{key:"setEventAt",value:function setEventAt(e){this.eventAt=e,null==e&&(this.eventAt=A.normalizeDateString(Date.now()));}}]);}(P),w=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"}),C=/*#__PURE__*/function(){function C(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var t=arguments.length>1?arguments[1]:undefined;_classCallCheck2(this,C);null==e?(this.browserPublicKey=new y().getBrowserPublicKey(),this.browserPrivateKey=new y().getBrowserPrivateKey(),this.platform=new y().getPlatform(),this.version=new y().getVersion(),this.browserName=new y().getBrowserName(),this.browserVersion=new y().getBrowserVersion(),this.osName=new y().getOsName(),this.osVersion=new y().getOsVersion(),this.deviceId=new y().getDeviceId(),this.deviceType=new y().getDeviceType(),new y().getEnabled()&&(this.enabled="true"===new y().getEnabled()),new y().getExternalId()&&(this.externalCode=new y().getExternalId())):t?(e.enabled&&(this.enabled=e.enabled,new y().setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,new y().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();}return _createClass2(C,[{key:"getDeviceId",value:function getDeviceId(){return this.deviceId;}},{key:"setDeviceId",value:function setDeviceId(e){this.deviceId=e;}},{key:"setExternalCode",value:function setExternalCode(e){this.externalCode=e;}},{key:"toJSON",value:function toJSON(){var e={};return this.platform&&(e.platform=this.platform),this.version&&(e.version=this.version),this.productName&&(e.productName=this.productName),this.productVersion&&(e.productVersion=this.productVersion),this.browserName&&(e.browserName=this.browserName),this.browserVersion&&(e.browserVersion=this.browserVersion),this.osName&&(e.osName=this.osName),this.osVersion&&(e.osVersion=this.osVersion),this.deviceType&&(e.deviceType=this.deviceType),this.locale&&(e.locale=this.locale),this.timeZone&&(e.timeZome=this.timeZone),this.timeOffset&&(e.timeOffset=this.timeOffset),this.deviceId&&(e.deviceId=this.deviceId),this.enabled&&(e.enabled=this.enabled),this.browserPublicKey&&(e.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(e.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(e.externalCode=this.externalCode),e;}}]);}(),D=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),L=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"}),M=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),U=/*#__PURE__*/_createClass2(function U(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;_classCallCheck2(this,U);var n=new y();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 _i44=Date.now();if(e.serviceSyncTime?(this.serviceSyncTime=e.serviceSyncTime,_i44=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):_i44=new Date(Date.now()+36e5),!t){var _e70=_i44.toString();new m("[IND]CoreApplication").d("ServiceSyncTime defined on: "+_e70).writeLog(),n.setConfigV2ServiceSyncTime(_e70);}this.encryptionType=p.HASH,e.encryptionType&&(this.encryptionType=e.encryptionType),n.setEncryptionType(this.encryptionType);}}),B=/*#__PURE__*/function(){function B(){_classCallCheck2(this,B);}return _createClass2(B,null,[{key:"getLocationPermission",value:function(){var _getLocationPermission6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee277(){var e,t;return _regenerator2().w(function(_context277){while(1)switch(_context277.n){case 0:_context277.n=1;return this.getPermission("geolocation");case 1:e=_context277.v;t={};return _context277.a(2,(e&&(t.location=e.state),t));}},_callee277,this);}));function getLocationPermission(){return _getLocationPermission6.apply(this,arguments);}return getLocationPermission;}()},{key:"getPermission",value:function(){var _getPermission6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee278(e){var _t219;return _regenerator2().w(function(_context278){while(1)switch(_context278.p=_context278.n){case 0:_context278.p=0;if(!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){_context278.n=2;break;}_context278.n=1;return navigator.permissions.query({name:e,userVisibleOnly:!0});case 1:return _context278.a(2,_context278.v);case 2:_context278.n=4;break;case 3:_context278.p=3;_t219=_context278.v;return _context278.a(2,null);case 4:return _context278.a(2,null);}},_callee278,null,[[0,3]]);}));function getPermission(_x448){return _getPermission6.apply(this,arguments);}return getPermission;}()},{key:"setPermissionsCallback",value:function(){var _setPermissionsCallback6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee279(){return _regenerator2().w(function(_context279){while(1)switch(_context279.n){case 0:_context279.n=1;return this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 1:return _context279.a(2);}},_callee279,this);}));function setPermissionsCallback(){return _setPermissionsCallback6.apply(this,arguments);}return setPermissionsCallback;}()},{key:"setCallback",value:function(){var _setCallback6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee280(e,t){var n,_i45;return _regenerator2().w(function(_context280){while(1)switch(_context280.n){case 0:_context280.n=1;return this.getPermission(e);case 1:n=_context280.v;if(n){_i45=n.state;"onchange"in n&&(n.onchange=function(){new m("[IND]CorePermissions: ").d(e+" permission state has changed from "+_i45+" to "+n.state).writeLog(),_i45=n.state,t&&t({name:e,state:n.state});});}case 2:return _context280.a(2);}},_callee280,this);}));function setCallback(_x449,_x450){return _setCallback6.apply(this,arguments);}return setCallback;}()}]);}(),k=new m("[IND]Crypto"),V=new TextEncoder("utf-8"),j="HMAC",Y=/*#__PURE__*/function(){function Y(){_classCallCheck2(this,Y);}return _createClass2(Y,null,[{key:"createHmac",value:function(){var _createHmac6=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee281(e,t){var _n39,_window6,_i46,r,o,s,_t220;return _regenerator2().w(function(_context281){while(1)switch(_context281.p=_context281.n){case 0:_context281.p=0;_n39=t;if(!(!0===new y().isAvoidCypher()||new y().getEncryptionType()===p.RAW)){_context281.n=1;break;}return _context281.a(2,t);case 1:if(!(new y().getEncryptionType()===p.HASH)){_context281.n=5;break;}_i46=(_window6=window)===null||_window6===void 0||(_window6=_window6.crypto)===null||_window6===void 0?void 0:_window6.subtle;if(_i46){_context281.n=2;break;}return _context281.a(2);case 2:_context281.n=3;return _i46.importKey("raw",V.encode(e),{name:j,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 3:r=_context281.v;_context281.n=4;return _i46.sign(j,r,V.encode(t));case 4:o=_context281.v;s=new Uint8Array(o);_n39=Array.prototype.map.call(s,function(e){return("00"+e.toString(16)).slice(-2);}).join(""),k.d("hmac: ",_n39).writeLog();case 5:return _context281.a(2,_n39);case 6:_context281.p=6;_t220=_context281.v;return _context281.a(2,void k.e("error:",_t220).writeLog());}},_callee281,null,[[0,6]]);}));function createHmac(_x451,_x452){return _createHmac6.apply(this,arguments);}return createHmac;}()}]);}(),F=/*#__PURE__*/function(){function F(){_classCallCheck2(this,F);}return _createClass2(F,null,[{key:"compareJSON",value:function compareJSON(e,t){var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var _i47=0,_n40=n;_i47<_n40.length;_i47++){var _i48=_n40[_i47];if(e[_i48]!==t[_i48]){if("object"!=_typeof2(e[_i48])||"object"!=_typeof2(t[_i48]))return!1;if(!isEqual(e[_i48],t[_i48]))return!1;}}return!0;}}]);}(),x=/*#__PURE__*/function(){function x(){_classCallCheck2(this,x);}return _createClass2(x,null,[{key:"isValidFormat",value:function isValidFormat(e){return null!=e&&""!=e&&"null"!=e&&e.length>8;}}]);}(),G=/*#__PURE__*/function(){function G(){_classCallCheck2(this,G);}return _createClass2(G,null,[{key:"setTopicChannel",value:function setTopicChannel(e,t){var n=[];for(var _i49=0;_i49<e.length;_i49++){var r=e[_i49];r.channel=t,n.push(r);}return n;}}]);}(),K={Repository:y,Config:c,Api:r,Models:o,Utils:s};return i;}();},e.exports=t();},315:function _(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},i(e);}Object.defineProperty(t,"__esModule",{value:!0});var r={Core:!0};Object.defineProperty(t,"Core",{enumerable:!0,get:function get(){return a["default"];}}),Object.defineProperty(t,"default",{enumerable:!0,get:function get(){return o["default"];}});var o=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap(),r=new WeakMap();return function(e,t){if(!t&&e&&e.__esModule)return e;var o,s,a={__proto__:null,"default":e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return a;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,a);}for(var u in e)"default"!==u&&{}.hasOwnProperty.call(e,u)&&((s=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,u))&&(s.get||s.set)?o(a,u,s):a[u]=e[u]);return a;}(e,t);}(n(710));Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function get(){return o[e];}}));});var s,a=(s=n(610))&&s.__esModule?s:{"default":s};},468:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=c(n(254)),r=c(n(234)),o=c(n(457)),s=c(n(735)),a=c(n(630)),u=c(n(291));function c(e){return e&&e.__esModule?e:{"default":e};}function l(e){return l="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},l(e);}function f(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var u=i&&i.prototype instanceof a?i:a,c=Object.create(u.prototype);return _h2(c,"_invoke",function(n,i,r){var o,a,u,c=0,l=r||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,n){return o=t,a=0,u=e,h.n=n,s;}};function d(n,i){for(a=n,u=i,t=0;!f&&c&&!r&&t<l.length;t++){var r,o=l[t],d=h.p,E=o[2];n>3?(r=E===i)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=d&&((r=n<2&&d<o[1])?(a=0,h.v=i,h.n=o[1]):d<E&&(r=n<3||o[0]>i||i>E)&&(o[4]=n,o[5]=i,h.n=E,a=0));}if(r||n>1)return s;throw f=!0,i;}return function(r,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,E),a=l,u=E;(t=a<2?e:u)||!f;){o||(a?a<3?(a>1&&(h.n=-1),d(a,u)):h.n=u:h.v=u);try{if(c=2,o){if(a||(r="next"),t=o[r]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0);}else 1===a&&(t=o["return"])&&t.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),a=1);o=e;}else if((t=(f=h.n<0)?u:n.call(i,h))!==s)break;}catch(t){o=e,a=1,u=t;}finally{c=1;}}return{value:t,done:f};};}(n,r,o),!0),c;}var s={};function a(){}function u(){}function c(){}t=Object.getPrototypeOf;var l=[][i]?t(t([][i]())):(_h2(t={},i,function(){return this;}),t),d=c.prototype=a.prototype=Object.create(l);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_h2(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e;}return u.prototype=c,_h2(d,"constructor",c),_h2(c,"constructor",u),u.displayName="GeneratorFunction",_h2(c,r,"GeneratorFunction"),_h2(d),_h2(d,r,"Generator"),_h2(d,i,function(){return this;}),_h2(d,"toString",function(){return"[object Generator]";}),(f=function f(){return{w:o,m:E};})();}function _h2(e,t,n,i){var r=Object.defineProperty;try{r({},"",{});}catch(e){r=0;}_h2=function h(e,t,n,i){function o(t,n){_h2(e,t,function(e){return this._invoke(t,n,e);});}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(o("next",0),o("throw",1),o("return",2));},_h2(e,t,n,i);}function d(e,t,n,i,r,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void n(e);}a.done?t(u):Promise.resolve(u).then(i,r);}function E(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function s(e){d(o,i,r,s,a,"next",e);}function a(e){d(o,i,r,s,a,"throw",e);}s(void 0);});};}function p(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,y(i.key),i);}}function y(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=l(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==l(t)?t:t+"";}var I=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE";},t=[{key:"getURL",value:(I=E(f().m(function e(){return f().w(function(e){for(;;)if(0===e.n)return e.a(2,this.URL_BASE);},e,this);})),function(){return I.apply(this,arguments);})},{key:"call",value:(y=E(f().m(function e(t,n,c,l){var h,d,E,p,y,I,g,_,m,v,S,T;return f().w(function(e){for(;;)switch(e.p=e.n){case 0:return h=new i["default"]("[IND]BaseClient: "),c.isServiceWorkerRequest()&&h.setLogLevel(a["default"].DEBUG),e.n=1,this.getURL();case 1:return _=e.v,m=c.getPath(n),v=_+m,S=c.getParams(),d=v+S,c.isJourneyRequest()&&(d=d.replace("v1","v2")),E={method:t,headers:c.addHeaders()},t!==this.GET&&(E.body=JSON.stringify(c.getBody())),l&&(E.credentials=l),e.p=2,p=new AbortController(),new u["default"]().getTimeoutRequestsInMilliseconds()&&0!=new u["default"]().getTimeoutRequestsInMilliseconds()&&(y=setTimeout(function(){return p.abort();},new u["default"]().getTimeoutRequestsInMilliseconds()),E.signal=p.signal),e.n=3,fetch(d,E);case 3:if(I=e.v,y&&clearTimeout(y),304==I.status){e.n=6;break;}return e.n=4,I.json();case 4:if(g=e.v,!I.ok){e.n=5;break;}return h.d("Method: "+t+"\nURL: "+d+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Response Code: "+g.statusCode+"\nResponse Message: "+g.message+"\nResponse Body:",JSON.stringify(g.data,null,"\t")).writeLog(),e.a(2,g);case 5:return h.d("Method: "+t+"\nURL: "+d+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Response Code: "+g.statusCode+"\nResponse Message: "+g.message+"\n").writeLog(),e.a(2,new r["default"](g.statusCode,g.message));case 6:return h.d("Method: "+t+"\nURL: "+d+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Response Code: "+I.status+"\n").writeLog(),e.a(2,I);case 7:e.n=10;break;case 8:if(e.p=8,"AbortError"!==(T=e.v).name){e.n=9;break;}return h.d("Method: "+t+"\nURL: "+d+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Error: "+T).writeLog(),e.a(2,o["default"].showError(s["default"],s["default"].ErrorCode.TIMEOUT_REQUEST,T));case 9:return h.d("Method: "+t+"\nURL: "+d+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Error: "+T).writeLog(),e.a(2,o["default"].showError(s["default"],s["default"].ErrorCode.GENERAL_ERROR,T));case 10:return e.a(2);}},e,this,[[2,8]]);})),function(e,t,n,i){return y.apply(this,arguments);})},{key:"get",value:(d=E(f().m(function e(t,n){return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.GET,t,n);case 1:return e.a(2,e.v);}},e,this);})),function(e,t){return d.apply(this,arguments);})},{key:"post",value:(h=E(f().m(function e(t,n,i){return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.POST,t,n,i);case 1:return e.a(2,e.v);}},e,this);})),function(e,t,n){return h.apply(this,arguments);})},{key:"put",value:(l=E(f().m(function e(t,n,i){return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.PUT,t,n,i);case 1:return e.a(2,e.v);}},e,this);})),function(e,t,n){return l.apply(this,arguments);})},{key:"delete",value:(c=E(f().m(function e(t,n){return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.DELETE,t,n);case 1:return e.a(2,e.v);}},e,this);})),function(e,t){return c.apply(this,arguments);})}],t&&p(e.prototype,t),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
254
+ var e,t,n,c,l,h,d,y,I;}();t["default"]=I;},545:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BaseApplicationRequest",{enumerable:!0,get:function get(){return o["default"];}}),Object.defineProperty(t,"BaseClient",{enumerable:!0,get:function get(){return i["default"];}}),Object.defineProperty(t,"BaseEventRequest",{enumerable:!0,get:function get(){return s["default"];}}),Object.defineProperty(t,"BaseRequest",{enumerable:!0,get:function get(){return r["default"];}});var i=a(n(468)),r=a(n(237)),o=a(n(773)),s=a(n(943));function a(e){return e&&e.__esModule?e:{"default":e};}},773:function _(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},i(e);}var r;function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,s(i.key),i);}}function s(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==i(t)?t:t+"";}function a(e,t,n){return t=c(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}(e);}(e,u()?Reflect.construct(t,n||[],c(e).constructor):t.apply(e,n));}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(e){}return(u=function u(){return!!e;})();}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e);},c(e);}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e;},l(e,t);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var f=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),(e=a(this,t)).PARAM_APPLICATION_CHANNEL="channel",e.channels=n,e;}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t);}(t,e),function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}(t,[{key:"getApplicationRequest",value:function value(){return this.params=this.createQueryString(),this;}},{key:"createQueryString",value:function value(){var e="";if(this.channels&&this.channels.length>0)for(var t=0;t<this.channels.length;t++)e+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[t].toLowerCase(),"&");return e+="".concat(this.PARAM_PLATFORM,"=webpush");}}]);}(((r=n(237))&&r.__esModule?r:{"default":r})["default"]);t["default"]=f;},943:function _(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},i(e);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r=a(n(237)),o=a(n(622)),s=a(n(497));function a(e){return e&&e.__esModule?e:{"default":e};}function u(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,c(i.key),i);}}function c(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==i(t)?t:t+"";}function l(e,t,n){return t=h(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}(e);}(e,f()?Reflect.construct(t,n||[],h(e).constructor):t.apply(e,n));}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(e){}return(f=function f(){return!!e;})();}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e);},h(e);}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e;},d(e,t);}var E=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),l(this,t);}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t);}(t,e),n=t,(i=[{key:"setEventId",value:function value(e){this.eventId=e,null==e&&(this.eventId=o["default"].generateUUID());}},{key:"setEventAt",value:function value(e){this.eventAt=e,null==e&&(this.eventAt=s["default"].normalizeDateString(Date.now()));}}])&&u(n.prototype,i),r&&u(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n;// removed by dead control flow
255
+ var n,i,r;}(r["default"]);t["default"]=E;},237:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i,r=(i=n(291))&&i.__esModule?i:{"default":i};function o(e){return o="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},o(e);}function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,a(i.key),i);}}function a(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==o(t)?t:t+"";}var u=function(){return function(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),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_EVENT_ID="eventId",this.PARAM_EVENT_AT="eventAt",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 r["default"]().getAppKey(),this.params=null,this.pathParams={},this.headers={};},[{key:"getParams",value:function value(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"");}},{key:"getBody",value:function value(){return this.body?this.body:"";}},{key:"getPath",value:function value(e){var t=this,n=e;return Object.keys(this.pathParams).forEach(function(e){n=n.replace(e,t.pathParams[e]);}),n;}},{key:"addHeaders",value:function value(){var e=this,t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach(function(n){t.append(n,e.headers[n]);}),t;}},{key:"isServiceWorkerRequest",value:function value(){return this.serviceWorkerRequest;}},{key:"setServiceWorkerRequest",value:function value(e){this.serviceWorkerRequest=e;}},{key:"isJourneyRequest",value:function value(){return this.journeyRequest;}},{key:"setJourneyRequest",value:function value(e){this.journeyRequest=e;}}]);}();t["default"]=u;},122:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i={platform:"webpush",version:"0.0.1"},r=n(904);i.version=r.version,i=Object.assign(i,{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")}});t["default"]=i;},610:function _(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},i(e);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r=l(n(122)),o=l(n(291)),s=c(n(545)),a=c(n(225)),u=c(n(628));function c(e,t){if("function"==typeof WeakMap)var n=new WeakMap(),r=new WeakMap();return(c=function c(e,t){if(!t&&e&&e.__esModule)return e;var o,s,a={__proto__:null,"default":e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return a;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,a);}for(var u in e)"default"!==u&&{}.hasOwnProperty.call(e,u)&&((s=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,u))&&(s.get||s.set)?o(a,u,s):a[u]=e[u]);return a;})(e,t);}function l(e){return e&&e.__esModule?e:{"default":e};}t["default"]={Repository:o["default"],Config:r["default"],Api:s,Models:a,Utils:u};},902:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.Channel=void 0;var n=t.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"});t["default"]=n;},174:function _(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},i(e);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r=a(n(291)),o=a(n(254)),s=a(n(164));function a(e){return e&&e.__esModule?e:{"default":e};}function u(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,l(i.key),i);}}function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}function l(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==i(t)?t:t+"";}var f=c(function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);var i=new r["default"]();if(null!=t){i.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,i.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,i.setMaintenanceEnd(this.maintenanceWindow.end))),t.networkEventsEnabled&&(this.networkEventsEnabled=t.networkEventsEnabled),t.networkUpdateMinutes&&(this.networkUpdateMinutes=t.networkUpdateMinutes);var a=Date.now();if(t.serviceSyncTime?(this.serviceSyncTime=t.serviceSyncTime,a=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):a=new Date(Date.now()+36e5),!n){var u=a.toString();new o["default"]("[IND]CoreApplication").d("ServiceSyncTime defined on: "+u).writeLog(),i.setConfigV2ServiceSyncTime(u);}this.encryptionType=s["default"].HASH,t.encryptionType&&(this.encryptionType=t.encryptionType),i.setEncryptionType(this.encryptionType);}});t["default"]=f;},395:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i,r=(i=n(291))&&i.__esModule?i:{"default":i};function o(e){return o="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},o(e);}function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,a(i.key),i);}}function a(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==o(t)?t:t+"";}var u=function(){return function(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),null==t?(this.browserPublicKey=new r["default"]().getBrowserPublicKey(),this.browserPrivateKey=new r["default"]().getBrowserPrivateKey(),this.platform=new r["default"]().getPlatform(),this.version=new r["default"]().getVersion(),this.browserName=new r["default"]().getBrowserName(),this.browserVersion=new r["default"]().getBrowserVersion(),this.osName=new r["default"]().getOsName(),this.osVersion=new r["default"]().getOsVersion(),this.deviceId=new r["default"]().getDeviceId(),this.deviceType=new r["default"]().getDeviceType(),new r["default"]().getEnabled()&&(this.enabled="true"===new r["default"]().getEnabled()),new r["default"]().getExternalId()&&(this.externalCode=new r["default"]().getExternalId())):n?(t.enabled&&(this.enabled=t.enabled,new r["default"]().setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,new r["default"]().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();},[{key:"getDeviceId",value:function value(){return this.deviceId;}},{key:"setDeviceId",value:function value(e){this.deviceId=e;}},{key:"setExternalCode",value:function value(e){this.externalCode=e;}},{key:"toJSON",value:function value(){var e={};return this.platform&&(e.platform=this.platform),this.version&&(e.version=this.version),this.productName&&(e.productName=this.productName),this.productVersion&&(e.productVersion=this.productVersion),this.browserName&&(e.browserName=this.browserName),this.browserVersion&&(e.browserVersion=this.browserVersion),this.osName&&(e.osName=this.osName),this.osVersion&&(e.osVersion=this.osVersion),this.deviceType&&(e.deviceType=this.deviceType),this.locale&&(e.locale=this.locale),this.timeZone&&(e.timeZome=this.timeZone),this.timeOffset&&(e.timeOffset=this.timeOffset),this.deviceId&&(e.deviceId=this.deviceId),this.enabled&&(e.enabled=this.enabled),this.browserPublicKey&&(e.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(e.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(e.externalCode=this.externalCode),e;}}]);}();t["default"]=u;},89:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});t["default"]=n;},164:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.EncryptionType=void 0;var n=t.EncryptionType=Object.freeze({RAW:"raw",HASH:"hash"});t["default"]=n;},735:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n={GENERAL_ERROR:600,TIMEOUT_REQUEST:605,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 i={ErrorCode:n,ErrorMessage:{GENERAL_ERROR:"General Error",TIMEOUT_REQUEST:"connection timeout",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"}};t["default"]=i;},234:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,o(i.key),i);}}function r(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}function o(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var s=r(function e(t,n,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.errorCode=t,this.errorMessage=n,null!=i&&(this.exceptionMessage=i);});t["default"]=s;},953:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n=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"});t["default"]=n;},72:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});t["default"]=n;},225:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Channel",{enumerable:!0,get:function get(){return i.Channel;}}),Object.defineProperty(t,"CoreApplication",{enumerable:!0,get:function get(){return l["default"];}}),Object.defineProperty(t,"Device",{enumerable:!0,get:function get(){return r["default"];}}),Object.defineProperty(t,"DeviceStatus",{enumerable:!0,get:function get(){return o["default"];}}),Object.defineProperty(t,"EncryptionType",{enumerable:!0,get:function get(){return f["default"];}}),Object.defineProperty(t,"ErrorDictionary",{enumerable:!0,get:function get(){return s["default"];}}),Object.defineProperty(t,"ErrorModel",{enumerable:!0,get:function get(){return a["default"];}}),Object.defineProperty(t,"EventType",{enumerable:!0,get:function get(){return u["default"];}}),Object.defineProperty(t,"TopicSubscribeType",{enumerable:!0,get:function get(){return c["default"];}});var i=n(902),r=h(n(395)),o=h(n(89)),s=h(n(735)),a=h(n(234)),u=h(n(953)),c=h(n(72)),l=h(n(174)),f=h(n(164));function h(e){return e&&e.__esModule?e:{"default":e};}},672:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",s=n.toStringTag||"@@toStringTag";function a(n,i,o,s){var a=i&&i.prototype instanceof c?i:c,l=Object.create(a.prototype);return _r32(l,"_invoke",function(n,i,r){var o,s,a,c=0,l=r||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,n){return o=t,s=0,a=e,h.n=n,u;}};function d(n,i){for(s=n,a=i,t=0;!f&&c&&!r&&t<l.length;t++){var r,o=l[t],d=h.p,E=o[2];n>3?(r=E===i)&&(a=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=d&&((r=n<2&&d<o[1])?(s=0,h.v=i,h.n=o[1]):d<E&&(r=n<3||o[0]>i||i>E)&&(o[4]=n,o[5]=i,h.n=E,s=0));}if(r||n>1)return u;throw f=!0,i;}return function(r,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,E),s=l,a=E;(t=s<2?e:a)||!f;){o||(s?s<3?(s>1&&(h.n=-1),d(s,a)):h.n=a:h.v=a);try{if(c=2,o){if(s||(r="next"),t=o[r]){if(!(t=t.call(o,a)))throw TypeError("iterator result is not an object");if(!t.done)return t;a=t.value,s<2&&(s=0);}else 1===s&&(t=o["return"])&&t.call(o),s<2&&(a=TypeError("The iterator does not provide a '"+r+"' method"),s=1);o=e;}else if((t=(f=h.n<0)?a:n.call(i,h))!==u)break;}catch(t){o=e,s=1,a=t;}finally{c=1;}}return{value:t,done:f};};}(n,o,s),!0),l;}var u={};function c(){}function l(){}function f(){}t=Object.getPrototypeOf;var h=[][o]?t(t([][o]())):(_r32(t={},o,function(){return this;}),t),d=f.prototype=c.prototype=Object.create(h);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,_r32(e,s,"GeneratorFunction")),e.prototype=Object.create(d),e;}return l.prototype=f,_r32(d,"constructor",f),_r32(f,"constructor",l),l.displayName="GeneratorFunction",_r32(f,s,"GeneratorFunction"),_r32(d),_r32(d,s,"Generator"),_r32(d,o,function(){return this;}),_r32(d,"toString",function(){return"[object Generator]";}),(i=function i(){return{w:a,m:E};})();}function _r32(e,t,n,i){var o=Object.defineProperty;try{o({},"",{});}catch(e){o=0;}_r32=function r(e,t,n,i){function s(t,n){_r32(e,t,function(e){return this._invoke(t,n,e);});}t?o?o(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(s("next",0),s("throw",1),s("return",2));},_r32(e,t,n,i);}function o(e,t,n,i,r,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void n(e);}a.done?t(u):Promise.resolve(u).then(i,r);}function s(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var s=e.apply(t,n);function a(e){o(s,i,r,a,u,"next",e);}function u(e){o(s,i,r,a,u,"throw",e);}a(void 0);});};}function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,u(i.key),i);}}function u(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var c=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),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;},t=[{key:"getDB",value:(l=s(i().m(function e(){var t=this;return i().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,n){var i=t.IDB;if(i){var r=i.open("indigitall.indexedDB",1);r.onupgradeneeded=function(){r.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key");},r.onsuccess=function(){var t=r.result,n=t.transaction("indigitallStore","readwrite"),i=n.objectStore("indigitallStore"),o=i.index("storeIndex");e({db:t,tx:n,store:i,index:o});},r.onerror=function(e){n(e);};}else n(!1);}));},e);})),function(){return l.apply(this,arguments);})},{key:"get",value:(c=s(i().m(function e(t,n){var r=this;return i().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,i){t||i(!1),t.index.get(n).onsuccess=function(n){n.target.result&&(r.close(t),e(n.target.result.store.value)),i(!1);};}));},e);})),function(e,t){return c.apply(this,arguments);})},{key:"put",value:(u=s(i().m(function e(t,n,r){var o=this;return i().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,i){t||i(!1),t.store.put({store:{key:n,value:r}},n).onsuccess=function(n){o.close(t),e(r);};}));},e);})),function(e,t,n){return u.apply(this,arguments);})},{key:"close",value:function value(e){if(e.tx)try{e.tx.oncomplete=function(){e.db.close();};}catch(e){console.log(this.TAG,e);}}},{key:"setItem",value:(o=s(i().m(function e(t,n){var r,o;return i().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this.getDB();case 1:return r=e.v,e.a(2,this.put(r,t,n));case 2:return e.p=2,o=e.v,e.a(2,o);}},e,this,[[0,2]]);})),function(e,t){return o.apply(this,arguments);})},{key:"getItem",value:(r=s(i().m(function e(t){var n,r;return i().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this.getDB();case 1:return n=e.v,e.a(2,this.get(n,t));case 2:return e.p=2,r=e.v,e.a(2,r);}},e,this,[[0,2]]);})),function(e){return r.apply(this,arguments);})}],t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
256
+ var e,t,n,r,o,u,c,l;}();t["default"]=new c();},87:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i);}}function r(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.storage=this.isLocalStorageAvailable()?window.localStorage:null;},t=[{key:"isLocalStorageAvailable",value:function value(){try{var e=window.localStorage,t="__storage_test__";if(e)return e.setItem(t,t),e.removeItem(t),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==o.length;}return!1;}},{key:"setItem",value:function value(e,t){return null!=this.storage&&(this.storage.setItem(e,t),!0);}},{key:"getItem",value:function value(e){return null!=this.storage?this.storage.getItem(e):null;}},{key:"deleteItem",value:function(_value4){function value(_x453){return _value4.apply(this,arguments);}value.toString=function(){return _value4.toString();};return value;}(function(e){return!!this.storage&&(this.storage.setItem(e,value),!0);})},{key:"clear",value:function value(){this.storage&&this.storage.clear();}}],t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
257
+ var e,t,n;}())();t["default"]=o;},291:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=u(n(122)),r=u(n(87)),o=u(n(672)),s=u(n(238)),a=u(n(164));function u(e){return e&&e.__esModule?e:{"default":e};}function c(e){return c="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},c(e);}function l(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var u=i&&i.prototype instanceof a?i:a,c=Object.create(u.prototype);return _f4(c,"_invoke",function(n,i,r){var o,a,u,c=0,l=r||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,n){return o=t,a=0,u=e,h.n=n,s;}};function d(n,i){for(a=n,u=i,t=0;!f&&c&&!r&&t<l.length;t++){var r,o=l[t],d=h.p,E=o[2];n>3?(r=E===i)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=d&&((r=n<2&&d<o[1])?(a=0,h.v=i,h.n=o[1]):d<E&&(r=n<3||o[0]>i||i>E)&&(o[4]=n,o[5]=i,h.n=E,a=0));}if(r||n>1)return s;throw f=!0,i;}return function(r,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,E),a=l,u=E;(t=a<2?e:u)||!f;){o||(a?a<3?(a>1&&(h.n=-1),d(a,u)):h.n=u:h.v=u);try{if(c=2,o){if(a||(r="next"),t=o[r]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0);}else 1===a&&(t=o["return"])&&t.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),a=1);o=e;}else if((t=(f=h.n<0)?u:n.call(i,h))!==s)break;}catch(t){o=e,a=1,u=t;}finally{c=1;}}return{value:t,done:f};};}(n,r,o),!0),c;}var s={};function a(){}function u(){}function c(){}t=Object.getPrototypeOf;var h=[][i]?t(t([][i]())):(_f4(t={},i,function(){return this;}),t),d=c.prototype=a.prototype=Object.create(h);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_f4(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e;}return u.prototype=c,_f4(d,"constructor",c),_f4(c,"constructor",u),u.displayName="GeneratorFunction",_f4(c,r,"GeneratorFunction"),_f4(d),_f4(d,r,"Generator"),_f4(d,i,function(){return this;}),_f4(d,"toString",function(){return"[object Generator]";}),(l=function l(){return{w:o,m:E};})();}function _f4(e,t,n,i){var r=Object.defineProperty;try{r({},"",{});}catch(e){r=0;}_f4=function f(e,t,n,i){function o(t,n){_f4(e,t,function(e){return this._invoke(t,n,e);});}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(o("next",0),o("throw",1),o("return",2));},_f4(e,t,n,i);}function h(e,t,n,i,r,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void n(e);}a.done?t(u):Promise.resolve(u).then(i,r);}function d(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function s(e){h(o,i,r,s,a,"next",e);}function a(e){h(o,i,r,s,a,"throw",e);}s(void 0);});};}function E(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,p(i.key),i);}}function p(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=c(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==c(t)?t:t+"";}var y=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.storage=r["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.TIMEOUT_REQUESTS=this.REPOSITORY+".TIMEOUT_REQUESTS",this.ENCRYPTION_TYPE=this.REPOSITORY+".ENCRYPTION_TYPE",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";},t=[{key:"setItemSessionStorage",value:function value(e,t){s["default"].setItem(e,t);}},{key:"getItemSessionStorage",value:function value(e){return s["default"].getItem(e);}},{key:"clearSessionStorage",value:function value(){s["default"].clearMessages();}},{key:"setStorage",value:function value(e,t){r["default"].setItem(e,t);}},{key:"getStorage",value:function value(e){return r["default"].getItem(e);}},{key:"clearStorage",value:function value(){r["default"].clear();}},{key:"setBrowserPublicKey",value:function value(e){r["default"].setItem(this.BROWSER_PUBLIC_KEY,e);}},{key:"getBrowserPublicKey",value:function value(){return r["default"].getItem(this.BROWSER_PUBLIC_KEY);}},{key:"setBrowserPrivateKey",value:function value(e){r["default"].setItem(this.BROWSER_PRIVATE_KEY,e);}},{key:"getBrowserPrivateKey",value:function value(){return r["default"].getItem(this.BROWSER_PRIVATE_KEY);}},{key:"setAppKey",value:(R=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(r["default"].setItem(this.APP_KEY,t),!o["default"]||!o["default"].IDB){e.n=1;break;}return e.n=1,o["default"].setItem(this.APP_KEY,t);case 1:return e.a(2);}},e,this);})),function(e){return R.apply(this,arguments);})},{key:"getAppKey",value:function value(){return r["default"].getItem(this.APP_KEY);}},{key:"setDeviceId",value:(O=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,t),!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.DEVICE_ID,t);case 1:return e.a(2);}},e,this);})),function(e){return O.apply(this,arguments);})},{key:"getDeviceId",value:function value(){return this.getStorage(this.DEVICE_ID);}},{key:"getAppKeySync",value:(P=d(l().m(function e(){return l().w(function(e){for(;;)switch(e.n){case 0:if(!o["default"]||!o["default"].IDB){e.n=2;break;}return e.n=1,o["default"].getItem(this.APP_KEY);case 1:return e.a(2,e.v);case 2:return e.a(2);}},e,this);})),function(){return P.apply(this,arguments);})},{key:"setVAPID",value:function value(e){r["default"].setItem(this.VAPID_PUBLIC,e);}},{key:"getVAPID",value:function value(){return r["default"].getItem(this.VAPID_PUBLIC);}},{key:"setEnabled",value:function value(e){r["default"].setItem(this.ENABLED,e);}},{key:"getEnabled",value:function value(){return r["default"].getItem(this.ENABLED);}},{key:"setServiceSyncTime",value:function value(e){r["default"].setItem(this.SERVICE_SYNC_TIME,e*this.BASE_TIME);}},{key:"getServiceSyncTime",value:function value(){var e=r["default"].getItem(this.SERVICE_SYNC_TIME);return e||1*this.BASE_TIME;}},{key:"setLocationEnabled",value:function value(e){r["default"].setItem(this.LOCATION_ENABLED,e);}},{key:"getLocationEnabled",value:function value(){return r["default"].getItem(this.LOCATION_ENABLED);}},{key:"setLocationUpdateMinutes",value:function value(e){r["default"].setItem(this.LOCATION_UPDATE_MINUTES,e);}},{key:"getLocationUpdateMinutes",value:function value(){var e=r["default"].getItem(this.LOCATION_UPDATE_MINUTES);return e||30;}},{key:"setRequestLocation",value:(b=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:r["default"].setItem(this.REQUEST_LOCATION,t);case 1:return e.a(2);}},e,this);})),function(e){return b.apply(this,arguments);})},{key:"getRequestLocation",value:function value(){return!!r["default"]&&r["default"].getItem(this.REQUEST_LOCATION);}},{key:"setPlatform",value:(T=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:r["default"].setItem(this.PLATFORM,t);case 1:return e.a(2);}},e,this);})),function(e){return T.apply(this,arguments);})},{key:"getPlatform",value:function value(){return r["default"]&&r["default"].getItem(this.PLATFORM)||i["default"].platform;}},{key:"getVersion",value:function value(){return i["default"].version;}},{key:"setBrowserName",value:(S=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:r["default"].setItem(this.BROWSER_NAME,t);case 1:return e.a(2);}},e,this);})),function(e){return S.apply(this,arguments);})},{key:"getBrowserName",value:function value(){return r["default"].getItem(this.BROWSER_NAME);}},{key:"setBrowserVersion",value:function value(e){r["default"].setItem(this.BROWSER_VERSION,e);}},{key:"getBrowserVersion",value:function value(){return r["default"].getItem(this.BROWSER_VERSION);}},{key:"setOsName",value:(v=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:r["default"].setItem(this.OS_NAME,t);case 1:return e.a(2);}},e,this);})),function(e){return v.apply(this,arguments);})},{key:"getOsName",value:function value(){return r["default"].getItem(this.OS_NAME);}},{key:"setOsVersion",value:function value(e){r["default"].setItem(this.OS_VERSION,e);}},{key:"getOsVersion",value:function value(){return r["default"].getItem(this.OS_VERSION);}},{key:"setDeviceType",value:function value(e){r["default"].setItem(this.DEVICE_TYPE,e);}},{key:"getDeviceType",value:function value(){return r["default"].getItem(this.DEVICE_TYPE);}},{key:"setSupported",value:function value(e){r["default"].setItem(this.SUPPORTED,e);}},{key:"getSupported",value:function value(){return r["default"].getItem(this.SUPPORTED);}},{key:"setServiceTimestamp",value:function value(e){r["default"].setItem(this.SERVICE_TIMESTAMP,e);}},{key:"getServiceTimestamp",value:function value(){return r["default"].getItem(this.SERVICE_TIMESTAMP);}},{key:"setLocationTimestamp",value:function value(e){r["default"].setItem(this.LOCATION_TIMESTAMP,e);}},{key:"getLocationTimestamp",value:function value(){return r["default"].getItem(this.LOCATION_TIMESTAMP);}},{key:"setPermissionLocation",value:function value(e){r["default"].setItem(this.PERMISSION_LOCATION,e);}},{key:"getPermissionLocation",value:function value(){return r["default"].getItem(this.PERMISSION_LOCATION);}},{key:"setDebugLog",value:function value(e){r["default"].setItem(this.SET_LOG_DEBUG,e);}},{key:"getDebugLog",value:function value(){return"false"!==r["default"].getItem(this.SET_LOG_DEBUG);}},{key:"setLogLevel",value:function value(e){r["default"].setItem(this.LOG_LEVEL,e);}},{key:"getLogLevel",value:function value(){return r["default"].getItem(this.LOG_LEVEL);}},{key:"setNewUserTimestamp",value:function value(e){r["default"].setItem(this.NEW_USER_TIMESTAMP,e);}},{key:"getNewUserTimestamp",value:function value(){return r["default"].getItem(this.NEW_USER_TIMESTAMP);}},{key:"setExternalIdRequest",value:(m=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(r["default"]&&r["default"].isLocalStorageAvailable()&&r["default"].setItem(this.EXTERNAL_ID,t),!o["default"]||!o["default"].IDB){e.n=1;break;}return e.n=1,o["default"].setItem(this.EXTERNAL_ID,t);case 1:return e.a(2);}},e,this);})),function(e){return m.apply(this,arguments);})},{key:"getExternalIdRequest",value:(_=d(l().m(function e(){var t;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!r["default"]||!r["default"].isLocalStorageAvailable()){e.n=1;break;}t=r["default"].getItem(this.EXTERNAL_ID),e.n=3;break;case 1:if(!o["default"]||!o["default"].IDB){e.n=3;break;}return e.n=2,o["default"].getItem(this.EXTERNAL_ID);case 2:t=e.v;case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2,t);}},e,this,[[0,4]]);})),function(){return _.apply(this,arguments);})},{key:"setExternalId",value:function value(e){r["default"].setItem(this.EXTERNAL_ID,e);}},{key:"getExternalId",value:function value(){return r["default"].getItem(this.EXTERNAL_ID);}},{key:"getRegisteredByCookie",value:(g=d(l().m(function e(){return l().w(function(e){for(;;)if(0===e.n)return e.a(2,r["default"].getItem(this.REGISTERED_BY_COOKIE));},e,this);})),function(){return g.apply(this,arguments);})},{key:"setRegisteredByCookie",value:(I=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:r["default"].setItem(this.REGISTERED_BY_COOKIE,t);case 1:return e.a(2);}},e,this);})),function(e){return I.apply(this,arguments);})},{key:"setLatitude",value:function value(e){r["default"].setItem(this.LATITUDE,e);}},{key:"getLatitude",value:function value(){return r["default"].getItem(this.LATITUDE);}},{key:"setLongitude",value:function value(e){r["default"].setItem(this.LONGITUDE,e);}},{key:"getLongitude",value:function value(){return r["default"].getItem(this.LONGITUDE);}},{key:"setInAppTopicList",value:(y=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.INAPP_TOPICS,t);case 1:return e.a(2);}},e,this);})),function(e){return y.apply(this,arguments);})},{key:"getInAppTopicList",value:(p=d(l().m(function e(){var t;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!this.db||!this.db.IDB){e.n=2;break;}return e.n=1,this.db.getItem(this.INAPP_TOPICS);case 1:t=e.v;case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2,t);}},e,this,[[0,3]]);})),function(){return p.apply(this,arguments);})},{key:"setTopicList",value:(h=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.TOPIC_LIST,t);case 1:return e.a(2);}},e,this);})),function(e){return h.apply(this,arguments);})},{key:"getTopicList",value:(f=d(l().m(function e(){var t;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!this.db||!this.db.IDB){e.n=2;break;}return e.n=1,this.db.getItem(this.TOPIC_LIST);case 1:t=e.v;case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2,t);}},e,this,[[0,3]]);})),function(){return f.apply(this,arguments);})},{key:"getUrlInappApi",value:function value(){return this.getStorage(this.URL_INAPP_API);}},{key:"setUrlInappApi",value:function value(e){this.setStorage(this.URL_INAPP_API,e);}},{key:"setInAppEnabled",value:function value(e){this.setStorage(this.INAPP_ENABLED,e);}},{key:"isInAppEnabled",value:function value(){return this.getStorage(this.INAPP_ENABLED);}},{key:"setAvoidCypher",value:function value(e){this.setStorage(this.AVOID_CYPHER,!0===e);}},{key:"isAvoidCypher",value:function value(){return"true"===this.getStorage(this.AVOID_CYPHER);}},{key:"getUrlDeviceApi",value:(c=d(l().m(function e(){var t;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!this.storage||!this.storage.isLocalStorageAvailable()){e.n=1;break;}t=this.getStorage(this.URL_DEVICE_API),e.n=3;break;case 1:if(!this.db||!this.db.IDB){e.n=3;break;}return e.n=2,this.db.getItem(this.URL_DEVICE_API);case 2:t=e.v;case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2,t);}},e,this,[[0,4]]);})),function(){return c.apply(this,arguments);})},{key:"setUrlDeviceApi",value:(u=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,t),!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.URL_DEVICE_API,t);case 1:return e.a(2);}},e,this);})),function(e){return u.apply(this,arguments);})},{key:"setPushDisabled",value:function value(e){this.setStorage(this.PUSH_DISABLED,e);}},{key:"isPushDisabled",value:function value(){return this.getStorage(this.PUSH_DISABLED);}},{key:"getConfigV2ServiceSyncTime",value:function value(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME);}},{key:"setConfigV2ServiceSyncTime",value:function value(e){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,e);}},{key:"getConfigV2",value:function value(){return this.getStorage(this.CONFIG_V2);}},{key:"setConfigV2",value:function value(e){this.setStorage(this.CONFIG_V2,e);}},{key:"getMaintenanceEnd",value:function value(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY);}},{key:"setMaintenanceEnd",value:function value(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,e);}},{key:"getMaintenanceStart",value:function value(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY);}},{key:"setMaintenanceStart",value:function value(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,e);}},{key:"getTimeoutRequestsInMilliseconds",value:function value(){return this.getStorage(this.TIMEOUT_REQUESTS);}},{key:"setTimeoutRequestsInMilliseconds",value:function value(e){this.setStorage(this.TIMEOUT_REQUESTS,e);}},{key:"getEncryptionType",value:function value(){var e=this.getStorage(this.ENCRYPTION_TYPE);return null===e?a["default"].HASH:e;}},{key:"setEncryptionType",value:function value(e){this.setStorage(this.ENCRYPTION_TYPE,e);}}],t&&E(e.prototype,t),n&&E(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
258
+ var e,t,n,u,c,f,h,p,y,I,g,_,m,v,S,T,b,P,O,R;}();t["default"]=y;},238:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i);}}function r(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null;},t=[{key:"isSessionStorageAvailable",value:function value(){try{var e=window.sessionStorage,t="__storage_test__";if(e)return e.setItem(t,t),e.removeItem(t),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==o.length;}return!1;}},{key:"getItem",value:function value(e){return null!=this.session?this.session.getItem(e):null;}},{key:"setItem",value:function value(e,t){return null!=this.session&&(this.session.setItem(e,t),!0);}},{key:"clearMessages",value:function value(){this.session&&this.session.removeItem("messages");}}],t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
259
+ var e,t,n;}())();t["default"]=o;},622:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=o(n(291)),r=o(n(254));function o(e){return e&&e.__esModule?e:{"default":e};}function s(e){return s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},s(e);}function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,u(i.key),i);}}function u(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==s(t)?t:t+"";}var c=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},n=[{key:"isServiceTimestampExceed",value:function value(){return!new i["default"]().getServiceTimestamp()||new i["default"]().getServiceSyncTime()<=(Date.now()-new i["default"]().getServiceTimestamp())/6e4;}},{key:"isFunction",value:function value(e){return!(!e||"function"!=typeof e);}},{key:"generateUUID",value:function value(){var e=new r["default"]("[IND]CommonUtils: ");return"undefined"!=typeof crypto&&crypto.randomUUID?(e.d("Using crypto.randomUUID to generate UUID").writeLog(),crypto.randomUUID()):"undefined"!=typeof crypto&&crypto.getRandomValues?(e.d("Using crypto.getRandomValues to generate UUID").writeLog(),([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16);})):null;}}],(t=null)&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
260
+ var e,t,n;}();t["default"]=c;},429:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i,r=(i=n(254))&&i.__esModule?i:{"default":i};function o(e){return o="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},o(e);}function s(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var s=i&&i.prototype instanceof c?i:c,l=Object.create(s.prototype);return _a10(l,"_invoke",function(n,i,r){var o,s,a,c=0,l=r||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,n){return o=t,s=0,a=e,h.n=n,u;}};function d(n,i){for(s=n,a=i,t=0;!f&&c&&!r&&t<l.length;t++){var r,o=l[t],d=h.p,E=o[2];n>3?(r=E===i)&&(a=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=d&&((r=n<2&&d<o[1])?(s=0,h.v=i,h.n=o[1]):d<E&&(r=n<3||o[0]>i||i>E)&&(o[4]=n,o[5]=i,h.n=E,s=0));}if(r||n>1)return u;throw f=!0,i;}return function(r,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,E),s=l,a=E;(t=s<2?e:a)||!f;){o||(s?s<3?(s>1&&(h.n=-1),d(s,a)):h.n=a:h.v=a);try{if(c=2,o){if(s||(r="next"),t=o[r]){if(!(t=t.call(o,a)))throw TypeError("iterator result is not an object");if(!t.done)return t;a=t.value,s<2&&(s=0);}else 1===s&&(t=o["return"])&&t.call(o),s<2&&(a=TypeError("The iterator does not provide a '"+r+"' method"),s=1);o=e;}else if((t=(f=h.n<0)?a:n.call(i,h))!==u)break;}catch(t){o=e,s=1,a=t;}finally{c=1;}}return{value:t,done:f};};}(n,r,o),!0),l;}var u={};function c(){}function l(){}function f(){}t=Object.getPrototypeOf;var h=[][i]?t(t([][i]())):(_a10(t={},i,function(){return this;}),t),d=f.prototype=c.prototype=Object.create(h);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,_a10(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e;}return l.prototype=f,_a10(d,"constructor",f),_a10(f,"constructor",l),l.displayName="GeneratorFunction",_a10(f,r,"GeneratorFunction"),_a10(d),_a10(d,r,"Generator"),_a10(d,i,function(){return this;}),_a10(d,"toString",function(){return"[object Generator]";}),(s=function s(){return{w:o,m:E};})();}function _a10(e,t,n,i){var r=Object.defineProperty;try{r({},"",{});}catch(e){r=0;}_a10=function a(e,t,n,i){function o(t,n){_a10(e,t,function(e){return this._invoke(t,n,e);});}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(o("next",0),o("throw",1),o("return",2));},_a10(e,t,n,i);}function u(e,t,n,i,r,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void n(e);}a.done?t(u):Promise.resolve(u).then(i,r);}function c(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function s(e){u(o,i,r,s,a,"next",e);}function a(e){u(o,i,r,s,a,"throw",e);}s(void 0);});};}function l(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,f(i.key),i);}}function f(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==o(t)?t:t+"";}var h=function(){return function(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},null,[{key:"getLocationPermission",value:(i=c(s().m(function e(){var t,n;return s().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getPermission("geolocation");case 1:return t=e.v,n={},t&&(n.location=t.state),e.a(2,n);}},e,this);})),function(){return i.apply(this,arguments);})},{key:"getPermission",value:(n=c(s().m(function e(t){return s().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&t)){e.n=2;break;}return e.n=1,navigator.permissions.query({name:t,userVisibleOnly:!0});case 1:return e.a(2,e.v);case 2:e.n=4;break;case 3:return e.p=3,e.v,e.a(2,null);case 4:return e.a(2,null);}},e,null,[[0,3]]);})),function(e){return n.apply(this,arguments);})},{key:"setPermissionsCallback",value:(t=c(s().m(function e(){return s().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 1:return e.a(2);}},e,this);})),function(){return t.apply(this,arguments);})},{key:"setCallback",value:(e=c(s().m(function e(t,n){var i,o;return s().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getPermission(t);case 1:(i=e.v)&&(o=i.state,"onchange"in i&&(i.onchange=function(){new r["default"]("[IND]CorePermissions: ").d(t+" permission state has changed from "+o+" to "+i.state).writeLog(),o=i.state,n&&n({name:t,state:i.state});}));case 2:return e.a(2);}},e,this);})),function(t,n){return e.apply(this,arguments);})}]);// removed by dead control flow
261
+ var e,t,n,i;}();t["default"]=h;},170:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.CryptoUtils=void 0;var i=n(225),r=o(n(291));function o(e){return e&&e.__esModule?e:{"default":e};}function s(e){return s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},s(e);}function a(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var a=i&&i.prototype instanceof c?i:c,l=Object.create(a.prototype);return _u4(l,"_invoke",function(n,i,r){var o,a,u,c=0,l=r||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,n){return o=t,a=0,u=e,h.n=n,s;}};function d(n,i){for(a=n,u=i,t=0;!f&&c&&!r&&t<l.length;t++){var r,o=l[t],d=h.p,E=o[2];n>3?(r=E===i)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=d&&((r=n<2&&d<o[1])?(a=0,h.v=i,h.n=o[1]):d<E&&(r=n<3||o[0]>i||i>E)&&(o[4]=n,o[5]=i,h.n=E,a=0));}if(r||n>1)return s;throw f=!0,i;}return function(r,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,E),a=l,u=E;(t=a<2?e:u)||!f;){o||(a?a<3?(a>1&&(h.n=-1),d(a,u)):h.n=u:h.v=u);try{if(c=2,o){if(a||(r="next"),t=o[r]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0);}else 1===a&&(t=o["return"])&&t.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),a=1);o=e;}else if((t=(f=h.n<0)?u:n.call(i,h))!==s)break;}catch(t){o=e,a=1,u=t;}finally{c=1;}}return{value:t,done:f};};}(n,r,o),!0),l;}var s={};function c(){}function l(){}function f(){}t=Object.getPrototypeOf;var h=[][i]?t(t([][i]())):(_u4(t={},i,function(){return this;}),t),d=f.prototype=c.prototype=Object.create(h);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,_u4(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e;}return l.prototype=f,_u4(d,"constructor",f),_u4(f,"constructor",l),l.displayName="GeneratorFunction",_u4(f,r,"GeneratorFunction"),_u4(d),_u4(d,r,"Generator"),_u4(d,i,function(){return this;}),_u4(d,"toString",function(){return"[object Generator]";}),(a=function a(){return{w:o,m:E};})();}function _u4(e,t,n,i){var r=Object.defineProperty;try{r({},"",{});}catch(e){r=0;}_u4=function u(e,t,n,i){function o(t,n){_u4(e,t,function(e){return this._invoke(t,n,e);});}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(o("next",0),o("throw",1),o("return",2));},_u4(e,t,n,i);}function c(e,t,n,i,r,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void n(e);}a.done?t(u):Promise.resolve(u).then(i,r);}function l(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,f(i.key),i);}}function f(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==s(t)?t:t+"";}var h=new(o(n(254))["default"])("[IND]Crypto"),d=new TextEncoder("utf-8"),E="HMAC",p=t.CryptoUtils=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},t=null,n=[{key:"createHmac",value:(o=a().m(function e(t,n){var o,s,u,c,l,f,p;return a().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,o=n,!0!==new r["default"]().isAvoidCypher()&&new r["default"]().getEncryptionType()!==i.EncryptionType.RAW){e.n=1;break;}return e.a(2,n);case 1:if(new r["default"]().getEncryptionType()!==i.EncryptionType.HASH){e.n=5;break;}if(u=null===(s=window)||void 0===s||null===(s=s.crypto)||void 0===s?void 0:s.subtle){e.n=2;break;}return e.a(2);case 2:return e.n=3,u.importKey("raw",d.encode(t),{name:E,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 3:return c=e.v,e.n=4,u.sign(E,c,d.encode(n));case 4:l=e.v,f=new Uint8Array(l),o=Array.prototype.map.call(f,function(e){return("00"+e.toString(16)).slice(-2);}).join(""),h.d("hmac: ",o).writeLog();case 5:return e.a(2,o);case 6:return e.p=6,p=e.v,h.e("error:",p).writeLog(),e.a(2);}},e,null,[[0,6]]);}),s=function s(){var e=this,t=arguments;return new Promise(function(n,i){var r=o.apply(e,t);function s(e){c(r,n,i,s,a,"next",e);}function a(e){c(r,n,i,s,a,"throw",e);}s(void 0);});},function(e,t){return s.apply(this,arguments);})}],t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
262
+ var e,t,n,o,s;}();t["default"]=p;},497:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0;}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function o(){};return{s:o,n:function n(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]};},e:function e(_e71){throw _e71;},f:o};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var s,a=!0,u=!1;return{s:function s(){n=n.call(e);},n:function(_n41){function n(){return _n41.apply(this,arguments);}n.toString=function(){return _n41.toString();};return n;}(function(){var e=n.next();return a=e.done,e;}),e:function e(_e72){u=!0,s=_e72;},f:function f(){try{a||null==n["return"]||n["return"]();}finally{if(u)throw s;}}};}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i;}function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,a(i.key),i);}}function s(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;}function a(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var u=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},n=[{key:"normalizeDateString",value:function value(e){if("number"==typeof e||e instanceof Date){var t=new Date(e);return isNaN(t.getTime())?null:this.formatCanonicalUTC(t);}if(!e||"string"!=typeof e)return null;var n=e.trim();if(this.isCanonicalFormat(n))return n;var i=this.tryToParseLeniently(n);return i?this.formatCanonicalUTC(i):null;}},{key:"isCanonicalFormat",value:function value(e){return /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(e);}},{key:"tryToParseLeniently",value:function value(e){var t,n=i(this.LENIENT_DATE_FORMATS);try{for(n.s();!(t=n.n()).done;){var r=t.value,o=this.parseByFormat(e,r);if(o&&!isNaN(o.getTime()))return o;}}catch(e){n.e(e);}finally{n.f();}return null;}},{key:"parseByFormat",value:function value(e,t){switch(t){case"yyyy-MM-dd'T'HH:mm:ss.SSSZ":return new Date(e);case"yyyy-MM-dd'T'HH:mm:ssZ":return e.endsWith("Z")?new Date(e):new Date(e.replaceAll(/([+-]\d{2})(\d{2})$/g,"$1:$2"));case"yyyy-MM-dd'T'HH:mm:ss":return new Date(e+"Z");case"yyyy-MM-dd HH:mm:ss":return new Date(e.replaceAll(" ","T")+"Z");case"yyyy-MM-dd":return new Date(e+"T00:00:00Z");default:return null;}}},{key:"formatCanonicalUTC",value:function value(e){return e.toISOString();}}],(t=null)&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
263
+ var e,t,n;}();s(u,"DATE_FORMAT_PATTERN","yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"),s(u,"LENIENT_DATE_FORMATS",["yyyy-MM-dd'T'HH:mm:ss.SSSZ","yyyy-MM-dd'T'HH:mm:ssZ","yyyy-MM-dd'T'HH:mm:ss","yyyy-MM-dd HH:mm:ss","yyyy-MM-dd"]);t["default"]=u;},457:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=o(n(735)),r=o(n(234));function o(e){return e&&e.__esModule?e:{"default":e};}function s(e){return s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},s(e);}function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,u(i.key),i);}}function u(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==s(t)?t:t+"";}var c=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},(t=[{key:"showError",value:function value(e,t,n){if(null!=e){var o=Object.values(e.ErrorCode).indexOf(t);if(o>=0){var s={code:Object.keys(e.ErrorCode)[o],errorId:Object.values(e.ErrorCode)[o]};return new r["default"](s,Object.values(e.ErrorMessage)[o],n);}return new r["default"](i["default"].ErrorCode.GENERAL_ERROR,"general error",n);}}}])&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
264
+ var e,t,n;}();t["default"]=new c();},325:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i);}}function r(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},r=[{key:"compareJSON",value:function value(e,t){var i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(var o=0,s=i;o<s.length;o++){var a=s[o];if(e[a]!==t[a]){if("object"!=n(e[a])||"object"!=n(t[a]))return!1;if(!isEqual(e[a],t[a]))return!1;}}return!0;}}],(t=null)&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
265
+ var e,t,r;}();t["default"]=o;},254:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=o(n(291)),r=o(n(630));function o(e){return e&&e.__esModule?e:{"default":e};}function s(e){return s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},s(e);}function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,u(i.key),i);}}function u(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==s(t)?t:t+"";}var c=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.tag="[IND]",t&&(this.tag=t),this.level=r["default"].INFO,this.setLogLevel(new i["default"]().getLogLevel()),this.log=[];}return t=e,n=[{key:"setLogLevel",value:function value(e){e&&e>=r["default"].DEBUG&&e<=r["default"].ERROR&&(this.level=e);}},{key:"d",value:function value(){if(this.level<=r["default"].DEBUG)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"i",value:function value(){if(this.level<=r["default"].INFO)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"w",value:function value(){if(this.level<=r["default"].WARNING)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"e",value:function value(){if(this.level<=r["default"].ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"writeLog",value:function value(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[];}}],o=[{key:"addedAsString",value:function value(e){return"string"==typeof e?e:JSON.stringify(e,null,2);}}],n&&a(t.prototype,n),o&&a(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;// removed by dead control flow
266
+ var t,n,o;}();t["default"]=c;},630:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.LogLevel=void 0;var n=t.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});t["default"]=n;},662:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i);}}function r(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},n=[{key:"setTopicChannel",value:function value(e,t){for(var n=[],i=0;i<e.length;i++){var r=e[i];r.channel=t,n.push(r);}return n;}}],(t=null)&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
267
+ var e,t,n;}();t["default"]=o;},332:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i);}}function r(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===t?String:Number)(e);}(e,"string");return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},n=[{key:"isValidFormat",value:function value(e){return null!=e&&""!=e&&"null"!=e&&e.length>8;}}],(t=null)&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
268
+ var e,t,n;}();t["default"]=o;},628:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CommonUtils",{enumerable:!0,get:function get(){return i["default"];}}),Object.defineProperty(t,"CorePermissions",{enumerable:!0,get:function get(){return r["default"];}}),Object.defineProperty(t,"CryptoUtils",{enumerable:!0,get:function get(){return o["default"];}}),Object.defineProperty(t,"DateUtils",{enumerable:!0,get:function get(){return h["default"];}}),Object.defineProperty(t,"ErrorUtils",{enumerable:!0,get:function get(){return s["default"];}}),Object.defineProperty(t,"JsonUtils",{enumerable:!0,get:function get(){return a["default"];}}),Object.defineProperty(t,"Log",{enumerable:!0,get:function get(){return u["default"];}}),Object.defineProperty(t,"LogLevel",{enumerable:!0,get:function get(){return c.LogLevel;}}),Object.defineProperty(t,"TopicUtils",{enumerable:!0,get:function get(){return f["default"];}}),Object.defineProperty(t,"Validations",{enumerable:!0,get:function get(){return l["default"];}});var i=d(n(622)),r=d(n(429)),o=d(n(170)),s=d(n(457)),a=d(n(325)),u=d(n(254)),c=n(630),l=d(n(332)),f=d(n(662)),h=d(n(497));function d(e){return e&&e.__esModule?e:{"default":e};}},114:function _(e){var t;t=function t(){return function(){var e={710:function _(e){var t;t=function t(){return function(_Class7){"use strict";var e={330:function _(e){e.exports=JSON.parse('{"name":"indigitall-web-core","description":"indigitall web core","version":"4.16.6","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"}}');}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports;}n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]});},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t);},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0});};var i={};n.r(i),n.d(i,{"default":function _default(){return K;}});var r={};n.r(r),n.d(r,{BaseApplicationRequest:function BaseApplicationRequest(){return O;},BaseClient:function BaseClient(){return b;},BaseEventRequest:function BaseEventRequest(){return N;},BaseRequest:function BaseRequest(){return P;}});var o={};n.r(o),n.d(o,{Channel:function Channel(){return w;},CoreApplication:function CoreApplication(){return U;},Device:function Device(){return C;},DeviceStatus:function DeviceStatus(){return D;},EncryptionType:function EncryptionType(){return p;},ErrorDictionary:function ErrorDictionary(){return S;},ErrorModel:function ErrorModel(){return v;},EventType:function EventType(){return L;},TopicSubscribeType:function TopicSubscribeType(){return M;}});var s={};n.r(s),n.d(s,{CommonUtils:function CommonUtils(){return R;},CorePermissions:function CorePermissions(){return B;},CryptoUtils:function CryptoUtils(){return Y;},DateUtils:function DateUtils(){return A;},ErrorUtils:function ErrorUtils(){return T;},JsonUtils:function JsonUtils(){return F;},Log:function Log(){return m;},LogLevel:function LogLevel(){return I;},TopicUtils:function TopicUtils(){return G;},Validations:function Validations(){return x;}});var a={platform:"webpush",version:"0.0.1"};var u=n(330);a.version=u.version;var 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(/*#__PURE__*/function(){function _class26(){_classCallCheck2(this,_class26);this.storage=this.isLocalStorageAvailable()?window.localStorage:null;}return _createClass2(_class26,[{key:"isLocalStorageAvailable",value:function isLocalStorageAvailable(){try{var _e73=window.localStorage,_t221="__storage_test__";if(_e73)return _e73.setItem(_t221,_t221),_e73.removeItem(_t221),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==l.length;}return!1;}},{key:"setItem",value:function setItem(e,t){return null!=this.storage&&(this.storage.setItem(e,t),!0);}},{key:"getItem",value:function getItem(e){return null!=this.storage?this.storage.getItem(e):null;}},{key:"deleteItem",value:function deleteItem(e){return!!this.storage&&(this.storage.setItem(e,value),!0);}},{key:"clear",value:function clear(){this.storage&&this.storage.clear();}}]);}())(),f=l,h=new(/*#__PURE__*/function(){function _class27(){_classCallCheck2(this,_class27);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;}return _createClass2(_class27,[{key:"getDB",value:function(){var _getDB7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee282(){var _this62=this;return _regenerator2().w(function(_context282){while(1)switch(_context282.n){case 0:return _context282.a(2,new Promise(function(e,t){var n=_this62.IDB;if(n){var _i50=n.open("indigitall.indexedDB",1);_i50.onupgradeneeded=function(){_i50.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key");},_i50.onsuccess=function(){var t=_i50.result,n=t.transaction("indigitallStore","readwrite"),r=n.objectStore("indigitallStore"),o=r.index("storeIndex");e({db:t,tx:n,store:r,index:o});},_i50.onerror=function(e){t(e);};}else t(!1);}));}},_callee282);}));function getDB(){return _getDB7.apply(this,arguments);}return getDB;}()},{key:"get",value:function(){var _get10=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee283(e,t){var _this63=this;return _regenerator2().w(function(_context283){while(1)switch(_context283.n){case 0:return _context283.a(2,new Promise(function(n,i){e||i(!1),e.index.get(t).onsuccess=function(t){t.target.result&&(_this63.close(e),n(t.target.result.store.value)),i(!1);};}));}},_callee283);}));function get(_x454,_x455){return _get10.apply(this,arguments);}return get;}()},{key:"put",value:function(){var _put10=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee284(e,t,n){var _this64=this;return _regenerator2().w(function(_context284){while(1)switch(_context284.n){case 0:return _context284.a(2,new Promise(function(i,r){e||r(!1),e.store.put({store:{key:t,value:n}},t).onsuccess=function(t){_this64.close(e),i(n);};}));}},_callee284);}));function put(_x456,_x457,_x458){return _put10.apply(this,arguments);}return put;}()},{key:"close",value:function close(e){if(e.tx)try{e.tx.oncomplete=function(){e.db.close();};}catch(e){console.log(this.TAG,e);}}},{key:"setItem",value:function(){var _setItem7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee285(e,t){var _n42,_t222;return _regenerator2().w(function(_context285){while(1)switch(_context285.p=_context285.n){case 0:_context285.p=0;_context285.n=1;return this.getDB();case 1:_n42=_context285.v;return _context285.a(2,this.put(_n42,e,t));case 2:_context285.p=2;_t222=_context285.v;return _context285.a(2,_t222);}},_callee285,this,[[0,2]]);}));function setItem(_x459,_x460){return _setItem7.apply(this,arguments);}return setItem;}()},{key:"getItem",value:function(){var _getItem7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee286(e){var _t223,_t224;return _regenerator2().w(function(_context286){while(1)switch(_context286.p=_context286.n){case 0:_context286.p=0;_context286.n=1;return this.getDB();case 1:_t223=_context286.v;return _context286.a(2,this.get(_t223,e));case 2:_context286.p=2;_t224=_context286.v;return _context286.a(2,_t224);}},_callee286,this,[[0,2]]);}));function getItem(_x461){return _getItem7.apply(this,arguments);}return getItem;}()}]);}())(),d=new(/*#__PURE__*/function(){function _class28(){_classCallCheck2(this,_class28);this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null;}return _createClass2(_class28,[{key:"isSessionStorageAvailable",value:function isSessionStorageAvailable(){try{var _e74=window.sessionStorage,_t225="__storage_test__";if(_e74)return _e74.setItem(_t225,_t225),_e74.removeItem(_t225),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==d.length;}return!1;}},{key:"getItem",value:function getItem(e){return null!=this.session?this.session.getItem(e):null;}},{key:"setItem",value:function setItem(e,t){return null!=this.session&&(this.session.setItem(e,t),!0);}},{key:"clearMessages",value:function clearMessages(){this.session&&this.session.removeItem("messages");}}]);}())(),E=d,p=Object.freeze({RAW:"raw",HASH:"hash"}),y=/*#__PURE__*/function(){function y(){_classCallCheck2(this,y);this.storage=f,this.db=h,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.TIMEOUT_REQUESTS=this.REPOSITORY+".TIMEOUT_REQUESTS",this.ENCRYPTION_TYPE=this.REPOSITORY+".ENCRYPTION_TYPE",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";}return _createClass2(y,[{key:"setItemSessionStorage",value:function setItemSessionStorage(e,t){E.setItem(e,t);}},{key:"getItemSessionStorage",value:function getItemSessionStorage(e){return E.getItem(e);}},{key:"clearSessionStorage",value:function clearSessionStorage(){E.clearMessages();}},{key:"setStorage",value:function setStorage(e,t){f.setItem(e,t);}},{key:"getStorage",value:function getStorage(e){return f.getItem(e);}},{key:"clearStorage",value:function clearStorage(){f.clear();}},{key:"setBrowserPublicKey",value:function setBrowserPublicKey(e){f.setItem(this.BROWSER_PUBLIC_KEY,e);}},{key:"getBrowserPublicKey",value:function getBrowserPublicKey(){return f.getItem(this.BROWSER_PUBLIC_KEY);}},{key:"setBrowserPrivateKey",value:function setBrowserPrivateKey(e){f.setItem(this.BROWSER_PRIVATE_KEY,e);}},{key:"getBrowserPrivateKey",value:function getBrowserPrivateKey(){return f.getItem(this.BROWSER_PRIVATE_KEY);}},{key:"setAppKey",value:function(){var _setAppKey7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee287(e){var _t226;return _regenerator2().w(function(_context287){while(1)switch(_context287.n){case 0:f.setItem(this.APP_KEY,e);_t226=h&&h.IDB;if(!_t226){_context287.n=1;break;}_context287.n=1;return h.setItem(this.APP_KEY,e);case 1:return _context287.a(2);}},_callee287,this);}));function setAppKey(_x462){return _setAppKey7.apply(this,arguments);}return setAppKey;}()},{key:"getAppKey",value:function getAppKey(){return f.getItem(this.APP_KEY);}},{key:"setDeviceId",value:function(){var _setDeviceId9=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee288(e){var _t227;return _regenerator2().w(function(_context288){while(1)switch(_context288.n){case 0:this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,e);_t227=this.db&&this.db.IDB;if(!_t227){_context288.n=1;break;}_context288.n=1;return this.db.setItem(this.DEVICE_ID,e);case 1:return _context288.a(2);}},_callee288,this);}));function setDeviceId(_x463){return _setDeviceId9.apply(this,arguments);}return setDeviceId;}()},{key:"getDeviceId",value:function getDeviceId(){return this.getStorage(this.DEVICE_ID);}},{key:"getAppKeySync",value:function(){var _getAppKeySync7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee289(){return _regenerator2().w(function(_context289){while(1)switch(_context289.n){case 0:if(!(h&&h.IDB)){_context289.n=2;break;}_context289.n=1;return h.getItem(this.APP_KEY);case 1:return _context289.a(2,_context289.v);case 2:return _context289.a(2);}},_callee289,this);}));function getAppKeySync(){return _getAppKeySync7.apply(this,arguments);}return getAppKeySync;}()},{key:"setVAPID",value:function setVAPID(e){f.setItem(this.VAPID_PUBLIC,e);}},{key:"getVAPID",value:function getVAPID(){return f.getItem(this.VAPID_PUBLIC);}},{key:"setEnabled",value:function setEnabled(e){f.setItem(this.ENABLED,e);}},{key:"getEnabled",value:function getEnabled(){return f.getItem(this.ENABLED);}},{key:"setServiceSyncTime",value:function setServiceSyncTime(e){f.setItem(this.SERVICE_SYNC_TIME,e*this.BASE_TIME);}},{key:"getServiceSyncTime",value:function getServiceSyncTime(){return f.getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME;}},{key:"setLocationEnabled",value:function setLocationEnabled(e){f.setItem(this.LOCATION_ENABLED,e);}},{key:"getLocationEnabled",value:function getLocationEnabled(){return f.getItem(this.LOCATION_ENABLED);}},{key:"setLocationUpdateMinutes",value:function setLocationUpdateMinutes(e){f.setItem(this.LOCATION_UPDATE_MINUTES,e);}},{key:"getLocationUpdateMinutes",value:function getLocationUpdateMinutes(){return f.getItem(this.LOCATION_UPDATE_MINUTES)||30;}},{key:"setRequestLocation",value:function(){var _setRequestLocation7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee290(e){return _regenerator2().w(function(_context290){while(1)switch(_context290.n){case 0:f.setItem(this.REQUEST_LOCATION,e);case 1:return _context290.a(2);}},_callee290,this);}));function setRequestLocation(_x464){return _setRequestLocation7.apply(this,arguments);}return setRequestLocation;}()},{key:"getRequestLocation",value:function getRequestLocation(){return!!f&&f.getItem(this.REQUEST_LOCATION);}},{key:"setPlatform",value:function(){var _setPlatform7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee291(e){return _regenerator2().w(function(_context291){while(1)switch(_context291.n){case 0:f.setItem(this.PLATFORM,e);case 1:return _context291.a(2);}},_callee291,this);}));function setPlatform(_x465){return _setPlatform7.apply(this,arguments);}return setPlatform;}()},{key:"getPlatform",value:function getPlatform(){return f&&f.getItem(this.PLATFORM)||c.platform;}},{key:"getVersion",value:function getVersion(){return c.version;}},{key:"setBrowserName",value:function(){var _setBrowserName7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee292(e){return _regenerator2().w(function(_context292){while(1)switch(_context292.n){case 0:f.setItem(this.BROWSER_NAME,e);case 1:return _context292.a(2);}},_callee292,this);}));function setBrowserName(_x466){return _setBrowserName7.apply(this,arguments);}return setBrowserName;}()},{key:"getBrowserName",value:function getBrowserName(){return f.getItem(this.BROWSER_NAME);}},{key:"setBrowserVersion",value:function setBrowserVersion(e){f.setItem(this.BROWSER_VERSION,e);}},{key:"getBrowserVersion",value:function getBrowserVersion(){return f.getItem(this.BROWSER_VERSION);}},{key:"setOsName",value:function(){var _setOsName7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee293(e){return _regenerator2().w(function(_context293){while(1)switch(_context293.n){case 0:f.setItem(this.OS_NAME,e);case 1:return _context293.a(2);}},_callee293,this);}));function setOsName(_x467){return _setOsName7.apply(this,arguments);}return setOsName;}()},{key:"getOsName",value:function getOsName(){return f.getItem(this.OS_NAME);}},{key:"setOsVersion",value:function setOsVersion(e){f.setItem(this.OS_VERSION,e);}},{key:"getOsVersion",value:function getOsVersion(){return f.getItem(this.OS_VERSION);}},{key:"setDeviceType",value:function setDeviceType(e){f.setItem(this.DEVICE_TYPE,e);}},{key:"getDeviceType",value:function getDeviceType(){return f.getItem(this.DEVICE_TYPE);}},{key:"setSupported",value:function setSupported(e){f.setItem(this.SUPPORTED,e);}},{key:"getSupported",value:function getSupported(){return f.getItem(this.SUPPORTED);}},{key:"setServiceTimestamp",value:function setServiceTimestamp(e){f.setItem(this.SERVICE_TIMESTAMP,e);}},{key:"getServiceTimestamp",value:function getServiceTimestamp(){return f.getItem(this.SERVICE_TIMESTAMP);}},{key:"setLocationTimestamp",value:function setLocationTimestamp(e){f.setItem(this.LOCATION_TIMESTAMP,e);}},{key:"getLocationTimestamp",value:function getLocationTimestamp(){return f.getItem(this.LOCATION_TIMESTAMP);}},{key:"setPermissionLocation",value:function setPermissionLocation(e){f.setItem(this.PERMISSION_LOCATION,e);}},{key:"getPermissionLocation",value:function getPermissionLocation(){return f.getItem(this.PERMISSION_LOCATION);}},{key:"setDebugLog",value:function setDebugLog(e){f.setItem(this.SET_LOG_DEBUG,e);}},{key:"getDebugLog",value:function getDebugLog(){return"false"!==f.getItem(this.SET_LOG_DEBUG);}},{key:"setLogLevel",value:function setLogLevel(e){f.setItem(this.LOG_LEVEL,e);}},{key:"getLogLevel",value:function getLogLevel(){return f.getItem(this.LOG_LEVEL);}},{key:"setNewUserTimestamp",value:function setNewUserTimestamp(e){f.setItem(this.NEW_USER_TIMESTAMP,e);}},{key:"getNewUserTimestamp",value:function getNewUserTimestamp(){return f.getItem(this.NEW_USER_TIMESTAMP);}},{key:"setExternalIdRequest",value:function(){var _setExternalIdRequest7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee294(e){var _t228;return _regenerator2().w(function(_context294){while(1)switch(_context294.n){case 0:f&&f.isLocalStorageAvailable()&&f.setItem(this.EXTERNAL_ID,e);_t228=h&&h.IDB;if(!_t228){_context294.n=1;break;}_context294.n=1;return h.setItem(this.EXTERNAL_ID,e);case 1:return _context294.a(2);}},_callee294,this);}));function setExternalIdRequest(_x468){return _setExternalIdRequest7.apply(this,arguments);}return setExternalIdRequest;}()},{key:"getExternalIdRequest",value:function(){var _getExternalIdRequest7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee295(){var e,_t229,_t230;return _regenerator2().w(function(_context295){while(1)switch(_context295.p=_context295.n){case 0:_context295.p=0;if(!(f&&f.isLocalStorageAvailable())){_context295.n=1;break;}e=f.getItem(this.EXTERNAL_ID);_context295.n=3;break;case 1:_t229=h&&h.IDB;if(!_t229){_context295.n=3;break;}_context295.n=2;return h.getItem(this.EXTERNAL_ID);case 2:e=_context295.v;case 3:_context295.n=5;break;case 4:_context295.p=4;_t230=_context295.v;case 5:return _context295.a(2,e);}},_callee295,this,[[0,4]]);}));function getExternalIdRequest(){return _getExternalIdRequest7.apply(this,arguments);}return getExternalIdRequest;}()},{key:"setExternalId",value:function setExternalId(e){f.setItem(this.EXTERNAL_ID,e);}},{key:"getExternalId",value:function getExternalId(){return f.getItem(this.EXTERNAL_ID);}},{key:"getRegisteredByCookie",value:function(){var _getRegisteredByCookie7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee296(){return _regenerator2().w(function(_context296){while(1)switch(_context296.n){case 0:return _context296.a(2,f.getItem(this.REGISTERED_BY_COOKIE));}},_callee296,this);}));function getRegisteredByCookie(){return _getRegisteredByCookie7.apply(this,arguments);}return getRegisteredByCookie;}()},{key:"setRegisteredByCookie",value:function(){var _setRegisteredByCookie7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee297(e){return _regenerator2().w(function(_context297){while(1)switch(_context297.n){case 0:f.setItem(this.REGISTERED_BY_COOKIE,e);case 1:return _context297.a(2);}},_callee297,this);}));function setRegisteredByCookie(_x469){return _setRegisteredByCookie7.apply(this,arguments);}return setRegisteredByCookie;}()},{key:"setLatitude",value:function setLatitude(e){f.setItem(this.LATITUDE,e);}},{key:"getLatitude",value:function getLatitude(){return f.getItem(this.LATITUDE);}},{key:"setLongitude",value:function setLongitude(e){f.setItem(this.LONGITUDE,e);}},{key:"getLongitude",value:function getLongitude(){return f.getItem(this.LONGITUDE);}},{key:"setInAppTopicList",value:function(){var _setInAppTopicList7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee298(e){var _t231;return _regenerator2().w(function(_context298){while(1)switch(_context298.n){case 0:_t231=this.db&&this.db.IDB;if(!_t231){_context298.n=1;break;}_context298.n=1;return this.db.setItem(this.INAPP_TOPICS,e);case 1:return _context298.a(2);}},_callee298,this);}));function setInAppTopicList(_x470){return _setInAppTopicList7.apply(this,arguments);}return setInAppTopicList;}()},{key:"getInAppTopicList",value:function(){var _getInAppTopicList7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee299(){var e,_t232,_t233;return _regenerator2().w(function(_context299){while(1)switch(_context299.p=_context299.n){case 0:_context299.p=0;_t232=this.db&&this.db.IDB;if(!_t232){_context299.n=2;break;}_context299.n=1;return this.db.getItem(this.INAPP_TOPICS);case 1:e=_context299.v;case 2:_context299.n=4;break;case 3:_context299.p=3;_t233=_context299.v;case 4:return _context299.a(2,e);}},_callee299,this,[[0,3]]);}));function getInAppTopicList(){return _getInAppTopicList7.apply(this,arguments);}return getInAppTopicList;}()},{key:"setTopicList",value:function(){var _setTopicList7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee300(e){var _t234;return _regenerator2().w(function(_context300){while(1)switch(_context300.n){case 0:_t234=this.db&&this.db.IDB;if(!_t234){_context300.n=1;break;}_context300.n=1;return this.db.setItem(this.TOPIC_LIST,e);case 1:return _context300.a(2);}},_callee300,this);}));function setTopicList(_x471){return _setTopicList7.apply(this,arguments);}return setTopicList;}()},{key:"getTopicList",value:function(){var _getTopicList7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee301(){var e,_t235,_t236;return _regenerator2().w(function(_context301){while(1)switch(_context301.p=_context301.n){case 0:_context301.p=0;_t235=this.db&&this.db.IDB;if(!_t235){_context301.n=2;break;}_context301.n=1;return this.db.getItem(this.TOPIC_LIST);case 1:e=_context301.v;case 2:_context301.n=4;break;case 3:_context301.p=3;_t236=_context301.v;case 4:return _context301.a(2,e);}},_callee301,this,[[0,3]]);}));function getTopicList(){return _getTopicList7.apply(this,arguments);}return getTopicList;}()},{key:"getUrlInappApi",value:function getUrlInappApi(){return this.getStorage(this.URL_INAPP_API);}},{key:"setUrlInappApi",value:function setUrlInappApi(e){this.setStorage(this.URL_INAPP_API,e);}},{key:"setInAppEnabled",value:function setInAppEnabled(e){this.setStorage(this.INAPP_ENABLED,e);}},{key:"isInAppEnabled",value:function isInAppEnabled(){return this.getStorage(this.INAPP_ENABLED);}},{key:"setAvoidCypher",value:function setAvoidCypher(e){this.setStorage(this.AVOID_CYPHER,!0===e);}},{key:"isAvoidCypher",value:function isAvoidCypher(){return"true"===this.getStorage(this.AVOID_CYPHER);}},{key:"getUrlDeviceApi",value:function(){var _getUrlDeviceApi8=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee302(){var e,_t237,_t238;return _regenerator2().w(function(_context302){while(1)switch(_context302.p=_context302.n){case 0:_context302.p=0;if(!(this.storage&&this.storage.isLocalStorageAvailable())){_context302.n=1;break;}e=this.getStorage(this.URL_DEVICE_API);_context302.n=3;break;case 1:_t237=this.db&&this.db.IDB;if(!_t237){_context302.n=3;break;}_context302.n=2;return this.db.getItem(this.URL_DEVICE_API);case 2:e=_context302.v;case 3:_context302.n=5;break;case 4:_context302.p=4;_t238=_context302.v;case 5:return _context302.a(2,e);}},_callee302,this,[[0,4]]);}));function getUrlDeviceApi(){return _getUrlDeviceApi8.apply(this,arguments);}return getUrlDeviceApi;}()},{key:"setUrlDeviceApi",value:function(){var _setUrlDeviceApi7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee303(e){var _t239;return _regenerator2().w(function(_context303){while(1)switch(_context303.n){case 0:this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,e);_t239=this.db&&this.db.IDB;if(!_t239){_context303.n=1;break;}_context303.n=1;return this.db.setItem(this.URL_DEVICE_API,e);case 1:return _context303.a(2);}},_callee303,this);}));function setUrlDeviceApi(_x472){return _setUrlDeviceApi7.apply(this,arguments);}return setUrlDeviceApi;}()},{key:"setPushDisabled",value:function setPushDisabled(e){this.setStorage(this.PUSH_DISABLED,e);}},{key:"isPushDisabled",value:function isPushDisabled(){return this.getStorage(this.PUSH_DISABLED);}},{key:"getConfigV2ServiceSyncTime",value:function getConfigV2ServiceSyncTime(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME);}},{key:"setConfigV2ServiceSyncTime",value:function setConfigV2ServiceSyncTime(e){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,e);}},{key:"getConfigV2",value:function getConfigV2(){return this.getStorage(this.CONFIG_V2);}},{key:"setConfigV2",value:function setConfigV2(e){this.setStorage(this.CONFIG_V2,e);}},{key:"getMaintenanceEnd",value:function getMaintenanceEnd(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY);}},{key:"setMaintenanceEnd",value:function setMaintenanceEnd(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,e);}},{key:"getMaintenanceStart",value:function getMaintenanceStart(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY);}},{key:"setMaintenanceStart",value:function setMaintenanceStart(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,e);}},{key:"getTimeoutRequestsInMilliseconds",value:function getTimeoutRequestsInMilliseconds(){return this.getStorage(this.TIMEOUT_REQUESTS);}},{key:"setTimeoutRequestsInMilliseconds",value:function setTimeoutRequestsInMilliseconds(e){this.setStorage(this.TIMEOUT_REQUESTS,e);}},{key:"getEncryptionType",value:function getEncryptionType(){var e=this.getStorage(this.ENCRYPTION_TYPE);return null===e?p.HASH:e;}},{key:"setEncryptionType",value:function setEncryptionType(e){this.setStorage(this.ENCRYPTION_TYPE,e);}}]);}(),I=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4}),g=I;var _=/*#__PURE__*/function(){function _(e){_classCallCheck2(this,_);this.tag="[IND]",e&&(this.tag=e),this.level=g.INFO,this.setLogLevel(new y().getLogLevel()),this.log=[];}return _createClass2(_,[{key:"setLogLevel",value:function setLogLevel(e){e&&e>=g.DEBUG&&e<=g.ERROR&&(this.level=e);}},{key:"d",value:function d(){if(this.level<=g.DEBUG)for(var _e75=0;_e75<arguments.length;_e75++)this.log+=_.addedAsString(arguments[_e75]);return this;}},{key:"i",value:function i(){if(this.level<=g.INFO)for(var _e76=0;_e76<arguments.length;_e76++)this.log+=_.addedAsString(arguments[_e76]);return this;}},{key:"w",value:function w(){if(this.level<=g.WARNING)for(var _e77=0;_e77<arguments.length;_e77++)this.log+=_.addedAsString(arguments[_e77]);return this;}},{key:"e",value:function e(){if(this.level<=g.ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var _e78=0;_e78<arguments.length;_e78++)this.log+=_.addedAsString(arguments[_e78]);return this;}},{key:"writeLog",value:function writeLog(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[];}}],[{key:"addedAsString",value:function addedAsString(e){return"string"==typeof e?e:JSON.stringify(e,null,2);}}]);}();var m=_,v=/*#__PURE__*/_createClass2(function v(e,t,n){_classCallCheck2(this,v);this.errorCode=e,this.errorMessage=t,null!=n&&(this.exceptionMessage=n);}),S={ErrorCode:{GENERAL_ERROR:600,TIMEOUT_REQUEST:605,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",TIMEOUT_REQUEST:"connection timeout",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"}},T=new(/*#__PURE__*/function(){function _class29(){_classCallCheck2(this,_class29);}return _createClass2(_class29,[{key:"showError",value:function showError(e,t,n){if(null!=e){var _i51=Object.values(e.ErrorCode).indexOf(t);if(_i51>=0){var _t240=Object.keys(e.ErrorCode)[_i51],_r33=Object.values(e.ErrorCode)[_i51];return new v({code:_t240,errorId:_r33},Object.values(e.ErrorMessage)[_i51],n);}return new v(S.ErrorCode.GENERAL_ERROR,"general error",n);}}}]);}())(),b=/*#__PURE__*/function(){function b(){_classCallCheck2(this,b);this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE";}return _createClass2(b,[{key:"getURL",value:function(){var _getURL0=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee304(){return _regenerator2().w(function(_context304){while(1)switch(_context304.n){case 0:return _context304.a(2,this.URL_BASE);}},_callee304,this);}));function getURL(){return _getURL0.apply(this,arguments);}return getURL;}()},{key:"call",value:function(){var _call7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee305(e,t,n,i){var r,o,s,_t241,_i52,_a11,_t242,_t243,_t244,_t245,_t246,_t247;return _regenerator2().w(function(_context305){while(1)switch(_context305.p=_context305.n){case 0:r=new m("[IND]BaseClient: ");n.isServiceWorkerRequest()&&r.setLogLevel(g.DEBUG);_context305.n=1;return this.getURL();case 1:_t243=_context305.v;_t244=n.getPath(t);_t245=_t243+_t244;_t246=n.getParams();o=_t245+_t246;n.isJourneyRequest()&&(o=o.replace("v1","v2"));s={method:e,headers:n.addHeaders()};e!==this.GET&&(s.body=JSON.stringify(n.getBody())),i&&(s.credentials=i);_context305.p=2;_t241=new AbortController();new y().getTimeoutRequestsInMilliseconds()&&0!=new y().getTimeoutRequestsInMilliseconds()&&(_i52=setTimeout(function(){return _t241.abort();},new y().getTimeoutRequestsInMilliseconds()),s.signal=_t241.signal);_context305.n=3;return fetch(o,s);case 3:_a11=_context305.v;if(!(_i52&&clearTimeout(_i52),304!=_a11.status)){_context305.n=5;break;}_context305.n=4;return _a11.json();case 4:_t242=_context305.v;return _context305.a(2,_a11.ok?(r.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Response Code: "+_t242.statusCode+"\nResponse Message: "+_t242.message+"\nResponse Body:",JSON.stringify(_t242.data,null,"\t")).writeLog(),_t242):(r.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Response Code: "+_t242.statusCode+"\nResponse Message: "+_t242.message+"\n").writeLog(),new v(_t242.statusCode,_t242.message)));case 5:return _context305.a(2,(r.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Response Code: "+_a11.status+"\n").writeLog(),_a11));case 6:_context305.p=6;_t247=_context305.v;return _context305.a(2,"AbortError"===_t247.name?(r.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Error: "+_t247).writeLog(),T.showError(S,S.ErrorCode.TIMEOUT_REQUEST,_t247)):(r.d("Method: "+e+"\nURL: "+o+"\n"+(e!==this.GET?"Request Body: "+JSON.stringify(n.getBody(),null,"\t")+"\n":"")+"Error: "+_t247).writeLog(),T.showError(S,S.ErrorCode.GENERAL_ERROR,_t247)));}},_callee305,this,[[2,6]]);}));function call(_x473,_x474,_x475,_x476){return _call7.apply(this,arguments);}return call;}()},{key:"get",value:function(){var _get11=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee306(e,t){return _regenerator2().w(function(_context306){while(1)switch(_context306.n){case 0:_context306.n=1;return this.call(this.GET,e,t);case 1:return _context306.a(2,_context306.v);}},_callee306,this);}));function get(_x477,_x478){return _get11.apply(this,arguments);}return get;}()},{key:"post",value:function(){var _post7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee307(e,t,n){return _regenerator2().w(function(_context307){while(1)switch(_context307.n){case 0:_context307.n=1;return this.call(this.POST,e,t,n);case 1:return _context307.a(2,_context307.v);}},_callee307,this);}));function post(_x479,_x480,_x481){return _post7.apply(this,arguments);}return post;}()},{key:"put",value:function(){var _put11=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee308(e,t,n){return _regenerator2().w(function(_context308){while(1)switch(_context308.n){case 0:_context308.n=1;return this.call(this.PUT,e,t,n);case 1:return _context308.a(2,_context308.v);}},_callee308,this);}));function put(_x482,_x483,_x484){return _put11.apply(this,arguments);}return put;}()},{key:"delete",value:function(){var _delete8=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee309(e,t){return _regenerator2().w(function(_context309){while(1)switch(_context309.n){case 0:_context309.n=1;return this.call(this.DELETE,e,t);case 1:return _context309.a(2,_context309.v);}},_callee309,this);}));function _delete(_x485,_x486){return _delete8.apply(this,arguments);}return _delete;}()}]);}(),P=/*#__PURE__*/function(){function P(){_classCallCheck2(this,P);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_EVENT_ID="eventId",this.PARAM_EVENT_AT="eventAt",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 y().getAppKey(),this.params=null,this.pathParams={},this.headers={};}return _createClass2(P,[{key:"getParams",value:function getParams(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"");}},{key:"getBody",value:function getBody(){return this.body?this.body:"";}},{key:"getPath",value:function getPath(e){var _this65=this;var t=e;return Object.keys(this.pathParams).forEach(function(e){t=t.replace(e,_this65.pathParams[e]);}),t;}},{key:"addHeaders",value:function addHeaders(){var _this66=this;var e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach(function(t){e.append(t,_this66.headers[t]);}),e;}},{key:"isServiceWorkerRequest",value:function isServiceWorkerRequest(){return this.serviceWorkerRequest;}},{key:"setServiceWorkerRequest",value:function setServiceWorkerRequest(e){this.serviceWorkerRequest=e;}},{key:"isJourneyRequest",value:function isJourneyRequest(){return this.journeyRequest;}},{key:"setJourneyRequest",value:function setJourneyRequest(e){this.journeyRequest=e;}}]);}(),O=/*#__PURE__*/function(_P3){function O(){var _this67;var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;_classCallCheck2(this,O);_this67=_callSuper2(this,O),_this67.PARAM_APPLICATION_CHANNEL="channel",_this67.channels=e;return _this67;}_inherits2(O,_P3);return _createClass2(O,[{key:"getApplicationRequest",value:function getApplicationRequest(){return this.params=this.createQueryString(),this;}},{key:"createQueryString",value:function createQueryString(){var e="";if(this.channels&&this.channels.length>0)for(var _t248=0;_t248<this.channels.length;_t248++)e+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[_t248].toLowerCase(),"&");return e+="".concat(this.PARAM_PLATFORM,"=webpush"),e;}}]);}(P),R=/*#__PURE__*/function(){function R(){_classCallCheck2(this,R);}return _createClass2(R,null,[{key:"isServiceTimestampExceed",value:function isServiceTimestampExceed(){return!new y().getServiceTimestamp()||new y().getServiceSyncTime()<=(Date.now()-new y().getServiceTimestamp())/6e4;}},{key:"isFunction",value:function isFunction(e){return!(!e||"function"!=typeof e);}},{key:"generateUUID",value:function generateUUID(){var e=new m("[IND]CommonUtils: ");return"undefined"!=typeof crypto&&crypto.randomUUID?(e.d("Using crypto.randomUUID to generate UUID").writeLog(),crypto.randomUUID()):"undefined"!=typeof crypto&&crypto.getRandomValues?(e.d("Using crypto.getRandomValues to generate UUID").writeLog(),([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16);})):null;}}]);}(),A=(_Class7=/*#__PURE__*/function(){function A(){_classCallCheck2(this,A);}return _createClass2(A,null,[{key:"normalizeDateString",value:function normalizeDateString(e){if("number"==typeof e||e instanceof Date){var _t249=new Date(e);return isNaN(_t249.getTime())?null:this.formatCanonicalUTC(_t249);}if(!e||"string"!=typeof e)return null;var t=e.trim();if(this.isCanonicalFormat(t))return t;var n=this.tryToParseLeniently(t);return n?this.formatCanonicalUTC(n):null;}},{key:"isCanonicalFormat",value:function isCanonicalFormat(e){return /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(e);}},{key:"tryToParseLeniently",value:function tryToParseLeniently(e){var _iterator8=_createForOfIteratorHelper2(this.LENIENT_DATE_FORMATS),_step8;try{for(_iterator8.s();!(_step8=_iterator8.n()).done;){var _t250=_step8.value;var _n43=this.parseByFormat(e,_t250);if(_n43&&!isNaN(_n43.getTime()))return _n43;}}catch(err){_iterator8.e(err);}finally{_iterator8.f();}return null;}},{key:"parseByFormat",value:function parseByFormat(e,t){switch(t){case"yyyy-MM-dd'T'HH:mm:ss.SSSZ":return new Date(e);case"yyyy-MM-dd'T'HH:mm:ssZ":return e.endsWith("Z")?new Date(e):new Date(e.replaceAll(/([+-]\d{2})(\d{2})$/g,"$1:$2"));case"yyyy-MM-dd'T'HH:mm:ss":return new Date(e+"Z");case"yyyy-MM-dd HH:mm:ss":return new Date(e.replaceAll(" ","T")+"Z");case"yyyy-MM-dd":return new Date(e+"T00:00:00Z");default:return null;}}},{key:"formatCanonicalUTC",value:function formatCanonicalUTC(e){return e.toISOString();}}]);}(),_defineProperty2(_Class7,"DATE_FORMAT_PATTERN","yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"),_defineProperty2(_Class7,"LENIENT_DATE_FORMATS",["yyyy-MM-dd'T'HH:mm:ss.SSSZ","yyyy-MM-dd'T'HH:mm:ssZ","yyyy-MM-dd'T'HH:mm:ss","yyyy-MM-dd HH:mm:ss","yyyy-MM-dd"]),_Class7),N=/*#__PURE__*/function(_P4){function N(){_classCallCheck2(this,N);return _callSuper2(this,N);}_inherits2(N,_P4);return _createClass2(N,[{key:"setEventId",value:function setEventId(e){this.eventId=e,null==e&&(this.eventId=R.generateUUID());}},{key:"setEventAt",value:function setEventAt(e){this.eventAt=e,null==e&&(this.eventAt=A.normalizeDateString(Date.now()));}}]);}(P),w=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"}),C=/*#__PURE__*/function(){function C(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var t=arguments.length>1?arguments[1]:undefined;_classCallCheck2(this,C);null==e?(this.browserPublicKey=new y().getBrowserPublicKey(),this.browserPrivateKey=new y().getBrowserPrivateKey(),this.platform=new y().getPlatform(),this.version=new y().getVersion(),this.browserName=new y().getBrowserName(),this.browserVersion=new y().getBrowserVersion(),this.osName=new y().getOsName(),this.osVersion=new y().getOsVersion(),this.deviceId=new y().getDeviceId(),this.deviceType=new y().getDeviceType(),new y().getEnabled()&&(this.enabled="true"===new y().getEnabled()),new y().getExternalId()&&(this.externalCode=new y().getExternalId())):t?(e.enabled&&(this.enabled=e.enabled,new y().setEnabled(this.enabled)),e.registeredByCookie&&(this.registeredByCookie=e.registeredByCookie,new y().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();}return _createClass2(C,[{key:"getDeviceId",value:function getDeviceId(){return this.deviceId;}},{key:"setDeviceId",value:function setDeviceId(e){this.deviceId=e;}},{key:"setExternalCode",value:function setExternalCode(e){this.externalCode=e;}},{key:"toJSON",value:function toJSON(){var e={};return this.platform&&(e.platform=this.platform),this.version&&(e.version=this.version),this.productName&&(e.productName=this.productName),this.productVersion&&(e.productVersion=this.productVersion),this.browserName&&(e.browserName=this.browserName),this.browserVersion&&(e.browserVersion=this.browserVersion),this.osName&&(e.osName=this.osName),this.osVersion&&(e.osVersion=this.osVersion),this.deviceType&&(e.deviceType=this.deviceType),this.locale&&(e.locale=this.locale),this.timeZone&&(e.timeZome=this.timeZone),this.timeOffset&&(e.timeOffset=this.timeOffset),this.deviceId&&(e.deviceId=this.deviceId),this.enabled&&(e.enabled=this.enabled),this.browserPublicKey&&(e.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(e.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(e.externalCode=this.externalCode),e;}}]);}(),D=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0}),L=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"}),M=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"}),U=/*#__PURE__*/_createClass2(function U(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;_classCallCheck2(this,U);var n=new y();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 _i53=Date.now();if(e.serviceSyncTime?(this.serviceSyncTime=e.serviceSyncTime,_i53=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):_i53=new Date(Date.now()+36e5),!t){var _e79=_i53.toString();new m("[IND]CoreApplication").d("ServiceSyncTime defined on: "+_e79).writeLog(),n.setConfigV2ServiceSyncTime(_e79);}this.encryptionType=p.HASH,e.encryptionType&&(this.encryptionType=e.encryptionType),n.setEncryptionType(this.encryptionType);}}),B=/*#__PURE__*/function(){function B(){_classCallCheck2(this,B);}return _createClass2(B,null,[{key:"getLocationPermission",value:function(){var _getLocationPermission7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee310(){var e,t;return _regenerator2().w(function(_context310){while(1)switch(_context310.n){case 0:_context310.n=1;return this.getPermission("geolocation");case 1:e=_context310.v;t={};return _context310.a(2,(e&&(t.location=e.state),t));}},_callee310,this);}));function getLocationPermission(){return _getLocationPermission7.apply(this,arguments);}return getLocationPermission;}()},{key:"getPermission",value:function(){var _getPermission7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee311(e){var _t251;return _regenerator2().w(function(_context311){while(1)switch(_context311.p=_context311.n){case 0:_context311.p=0;if(!(navigator&&navigator.permissions&&navigator.permissions.query&&e)){_context311.n=2;break;}_context311.n=1;return navigator.permissions.query({name:e,userVisibleOnly:!0});case 1:return _context311.a(2,_context311.v);case 2:_context311.n=4;break;case 3:_context311.p=3;_t251=_context311.v;return _context311.a(2,null);case 4:return _context311.a(2,null);}},_callee311,null,[[0,3]]);}));function getPermission(_x487){return _getPermission7.apply(this,arguments);}return getPermission;}()},{key:"setPermissionsCallback",value:function(){var _setPermissionsCallback7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee312(){return _regenerator2().w(function(_context312){while(1)switch(_context312.n){case 0:_context312.n=1;return this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 1:return _context312.a(2);}},_callee312,this);}));function setPermissionsCallback(){return _setPermissionsCallback7.apply(this,arguments);}return setPermissionsCallback;}()},{key:"setCallback",value:function(){var _setCallback7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee313(e,t){var n,_i54;return _regenerator2().w(function(_context313){while(1)switch(_context313.n){case 0:_context313.n=1;return this.getPermission(e);case 1:n=_context313.v;if(n){_i54=n.state;"onchange"in n&&(n.onchange=function(){new m("[IND]CorePermissions: ").d(e+" permission state has changed from "+_i54+" to "+n.state).writeLog(),_i54=n.state,t&&t({name:e,state:n.state});});}case 2:return _context313.a(2);}},_callee313,this);}));function setCallback(_x488,_x489){return _setCallback7.apply(this,arguments);}return setCallback;}()}]);}(),k=new m("[IND]Crypto"),V=new TextEncoder("utf-8"),j="HMAC",Y=/*#__PURE__*/function(){function Y(){_classCallCheck2(this,Y);}return _createClass2(Y,null,[{key:"createHmac",value:function(){var _createHmac7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee314(e,t){var _n44,_window7,_i55,r,o,s,_t252;return _regenerator2().w(function(_context314){while(1)switch(_context314.p=_context314.n){case 0:_context314.p=0;_n44=t;if(!(!0===new y().isAvoidCypher()||new y().getEncryptionType()===p.RAW)){_context314.n=1;break;}return _context314.a(2,t);case 1:if(!(new y().getEncryptionType()===p.HASH)){_context314.n=5;break;}_i55=(_window7=window)===null||_window7===void 0||(_window7=_window7.crypto)===null||_window7===void 0?void 0:_window7.subtle;if(_i55){_context314.n=2;break;}return _context314.a(2);case 2:_context314.n=3;return _i55.importKey("raw",V.encode(e),{name:j,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 3:r=_context314.v;_context314.n=4;return _i55.sign(j,r,V.encode(t));case 4:o=_context314.v;s=new Uint8Array(o);_n44=Array.prototype.map.call(s,function(e){return("00"+e.toString(16)).slice(-2);}).join(""),k.d("hmac: ",_n44).writeLog();case 5:return _context314.a(2,_n44);case 6:_context314.p=6;_t252=_context314.v;return _context314.a(2,void k.e("error:",_t252).writeLog());}},_callee314,null,[[0,6]]);}));function createHmac(_x490,_x491){return _createHmac7.apply(this,arguments);}return createHmac;}()}]);}(),F=/*#__PURE__*/function(){function F(){_classCallCheck2(this,F);}return _createClass2(F,null,[{key:"compareJSON",value:function compareJSON(e,t){var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var _i56=0,_n45=n;_i56<_n45.length;_i56++){var _i57=_n45[_i56];if(e[_i57]!==t[_i57]){if("object"!=_typeof2(e[_i57])||"object"!=_typeof2(t[_i57]))return!1;if(!isEqual(e[_i57],t[_i57]))return!1;}}return!0;}}]);}(),x=/*#__PURE__*/function(){function x(){_classCallCheck2(this,x);}return _createClass2(x,null,[{key:"isValidFormat",value:function isValidFormat(e){return null!=e&&""!=e&&"null"!=e&&e.length>8;}}]);}(),G=/*#__PURE__*/function(){function G(){_classCallCheck2(this,G);}return _createClass2(G,null,[{key:"setTopicChannel",value:function setTopicChannel(e,t){var n=[];for(var _i58=0;_i58<e.length;_i58++){var r=e[_i58];r.channel=t,n.push(r);}return n;}}]);}(),K={Repository:y,Config:c,Api:r,Models:o,Utils:s};return i;}();},e.exports=t();},315:function _(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},i(e);}Object.defineProperty(t,"__esModule",{value:!0});var r={Core:!0};Object.defineProperty(t,"Core",{enumerable:!0,get:function get(){return a["default"];}}),Object.defineProperty(t,"default",{enumerable:!0,get:function get(){return o["default"];}});var o=function(e){if("function"==typeof WeakMap){var t=new WeakMap();new WeakMap();}return function(e){if(e&&e.__esModule)return e;var n,r,o={__proto__:null,"default":e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return o;if(n=t){if(n.has(e))return n.get(e);n.set(e,o);}for(var s in e)"default"!==s&&{}.hasOwnProperty.call(e,s)&&((r=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,s))&&(r.get||r.set)?n(o,s,r):o[s]=e[s]);return o;}(e);}(n(710));Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function get(){return o[e];}}));});var s,a=(s=n(610))&&s.__esModule?s:{"default":s};},468:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=c(n(254)),r=c(n(234)),o=c(n(457)),s=c(n(735)),a=c(n(630)),u=c(n(291));function c(e){return e&&e.__esModule?e:{"default":e};}function l(e){return l="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},l(e);}function f(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var u=i&&i.prototype instanceof a?i:a,c=Object.create(u.prototype);return _h3(c,"_invoke",function(n,i,r){var o,a,u,c=0,l=r||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,n){return o=t,a=0,u=e,h.n=n,s;}};function d(n,i){for(a=n,u=i,t=0;!f&&c&&!r&&t<l.length;t++){var r,o=l[t],d=h.p,E=o[2];n>3?(r=E===i)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=d&&((r=n<2&&d<o[1])?(a=0,h.v=i,h.n=o[1]):d<E&&(r=n<3||o[0]>i||i>E)&&(o[4]=n,o[5]=i,h.n=E,a=0));}if(r||n>1)return s;throw f=!0,i;}return function(r,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,E),a=l,u=E;(t=a<2?e:u)||!f;){o||(a?a<3?(a>1&&(h.n=-1),d(a,u)):h.n=u:h.v=u);try{if(c=2,o){if(a||(r="next"),t=o[r]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0);}else 1===a&&(t=o["return"])&&t.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),a=1);o=e;}else if((t=(f=h.n<0)?u:n.call(i,h))!==s)break;}catch(t){o=e,a=1,u=t;}finally{c=1;}}return{value:t,done:f};};}(n,r,o),!0),c;}var s={};function a(){}function u(){}function c(){}t=Object.getPrototypeOf;var l=[][i]?t(t([][i]())):(_h3(t={},i,function(){return this;}),t),d=c.prototype=a.prototype=Object.create(l);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_h3(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e;}return u.prototype=c,_h3(d,"constructor",c),_h3(c,"constructor",u),u.displayName="GeneratorFunction",_h3(c,r,"GeneratorFunction"),_h3(d),_h3(d,r,"Generator"),_h3(d,i,function(){return this;}),_h3(d,"toString",function(){return"[object Generator]";}),(f=function f(){return{w:o,m:E};})();}function _h3(e,t,n,i){var r=Object.defineProperty;try{r({},"",{});}catch(e){r=0;}_h3=function h(e,t,n,i){function o(t,n){_h3(e,t,function(e){return this._invoke(t,n,e);});}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(o("next",0),o("throw",1),o("return",2));},_h3(e,t,n,i);}function d(e,t,n,i,r,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void n(e);}a.done?t(u):Promise.resolve(u).then(i,r);}function E(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function s(e){d(o,i,r,s,a,"next",e);}function a(e){d(o,i,r,s,a,"throw",e);}s(void 0);});};}function p(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,y(i.key),i);}}function y(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==l(t)?t:t+"";}var I=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.URL_BASE="",this.GET="GET",this.POST="POST",this.PUT="PUT",this.DELETE="DELETE";},t=[{key:"getURL",value:(y=E(f().m(function e(){return f().w(function(e){for(;;)if(0===e.n)return e.a(2,this.URL_BASE);},e,this);})),function(){return y.apply(this,arguments);})},{key:"call",value:(d=E(f().m(function e(t,n,c,l){var h,d,E,p,y,I,g,_,m,v,S,T;return f().w(function(e){for(;;)switch(e.p=e.n){case 0:return h=new i["default"]("[IND]BaseClient: "),c.isServiceWorkerRequest()&&h.setLogLevel(a["default"].DEBUG),e.n=1,this.getURL();case 1:return _=e.v,m=c.getPath(n),v=_+m,S=c.getParams(),d=v+S,c.isJourneyRequest()&&(d=d.replace("v1","v2")),E={method:t,headers:c.addHeaders()},t!==this.GET&&(E.body=JSON.stringify(c.getBody())),l&&(E.credentials=l),e.p=2,p=new AbortController(),new u["default"]().getTimeoutRequestsInMilliseconds()&&0!=new u["default"]().getTimeoutRequestsInMilliseconds()&&(y=setTimeout(function(){return p.abort();},new u["default"]().getTimeoutRequestsInMilliseconds()),E.signal=p.signal),e.n=3,fetch(d,E);case 3:if(I=e.v,y&&clearTimeout(y),304==I.status){e.n=6;break;}return e.n=4,I.json();case 4:if(g=e.v,!I.ok){e.n=5;break;}return h.d("Method: "+t+"\nURL: "+d+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Response Code: "+g.statusCode+"\nResponse Message: "+g.message+"\nResponse Body:",JSON.stringify(g.data,null,"\t")).writeLog(),e.a(2,g);case 5:return h.d("Method: "+t+"\nURL: "+d+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Response Code: "+g.statusCode+"\nResponse Message: "+g.message+"\n").writeLog(),e.a(2,new r["default"](g.statusCode,g.message));case 6:return h.d("Method: "+t+"\nURL: "+d+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Response Code: "+I.status+"\n").writeLog(),e.a(2,I);case 7:e.n=10;break;case 8:if(e.p=8,"AbortError"!==(T=e.v).name){e.n=9;break;}return h.d("Method: "+t+"\nURL: "+d+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Error: "+T).writeLog(),e.a(2,o["default"].showError(s["default"],s["default"].ErrorCode.TIMEOUT_REQUEST,T));case 9:return h.d("Method: "+t+"\nURL: "+d+"\n"+"".concat(t!==this.GET?"Request Body: "+JSON.stringify(c.getBody(),null,"\t")+"\n":"")+"Error: "+T).writeLog(),e.a(2,o["default"].showError(s["default"],s["default"].ErrorCode.GENERAL_ERROR,T));case 10:return e.a(2);}},e,this,[[2,8]]);})),function(e,t,n,i){return d.apply(this,arguments);})},{key:"get",value:(h=E(f().m(function e(t,n){return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.GET,t,n);case 1:return e.a(2,e.v);}},e,this);})),function(e,t){return h.apply(this,arguments);})},{key:"post",value:(l=E(f().m(function e(t,n,i){return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.POST,t,n,i);case 1:return e.a(2,e.v);}},e,this);})),function(e,t,n){return l.apply(this,arguments);})},{key:"put",value:(c=E(f().m(function e(t,n,i){return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.PUT,t,n,i);case 1:return e.a(2,e.v);}},e,this);})),function(e,t,n){return c.apply(this,arguments);})},{key:"delete",value:(n=E(f().m(function e(t,n){return f().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.call(this.DELETE,t,n);case 1:return e.a(2,e.v);}},e,this);})),function(e,t){return n.apply(this,arguments);})}],t&&p(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
269
+ var e,t,n,c,l,h,d,y;}();t["default"]=I;},545:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BaseApplicationRequest",{enumerable:!0,get:function get(){return o["default"];}}),Object.defineProperty(t,"BaseClient",{enumerable:!0,get:function get(){return i["default"];}}),Object.defineProperty(t,"BaseEventRequest",{enumerable:!0,get:function get(){return s["default"];}}),Object.defineProperty(t,"BaseRequest",{enumerable:!0,get:function get(){return r["default"];}});var i=a(n(468)),r=a(n(237)),o=a(n(773)),s=a(n(943));function a(e){return e&&e.__esModule?e:{"default":e};}},773:function _(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},i(e);}var r;function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,s(i.key),i);}}function s(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==i(t)?t:t+"";}function a(e,t,n){return t=c(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}(e);}(e,u()?Reflect.construct(t,n||[],c(e).constructor):t.apply(e,n));}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(e){}return(u=function u(){return!!e;})();}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e);},c(e);}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e;},l(e,t);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var f=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),(e=a(this,t)).PARAM_APPLICATION_CHANNEL="channel",e.channels=n,e;}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t);}(t,e),function(e,t){return t&&o(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}(t,[{key:"getApplicationRequest",value:function value(){return this.params=this.createQueryString(),this;}},{key:"createQueryString",value:function value(){var e="";if(this.channels&&this.channels.length>0)for(var t=0;t<this.channels.length;t++)e+="".concat(this.PARAM_APPLICATION_CHANNEL,"=").concat(this.channels[t].toLowerCase(),"&");return e+"".concat(this.PARAM_PLATFORM,"=webpush");}}]);}(((r=n(237))&&r.__esModule?r:{"default":r})["default"]);t["default"]=f;},943:function _(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},i(e);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r=a(n(237)),o=a(n(622)),s=a(n(497));function a(e){return e&&e.__esModule?e:{"default":e};}function u(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,c(i.key),i);}}function c(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==i(t)?t:t+"";}function l(e,t,n){return t=h(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}(e);}(e,f()?Reflect.construct(t,n||[],h(e).constructor):t.apply(e,n));}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(e){}return(f=function f(){return!!e;})();}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e);},h(e);}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e;},d(e,t);}var E=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,t),l(this,t);}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t);}(t,e),n=t,(i=[{key:"setEventId",value:function value(e){this.eventId=e,null==e&&(this.eventId=o["default"].generateUUID());}},{key:"setEventAt",value:function value(e){this.eventAt=e,null==e&&(this.eventAt=s["default"].normalizeDateString(Date.now()));}}])&&u(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;// removed by dead control flow
270
+ var n,i;}(r["default"]);t["default"]=E;},237:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i,r=(i=n(291))&&i.__esModule?i:{"default":i};function o(e){return o="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},o(e);}function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,a(i.key),i);}}function a(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==o(t)?t:t+"";}var u=function(e,t){return t&&s(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),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_EVENT_ID="eventId",this.PARAM_EVENT_AT="eventAt",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 r["default"]().getAppKey(),this.params=null,this.pathParams={},this.headers={};},[{key:"getParams",value:function value(){return"?"+this.PARAM_APP_KEY+"="+this.appKey+(this.params?"&"+this.params:"");}},{key:"getBody",value:function value(){return this.body?this.body:"";}},{key:"getPath",value:function value(e){var t=this,n=e;return Object.keys(this.pathParams).forEach(function(e){n=n.replace(e,t.pathParams[e]);}),n;}},{key:"addHeaders",value:function value(){var e=this,t=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach(function(n){t.append(n,e.headers[n]);}),t;}},{key:"isServiceWorkerRequest",value:function value(){return this.serviceWorkerRequest;}},{key:"setServiceWorkerRequest",value:function value(e){this.serviceWorkerRequest=e;}},{key:"isJourneyRequest",value:function value(){return this.journeyRequest;}},{key:"setJourneyRequest",value:function value(e){this.journeyRequest=e;}}]);t["default"]=u;},122:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i={platform:"webpush",version:"0.0.1"},r=n(904);i.version=r.version,i=Object.assign(i,{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")}}),t["default"]=i;},610:function _(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},i(e);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r=l(n(122)),o=l(n(291)),s=c(n(545)),a=c(n(225)),u=c(n(628));function c(e,t){if("function"==typeof WeakMap)var n=new WeakMap(),r=new WeakMap();return(c=function c(e,t){if(!t&&e&&e.__esModule)return e;var o,s,a={__proto__:null,"default":e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return a;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,a);}for(var u in e)"default"!==u&&{}.hasOwnProperty.call(e,u)&&((s=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,u))&&(s.get||s.set)?o(a,u,s):a[u]=e[u]);return a;})(e,t);}function l(e){return e&&e.__esModule?e:{"default":e};}t["default"]={Repository:o["default"],Config:r["default"],Api:s,Models:a,Utils:u};},902:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.Channel=void 0;var n=t.Channel=Object.freeze({PUSH:"push",INAPP:"inapp",CHAT:"chat",NONE:"none"});t["default"]=n;},174:function _(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},i(e);}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var r=a(n(291)),o=a(n(254)),s=a(n(164));function a(e){return e&&e.__esModule?e:{"default":e};}function u(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,c(i.key),i);}}function c(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==i(t)?t:t+"";}var l=function(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}(function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);var i=new r["default"]();if(null!=t){i.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,i.setMaintenanceStart(this.maintenanceWindow.start)),this.maintenanceWindow.end&&(this.maintenanceWindowEnd=this.maintenanceWindow.end,i.setMaintenanceEnd(this.maintenanceWindow.end))),t.networkEventsEnabled&&(this.networkEventsEnabled=t.networkEventsEnabled),t.networkUpdateMinutes&&(this.networkUpdateMinutes=t.networkUpdateMinutes);var a=Date.now();if(t.serviceSyncTime?(this.serviceSyncTime=t.serviceSyncTime,a=new Date(Date.now()+60*this.serviceSyncTime*60*1e3)):a=new Date(Date.now()+36e5),!n){var u=a.toString();new o["default"]("[IND]CoreApplication").d("ServiceSyncTime defined on: "+u).writeLog(),i.setConfigV2ServiceSyncTime(u);}this.encryptionType=s["default"].HASH,t.encryptionType&&(this.encryptionType=t.encryptionType),i.setEncryptionType(this.encryptionType);}});t["default"]=l;},395:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i,r=(i=n(291))&&i.__esModule?i:{"default":i};function o(e){return o="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},o(e);}function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,a(i.key),i);}}function a(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==o(t)?t:t+"";}var u=function(e,t){return t&&s(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),null==t?(this.browserPublicKey=new r["default"]().getBrowserPublicKey(),this.browserPrivateKey=new r["default"]().getBrowserPrivateKey(),this.platform=new r["default"]().getPlatform(),this.version=new r["default"]().getVersion(),this.browserName=new r["default"]().getBrowserName(),this.browserVersion=new r["default"]().getBrowserVersion(),this.osName=new r["default"]().getOsName(),this.osVersion=new r["default"]().getOsVersion(),this.deviceId=new r["default"]().getDeviceId(),this.deviceType=new r["default"]().getDeviceType(),new r["default"]().getEnabled()&&(this.enabled="true"===new r["default"]().getEnabled()),new r["default"]().getExternalId()&&(this.externalCode=new r["default"]().getExternalId())):n?(t.enabled&&(this.enabled=t.enabled,new r["default"]().setEnabled(this.enabled)),t.registeredByCookie&&(this.registeredByCookie=t.registeredByCookie,new r["default"]().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();},[{key:"getDeviceId",value:function value(){return this.deviceId;}},{key:"setDeviceId",value:function value(e){this.deviceId=e;}},{key:"setExternalCode",value:function value(e){this.externalCode=e;}},{key:"toJSON",value:function value(){var e={};return this.platform&&(e.platform=this.platform),this.version&&(e.version=this.version),this.productName&&(e.productName=this.productName),this.productVersion&&(e.productVersion=this.productVersion),this.browserName&&(e.browserName=this.browserName),this.browserVersion&&(e.browserVersion=this.browserVersion),this.osName&&(e.osName=this.osName),this.osVersion&&(e.osVersion=this.osVersion),this.deviceType&&(e.deviceType=this.deviceType),this.locale&&(e.locale=this.locale),this.timeZone&&(e.timeZome=this.timeZone),this.timeOffset&&(e.timeOffset=this.timeOffset),this.deviceId&&(e.deviceId=this.deviceId),this.enabled&&(e.enabled=this.enabled),this.browserPublicKey&&(e.browserPublicKey=this.browserPublicKey),this.browserPrivateKey&&(e.browserPrivateKey=this.browserPrivateKey),this.externalCode&&(e.externalCode=this.externalCode),e;}}]);t["default"]=u;},89:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n=Object.freeze({DEFAULT:-1,ENABLE:1,DISABLE:0});t["default"]=n;},164:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.EncryptionType=void 0;var n=t.EncryptionType=Object.freeze({RAW:"raw",HASH:"hash"});t["default"]=n;},735:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n={ErrorCode:{GENERAL_ERROR:600,TIMEOUT_REQUEST:605,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",TIMEOUT_REQUEST:"connection timeout",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"}};t["default"]=n;},234:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i);}}function r(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}(function e(t,n,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.errorCode=t,this.errorMessage=n,null!=i&&(this.exceptionMessage=i);});t["default"]=o;},953:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n=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"});t["default"]=n;},72:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var n=Object.freeze({SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"});t["default"]=n;},225:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Channel",{enumerable:!0,get:function get(){return i.Channel;}}),Object.defineProperty(t,"CoreApplication",{enumerable:!0,get:function get(){return l["default"];}}),Object.defineProperty(t,"Device",{enumerable:!0,get:function get(){return r["default"];}}),Object.defineProperty(t,"DeviceStatus",{enumerable:!0,get:function get(){return o["default"];}}),Object.defineProperty(t,"EncryptionType",{enumerable:!0,get:function get(){return f["default"];}}),Object.defineProperty(t,"ErrorDictionary",{enumerable:!0,get:function get(){return s["default"];}}),Object.defineProperty(t,"ErrorModel",{enumerable:!0,get:function get(){return a["default"];}}),Object.defineProperty(t,"EventType",{enumerable:!0,get:function get(){return u["default"];}}),Object.defineProperty(t,"TopicSubscribeType",{enumerable:!0,get:function get(){return c["default"];}});var i=n(902),r=h(n(395)),o=h(n(89)),s=h(n(735)),a=h(n(234)),u=h(n(953)),c=h(n(72)),l=h(n(174)),f=h(n(164));function h(e){return e&&e.__esModule?e:{"default":e};}},672:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",s=n.toStringTag||"@@toStringTag";function a(n,i,o,s){var a=i&&i.prototype instanceof c?i:c,l=Object.create(a.prototype);return _r34(l,"_invoke",function(n,i,r){var o,s,a,c=0,l=r||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,n){return o=t,s=0,a=e,h.n=n,u;}};function d(n,i){for(s=n,a=i,t=0;!f&&c&&!r&&t<l.length;t++){var r,o=l[t],d=h.p,E=o[2];n>3?(r=E===i)&&(a=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=d&&((r=n<2&&d<o[1])?(s=0,h.v=i,h.n=o[1]):d<E&&(r=n<3||o[0]>i||i>E)&&(o[4]=n,o[5]=i,h.n=E,s=0));}if(r||n>1)return u;throw f=!0,i;}return function(r,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,E),s=l,a=E;(t=s<2?e:a)||!f;){o||(s?s<3?(s>1&&(h.n=-1),d(s,a)):h.n=a:h.v=a);try{if(c=2,o){if(s||(r="next"),t=o[r]){if(!(t=t.call(o,a)))throw TypeError("iterator result is not an object");if(!t.done)return t;a=t.value,s<2&&(s=0);}else 1===s&&(t=o["return"])&&t.call(o),s<2&&(a=TypeError("The iterator does not provide a '"+r+"' method"),s=1);o=e;}else if((t=(f=h.n<0)?a:n.call(i,h))!==u)break;}catch(t){o=e,s=1,a=t;}finally{c=1;}}return{value:t,done:f};};}(n,o,s),!0),l;}var u={};function c(){}function l(){}function f(){}t=Object.getPrototypeOf;var h=[][o]?t(t([][o]())):(_r34(t={},o,function(){return this;}),t),d=f.prototype=c.prototype=Object.create(h);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,_r34(e,s,"GeneratorFunction")),e.prototype=Object.create(d),e;}return l.prototype=f,_r34(d,"constructor",f),_r34(f,"constructor",l),l.displayName="GeneratorFunction",_r34(f,s,"GeneratorFunction"),_r34(d),_r34(d,s,"Generator"),_r34(d,o,function(){return this;}),_r34(d,"toString",function(){return"[object Generator]";}),(i=function i(){return{w:a,m:E};})();}function _r34(e,t,n,i){var o=Object.defineProperty;try{o({},"",{});}catch(e){o=0;}_r34=function r(e,t,n,i){function s(t,n){_r34(e,t,function(e){return this._invoke(t,n,e);});}t?o?o(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(s("next",0),s("throw",1),s("return",2));},_r34(e,t,n,i);}function o(e,t,n,i,r,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void n(e);}a.done?t(u):Promise.resolve(u).then(i,r);}function s(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var s=e.apply(t,n);function a(e){o(s,i,r,a,u,"next",e);}function u(e){o(s,i,r,a,u,"throw",e);}a(void 0);});};}function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,u(i.key),i);}}function u(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var c=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),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;},t=[{key:"getDB",value:(c=s(i().m(function e(){var t=this;return i().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,n){var i=t.IDB;if(i){var r=i.open("indigitall.indexedDB",1);r.onupgradeneeded=function(){r.result.createObjectStore("indigitallStore").createIndex("storeIndex","store.key");},r.onsuccess=function(){var t=r.result,n=t.transaction("indigitallStore","readwrite"),i=n.objectStore("indigitallStore"),o=i.index("storeIndex");e({db:t,tx:n,store:i,index:o});},r.onerror=function(e){n(e);};}else n(!1);}));},e);})),function(){return c.apply(this,arguments);})},{key:"get",value:(u=s(i().m(function e(t,n){var r=this;return i().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,i){t||i(!1),t.index.get(n).onsuccess=function(n){n.target.result&&(r.close(t),e(n.target.result.store.value)),i(!1);};}));},e);})),function(e,t){return u.apply(this,arguments);})},{key:"put",value:(o=s(i().m(function e(t,n,r){var o=this;return i().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,i){t||i(!1),t.store.put({store:{key:n,value:r}},n).onsuccess=function(n){o.close(t),e(r);};}));},e);})),function(e,t,n){return o.apply(this,arguments);})},{key:"close",value:function value(e){if(e.tx)try{e.tx.oncomplete=function(){e.db.close();};}catch(e){console.log(this.TAG,e);}}},{key:"setItem",value:(r=s(i().m(function e(t,n){var r,o;return i().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this.getDB();case 1:return r=e.v,e.a(2,this.put(r,t,n));case 2:return e.p=2,o=e.v,e.a(2,o);}},e,this,[[0,2]]);})),function(e,t){return r.apply(this,arguments);})},{key:"getItem",value:(n=s(i().m(function e(t){var n,r;return i().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this.getDB();case 1:return n=e.v,e.a(2,this.get(n,t));case 2:return e.p=2,r=e.v,e.a(2,r);}},e,this,[[0,2]]);})),function(e){return n.apply(this,arguments);})}],t&&a(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
271
+ var e,t,n,r,o,u,c;}();t["default"]=new c();},87:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i);}}function r(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.storage=this.isLocalStorageAvailable()?window.localStorage:null;},t=[{key:"isLocalStorageAvailable",value:function value(){try{var e=window.localStorage,t="__storage_test__";if(e)return e.setItem(t,t),e.removeItem(t),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==o.length;}return!1;}},{key:"setItem",value:function value(e,t){return null!=this.storage&&(this.storage.setItem(e,t),!0);}},{key:"getItem",value:function value(e){return null!=this.storage?this.storage.getItem(e):null;}},{key:"deleteItem",value:function(_value5){function value(_x492){return _value5.apply(this,arguments);}value.toString=function(){return _value5.toString();};return value;}(function(e){return!!this.storage&&(this.storage.setItem(e,value),!0);})},{key:"clear",value:function value(){this.storage&&this.storage.clear();}}],t&&i(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
272
+ var e,t;}())();t["default"]=o;},291:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=u(n(122)),r=u(n(87)),o=u(n(672)),s=u(n(238)),a=u(n(164));function u(e){return e&&e.__esModule?e:{"default":e};}function c(e){return c="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},c(e);}function l(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var u=i&&i.prototype instanceof a?i:a,c=Object.create(u.prototype);return _f5(c,"_invoke",function(n,i,r){var o,a,u,c=0,l=r||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,n){return o=t,a=0,u=e,h.n=n,s;}};function d(n,i){for(a=n,u=i,t=0;!f&&c&&!r&&t<l.length;t++){var r,o=l[t],d=h.p,E=o[2];n>3?(r=E===i)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=d&&((r=n<2&&d<o[1])?(a=0,h.v=i,h.n=o[1]):d<E&&(r=n<3||o[0]>i||i>E)&&(o[4]=n,o[5]=i,h.n=E,a=0));}if(r||n>1)return s;throw f=!0,i;}return function(r,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,E),a=l,u=E;(t=a<2?e:u)||!f;){o||(a?a<3?(a>1&&(h.n=-1),d(a,u)):h.n=u:h.v=u);try{if(c=2,o){if(a||(r="next"),t=o[r]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0);}else 1===a&&(t=o["return"])&&t.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),a=1);o=e;}else if((t=(f=h.n<0)?u:n.call(i,h))!==s)break;}catch(t){o=e,a=1,u=t;}finally{c=1;}}return{value:t,done:f};};}(n,r,o),!0),c;}var s={};function a(){}function u(){}function c(){}t=Object.getPrototypeOf;var h=[][i]?t(t([][i]())):(_f5(t={},i,function(){return this;}),t),d=c.prototype=a.prototype=Object.create(h);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_f5(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e;}return u.prototype=c,_f5(d,"constructor",c),_f5(c,"constructor",u),u.displayName="GeneratorFunction",_f5(c,r,"GeneratorFunction"),_f5(d),_f5(d,r,"Generator"),_f5(d,i,function(){return this;}),_f5(d,"toString",function(){return"[object Generator]";}),(l=function l(){return{w:o,m:E};})();}function _f5(e,t,n,i){var r=Object.defineProperty;try{r({},"",{});}catch(e){r=0;}_f5=function f(e,t,n,i){function o(t,n){_f5(e,t,function(e){return this._invoke(t,n,e);});}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(o("next",0),o("throw",1),o("return",2));},_f5(e,t,n,i);}function h(e,t,n,i,r,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void n(e);}a.done?t(u):Promise.resolve(u).then(i,r);}function d(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function s(e){h(o,i,r,s,a,"next",e);}function a(e){h(o,i,r,s,a,"throw",e);}s(void 0);});};}function E(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,p(i.key),i);}}function p(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==c(t)?t:t+"";}var y=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.storage=r["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.TIMEOUT_REQUESTS=this.REPOSITORY+".TIMEOUT_REQUESTS",this.ENCRYPTION_TYPE=this.REPOSITORY+".ENCRYPTION_TYPE",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";},t=[{key:"setItemSessionStorage",value:function value(e,t){s["default"].setItem(e,t);}},{key:"getItemSessionStorage",value:function value(e){return s["default"].getItem(e);}},{key:"clearSessionStorage",value:function value(){s["default"].clearMessages();}},{key:"setStorage",value:function value(e,t){r["default"].setItem(e,t);}},{key:"getStorage",value:function value(e){return r["default"].getItem(e);}},{key:"clearStorage",value:function value(){r["default"].clear();}},{key:"setBrowserPublicKey",value:function value(e){r["default"].setItem(this.BROWSER_PUBLIC_KEY,e);}},{key:"getBrowserPublicKey",value:function value(){return r["default"].getItem(this.BROWSER_PUBLIC_KEY);}},{key:"setBrowserPrivateKey",value:function value(e){r["default"].setItem(this.BROWSER_PRIVATE_KEY,e);}},{key:"getBrowserPrivateKey",value:function value(){return r["default"].getItem(this.BROWSER_PRIVATE_KEY);}},{key:"setAppKey",value:(O=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(r["default"].setItem(this.APP_KEY,t),!o["default"]||!o["default"].IDB){e.n=1;break;}return e.n=1,o["default"].setItem(this.APP_KEY,t);case 1:return e.a(2);}},e,this);})),function(e){return O.apply(this,arguments);})},{key:"getAppKey",value:function value(){return r["default"].getItem(this.APP_KEY);}},{key:"setDeviceId",value:(P=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.DEVICE_ID,t),!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.DEVICE_ID,t);case 1:return e.a(2);}},e,this);})),function(e){return P.apply(this,arguments);})},{key:"getDeviceId",value:function value(){return this.getStorage(this.DEVICE_ID);}},{key:"getAppKeySync",value:(b=d(l().m(function e(){return l().w(function(e){for(;;)switch(e.n){case 0:if(!o["default"]||!o["default"].IDB){e.n=2;break;}return e.n=1,o["default"].getItem(this.APP_KEY);case 1:return e.a(2,e.v);case 2:return e.a(2);}},e,this);})),function(){return b.apply(this,arguments);})},{key:"setVAPID",value:function value(e){r["default"].setItem(this.VAPID_PUBLIC,e);}},{key:"getVAPID",value:function value(){return r["default"].getItem(this.VAPID_PUBLIC);}},{key:"setEnabled",value:function value(e){r["default"].setItem(this.ENABLED,e);}},{key:"getEnabled",value:function value(){return r["default"].getItem(this.ENABLED);}},{key:"setServiceSyncTime",value:function value(e){r["default"].setItem(this.SERVICE_SYNC_TIME,e*this.BASE_TIME);}},{key:"getServiceSyncTime",value:function value(){return r["default"].getItem(this.SERVICE_SYNC_TIME)||1*this.BASE_TIME;}},{key:"setLocationEnabled",value:function value(e){r["default"].setItem(this.LOCATION_ENABLED,e);}},{key:"getLocationEnabled",value:function value(){return r["default"].getItem(this.LOCATION_ENABLED);}},{key:"setLocationUpdateMinutes",value:function value(e){r["default"].setItem(this.LOCATION_UPDATE_MINUTES,e);}},{key:"getLocationUpdateMinutes",value:function value(){return r["default"].getItem(this.LOCATION_UPDATE_MINUTES)||30;}},{key:"setRequestLocation",value:(T=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:r["default"].setItem(this.REQUEST_LOCATION,t);case 1:return e.a(2);}},e,this);})),function(e){return T.apply(this,arguments);})},{key:"getRequestLocation",value:function value(){return!!r["default"]&&r["default"].getItem(this.REQUEST_LOCATION);}},{key:"setPlatform",value:(S=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:r["default"].setItem(this.PLATFORM,t);case 1:return e.a(2);}},e,this);})),function(e){return S.apply(this,arguments);})},{key:"getPlatform",value:function value(){return r["default"]&&r["default"].getItem(this.PLATFORM)||i["default"].platform;}},{key:"getVersion",value:function value(){return i["default"].version;}},{key:"setBrowserName",value:(v=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:r["default"].setItem(this.BROWSER_NAME,t);case 1:return e.a(2);}},e,this);})),function(e){return v.apply(this,arguments);})},{key:"getBrowserName",value:function value(){return r["default"].getItem(this.BROWSER_NAME);}},{key:"setBrowserVersion",value:function value(e){r["default"].setItem(this.BROWSER_VERSION,e);}},{key:"getBrowserVersion",value:function value(){return r["default"].getItem(this.BROWSER_VERSION);}},{key:"setOsName",value:(m=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:r["default"].setItem(this.OS_NAME,t);case 1:return e.a(2);}},e,this);})),function(e){return m.apply(this,arguments);})},{key:"getOsName",value:function value(){return r["default"].getItem(this.OS_NAME);}},{key:"setOsVersion",value:function value(e){r["default"].setItem(this.OS_VERSION,e);}},{key:"getOsVersion",value:function value(){return r["default"].getItem(this.OS_VERSION);}},{key:"setDeviceType",value:function value(e){r["default"].setItem(this.DEVICE_TYPE,e);}},{key:"getDeviceType",value:function value(){return r["default"].getItem(this.DEVICE_TYPE);}},{key:"setSupported",value:function value(e){r["default"].setItem(this.SUPPORTED,e);}},{key:"getSupported",value:function value(){return r["default"].getItem(this.SUPPORTED);}},{key:"setServiceTimestamp",value:function value(e){r["default"].setItem(this.SERVICE_TIMESTAMP,e);}},{key:"getServiceTimestamp",value:function value(){return r["default"].getItem(this.SERVICE_TIMESTAMP);}},{key:"setLocationTimestamp",value:function value(e){r["default"].setItem(this.LOCATION_TIMESTAMP,e);}},{key:"getLocationTimestamp",value:function value(){return r["default"].getItem(this.LOCATION_TIMESTAMP);}},{key:"setPermissionLocation",value:function value(e){r["default"].setItem(this.PERMISSION_LOCATION,e);}},{key:"getPermissionLocation",value:function value(){return r["default"].getItem(this.PERMISSION_LOCATION);}},{key:"setDebugLog",value:function value(e){r["default"].setItem(this.SET_LOG_DEBUG,e);}},{key:"getDebugLog",value:function value(){return"false"!==r["default"].getItem(this.SET_LOG_DEBUG);}},{key:"setLogLevel",value:function value(e){r["default"].setItem(this.LOG_LEVEL,e);}},{key:"getLogLevel",value:function value(){return r["default"].getItem(this.LOG_LEVEL);}},{key:"setNewUserTimestamp",value:function value(e){r["default"].setItem(this.NEW_USER_TIMESTAMP,e);}},{key:"getNewUserTimestamp",value:function value(){return r["default"].getItem(this.NEW_USER_TIMESTAMP);}},{key:"setExternalIdRequest",value:(_=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(r["default"]&&r["default"].isLocalStorageAvailable()&&r["default"].setItem(this.EXTERNAL_ID,t),!o["default"]||!o["default"].IDB){e.n=1;break;}return e.n=1,o["default"].setItem(this.EXTERNAL_ID,t);case 1:return e.a(2);}},e,this);})),function(e){return _.apply(this,arguments);})},{key:"getExternalIdRequest",value:(g=d(l().m(function e(){var t;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!r["default"]||!r["default"].isLocalStorageAvailable()){e.n=1;break;}t=r["default"].getItem(this.EXTERNAL_ID),e.n=3;break;case 1:if(!o["default"]||!o["default"].IDB){e.n=3;break;}return e.n=2,o["default"].getItem(this.EXTERNAL_ID);case 2:t=e.v;case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2,t);}},e,this,[[0,4]]);})),function(){return g.apply(this,arguments);})},{key:"setExternalId",value:function value(e){r["default"].setItem(this.EXTERNAL_ID,e);}},{key:"getExternalId",value:function value(){return r["default"].getItem(this.EXTERNAL_ID);}},{key:"getRegisteredByCookie",value:(I=d(l().m(function e(){return l().w(function(e){for(;;)if(0===e.n)return e.a(2,r["default"].getItem(this.REGISTERED_BY_COOKIE));},e,this);})),function(){return I.apply(this,arguments);})},{key:"setRegisteredByCookie",value:(y=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:r["default"].setItem(this.REGISTERED_BY_COOKIE,t);case 1:return e.a(2);}},e,this);})),function(e){return y.apply(this,arguments);})},{key:"setLatitude",value:function value(e){r["default"].setItem(this.LATITUDE,e);}},{key:"getLatitude",value:function value(){return r["default"].getItem(this.LATITUDE);}},{key:"setLongitude",value:function value(e){r["default"].setItem(this.LONGITUDE,e);}},{key:"getLongitude",value:function value(){return r["default"].getItem(this.LONGITUDE);}},{key:"setInAppTopicList",value:(p=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.INAPP_TOPICS,t);case 1:return e.a(2);}},e,this);})),function(e){return p.apply(this,arguments);})},{key:"getInAppTopicList",value:(h=d(l().m(function e(){var t;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!this.db||!this.db.IDB){e.n=2;break;}return e.n=1,this.db.getItem(this.INAPP_TOPICS);case 1:t=e.v;case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2,t);}},e,this,[[0,3]]);})),function(){return h.apply(this,arguments);})},{key:"setTopicList",value:(f=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.TOPIC_LIST,t);case 1:return e.a(2);}},e,this);})),function(e){return f.apply(this,arguments);})},{key:"getTopicList",value:(c=d(l().m(function e(){var t;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!this.db||!this.db.IDB){e.n=2;break;}return e.n=1,this.db.getItem(this.TOPIC_LIST);case 1:t=e.v;case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2,t);}},e,this,[[0,3]]);})),function(){return c.apply(this,arguments);})},{key:"getUrlInappApi",value:function value(){return this.getStorage(this.URL_INAPP_API);}},{key:"setUrlInappApi",value:function value(e){this.setStorage(this.URL_INAPP_API,e);}},{key:"setInAppEnabled",value:function value(e){this.setStorage(this.INAPP_ENABLED,e);}},{key:"isInAppEnabled",value:function value(){return this.getStorage(this.INAPP_ENABLED);}},{key:"setAvoidCypher",value:function value(e){this.setStorage(this.AVOID_CYPHER,!0===e);}},{key:"isAvoidCypher",value:function value(){return"true"===this.getStorage(this.AVOID_CYPHER);}},{key:"getUrlDeviceApi",value:(u=d(l().m(function e(){var t;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!this.storage||!this.storage.isLocalStorageAvailable()){e.n=1;break;}t=this.getStorage(this.URL_DEVICE_API),e.n=3;break;case 1:if(!this.db||!this.db.IDB){e.n=3;break;}return e.n=2,this.db.getItem(this.URL_DEVICE_API);case 2:t=e.v;case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2,t);}},e,this,[[0,4]]);})),function(){return u.apply(this,arguments);})},{key:"setUrlDeviceApi",value:(n=d(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:if(this.storage&&this.storage.isLocalStorageAvailable()&&this.setStorage(this.URL_DEVICE_API,t),!this.db||!this.db.IDB){e.n=1;break;}return e.n=1,this.db.setItem(this.URL_DEVICE_API,t);case 1:return e.a(2);}},e,this);})),function(e){return n.apply(this,arguments);})},{key:"setPushDisabled",value:function value(e){this.setStorage(this.PUSH_DISABLED,e);}},{key:"isPushDisabled",value:function value(){return this.getStorage(this.PUSH_DISABLED);}},{key:"getConfigV2ServiceSyncTime",value:function value(){return this.getStorage(this.CONFIG_V2_SERVICE_SYNC_TIME);}},{key:"setConfigV2ServiceSyncTime",value:function value(e){this.setStorage(this.CONFIG_V2_SERVICE_SYNC_TIME,e);}},{key:"getConfigV2",value:function value(){return this.getStorage(this.CONFIG_V2);}},{key:"setConfigV2",value:function value(e){this.setStorage(this.CONFIG_V2,e);}},{key:"getMaintenanceEnd",value:function value(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY);}},{key:"setMaintenanceEnd",value:function value(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_END_KEY,e);}},{key:"getMaintenanceStart",value:function value(){return this.getStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY);}},{key:"setMaintenanceStart",value:function value(e){this.setStorage(this.CONFIG_V2_MAINTENANCE_WINDOW_START_KEY,e);}},{key:"getTimeoutRequestsInMilliseconds",value:function value(){return this.getStorage(this.TIMEOUT_REQUESTS);}},{key:"setTimeoutRequestsInMilliseconds",value:function value(e){this.setStorage(this.TIMEOUT_REQUESTS,e);}},{key:"getEncryptionType",value:function value(){var e=this.getStorage(this.ENCRYPTION_TYPE);return null===e?a["default"].HASH:e;}},{key:"setEncryptionType",value:function value(e){this.setStorage(this.ENCRYPTION_TYPE,e);}}],t&&E(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
273
+ var e,t,n,u,c,f,h,p,y,I,g,_,m,v,S,T,b,P,O;}();t["default"]=y;},238:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i);}}function r(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.SESSION="indigitall.session.storage",this.session=this.isSessionStorageAvailable()?window.sessionStorage:null;},t=[{key:"isSessionStorageAvailable",value:function value(){try{var e=window.sessionStorage,t="__storage_test__";if(e)return e.setItem(t,t),e.removeItem(t),!0;}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==o.length;}return!1;}},{key:"getItem",value:function value(e){return null!=this.session?this.session.getItem(e):null;}},{key:"setItem",value:function value(e,t){return null!=this.session&&(this.session.setItem(e,t),!0);}},{key:"clearMessages",value:function value(){this.session&&this.session.removeItem("messages");}}],t&&i(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
274
+ var e,t;}())();t["default"]=o;},622:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=o(n(291)),r=o(n(254));function o(e){return e&&e.__esModule?e:{"default":e};}function s(e){return s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},s(e);}function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,u(i.key),i);}}function u(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==s(t)?t:t+"";}var c=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},t=[{key:"isServiceTimestampExceed",value:function value(){return!new i["default"]().getServiceTimestamp()||new i["default"]().getServiceSyncTime()<=(Date.now()-new i["default"]().getServiceTimestamp())/6e4;}},{key:"isFunction",value:function value(e){return!(!e||"function"!=typeof e);}},{key:"generateUUID",value:function value(){var e=new r["default"]("[IND]CommonUtils: ");return"undefined"!=typeof crypto&&crypto.randomUUID?(e.d("Using crypto.randomUUID to generate UUID").writeLog(),crypto.randomUUID()):"undefined"!=typeof crypto&&crypto.getRandomValues?(e.d("Using crypto.getRandomValues to generate UUID").writeLog(),([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16);})):null;}}],t&&a(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
275
+ var e,t;}();t["default"]=c;},429:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i,r=(i=n(254))&&i.__esModule?i:{"default":i};function o(e){return o="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},o(e);}function s(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var s=i&&i.prototype instanceof c?i:c,l=Object.create(s.prototype);return _a12(l,"_invoke",function(n,i,r){var o,s,a,c=0,l=r||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,n){return o=t,s=0,a=e,h.n=n,u;}};function d(n,i){for(s=n,a=i,t=0;!f&&c&&!r&&t<l.length;t++){var r,o=l[t],d=h.p,E=o[2];n>3?(r=E===i)&&(a=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=d&&((r=n<2&&d<o[1])?(s=0,h.v=i,h.n=o[1]):d<E&&(r=n<3||o[0]>i||i>E)&&(o[4]=n,o[5]=i,h.n=E,s=0));}if(r||n>1)return u;throw f=!0,i;}return function(r,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,E),s=l,a=E;(t=s<2?e:a)||!f;){o||(s?s<3?(s>1&&(h.n=-1),d(s,a)):h.n=a:h.v=a);try{if(c=2,o){if(s||(r="next"),t=o[r]){if(!(t=t.call(o,a)))throw TypeError("iterator result is not an object");if(!t.done)return t;a=t.value,s<2&&(s=0);}else 1===s&&(t=o["return"])&&t.call(o),s<2&&(a=TypeError("The iterator does not provide a '"+r+"' method"),s=1);o=e;}else if((t=(f=h.n<0)?a:n.call(i,h))!==u)break;}catch(t){o=e,s=1,a=t;}finally{c=1;}}return{value:t,done:f};};}(n,r,o),!0),l;}var u={};function c(){}function l(){}function f(){}t=Object.getPrototypeOf;var h=[][i]?t(t([][i]())):(_a12(t={},i,function(){return this;}),t),d=f.prototype=c.prototype=Object.create(h);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,_a12(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e;}return l.prototype=f,_a12(d,"constructor",f),_a12(f,"constructor",l),l.displayName="GeneratorFunction",_a12(f,r,"GeneratorFunction"),_a12(d),_a12(d,r,"Generator"),_a12(d,i,function(){return this;}),_a12(d,"toString",function(){return"[object Generator]";}),(s=function s(){return{w:o,m:E};})();}function _a12(e,t,n,i){var r=Object.defineProperty;try{r({},"",{});}catch(e){r=0;}_a12=function a(e,t,n,i){function o(t,n){_a12(e,t,function(e){return this._invoke(t,n,e);});}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(o("next",0),o("throw",1),o("return",2));},_a12(e,t,n,i);}function u(e,t,n,i,r,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void n(e);}a.done?t(u):Promise.resolve(u).then(i,r);}function c(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function s(e){u(o,i,r,s,a,"next",e);}function a(e){u(o,i,r,s,a,"throw",e);}s(void 0);});};}function l(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,f(i.key),i);}}function f(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==o(t)?t:t+"";}var h=function(){return function(e,t,n){return n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;}(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},0,[{key:"getLocationPermission",value:(i=c(s().m(function e(){var t,n;return s().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getPermission("geolocation");case 1:return t=e.v,n={},t&&(n.location=t.state),e.a(2,n);}},e,this);})),function(){return i.apply(this,arguments);})},{key:"getPermission",value:(n=c(s().m(function e(t){return s().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,!(navigator&&navigator.permissions&&navigator.permissions.query&&t)){e.n=2;break;}return e.n=1,navigator.permissions.query({name:t,userVisibleOnly:!0});case 1:return e.a(2,e.v);case 2:e.n=4;break;case 3:return e.p=3,e.v,e.a(2,null);case 4:return e.a(2,null);}},e,null,[[0,3]]);})),function(e){return n.apply(this,arguments);})},{key:"setPermissionsCallback",value:(t=c(s().m(function e(){return s().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.setCallback("geolocation",navigator.indigitallRequestLocationPermission);case 1:return e.a(2);}},e,this);})),function(){return t.apply(this,arguments);})},{key:"setCallback",value:(e=c(s().m(function e(t,n){var i,o;return s().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getPermission(t);case 1:(i=e.v)&&(o=i.state,"onchange"in i&&(i.onchange=function(){new r["default"]("[IND]CorePermissions: ").d(t+" permission state has changed from "+o+" to "+i.state).writeLog(),o=i.state,n&&n({name:t,state:i.state});}));case 2:return e.a(2);}},e,this);})),function(t,n){return e.apply(this,arguments);})}]);// removed by dead control flow
276
+ var e,t,n,i;}();t["default"]=h;},170:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.CryptoUtils=void 0;var i=n(225),r=o(n(291));function o(e){return e&&e.__esModule?e:{"default":e};}function s(e){return s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},s(e);}function a(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var a=i&&i.prototype instanceof c?i:c,l=Object.create(a.prototype);return _u5(l,"_invoke",function(n,i,r){var o,a,u,c=0,l=r||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,n){return o=t,a=0,u=e,h.n=n,s;}};function d(n,i){for(a=n,u=i,t=0;!f&&c&&!r&&t<l.length;t++){var r,o=l[t],d=h.p,E=o[2];n>3?(r=E===i)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=d&&((r=n<2&&d<o[1])?(a=0,h.v=i,h.n=o[1]):d<E&&(r=n<3||o[0]>i||i>E)&&(o[4]=n,o[5]=i,h.n=E,a=0));}if(r||n>1)return s;throw f=!0,i;}return function(r,l,E){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,E),a=l,u=E;(t=a<2?e:u)||!f;){o||(a?a<3?(a>1&&(h.n=-1),d(a,u)):h.n=u:h.v=u);try{if(c=2,o){if(a||(r="next"),t=o[r]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0);}else 1===a&&(t=o["return"])&&t.call(o),a<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),a=1);o=e;}else if((t=(f=h.n<0)?u:n.call(i,h))!==s)break;}catch(t){o=e,a=1,u=t;}finally{c=1;}}return{value:t,done:f};};}(n,r,o),!0),l;}var s={};function c(){}function l(){}function f(){}t=Object.getPrototypeOf;var h=[][i]?t(t([][i]())):(_u5(t={},i,function(){return this;}),t),d=f.prototype=c.prototype=Object.create(h);function E(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,_u5(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e;}return l.prototype=f,_u5(d,"constructor",f),_u5(f,"constructor",l),l.displayName="GeneratorFunction",_u5(f,r,"GeneratorFunction"),_u5(d),_u5(d,r,"Generator"),_u5(d,i,function(){return this;}),_u5(d,"toString",function(){return"[object Generator]";}),(a=function a(){return{w:o,m:E};})();}function _u5(e,t,n,i){var r=Object.defineProperty;try{r({},"",{});}catch(e){r=0;}_u5=function u(e,t,n,i){function o(t,n){_u5(e,t,function(e){return this._invoke(t,n,e);});}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(o("next",0),o("throw",1),o("return",2));},_u5(e,t,n,i);}function c(e,t,n,i,r,o,s){try{var a=e[o](s),u=a.value;}catch(e){return void n(e);}a.done?t(u):Promise.resolve(u).then(i,r);}function l(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,f(i.key),i);}}function f(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==s(t)?t:t+"";}var h=new(o(n(254))["default"])("[IND]Crypto"),d=new TextEncoder("utf-8"),E="HMAC",p=t.CryptoUtils=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},t=[{key:"createHmac",value:(n=a().m(function e(t,n){var o,s,u,c,l,f,p;return a().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,o=n,!0!==new r["default"]().isAvoidCypher()&&new r["default"]().getEncryptionType()!==i.EncryptionType.RAW){e.n=1;break;}return e.a(2,n);case 1:if(new r["default"]().getEncryptionType()!==i.EncryptionType.HASH){e.n=5;break;}if(u=null===(s=window)||void 0===s||null===(s=s.crypto)||void 0===s?void 0:s.subtle){e.n=2;break;}return e.a(2);case 2:return e.n=3,u.importKey("raw",d.encode(t),{name:E,hash:{name:"SHA-256"}},!1,["sign","verify"]);case 3:return c=e.v,e.n=4,u.sign(E,c,d.encode(n));case 4:l=e.v,f=new Uint8Array(l),o=Array.prototype.map.call(f,function(e){return("00"+e.toString(16)).slice(-2);}).join(""),h.d("hmac: ",o).writeLog();case 5:return e.a(2,o);case 6:return e.p=6,p=e.v,h.e("error:",p).writeLog(),e.a(2);}},e,null,[[0,6]]);}),o=function o(){var e=this,t=arguments;return new Promise(function(i,r){var o=n.apply(e,t);function s(e){c(o,i,r,s,a,"next",e);}function a(e){c(o,i,r,s,a,"throw",e);}s(void 0);});},function(e,t){return o.apply(this,arguments);})}],t&&l(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
277
+ var e,t,n,o;}();t["default"]=p;},497:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0;}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function o(){};return{s:o,n:function n(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]};},e:function e(_e80){throw _e80;},f:o};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var s,a=!0,u=!1;return{s:function s(){n=n.call(e);},n:function(_n46){function n(){return _n46.apply(this,arguments);}n.toString=function(){return _n46.toString();};return n;}(function(){var e=n.next();return a=e.done,e;}),e:function e(_e81){u=!0,s=_e81;},f:function f(){try{a||null==n["return"]||n["return"]();}finally{if(u)throw s;}}};}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i;}function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,a(i.key),i);}}function s(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;}function a(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var u=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},t=[{key:"normalizeDateString",value:function value(e){if("number"==typeof e||e instanceof Date){var t=new Date(e);return isNaN(t.getTime())?null:this.formatCanonicalUTC(t);}if(!e||"string"!=typeof e)return null;var n=e.trim();if(this.isCanonicalFormat(n))return n;var i=this.tryToParseLeniently(n);return i?this.formatCanonicalUTC(i):null;}},{key:"isCanonicalFormat",value:function value(e){return /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(e);}},{key:"tryToParseLeniently",value:function value(e){var t,n=i(this.LENIENT_DATE_FORMATS);try{for(n.s();!(t=n.n()).done;){var r=t.value,o=this.parseByFormat(e,r);if(o&&!isNaN(o.getTime()))return o;}}catch(e){n.e(e);}finally{n.f();}return null;}},{key:"parseByFormat",value:function value(e,t){switch(t){case"yyyy-MM-dd'T'HH:mm:ss.SSSZ":return new Date(e);case"yyyy-MM-dd'T'HH:mm:ssZ":return e.endsWith("Z")?new Date(e):new Date(e.replaceAll(/([+-]\d{2})(\d{2})$/g,"$1:$2"));case"yyyy-MM-dd'T'HH:mm:ss":return new Date(e+"Z");case"yyyy-MM-dd HH:mm:ss":return new Date(e.replaceAll(" ","T")+"Z");case"yyyy-MM-dd":return new Date(e+"T00:00:00Z");default:return null;}}},{key:"formatCanonicalUTC",value:function value(e){return e.toISOString();}}],t&&o(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
278
+ var e,t;}();s(u,"DATE_FORMAT_PATTERN","yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"),s(u,"LENIENT_DATE_FORMATS",["yyyy-MM-dd'T'HH:mm:ss.SSSZ","yyyy-MM-dd'T'HH:mm:ssZ","yyyy-MM-dd'T'HH:mm:ss","yyyy-MM-dd HH:mm:ss","yyyy-MM-dd"]),t["default"]=u;},457:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=o(n(735)),r=o(n(234));function o(e){return e&&e.__esModule?e:{"default":e};}function s(e){return s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},s(e);}function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,u(i.key),i);}}function u(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==s(t)?t:t+"";}var c=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},(t=[{key:"showError",value:function value(e,t,n){if(null!=e){var o=Object.values(e.ErrorCode).indexOf(t);if(o>=0){var s={code:Object.keys(e.ErrorCode)[o],errorId:Object.values(e.ErrorCode)[o]};return new r["default"](s,Object.values(e.ErrorMessage)[o],n);}return new r["default"](i["default"].ErrorCode.GENERAL_ERROR,"general error",n);}}}])&&a(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
279
+ var e,t;}();t["default"]=new c();},325:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i);}}function r(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},t=[{key:"compareJSON",value:function value(e,t){var i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(var o=0,s=i;o<s.length;o++){var a=s[o];if(e[a]!==t[a]){if("object"!=n(e[a])||"object"!=n(t[a]))return!1;if(!isEqual(e[a],t[a]))return!1;}}return!0;}}],t&&i(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
280
+ var e,t;}();t["default"]=o;},254:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=o(n(291)),r=o(n(630));function o(e){return e&&e.__esModule?e:{"default":e};}function s(e){return s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},s(e);}function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,u(i.key),i);}}function u(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==s(t)?t:t+"";}var c=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.tag="[IND]",t&&(this.tag=t),this.level=r["default"].INFO,this.setLogLevel(new i["default"]().getLogLevel()),this.log=[];}return t=e,n=[{key:"setLogLevel",value:function value(e){e&&e>=r["default"].DEBUG&&e<=r["default"].ERROR&&(this.level=e);}},{key:"d",value:function value(){if(this.level<=r["default"].DEBUG)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"i",value:function value(){if(this.level<=r["default"].INFO)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"w",value:function value(){if(this.level<=r["default"].WARNING)for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"e",value:function value(){if(this.level<=r["default"].ERROR)if(1==arguments.length&&arguments.errorCode)this.log+="".concat(error.errorCode,": ").concat(error.errorMessage);else for(var t=0;t<arguments.length;t++)this.log+=e.addedAsString(arguments[t]);return this;}},{key:"writeLog",value:function value(){this.log.length>0&&this.tag&&this.log&&console.log(this.tag,this.log),this.log=[];}}],o=[{key:"addedAsString",value:function value(e){return"string"==typeof e?e:JSON.stringify(e,null,2);}}],n&&a(t.prototype,n),o&&a(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;// removed by dead control flow
281
+ var t,n,o;}();t["default"]=c;},630:function _(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=t.LogLevel=void 0;var n=t.LogLevel=Object.freeze({DEBUG:1,INFO:2,WARNING:3,ERROR:4});t["default"]=n;},662:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i);}}function r(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},t=[{key:"setTopicChannel",value:function value(e,t){for(var n=[],i=0;i<e.length;i++){var r=e[i];r.channel=t,n.push(r);}return n;}}],t&&i(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
282
+ var e,t;}();t["default"]=o;},332:function _(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},n(e);}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i);}}function r(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return String(e);}(e);return"symbol"==n(t)?t:t+"";}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);},t=[{key:"isValidFormat",value:function value(e){return null!=e&&""!=e&&"null"!=e&&e.length>8;}}],t&&i(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;// removed by dead control flow
283
+ var e,t;}();t["default"]=o;},628:function _(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CommonUtils",{enumerable:!0,get:function get(){return i["default"];}}),Object.defineProperty(t,"CorePermissions",{enumerable:!0,get:function get(){return r["default"];}}),Object.defineProperty(t,"CryptoUtils",{enumerable:!0,get:function get(){return o["default"];}}),Object.defineProperty(t,"DateUtils",{enumerable:!0,get:function get(){return h["default"];}}),Object.defineProperty(t,"ErrorUtils",{enumerable:!0,get:function get(){return s["default"];}}),Object.defineProperty(t,"JsonUtils",{enumerable:!0,get:function get(){return a["default"];}}),Object.defineProperty(t,"Log",{enumerable:!0,get:function get(){return u["default"];}}),Object.defineProperty(t,"LogLevel",{enumerable:!0,get:function get(){return c.LogLevel;}}),Object.defineProperty(t,"TopicUtils",{enumerable:!0,get:function get(){return f["default"];}}),Object.defineProperty(t,"Validations",{enumerable:!0,get:function get(){return l["default"];}});var i=d(n(622)),r=d(n(429)),o=d(n(170)),s=d(n(457)),a=d(n(325)),u=d(n(254)),c=n(630),l=d(n(332)),f=d(n(662)),h=d(n(497));function d(e){return e&&e.__esModule?e:{"default":e};}},904:function _(e){"use strict";e.exports=JSON.parse('{"_from":"indigitall-web-core@4.16.6","_id":"indigitall-web-core@4.16.6","_inBundle":false,"_integrity":"sha512-045LGrA/PpWZIGvHBx0xkXDeksNgYV7dHmOMMC8Ij91HirZRH7l7yOLaSFQTbFC1l5vAIJxdPNRqvwDUTGjvCQ==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.16.6","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.16.6","saveSpec":null,"fetchSpec":"4.16.6"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.16.6.tgz","_shasum":"76f7bf9db6a6a2777bf5e32fa1c8a0ed4e033ef9","_spec":"indigitall-web-core@4.16.6","_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.16.6"}');}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports;}n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]});},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t);},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0});};var i={};return function(){"use strict";n.r(i),n.d(i,{"default":function _default(){return L;}});var e=n(315).Core.Repository,t=new(/*#__PURE__*/function(_e82){function _class30(){var _this68;_classCallCheck2(this,_class30);_this68=_callSuper2(this,_class30),_this68.AUTH_TOKEN=_this68.REPOSITORY+".AUTH_TOKEN",_this68.INBOX_AUTH_MODE=_this68.REPOSITORY+".INBOX_AUTH_MODE",_this68.URL_INBOX_API=_this68.REPOSITORY+".URL_INBOX_API";return _this68;}_inherits2(_class30,_e82);return _createClass2(_class30,[{key:"setDeviceId",value:function(){var _setDeviceId0=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee315(e){return _regenerator2().w(function(_context315){while(1)switch(_context315.n){case 0:this.setStorage(this.DEVICE_ID,e);case 1:return _context315.a(2);}},_callee315,this);}));function setDeviceId(_x493){return _setDeviceId0.apply(this,arguments);}return setDeviceId;}()},{key:"getDeviceId",value:function getDeviceId(){return this.getStorage(this.DEVICE_ID);}},{key:"setAuthToken",value:function setAuthToken(e){this.setStorage(this.AUTH_TOKEN,e);}},{key:"getAuthToken",value:function getAuthToken(){return this.getStorage(this.AUTH_TOKEN);}},{key:"setInboxAuthMode",value:function setInboxAuthMode(e){this.setStorage(this.INBOX_AUTH_MODE,e);}},{key:"getInboxAuthMode",value:function getInboxAuthMode(){return this.getStorage(this.INBOX_AUTH_MODE);}},{key:"getUrlInboxApi",value:function(){var _getUrlInboxApi2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee316(){return _regenerator2().w(function(_context316){while(1)switch(_context316.n){case 0:return _context316.a(2,this.getStorage(this.URL_INBOX_API));}},_callee316,this);}));function getUrlInboxApi(){return _getUrlInboxApi2.apply(this,arguments);}return getUrlInboxApi;}()},{key:"setUrlInboxApi",value:function(){var _setUrlInboxApi2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee317(e){return _regenerator2().w(function(_context317){while(1)switch(_context317.n){case 0:this.setStorage(this.URL_INBOX_API,e);case 1:return _context317.a(2);}},_callee317,this);}));function setUrlInboxApi(_x494){return _setUrlInboxApi2.apply(this,arguments);}return setUrlInboxApi;}()}]);}(e))();var r=/*#__PURE__*/_createClass2(function r(e,t){_classCallCheck2(this,r);e&&(e.id&&(this.id=e.id),e.externalId&&(this.externalId=e.externalId),e.sentAt&&(this.sentAt=e.sentAt),e.status&&(this.status=e.status),e.sendingId&&(this.sendingId=e.sendingId),e.message&&(this.message=e.message),e.campaignId&&(this.campaignId=e.campaignId),this.read=!1,this.sentAt&&t&&this.sentAt<t&&(this.read=!0));});window.inboxNotification=r;var o=r,s=n(315).Core.Api.BaseClient,a=n(315).Core.Config,u=n(315).Core.Models.ErrorModel,c=n(315).Core.Utils.CommonUtils,l=new(/*#__PURE__*/function(_s12){function _class31(){var _this69;_classCallCheck2(this,_class31);_this69=_callSuper2(this,_class31),_this69.URL_BASE=a.client.INBOX_URL_BASE,_this69.ENDPOINT_INBOX_NOTIFICATIONS="/notification",_this69.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID=_this69.ENDPOINT_INBOX_NOTIFICATIONS+"/{sendingId}",_this69.ENDPOINT_INBOX_COUNTER="/counters",_this69.ENDPOINT_INBOX_AUTH="/auth/webhook";return _this69;}_inherits2(_class31,_s12);return _createClass2(_class31,[{key:"getURL",value:function(){var _getURL1=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee318(){var _t253;return _regenerator2().w(function(_context318){while(1)switch(_context318.n){case 0:_context318.n=1;return t.getUrlInboxApi();case 1:_t253=_context318.v;if(_t253){_context318.n=2;break;}_t253=this.URL_BASE;case 2:return _context318.a(2,_t253);}},_callee318,this);}));function getURL(){return _getURL1.apply(this,arguments);}return getURL;}()},{key:"postInboxAuth",value:function(){var _postInboxAuth2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee319(e,n,i){var r,_e83;return _regenerator2().w(function(_context319){while(1)switch(_context319.n){case 0:_context319.n=1;return this.post(this.ENDPOINT_INBOX_AUTH,e.postInboxAuth());case 1:r=_context319.v;if(!r||r instanceof u||!r.data)r?c.isFunction(i)&&i(r):c.isFunction(i)&&i();else{_e83=r.data.token;t.setAuthToken(_e83),c.isFunction(n)&&n(r);}return _context319.a(2,!0);}},_callee319,this);}));function postInboxAuth(_x495,_x496,_x497){return _postInboxAuth2.apply(this,arguments);}return postInboxAuth;}()},{key:"getInbox",value:function(){var _getInbox2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee320(e,t,n){var i;return _regenerator2().w(function(_context320){while(1)switch(_context320.n){case 0:_context320.n=1;return this.get(this.ENDPOINT_INBOX_NOTIFICATIONS,e.getInboxPushRequest());case 1:i=_context320.v;return _context320.a(2,(this.getInboxResponseStatus(i,t,n),!0));}},_callee320,this);}));function getInbox(_x498,_x499,_x500){return _getInbox2.apply(this,arguments);}return getInbox;}()},{key:"putInboxPush",value:function(){var _putInboxPush2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee321(e,t,n){var i;return _regenerator2().w(function(_context321){while(1)switch(_context321.n){case 0:_context321.n=1;return this.put(this.ENDPOINT_INBOX_NOTIFICATIONS,e.putInboxPushRequest());case 1:i=_context321.v;return _context321.a(2,(this.getInboxResponseEdit(i,t,n),!0));}},_callee321,this);}));function putInboxPush(_x501,_x502,_x503){return _putInboxPush2.apply(this,arguments);}return putInboxPush;}()},{key:"getInboxPushWithSendingId",value:function(){var _getInboxPushWithSendingId2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee322(e,t,n,i){var r;return _regenerator2().w(function(_context322){while(1)switch(_context322.n){case 0:_context322.n=1;return this.get(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,e.getInboxPushRequestWithSendingId());case 1:r=_context322.v;return _context322.a(2,(this.getNotificationResponseStatus(r,t,n,i),!0));}},_callee322,this);}));function getInboxPushWithSendingId(_x504,_x505,_x506,_x507){return _getInboxPushWithSendingId2.apply(this,arguments);}return getInboxPushWithSendingId;}()},{key:"putInboxPushWithSendingId",value:function(){var _putInboxPushWithSendingId2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee323(e,t,n,i){var r;return _regenerator2().w(function(_context323){while(1)switch(_context323.n){case 0:_context323.n=1;return this.put(this.ENDPOINT_INBOX_NOTIFICATIONS_WITH_SENDINGID,e.putInboxWithSendingId());case 1:r=_context323.v;return _context323.a(2,(this.getNotificationResponseStatus(r,t,n,i),!0));}},_callee323,this);}));function putInboxPushWithSendingId(_x508,_x509,_x510,_x511){return _putInboxPushWithSendingId2.apply(this,arguments);}return putInboxPushWithSendingId;}()},{key:"getInboxCounter",value:function(){var _getInboxCounter2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee324(e,t,n){var i;return _regenerator2().w(function(_context324){while(1)switch(_context324.n){case 0:_context324.n=1;return this.get(this.ENDPOINT_INBOX_COUNTER,e.getCounter());case 1:i=_context324.v;this.getCounterStatus(i,t,n);case 2:return _context324.a(2);}},_callee324,this);}));function getInboxCounter(_x512,_x513,_x514){return _getInboxCounter2.apply(this,arguments);}return getInboxCounter;}()},{key:"getInboxResponseStatus",value:function(){var _getInboxResponseStatus2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee325(e,t,n){var _n47;return _regenerator2().w(function(_context325){while(1)switch(_context325.n){case 0:if(e&&!(e instanceof u)&&e.statusCode>=200&&e.statusCode<300){_n47=new L(e.data);c.isFunction(t)&&t(_n47);}else e?c.isFunction(n)&&n(e):c.isFunction(n)&&n();case 1:return _context325.a(2);}},_callee325);}));function getInboxResponseStatus(_x515,_x516,_x517){return _getInboxResponseStatus2.apply(this,arguments);}return getInboxResponseStatus;}()},{key:"getInboxResponseEdit",value:function(){var _getInboxResponseEdit2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee326(e,t,n){return _regenerator2().w(function(_context326){while(1)switch(_context326.n){case 0:e&&!(e instanceof u)&&e.statusCode>=200&&e.statusCode<300?c.isFunction(t)&&t():e?c.isFunction(n)&&n(e):c.isFunction(n)&&n();case 1:return _context326.a(2);}},_callee326);}));function getInboxResponseEdit(_x518,_x519,_x520){return _getInboxResponseEdit2.apply(this,arguments);}return getInboxResponseEdit;}()},{key:"getNotifications",value:function getNotifications(e,t){var n=[];for(var _i59=0;_i59<e.length;_i59++){var r=new o(e[_i59],t);n.push(r);}return n;}},{key:"getNotificationResponseStatus",value:function(){var _getNotificationResponseStatus2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee327(e,t,n,i){var _i60;return _regenerator2().w(function(_context327){while(1)switch(_context327.n){case 0:if(e&&!(e instanceof u)&&e.statusCode>=200&&e.statusCode<300){_i60=new o(e.data,t);c.isFunction(n)&&n(_i60);}else e?c.isFunction(i)&&i(e):c.isFunction(i)&&i();case 1:return _context327.a(2);}},_callee327);}));function getNotificationResponseStatus(_x521,_x522,_x523,_x524){return _getNotificationResponseStatus2.apply(this,arguments);}return getNotificationResponseStatus;}()},{key:"getCounterStatus",value:function(){var _getCounterStatus2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee328(e,t,n){var _n48;return _regenerator2().w(function(_context328){while(1)switch(_context328.n){case 0:if(e&&!(e instanceof u)&&e.statusCode>=200&&e.statusCode<300){_n48={click:e.data.click,sent:e.data.sent,deleted:e.data.deleted,unread:this.getUnreadCounters(e.data.unread)};c.isFunction(t)&&t(_n48);}else e?c.isFunction(n)&&n(e):c.isFunction(n)&&n();case 1:return _context328.a(2);}},_callee328,this);}));function getCounterStatus(_x525,_x526,_x527){return _getCounterStatus2.apply(this,arguments);}return getCounterStatus;}()},{key:"getUnreadCounters",value:function getUnreadCounters(e){return{count:e.count,lastAccess:e.lastAccess};}}]);}(s))(),f=n(315).Core.Api.BaseRequest,h=/*#__PURE__*/function(_f6){function h(){_classCallCheck2(this,h);return _callSuper2(this,h);}_inherits2(h,_f6);return _createClass2(h,[{key:"postInboxAuth",value:function postInboxAuth(){return this.body=this.json,this;}},{key:"setJson",value:function setJson(e){this.json=e;}},{key:"addHeaders",value:function addHeaders(){var _this70=this;var e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach(function(t){e.append(t,_this70.headers[t]);}),e;}}]);}(f),d=Object.freeze({SENT:"sent",CLICK:"click",DELETED:"deleted"});window.inboxStatus=d;var E=d,p=Object.freeze({NONE:"none",DEFAULT:"default",WEBHOOK:"webhook"}),y=n(315).Core.Api.BaseRequest,I=n(315).Core.Models.EncryptionType,g=/*#__PURE__*/function(_y4){function g(){var _this71;_classCallCheck2(this,g);_this71=_callSuper2(this,g),_this71.externalId=null,_this71.headers={},t.getExternalId()&&(_this71.externalId=t.getExternalId(),!0!==t.isAvoidCypher()&&t.getEncryptionType()!=I.RAW||(_this71.externalId=encodeURIComponent(t.getExternalId()))),null!=t.getAuthToken()&&t.getInboxAuthMode()==p.WEBHOOK&&(_this71.headers.Authorization="Bearer "+t.getAuthToken()),_this71.sendingId="",_this71.sendingIds=null,_this71.page=0,_this71.pageSize=0,_this71.dateFrom="",_this71.dateTo="",_this71.status=E.INBOXSTATUS_SENT,_this71.initialStatus=E.INBOXSTATUS_SENT,_this71.statusList=null;return _this71;}_inherits2(g,_y4);return _createClass2(g,[{key:"getInboxPushRequest",value:function getInboxPushRequest(){return this.params=this.createQueryString(),this;}},{key:"putInboxPushRequest",value:function putInboxPushRequest(){return this.params=this.createQueryStringExternalId(),this.body=this.createBodyJson(),this;}},{key:"getInboxPushRequestWithSendingId",value:function getInboxPushRequestWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this;}},{key:"putInboxWithSendingId",value:function putInboxWithSendingId(){return this.pathParams["{sendingId}"]=this.sendingId,this.params=this.createQueryStringExternalId(),this.body=this.createBodyStatusJson(),this;}},{key:"addHeaders",value:function addHeaders(){var _this72=this;var e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach(function(t){e.append(t,_this72.headers[t]);}),e;}},{key:"createQueryString",value:function createQueryString(){var e="";if(this.page&&(e+=this.PARAM_INBOX_PAGE+"="+this.page+"&"),this.pageSize&&(e+=this.PARAM_INBOX_PAGE_SIZE+"="+this.pageSize+"&"),this.dateFrom&&(e+=this.PARAM_INBOX_DATE_FROM+"="+this.dateFrom+"&"),this.dateTo&&(e+=this.PARAM_INBOX_DATE_TO+"="+this.dateTo+"&"),this.statusList){var _t254="";for(var _e84=0;_e84<this.statusList.length;_e84++)_t254+=this.statusList[_e84],_e84!=this.statusList.length-1&&(_t254+=",");e+=this.PARAM_INBOX_STATUS+"="+_t254+"&";}return e+this.createQueryStringExternalId();}},{key:"createQueryStringExternalId",value:function createQueryStringExternalId(){return this.PARAM_EXTERNAL_ID+"="+this.externalId;}},{key:"createBodyJson",value:function createBodyJson(){var e={};var t=[];try{if(e=this.createBodyStatusJson(),null!=this.sendingIds){for(var _e85=0;_e85<this.sendingIds.length;_e85++)t.push(this.sendingIds[_e85]);e.sendingIds=t;}}catch(e){console.log("Error Inbox request :"+e);}return e;}},{key:"createBodyStatusJson",value:function createBodyStatusJson(){var e={};return this.status&&(e.status=this.status),this.initialStatus&&(e.initialStatus=this.initialStatus),e;}},{key:"setSendingId",value:function setSendingId(e){this.sendingId=e;}},{key:"setSendingIds",value:function setSendingIds(e){this.sendingIds=e;}},{key:"setPage",value:function setPage(e){this.page=e;}},{key:"setPageSize",value:function setPageSize(e){this.pageSize=e;}},{key:"setDateFrom",value:function setDateFrom(e){this.dateFrom=e;}},{key:"setDateTo",value:function setDateTo(e){this.dateTo=e;}},{key:"setStatus",value:function setStatus(e){this.status=e;}},{key:"setInitialStatus",value:function setInitialStatus(e){this.initialStatus=e;}},{key:"setStatusList",value:function setStatusList(e){this.statusList=e;}}]);}(y),_=n(315).Core.Api.BaseRequest,m=n(315).Core.Models.EncryptionType,v=/*#__PURE__*/function(_ref6){function v(){var _this73;_classCallCheck2(this,v);_this73=_callSuper2(this,v),_this73.externalId=null,_this73.headers={},t.getExternalId()&&(_this73.externalId=t.getExternalId(),!0!==t.isAvoidCypher()&&t.getEncryptionType()!=m.RAW||(_this73.externalId=encodeURIComponent(t.getExternalId()))),null!=t.getAuthToken()&&t.getInboxAuthMode()==p.WEBHOOK&&(_this73.headers.Authorization="Bearer "+t.getAuthToken());return _this73;}_inherits2(v,_ref6);return _createClass2(v,[{key:"getCounter",value:function getCounter(){return this.params=this.createQueryStringExternalId(),this;}},{key:"addHeaders",value:function addHeaders(){var _this74=this;var e=new Headers({"Content-Type":"application/json"});return Object.keys(this.headers).forEach(function(t){e.append(t,_this74.headers[t]);}),e;}},{key:"createQueryStringExternalId",value:function createQueryStringExternalId(){return this.PARAM_EXTERNAL_ID+"="+this.externalId;}}]);}(_),S=n(315).Core.Models.ErrorDictionary,T=S.ErrorCode;Object.assign(T,{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});var b=S.ErrorMessage;Object.assign(b,{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"});var P={ErrorCode:T,ErrorMessage:b},_n$Core$Utils9=n(315).Core.Utils,O=_n$Core$Utils9.Validations,R=_n$Core$Utils9.Log,A=/*#__PURE__*/function(_O){function A(){_classCallCheck2(this,A);return _callSuper2(this,A,arguments);}_inherits2(A,_O);return _createClass2(A,null,[{key:"isAppKeyFormat",value:function isAppKeyFormat(){var e=t.getAppKey();return null!=e&&""!=e&&"null"!=e&&e.length>3;}},{key:"isValidFormatRequest",value:function isValidFormatRequest(){var e=new R("[IND]InboxValidations: "),n=t.getDeviceId();var i=!0;return this.isAppKeyFormat()||(i=!1,e.w("appKey is null or empty").writeLog()),this.isValidFormat(n)||(i=!1,e.w("deviceId is null or empty").writeLog()),i;}}]);}(O),_n$Core$Utils0=n(315).Core.Utils,N=_n$Core$Utils0.CommonUtils,w=_n$Core$Utils0.ErrorUtils,C=_n$Core$Utils0.Log;var D=/*#__PURE__*/function(){function D(e){_classCallCheck2(this,D);if(e){if(e.lastAccess&&(this.lastAccess=e.lastAccess),e.numPage?this.page=e.numPage:this.page=0,e.pageSize&&(this.pageSize=e.pageSize),this.count=0,e.count&&(this.count=e.count),e.notifications){this.notifications=[];var _t255=e.notifications;for(var _e86=0;_e86<_t255.length;_e86++){var _n49=new o(_t255[_e86],this.lastAccess);this.notifications.push(_n49);}}this.totalPages=Math.trunc(this.count/this.pageSize);}this.dateFrom=null,this.dateTo=null,this.statusList=null,this.newNotifications=[o],this.isRequestingPage=!1;}return _createClass2(D,[{key:"getNextPage",value:function getNextPage(e,n){var _this75=this;var i=new C("[IND]Inbox: ");if(this.isRequestingPage)i.w(P.ErrorMessage.INBOX_IS_REQUESTING_PAGE).writeLog();else if(this.isRequestingPage=!0,this.page+1<this.totalPages){if(A.isValidFormatRequest()){if(A.isValidFormat(t.getExternalId())){var _t256=new g();(this.page||0==this.page)&&_t256.setPage(this.page+1),this.pageSize&&_t256.setPageSize(this.pageSize),this.dateFrom&&_t256.setDateFrom(this.dateFrom),this.dateTo&&_t256.setDateTo(this.dateTo),this.statusList&&_t256.setStatusList(this.statusList),l.getInbox(_t256,function(t){_this75.notifications=_this75.notifications.concat(t.notifications),_this75.newNotifications=t.notifications,_this75.lastAccess=t.lastAccess,_this75.count=t.count,_this75.page=t.page,_this75.pageSize=t.pageSize,_this75.totalPages=t.totalPages,_this75.isRequestingPage=!1,N.isFunction(e)&&e(_this75,_this75.newNotifications);},function(n){401===n.errorCode?_this75.generateAuthToken(function(){l.getInbox(_t256,function(t){_this75.notifications=_this75.notifications.concat(t.notifications),_this75.newNotifications=t.notifications,_this75.lastAccess=t.lastAccess,_this75.count=t.count,_this75.page=t.page,_this75.pageSize=t.pageSize,_this75.totalPages=t.totalPages,_this75.isRequestingPage=!1,N.isFunction(e)&&e(_this75,_this75.newNotifications);},n);},n):(_this75.isRequestingPage=!1,N.isFunction(n)&&n());});}else this.isRequestingPage=!1,N.isFunction(n)&&n(w.showError(P,P.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));}else N.isFunction(n)&&n(w.showError(P,P.ErrorCode.GENERAL_ERROR_BAD_REQUEST));}else this.isRequestingPage=!1,N.isFunction(n)&&n(w.showError(P,P.ErrorCode.INBOX_NO_MESSAGES));}},{key:"massiveEditNotifications",value:function massiveEditNotifications(e,t,n,i){var r=E.SENT;t==E.CLICK&&(r=E.SENT),t==E.DELETED&&(r=E.CLICK),this.massiveEditNotifications(e,r,t,n,i);}},{key:"massiveEditNotificationsWithInitialStatus",value:function massiveEditNotificationsWithInitialStatus(e,n,i,r,o){var _this76=this;if(A.isValidFormatRequest()){if(A.isValidFormat(t.getExternalId())){if(i){var _t257=new g();null!=e&&_t257.setSendingIds(e),_t257.setStatus(i),_t257.setInitialStatus(n),l.putInboxPush(_t257,r,function(e){401===e.errorCode?_this76.generateAuthToken(function(){l.putInboxPush(_t257,r,e);},e):N.isFunction(e)&&e(e);});}}else N.isFunction(o)&&o(w.showError(P,P.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));}else N.isFunction(o)&&o(w.showError(P,P.ErrorCode.BAD_REQUEST_SERVER_ERROR));}},{key:"getInfoFromNotification",value:function getInfoFromNotification(e,n,i){var _this77=this;if(A.isValidFormatRequest()){if(A.isValidFormat(t.getExternalId())){if(e){var _t258=new g();_t258.setSendingId(e),l.getInboxPushWithSendingId(_t258,this.lastAccess,n,function(e){401===e.errorCode?_this77.generateAuthToken(function(){l.getInboxPushWithSendingId(_t258,_this77.lastAccess,n,e);},e):N.isFunction(e)&&e(e);});}}else N.isFunction(i)&&i(w.showError(P,P.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));}else N.isFunction(i)&&i(w.showError(P,P.ErrorCode.BAD_REQUEST_SERVER_ERROR));}},{key:"modifyStatusFromNotification",value:function modifyStatusFromNotification(e,n,i,r){var _this78=this;if(A.isValidFormatRequest()){if(A.isValidFormat(t.getExternalId())){if(e&&n){var _t259=new g();_t259.setSendingId(e),_t259.setStatus(n),l.putInboxPushWithSendingId(_t259,this.lastAccess,i,function(e){401===e.errorCode?_this78.generateAuthToken(function(){l.putInboxPushWithSendingId(_t259,_this78.lastAccess,i,e);},e):N.isFunction(e)&&e(e);});}}else N.isFunction(r)&&r(w.showError(P,P.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));}else N.isFunction(r)&&r(w.showError(P,P.ErrorCode.BAD_REQUEST_SERVER_ERROR));}}],[{key:"generateAuthToken",value:function generateAuthToken(e,t){var n={};navigator.indigitallGetAuthConfig&&N.isFunction(navigator.indigitallGetAuthConfig)&&(n=navigator.indigitallGetAuthConfig());var i=new h();i.setJson(n),l.postInboxAuth(i,e,t);}},{key:"getMessagesCountWithAuth",value:function getMessagesCountWithAuth(e,t,n){N.isFunction(e.getAuthConfig)&&(navigator.indigitallGetAuthConfig=e.getAuthConfig),D.getMessagesCount(t,n);}},{key:"setUrlInboxApi",value:function setUrlInboxApi(e){t.setUrlInboxApi(e);}},{key:"setInboxAuthMode",value:function setInboxAuthMode(e){t.setInboxAuthMode(e);}},{key:"getMessagesCount",value:function getMessagesCount(e,n){var _this79=this;if(A.isValidFormatRequest()){if(A.isValidFormat(t.getExternalId())){var _t260=new v();l.getInboxCounter(_t260,e,function(n){401===n.errorCode?_this79.generateAuthToken(function(){l.getInboxCounter(_t260,e,n);},n):N.isFunction(n)&&n(n);});}else N.isFunction(n)&&n(w.showError(P,P.ErrorCode.INBOX_GET_ERROR));}else N.isFunction(n)&&n(w.showError(P,P.ErrorCode.GENERAL_ERROR_BAD_REQUEST));}},{key:"getInboxWithAuth",value:function getInboxWithAuth(e,t,n){N.isFunction(e.getAuthConfig)&&(navigator.indigitallGetAuthConfig=e.getAuthConfig),D.getInbox(t,n);}},{key:"getInbox",value:function getInbox(e,t){D.getInboxWithPage(null,null,null,null,null,e,t);}},{key:"getInboxWithPageAuth",value:function getInboxWithPageAuth(e,t,n,i,r,o,s,a){N.isFunction(e.getAuthConfig)&&(navigator.indigitallGetAuthConfig=e.getAuthConfig),D.getInboxWithPage(t,n,i,r,o,s,a);}},{key:"getInboxWithPage",value:function getInboxWithPage(e,n,i,r,o,s,a){var _this80=this;if(A.isValidFormatRequest()){if(A.isValidFormat(t.getExternalId())){var _t261=new g();e&&_t261.setPage(e),n&&_t261.setPageSize(n),i&&(_t261.setDateFrom(i),this.dateFrom=i),r&&(_t261.setDateTo(r),this.dateTo=r),o&&(_t261.setStatusList(o),this.statusList=o),l.getInbox(_t261,function(e){_this80.totalPages=e.totalPages,0!==e.count?N.isFunction(s)&&s(e):N.isFunction(a)&&a(w.showError(P,P.ErrorCode.INBOX_GET_PAGE_ERROR));},function(e){401==e.errorCode?_this80.generateAuthToken(function(){l.getInbox(_t261,function(e){_this80.totalPages=e.totalPages,N.isFunction(s)&&s(e);},e);},e):N.isFunction(e)&&e(e);});}else N.isFunction(a)&&a(w.showError(P,P.ErrorCode.INBOX_EXTERNAL_ID_NO_REGISTERED));}else N.isFunction(a)&&a(w.showError(P,P.ErrorCode.GENERAL_ERROR_BAD_REQUEST));}}]);}();var L=D;}(),i;}();},e.exports=t();},824:function _(e,t,n){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e);},i(e);}Object.defineProperty(t,"__esModule",{value:!0});var r={};Object.defineProperty(t,"default",{enumerable:!0,get:function get(){return o["default"];}});var o=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap(),r=new WeakMap();return function(e,t){if(!t&&e&&e.__esModule)return e;var o,s,a={__proto__:null,"default":e};if(null===e||"object"!=i(e)&&"function"!=typeof e)return a;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,a);}for(var u in e)"default"!==u&&{}.hasOwnProperty.call(e,u)&&((s=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,u))&&(s.get||s.set)?o(a,u,s):a[u]=e[u]);return a;}(e,t);}(n(114));Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function get(){return o[e];}}));});},904:function _(e){"use strict";e.exports=JSON.parse('{"_from":"indigitall-web-core@4.16.6","_id":"indigitall-web-core@4.16.6","_inBundle":false,"_integrity":"sha512-045LGrA/PpWZIGvHBx0xkXDeksNgYV7dHmOMMC8Ij91HirZRH7l7yOLaSFQTbFC1l5vAIJxdPNRqvwDUTGjvCQ==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.16.6","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.16.6","saveSpec":null,"fetchSpec":"4.16.6"},"_requiredBy":["#USER","/","/indigitall-web-inbox"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.16.6.tgz","_shasum":"76f7bf9db6a6a2777bf5e32fa1c8a0ed4e033ef9","_spec":"indigitall-web-core@4.16.6","_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.16.6"}');}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports;}n.n=function(e){var t=e&&e.__esModule?function(){return e["default"];}:function(){return e;};return n.d(t,{a:t}),t;},n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]});},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t);},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0});};var i={};return function(){"use strict";n.r(i),n.d(i,{"default":function _default(){return Ie;}});var e=n(824),t=n.n(e);var r=n(315).Core.Repository;var o=new(/*#__PURE__*/function(_r35){function _class32(){var _this81;_classCallCheck2(this,_class32);_this81=_callSuper2(this,_class32),_this81.SAFARI_WEBSITE_PUSH_ID=_this81.REPOSITORY+".SAFARI_WEBSITE_PUSH_ID",_this81.PUSH_TOKEN=_this81.REPOSITORY+".PUSH_TOKEN",_this81.PERMISSION_PUSH=_this81.REPOSITORY+".PERMISSION_PUSH",_this81.DEVICE_JSON=_this81.REPOSITORY+".DEVICE_JSON",_this81.PUT_REQUEST_TIMESTAMP=_this81.REPOSITORY+".PUT_REQUEST_TIMESTAMP",_this81.WORKER_PATH=_this81.REPOSITORY+".WORKER_PATH",_this81.TEST=_this81.REPOSITORY+".TEST",_this81.SAFARI_GESTURE_REQUEST_PERMISSION=_this81.REPOSITORY+".SAFARI_GESTURE_REQUEST_PERMISSION",_this81.UPDATE_TOPIC_SUBSCRIBE=_this81.REPOSITORY+".UPDATE_TOPIC_SUBSCRIBE",_this81.TOPIC_SYNC_TIMESTAMP=_this81.REPOSITORY+".TOPIC_SYNC_TIMESTAMP",_this81.TOPIC_SEMAPHORE=_this81.REPOSITORY+".TOPIC_SEMAPHORE",_this81.TOPIC_SYNC_IS_PROCESSING=_this81.REPOSITORY+".TOPIC_SYNC_IS_PROCESSING";return _this81;}_inherits2(_class32,_r35);return _createClass2(_class32,[{key:"getDeviceIdSync",value:function(){var _getDeviceIdSync=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee329(){return _regenerator2().w(function(_context329){while(1)switch(_context329.n){case 0:if(!(this.db&&this.db.IDB)){_context329.n=2;break;}_context329.n=1;return this.db.getItem(this.DEVICE_ID);case 1:return _context329.a(2,_context329.v);case 2:return _context329.a(2);}},_callee329,this);}));function getDeviceIdSync(){return _getDeviceIdSync.apply(this,arguments);}return getDeviceIdSync;}()},{key:"setPushToken",value:function setPushToken(e){this.setStorage(this.PUSH_TOKEN,e);}},{key:"getPushToken",value:function getPushToken(){return this.getStorage(this.PUSH_TOKEN);}},{key:"setSafariWebsitePushId",value:function setSafariWebsitePushId(e){this.setStorage(this.SAFARI_WEBSITE_PUSH_ID,e);}},{key:"getSafariWebsitePushId",value:function getSafariWebsitePushId(){return this.getStorage(this.SAFARI_WEBSITE_PUSH_ID);}},{key:"setPermissionPush",value:function setPermissionPush(e){this.setStorage(this.PERMISSION_PUSH,e);}},{key:"getPermissionPush",value:function getPermissionPush(){return this.getStorage(this.PERMISSION_PUSH);}},{key:"getDeviceJson",value:function(){var _getDeviceJson=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee330(){return _regenerator2().w(function(_context330){while(1)switch(_context330.n){case 0:return _context330.a(2,this.getStorage(this.DEVICE_JSON));}},_callee330,this);}));function getDeviceJson(){return _getDeviceJson.apply(this,arguments);}return getDeviceJson;}()},{key:"setDeviceJson",value:function(){var _setDeviceJson=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee331(e){return _regenerator2().w(function(_context331){while(1)switch(_context331.n){case 0:this.setStorage(this.DEVICE_JSON,e);case 1:return _context331.a(2);}},_callee331,this);}));function setDeviceJson(_x528){return _setDeviceJson.apply(this,arguments);}return setDeviceJson;}()},{key:"getPutRequestTimestamp",value:function(){var _getPutRequestTimestamp=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee332(){return _regenerator2().w(function(_context332){while(1)switch(_context332.n){case 0:return _context332.a(2,this.getStorage(this.PUT_REQUEST_TIMESTAMP));}},_callee332,this);}));function getPutRequestTimestamp(){return _getPutRequestTimestamp.apply(this,arguments);}return getPutRequestTimestamp;}()},{key:"setPutRequestTimestamp",value:function(){var _setPutRequestTimestamp=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee333(e){return _regenerator2().w(function(_context333){while(1)switch(_context333.n){case 0:this.setStorage(this.PUT_REQUEST_TIMESTAMP,e);case 1:return _context333.a(2);}},_callee333,this);}));function setPutRequestTimestamp(_x529){return _setPutRequestTimestamp.apply(this,arguments);}return setPutRequestTimestamp;}()},{key:"setWorkerPath",value:function setWorkerPath(e){this.setStorage(this.WORKER_PATH,e);}},{key:"getWorkerPath",value:function getWorkerPath(){return this.getStorage(this.WORKER_PATH);}},{key:"setTestValue",value:function setTestValue(e){this.setStorage(this.TEST,e);}},{key:"getTestValue",value:function getTestValue(){return this.getStorage(this.TEST);}},{key:"setSafariGestureRequestPermission",value:function setSafariGestureRequestPermission(e){this.setStorage(this.SAFARI_GESTURE_REQUEST_PERMISSION,e);}},{key:"getSafariGestureRequestPermission",value:function getSafariGestureRequestPermission(){return this.getStorage(this.SAFARI_GESTURE_REQUEST_PERMISSION);}},{key:"setUpdateTopicSubscribe",value:function(){var _setUpdateTopicSubscribe=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee334(e){var _t262;return _regenerator2().w(function(_context334){while(1)switch(_context334.n){case 0:_t262=this.db&&this.db.IDB;if(!_t262){_context334.n=1;break;}_context334.n=1;return this.db.setItem(this.UPDATE_TOPIC_SUBSCRIBE,e);case 1:return _context334.a(2);}},_callee334,this);}));function setUpdateTopicSubscribe(_x530){return _setUpdateTopicSubscribe.apply(this,arguments);}return setUpdateTopicSubscribe;}()},{key:"getUpdateTopicSubscribe",value:function(){var _getUpdateTopicSubscribe=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee335(){var e,_t263,_t264;return _regenerator2().w(function(_context335){while(1)switch(_context335.p=_context335.n){case 0:_context335.p=0;_t263=this.db&&this.db.IDB;if(!_t263){_context335.n=2;break;}_context335.n=1;return this.db.getItem(this.UPDATE_TOPIC_SUBSCRIBE);case 1:e=_context335.v;case 2:_context335.n=4;break;case 3:_context335.p=3;_t264=_context335.v;case 4:return _context335.a(2,e);}},_callee335,this,[[0,3]]);}));function getUpdateTopicSubscribe(){return _getUpdateTopicSubscribe.apply(this,arguments);}return getUpdateTopicSubscribe;}()},{key:"setTopicSyncTimestamp",value:function(){var _setTopicSyncTimestamp=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee336(e){var _t265;return _regenerator2().w(function(_context336){while(1)switch(_context336.n){case 0:_t265=this.db&&this.db.IDB;if(!_t265){_context336.n=1;break;}_context336.n=1;return this.db.setItem(this.TOPIC_SYNC_TIMESTAMP,e);case 1:return _context336.a(2);}},_callee336,this);}));function setTopicSyncTimestamp(_x531){return _setTopicSyncTimestamp.apply(this,arguments);}return setTopicSyncTimestamp;}()},{key:"getTopicSyncTimestamp",value:function(){var _getTopicSyncTimestamp=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee337(){var e,_t266,_t267;return _regenerator2().w(function(_context337){while(1)switch(_context337.p=_context337.n){case 0:_context337.p=0;_t266=this.db&&this.db.IDB;if(!_t266){_context337.n=2;break;}_context337.n=1;return this.db.getItem(this.TOPIC_SYNC_TIMESTAMP);case 1:e=_context337.v;case 2:_context337.n=4;break;case 3:_context337.p=3;_t267=_context337.v;case 4:return _context337.a(2,e);}},_callee337,this,[[0,3]]);}));function getTopicSyncTimestamp(){return _getTopicSyncTimestamp.apply(this,arguments);}return getTopicSyncTimestamp;}()},{key:"setTopicSemaphore",value:function(){var _setTopicSemaphore=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee338(e){var _t268;return _regenerator2().w(function(_context338){while(1)switch(_context338.n){case 0:_t268=this.db&&this.db.IDB;if(!_t268){_context338.n=1;break;}_context338.n=1;return this.db.setItem(this.TOPIC_SEMAPHORE,e);case 1:return _context338.a(2);}},_callee338,this);}));function setTopicSemaphore(_x532){return _setTopicSemaphore.apply(this,arguments);}return setTopicSemaphore;}()},{key:"getTopicSemaphore",value:function(){var _getTopicSemaphore=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee339(){var e,_t269,_t270;return _regenerator2().w(function(_context339){while(1)switch(_context339.p=_context339.n){case 0:_context339.p=0;_t269=this.db&&this.db.IDB;if(!_t269){_context339.n=2;break;}_context339.n=1;return this.db.getItem(this.TOPIC_SEMAPHORE);case 1:e=_context339.v;case 2:_context339.n=4;break;case 3:_context339.p=3;_t270=_context339.v;case 4:return _context339.a(2,e);}},_callee339,this,[[0,3]]);}));function getTopicSemaphore(){return _getTopicSemaphore.apply(this,arguments);}return getTopicSemaphore;}()},{key:"setTopicSyncIsProcessing",value:function(){var _setTopicSyncIsProcessing=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee340(e){var _t271;return _regenerator2().w(function(_context340){while(1)switch(_context340.n){case 0:_t271=this.db&&this.db.IDB;if(!_t271){_context340.n=1;break;}_context340.n=1;return this.db.setItem(this.TOPIC_SYNC_IS_PROCESSING,e);case 1:return _context340.a(2);}},_callee340,this);}));function setTopicSyncIsProcessing(_x533){return _setTopicSyncIsProcessing.apply(this,arguments);}return setTopicSyncIsProcessing;}()},{key:"getTopicSyncIsProcessing",value:function(){var _getTopicSyncIsProcessing=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee341(){var e,_t272,_t273;return _regenerator2().w(function(_context341){while(1)switch(_context341.p=_context341.n){case 0:_context341.p=0;_t272=this.db&&this.db.IDB;if(!_t272){_context341.n=2;break;}_context341.n=1;return this.db.getItem(this.TOPIC_SYNC_IS_PROCESSING);case 1:e=_context341.v;case 2:_context341.n=4;break;case 3:_context341.p=3;_t273=_context341.v;case 4:return _context341.a(2,e);}},_callee341,this,[[0,3]]);}));function getTopicSyncIsProcessing(){return _getTopicSyncIsProcessing.apply(this,arguments);}return getTopicSyncIsProcessing;}()}]);}(r))(),s=n(315).Core.Models.ErrorDictionary,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,PUSH_PERMISSION_NOT_ACCEPTED:1602,API_APPKEY_NOT_VALID:1601,DISABLED_CHANNEL:4404});var 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",PUSH_PERMISSION_NOT_ACCEPTED:"permission not accepted",API_APPKEY_NOT_VALID:"appKey is missing'",DISABLED_CHANNEL:"disabled channel"});var c={ErrorCode:a,ErrorMessage:u},l=n(315).Core.Models.Device;var f=/*#__PURE__*/function(_l3){function f(){var _this82;var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var t=arguments.length>1?arguments[1]:undefined;_classCallCheck2(this,f);_this82=_callSuper2(this,f,[e,t]),null==e?(null!=o.getDeviceId()&&(_this82.deviceId=o.getDeviceId()),null!=o.getPushToken()&&(_this82.pushToken=o.getPushToken())):t?e.deviceId&&(_this82.deviceId=e.deviceId,o.setDeviceId(_this82.deviceId)):(e.deviceId&&(_this82.deviceId=e.deviceId),e.pushToken&&(_this82.pushToken=e.pushToken));return _this82;}_inherits2(f,_l3);return _createClass2(f,[{key:"getDeviceId",value:function getDeviceId(){return this.deviceId;}},{key:"getPushToken",value:function getPushToken(){return this.pushToken;}},{key:"toJSON",value:function toJSON(){var e=_superPropGet(f,"toJSON",this,3)([]);return this.deviceId&&(e.deviceId=this.deviceId),this.pushToken&&(e.pushToken=this.pushToken),e;}}],[{key:"setDeviceJson",value:function setDeviceJson(e){o.setDeviceJson(JSON.stringify(e.toJSON()));}}]);}(l),h=n(315).Core.Models.DeviceStatus,d=n(315).Core.Api.BaseRequest;var E=/*#__PURE__*/function(_d9){function E(){var _this83;var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:h.DEFAULT;_classCallCheck2(this,E);_this83=_callSuper2(this,E),_this83.device=new f(),_this83.status=e,_this83.notToUpdate=!1,_this83.deviceUpdate=!1;return _this83;}_inherits2(E,_d9);return _createClass2(E,[{key:"isDeviceUpdated",value:function isDeviceUpdated(e){this.deviceUpdate=e;}},{key:"setDeviceId",value:function setDeviceId(e){this.device&&(this.device.deviceId=e);}},{key:"setAppKey",value:function setAppKey(e){this.appKey=e;}},{key:"getDeviceRequest",value:function getDeviceRequest(){return this.params=this.createQueryString(),this;}},{key:"postDeviceRequest",value:function postDeviceRequest(){return this.body=this.createDeviceJson(),this.status!==h.DEFAULT&&(this.body.enabled=1===this.status),this;}},{key:"putDeviceRequest",value:function putDeviceRequest(e){return this.params=this.createQueryString(),this.body=this.createPUTDeviceJson(e),this.status!==h.DEFAULT&&(this.body.enabled=1===this.status),this;}},{key:"getDeviceTopicsRequest",value:function getDeviceTopicsRequest(){return this.params=this.createQueryString(),this;}},{key:"postDeviceTopicsRequest",value:function postDeviceTopicsRequest(){return this.params=this.createQueryString(),this.body=this.createTopicsJson(),this;}},{key:"deleteDeviceTopicsRequest",value:function deleteDeviceTopicsRequest(){return this.params=this.createQueryString(),this.body=this.createTopicsJson(),this;}},{key:"createQueryString",value:function createQueryString(){return this.device.deviceId?this.PARAM_DEVICE_ID+"="+this.device.deviceId:"";}},{key:"createDeviceJson",value:function createDeviceJson(){var e={};try{e=this.device.toJSON();}catch(e){}return e;}},{key:"createPUTDeviceJson",value:function createPUTDeviceJson(e){var t={};try{f.setDeviceJson(e),t=e.toJSON();}catch(e){}return t;}},{key:"createTopicsJson",value:function createTopicsJson(){var e={};return this.topics&&(e.topics=this.topics),e;}},{key:"getDeviceId",value:function getDeviceId(){return this.device.getDeviceId();}},{key:"setTopics",value:function setTopics(e){this.topics=e;}},{key:"setExternalCode",value:function setExternalCode(e){this.device.setExternalCode(e);}}]);}(d),p=n(315).Core.Models.EventType,y=n(315).Core.Config;var I=/*#__PURE__*/function(){function I(){_classCallCheck2(this,I);}return _createClass2(I,null,[{key:"requestBackgroundSync",value:function(){var _requestBackgroundSync=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee342(){var e;return _regenerator2().w(function(_context342){while(1)switch(_context342.n){case 0:_context342.n=1;return navigator.serviceWorker.getRegistration(o.getWorkerPath());case 1:e=_context342.v;return _context342.a(2,null!=e?e:null);}},_callee342);}));function requestBackgroundSync(){return _requestBackgroundSync.apply(this,arguments);}return requestBackgroundSync;}()},{key:"findIndigitallSW",value:function findIndigitallSW(e){for(var _t274=0;_t274<e.length;_t274++)if(void 0!==e[_t274]&&e[_t274].active&&e[_t274].active.scriptURL&&e[_t274].active.scriptURL.includes("worker.min.js"))return e[_t274];return null;}},{key:"sendEventRequest",value:function(){var _sendEventRequest=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee343(e,t){var n;return _regenerator2().w(function(_context343){while(1)switch(_context343.n){case 0:n=new m();n.setAppKey(e.appKey);n.setDeviceId(e.deviceId);n.setPlatform(y.platform);n.setPushId(""+e.id);n.setJsonPush(e.jsonPush);n.setSendingId(""+e.sendingId);e.campaignId&&n.setCampaingId(""+e.campaignId);e.journeyStateId&&n.setJourneyStateId(e.journeyStateId);n.setEventType(p.EVENT_TYPE_CLICK);_context343.n=1;return n.setExternalCodeRequest();case 1:"action-1"==t.action?n.setClickedButton(1):"action-2"==t.action?n.setClickedButton(2):n.setClickedButton(0);n.setServiceWorkerRequest(!0);_context343.n=2;return L.postEventPushClick(n);case 2:return _context343.a(2);}},_callee343);}));function sendEventRequest(_x534,_x535){return _sendEventRequest.apply(this,arguments);}return sendEventRequest;}()},{key:"topicsSubscribeFromServiceWorker",value:function(){var _topicsSubscribeFromServiceWorker=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee344(e,t){var n;return _regenerator2().w(function(_context344){while(1)switch(_context344.n){case 0:n=new E();n.setTopics(t);n.setAppKey(e.appKey);n.setDeviceId(e.deviceId);_context344.n=1;return L.postTopicsSubscribeFromServiceWorker(n);case 1:return _context344.a(2);}},_callee344);}));function topicsSubscribeFromServiceWorker(_x536,_x537){return _topicsSubscribeFromServiceWorker.apply(this,arguments);}return topicsSubscribeFromServiceWorker;}()},{key:"prepareStatistics",value:function prepareStatistics(e,t){var n=t,i=JSON.parse(e);return Object.keys(i).forEach(function(e){"appKey"!=e&&"pushId"!=e&&"action"!=e&&"buttons"!=e&&"id"!=e&&"title"!=e&&"body"!=e&&"icon"!=e&&"image"!=e&&"gif"!=e&&"layout"!=e&&"data"!=e&&"silent"!=e&&"securedData"!=e&&"securedKey"!=e&&"sendEventAck"!=e&&"applicationId"!=e&&"timezone"!=e&&"monochrome"!=e&&"requireInteraction"!=e&&"contentState"!=e&&"sendingId"!=e&&"campaignId"!=e&&"journeyStateId"!=e&&"interruptionLevel"!=e&&"fromExternalUrl"!=e&&("string"==typeof i[e]?n[e]=i[e]:"number"==typeof i[e]?n[e]=parseInt(i[e]):"boolean"==typeof i[e]?n[e]="true"===i[e]:null!==i[e]&&void 0!==i[e]&&(n[e]=i[e]));}),n;}}]);}(),g=n(315).Core.Api.BaseEventRequest,_=n(315).Core.Models.EventType;var m=/*#__PURE__*/function(_g){function m(){_classCallCheck2(this,m);return _callSuper2(this,m);}_inherits2(m,_g);return _createClass2(m,[{key:"setEventType",value:function setEventType(e){this.eventType=e;}},{key:"setPushId",value:function setPushId(e){this.pushId=e;}},{key:"setClickedButton",value:function setClickedButton(e){this.clickedButton=e;}},{key:"setSendingId",value:function setSendingId(e){this.sendingId=e;}},{key:"setPermissionType",value:function setPermissionType(e){this.permissionType=e;}},{key:"setLocation",value:function setLocation(e,t){this.latitude=e,this.longitude=t;}},{key:"setDeviceId",value:function setDeviceId(e){this.deviceId=e;}},{key:"setPlatform",value:function setPlatform(e){this.platform=e;}},{key:"setAppKey",value:function setAppKey(e){this.appKey=e;}},{key:"setCustomData",value:function setCustomData(e){this.customData=e;}},{key:"setExternalCodeRequest",value:function(){var _setExternalCodeRequest=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee345(){return _regenerator2().w(function(_context345){while(1)switch(_context345.n){case 0:_context345.n=1;return o.getExternalIdRequest();case 1:this.externalCode=_context345.v;case 2:return _context345.a(2);}},_callee345,this);}));function setExternalCodeRequest(){return _setExternalCodeRequest.apply(this,arguments);}return setExternalCodeRequest;}()},{key:"setExternalCode",value:function setExternalCode(e){this.externalCode=e;}},{key:"setCampaingId",value:function setCampaingId(e){this.campaignId=e;}},{key:"setJourneyStateId",value:function setJourneyStateId(e){this.journeyStateId=e;}},{key:"setJourneyExecution",value:function setJourneyExecution(e){this.journeyExecution=e;}},{key:"setCjCurrentStateId",value:function setCjCurrentStateId(e){this.cjCurrentStateId=e;}},{key:"setJsonPush",value:function setJsonPush(e){this.jsonPush=e;}},{key:"postEventPushRequest",value:function postEventPushRequest(){var e={};return e.deviceId=this.deviceId,e.platform=this.platform,this.eventType&&(e.eventType=this.eventType),this.pushId&&(e.pushId=this.pushId),e.clickedButton=this.clickedButton,null!=this.externalCode&&(e.externalCode=this.externalCode),this.sendingId&&"undefined"!=this.sendingId&&(e.sendingId=this.sendingId.toString()),this.journeyStateId&&(e.journeyStateId=this.journeyStateId),this.campaignId&&(e.campaignId=this.campaignId.toString()),null!=this.jsonPush&&(e=I.prepareStatistics(this.jsonPush,e)),this.body=e,this;}},{key:"postEventVisitRequest",value:function postEventVisitRequest(){var e={};return e.deviceId=o.getDeviceId(),e.eventType=_.EVENT_TYPE_UPDATE,this.body=e,this;}},{key:"postEventPermissionRequest",value:function postEventPermissionRequest(){var e={};return e.deviceId=o.getDeviceId(),this.eventType&&(e.eventType=this.eventType),this.permissionType&&(e.permissionType=this.permissionType),this.body=e,this;}},{key:"postEventLocationRequest",value:function postEventLocationRequest(){var e={};return e.deviceId=o.getDeviceId(),e.eventType=_.EVENT_TYPE_UPDATE,this.latitude&&(e.latitude=this.latitude),this.longitude&&(e.longitude=this.longitude),this.body=e,this;}},{key:"postEventCustomRequest",value:function postEventCustomRequest(){var e={};return this.deviceId&&(e.deviceId=this.deviceId),this.eventType&&(e.eventType=this.eventType),this.customData&&(e.customData=this.customData),this.externalCode&&(e.externalCode=this.externalCode),this.body=e,this;}},{key:"postEventJourneyCustomRequest",value:function postEventJourneyCustomRequest(){var e={};return this.deviceId&&(e.deviceId=this.deviceId),this.eventType&&(e.eventType=this.eventType),this.customData&&(e.customData=this.customData),this.externalCode&&(e.externalCode=this.externalCode),this.eventId&&(e.eventId=this.eventId),this.eventAt&&(e.eventAt=this.eventAt),this.body=e,this;}}]);}(g);var v=/*#__PURE__*/function(){function v(){_classCallCheck2(this,v);}return _createClass2(v,null,[{key:"urlBase64ToUint8Array",value:function urlBase64ToUint8Array(e){var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=window.atob(t),i=new Uint8Array(n.length);for(var _e87=0;_e87<n.length;++_e87)i[_e87]=n.charCodeAt(_e87);return i;}},{key:"callEventPermission",value:function callEventPermission(e,t){var n=new m();n.setAppKey(o.getAppKey()),n.setDeviceId(o.getDeviceId()),n.setPermissionType(e),n.setEventType(t),L.postEventPermission(n);}},{key:"getPutRequestTimestamp",value:function(){var _getPutRequestTimestamp2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee346(){var _t275;return _regenerator2().w(function(_context346){while(1)switch(_context346.n){case 0:_context346.n=1;return o.getPutRequestTimestamp();case 1:if(!_context346.v){_context346.n=2;break;}_t275=o.getPutRequestTimestamp();_context346.n=3;break;case 2:_t275=Date.now()+6048e5;case 3:return _context346.a(2,_t275);}},_callee346);}));function getPutRequestTimestamp(){return _getPutRequestTimestamp2.apply(this,arguments);}return getPutRequestTimestamp;}()}]);}(),_n$Core$Utils1=n(315).Core.Utils,S=_n$Core$Utils1.Validations,T=_n$Core$Utils1.Log;var b=/*#__PURE__*/function(_S){function b(){_classCallCheck2(this,b);return _callSuper2(this,b,arguments);}_inherits2(b,_S);return _createClass2(b,null,[{key:"isAppKeyFormat",value:function isAppKeyFormat(){var e=o.getAppKey();return null!=e&&""!=e&&"null"!=e&&e.length>3;}},{key:"isValidFormatRequest",value:function isValidFormatRequest(){var e=new T("[IND]PushValidations: "),t=o.getDeviceId();var n=!0;return this.isAppKeyFormat()||(n=!1,e.w("appKey is null or empty").writeLog()),o.isPushDisabled()||this.isValidFormat(t)||(n=!1,e.w("deviceId is null or empty").writeLog()),n;}},{key:"isPutRequestExceed",value:function(){var _isPutRequestExceed=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee347(){var _t276,_t277;return _regenerator2().w(function(_context347){while(1)switch(_context347.n){case 0:_context347.n=1;return v.getPutRequestTimestamp();case 1:_t276=_context347.v;_t277=Date.now();return _context347.a(2,_t276<=_t277);}},_callee347);}));function isPutRequestExceed(){return _isPutRequestExceed.apply(this,arguments);}return isPutRequestExceed;}()},{key:"isSafariBrowserDevice",value:function isSafariBrowserDevice(){var e=window.navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),n=!!e.match(/WebKit/i);return t&&n&&!e.match(/CriOS/i)&&!e.match(/OPiOS/i);}}]);}(S),P=n(315).Core.Config,O=n(315).Core.Api.BaseClient,_n$Core$Models4=n(315).Core.Models,R=_n$Core$Models4.ErrorModel,A=_n$Core$Models4.Channel,_n$Core$Utils10=n(315).Core.Utils,N=_n$Core$Utils10.TopicUtils,w=_n$Core$Utils10.Log,C=_n$Core$Utils10.CommonUtils,D=_n$Core$Utils10.ErrorUtils;var L=new(/*#__PURE__*/function(_O2){function _class33(){var _this84;_classCallCheck2(this,_class33);_this84=_callSuper2(this,_class33),_this84.URL_BASE=P.client.URL_BASE,_this84.ENDPOINT_APPLICATION="/application",_this84.ENDPOINT_APPLICATION_ALL=_this84.ENDPOINT_APPLICATION+"/all",_this84.ENDPOINT_DEVICE="/device",_this84.ENDPOINT_DEVICE_TOPICS=_this84.ENDPOINT_DEVICE+"/topics",_this84.ENDPOINT_PUSH="/push",_this84.ENDPOINT_EVENT="/event",_this84.ENDPOINT_EVENT_PUSH=_this84.ENDPOINT_EVENT+"/push",_this84.ENDPOINT_EVENT_VISIT=_this84.ENDPOINT_EVENT+"/visit",_this84.ENDPOINT_EVENT_PERMISSION=_this84.ENDPOINT_EVENT+"/permission",_this84.ENDPOINT_EVENT_LOCATION=_this84.ENDPOINT_EVENT+"/location",_this84.ENDPOINT_EVENT_CUSTOM=_this84.ENDPOINT_EVENT+"/custom",_this84.ENDPOINT_EVENT_CUSTOM_BEACON=_this84.ENDPOINT_EVENT_CUSTOM+"/beacon",_this84.ENDPOINT_BROWSER="/browser",_this84.log=new w("[IND]Client: ");return _this84;}_inherits2(_class33,_O2);return _createClass2(_class33,[{key:"getURL",value:function(){var _getURL10=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee348(){var e;return _regenerator2().w(function(_context348){while(1)switch(_context348.n){case 0:_context348.n=1;return o.getUrlDeviceApi();case 1:e=_context348.v;return _context348.a(2,e||this.URL_BASE);}},_callee348,this);}));function getURL(){return _getURL10.apply(this,arguments);}return getURL;}()},{key:"getApplicationAll",value:function(){var _getApplicationAll=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee349(e,t,n){var _i61;return _regenerator2().w(function(_context349){while(1)switch(_context349.n){case 0:if(!b.isAppKeyFormat()){_context349.n=2;break;}_context349.n=1;return this.get(this.ENDPOINT_APPLICATION_ALL,e.getApplicationRequest());case 1:_i61=_context349.v;!_i61||_i61 instanceof R?_i61?C.isFunction(n)&&n(_i61):C.isFunction(n)&&n():C.isFunction(t)&&t(_i61);_context349.n=3;break;case 2:C.isFunction(n)&&n(D.showError(c,c.ErrorCode.BAD_REQUEST_SERVER_ERROR));case 3:return _context349.a(2,!0);}},_callee349,this);}));function getApplicationAll(_x538,_x539,_x540){return _getApplicationAll.apply(this,arguments);}return getApplicationAll;}()},{key:"postDevice",value:function(){var _postDevice2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee350(e,t,n){var _i62,_e88;return _regenerator2().w(function(_context350){while(1)switch(_context350.n){case 0:if(!b.isAppKeyFormat()){_context350.n=5;break;}_context350.n=1;return this.post(this.ENDPOINT_DEVICE,e.postDeviceRequest(),"include");case 1:_i62=_context350.v;if(!(!_i62||_i62 instanceof R)){_context350.n=2;break;}_i62?C.isFunction(n)&&n(_i62):C.isFunction(n)&&n();_context350.n=4;break;case 2:_e88={enabled:_i62.data.enabled,deviceId:_i62.data.deviceId,registeredByCookie:_i62.data.registeredByCookie};_context350.n=3;return o.setDeviceId(_e88.deviceId);case 3:C.isFunction(t)&&t(new f(_e88,!0));case 4:_context350.n=6;break;case 5:C.isFunction(n)&&n(D.showError(c,c.ErrorCode.GENERAL_ERROR_APPKEY_BAD_REQUEST));case 6:return _context350.a(2,!0);}},_callee350,this);}));function postDevice(_x541,_x542,_x543){return _postDevice2.apply(this,arguments);}return postDevice;}()},{key:"putDevice",value:function(){var _putDevice=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee351(e,t,n){var i,r,_r36,_e89,_t278,_t279,_t280,_t281;return _regenerator2().w(function(_context351){while(1)switch(_context351.n){case 0:i=new f();_context351.n=1;return b.isPutRequestExceed();case 1:r=_context351.v;_t279=e.deviceUpdate;if(_t279){_context351.n=3;break;}_context351.n=2;return o.getPutRequestTimestamp();case 2:_t280=_context351.v;_t279=null==_t280;case 3:_t278=_t279;if(_t278){_context351.n=4;break;}_t278=r;case 4:if(!_t278){_context351.n=9;break;}if(!b.isValidFormatRequest()){_context351.n=7;break;}_t281=o;_context351.n=5;return v.getPutRequestTimestamp();case 5:_t281.setPutRequestTimestamp.call(_t281,_context351.v);_context351.n=6;return this.put(this.ENDPOINT_DEVICE,e.putDeviceRequest(i),"include");case 6:_r36=_context351.v;if(!_r36||_r36 instanceof R)_r36?C.isFunction(n)&&n(_r36):C.isFunction(n)&&n();else{_e89={enabled:_r36.data.enabled,deviceId:_r36.data.deviceId,registeredByCookie:_r36.data.registeredByCookie};C.isFunction(t)&&t(new f(_e89,!0));}_context351.n=8;break;case 7:C.isFunction(n)&&n(D.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));case 8:_context351.n=10;break;case 9:C.isFunction(t)&&t(i);case 10:return _context351.a(2);}},_callee351,this);}));function putDevice(_x544,_x545,_x546){return _putDevice.apply(this,arguments);}return putDevice;}()},{key:"getDevice",value:function(){var _getDevice=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee352(e,t,n){var _i63,_e90;return _regenerator2().w(function(_context352){while(1)switch(_context352.n){case 0:if(!b.isValidFormatRequest()){_context352.n=2;break;}_context352.n=1;return this.get(this.ENDPOINT_DEVICE,e.getDeviceRequest());case 1:_i63=_context352.v;if(!_i63||_i63 instanceof R)_i63?C.isFunction(n)&&n(_i63):C.isFunction(n)&&n();else{_e90={enabled:_i63.data.enabled,deviceId:_i63.data.deviceId};C.isFunction(t)&&t(new f(_e90,!0));}_context352.n=3;break;case 2:C.isFunction(n)&&n(D.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));case 3:return _context352.a(2,!0);}},_callee352,this);}));function getDevice(_x547,_x548,_x549){return _getDevice.apply(this,arguments);}return getDevice;}()},{key:"getDeviceTopics",value:function(){var _getDeviceTopics=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee353(e,t,n){var _i64;return _regenerator2().w(function(_context353){while(1)switch(_context353.n){case 0:if(!b.isValidFormatRequest()){_context353.n=2;break;}_context353.n=1;return this.get(this.ENDPOINT_DEVICE_TOPICS,e.getDeviceTopicsRequest());case 1:_i64=_context353.v;!_i64||_i64 instanceof R?_i64?C.isFunction(n)&&n(_i64):C.isFunction(n)&&n():C.isFunction(t)&&t(N.setTopicChannel(_i64.data.topics,A.PUSH));_context353.n=3;break;case 2:C.isFunction(n)&&n(D.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));case 3:return _context353.a(2,!0);}},_callee353,this);}));function getDeviceTopics(_x550,_x551,_x552){return _getDeviceTopics.apply(this,arguments);}return getDeviceTopics;}()},{key:"postDeviceTopics",value:function(){var _postDeviceTopics=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee354(e,t,n){return _regenerator2().w(function(_context354){while(1)switch(_context354.n){case 0:if(!b.isValidFormatRequest()){_context354.n=2;break;}_context354.n=1;return this.postDeviceTopicsRequest(e,t,n);case 1:_context354.n=3;break;case 2:C.isFunction(n)&&n(D.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));case 3:return _context354.a(2,!0);}},_callee354,this);}));function postDeviceTopics(_x553,_x554,_x555){return _postDeviceTopics.apply(this,arguments);}return postDeviceTopics;}()},{key:"postDeviceTopicsRequest",value:function(){var _postDeviceTopicsRequest=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee355(e,t,n){var i,_e91;return _regenerator2().w(function(_context355){while(1)switch(_context355.n){case 0:_context355.n=1;return this.post(this.ENDPOINT_DEVICE_TOPICS,e.postDeviceTopicsRequest());case 1:i=_context355.v;if(!i||i instanceof R)i?C.isFunction(n)&&n(i):C.isFunction(n)&&n();else{_e91=i.data.topics;C.isFunction(t)&&t(_e91);}case 2:return _context355.a(2);}},_callee355,this);}));function postDeviceTopicsRequest(_x556,_x557,_x558){return _postDeviceTopicsRequest.apply(this,arguments);}return postDeviceTopicsRequest;}()},{key:"deleteDeviceTopics",value:function(){var _deleteDeviceTopics=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee356(e,t,n){return _regenerator2().w(function(_context356){while(1)switch(_context356.n){case 0:return _context356.a(2,(b.isValidFormatRequest()?this.deleteDeviceTopicsRequest(e,t,n):C.isFunction(n)&&n(D.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST)),!0));}},_callee356,this);}));function deleteDeviceTopics(_x559,_x560,_x561){return _deleteDeviceTopics.apply(this,arguments);}return deleteDeviceTopics;}()},{key:"deleteDeviceTopicsRequest",value:function(){var _deleteDeviceTopicsRequest=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee357(e,t,n){var i,_e92;return _regenerator2().w(function(_context357){while(1)switch(_context357.n){case 0:_context357.n=1;return this["delete"](this.ENDPOINT_DEVICE_TOPICS,e.deleteDeviceTopicsRequest());case 1:i=_context357.v;if(!i||i instanceof R)i?C.isFunction(n)&&n(i):C.isFunction(n)&&n();else{_e92=i.data.topics;C.isFunction(t)&&t(_e92);}case 2:return _context357.a(2);}},_callee357,this);}));function deleteDeviceTopicsRequest(_x562,_x563,_x564){return _deleteDeviceTopicsRequest.apply(this,arguments);}return deleteDeviceTopicsRequest;}()},{key:"postEventPush",value:function(){var _postEventPush=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee358(e){var _t282;return _regenerator2().w(function(_context358){while(1)switch(_context358.n){case 0:_t282=b.isValidFormatRequest();if(!_t282){_context358.n=1;break;}_context358.n=1;return this.post(this.ENDPOINT_EVENT_PUSH,e.postEventPushRequest());case 1:return _context358.a(2);}},_callee358,this);}));function postEventPush(_x565){return _postEventPush.apply(this,arguments);}return postEventPush;}()},{key:"postEventVisit",value:function postEventVisit(e){b.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_VISIT,e.postEventVisitRequest());}},{key:"postEventPermission",value:function postEventPermission(e){b.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_PERMISSION,e.postEventPermissionRequest());}},{key:"postEventLocation",value:function postEventLocation(e){b.isValidFormatRequest()&&this.post(this.ENDPOINT_EVENT_LOCATION,e.postEventLocationRequest());}},{key:"getBrowser",value:function(){var _getBrowser=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee359(e,t,n){var _i65,_e93;return _regenerator2().w(function(_context359){while(1)switch(_context359.n){case 0:if(!b.isAppKeyFormat()){_context359.n=7;break;}_context359.n=1;return this.get(this.ENDPOINT_BROWSER,e);case 1:_i65=_context359.v;if(!(!_i65||_i65 instanceof R)){_context359.n=2;break;}_i65?C.isFunction(n)&&n(_i65):C.isFunction(n)&&n();_context359.n=6;break;case 2:_e93={browserName:_i65.data.browserName,browserVersion:_i65.data.browserVersion,deviceType:_i65.data.deviceType,osName:_i65.data.osName,osVersion:_i65.data.osVersion,supported:_i65.data.supported,platform:_i65.data.platform};_context359.n=3;return o.setBrowserName(_e93.browserName);case 3:o.setBrowserVersion(_e93.browserVersion);_context359.n=4;return o.setOsName(_e93.osName);case 4:o.setOsVersion(_e93.osVersion);o.setDeviceType(_e93.deviceType);o.setSupported(_e93.supported);_context359.n=5;return o.setPlatform("webpush");case 5:C.isFunction(t)&&t(_e93);case 6:_context359.n=8;break;case 7:C.isFunction(n)&&n(D.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));case 8:return _context359.a(2,!0);}},_callee359,this);}));function getBrowser(_x566,_x567,_x568){return _getBrowser.apply(this,arguments);}return getBrowser;}()},{key:"postEventCustom",value:function(){var _postEventCustom=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee360(e,t,n){var _i66;return _regenerator2().w(function(_context360){while(1)switch(_context360.n){case 0:if(!b.isValidFormatRequest()){_context360.n=2;break;}_context360.n=1;return this.post(this.ENDPOINT_EVENT_CUSTOM,e.postEventCustomRequest());case 1:_i66=_context360.v;!_i66||_i66 instanceof R?_i66?C.isFunction(n)&&n(_i66):C.isFunction(n)&&n():C.isFunction(t)&&t(_i66);_context360.n=3;break;case 2:C.isFunction(n)&&n(D.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));case 3:return _context360.a(2,!0);}},_callee360,this);}));function postEventCustom(_x569,_x570,_x571){return _postEventCustom.apply(this,arguments);}return postEventCustom;}()},{key:"postEventCustomSync",value:function(){var _postEventCustomSync=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee361(e,t,n){var _n50,_i67,r,_t283,_t284,_t285,_t286,_t287,_t288,_t289,_t290,_t291;return _regenerator2().w(function(_context361){while(1)switch(_context361.p=_context361.n){case 0:if(!b.isValidFormatRequest()){_context361.n=8;break;}e=e.postEventCustomRequest();_context361.p=1;if(!(navigator&&"sendBeacon"in navigator)){_context361.n=3;break;}_context361.n=2;return this.getURL();case 2:_t283=_context361.v;_t284=this.ENDPOINT_EVENT_CUSTOM_BEACON;_t285=_t283+_t284;_t286=e.getParams();_n50=_t285+_t286;navigator.sendBeacon(_n50,JSON.stringify(e.getBody())),C.isFunction(t)&&t();_context361.n=5;break;case 3:_context361.n=4;return this.getURL();case 4:_t287=_context361.v;_t288=this.ENDPOINT_EVENT_CUSTOM;_t289=_t287+_t288;_t290=e.getParams();_i67=_t289+_t290;r=new XMLHttpRequest();r.open("POST",_i67,!1),r.setRequestHeader("Content-Type","application/json"),r.onreadystatechange=function(){r.readyState===XMLHttpRequest.DONE&&(r.status>=200||r.status<300)?C.isFunction(t)&&t():C.isFunction(n)&&n();},r.send(JSON.stringify(e.getBody()));case 5:_context361.n=7;break;case 6:_context361.p=6;_t291=_context361.v;C.isFunction(n)&&n(D.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,_t291));case 7:_context361.n=9;break;case 8:C.isFunction(n)&&n(D.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));case 9:return _context361.a(2,!0);}},_callee361,this,[[1,6]]);}));function postEventCustomSync(_x572,_x573,_x574){return _postEventCustomSync.apply(this,arguments);}return postEventCustomSync;}()},{key:"postEventJourney",value:function(){var _postEventJourney=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee362(e,t,n){var _i68;return _regenerator2().w(function(_context362){while(1)switch(_context362.n){case 0:if(!b.isValidFormatRequest()){_context362.n=2;break;}_context362.n=1;return this.post(this.ENDPOINT_PUSH+this.ENDPOINT_EVENT_CUSTOM,e.postEventJourneyCustomRequest());case 1:_i68=_context362.v;!_i68||_i68 instanceof R?_i68?C.isFunction(n)&&n(_i68):C.isFunction(n)&&n():C.isFunction(t)&&t(_i68);_context362.n=3;break;case 2:C.isFunction(n)&&n(D.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));case 3:return _context362.a(2,!0);}},_callee362,this);}));function postEventJourney(_x575,_x576,_x577){return _postEventJourney.apply(this,arguments);}return postEventJourney;}()},{key:"postEventJourneySync",value:function(){var _postEventJourneySync=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee363(e,t,n){var _i69,_n51,_i70,r,_t292,_t293,_t294,_t295,_t296,_t297,_t298;return _regenerator2().w(function(_context363){while(1)switch(_context363.p=_context363.n){case 0:if(!b.isValidFormatRequest()){_context363.n=8;break;}e=e.postEventJourneyCustomRequest();_context363.p=1;_context363.n=2;return this.getURL();case 2:_i69=_context363.v;if(!(_i69=_i69.replace("v1","v2"),navigator&&"sendBeacon"in navigator)){_context363.n=3;break;}_n51=_i69+this.ENDPOINT_PUSH+this.ENDPOINT_EVENT_CUSTOM_BEACON+e.getParams();navigator.sendBeacon(_n51,JSON.stringify(e.getBody())),C.isFunction(t)&&t();_context363.n=5;break;case 3:_context363.n=4;return this.getURL().replace("v1","v2");case 4:_t292=_context363.v;_t293=this.ENDPOINT_PUSH;_t294=_t292+_t293;_t295=this.ENDPOINT_EVENT_CUSTOM;_t296=_t294+_t295;_t297=e.getParams();_i70=_t296+_t297;r=new XMLHttpRequest();r.open("POST",_i70,!1),r.setRequestHeader("Content-Type","application/json"),r.onreadystatechange=function(){r.readyState===XMLHttpRequest.DONE&&(r.status>=200||r.status<300)?C.isFunction(t)&&t():C.isFunction(n)&&n();},r.send(JSON.stringify(e.getBody()));case 5:_context363.n=7;break;case 6:_context363.p=6;_t298=_context363.v;C.isFunction(n)&&n(D.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,_t298));case 7:_context363.n=9;break;case 8:C.isFunction(n)&&n(D.showError(c,c.ErrorCode.GENERAL_ERROR_BAD_REQUEST));case 9:return _context363.a(2,!0);}},_callee363,this,[[1,6]]);}));function postEventJourneySync(_x578,_x579,_x580){return _postEventJourneySync.apply(this,arguments);}return postEventJourneySync;}()},{key:"postEventPushClick",value:function(){var _postEventPushClick=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee364(e){var t;return _regenerator2().w(function(_context364){while(1)switch(_context364.n){case 0:t="/event/push";e.journeyStateId&&(e.setJourneyRequest(!0),t="/push/event/click");e.setServiceWorkerRequest(!0);_context364.n=1;return this.post(t,e.postEventPushRequest());case 1:return _context364.a(2);}},_callee364,this);}));function postEventPushClick(_x581){return _postEventPushClick.apply(this,arguments);}return postEventPushClick;}()},{key:"postTopicsSubscribeFromServiceWorker",value:function(){var _postTopicsSubscribeFromServiceWorker=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee365(e){return _regenerator2().w(function(_context365){while(1)switch(_context365.n){case 0:e.setServiceWorkerRequest(!0);_context365.n=1;return this.post("/device/topics",e.postDeviceTopicsRequest());case 1:return _context365.a(2);}},_callee365,this);}));function postTopicsSubscribeFromServiceWorker(_x582){return _postTopicsSubscribeFromServiceWorker.apply(this,arguments);}return postTopicsSubscribeFromServiceWorker;}()}]);}(O))(),M=n(315).Core.Config,U=n(315).Core.Api.BaseRequest;var B=/*#__PURE__*/function(_U){function B(){_classCallCheck2(this,B);return _callSuper2(this,B,arguments);}_inherits2(B,_U);return _createClass2(B,[{key:"getApplicationRequest",value:function getApplicationRequest(){return this.params=this.PARAM_PLATFORM+"="+M.platform,this;}}]);}(U),k=Object.freeze({PERMISSION_TYPE_PUSH:"push",PERMISSION_TYPE_LOCATION:"location"}),V=n(315).Core.Utils.CorePermissions;var j=/*#__PURE__*/function(){function j(){_classCallCheck2(this,j);}return _createClass2(j,null,[{key:"getPermissionState",value:function(){var _getPermissionState=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee366(e){var t;return _regenerator2().w(function(_context366){while(1)switch(_context366.n){case 0:_context366.n=1;return V.getPermission(e);case 1:t=_context366.v;return _context366.a(2,t?t.state:"push"===e?window.Notification&&window.Notification.permission?window.Notification.permission:void 0:"geolocation"===e?navigator.geolocation?"granted":"denied":void 0);}},_callee366);}));function getPermissionState(_x583){return _getPermissionState.apply(this,arguments);}return getPermissionState;}()},{key:"getPermissions",value:function(){var _getPermissions=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee367(){var _yield$Promise$all,_yield$Promise$all2,e,t,n;return _regenerator2().w(function(_context367){while(1)switch(_context367.n){case 0:_context367.n=1;return Promise.all([this.getPermissionState("push"),this.getPermissionState("geolocation")]);case 1:_yield$Promise$all=_context367.v;_yield$Promise$all2=_slicedToArray(_yield$Promise$all,2);e=_yield$Promise$all2[0];t=_yield$Promise$all2[1];n={};return _context367.a(2,(void 0!==e&&(n.push=e),void 0!==t&&(n.location=t),n));}},_callee367,this);}));function getPermissions(){return _getPermissions.apply(this,arguments);}return getPermissions;}()},{key:"getPushPermission",value:function(){var _getPushPermission=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee368(){var e;return _regenerator2().w(function(_context368){while(1)switch(_context368.n){case 0:_context368.n=1;return this.getPermissionState("push");case 1:e=_context368.v;return _context368.a(2,void 0!==e?{push:e}:{});}},_callee368,this);}));function getPushPermission(){return _getPushPermission.apply(this,arguments);}return getPushPermission;}()},{key:"getLocationPermission",value:function(){var _getLocationPermission8=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee369(){var e;return _regenerator2().w(function(_context369){while(1)switch(_context369.n){case 0:_context369.n=1;return this.getPermissionState("geolocation");case 1:e=_context369.v;return _context369.a(2,void 0!==e?{location:e}:{});}},_callee369,this);}));function getLocationPermission(){return _getLocationPermission8.apply(this,arguments);}return getLocationPermission;}()},{key:"setPermissionsCallback",value:function(){var _setPermissionsCallback8=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee370(){return _regenerator2().w(function(_context370){while(1)switch(_context370.n){case 0:V.setPermissionsCallback();_context370.n=1;return V.setCallback("push",navigator.indigitallRequestPushPermission);case 1:return _context370.a(2);}},_callee370);}));function setPermissionsCallback(){return _setPermissionsCallback8.apply(this,arguments);}return setPermissionsCallback;}()}]);}(),_n$Core$Utils11=n(315).Core.Utils,Y=_n$Core$Utils11.Log,F=_n$Core$Utils11.CommonUtils,x=_n$Core$Utils11.ErrorUtils,G=n(315).Core.Models.EventType,K="[IND]IndigitallSafari: ";var W=/*#__PURE__*/function(){function W(){_classCallCheck2(this,W);}return _createClass2(W,null,[{key:"isSafariPushNotificationSupported",value:function isSafariPushNotificationSupported(){var _window8;return!!b.isSafariBrowserDevice()||!!((_window8=window)!==null&&_window8!==void 0&&(_window8=_window8.safari)!==null&&_window8!==void 0&&_window8.pushNotification);}},{key:"launchNotificationPermissionForSafari",value:function(){var _launchNotificationPermissionForSafari=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee371(){var e,_e94,_e95,_t299,_t300;return _regenerator2().w(function(_context371){while(1)switch(_context371.n){case 0:e=new Y(K);if(!(o.getSafariGestureRequestPermission()===G.EVENT_TYPE_ASK)){_context371.n=8;break;}if(!(o.getSafariWebsitePushId()&&o.getDeviceId())){_context371.n=6;break;}if(!(b.isSafariBrowserDevice()&&o.getWorkerPath())){_context371.n=4;break;}_context371.n=1;return navigator.serviceWorker.register(o.getWorkerPath());case 1:_e94=_context371.v;_context371.n=2;return window.Notification.requestPermission();case 2:_t299=_context371.v;_t300="granted"===_t299;if(!_t300){_context371.n=3;break;}o.setPermissionPush(G.EVENT_TYPE_ACCEPT),Ie.subscribeForPushNotification(_e94);case 3:_context371.n=5;break;case 4:_e95=window.safari.pushNotification.permission(o.getSafariWebsitePushId());this.checkRemotePermission(_e95);case 5:_context371.n=7;break;case 6:o.getSafariWebsitePushId()?e.w("error Device Id is not found").writeLog():e.w("error Safari Website Push Id is not found").writeLog();case 7:_context371.n=9;break;case 8:e.w("there was not user gesture to request safari permissions").writeLog();case 9:return _context371.a(2);}},_callee371,this);}));function launchNotificationPermissionForSafari(){return _launchNotificationPermissionForSafari.apply(this,arguments);}return launchNotificationPermissionForSafari;}()},{key:"checkRemotePermission",value:function(){var _checkRemotePermission=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee372(e){var t,_e96,_t301,_t302,_t303;return _regenerator2().w(function(_context372){while(1)switch(_context372.p=_context372.n){case 0:t=new Y(K);_context372.p=1;if(!("default"===e.permission)){_context372.n=3;break;}_e96={deviceCode:o.getDeviceId()};t.d("permission default: ",_e96).writeLog();o.getPermissionPush()||v.callEventPermission(k.PERMISSION_TYPE_PUSH,G.EVENT_TYPE_ASK);_t301=window.safari.pushNotification;_context372.n=2;return L.getURL();case 2:_t302=_context372.v;_t301.requestPermission.call(_t301,_t302+"/safari",o.getSafariWebsitePushId(),_e96,window.indigitall.Push.checkRemotePermission);_context372.n=4;break;case 3:"denied"===e.permission?(t.w("permission denied: ",e).writeLog(),o.getPermissionPush()&&o.getPermissionPush()!=G.EVENT_TYPE_REJECT&&(v.callEventPermission(k.PERMISSION_TYPE_PUSH,G.EVENT_TYPE_REJECT),o.setPermissionPush(G.EVENT_TYPE_REJECT))):"granted"===e.permission&&(t.d("permission granted: ",e).writeLog(),o.getPermissionPush()&&o.getPermissionPush()!=G.EVENT_TYPE_ACCEPT&&(v.callEventPermission(k.PERMISSION_TYPE_PUSH,G.EVENT_TYPE_ACCEPT),o.setPermissionPush(G.EVENT_TYPE_ACCEPT)),e.deviceToken&&e.deviceToken!==o.getPushToken()&&(o.setPushToken(e.deviceToken),L.putDevice(new E(),function(e){if(F.isFunction(navigator.indigitallOnInitialized)){var _e97={};_e97.push=o.getPermissionPush(),_e97.location=o.getPermissionLocation(),navigator.indigitallOnInitialized(_e97,new f());}F.isFunction(navigator.indigitallOnNewUserRegistered)&&!o.getNewUserTimestamp()&&(o.setNewUserTimestamp(Date.now()),navigator.indigitallOnNewUserRegistered(e)),Ie.registerLocation();},navigator.indigitallOnError),o.setServiceTimestamp(Date.now())));case 4:_context372.n=6;break;case 5:_context372.p=5;_t303=_context372.v;F.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(x.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,_t303));case 6:return _context372.a(2);}},_callee372,null,[[1,5]]);}));function checkRemotePermission(_x584){return _checkRemotePermission.apply(this,arguments);}return checkRemotePermission;}()}]);}();var H=new(/*#__PURE__*/_createClass2(function _class34(){_classCallCheck2(this,_class34);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";}))(),q=Object.freeze({GREEN:"green",RED:"red"}),X=n(315).Core.Utils.CommonUtils;var Q=/*#__PURE__*/function(){function Q(){_classCallCheck2(this,Q);}return _createClass2(Q,null,[{key:"setTopicRequest",value:function(){var _setTopicRequest=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee373(e){var t,_t304,_t305;return _regenerator2().w(function(_context373){while(1)switch(_context373.n){case 0:t=new E();_t304=t;_context373.n=1;return o.getAppKeySync();case 1:_t304.setAppKey.call(_t304,_context373.v);_t305=t;_context373.n=2;return o.getDeviceIdSync();case 2:_t305.setDeviceId.call(_t305,_context373.v);t.setServiceWorkerRequest(!0);t.setTopics(e);return _context373.a(2,t);}},_callee373);}));function setTopicRequest(_x585){return _setTopicRequest.apply(this,arguments);}return setTopicRequest;}()},{key:"getTopicsList",value:function(){var _getTopicsList=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee374(e,t){var _n52,_t306;return _regenerator2().w(function(_context374){while(1)switch(_context374.p=_context374.n){case 0:_context374.p=0;_context374.n=1;return o.getTopicList();case 1:_n52=_context374.v;if(!(_n52&&_n52.length>0)){_context374.n=6;break;}_context374.n=2;return se.isTopicTimestampExceed();case 2:if(!_context374.v){_context374.n=3;break;}this.getDeviceTopicClient(e,t);_context374.n=5;break;case 3:_context374.n=4;return o.setTopicSemaphore(q.GREEN);case 4:X.isFunction(e)&&e(_n52);case 5:_context374.n=7;break;case 6:this.getDeviceTopicClient(e,t);case 7:_context374.n=9;break;case 8:_context374.p=8;_t306=_context374.v;_context374.n=9;return o.setTopicSemaphore(q.GREEN);case 9:return _context374.a(2);}},_callee374,this,[[0,8]]);}));function getTopicsList(_x586,_x587){return _getTopicsList.apply(this,arguments);}return getTopicsList;}()},{key:"getDeviceTopicClient",value:function(){var _getDeviceTopicClient=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee377(e,t){var _t307;return _regenerator2().w(function(_context377){while(1)switch(_context377.p=_context377.n){case 0:_context377.p=0;L.getDeviceTopics(new E(),/*#__PURE__*/function(){var _ref7=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee375(t){return _regenerator2().w(function(_context375){while(1)switch(_context375.n){case 0:_context375.n=1;return se.setTopicTimestamp();case 1:_context375.n=2;return o.setTopicList(t);case 2:_context375.n=3;return o.setTopicSemaphore(q.GREEN);case 3:X.isFunction(e)&&e(t);case 4:return _context375.a(2);}},_callee375);}));return function(_x590){return _ref7.apply(this,arguments);};}(),/*#__PURE__*/function(){var _ref8=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee376(e){return _regenerator2().w(function(_context376){while(1)switch(_context376.n){case 0:_context376.n=1;return se.setTopicTimestamp();case 1:_context376.n=2;return o.setTopicSemaphore(q.GREEN);case 2:X.isFunction(t)&&t(e);case 3:return _context376.a(2);}},_callee376);}));return function(_x591){return _ref8.apply(this,arguments);};}());_context377.n=3;break;case 1:_context377.p=1;_t307=_context377.v;_context377.n=2;return o.setTopicSemaphore(q.GREEN);case 2:X.isFunction(t)&&t(_t307);case 3:return _context377.a(2);}},_callee377,null,[[0,1]]);}));function getDeviceTopicClient(_x588,_x589){return _getDeviceTopicClient.apply(this,arguments);}return getDeviceTopicClient;}()}]);}();var J=/*#__PURE__*/function(){function J(e,t){_classCallCheck2(this,J);this.code=e,this.type=t;}return _createClass2(J,[{key:"toJSON",value:function toJSON(){var e={};return this.code&&(e.code=this.code),this.type&&(e.type=this.type),e;}}],[{key:"getAllCodes",value:function getAllCodes(e){var t=[];for(var _n53=0;_n53<e.length;_n53++)t.push(e[_n53].code);return t;}}]);}(),_n$Core$Models5=n(315).Core.Models,z=_n$Core$Models5.Channel,Z=_n$Core$Models5.TopicSubscribeType,_n$Core$Utils12=n(315).Core.Utils,$=_n$Core$Utils12.ErrorUtils,ee=_n$Core$Utils12.Log;var te=/*#__PURE__*/function(){function te(){_classCallCheck2(this,te);}return _createClass2(te,null,[{key:"syncTopics",value:function(){var _syncTopics=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee379(){var _e98;return _regenerator2().w(function(_context379){while(1)switch(_context379.n){case 0:_context379.n=1;return o.getTopicSyncIsProcessing();case 1:if(_context379.v){_context379.n=3;break;}_context379.n=2;return o.setTopicSyncIsProcessing(!0);case 2:_e98=setTimeout(/*#__PURE__*/_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee378(){var _t308;return _regenerator2().w(function(_context378){while(1)switch(_context378.p=_context378.n){case 0:_context378.p=0;_context378.n=1;return te.sendTopicSync();case 1:_context378.n=3;break;case 2:_context378.p=2;_t308=_context378.v;case 3:_context378.n=4;return o.setTopicSyncIsProcessing(!1);case 4:clearTimeout(_e98);case 5:return _context378.a(2);}},_callee378,null,[[0,2]]);})),H.TOPIC_SYNC_TIMESTAMP);case 3:return _context379.a(2);}},_callee379);}));function syncTopics(){return _syncTopics.apply(this,arguments);}return syncTopics;}()},{key:"sendTopicSync",value:function(){var _sendTopicSync=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee384(){var e,t,n,_e99,_t309,_t310;return _regenerator2().w(function(_context384){while(1)switch(_context384.n){case 0:_context384.n=1;return se.filterTopicExistingOnIDB();case 1:e=_context384.v;t=se.topicFilter(e,Z.SUBSCRIBE);n=se.topicFilter(e,Z.UNSUBSCRIBE);if(!(t&&t.length>0)){_context384.n=3;break;}_t309=L;_context384.n=2;return Q.setTopicRequest(t);case 2:_t309.postDeviceTopicsRequest.call(_t309,_context384.v,/*#__PURE__*/function(){var _ref0=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee380(e){return _regenerator2().w(function(_context380){while(1)switch(_context380.n){case 0:_context380.n=1;return se.setTopicTimestamp();case 1:e.channel=z.PUSH;_context380.n=2;return o.setTopicList(e);case 2:se.indigitallSyncTopicEvent(H.TOPIC_SYNC_SUBSCRIBE_CALLBACK,e);case 3:return _context380.a(2);}},_callee380);}));return function(_x592){return _ref0.apply(this,arguments);};}(),/*#__PURE__*/function(){var _ref1=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee381(e){return _regenerator2().w(function(_context381){while(1)switch(_context381.n){case 0:se.indigitallSyncTopicEvent(H.TOPIC_SYNC_SUBSCRIBE_ERROR_CALLBACK,e);case 1:return _context381.a(2);}},_callee381);}));return function(_x593){return _ref1.apply(this,arguments);};}());_context384.n=6;break;case 3:if(!(n&&n.length>0)){_context384.n=5;break;}_t310=L;_context384.n=4;return Q.setTopicRequest(n);case 4:_t310.deleteDeviceTopicsRequest.call(_t310,_context384.v,/*#__PURE__*/function(){var _ref10=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee382(e){return _regenerator2().w(function(_context382){while(1)switch(_context382.n){case 0:_context382.n=1;return se.setTopicTimestamp();case 1:_context382.n=2;return o.setTopicList(e);case 2:se.indigitallSyncTopicEvent(H.TOPIC_SYNC_UNSUBSCRIBE_CALLBACK,e);case 3:return _context382.a(2);}},_callee382);}));return function(_x594){return _ref10.apply(this,arguments);};}(),/*#__PURE__*/function(){var _ref11=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee383(e){return _regenerator2().w(function(_context383){while(1)switch(_context383.n){case 0:se.indigitallSyncTopicEvent(H.TOPIC_SYNC_UNSUBSCRIBE_ERROR_CALLBACK,e);case 1:return _context383.a(2);}},_callee383);}));return function(_x595){return _ref11.apply(this,arguments);};}());_context384.n=6;break;case 5:_e99=$.showError(c,c.ErrorCode.PUSH_TOPICS_ERROR,"there is no topic with one of the codes in the push topic list");se.indigitallSyncTopicEvent(H.TOPIC_SYNC_SUBSCRIBE_ERROR_CALLBACK,_e99),se.indigitallSyncTopicEvent(H.TOPIC_SYNC_UNSUBSCRIBE_ERROR_CALLBACK,_e99);case 6:_context384.n=7;return o.setUpdateTopicSubscribe([]);case 7:return _context384.a(2);}},_callee384);}));function sendTopicSync(){return _sendTopicSync.apply(this,arguments);}return sendTopicSync;}()},{key:"updateTopicAction",value:function(){var _updateTopicAction=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee385(e,t){var n,_i71,_i72,_r37,_s13,_e100,_loop,_e101,_n54,_i73,_r38,_t311,_t312;return _regenerator2().w(function(_context386){while(1)switch(_context386.p=_context386.n){case 0:_context386.n=1;return o.getUpdateTopicSubscribe();case 1:n=_context386.v;if(!(n&&n.length>0)){_context386.n=9;break;}_i71=new ee("[IND]TopicSyncUtils: ");_context386.p=2;_i72=[],_r37=n.filter(function(t){return e.includes(t.code);}),_s13=e.filter(function(e){return!J.getAllCodes(n).includes(e);});if(_s13&&_s13.length>0)for(_e100=0;_e100<_s13.length;_e100++)null!==_s13[_e100]&&_i72.push(new J(_s13[_e100],t).toJSON());if(!(_r37&&_r37.length>0)){_context386.n=5;break;}_loop=/*#__PURE__*/_regenerator2().m(function _loop(_e101){var i,o;return _regenerator2().w(function(_context385){while(1)switch(_context385.n){case 0:i=n.findIndex(function(t){return t.code===_r37[_e101].code;}),o=new J(_r37[_e101].code,t);n[i]=o.toJSON();case 1:return _context385.a(2);}},_loop);});_e101=0;case 3:if(!(_e101<_r37.length)){_context386.n=5;break;}return _context386.d(_regeneratorValues(_loop(_e101)),4);case 4:_e101++;_context386.n=3;break;case 5:_t311=_i72.length>0;if(!_t311){_context386.n=6;break;}_context386.n=6;return o.setUpdateTopicSubscribe(_i72.concat(n));case 6:_context386.n=8;break;case 7:_context386.p=7;_t312=_context386.v;_i71.e("updateTopicAction: "+_t312).writeLog();case 8:_context386.n=10;break;case 9:_n54=[];for(_i73=0;_i73<e.length;_i73++){_r38=e[_i73];_n54.push({code:_r38,type:t});}_context386.n=10;return o.setUpdateTopicSubscribe(_n54);case 10:return _context386.a(2);}},_callee385,null,[[2,7]]);}));function updateTopicAction(_x596,_x597){return _updateTopicAction.apply(this,arguments);}return updateTopicAction;}()}]);}();var ne=te,ie=n(315).Core.Models.TopicSubscribeType,re=n(315).Core.Utils.CommonUtils;var oe=/*#__PURE__*/function(){function oe(){_classCallCheck2(this,oe);}return _createClass2(oe,null,[{key:"updateTopic",value:function(){var _updateTopic=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee388(e,t,n,i){var _this85=this;return _regenerator2().w(function(_context389){while(1)switch(_context389.n){case 0:oe.checkTopicSemaphore().then(/*#__PURE__*/_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee387(){return _regenerator2().w(function(_context388){while(1)switch(_context388.n){case 0:_context388.n=1;return o.setTopicSemaphore(q.RED);case 1:_context388.n=2;return Q.getTopicsList(/*#__PURE__*/function(){var _ref13=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee386(r){return _regenerator2().w(function(_context387){while(1)switch(_context387.n){case 0:_context387.n=1;return _this85.setTopicCallbacks(e,n,i);case 1:_context387.n=2;return _this85.requestTopicBackground(H.TOPIC_SYNC_TAG);case 2:_context387.n=3;return ne.updateTopicAction(t,e);case 3:return _context387.a(2);}},_callee386);}));return function(_x602){return _ref13.apply(this,arguments);};}(),i);case 2:return _context388.a(2);}},_callee387);})));case 1:return _context389.a(2);}},_callee388);}));function updateTopic(_x598,_x599,_x600,_x601){return _updateTopic.apply(this,arguments);}return updateTopic;}()},{key:"checkTopicSemaphore",value:function(){var _checkTopicSemaphore=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee389(){var _t313,_t314;return _regenerator2().w(function(_context390){while(1)switch(_context390.n){case 0:_context390.n=1;return o.getTopicSemaphore();case 1:_t313=_context390.v;_t314=q.RED;if(!(_t313!=_t314)){_context390.n=2;break;}return _context390.a(2,!0);case 2:this.topicSemaphoreWaitTime(function(){return!0;});case 3:return _context390.a(2);}},_callee389,this);}));function checkTopicSemaphore(){return _checkTopicSemaphore.apply(this,arguments);}return checkTopicSemaphore;}()},{key:"topicSemaphoreWaitTime",value:function(){var _topicSemaphoreWaitTime=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee391(e){var t;return _regenerator2().w(function(_context392){while(1)switch(_context392.n){case 0:t=setInterval(/*#__PURE__*/_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee390(){var _t315,_t316,_t317;return _regenerator2().w(function(_context391){while(1)switch(_context391.n){case 0:_context391.n=1;return o.getTopicSemaphore();case 1:_t315=_context391.v;_t316=q.GREEN;_t317=_t315==_t316;if(!_t317){_context391.n=2;break;}clearInterval(t),e();case 2:return _context391.a(2);}},_callee390);})),1e3);case 1:return _context392.a(2);}},_callee391);}));function topicSemaphoreWaitTime(_x603){return _topicSemaphoreWaitTime.apply(this,arguments);}return topicSemaphoreWaitTime;}()},{key:"setTopicCallbacks",value:function(){var _setTopicCallbacks=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee392(e,t,n){var i,r,o,s;return _regenerator2().w(function(_context393){while(1)switch(_context393.n){case 0:i=H.TOPIC_SYNC_SUBSCRIBE_CALLBACK,r=H.TOPIC_SYNC_SUBSCRIBE_ERROR_CALLBACK;e===ie.UNSUBSCRIBE&&(i=H.TOPIC_SYNC_UNSUBSCRIBE_CALLBACK,r=H.TOPIC_SYNC_UNSUBSCRIBE_ERROR_CALLBACK);o=new BroadcastChannel(i);o.onmessage=function(e){re.isFunction(t)&&t(e.data),o.close();};s=new BroadcastChannel(r);s.onmessage=function(e){re.isFunction(n)&&n(e.data),s.close();};case 1:return _context393.a(2);}},_callee392);}));function setTopicCallbacks(_x604,_x605,_x606){return _setTopicCallbacks.apply(this,arguments);}return setTopicCallbacks;}()},{key:"requestTopicBackground",value:function(){var _requestTopicBackground=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee393(e){var t,_t318;return _regenerator2().w(function(_context394){while(1)switch(_context394.n){case 0:_context394.n=1;return I.requestBackgroundSync();case 1:t=_context394.v;_t318=null!=t;if(!_t318){_context394.n=2;break;}_context394.n=2;return t.sync.register(e);case 2:return _context394.a(2);}},_callee393);}));function requestTopicBackground(_x607){return _requestTopicBackground.apply(this,arguments);}return requestTopicBackground;}()},{key:"isTopicTimestampExceed",value:function(){var _isTopicTimestampExceed=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee394(){var e;return _regenerator2().w(function(_context395){while(1)switch(_context395.n){case 0:_context395.n=1;return o.getTopicSyncTimestamp();case 1:e=_context395.v;return _context395.a(2,!(e&&e>Date.now())&&void 0!==e);}},_callee394);}));function isTopicTimestampExceed(){return _isTopicTimestampExceed.apply(this,arguments);}return isTopicTimestampExceed;}()},{key:"setTopicTimestamp",value:function(){var _setTopicTimestamp=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee395(){var e;return _regenerator2().w(function(_context396){while(1)switch(_context396.n){case 0:e=Date.now()+H.TOPIC_SYNC_TIMESTAMP;_context396.n=1;return o.setTopicSyncTimestamp(e);case 1:return _context396.a(2);}},_callee395);}));function setTopicTimestamp(){return _setTopicTimestamp.apply(this,arguments);}return setTopicTimestamp;}()},{key:"indigitallSyncTopicEvent",value:function indigitallSyncTopicEvent(e,t){new BroadcastChannel(e).postMessage(t);}},{key:"topicFilter",value:function topicFilter(e,t){var n=[];if(e)for(var _i74=0;_i74<e.length;_i74++)e[_i74].type===t&&n.push(e[_i74].code);return n;}},{key:"filterTopicExistingOnIDB",value:function(){var _filterTopicExistingOnIDB=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee396(){var e,t,n,_i75,r;return _regenerator2().w(function(_context397){while(1)switch(_context397.n){case 0:_context397.n=1;return o.getUpdateTopicSubscribe();case 1:e=_context397.v;_context397.n=2;return o.getTopicList();case 2:t=_context397.v;n=[];for(_i75=0;_i75<e.length;_i75++)for(r=0;r<t.length;r++)e[_i75]&&t[r]&&e[_i75].code==t[r].code&&(!0===t[r].subscribed&&e[_i75].type==ie.UNSUBSCRIBE||!1===t[r].subscribed&&e[_i75].type==ie.SUBSCRIBE)&&n.push(e[_i75]);return _context397.a(2,n);}},_callee396);}));function filterTopicExistingOnIDB(){return _filterTopicExistingOnIDB.apply(this,arguments);}return filterTopicExistingOnIDB;}()}]);}();var se=oe,_n$Core$Models6=n(315).Core.Models,ae=_n$Core$Models6.EventType,ue=_n$Core$Models6.DeviceStatus,_n$Core$Utils13=n(315).Core.Utils,ce=_n$Core$Utils13.LogLevel,le=_n$Core$Utils13.Log,fe=_n$Core$Utils13.CommonUtils,he=_n$Core$Utils13.ErrorUtils,de=_n$Core$Utils13.CryptoUtils,Ee=n(315).Core.Repository,pe="[IND]IndigitallPush: ";var ye=/*#__PURE__*/function(){function ye(){_classCallCheck2(this,ye);this.config=null,this.interval=null;}return _createClass2(ye,null,[{key:"init",value:function(){var _init2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee398(e){var _this86=this;var _n55,_i76,_r39,_s14,_a13,_e102,_i77,_e103,_t320,_t321,_t322;return _regenerator2().w(function(_context399){while(1)switch(_context399.p=_context399.n){case 0:_context399.p=0;_n55=new le(pe);if(e){_context399.n=1;break;}return _context399.a(2,void _n55.w("config is not defined").writeLog());case 1:e.onPushPermissionChanged&&(e.requestPushPermission=e.onPushPermissionChanged),e.onLocationPermissionChanged&&(e.requestLocationPermission=e.onLocationPermissionChanged),this.config=e,this.config.logLevel?(o.setLogLevel(this.config.logLevel),_n55=new le(pe)):this.config.setDebugLog&&(o.setLogLevel(ce.WARNING),_n55=new le(pe));_i76="https://device-api.indigitall.com/v1",_r39="https://inbox-api.indigitall.com/v1",_s14="https://device-api.indigitall.com/v2";this.config.urlDeviceApi&&(_i76=this.config.urlDeviceApi);this.config.urlInAppApi&&(_s14=this.config.urlInAppApi);this.config.urlInboxApi&&(_r39=this.config.urlInboxApi);o.setAvoidCypher(!!this.config.avoidCypher&&this.config.avoidCypher);_context399.n=2;return o.setUrlDeviceApi(_i76);case 2:t()&&t().setUrlInboxApi(_r39);fe.isFunction(this.config.requestPushPermission)&&(navigator.indigitallRequestPushPermission=this.config.requestPushPermission);fe.isFunction(this.config.requestLocationPermission)&&(navigator.indigitallRequestLocationPermission=this.config.requestLocationPermission);fe.isFunction(this.config.onNewUserRegistered)&&(navigator.indigitallOnNewUserRegistered=this.config.onNewUserRegistered);fe.isFunction(this.config.onInitialized)&&(navigator.indigitallOnInitialized=this.config.onInitialized);fe.isFunction(this.config.onError)&&(navigator.indigitallOnError=this.config.onError);fe.isFunction(this.config.onLocationUpdated)&&(navigator.indigitallOnLocationUpdated=this.config.onLocationUpdated);if(!this.config.disabledPushService){_context399.n=4;break;}_t320=this.config.appKey;if(!_t320){_context399.n=3;break;}_context399.n=3;return o.setAppKey(this.config.appKey);case 3:o.setPushDisabled(!0);_n55.i("Push Service disabled").writeLog();fe.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError("Push Service disabled");return _context399.a(2,!1);case 4:o.setTimeoutRequestsInMilliseconds(0),this.config.timeoutRequestsInMilliseconds&&o.setTimeoutRequestsInMilliseconds(this.config.timeoutRequestsInMilliseconds);_context399.n=5;return j.getPushPermission();case 5:_a13=_context399.v;if(!(j.setPermissionsCallback(),_a13&&"denied"===_a13.push)){_context399.n=6;break;}return _context399.a(2,(_n55.i("Push permission denied").writeLog(),fe.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError("Push permission denied"),!1));case 6:if(fe.isServiceTimestampExceed()){_context399.n=7;break;}return _context399.a(2,(this.device=new f(),j.getPermissions().then(function(e){fe.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(e,new f());}),_n55.d("Device enabled").writeLog(),!0));case 7:_e102="",_i77=null;if(!(!this.config||!this.config.appKey)){_context399.n=8;break;}return _context399.a(2,(_n55.w("config.appKey is not defined").writeLog(),!1));case 8:_e102=this.config.appKey;_t321=this.config.requestLocation;if(!_t321){_context399.n=9;break;}_context399.n=9;return o.setRequestLocation(this.config.requestLocation);case 9:this.config.workerPath&&(_i77=this.config.workerPath,o.setWorkerPath(_i77));if(!_e102){_context399.n=12;break;}_context399.n=10;return o.setAppKey(_e102);case 10:if(!ye.isServiceWorkerSupported()){_context399.n=11;break;}_e103=new B();return _context399.a(2,(L.getBrowser(_e103,function(e){if(e.supported||_this86.isSafariBrowserDevice()){_n55.d("browser supported for webpush").writeLog();var _r40=new B();L.getApplicationAll(_r40,/*#__PURE__*/function(){var _ref15=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee397(r){var _e104,a,_t319;return _regenerator2().w(function(_context398){while(1)switch(_context398.n){case 0:if(!(_n55.d("application ",r).writeLog(),r&&r.data&&r.data.configuration)){_context398.n=2;break;}_e104=r.data.configuration;_n55.d("configuration ",_e104).writeLog();_e104.vapidPublic&&o.setVAPID(_e104.vapidPublic);_e104.safariWebsitePushId&&o.setSafariWebsitePushId(_e104.safariWebsitePushId);_e104.enabled&&o.setEnabled(_e104.enabled);_e104.serviceSyncTime&&o.setServiceSyncTime(_e104.serviceSyncTime);_e104.locationEnabled&&o.setLocationEnabled(_e104.locationEnabled);_e104.locationUpdateMinutes&&o.setLocationUpdateMinutes(_e104.locationUpdateMinutes);_e104.inboxAuthMode&&t()&&t().setInboxAuthMode(_e104.inboxAuthMode);_t319=_e104.inAppEnabled;if(!_t319){_context398.n=1;break;}o.setInAppEnabled(_e104.inAppEnabled);_context398.n=1;return o.setUrlInappApi(_s14);case 1:_e104.encryptionType&&o.setEncryptionType(_e104.encryptionType);case 2:a=new E();o.getDeviceId()&&o.getPushToken()?L.putDevice(a,function(t){try{if(fe.isServiceTimestampExceed()){var _e105=new m();_e105.setAppKey(o.getAppKey()),_e105.setDeviceId(o.getDeviceId()),L.postEventVisit(_e105);}t.registeredByCookie?(o.setServiceTimestamp(Date.now()),j.getPushPermission().then(function(e){var t=new f();t.deviceId&&_n55.i("deviceId:",t.deviceId).writeLog(),t.pushToken&&_n55.i("pushToken:",t.pushToken).writeLog(),_this86.config&&fe.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(e,t);})):"Safari"!==e.browserName&&ye.registerForPush(_i77);}catch(e){fe.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(he.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,e));}},navigator.indigitallOnError):L.postDevice(a,function(t){try{var _n56=new m();_n56.setAppKey(o.getAppKey()),_n56.setDeviceId(o.getDeviceId()),L.postEventVisit(_n56),t.registeredByCookie?o.setServiceTimestamp(Date.now()):"Safari"!==e.browserName&&ye.registerForPush(_i77);}catch(e){fe.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(he.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,e));}},function(e){404===e.errorCode&&o.clearStorage(),fe.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(e);});case 3:return _context398.a(2);}},_callee397);}));return function(_x609){return _ref15.apply(this,arguments);};}(),navigator.indigitallOnError);}else _n55.w("Browser not Supported").writeLog();},navigator.indigitallOnError),!0));case 11:_n55.w("ServiceWorker and SafariPushNotification not supported").writeLog();_context399.n=13;break;case 12:_n55.w("appKey is not found").writeLog();case 13:_context399.n=15;break;case 14:_context399.p=14;_t322=_context399.v;fe.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(he.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,_t322));case 15:return _context399.a(2,!1);}},_callee398,this,[[0,14]]);}));function init(_x608){return _init2.apply(this,arguments);}return init;}()},{key:"deviceGet",value:function deviceGet(e,t){return L.getDevice(new E(),e,t),!0;}},{key:"deviceEnable",value:function deviceEnable(e,t){var n=new E(ue.ENABLE);return n.isDeviceUpdated(!0),L.putDevice(n,e,t),!0;}},{key:"deviceDisable",value:function deviceDisable(e,t){var n=new E(ue.DISABLE);return n.isDeviceUpdated(!0),L.putDevice(n,e,t),!0;}},{key:"topicsList",value:function topicsList(e,t){return L.getDeviceTopics(new E(),/*#__PURE__*/function(){var _ref16=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee399(t){return _regenerator2().w(function(_context400){while(1)switch(_context400.n){case 0:fe.isFunction(e)&&e(t);case 1:return _context400.a(2);}},_callee399);}));return function(_x610){return _ref16.apply(this,arguments);};}(),function(e){fe.isFunction(t)&&t(e);}),!0;}},{key:"topicsSubscribe",value:function topicsSubscribe(e,t,n){var i=new E();return i.setTopics(e),L.postDeviceTopics(i,function(e){fe.isFunction(t)&&t(e);},function(e){fe.isFunction(n)&&n(e);}),!0;}},{key:"topicsUnsubscribe",value:function topicsUnsubscribe(e,t,n){var i=new E();return i.setTopics(e),L.deleteDeviceTopics(i,function(e){fe.isFunction(t)&&t(e);},function(e){fe.isFunction(n)&&n(e);}),!0;}},{key:"topicsSubscribeUpdate",value:function(){var _topicsSubscribeUpdate=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee400(e,t,n,i){return _regenerator2().w(function(_context401){while(1)switch(_context401.n){case 0:se.updateTopic(e,t,n,i);case 1:return _context401.a(2);}},_callee400);}));function topicsSubscribeUpdate(_x611,_x612,_x613,_x614){return _topicsSubscribeUpdate.apply(this,arguments);}return topicsSubscribeUpdate;}()},{key:"registerForPush",value:function registerForPush(e){o.setWorkerPath(e),ye.isServiceWorkerSupported()&&ye.launchNotificationPermission(e);}},{key:"isSafariPushNotificationSupported",value:function isSafariPushNotificationSupported(){return W.isSafariPushNotificationSupported();}},{key:"isServiceWorkerSupported",value:function isServiceWorkerSupported(){return"serviceWorker"in navigator;}},{key:"registerServiceWorker",value:function registerServiceWorker(e){var t=new le(pe);var n="/service-worker.js";return e&&(n=e),navigator.serviceWorker.register(n).then(function(e){return t.d("ServiceWorker registration successful with scope: "+e.scope).writeLog(),e;})["catch"](function(e){return t.e("ServiceWorker registration failed: ",e).writeLog(),e;});}},{key:"launchNotificationPermissionForSafari",value:function launchNotificationPermissionForSafari(){this.registerForPush(o.getWorkerPath());}},{key:"isSafariBrowserDevice",value:function isSafariBrowserDevice(){return b.isSafariBrowserDevice();}},{key:"launchNotificationPermission",value:function launchNotificationPermission(e){var t=new le(pe);this.registerServiceWorker(e).then(function(e){try{var _n57;e.installing?_n57=e.installing:e.waiting?_n57=e.waiting:e.active&&(_n57=e.active),_n57&&(t.d("sw current state "+_n57.state).writeLog(),"activated"==_n57.state?ye.subscribeForPushNotification(e):("installed"==_n57.state&&o.getPushToken()&&e.update(),_n57.addEventListener("statechange",function(n){t.d("sw statechange : "+n.target.state).writeLog(),"activated"==n.target.state&&ye.subscribeForPushNotification(e);})));}catch(e){fe.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(he.showError(c,c.ErrorCode.PUSH_INITIALIZATION_ERROR,e));}});}},{key:"subscribeForPushNotification",value:function(){var _subscribeForPushNotification=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee401(e){var t,_n58,_i78,_r41,_t323;return _regenerator2().w(function(_context402){while(1)switch(_context402.p=_context402.n){case 0:t=new le(pe);_context402.p=1;_n58={userVisibleOnly:!0,applicationServerKey:v.urlBase64ToUint8Array(o.getVAPID())};t.d("Registration: ",e).writeLog(),o.getPermissionPush()||v.callEventPermission(k.PERMISSION_TYPE_PUSH,ae.EVENT_TYPE_ASK);_context402.n=2;return e.pushManager.subscribe(_n58);case 2:_i78=_context402.v;t.d("Received PushSubscription: "+_i78).writeLog(),o.getPermissionPush()&&o.getPermissionPush()===ae.EVENT_TYPE_ACCEPT||(v.callEventPermission(k.PERMISSION_TYPE_PUSH,ae.EVENT_TYPE_ACCEPT),o.setPermissionPush(ae.EVENT_TYPE_ACCEPT));_r41=_i78.toJSON();o.setBrowserPublicKey(_r41.keys.p256dh),o.setBrowserPrivateKey(_r41.keys.auth),o.setPushToken(_r41.endpoint),L.putDevice(new E(),function(e){j.getPermissions().then(function(e){fe.isFunction(navigator.indigitallOnInitialized)&&navigator.indigitallOnInitialized(e,new f());}),fe.isFunction(navigator.indigitallOnNewUserRegistered)&&!o.getNewUserTimestamp()&&(o.setNewUserTimestamp(Date.now()),navigator.indigitallOnNewUserRegistered(e)),ye.registerLocation();},navigator.indigitallOnError),o.setServiceTimestamp(Date.now());_context402.n=4;break;case 3:_context402.p=3;_t323=_context402.v;t.e("No Registration: "+_t323).writeLog(),o.getPermissionPush()&&o.getPermissionPush()===ae.EVENT_TYPE_REJECT||(v.callEventPermission(k.PERMISSION_TYPE_PUSH,ae.EVENT_TYPE_REJECT),o.setPermissionPush(ae.EVENT_TYPE_REJECT)),fe.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(_t323);case 4:return _context402.a(2);}},_callee401,null,[[1,3]]);}));function subscribeForPushNotification(_x615){return _subscribeForPushNotification.apply(this,arguments);}return subscribeForPushNotification;}()},{key:"registerLocation",value:function registerLocation(){var e=new le(pe);try{navigator.geolocation&&o.getRequestLocation()&&o.getLocationEnabled()&&(!o.getLocationTimestamp()||o.getLocationUpdateMinutes()<=(Date.now()-o.getLocationTimestamp())/6e4)&&(o.getPermissionLocation()||v.callEventPermission(k.PERMISSION_TYPE_LOCATION,ae.EVENT_TYPE_ASK),navigator.geolocation.getCurrentPosition(function(e){o.getPermissionLocation()||o.getPermissionLocation()==ae.EVENT_TYPE_ACCEPT||(v.callEventPermission(k.PERMISSION_TYPE_LOCATION,ae.EVENT_TYPE_ACCEPT),o.setPermissionLocation(ae.EVENT_TYPE_ACCEPT));var t=new m();t.setLocation(e.coords.latitude,e.coords.longitude),L.postEventLocation(t),fe.isFunction(navigator.indigitallOnLocationUpdated)&&navigator.indigitallOnLocationUpdated(e),o.setLocationTimestamp(Date.now());},function(t){e.e("error "+t).writeLog(),o.getPermissionLocation()||o.getPermissionLocation()==ae.EVENT_TYPE_REJECT||(v.callEventPermission(k.PERMISSION_TYPE_LOCATION,ae.EVENT_TYPE_REJECT),o.setPermissionLocation(ae.EVENT_TYPE_REJECT));}));}catch(e){fe.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(he.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,e));}}},{key:"requestPushPermission",value:function requestPushPermission(e){j.getPushPermission().then(function(t){fe.isFunction(e)&&e(t);});}},{key:"onPermissionChange",value:function onPermissionChange(){j.setPermissionsCallback();}},{key:"requestLocationPermission",value:function requestLocationPermission(e){j.getLocationPermission().then(function(t){fe.isFunction(e)&&e(t);});}},{key:"logIn",value:function logIn(e,t,n){ye.setExternalId(e,t,n);}},{key:"logout",value:function logout(e,t){ye.setExternalId(null,e,t);}},{key:"setExternalCode",value:function setExternalCode(e,t,n){ye.setExternalId(e,t,n);}},{key:"setExternalId",value:function(){var _setExternalId=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee402(e,t,n){var _i79,_r42,_t324;return _regenerator2().w(function(_context403){while(1)switch(_context403.p=_context403.n){case 0:_context403.p=0;_i79=o.getAppKey();if(_i79){_context403.n=1;break;}return _context403.a(2,void(fe.isFunction(n)&&n(he.showError(c,c.ErrorCode.API_APPKEY_NOT_VALID))));case 1:if(!(null!=e)){_context403.n=3;break;}_context403.n=2;return de.createHmac(_i79,e);case 2:_r42=_context403.v;_r42&&this.setExternalIdRequest(_r42,t,n);_context403.n=4;break;case 3:this.setExternalIdRequest(null,t,n);case 4:_context403.n=6;break;case 5:_context403.p=5;_t324=_context403.v;fe.isFunction(n)&&n(he.showError(c,c.ErrorCode.PUSH_DEVICE_ERROR,_t324));case 6:return _context403.a(2);}},_callee402,this,[[0,5]]);}));function setExternalId(_x616,_x617,_x618){return _setExternalId.apply(this,arguments);}return setExternalId;}()},{key:"setExternalIdRequest",value:function(){var _setExternalIdRequest8=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee403(e,t,n){var i,r,s;return _regenerator2().w(function(_context404){while(1)switch(_context404.n){case 0:o.setExternalId(e);_context404.n=1;return j.getPushPermission();case 1:i=_context404.v.push;_context404.n=2;return o.getRegisteredByCookie();case 2:r=_context404.v;if("granted"===i||r){_context404.n=3;break;}return _context404.a(2,void(fe.isFunction(n)&&n(he.showError(c,c.ErrorCode.PUSH_PERMISSION_NOT_ACCEPTED))));case 3:if(!o.isPushDisabled()){_context404.n=4;break;}return _context404.a(2,void(fe.isFunction(n)&&n(he.showError(c,c.ErrorCode.DISABLED_CHANNEL))));case 4:s=new E();_context404.n=5;return o.setExternalIdRequest(e);case 5:s.setExternalCode(e);s.isDeviceUpdated(!0);L.putDevice(s,function(e){fe.isFunction(t)&&t(new f(e));},n);case 6:return _context404.a(2);}},_callee403);}));function setExternalIdRequest(_x619,_x620,_x621){return _setExternalIdRequest8.apply(this,arguments);}return setExternalIdRequest;}()},{key:"sendCustomEvent",value:function sendCustomEvent(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var i=arguments.length>3?arguments[3]:undefined;var r=arguments.length>4?arguments[4]:undefined;try{var _s15="",_a14={},_u6=!0;"string"==typeof e?_s15=e:"object"==_typeof2(e)&&(_s15=e.eventType,e.customData&&(_a14=e.customData),!1===e.async&&(_u6=e.async));var _c2=new m();_c2.setDeviceId(o.getDeviceId()),_c2.setEventType(_s15),_c2.setCustomData(_a14),null!=o.getExternalId()&&"null"!=o.getExternalId()?(_c2.setExternalCode(o.getExternalId()),_c2.setJourneyRequest(!0),_c2.setEventId(t),_c2.setEventAt(n),!1===_u6?L.postEventJourneySync(_c2,i,r):L.postEventJourney(_c2,i,r)):!1===_u6?L.postEventCustomSync(_c2,i,r):L.postEventCustom(_c2,i,r);}catch(e){fe.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(he.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,e));}}},{key:"sendJourneyEvent",value:function sendJourneyEvent(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var i=arguments.length>3?arguments[3]:undefined;var r=arguments.length>4?arguments[4]:undefined;try{var _s16="",_a15={},_u7=!0;"string"==typeof e?_s16=e:"object"==_typeof2(e)&&(_s16=e.eventType,e.customData&&(_a15=e.customData),!1===e.async&&(_u7=e.async));var _c3=new m();_c3.setDeviceId(o.getDeviceId()),_c3.setExternalCodeRequest(),_c3.setEventType(_s16),_c3.setCustomData(_a15),_c3.setJourneyRequest(!0),_c3.setEventId(t),_c3.setEventAt(n),!1===_u7?L.postEventJourneySync(_c3,i,r):L.postEventJourney(_c3,i,r);}catch(e){fe.isFunction(navigator.indigitallOnError)&&navigator.indigitallOnError(he.showError(c,c.ErrorCode.PUSH_EVENT_ERROR,e));}}}]);}();var Ie=ye;window.indigitall||(window.indigitall={}),window.indigitall.Push=ye,window.indigitall.Push.PermissionUtils=j,window.indigitall.LogLevel=ce,window.indigitall.version=o.getVersion();}(),i;}();});/***/},/***/904:function _(module){"use strict";module.exports=/*#__PURE__*/JSON.parse('{"_from":"indigitall-web-core@4.16.6","_id":"indigitall-web-core@4.16.6","_inBundle":false,"_integrity":"sha512-045LGrA/PpWZIGvHBx0xkXDeksNgYV7dHmOMMC8Ij91HirZRH7l7yOLaSFQTbFC1l5vAIJxdPNRqvwDUTGjvCQ==","_location":"/indigitall-web-core","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"indigitall-web-core@4.16.6","name":"indigitall-web-core","escapedName":"indigitall-web-core","rawSpec":"4.16.6","saveSpec":null,"fetchSpec":"4.16.6"},"_requiredBy":["#USER","/","/indigitall-web-notification"],"_resolved":"https://registry.npmjs.org/indigitall-web-core/-/indigitall-web-core-4.16.6.tgz","_shasum":"76f7bf9db6a6a2777bf5e32fa1c8a0ed4e033ef9","_spec":"indigitall-web-core@4.16.6","_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.16.6"}');/***/},/***/330:function _(module){"use strict";module.exports=/*#__PURE__*/JSON.parse('{"name":"indigitall-web-sdk","description":"indigitall webpush SDK","version":"4.16.6","main":"index.js","author":"Smart2me S.L.","homepage":"https://indigitall.com","dependencies":{"indigitall-web-core":"^4.16.6","indigitall-web-customer":"^4.16.6","indigitall-web-inapp":"^4.16.6","indigitall-web-inbox":"^4.16.6","indigitall-web-notification":"^4.16.6"},"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"}}');/***/}/******/};/************************************************************************//******/// The module cache
284
+ /******/var __webpack_module_cache__={};/******//******/// The require function
285
+ /******/function __webpack_require__(moduleId){/******/// Check if module is in cache
286
+ /******/var cachedModule=__webpack_module_cache__[moduleId];/******/if(cachedModule!==undefined){/******/return cachedModule.exports;/******/}/******/// Create a new module (and put it into the cache)
287
+ /******/var module=__webpack_module_cache__[moduleId]={/******/// no module.id needed
288
+ /******/// no module.loaded needed
289
+ /******/exports:{}/******/};/******//******/// Execute the module function
290
+ /******/__webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__);/******//******/// Return the exports of the module
291
+ /******/return module.exports;/******/}/******//************************************************************************//******//* webpack/runtime/compat get default export *//******/(function(){/******/// getDefaultExport function for compatibility with non-harmony modules
292
+ /******/__webpack_require__.n=function(module){/******/var getter=module&&module.__esModule?/******/function(){return module['default'];}:/******/function(){return module;};/******/__webpack_require__.d(getter,{a:getter});/******/return getter;/******/};/******/})();/******//******//* webpack/runtime/define property getters *//******/(function(){/******/// define getter functions for harmony exports
293
+ /******/__webpack_require__.d=function(exports,definition){/******/for(var key in definition){/******/if(__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)){/******/Object.defineProperty(exports,key,{enumerable:true,get:definition[key]});/******/}/******/}/******/};/******/})();/******//******//* webpack/runtime/hasOwnProperty shorthand *//******/(function(){/******/__webpack_require__.o=function(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop);};/******/})();/******//******//* webpack/runtime/make namespace object *//******/(function(){/******/// define __esModule on exports
294
+ /******/__webpack_require__.r=function(exports){/******/if(typeof Symbol!=='undefined'&&Symbol.toStringTag){/******/Object.defineProperty(exports,Symbol.toStringTag,{value:'Module'});/******/}/******/Object.defineProperty(exports,'__esModule',{value:true});/******/};/******/})();/******//************************************************************************/var __webpack_exports__={};// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
295
+ (function(){"use strict";__webpack_require__.r(__webpack_exports__);/* harmony import */var indigitall_web_inapp__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(326);/* harmony import */var indigitall_web_inapp__WEBPACK_IMPORTED_MODULE_0___default=/*#__PURE__*/__webpack_require__.n(indigitall_web_inapp__WEBPACK_IMPORTED_MODULE_0__);/* harmony import */var indigitall_web_inbox__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(824);/* harmony import */var indigitall_web_inbox__WEBPACK_IMPORTED_MODULE_1___default=/*#__PURE__*/__webpack_require__.n(indigitall_web_inbox__WEBPACK_IMPORTED_MODULE_1__);/* harmony import */var indigitall_web_customer__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(960);/* harmony import */var indigitall_web_customer__WEBPACK_IMPORTED_MODULE_2___default=/*#__PURE__*/__webpack_require__.n(indigitall_web_customer__WEBPACK_IMPORTED_MODULE_2__);/* harmony import */var indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(603);/* harmony import */var indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3___default=/*#__PURE__*/__webpack_require__.n(indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3__);/* eslint-disable require-jsdoc *//* eslint-disable max-len */// Common Classes
296
+ var _webpack_require__$C=__webpack_require__(315).Core.Utils,Log=_webpack_require__$C.Log,LogLevel=_webpack_require__$C.LogLevel,CommonUtils=_webpack_require__$C.CommonUtils,ErrorUtils=_webpack_require__$C.ErrorUtils;var Repository=__webpack_require__(315).Core.Repository;var pkg=__webpack_require__(330);var Channel=__webpack_require__(315).Core.Models.Channel;// eslint-disable-next-line no-unused-vars
297
+ var TAG='[IND]Indigitall: ';/**
298
+ * indigitall SDK class
299
+ *
300
+ * @class Indigitall
301
+ */var Indigitall=/*#__PURE__*/function(){function Indigitall(){_classCallCheck2(this,Indigitall);this.config=null;}// Push
302
+ /**
303
+ * Initialize indigitall's services with configuration
304
+ *
305
+ * @method init
306
+ * @static
307
+ * @param {Object} config Object with configuration values { appKey: String, requireInteraction: Boolean, workerPath: String, logLevel: LogLevel}
308
+ * @return {Boolean} Returns true on success
309
+ */return _createClass2(Indigitall,null,[{key:"init",value:function(){var _init3=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee404(config){return _regenerator2().w(function(_context405){while(1)switch(_context405.n){case 0:return _context405.a(2,indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3___default().init(config));}},_callee404);}));function init(_x622){return _init3.apply(this,arguments);}return init;}()/**
310
+ * Get Device data
311
+ *
312
+ * @method deviceGet
313
+ * @static
314
+ * @param {Function} success A callback function when is success
315
+ * @param {Function} error A callback function when is error
316
+ * @return {Boolean} Returns true
317
+ */},{key:"deviceGet",value:function deviceGet(success,error){return indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3___default().deviceGet(success,error);}/**
318
+ * Enable the Device to receive push notification
319
+ *
320
+ * @method deviceEnable
321
+ * @static
322
+ * @param {Function} success A callback function when is success
323
+ * @param {Function} error A callback function when is error
324
+ * @return {Boolean} Returns true
325
+ */},{key:"deviceEnable",value:function deviceEnable(success,error){return indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3___default().deviceEnable(success,error);}/**
326
+ * Disable the Device to receive push notification
327
+ *
328
+ * @method deviceDisable
329
+ * @static
330
+ * @param {Function} success A callback function when is success
331
+ * @param {Function} error A callback function when is error
332
+ * @return {Boolean} Returns true
333
+ */},{key:"deviceDisable",value:function deviceDisable(success,error){return indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3___default().deviceDisable(success,error);}/**
334
+ * Get Device topics
335
+ *
336
+ * @method topicsList
337
+ * @static
338
+ * @param {Function} success A callback function when is success
339
+ * @param {Function} error A callback function when is error
340
+ * @return {Boolean} Returns true
341
+ */},{key:"topicsList",value:function topicsList(success,error){var _this87=this;return indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3___default().topicsList(function(topics){_this87.inAppTopicList(topics,success,function(onError){var log=new Log(TAG);log.w(onError.message).writeLog();if(CommonUtils.isFunction(success))success(topics);});},function(pushTopicError){var log=new Log(TAG);log.w(pushTopicError).writeLog();_this87.inAppTopicList(null,success,error);if(CommonUtils.isFunction(error))error(pushTopicError);});}},{key:"inAppTopicList",value:function(){var _inAppTopicList=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee407(pushTopics,success,error){return _regenerator2().w(function(_context408){while(1)switch(_context408.n){case 0:if(!(new Repository().isInAppEnabled()==='true')){_context408.n=1;break;}indigitall_web_inapp__WEBPACK_IMPORTED_MODULE_0___default().topicsList(/*#__PURE__*/function(){var _ref17=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee405(inAppTopics){return _regenerator2().w(function(_context406){while(1)switch(_context406.n){case 0:if(!(pushTopics!=null)){_context406.n=3;break;}_context406.n=1;return new Repository().setTopicList(pushTopics);case 1:_context406.n=2;return new Repository().setInAppTopicList(inAppTopics);case 2:if(CommonUtils.isFunction(success))success(inAppTopics.concat(pushTopics));_context406.n=5;break;case 3:_context406.n=4;return new Repository().setInAppTopicList(inAppTopics);case 4:if(CommonUtils.isFunction(success))success(inAppTopics);case 5:return _context406.a(2);}},_callee405);}));return function(_x626){return _ref17.apply(this,arguments);};}(),/*#__PURE__*/function(){var _ref18=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee406(onError){return _regenerator2().w(function(_context407){while(1)switch(_context407.n){case 0:if(!(pushTopics!=null)){_context407.n=2;break;}_context407.n=1;return new Repository().setTopicList(pushTopics);case 1:if(CommonUtils.isFunction(success))success(pushTopics);_context407.n=3;break;case 2:if(CommonUtils.isFunction(error))error(onError);case 3:return _context407.a(2);}},_callee406);}));return function(_x627){return _ref18.apply(this,arguments);};}());_context408.n=4;break;case 1:if(!(pushTopics!=null)){_context408.n=3;break;}_context408.n=2;return new Repository().setTopicList(pushTopics);case 2:if(CommonUtils.isFunction(success))success(pushTopics);_context408.n=4;break;case 3:if(CommonUtils.isFunction(error))error(ErrorUtils.showError(null,null,'Internal error bad topic list'));case 4:return _context408.a(2);}},_callee407);}));function inAppTopicList(_x623,_x624,_x625){return _inAppTopicList.apply(this,arguments);}return inAppTopicList;}()/**
342
+ * Get Device topics
343
+ *
344
+ * @method inAppTopicsListFromConsole
345
+ * @Deprecated useless to un/subscribe inApp topics
346
+ * @static
347
+ * @param {InAppConfiguration} config Config with params. new 'limit: elements for page'
348
+ * @param {Function} success A callback function when is success
349
+ * @param {Function} error A callback function when is error
350
+ */},{key:"inAppTopicsListFromConsole",value:function inAppTopicsListFromConsole(config,success,error){indigitall_web_inapp__WEBPACK_IMPORTED_MODULE_0___default().topicsListFromConsole(config,success,error);}/**
351
+ * Subscribe new Topics
352
+ *
353
+ * @method topicsSubscribe
354
+ * @static
355
+ * @param {Object} topicsCodes List of topic codes
356
+ * @param {Function} success A callback function when is success
357
+ * @param {Function} error A callback function when is error
358
+ */},{key:"topicsSubscribe",value:function topicsSubscribe(topicsCodes,success,error){var _this88=this;if(new Repository().isInAppEnabled()==='true'){indigitall_web_inapp__WEBPACK_IMPORTED_MODULE_0___default().topicsSubscribe(topicsCodes,function(inAppTopics){_this88.pushTopicsSubscribe(topicsCodes,inAppTopics,success,error);},/*#__PURE__*/function(){var _ref19=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee408(onError){var log;return _regenerator2().w(function(_context409){while(1)switch(_context409.n){case 0:log=new Log(TAG);log.w(onError).writeLog();_this88.pushTopicsSubscribe(topicsCodes,null,success,error);case 1:return _context409.a(2);}},_callee408);}));return function(_x628){return _ref19.apply(this,arguments);};}());}else{this.pushTopicsSubscribe(topicsCodes,null,success,error);}}},{key:"pushTopicsSubscribe",value:function pushTopicsSubscribe(topicsCodes,inAppTopics,success,error){var _this89=this;indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3___default().topicsSubscribe(topicsCodes,/*#__PURE__*/function(){var _ref20=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee409(pushTopics){return _regenerator2().w(function(_context410){while(1)switch(_context410.n){case 0:_this89.topicActionOnSuccess(inAppTopics,pushTopics,success);case 1:return _context410.a(2);}},_callee409);}));return function(_x629){return _ref20.apply(this,arguments);};}(),/*#__PURE__*/function(){var _ref21=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee410(onError){return _regenerator2().w(function(_context411){while(1)switch(_context411.n){case 0:_this89.topicActionOnError(inAppTopics,onError,success,error);case 1:return _context411.a(2);}},_callee410);}));return function(_x630){return _ref21.apply(this,arguments);};}());}/**
359
+ * Unsubscribe Topics
360
+ *
361
+ * @method topicsUnsubscribe
362
+ * @static
363
+ * @param {Object} topicsCodes List of topic codes
364
+ * @param {Function} success A callback function when is success
365
+ * @param {Function} error A callback function when is error
366
+ * @return {Boolean} Returns true
367
+ */},{key:"topicsUnsubscribe",value:(function(){var _topicsUnsubscribe=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee412(topicsCodes,success,error){var _this90=this;return _regenerator2().w(function(_context413){while(1)switch(_context413.n){case 0:if(new Repository().isInAppEnabled()==='true'){indigitall_web_inapp__WEBPACK_IMPORTED_MODULE_0___default().topicsUnsubscribe(topicsCodes,function(inAppTopics){_this90.pushTopicsUnsubscribe(topicsCodes,inAppTopics,success,error);},/*#__PURE__*/function(){var _ref22=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee411(onError){var log;return _regenerator2().w(function(_context412){while(1)switch(_context412.n){case 0:log=new Log(TAG);log.w(onError).writeLog();_this90.pushTopicsUnsubscribe(topicsCodes,null,success,error);case 1:return _context412.a(2);}},_callee411);}));return function(_x634){return _ref22.apply(this,arguments);};}());}else{this.pushTopicsUnsubscribe(topicsCodes,null,success,error);}case 1:return _context413.a(2);}},_callee412,this);}));function topicsUnsubscribe(_x631,_x632,_x633){return _topicsUnsubscribe.apply(this,arguments);}return topicsUnsubscribe;}())},{key:"pushTopicsUnsubscribe",value:function pushTopicsUnsubscribe(topicsCodes,inAppTopics,success,error){var _this91=this;indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3___default().topicsUnsubscribe(topicsCodes,/*#__PURE__*/function(){var _ref23=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee413(pushTopics){return _regenerator2().w(function(_context414){while(1)switch(_context414.n){case 0:_this91.topicActionOnSuccess(inAppTopics,pushTopics,success);case 1:return _context414.a(2);}},_callee413);}));return function(_x635){return _ref23.apply(this,arguments);};}(),/*#__PURE__*/function(){var _ref24=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee414(onError){return _regenerator2().w(function(_context415){while(1)switch(_context415.n){case 0:_this91.topicActionOnError(inAppTopics,onError,success,error);case 1:return _context415.a(2);}},_callee414);}));return function(_x636){return _ref24.apply(this,arguments);};}());}},{key:"topicActionOnSuccess",value:function(){var _topicActionOnSuccess=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee415(inAppTopics,pushTopics,success){var topics;return _regenerator2().w(function(_context416){while(1)switch(_context416.n){case 0:topics=[];if(!(inAppTopics!=null)){_context416.n=1;break;}topics=inAppTopics;_context416.n=1;return new Repository().setInAppTopicList(inAppTopics);case 1:if(!(pushTopics!=null)){_context416.n=2;break;}_context416.n=2;return new Repository().setTopicList(pushTopics);case 2:if(CommonUtils.isFunction(success))success(topics.concat(pushTopics));case 3:return _context416.a(2);}},_callee415);}));function topicActionOnSuccess(_x637,_x638,_x639){return _topicActionOnSuccess.apply(this,arguments);}return topicActionOnSuccess;}()},{key:"topicActionOnError",value:function(){var _topicActionOnError=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee416(inAppTopics,onError,success,error){var log;return _regenerator2().w(function(_context417){while(1)switch(_context417.n){case 0:log=new Log(TAG);log.w("".concat(onError.errorCode,": ").concat(onError.exceptionMessage)).writeLog();if(!(inAppTopics!=null)){_context417.n=2;break;}_context417.n=1;return new Repository().setInAppTopicList(inAppTopics);case 1:if(CommonUtils.isFunction(success))success(inAppTopics);_context417.n=3;break;case 2:if(CommonUtils.isFunction(error))error(onError);case 3:return _context417.a(2);}},_callee416);}));function topicActionOnError(_x640,_x641,_x642,_x643){return _topicActionOnError.apply(this,arguments);}return topicActionOnError;}()/**
368
+ * Set new external ID
369
+ *
370
+ * @method setExternalId
371
+ * @static
372
+ * @param {String} externalId External Id defined to deviceID
373
+ * @param {Function} success A callback function when is success
374
+ * @param {Function} error A callback function when is error
375
+ *
376
+ */},{key:"setExternalId",value:(function(){var _setExternalId2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee417(externalId,success,error){return _regenerator2().w(function(_context418){while(1)switch(_context418.n){case 0:indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3___default().setExternalId(externalId,success,error);case 1:return _context418.a(2);}},_callee417);}));function setExternalId(_x644,_x645,_x646){return _setExternalId2.apply(this,arguments);}return setExternalId;}()/**
377
+ * logIn with external code
378
+ *
379
+ * @method logIn
380
+ * @static
381
+ * @param {String} externalCode External Id defined to deviceID
382
+ * @param {Function} success A callback function when is success
383
+ * @param {Function} error A callback function when is error
384
+ *
385
+ */)},{key:"logIn",value:function logIn(externalCode,success,error){Indigitall.setExternalId(externalCode,success,error);}/**
386
+ * logOut
387
+ *
388
+ * @method logout
389
+ * @static
390
+ * @param {Function} success A callback function when is success
391
+ * @param {Function} error A callback function when is error
392
+ *
393
+ */},{key:"logout",value:function logout(success,error){Indigitall.setExternalId(null,success,error);}// Retargeting
394
+ /**
395
+ * Send Custom event
396
+ *
397
+ * @method sendCustomEvent
398
+ * @static
399
+ * @param {String} customEvent Custome event name
400
+ * @param {String} eventId Event id optional
401
+ * @param {String} eventAt Event at date optional with pattern yyyy-MM-dd'T'HH:mm:ss.SSSZ
402
+ * @param {Function} success A callback function when is success
403
+ * @param {Function} error A callback function when is error
404
+ *
405
+ */},{key:"sendCustomEvent",value:function sendCustomEvent(customEvent){var eventId=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var eventAt=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var success=arguments.length>3?arguments[3]:undefined;var error=arguments.length>4?arguments[4]:undefined;indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3___default().sendCustomEvent(customEvent,eventId,eventAt,success,error);}// Retargeting
406
+ /**
407
+ * Send journey custom event
408
+ *
409
+ * @method sendCustomEvent
410
+ * @static
411
+ * @param {String} customEvent Custome event name
412
+ * @param {String} eventId Event id optional
413
+ * @param {String} eventAt Event at date optional with pattern yyyy-MM-dd'T'HH:mm:ss.SSSZ
414
+ * @param {Function} success A callback function when is success
415
+ * @param {Function} error A callback function when is error
416
+ *
417
+ */},{key:"sendJourneyEvent",value:function sendJourneyEvent(customEvent){var eventId=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var eventAt=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var success=arguments.length>3?arguments[3]:undefined;var error=arguments.length>4?arguments[4]:undefined;indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3___default().sendJourneyEvent(customEvent,eventId,eventAt,success,error);}/**
418
+ * If Service Worker is Supported
419
+ *
420
+ * @method isServiceWorkerSupported
421
+ * @static
422
+ * @return {Boolean} Returns true if service woker is supported by the navigator
423
+ */},{key:"isServiceWorkerSupported",value:function isServiceWorkerSupported(){return indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3___default().isServiceWorkerSupported();}/**
424
+ * If Push notificacions are supported by safari
425
+ *
426
+ * @method isSafariPushNotificationSupported
427
+ * @static
428
+ * @return {Boolean} Returns true if pushes are supported by safari
429
+ */},{key:"isSafariPushNotificationSupported",value:function isSafariPushNotificationSupported(){return indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3___default().isSafariPushNotificationSupported();}/**
430
+ * is safari permission asked
431
+ *
432
+ * @method isSafariPermissionAsked
433
+ * @static
434
+ * @return {Boolean} Returns true if pushes are supported by safari
435
+ */},{key:"isSafariPermissionAsked",value:function isSafariPermissionAsked(){return indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3___default().isSafariPermissionAsked();}/**
436
+ * If Push notificacions are supported by safari browser iOS
437
+ *
438
+ * @method isSafariBrowserDevice
439
+ * @static
440
+ * @return {Boolean} Returns true if pushes are supported by safari iOS
441
+ */},{key:"isSafariBrowserDevice",value:function isSafariBrowserDevice(){return indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3___default().isSafariBrowserDevice();}/**
442
+ * Launch notification permissions for Safari
443
+ *
444
+ * @method launchNotificationPermissionForSafari
445
+ * @static
446
+ * @param {Function} success A callback function when is success
447
+ * @param {Function} error A callback function when is error
448
+ *
449
+ */},{key:"launchNotificationPermissionForSafari",value:function launchNotificationPermissionForSafari(){indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3___default().launchNotificationPermissionForSafari();}/**
450
+ * getPermissionsStatus
451
+ * @method getPermissionsStatus
452
+ * @static
453
+ * @param {Function} permissions status
454
+ * @return {Object} Returns an object with the permissions status of the device for Safari and Service Worker
455
+ */},{key:"getPermissionsStatus",value:function getPermissionsStatus(){return indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3___default().PermissionUtils.getPermissions();}// InApp
456
+ /**
457
+ * Show simple inApp
458
+ *
459
+ * @method showInApp
460
+ * @static
461
+ * @param {String} inAppCode Code of inApp
462
+ * @param {String} viewId Name of the view to show inApp
463
+ * @param {Function} success A callback function when is success
464
+ * @param {Function} error A callback function when is error
465
+ *
466
+ */},{key:"showInApp",value:function(){var _showInApp2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee418(inAppCode,viewId,success,error){return _regenerator2().w(function(_context419){while(1)switch(_context419.n){case 0:indigitall_web_inapp__WEBPACK_IMPORTED_MODULE_0___default().showInApp(inAppCode,viewId,success,error);case 1:return _context419.a(2);}},_callee418);}));function showInApp(_x647,_x648,_x649,_x650){return _showInApp2.apply(this,arguments);}return showInApp;}()/**
467
+ * Show an InApp with optional callbacks object.
468
+ *
469
+ * @method showInAppWithCallback
470
+ * @static
471
+ * @param {Object} config Configuration object for the InApp
472
+ * *
473
+ * @param {Object} [callbacks] Optional callbacks object
474
+ * @param {Function} [callbacks.onShowTimeFinished] Called when the show time finishes
475
+ * @param {Function} [callbacks.didExpired] Called when the InApp is expired
476
+ * @param {Function} [callbacks.didShowManyTimes] Called when the InApp exceeded the allowed show count
477
+ * @param {Function} [callbacks.didClickOut] Called when the user clicks outside the InApp
478
+ * @param {Function} [callbacks.didDismissForever] Called when the user dismisses the InApp forever
479
+ * @param {Function} [callbacks.didClicked] Called when an action inside the InApp is clicked
480
+ * @param {Function} [callbacks.success] Called when the InApp is successfully shown
481
+ * @param {Function} [callbacks.error] Called when an error occurs
482
+ * @param {Function} [callbacks.didFormError] Called when a form validation error occurs
483
+ * @param {Function} [callbacks.didFormSubmit] Called when a form is successfully submitted
484
+ */},{key:"showInAppWithCallback",value:(function(){var _showInAppWithCallback2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee419(config){var callbacks,_args403=arguments;return _regenerator2().w(function(_context420){while(1)switch(_context420.n){case 0:callbacks=_args403.length>1&&_args403[1]!==undefined?_args403[1]:{};indigitall_web_inapp__WEBPACK_IMPORTED_MODULE_0___default().showInAppWithCallback(config,callbacks);case 1:return _context420.a(2);}},_callee419);}));function showInAppWithCallback(_x651){return _showInAppWithCallback2.apply(this,arguments);}return showInAppWithCallback;}()/**
485
+ *
486
+ * @param {json} config Config with params
487
+ * @param {function} onShowTimeFinished callback with show time
488
+ * @param {function} didExpired callback did expired **@deprecated**
489
+ * @param {function} didShowManyTimes callback show many times
490
+ * @param {function} didClickOut callback click out
491
+ * @param {function} didDismissForever callback if dissmis forever
492
+ * @param {function} didClicked callback if is clicked
493
+ * @param {function} success callback success
494
+ * @param {function} error callback error
495
+ * @param {function} didFormError callback form error
496
+ * @param {function} didFormSubmit callback form submit
497
+ */)},{key:"showInAppWithConfig",value:(function(){var _showInAppWithConfig2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee420(config,onShowTimeFinished,didExpired,didShowManyTimes,didClickOut,didDismissForever,didClicked,success,error,didFormError,didFormSubmit){return _regenerator2().w(function(_context421){while(1)switch(_context421.n){case 0:indigitall_web_inapp__WEBPACK_IMPORTED_MODULE_0___default().showInAppWithConfig(config,onShowTimeFinished,null,didShowManyTimes,didClickOut,didDismissForever,didClicked,success,error,didFormError,didFormSubmit);case 1:return _context421.a(2);}},_callee420);}));function showInAppWithConfig(_x652,_x653,_x654,_x655,_x656,_x657,_x658,_x659,_x660,_x661,_x662){return _showInAppWithConfig2.apply(this,arguments);}return showInAppWithConfig;}()/**
498
+ * Show multiple inApp
499
+ *
500
+ * @method showMultipleInApp
501
+ * @static
502
+ * @param {String} inAppCodeList List Code of inApp
503
+ * @param {String} divList List Name of the view to show inApp
504
+ * @param {Function} success A callback function when is success
505
+ * @param {Function} error A callback function when is error
506
+ *
507
+ */)},{key:"showMultipleInApp",value:function showMultipleInApp(inAppCodeList,divList,success,error){indigitall_web_inapp__WEBPACK_IMPORTED_MODULE_0___default().showMultipleInApp(inAppCodeList,divList,success,error);}/**
508
+ * Show an InApp with optional callbacks object.
509
+ *
510
+ * @method showInAppWithCallback
511
+ * @static
512
+ * @param {Object} config Configuration object for the InApp
513
+ * *
514
+ * @param {Object} [callbacks] Optional callbacks object
515
+ * @param {Function} [callbacks.onShowTimeFinished] Called when the show time finishes
516
+ * @param {Function} [callbacks.didExpired] Called when the InApp is expired
517
+ * @param {Function} [callbacks.didShowManyTimes] Called when the InApp exceeded the allowed show count
518
+ * @param {Function} [callbacks.didClickOut] Called when the user clicks outside the InApp
519
+ * @param {Function} [callbacks.didDismissForever] Called when the user dismisses the InApp forever
520
+ * @param {Function} [callbacks.didClicked] Called when an action inside the InApp is clicked
521
+ * @param {Function} [callbacks.success] Called when the InApp is successfully shown
522
+ * @param {Function} [callbacks.error] Called when an error occurs
523
+ * @param {Function} [callbacks.didFormError] Called when a form validation error occurs
524
+ * @param {Function} [callbacks.didFormSubmit] Called when a form is successfully submitted
525
+ */},{key:"showMultipleInAppWithCallback",value:(function(){var _showMultipleInAppWithCallback2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee421(config){var callbacks,_args405=arguments;return _regenerator2().w(function(_context422){while(1)switch(_context422.n){case 0:callbacks=_args405.length>1&&_args405[1]!==undefined?_args405[1]:{};indigitall_web_inapp__WEBPACK_IMPORTED_MODULE_0___default().showMultipleInAppWithCallback(config,callbacks);case 1:return _context422.a(2);}},_callee421);}));function showMultipleInAppWithCallback(_x663){return _showMultipleInAppWithCallback2.apply(this,arguments);}return showMultipleInAppWithCallback;}()/**
526
+ *
527
+ * @param {json} config Config with params
528
+ * @param {function} onShowTimeFinished callback with show time
529
+ * @param {function} didExpired callback did expired **@deprecated**
530
+ * @param {function} didShowManyTimes callback show many times
531
+ * @param {function} didClickOut callback click out
532
+ * @param {function} didDismissForever callback if dissmis forever
533
+ * @param {function} didClicked callback if is clicked
534
+ * @param {function} success callback success
535
+ * @param {function} error callback error
536
+ * @param {function} didFormError callback form error
537
+ * @param {function} didFormSubmit callback form submit
538
+ */)},{key:"showMultipleInAppWithConfig",value:(function(){var _showMultipleInAppWithConfig2=_asyncToGenerator2(/*#__PURE__*/_regenerator2().m(function _callee422(config,onShowTimeFinished,didExpired,didShowManyTimes,didClickOut,didDismissForever,didClicked,success,error,didFormError,didFormSubmit){return _regenerator2().w(function(_context423){while(1)switch(_context423.n){case 0:indigitall_web_inapp__WEBPACK_IMPORTED_MODULE_0___default().showMultipleInAppWithConfig(config,onShowTimeFinished,null,didShowManyTimes,didClickOut,didDismissForever,didClicked,success,error,didFormError,didFormSubmit);case 1:return _context423.a(2);}},_callee422);}));function showMultipleInAppWithConfig(_x664,_x665,_x666,_x667,_x668,_x669,_x670,_x671,_x672,_x673,_x674){return _showMultipleInAppWithConfig2.apply(this,arguments);}return showMultipleInAppWithConfig;}()// Inbox
539
+ /**
540
+ * get Inbox Messages Count
541
+ *
542
+ * @method getInboxMessagesCount
543
+ * @static
544
+ * @param {Function} auth authentification option
545
+ * @param {Function} success A callback function when is success
546
+ * @param {Function} error A callback function when is error
547
+ *
548
+ */)},{key:"getInboxMessagesCount",value:function getInboxMessagesCount(auth,success,error){indigitall_web_inbox__WEBPACK_IMPORTED_MODULE_1___default().getMessagesCountWithAuth(auth,success,error);}/**
549
+ * get Inbox
550
+ *
551
+ * @method getInbox
552
+ * @static
553
+ * @param {Function} auth authentification option
554
+ * @param {Function} success A callback function when is success
555
+ * @param {Function} error A callback function when is error
556
+ *
557
+ */},{key:"getInbox",value:function getInbox(auth,success,error){indigitall_web_inbox__WEBPACK_IMPORTED_MODULE_1___default().getInboxWithAuth(auth,success,error);}/**
558
+ * get Inbox with pagination option
559
+ *
560
+ * @method getInboxWithPage
561
+ * @static
562
+ * @param {Function} auth authentification option
563
+ * @param {Function} page page index
564
+ * @param {Function} pageSize size of pagination
565
+ * @param {Function} dateFrom from date
566
+ * @param {Function} dateTo to date
567
+ * @param {Function} statusList list of status
568
+ * @param {Function} success A callback function when is success
569
+ * @param {Function} error A callback function when is error
570
+ *
571
+ */},{key:"getInboxWithPage",value:function getInboxWithPage(auth,page,pageSize,dateFrom,dateTo,statusList,success,error){indigitall_web_inbox__WEBPACK_IMPORTED_MODULE_1___default().getInboxWithPage(auth,page,pageSize,dateFrom,dateTo,statusList,success,error);}// Customer
572
+ /**
573
+ * Get Customer
574
+ *
575
+ * @method getCustomer
576
+ * @static
577
+ * @param {Function} success A callback function when is success
578
+ * @param {Function} error A callback function when is error
579
+ *
580
+ */},{key:"getCustomer",value:function getCustomer(success,error){indigitall_web_customer__WEBPACK_IMPORTED_MODULE_2___default().getCustomer(success,error);}/**
581
+ * Get Customer Info
582
+ *
583
+ * @method getCustomerInformation
584
+ * @static
585
+ * @param {Function} success A callback function when is success
586
+ * @param {Function} error A callback function when is error
587
+ *
588
+ */},{key:"getCustomerInformation",value:function getCustomerInformation(success,error){this.getCustomerInformationWithFields(null,success,error);}/**
589
+ * @method getCustomerInformationWithFields
590
+ * @static
591
+ * @param {[String]} fieldNames Names of the fields
592
+ * @param {Function} success A callback function when is success
593
+ * @param {Function} error A callback function when is error
594
+ */},{key:"getCustomerInformationWithFields",value:function getCustomerInformationWithFields(fieldNames,success,error){indigitall_web_customer__WEBPACK_IMPORTED_MODULE_2___default().getCustomerInformation(fieldNames,success,error);}/**
595
+ * Assigns or updates values to customer fields
596
+ *
597
+ * @method updateValueToCustomerFields
598
+ * @static
599
+ * @param {JsonObject} data Value to update or assign
600
+ * @param {Function} success A callback function when is success
601
+ * @param {Function} error A callback function when is error
602
+ *
603
+ */},{key:"assignOrUpdateValueToCustomerFields",value:function assignOrUpdateValueToCustomerFields(data,success,error){indigitall_web_customer__WEBPACK_IMPORTED_MODULE_2___default().assignOrUpdateValueToCustomerFields(data,success,error);}/**
604
+ * Deletes values from customer fields
605
+ *
606
+ * @method deleteValuesFromCustomerFields
607
+ * @static
608
+ * @param {Array} data Names of values to delete
609
+ * @param {Function} success A callback function when is success
610
+ * @param {Function} error A callback function when is error
611
+ *
612
+ */},{key:"deleteValuesFromCustomerFields",value:function deleteValuesFromCustomerFields(data,success,error){indigitall_web_customer__WEBPACK_IMPORTED_MODULE_2___default().deleteValuesFromCustomerFields(data,success,error);}/**
613
+ * Links a customer with a deviceId for one channel
614
+ *
615
+ * @method linkCustomer
616
+ * @static
617
+ * @param {String} externalId external code
618
+ * @param {CustomerChannel} channel Enum channel to link
619
+ * @param {Function} success A callback function when is success
620
+ * @param {Function} error A callback function when is error
621
+ *
622
+ */},{key:"link",value:function link(externalId,channel,success,error){Indigitall.logIn(externalId,function(device){indigitall_web_customer__WEBPACK_IMPORTED_MODULE_2___default().link(channel,success,error);},function(errorLogin){if(CommonUtils.isFunction(error))error(errorLogin);});}/**
623
+ * Unlinks a deviceId from customer
624
+ *
625
+ * @method unLinkCustomer
626
+ * @static
627
+ * @param {CustomerChannel} channel Enum channel to unLink
628
+ * @param {Function} success A callback function when is success
629
+ * @param {Function} error A callback function when is error
630
+ *
631
+ */},{key:"unlink",value:function unlink(channel,success,error){Indigitall.logout(function(device){indigitall_web_customer__WEBPACK_IMPORTED_MODULE_2___default().unlink(channel,success,error);},function(errorUnlink){if(CommonUtils.isFunction(error))error(errorUnlink);});}/**
632
+ * Send event with custom data to Customer Journey
633
+ *
634
+ * @method sendCustomerCustomEvent
635
+ * @static
636
+ * @param {String} eventCode Customer event code
637
+ * @param {JsonObject} customData Customer data to be sent
638
+ * @param {String} eventId Event id optional
639
+ * @param {String} eventAt Event at date optional with pattern yyyy-MM-dd'T'HH:mm:ss.SSSZ
640
+ * @param {Function} success A callback function when is success
641
+ * @param {Function} error A callback function when is error
642
+ *
643
+ */},{key:"sendCustomerCustomEvent",value:function sendCustomerCustomEvent(eventCode,customData){var eventId=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var eventAt=arguments.length>3&&arguments[3]!==undefined?arguments[3]:null;var success=arguments.length>4?arguments[4]:undefined;var error=arguments.length>5?arguments[5]:undefined;indigitall_web_customer__WEBPACK_IMPORTED_MODULE_2___default().sendCustomerCustomEvent(eventCode,customData,eventId,eventAt,success,error);}}]);}();window.indigitall=Indigitall;window.indigitall.InApp=indigitall_web_inapp__WEBPACK_IMPORTED_MODULE_0___default();window.indigitall.Inbox=indigitall_web_inbox__WEBPACK_IMPORTED_MODULE_1___default();window.indigitall.Customer=indigitall_web_customer__WEBPACK_IMPORTED_MODULE_2___default();window.indigitall.Push=indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3___default();window.indigitall.InApp.Utils=indigitall_web_inapp__WEBPACK_IMPORTED_MODULE_0___default().Utils;window.indigitall.Push.PermissionUtils=indigitall_web_notification__WEBPACK_IMPORTED_MODULE_3___default().PermissionUtils;window.indigitall.Channel=Channel;window.indigitall.LogLevel=LogLevel;window.indigitall.version=pkg.version;})();/******/return __webpack_exports__;/******/}();});