/**
 * Skipped minification because the original files appears to be already minified.
 * Original file: /npm/@wxcc-desktop/sdk@3.0.1/dist/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
/*! For license information please see index.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("WxccDesktopSDK",[],t):"object"==typeof exports?exports.WxccDesktopSDK=t():e.WxccDesktopSDK=t()}(Object("undefined"!=typeof self?self:this),()=>(()=>{var e,t,i={316(e,t,i){function n(e,t,i,n,r,s,o){try{var a=e[s](o),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(n,r)}function r(e){return function(){var t=this,i=arguments;return new Promise(function(r,s){var o=e.apply(t,i);function a(e){n(o,r,s,a,l,"next",e)}function l(e){n(o,r,s,a,l,"throw",e)}a(void 0)})}}function s(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function o(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?s(Object(i),!0).forEach(function(t){a(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function a(e,t,i){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,r,s,o,a=[],l=!0,c=!1;try{if(s=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=s.call(i)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=i.return&&(o=i.return(),Object(o)!==o))return}finally{if(c)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?c(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}var u;self,u=()=>(()=>{"use strict";var e={n:t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return e.d(i,{a:i}),i},d:(t,i)=>{for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{AssertUtils:()=>X,AssertionError:()=>re,BrowserNotification:()=>g,Decorator:()=>m,Err:()=>v,Evt:()=>O,I18N:()=>P,Logger:()=>h,NotificationItemsContent:()=>_,Notifications:()=>B,Signal:()=>H,assert:()=>oe,assertIsAssertionError:()=>ae,clearInterval:()=>ee,clearTimeout:()=>te,createBrowserNotifications:()=>E,createHttp:()=>U,createLogger:()=>p,createNotifications:()=>J,ensureError:()=>se,setInterval:()=>ie,setTimeout:()=>ne});var n=i(322),s=e.n(n),a=i(327),c="*********",u=["authorization","clientdeviceuri","defaultdn","deviceid","deviceurl","dialnumber","dialnumbervaluefornonus","dnnumber","extensionnumber","internationalphonenumber","phonenumber","preferreddeviceid"];class d{constructor(e){if(e&&"object"==typeof e){var t=e;this.maskKeys=Object.keys(t).reduce((e,i)=>(e[i.toLowerCase()]=t[i],e),{})}else this.maskKeys={}}shouldMaskKey(e){return"string"==typeof e&&Boolean(this.maskKeys[e.toLowerCase()])}tryJSONParse(e){try{return JSON.parse(e)}catch(e){return}}copiedObj(e){try{return JSON.parse(JSON.stringify(e))}catch(t){return e}}maskObjectProperty(e){var t=e;Object.keys(e).forEach(i=>{"object"==typeof e[i]&&null!==e[i]?this.maskObjectProperty(e[i]):t[i]=c})}maskLogData(e){var t=e;Object.keys(t).forEach(e=>{var i=t[e];"object"==typeof i&&null!==i?this.shouldMaskKey(e)?this.maskObjectProperty(i):this.maskLogData(i):(this.shouldMaskKey(e)&&"string"==typeof i||"value"===e&&this.shouldMaskKey(t.name))&&(t[e]=c)})}maskAuthorizationValues(e){if(e&&"object"==typeof e)if(Array.isArray(e))e.forEach(e=>this.maskAuthorizationValues(e));else{var t=e,i=/\b[A-Za-z0-9-_]{1,15000}\.[A-Za-z0-9-_]{1,15000}\.[A-Za-z0-9-_]{1,15000}\b/g,n=new RegExp("\\b(".concat(u.join("|"),")\\s*:\\s*[A-Za-z0-9-_.]+"),"gi");for(var r of Object.entries(t)){var s=l(r,2),o=s[0],a=s[1];if("object"!=typeof a||a instanceof Date){if(u.includes(o.toLowerCase()))t[o]=c;else if("string"==typeof a){var d=a.replace(n,"$1: ".concat(c));d.includes("eyJ")&&(d=d.replace(i,c)),t[o]=d}}else this.maskAuthorizationValues(a)}}}maskPIIInformation(e){var t=e[e.length-1],i="string"==typeof t?this.tryJSONParse(t):this.copiedObj(t);i&&"object"==typeof i&&(this.maskAuthorizationValues(i),Object.keys(this.maskKeys).length>0&&this.maskLogData(i),e.splice(e.length-1,1,i))}}var h,f=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.map(e=>"string"==typeof e?e:JSON.stringify(e))};function p(e,t){var i=new h.Service(e,t);return h.POOL.addLogger(i),i}!function(e){e.MAX_LOGS_SIZE=1048576,e.LS_LOGS_KEY="uuip-client-logs";var t,i="<uuip-eol>",n=/[\u0100-\uFFFF]/g,r="yyyy-LL-dd HH:mm:ss:SSS",l="event=Network/Http",c="".concat(l,"/Request"),u="".concat(l,"/Response"),h="".concat(l,"/Error");e.defaultSaveIntervalMilliSeconds=5e3,function(e){e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Warn=3]="Warn",e[e.Error=4]="Error",e[e.Fatal=5]="Fatal"}(t=e.Level||(e.Level={})),e.Service=class{constructor(e,t){this.loggerEmitter=s()(),this.prefix=e,this.maskKeys=t}log(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),s=1;s<i;s++)n[s-1]=arguments[s];((e,t)=>{new d(t).maskPIIInformation(e)})(n,this.maskKeys);var o=f(this.prefix?["".concat(this.prefix),...n]:n),l=Date.now(),c=a.DateTime.fromMillis(l).toFormat(r);switch(t){case e.Level.Trace:console.info(c,...o);break;case e.Level.Debug:console.log(c,...o);break;case e.Level.Warn:console.warn(c,...o);break;case e.Level.Error:case e.Level.Fatal:console.error(c,...o);break;default:console.log(...o)}var u={pfx:this.prefix,msgs:[...n],ts:l,lvl:t};this.emit("add",u)}info(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];this.log(t.Trace,...i)}debug(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];this.log(t.Debug,...i)}warn(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];this.log(t.Warn,...i)}error(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];this.log(t.Error,...i)}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this.loggerEmitter.emit(e,...i)}addEventListener(e,t){return this.loggerEmitter.on(e,t),()=>{this.removeEventListener(e,t)}}removeEventListener(e,t){this.loggerEmitter.off(e,t)}};class p{constructor(){this.loggers=new Map,this.logsCollectionString="",this.prefixedLogsCollections={},this.pendingHttpLogsByTrackingId=new Map,this.lastSaveTime=Date.now(),this.config={saveIntervalMilliSeconds:e.defaultSaveIntervalMilliSeconds},this.logRecordsSerializedLength=0,this.flush=()=>{this.save(!1)},this.onLoggerAddRecord=e=>{this.addLogRecord(e),this.save(!0)},this.restore()}static getSerializedJsonLogRecordBytesSize(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.length;if(t){var i=e.replace(n,"").length;return 1*i+2*(t-i)}return t}get serializedJsonLogsBytesSize(){var e=this.logsCollectionString.split(i).length;return 2+this.logRecordsSerializedLength+1*(e-1)}save(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=Date.now();t&&i-this.lastSaveTime<this.config.saveIntervalMilliSeconds||(this.lastSaveTime=i,window.sessionStorage.setItem(e.LS_LOGS_KEY,this.logsCollectionString))}restore(){try{var t=window.sessionStorage.getItem(e.LS_LOGS_KEY)||"";this.logsCollectionString=t,this.logRecordsSerializedLength+=p.getSerializedJsonLogRecordBytesSize(this.logsCollectionString),this.restorePreFixedLogs()}catch(e){console.warn("Logger failed read logs from sessionStorage: ",e)}}getLogObjectFromString(){try{if(""!==this.logsCollectionString)return JSON.parse("[".concat(this.logsCollectionString.split(i).join(","),"]"))}catch(e){console.log("Error parsing local storage data")}return{}}restorePreFixedLogs(){var e=this.getLogObjectFromString();e&&Array.isArray(e)&&e.length>0&&e.forEach(e=>{this.addPreFixedLogs(e),this.removeOversized()})}addPreFixedLogs(e){this.prefixedLogsCollections[e.pfx]=this.prefixedLogsCollections[e.pfx]||new Set,this.prefixedLogsCollections[e.pfx].add(e)}removeOversized(){for(;this.serializedJsonLogsBytesSize>e.MAX_LOGS_SIZE&&""!==this.logsCollectionString;)this.removeLogRecord()}removeTextFromString(e,t,i){return"".concat(e.slice(0,t)).concat(e.slice(i+t))}addLogRecord(e){var t=this.getDerivedHttpLogRecord(e);t?this.addRawLogRecord(t):this.isHttpLogRecord(e)?this.addPendingHttpLogRecord(e):this.addRawLogRecord(e)}addRawLogRecord(e){try{var t=JSON.stringify(e),n=this.logsCollectionString;this.logsCollectionString=null==n?void 0:n.concat("".concat(""!==n.trim()?i:"").concat(t))}catch(t){var r=JSON.stringify(e);this.logsCollectionString=r,console.warn("Logger failed read logs from sessionStorage: ",t)}this.logRecordsSerializedLength+=p.getSerializedJsonLogRecordBytesSize(JSON.stringify(e)),this.addPreFixedLogs(e),this.removeOversized()}getStructuredLogMessage(e){var t=e.msgs[0];return t&&"object"==typeof t?t:void 0}isHttpLogRecord(e){var t=this.getStructuredLogMessage(e);return Boolean(t&&"string"==typeof t.id&&t.id.includes(l))}getLocalTimeWithTimezone(e){if("number"==typeof e&&Number.isFinite(e))return a.DateTime.fromMillis(e).toLocal().toISO()||void 0}getDurationInHHMMSS(e){if("number"==typeof e&&Number.isFinite(e)&&!(e<0)){var t=Math.floor(e/1e3);return[Math.floor(t/3600),Math.floor(t%3600/60),t%60].map(e=>String(e).padStart(2,"0")).join(":")}}getHttpLogTrackingKey(e){var t=this.getStructuredLogMessage(e);if(t&&"string"==typeof t.id&&t.id.includes(l)&&"string"==typeof t.trackingId&&""!==t.trackingId.trim())return"".concat(e.pfx,":").concat(t.trackingId)}addPendingHttpLogRecord(e){var t=this.getHttpLogTrackingKey(e);t&&this.pendingHttpLogsByTrackingId.set(t,e)}removePendingHttpLogRecord(e){var t=this.getHttpLogTrackingKey(e),i=t?this.pendingHttpLogsByTrackingId.get(t):void 0;t&&i&&(i===e||JSON.stringify(i)===JSON.stringify(e))&&this.pendingHttpLogsByTrackingId.delete(t)}getHttpRequestMessage(e,t){return e.id===c?e:t}getHttpTerminalMessage(e,t){return e.id===u||e.id===h?e:t}isValidHttpLogPair(e,t){return e.id===c&&(t.id===u||t.id===h)}buildDerivedHttpLogMessage(e,t,i){var n=this.getLocalTimeWithTimezone(i.startTime),r=this.getLocalTimeWithTimezone(i.endTime),s=this.getDurationInHHMMSS(i.duration);return o(o(o(o(o(o(o(o(o({id:i.id===h?"Http-APIError":"Http-API",logVer:1},void 0===t.method?{}:{method:t.method}),{},{url:t.url,trackingId:e.trackingId},void 0===i.startTime?{}:{startTime:i.startTime}),void 0===n?{}:{startTimeLocal:n}),{},{endTime:i.endTime},void 0===r?{}:{endTimeLocal:r}),void 0===i.duration?{}:{duration:i.duration}),void 0===s?{}:{"durationInHH:MM:SS":s}),void 0===i.status?{}:{status:i.status}),void 0===i.code?{}:{code:i.code}),void 0===i.message?{}:{message:i.message})}getDerivedHttpLogRecord(e){var t=this.getStructuredLogMessage(e),i=this.getHttpLogTrackingKey(e);if(t&&i){var n=this.pendingHttpLogsByTrackingId.get(i);if(n){var r=this.getStructuredLogMessage(n);if(r){var s=this.getHttpRequestMessage(t,r),o=this.getHttpTerminalMessage(t,r);return this.isValidHttpLogPair(s,o)?(this.pendingHttpLogsByTrackingId.delete(i),{pfx:e.pfx,msgs:[this.buildDerivedHttpLogMessage(t,s,o)],ts:e.ts,lvl:e.lvl}):void 0}this.pendingHttpLogsByTrackingId.delete(i)}}}removeLogRecord(){if(""!==this.logsCollectionString){var e=this.logsCollectionString.indexOf(i);if(-1!==e){var t=this.logsCollectionString.substring(0,e),n=e+10,r=this.removeTextFromString(this.logsCollectionString,0,n);this.logsCollectionString=r,this.logRecordsSerializedLength-=p.getSerializedJsonLogRecordBytesSize(t);try{var s=JSON.parse(t);this.removePendingHttpLogRecord(s),this.prefixedLogsCollections[s.pfx]&&this.prefixedLogsCollections[s.pfx].forEach(e=>{e.ts===s.ts&&this.prefixedLogsCollections[s.pfx].delete(e)})}catch(e){console.warn("Logger failed to read/parse the first logs from sessionStorage: ",e)}}}}removePreFixedLogs(e){var t=this.getLogObjectFromString();e.forEach(e=>{var i=t.findIndex(t=>t.pfx===e.pfx);-1!==i&&(t.splice(i,1),this.logRecordsSerializedLength-=p.getSerializedJsonLogRecordBytesSize(JSON.stringify(e)),this.removePendingHttpLogRecord(e),this.prefixedLogsCollections[e.pfx]&&this.prefixedLogsCollections[e.pfx].has(e)&&this.prefixedLogsCollections[e.pfx].delete(e))}),this.logsCollectionString=t.map(e=>JSON.stringify(e)).join(i)}static getLogRecordReadable(e){return e.ts?{prefix:e.pfx,messages:e.msgs,timestamp:a.DateTime.fromMillis(e.ts).toFormat(r),level:t[e.lvl]}:{}}static getLogsReadableJson(e){var t=e=>e.map(e=>p.getLogRecordReadable(e));return JSON.stringify(Array.isArray(e)?t(e):Object.keys(e).reduce((i,n)=>(i[n]=t(e[n]),i),{}),null,2)}static getLogsReadableText(e){var t=e=>e.reduce((e,t)=>{var i=p.getLogRecordReadable(t);return i&&(e+="".concat(i.timestamp," ").concat(i.prefix," ").concat(i.level," ").concat(f(i.messages).join(" ")," \r\n")),e},"");return Array.isArray(e)?t(e):Object.keys(e).reduce((i,n)=>(i+='[SERVICE "'.concat(n,'" LOGS]: '))+t(e[n]),"")}static getLogsUrl(e){return"data:text/plain;charset=utf-8,".concat(encodeURIComponent(e))}static browserDownload(e,t){try{if(document&&document.createElement){var i=document.createElement("a");i.setAttribute("href",e),i.setAttribute("download",t),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)}else console.warn("Browser is not supported to download logs")}catch(e){}}addLogger(e){this.loggers.set(e.prefix,e),e.removeEventListener("add",this.onLoggerAddRecord),e.addEventListener("add",this.onLoggerAddRecord)}getAllLogsJsonUrl(){return p.getLogsUrl(p.getLogsReadableJson(this.getLogObjectFromString()))}getAllPrefixedLogsJsonUrl(){return p.getLogsUrl(p.getLogsReadableJson(this.getAllPrefixedLogsCollections()))}getPrefixedLogsJsonUrl(e){return p.getLogsUrl(p.getLogsReadableJson(this.getPrefixedLogsCollection(e)))}getAllLogsTextUrl(){return p.getLogsUrl(p.getLogsReadableText(this.getLogObjectFromString()))}getPrefixedLogsTextUrl(e){return p.getLogsUrl(p.getLogsReadableText(this.getPrefixedLogsCollection(e)))}browserDownloadAllLogsJson(){p.browserDownload(this.getAllLogsJsonUrl(),"".concat(new Date,"_all_logs.json"))}browserDownloadAllPrefixedLogsJson(){p.browserDownload(this.getAllPrefixedLogsJsonUrl(),"".concat(new Date,"_all_prefixed_logs.json"))}browserDownloadPrefixedLogsJson(e){p.browserDownload(this.getPrefixedLogsJsonUrl(e),"".concat(new Date,"_").concat(e,"_logs.json"))}browserDownloadAllLogsText(){p.browserDownload(this.getAllLogsTextUrl(),"".concat(new Date,"_all_logs.log"))}browserDownloadPrefixedLogsText(e){p.browserDownload(this.getPrefixedLogsTextUrl(e),"".concat(new Date,"_").concat(e,"_logs.log"))}cleanupAllLogs(){this.logRecordsSerializedLength=0,this.logsCollectionString="",this.pendingHttpLogsByTrackingId.clear(),Object.keys(this.prefixedLogsCollections).forEach(e=>this.prefixedLogsCollections[e]=new Set),this.save(!0)}cleanupPrefixedLogs(e){var t=this.getPrefixedLogsCollection(e);this.removePreFixedLogs(t),this.pendingHttpLogsByTrackingId.forEach((t,i)=>{t.pfx===e&&this.pendingHttpLogsByTrackingId.delete(i)}),this.prefixedLogsCollections[e]=new Set,this.save(!0)}getAllPrefixedLogsCollections(){return Object.keys(this.prefixedLogsCollections).reduce((e,t)=>(e[t]=this.getPrefixedLogsCollection(t),e),{})}getPrefixedLogsCollection(e){return Array.from(this.prefixedLogsCollections[e]||new Set)}}e.ServicesPool=p,e.POOL=new e.ServicesPool}(h||(h={}));var g,v,m,y=p("unified-ui-platform-sdk",{title:!0,text:!0});function E(e){return new g.Service(e)}function S(e,t){if(e.descriptor=e.descriptor||Object.getOwnPropertyDescriptor(e.target,e.key),"function"!=typeof e.descriptor.value)return console.warn(e.key,"Decorator must be used on function"),e.descriptor;var i=e.descriptor.value,n=e.target.constructor.name;return e.descriptor.value=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.call(this,i,e,n)},e.descriptor}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;return function(t,i,n){var r;return S({target:t,key:i,descriptor:n},function(t,i){clearTimeout(r),r=window.setTimeout(()=>{clearTimeout(r),t.apply(this,i)},e)})}}function w(){return(e,t)=>{var i={get(){return new O(this,void 0!==t?t:e.key)},enumerable:!0,configurable:!0};return void 0!==t?Object.defineProperty(e,t,i):{kind:"method",placement:"prototype",key:e.key,descriptor:i}}}function k(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(i,n,s){return S({target:i,key:n,descriptor:s},function(){var i=r(function*(i,r){var s="_".concat(n,"_exec_flag");if(!t||!this[s]){var o=t=>{if(this[s]=t,"function"==typeof e)e.call(this,{isExec:t,ctx:this});else{var i=e;t?i.before&&i.before.call(this,this):i.after&&i.after.call(this,this)}};o(!0);var a=i.apply(this,r);a instanceof Promise?a.then(()=>o(!1)).catch(()=>o(!1)):(console.warn("Must be async function to use [@Executing] decorator"),o(!1))}});return function(e,t){return i.apply(this,arguments)}}())}}function I(e){return function(t,i,n){return S({target:t,key:i,descriptor:n},function(){var t=r(function*(t,n,s){var o=this,a=function(){var t=r(function*(t){t.id&&"string"==typeof t.id&&"yes"===t.isErr||("string"==typeof t||t instanceof Error?t=new v.Message("system",t):(console.warn("Err must be 'string' or 'new Error()' instance"),t=new v.Message("system","")));var n=t;n.ctx=o;var r="Error] ".concat(s,".").concat(i," [").concat(n.id,"]: ").concat(n.message);if("function"==typeof e){var a=e;console.log("[Handled".concat(r));var l=a.call(o,n);l instanceof Promise&&(yield l)}else{var c=e;if(c[n.id]){console.log("[Handled".concat(r));var u=c[n.id].call(o,n);u instanceof Promise&&(yield u)}else if(c.handle){console.log("[Handled".concat(r));var d=c.handle.call(o,n);d instanceof Promise&&(yield d)}else console.warn("[Unhandled ".concat(r));if(c.fallback){var h=c.fallback.call(o,n);h instanceof Promise&&(yield h)}}});return function(e){return t.apply(this,arguments)}}();try{var l=t.apply(o,n);return l instanceof Promise?new Promise(e=>{l.then(e).catch(function(){var t=r(function*(t){yield a(t),e(void 0)});return function(e){return t.apply(this,arguments)}}())}):l}catch(e){return void(yield a(e))}});return function(e,i,n){return t.apply(this,arguments)}}())}}function A(){return function(e,t,i){return S({target:e,key:t,descriptor:i},function(e,i){var n="_".concat(t,"_once_flag");this[n]||(this[n]=!0,e.call(this,i))})}}function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3/60;return function(t,i,n){var r,s=Date.now();return S({target:t,key:i,descriptor:n},function(t,i){var n=this,o=function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];var c=Date.now();window.clearTimeout(r),!s||c-s>=e?(s=c,t.apply(n,a)):r=window.setTimeout(()=>o(...a),e-(c-s))};o(...i)})}}!function(e){class t{static get isBrowserNotificationPromiseSupported(){try{window.Notification.requestPermission().then()}catch(e){return!1}return!0}constructor(e){this.defaultOptions=e||{}}get isBrowserNotificationSupported(){return!!("Notification"in window)}get isBrowserNotificationIconSupported(){return this.isBrowserNotificationSupported&&"icon"in window.Notification.prototype}get isBrowserNotificationImageSupported(){return this.isBrowserNotificationSupported&&"image"in window.Notification.prototype}get isBrowserNotificationBadgeSupported(){return this.isBrowserNotificationSupported&&"badge"in window.Notification.prototype}get isPermissionGranted(){return"granted"===window.Notification.permission}get isPermissionDenied(){return"denied"===window.Notification.permission}get isPermissionUnknown(){return!this.isPermissionGranted&&!this.isPermissionDenied}requestNotificationUserPermission(){var e=this;return r(function*(){e.isBrowserNotificationSupported?t.isBrowserNotificationPromiseSupported?yield window.Notification.requestPermission():yield new Promise(e=>window.Notification.requestPermission(t=>e(t))):y.warn("Browser notification is not supported...")})()}fire(e,t){return new window.Notification(e,o(o({},this.defaultOptions),t||{}))}}e.Service=t}(g||(g={})),function(e){class t extends Error{constructor(e,t){super(),this.isErr="yes",this.id=e,this.stack=(new Error).stack,"string"==typeof t?this.message=t:t instanceof Error?(this.message=t.message,this.name=t.name):this.message=""}}e.Message=t;class i extends Error{constructor(e,t){super(),this.isErr="yes",this.id=e,this.stack=(new Error).stack,this.details=t}}e.Details=i}(v||(v={})),function(e){e.Debounce=b,e.Evt=w,e.Exec=k,e.Handle=I,e.Once=A,e.Throttle=C}(m||(m={}));class O{constructor(e,t){this.target=e,this.eventName=t}emit(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{bubbles:!0,composed:!0,cancelable:!1};this.target.dispatchEvent(new CustomEvent(this.eventName,o({detail:e},t)))}}var T=i(901),R=e.n(T),N=i(960),L="uuip",x="1.0",D="1.0";function U(e){var t=R().create();return t.accessToken=e,t.interceptors.request.use(e=>{if(!e.headers.Authorization&&t.accessToken&&(e.headers.Authorization="Bearer ".concat(t.accessToken)),!e.headers.TrackingID){var i=(0,N.v1)();e.headers.TrackingID="".concat(L,"_").concat(i,"_").concat(x,":").concat(D)}return e.headers["Content-Type"]||(e.headers["Content-Type"]="application/json"),e}),t}var P,_,V=i(545),M=e.n(V),j=i(972),q=e.n(j),F=i(855),$=e.n(F);!function(e){e.createService=e=>{var t=M().createInstance(),i=e&&e.backend?e.backend:new($());t.use(i);var n=e&&e.languageDetector?e.languageDetector:new(q());return t.use(n),e&&e.logger&&t.use({log:"log"in e.logger?e.logger.log:e.logger.info,warn:e.logger.warn,error:e.logger.error,type:"logger"}),t},e.mergeServiceInitOptions=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Object.assign.call(null,{},...t)},e.createMixin=t=>{var i="i18n"in t?t.i18n:e.createService(),n="i18nInitOptions"in t?t.i18nInitOptions:null;n||y.info("i18n mixin instance waiting service initialization outside...");var r=!1;return e=>class extends e{constructor(){super(...arguments),this.onI18NInitialized=e=>this.requestUpdate(),this.onI18NLanguageChanged=e=>this.requestUpdate(),this.t=M().t.bind(i)}connectedCallback(){super.connectedCallback&&super.connectedCallback(),i.on("initialized",this.onI18NInitialized),i.on("languageChanged",this.onI18NLanguageChanged),i.isInitialized||r||!n||(r=!0,i.init(n).finally(()=>r=!1))}disconnectedCallback(){i.off("initialized",this.onI18NInitialized),i.off("languageChanged",this.onI18NLanguageChanged),super.disconnectedCallback&&super.disconnectedCallback()}}}}(P||(P={})),function(e){e.DataController=class{constructor(e){this.localization={closeButtonText:"Close"},this.type=e.type,this.text=e.text,this.link=e.link,this.linkName=e.linkName,this.linkTooltip=e.linkTooltip,this.iconDetail=e.iconDetail,this.linkHandler=e.linkHandler,this.clickHandler=e.clickHandler,this.errorDetail=e.errorDetail,this.taskId=e.taskId,this.localization=e.localization||this.localization,this.dismissHandler=e.dismissHandler,this.actions=e.actions,this.lineClamp=e.lineClamp}}}(_||(_={}));var B,H,z=i(497),W=e.n(z);function J(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new B.Service;return t.updateConfig(e),t}!function(e){var t,i;!function(e){var t,i,n;!function(e){e.Info="info",e.Warn="warn",e.Error="error",e.Success="success",e.Chat="chat",e.Default="default"}(t=e.Type||(e.Type={})),e.TYPES=Object.values(t),function(e){e.Silent="silent",e.AutoDismiss="autodismiss",e.Acknowledge="acknowledge"}(i=e.Mode||(e.Mode={})),e.MODES=Object.values(i),function(e){e.Added="added",e.Pended="pended",e.Activated="activated",e.Deactivated="deactivated",e.Removed="removed"}(n=e.Status||(e.Status={})),e.StatusWeight={[n.Added]:0,[n.Pended]:1,[n.Activated]:2,[n.Deactivated]:3,[n.Removed]:4},e.STATUSES=Object.values(n),function(e){e.User="user_add"}(e.AddEventReason||(e.AddEventReason={})),function(e){e.ServiceAutoPropagate="service_auto_propagate_pending",e.ServiceAutoDismiss="service_autodismiss_pending",e.UserSilent="user_silent_pending"}(e.PendingEventReason||(e.PendingEventReason={})),function(e){e.ServiceAutoPropagate="service_auto_propagate_activate"}(e.ActivateEventReason||(e.ActivateEventReason={})),function(e){e.UserNegative="user_negative_deactivate",e.UserPositive="user_positive_deactivate",e.UserNeutral="user_neutral_deactivate"}(e.DeactivateEventReason||(e.DeactivateEventReason={})),function(e){e.User="user_remove"}(e.RemoveEventReason||(e.RemoveEventReason={}))}(t=e.ItemMeta||(e.ItemMeta={})),function(e){e.STATUS_EVENTS=["add","pending","activate","deactivate","remove"],e.STATUS_EVENT_MAP={add:t.Status.Added,pending:t.Status.Pended,activate:t.Status.Activated,deactivate:t.Status.Deactivated,remove:t.Status.Removed},e.DISABLED_ITEM_MODE={[t.Mode.Silent]:!1,[t.Mode.AutoDismiss]:!1,[t.Mode.Acknowledge]:!1},e.ACTIVATED_ITEM_MODE_LIMIT={[t.Mode.Silent]:0,[t.Mode.AutoDismiss]:10,[t.Mode.Acknowledge]:1},e.AUTO_DISMISS_TIMEOUT=5e3}(i=e.ServiceMeta||(e.ServiceMeta={}));class n{constructor(){this.hubEmitter=s()()}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this.hubEmitter.emit(e,...i)}addEventListener(e,t){this.hubEmitter.on(e,t)}addOnceEventListener(e,t){this.hubEmitter.once(e,t)}removeEventListener(e,t){this.hubEmitter.off(e,t)}removeAllEventListeners(){W()(this.hubEmitter)}}e.Item=class{get status(){return this._status}get reason(){return this._reason}get mode(){return this._mode}validateAuxOptions(e){var i={};return e&&void 0!==e.AUTO_DISMISS_TIMEOUT&&this.mode===t.Mode.AutoDismiss&&(i=o(o({},i),{},{AUTO_DISMISS_TIMEOUT:e.AUTO_DISMISS_TIMEOUT})),i}constructor(e,i){this._serviceHubSubscriptions=[],this._itemEmitter=s()();var n=e.data,r=n.type,o=n.mode,l=n.title,c=n.data,u=n.timestamp;this.type=r,this.title=l,this.data=c,this._mode=o,this.timestamp=u||(new Date).toISOString(),this.datetime=a.DateTime.fromISO(this.timestamp).toLocaleString(a.DateTime.DATETIME_SHORT_WITH_SECONDS),this.options=Object.freeze(this.validateAuxOptions(e.options||{})),i&&(this._serviceHubAdapter=i,this._status=t.Status.Added,this._reason=t.AddEventReason.User,this.bindItemHubListeners())}bindItemHubListeners(){if(this._serviceHubAdapter){var e=(e,i,n)=>{this.timestamp in e&&(this._status=i,this._reason=n,i===t.Status.Removed&&(this.unbindItemHubListeners(),this.removeAllEventListeners()),this.emit("statusUpdate",i,n))};this._serviceHubAdapter.addEventListener("statusServiceUpdateResponse",e),this._serviceHubSubscriptions.push(()=>{var t;null===(t=this._serviceHubAdapter)||void 0===t||t.removeEventListener("statusServiceUpdateResponse",e)});var i=(e,t)=>{this.timestamp in e&&(this._mode=t,this.emit("modeUpdate",t))};this._serviceHubAdapter.addEventListener("modeStatusUpdateResponse",i),this._serviceHubSubscriptions.push(()=>{var e;null===(e=this._serviceHubAdapter)||void 0===e||e.removeEventListener("modeStatusUpdateResponse",i)})}}unbindItemHubListeners(){this._serviceHubSubscriptions&&(this._serviceHubSubscriptions.forEach(e=>e()),this._serviceHubSubscriptions.length=0)}deactivate(e){this._status&&t.StatusWeight[this._status]<t.StatusWeight[t.Status.Deactivated]?this._serviceHubAdapter?this._serviceHubAdapter.emit("statusServiceUpdateRequest",this,t.Status.Deactivated,e):y.warn("Service hub adapter is not initialized for this notification item instance: ",this):y.warn('Notification should have "'.concat(t.Status.Pended,'" or "').concat(t.Status.Activated,'" status to be able change status to "').concat(t.Status.Deactivated,'".Current notification status is "').concat(this._status,'". Ignoring this change'))}pending(){this._status===t.Status.Activated||this.mode!==t.Mode.Silent?this._serviceHubAdapter?this._serviceHubAdapter.emit("statusServiceUpdateRequest",this,t.Status.Pended,t.PendingEventReason.UserSilent):y.warn("Service hub adapter is not initialized for this notification item instance: ",this):y.warn('Notification should have "'.concat(t.Status.Activated,'" status or not "').concat(t.Mode.Silent,'" mode, to be able change status to "').concat(t.Status.Pended,'" and mode to "').concat(t.Mode.Silent,'".Current notification status is "').concat(this._status,'" and mode is "').concat(this.mode,'". Ignoring this change'))}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this._itemEmitter.emit(e,...i)}addEventListener(e,t){this._itemEmitter.on(e,t)}addOnceEventListener(e,t){this._itemEmitter.once(e,t)}removeEventListener(e,t){this._itemEmitter.off(e,t)}removeAllEventListeners(){W()(this._itemEmitter)}};var r=function(e,t){return[...e,...t].sort(arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>0)},l=(e,t)=>e.reduce((e,i)=>(-1===t.indexOf(i)&&e.push(i),e),[]);class c{constructor(){this.emitter=s()(),this.map={},this.status=c.createStatus(),this.serviceConfig={DISABLED_ITEM_MODE:o({},i.DISABLED_ITEM_MODE),ACTIVATED_ITEM_MODE_LIMIT:o({},i.ACTIVATED_ITEM_MODE_LIMIT),AUTO_DISMISS_TIMEOUT:i.AUTO_DISMISS_TIMEOUT},this.activeAutoDismissTimeoutRefs={},this.serviceHubAdapter=new n,this.bindServiceHubEvents()}static mergeConfig(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];if(!i.length)return e;var r=i.shift(),s=e=>e&&"object"==typeof e&&!Array.isArray(e);if(s(e)&&s(r))for(var o in r)s(r[o])?(e[o]||Object.assign(e,{[o]:{}}),this.mergeConfig(e[o],r[o])):Object.assign(e,{[o]:r[o]});return this.mergeConfig(e,...i)}static createStatus(){return{[t.Status.Added]:this.createStatusHolderCollection(),[t.Status.Pended]:this.createStatusHolderCollection(),[t.Status.Activated]:this.createStatusHolderCollection(),[t.Status.Deactivated]:this.createStatusHolderCollection(),[t.Status.Removed]:this.createStatusHolderCollection()}}static createStatusHolderCollection(){return Object.assign([],o(o({ids:[]},this.createStatusHolderSubCollections(t.MODES)),this.createStatusHolderSubCollections(t.TYPES)))}static createStatusHolderSubCollections(e){return o({},e.reduce((e,t)=>(e[t]=[],e),{}))}updateNotificationsCollections(){var e=c.createStatus();this.status.added.ids.forEach(i=>{var n=this.map[i];t.STATUSES.forEach(t=>{-1!==this.status[t].ids.indexOf(n.timestamp)&&(e[t].push(n),e[t].ids.push(i),e[t][n.mode].push(n),e[t][n.type].push(n))})}),this.status=e}setAutoDismiss(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};this.prepareUpdateNotifications(e).forEach(e=>{var n;e.mode===t.Mode.AutoDismiss&&(this.activeAutoDismissTimeoutRefs[e.timestamp]=window.setTimeout(()=>i(e),null!==(n=e.options.AUTO_DISMISS_TIMEOUT)&&void 0!==n?n:this.serviceConfig.AUTO_DISMISS_TIMEOUT))})}removeAutoDismiss(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};this.prepareUpdateNotifications(e).forEach(e=>{e.timestamp in this.activeAutoDismissTimeoutRefs&&(t(e),window.clearTimeout(this.activeAutoDismissTimeoutRefs[e.timestamp]),delete this.activeAutoDismissTimeoutRefs[e.timestamp])})}update(e,t,i){var n=Array.isArray(i)?i:[i];if(n.length){var s=n.map(e=>e.timestamp);switch(e){case"add":n.forEach(e=>this.map[e.timestamp]=e),this.status.added.ids=r(this.status.added.ids,s,c.sortTimestampsFn);break;case"pending":this.status.pended.ids=r(this.status.pended.ids,s,c.sortTimestampsFn),this.status.activated.ids=l(this.status.activated.ids,s),this.status.deactivated.ids=l(this.status.deactivated.ids,s);break;case"activate":this.status.pended.ids=l(this.status.pended.ids,s),this.status.activated.ids=r(this.status.activated.ids,s,c.sortTimestampsFn),this.status.deactivated.ids=l(this.status.deactivated.ids,s);break;case"deactivate":this.status.pended.ids=l(this.status.pended.ids,s),this.status.activated.ids=l(this.status.activated.ids,s),this.status.deactivated.ids=r(this.status.deactivated.ids,s,c.sortTimestampsFn);break;case"remove":this.status.pended.ids=l(this.status.pended.ids,s),this.status.activated.ids=l(this.status.activated.ids,s),this.status.deactivated.ids=l(this.status.deactivated.ids,s),this.status.added.ids=l(this.status.added.ids,s),this.status.removed.ids=r(this.status.removed.ids,s,c.sortTimestampsFn),s.forEach(e=>delete this.map[e])}this.updateNotificationsCollections(),this.emit(e,n,t),this.propagate(e,t,n)}}propagate(e,i,n){var r=Array.isArray(n)?n:[n];if(r.length)switch(e){case"add":this.update("pending",t.PendingEventReason.ServiceAutoPropagate,r);break;case"pending":case"deactivate":r.forEach(e=>{this.removeAutoDismiss(e)}),this.update("activate",t.ActivateEventReason.ServiceAutoPropagate,this.prepareActiveCandidatesNotifications(this.status.pended));break;case"activate":r.forEach(e=>{this.setAutoDismiss(e,e=>{e.mode===t.Mode.AutoDismiss&&this.serviceHubAdapter.emit("statusServiceUpdateRequest",e,t.Status.Pended,t.PendingEventReason.ServiceAutoDismiss)})});break;case"remove":this.update("deactivate",t.DeactivateEventReason.UserNegative,r)}}prepareAddNotifications(t){var i=Object.keys(this.serviceConfig.DISABLED_ITEM_MODE).reduce((e,t)=>(this.serviceConfig.DISABLED_ITEM_MODE[t]||e.push(t),e),[]).map(e=>'"'.concat(e,'"')).join(", ");return(Array.isArray(t)?t:[t]).filter(e=>!this.serviceConfig.DISABLED_ITEM_MODE[e.data.mode]||(y.error('Trying to .add(...) notification mode "'.concat(e.data.mode,'" that is disabled in this notifications service instance by configuration.Current configuration is: "').concat(JSON.stringify(this.config),'"Only ').concat(i," allowed. Ignoring .add(").concat(JSON.stringify(e),") notification...")),!1)).map(t=>new e.Item(t,this.serviceHubAdapter))}prepareUpdateNotifications(e){return(Array.isArray(e)?e:[e]).reduce((e,t)=>(t.timestamp in this.map?e.push(t):y.error("Trying to handle untracked notification. Call .add(...) first...",JSON.stringify(t)),e),[])}prepareActiveCandidatesNotifications(e){var i=(Array.isArray(e)?e:[e]).reduce((e,t)=>(this.status.activated[t.mode].length+e[t.mode].length<this.serviceConfig.ACTIVATED_ITEM_MODE_LIMIT[t.mode]&&e[t.mode].push(t),e),c.createStatusHolderSubCollections(t.MODES));return Object.values(i).reduce((e,t)=>e.concat(t),[])}static sortByTimestampsFn(e,t){return c.sortTimestampsFn(e.timestamp,t.timestamp)}get added(){return this.status.added}get pended(){return this.status.pended}get activated(){return this.status.activated}get deactivated(){return this.status.deactivated}getNotificationStatus(e){return Object.keys(this.status).filter(e=>e!==t.Status.Added).find(t=>-1!==this.status[t].ids.indexOf(e.timestamp))}get config(){return Object.freeze(this.serviceConfig)}static validateUpdateConfig(e){var n=e;if(n.ACTIVATED_ITEM_MODE_LIMIT&&n.ACTIVATED_ITEM_MODE_LIMIT.acknowledge>i.ACTIVATED_ITEM_MODE_LIMIT.acknowledge)throw new Error("\n          Max ".concat(t.Mode.Acknowledge," limit is ").concat(i.ACTIVATED_ITEM_MODE_LIMIT.acknowledge,"\n        "));if(n.DISABLED_ITEM_MODE){if(!Object.keys(n.DISABLED_ITEM_MODE).reduce((e,t)=>(n.DISABLED_ITEM_MODE[t]&&e++,e),0))throw new Error("At least one notifications mode should be allowed in service instance");Object.keys(n.ACTIVATED_ITEM_MODE_LIMIT).forEach(e=>{e in n.DISABLED_ITEM_MODE&&n.DISABLED_ITEM_MODE[e]&&y.warn('Changing configuration limit count for mode "'.concat(e,"\" won't have any effect, because this mode is disabled in notifications service instance"))}),"AUTO_DISMISS_TIMEOUT"in n&&n.DISABLED_ITEM_MODE[t.Mode.AutoDismiss]&&y.warn('Changing "AUTO_DISMISS_TIMEOUT" configuration option won\'t have any effect,because "'.concat(t.Mode.AutoDismiss,'" mode is disabled in notifications service instance'))}return!0}updateConfig(e){c.validateUpdateConfig(e)&&(this.serviceConfig=c.mergeConfig({},this.serviceConfig,e),y.info("Updated notifications service configuration: ",this.config))}add(e){var i=this.prepareAddNotifications(e);return this.update("add",t.AddEventReason.User,i),i}pending(e){var i=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",i,t.Status.Pended,t.PendingEventReason.UserSilent),i}deactivate(e,i){var n=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",n,t.Status.Deactivated,i),n}remove(e){var i=this.prepareUpdateNotifications(e);return this.serviceHubAdapter.emit("statusServiceUpdateRequest",i,t.Status.Removed,t.RemoveEventReason.User),i}pendingAllActivated(){return this.pending(this.status.activated)}pendingAll(){return this.pending([...this.status.pended,...this.status.activated])}deactivateAllActivated(e){return this.deactivate(this.status.activated,e)}deactivateAll(e){return this.deactivate([...this.status.pended,...this.status.activated],e)}removeAllDeactivated(){return this.remove(this.status.deactivated)}removeAll(){return this.remove(this.status.added)}addEventListener(e,t){this.emitter.on(e,t)}removeEventListener(e,t){this.emitter.off(e,t)}addOnceEventListener(e,t){this.emitter.once(e,t)}removeAllEventListeners(){W()(this.emitter)}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this.emitter.emit(e,...i)}bindServiceHubEvents(){this.serviceHubAdapter.addEventListener("statusServiceUpdateRequest",(e,i,n)=>{var r=Array.isArray(e)?e:[e],s=r.reduce((e,t)=>(e[t.timestamp]=this.getNotificationStatus(t),e),{}),o=r.filter(e=>(s[e.timestamp]===t.Status.Activated||e.mode!==t.Mode.Silent)&&i===t.Status.Pended),a=o.filter(e=>e.mode!==t.Mode.Silent);a.length&&this.serviceHubAdapter.emit("modeStatusUpdateResponse",a.reduce((e,t)=>(e[t.timestamp]=t,e),{}),t.Mode.Silent),o.length&&this.update("pending",n,o);var l=r.filter(e=>{var n=s[e.timestamp];return(n===t.Status.Pended||n===t.Status.Activated)&&i===t.Status.Deactivated});l.length&&this.update("deactivate",n,l),r.filter(e=>{var n=s[e.timestamp];return(n===t.Status.Pended||n===t.Status.Activated||n===t.Status.Deactivated)&&i===t.Status.Removed}).length&&this.update("remove",n,e)}),i.STATUS_EVENTS.forEach(e=>{this.addEventListener(e,(t,n)=>{var r=i.STATUS_EVENT_MAP[e],s=t.reduce((e,t)=>(e[t.timestamp]=t,e),{});this.serviceHubAdapter.emit("statusServiceUpdateResponse",s,r,n)})})}}c.sortTimestampsFn=(e,t)=>e>t?1:e<t?-1:0,e.Service=c}(B||(B={})),function(e){class t{constructor(){this.listeners=[],this.listenersOnce=[],this.listen=e=>(this.listeners.push(e),{stopListen:()=>this.stopListen(e)}),this.listenOnce=e=>(this.listenersOnce.push(e),{stopListenOnce:()=>this.stopListenOnce(e)}),this.stopListen=e=>{var t=this.listeners.indexOf(e,0);return t>-1&&(this.listeners.splice(t,1),!0)},this.stopListenOnce=e=>{var t=this.listenersOnce.indexOf(e,0);return t>-1&&(this.listenersOnce.splice(t,1),!0)},this.stopListenAll=()=>{this.listeners=[],this.listenersOnce=[]},this.send=e=>{this.listeners.forEach(t=>t(e)),this.listenersOnce.forEach(t=>t(e)),this.listenersOnce=[]}}}class i{constructor(){this.listeners=[],this.listenersOnce=[],this.listen=e=>(this.listeners.push(e),{stopListen:()=>this.stopListen(e)}),this.listenOnce=e=>(this.listenersOnce.push(e),{stopListenOnce:()=>this.stopListenOnce(e)}),this.stopListen=e=>{var t=this.listeners.indexOf(e,0);return t>-1&&(this.listeners.splice(t,1),!0)},this.stopListenOnce=e=>{var t=this.listenersOnce.indexOf(e,0);return t>-1&&(this.listenersOnce.splice(t,1),!0)},this.stopListenAll=()=>{this.listeners=[],this.listenersOnce=[]},this.send=()=>{this.listeners.forEach(e=>e()),this.listenersOnce.forEach(e=>e()),this.listenersOnce=[]}}}e.create=new class{withData(){var e=new t;return{signal:e,send:e.send,stopListenAll:e.stopListenAll}}empty(){var e=new i;return{signal:e,send:e.send,stopListenAll:e.stopListenAll}}}}(H||(H={}));var Z=null,G=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,K=1073741824;class Y extends Error{constructor(){super("The timer is in an undefined state.")}}var X,Q=()=>{if(null!==Z)return Z;var e=new Blob(['(()=>{"use strict";\nconst e=new Map,t=new Map,r=(e,t)=>\n{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);\n    return{expected:r+o,remainingDelay:o}},\n    o=(e,t,r,i)=>{const s=performance.now();\n        s>r?postMessage({id:null,method:"call",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};\n        addEventListener("message",(i=>{let{data:s}=i;try{if("clear"===s.method){const{id:r,params:{timerId:o,timerType:i}}=s;\n        if("interval"===i)\n        (t=>{const r=e.get(t);\n        if(void 0===r)\n        throw new Error(\'There is no interval scheduled with the given id "\'.concat(t,\'".\'));\n        clearTimeout(r),e.delete(t)})(o),postMessage({error:null,id:r});\n        else{if("timeout"!==i)\n        throw new Error(\'The given type "\'.concat(i,\'" is not supported\'));\n        (e=>{const r=t.get(e);if(void 0===r)\n        throw new Error(\'There is no timeout scheduled with the given id "\'.concat(e,\'".\'));\n        clearTimeout(r),t.delete(e)})(o),postMessage({error:null,id:r})}}\n        else{if("set"!==s.method)\n        throw new Error(\'The given method "\'.concat(s.method,\'" is not supported\'));\n        {const{params:{delay:i,now:n,timerId:a,timerType:d}}=s;\n        if("interval"===d)\n        ((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);\n        e.set(i,setTimeout(o,a,e,i,n,"interval"))})(i,a,n);\n        else{if("timeout"!==d)\n        throw new Error(\'The given type "\'.concat(d,\'" is not supported\'));\n        ((e,i,s)=>{const{expected:n,remainingDelay:a}=r(e,s);\n        t.set(i,setTimeout(o,a,t,i,n,"timeout"))})(i,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:s.id,result:null})}}))})();'],{type:"application/javascript; charset=utf-8"}),t=URL.createObjectURL(e);return y.info("Worker url established",t),Z=(e=>{var t=new Map([[0,()=>{}]]),i=new Map([[0,()=>{}]]),n=new Map,r=new Worker(e);y.info("worker created ",r);var s,o=new WeakMap,a=((e,t)=>i=>{var n=t.get(i),r=void 0===n?i.size:n<K?n+1:0;if(!i.has(r))return e(i,r);if(i.size<536870912){for(;i.has(r);)r=Math.floor(Math.random()*K);return e(i,r)}if(i.size>G)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;i.has(r);)r=Math.floor(Math.random()*G);return e(i,r)})((s=o,(e,t)=>(s.set(e,t),t)),o);return r.addEventListener("message",e=>{var r,s=e.data;if(void 0!==(r=s).method&&"call"===r.method){var o=s.params,a=o.timerId,l=o.timerType;if("interval"===l){var c=t.get(a);if("number"==typeof c){var u=n.get(c);if(void 0===u||u.timerId!==a||u.timerType!==l)throw new Y}else{if(void 0===c)throw new Y;c()}}else if("timeout"===l){var d=i.get(a);if("number"==typeof d){var h=n.get(d);if(void 0===h||h.timerId!==a||h.timerType!==l)throw new Y}else{if(void 0===d)throw new Y;d(),i.delete(a)}}}else if((e=>null===e.error&&"number"==typeof e.id)(s)){var f=s.id,p=n.get(f);if(void 0===p)throw new Y;var g=p.timerId,v=p.timerType;n.delete(f),"interval"===v?t.delete(g):i.delete(g)}else{var m=s.error.message;y.error(m)}}),{clearInterval:e=>{var i=a(n);n.set(i,{timerId:e,timerType:"interval"}),t.set(e,i),r.postMessage({id:i,method:"clear",params:{timerId:e,timerType:"interval"}})},clearTimeout:e=>{var t=a(n);n.set(t,{timerId:e,timerType:"timeout"}),i.set(e,t),r.postMessage({id:t,method:"clear",params:{timerId:e,timerType:"timeout"}})},setInterval:(e,i)=>{var n=a(t);return t.set(n,()=>{e(),"function"==typeof t.get(n)&&r.postMessage({id:null,method:"set",params:{delay:i,now:performance.now(),timerId:n,timerType:"interval"}})}),r.postMessage({id:null,method:"set",params:{delay:i,now:performance.now(),timerId:n,timerType:"interval"}}),n},setTimeout:(e,t)=>{var n=a(i);return i.set(n,e),r.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:n,timerType:"timeout"}}),n}}})(t),Z.setTimeout(()=>URL.revokeObjectURL(t),0),Z},ee=e=>Q().clearInterval(e),te=e=>Q().clearTimeout(e),ie=(e,t)=>Q().setInterval(e,t),ne=(e,t)=>Q().setTimeout(e,t);class re extends Error{constructor(e){super(e),this.name="AssertionError",Object.setPrototypeOf(this,re.prototype)}}function se(e){if(e instanceof Error)return e;var t="[Unable to stringify the thrown value]";try{t=JSON.stringify(e)}catch(e){}return new Error("This value was thrown as is, not through an Error: ".concat(t))}function oe(e,t){if(!e)throw new re(t)}function ae(e){if(!(e instanceof re))throw new re("".concat(se(e)," is not an AssertionError"))}return function(e){var t=null;e.setErrorHandler=function(e){t?y.error("Error handler already set"):(y.info("Setting custom error handler: ".concat(e)),t=e)},e.check=function(e,i,n){return e||(t?t(i,n):y.info("Assert failed in ".concat(i,": ").concat(n))),e}}(X||(X={})),t})(),e.exports=u()},911(e,t,i){var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==i.g&&i.g,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==i.g&&i.g||{},r="URLSearchParams"in n,s="Symbol"in n&&"iterator"in Symbol,o="FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in n,l="ArrayBuffer"in n;if(l)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&c.indexOf(Object.prototype.toString.call(e))>-1};function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function h(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return s&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function g(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function v(e){return new Promise(function(t,i){e.onload=function(){t(e.result)},e.onerror=function(){i(e.error)}})}function m(e){var t=new FileReader,i=v(t);return t.readAsArrayBuffer(e),i}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function E(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():l&&o&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=g(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer)return g(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer));if(o)return this.blob().then(m);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,i,n,r,s=g(this);if(s)return s;if(this._bodyBlob)return e=this._bodyBlob,i=v(t=new FileReader),r=(n=/charset=([A-Za-z0-9_-]+)/.exec(e.type))?n[1]:"utf-8",t.readAsText(e,r),i;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),i=new Array(t.length),n=0;n<t.length;n++)i[n]=String.fromCharCode(t[n]);return i.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(e,t){e=d(e),t=h(t);var i=this.map[e];this.map[e]=i?i+", "+t:t},p.prototype.delete=function(e){delete this.map[d(e)]},p.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},p.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},p.prototype.set=function(e,t){this.map[d(e)]=h(t)},p.prototype.forEach=function(e,t){for(var i in this.map)this.map.hasOwnProperty(i)&&e.call(t,this.map[i],i,this)},p.prototype.keys=function(){var e=[];return this.forEach(function(t,i){e.push(i)}),f(e)},p.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),f(e)},p.prototype.entries=function(){var e=[];return this.forEach(function(t,i){e.push([i,t])}),f(e)},s&&(p.prototype[Symbol.iterator]=p.prototype.entries);var S=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function b(e,t){if(!(this instanceof b))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var i,r,s=(t=t||{}).body;if(e instanceof b){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new p(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,s||null==e._bodyInit||(s=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new p(t.headers)),this.method=(r=(i=t.method||this.method||"GET").toUpperCase(),S.indexOf(r)>-1?r:i),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in n)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&s)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(s),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var o=/([?&])_=[^&]*/;o.test(this.url)?this.url=this.url.replace(o,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function w(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var i=e.split("="),n=i.shift().replace(/\+/g," "),r=i.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(r))}}),t}function k(e,t){if(!(this instanceof k))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},E.call(b.prototype),E.call(k.prototype),k.prototype.clone=function(){return new k(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},k.error=function(){var e=new k(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var I=[301,302,303,307,308];k.redirect=function(e,t){if(-1===I.indexOf(t))throw new RangeError("Invalid status code");return new k(null,{status:t,headers:{location:e}})},t.DOMException=n.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var i=Error(e);this.stack=i.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function A(e,i){return new Promise(function(r,s){var a=new b(e,i);if(a.signal&&a.signal.aborted)return s(new t.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function u(){c.abort()}if(c.onload=function(){var e,t,i={statusText:c.statusText,headers:(e=c.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var i=e.split(":"),n=i.shift().trim();if(n){var r=i.join(":").trim();try{t.append(n,r)}catch(e){console.warn("Response "+e.message)}}}),t)};0===a.url.indexOf("file://")&&(c.status<200||c.status>599)?i.status=200:i.status=c.status,i.url="responseURL"in c?c.responseURL:i.headers.get("X-Request-URL");var n="response"in c?c.response:c.responseText;setTimeout(function(){r(new k(n,i))},0)},c.onerror=function(){setTimeout(function(){s(new TypeError("Network request failed"))},0)},c.ontimeout=function(){setTimeout(function(){s(new TypeError("Network request timed out"))},0)},c.onabort=function(){setTimeout(function(){s(new t.DOMException("Aborted","AbortError"))},0)},c.open(a.method,function(e){try{return""===e&&n.location.href?n.location.href:e}catch(t){return e}}(a.url),!0),"include"===a.credentials?c.withCredentials=!0:"omit"===a.credentials&&(c.withCredentials=!1),"responseType"in c&&(o?c.responseType="blob":l&&(c.responseType="arraybuffer")),i&&"object"==typeof i.headers&&!(i.headers instanceof p||n.Headers&&i.headers instanceof n.Headers)){var f=[];Object.getOwnPropertyNames(i.headers).forEach(function(e){f.push(d(e)),c.setRequestHeader(e,h(i.headers[e]))}),a.headers.forEach(function(e,t){-1===f.indexOf(t)&&c.setRequestHeader(t,e)})}else a.headers.forEach(function(e,t){c.setRequestHeader(t,e)});a.signal&&(a.signal.addEventListener("abort",u),c.onreadystatechange=function(){4===c.readyState&&a.signal.removeEventListener("abort",u)}),c.send(void 0===a._bodyInit?null:a._bodyInit)})}A.polyfill=!0,n.fetch||(n.fetch=A,n.Headers=p,n.Request=b,n.Response=k),t.Headers=p,t.Request=b,t.Response=k,t.fetch=A}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var s=n.fetch?n:r;(t=s.fetch).default=s.fetch,t.fetch=s.fetch,t.Headers=s.Headers,t.Request=s.Request,t.Response=s.Response,e.exports=t},913(e,t,i){"use strict";var n=i(265),r=i(131),s=i(186),o=i(206),a=i(748),l=e.exports=function(e,t){var i,r,l,c,u;return arguments.length<2||"string"!=typeof e?(c=t,t=e,e=null):c=arguments[2],n(e)?(i=a.call(e,"c"),r=a.call(e,"e"),l=a.call(e,"w")):(i=l=!0,r=!1),u={value:t,configurable:i,enumerable:r,writable:l},c?s(o(c),u):u};l.gs=function(e,t,i){var l,c,u,d;return"string"!=typeof e?(u=i,i=t,t=e,e=null):u=arguments[3],n(t)?r(t)?n(i)?r(i)||(u=i,i=void 0):i=void 0:(u=t,t=i=void 0):t=void 0,n(e)?(l=a.call(e,"c"),c=a.call(e,"e")):(l=!0,c=!1),d={get:t,set:i,configurable:l,enumerable:c},u?s(o(u),d):d}},441(e){"use strict";e.exports=function(){}},186(e,t,i){"use strict";e.exports=i(665)()?Object.assign:i(573)},665(e){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},573(e,t,i){"use strict";var n=i(555),r=i(856),s=Math.max;e.exports=function(e,t){var i,o,a,l=s(arguments.length,2);for(e=Object(r(e)),a=function(n){try{e[n]=t[n]}catch(e){i||(i=e)}},o=1;o<l;++o)n(t=arguments[o]).forEach(a);if(void 0!==i)throw i;return e}},658(e,t,i){"use strict";var n=i(136),r={function:!0,object:!0};e.exports=function(e){return n(e)&&r[typeof e]||!1}},136(e,t,i){"use strict";var n=i(441)();e.exports=function(e){return e!==n&&null!==e}},555(e,t,i){"use strict";e.exports=i(98)()?Object.keys:i(954)},98(e){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},954(e,t,i){"use strict";var n=i(136),r=Object.keys;e.exports=function(e){return r(n(e)?Object(e):e)}},206(e,t,i){"use strict";var n=i(136),r=Array.prototype.forEach,s=Object.create;e.exports=function(e){var t=s(null);return r.call(arguments,function(e){n(e)&&function(e,t){var i;for(i in e)t[i]=e[i]}(Object(e),t)}),t}},805(e){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},666(e,t,i){"use strict";var n=i(658);e.exports=function(e){if(!n(e))throw new TypeError(e+" is not an Object");return e}},856(e,t,i){"use strict";var n=i(136);e.exports=function(e){if(!n(e))throw new TypeError("Cannot use null or undefined");return e}},748(e,t,i){"use strict";e.exports=i(875)()?String.prototype.contains:i(339)},875(e){"use strict";var t="razdwatrzy";e.exports=function(){return"function"==typeof t.contains&&!0===t.contains("dwa")&&!1===t.contains("foo")}},339(e){"use strict";var t=String.prototype.indexOf;e.exports=function(e){return t.call(this,e,arguments[1])>-1}},497(e,t,i){"use strict";var n=i(666),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t,i=arguments[1];if(n(e),void 0===i)r.call(e,"__ee__")&&delete e.__ee__;else{if(!(t=r.call(e,"__ee__")&&e.__ee__))return;t[i]&&delete t[i]}}},322(e,t,i){"use strict";var n,r,s,o,a,l,c,u=i(913),d=i(805),h=Function.prototype.apply,f=Function.prototype.call,p=Object.create,g=Object.defineProperty,v=Object.defineProperties,m=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var i,r;return d(t),r=this,n.call(this,e,i=function(){s.call(r,e,i),h.call(t,this,arguments)}),i.__eeOnceListener__=t,this},o=function(e){var t,i,n,r,s;if(m.call(this,"__ee__")&&(r=this.__ee__[e]))if("object"==typeof r){for(i=arguments.length,s=new Array(i-1),t=1;t<i;++t)s[t-1]=arguments[t];for(r=r.slice(),t=0;n=r[t];++t)h.call(n,this,s)}else switch(arguments.length){case 1:f.call(r,this);break;case 2:f.call(r,this,arguments[1]);break;case 3:f.call(r,this,arguments[1],arguments[2]);break;default:for(i=arguments.length,s=new Array(i-1),t=1;t<i;++t)s[t-1]=arguments[t];h.call(r,this,s)}},a={on:n=function(e,t){var i;return d(t),m.call(this,"__ee__")?i=this.__ee__:(i=y.value=p(null),g(this,"__ee__",y),y.value=null),i[e]?"object"==typeof i[e]?i[e].push(t):i[e]=[i[e],t]:i[e]=t,this},once:r,off:s=function(e,t){var i,n,r,s;if(d(t),!m.call(this,"__ee__"))return this;if(!(i=this.__ee__)[e])return this;if("object"==typeof(n=i[e]))for(s=0;r=n[s];++s)r!==t&&r.__eeOnceListener__!==t||(2===n.length?i[e]=n[s?0:1]:n.splice(s,1));else n!==t&&n.__eeOnceListener__!==t||delete i[e];return this},emit:o},l={on:u(n),once:u(r),off:u(s),emit:u(o)},c=v({},l),e.exports=t=function(e){return null==e?p(c):v(Object(e),l)},t.methods=a},545(e){"use strict";const t=e=>"string"==typeof e,i=()=>{let e,t;const i=new Promise((i,n)=>{e=i,t=n});return i.resolve=e,i.reject=t,i},n=e=>null==e?"":""+e,r=/###/g,s=e=>e&&e.indexOf("###")>-1?e.replace(r,"."):e,o=e=>!e||t(e),a=(e,i,n)=>{const r=t(i)?i.split("."):i;let a=0;for(;a<r.length-1;){if(o(e))return{};const t=s(r[a]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++a}return o(e)?{}:{obj:e,k:s(r[a])}},l=(e,t,i)=>{const{obj:n,k:r}=a(e,t,Object);if(void 0!==n||1===t.length)return void(n[r]=i);let s=t[t.length-1],o=t.slice(0,t.length-1),l=a(e,o,Object);for(;void 0===l.obj&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),l=a(e,o,Object),l&&l.obj&&void 0!==l.obj[`${l.k}.${s}`]&&(l.obj=void 0);l.obj[`${l.k}.${s}`]=i},c=(e,t)=>{const{obj:i,k:n}=a(e,t);if(i)return i[n]},u=(e,i,n)=>{for(const r in i)"__proto__"!==r&&"constructor"!==r&&(r in e?t(e[r])||e[r]instanceof String||t(i[r])||i[r]instanceof String?n&&(e[r]=i[r]):u(e[r],i[r],n):e[r]=i[r]);return e},d=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var h={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const f=e=>t(e)?e.replace(/[&<>"'\/]/g,e=>h[e]):e,p=[" ",",","?","!",";"],g=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}(20),v=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const n=t.split(i);let r=e;for(let e=0;e<n.length;){if(!r||"object"!=typeof r)return;let t,s="";for(let o=e;o<n.length;++o)if(o!==e&&(s+=i),s+=n[o],t=r[s],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&o<n.length-1)continue;e+=o-e+1;break}r=t}return r},m=e=>e&&e.replace("_","-"),y={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class E{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||y,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,i,n,r){return r&&!this.debug?null:(t(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[i](e))}create(e){return new E(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new E(this.logger,e)}}var S=new E;class b{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const i=this.observers[e].get(t)||0;this.observers[e].set(t,i+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(e=>{let[t,n]=e;for(let e=0;e<n;e++)t(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(t=>{let[n,r]=t;for(let t=0;t<r;t++)n.apply(n,[e,...i])})}}class w extends b{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,i,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const s=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,i],n&&(Array.isArray(n)?a.push(...n):t(n)&&s?a.push(...n.split(s)):a.push(n)));const l=c(this.data,a);return!l&&!i&&!n&&e.indexOf(".")>-1&&(e=a[0],i=a[1],n=a.slice(2).join(".")),!l&&o&&t(n)?v(this.data&&this.data[e]&&this.data[e][i],n,s):l}addResource(e,t,i,n){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const s=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator;let o=[e,t];i&&(o=o.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(o=e.split("."),n=t,t=o[1]),this.addNamespaces(t),l(this.data,o,n),r.silent||this.emit("added",e,t,i,n)}addResources(e,i,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)(t(n[r])||Array.isArray(n[r]))&&this.addResource(e,i,r,n[r],{silent:!0});r.silent||this.emit("added",e,i,n)}addResourceBundle(e,t,i,n,r){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),n=i,i=t,t=o[1]),this.addNamespaces(t);let a=c(this.data,o)||{};s.skipCopy||(i=JSON.parse(JSON.stringify(i))),n?u(a,i,r):a={...a,...i},l(this.data,o,a),s.silent||this.emit("added",e,t,i)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var k={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,i,n,r){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,i,n,r))}),t}};const I={};class A extends b{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i,n;super(),i=e,n=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{i[e]&&(n[e]=i[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=S.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const i=this.resolve(e,t);return i&&void 0!==i.res}extractFromKey(e,i){let n=void 0!==i.nsSeparator?i.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let s=i.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||i.keySeparator||this.options.userDefinedNsSeparator||i.nsSeparator||((e,t,i)=>{t=t||"",i=i||"";const n=p.filter(e=>t.indexOf(e)<0&&i.indexOf(e)<0);if(0===n.length)return!0;const r=g.getRegExp(`(${n.map(e=>"?"===e?"\\?":e).join("|")})`);let s=!r.test(e);if(!s){const t=e.indexOf(i);t>0&&!r.test(e.substring(0,t))&&(s=!0)}return s})(e,n,r));if(o&&!a){const i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:t(s)?[s]:s};const o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(s=o.shift()),e=o.join(r)}return{key:e,namespaces:t(s)?[s]:s}}translate(e,i,n){if("object"!=typeof i&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof i&&(i={...i}),i||(i={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==i.returnDetails?i.returnDetails:this.options.returnDetails,s=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],i),l=a[a.length-1],c=i.lng||this.language,u=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(u){const e=i.nsSeparator||this.options.nsSeparator;return r?{res:`${l}${e}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${e}${o}`}return r?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:o}const d=this.resolve(e,i);let h=d&&d.res;const f=d&&d.usedKey||o,p=d&&d.exactUsedKey||o,g=Object.prototype.toString.apply(h),v=void 0!==i.joinArrays?i.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject,y=!t(h)&&"boolean"!=typeof h&&"number"!=typeof h;if(!(m&&h&&y&&["[object Number]","[object Function]","[object RegExp]"].indexOf(g)<0)||t(v)&&Array.isArray(h))if(m&&t(v)&&Array.isArray(h))h=h.join(v),h&&(h=this.extendTranslation(h,e,i,n));else{let r=!1,a=!1;const u=void 0!==i.count&&!t(i.count),f=A.hasDefaultValue(i),p=u?this.pluralResolver.getSuffix(c,i.count,i):"",g=i.ordinal&&u?this.pluralResolver.getSuffix(c,i.count,{ordinal:!1}):"",v=u&&!i.ordinal&&0===i.count&&this.pluralResolver.shouldUseIntlApi(),m=v&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${p}`]||i[`defaultValue${g}`]||i.defaultValue;!this.isValidLookup(h)&&f&&(r=!0,h=m),this.isValidLookup(h)||(a=!0,h=o);const y=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:h,E=f&&m!==h&&this.options.updateMissing;if(a||r||E){if(this.logger.log(E?"updateKey":"missingKey",c,l,o,E?m:h),s){const e=this.resolve(o,{...i,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let i=0;i<t.length;i++)e.push(t[i]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);const n=(e,t,n)=>{const r=f&&n!==h?n:y;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,E,i):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,E,i),this.emit("missingKey",e,l,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&u?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,i);v&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],o+t,i[`defaultValue${t}`]||m)})}):n(e,o,m))}h=this.extendTranslation(h,e,i,d,n),a&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${l}:${o}`),(a||r)&&this.options.parseMissingKeyHandler&&(h="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,r?h:void 0):this.options.parseMissingKeyHandler(h))}else{if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,h,{...i,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return r?(d.res=e,d.usedParams=this.getUsedParamsDetails(i),d):e}if(s){const e=Array.isArray(h),t=e?[]:{},n=e?p:f;for(const e in h)if(Object.prototype.hasOwnProperty.call(h,e)){const r=`${n}${s}${e}`;t[e]=this.translate(r,{...i,joinArrays:!1,ns:a}),t[e]===r&&(t[e]=h[e])}h=t}}return r?(d.res=h,d.usedParams=this.getUsedParamsDetails(i),d):h}extendTranslation(e,i,n,r,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a=t(e)&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let l;if(a){const t=e.match(this.interpolator.nestingRegexp);l=t&&t.length}let c=n.replace&&!t(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,n.lng||this.language||r.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);l<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return s&&s[0]===t[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${t[0]} in key: ${i[0]}`),null):o.translate(...t,i)},n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,l=t(a)?[a]:a;return null!=e&&l&&l.length&&!1!==n.applyPostProcessor&&(e=k.handle(l,e,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let i,n,r,s,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(i))return;const l=this.extractFromKey(e,a),c=l.key;n=c;let u=l.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const d=void 0!==a.count&&!t(a.count),h=d&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&(t(a.context)||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);u.forEach(e=>{this.isValidLookup(i)||(o=e,!I[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(I[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(t=>{if(this.isValidLookup(i))return;s=t;const n=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(n,c,t,e,a);else{let e;d&&(e=this.pluralResolver.getSuffix(t,a.count,a));const i=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(n.push(c+e),a.ordinal&&0===e.indexOf(r)&&n.push(c+e.replace(r,this.options.pluralSeparator)),h&&n.push(c+i)),f){const t=`${c}${this.options.contextSeparator}${a.context}`;n.push(t),d&&(n.push(t+e),a.ordinal&&0===e.indexOf(r)&&n.push(t+e.replace(r,this.options.pluralSeparator)),h&&n.push(t+i))}}let o;for(;o=n.pop();)this.isValidLookup(i)||(r=o,i=this.getResource(t,e,o,a))}))})}),{res:i,usedKey:n,exactUsedKey:r,usedLng:s,usedNS:o}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,i,n):this.resourceStore.getResource(e,t,i,n)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!t(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of i)delete r[e]}return r}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}const C=e=>e.charAt(0).toUpperCase()+e.slice(1);class O{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=S.create("languageUtils")}getScriptPartFromCode(e){if(!(e=m(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=m(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(t(e)&&e.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let t=Intl.getCanonicalLocales(e)[0];if(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)return t}catch(e){}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(e=>e.toLowerCase()):2===i.length?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),t.indexOf(i[1].toLowerCase())>-1&&(i[1]=C(i[1].toLowerCase()))):3===i.length&&(i[0]=i[0].toLowerCase(),2===i[1].length&&(i[1]=i[1].toUpperCase()),"sgn"!==i[0]&&2===i[2].length&&(i[2]=i[2].toUpperCase()),t.indexOf(i[1].toLowerCase())>-1&&(i[1]=C(i[1].toLowerCase())),t.indexOf(i[2].toLowerCase())>-1&&(i[2]=C(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const i=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(i)||(t=i)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const i=this.getLanguagePartFromCode(e);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(e=>e===i?e:e.indexOf("-")<0&&i.indexOf("-")<0?void 0:e.indexOf("-")>0&&i.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===i||0===e.indexOf(i)&&i.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,i){if(!e)return[];if("function"==typeof e&&(e=e(i)),t(e)&&(e=[e]),Array.isArray(e))return e;if(!i)return e.default||[];let n=e[i];return n||(n=e[this.getScriptPartFromCode(i)]),n||(n=e[this.formatLanguageCode(i)]),n||(n=e[this.getLanguagePartFromCode(i)]),n||(n=e.default),n||[]}toResolveHierarchy(e,i){const n=this.getFallbackCodes(i||this.options.fallbackLng||[],e),r=[],s=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return t(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&s(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&s(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&s(this.getLanguagePartFromCode(e))):t(e)&&s(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&s(this.formatLanguageCode(e))}),r}}let T=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],R={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)};const N=["v1","v2","v3"],L=["v4"],x={zero:0,one:1,two:2,few:3,many:4,other:5};class D{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=S.create("pluralResolver"),this.options.compatibilityJSON&&!L.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const e={};return T.forEach(t=>{t.lngs.forEach(i=>{e[i]={numbers:t.nr,plurals:R[t.fc]}})}),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi()){const i=m("dev"===e?"en":e),n=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:i,type:n});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let s;try{s=new Intl.PluralRules(i,{type:n})}catch(i){if(!e.match(/-|_/))return;const n=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(n,t)}return this.pluralRulesCache[r]=s,s}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.getRule(e,t);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,i).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=this.getRule(e,t);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((e,t)=>x[e]-x[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):i.numbers.map(i=>this.getSuffix(e,i,t)):[]}getSuffix(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.getRule(e,i);return n?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:this.getSuffixRetroCompatible(n,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const i=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let n=e.numbers[i];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===n?n="plural":1===n&&(n=""));const r=()=>this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString();return"v1"===this.options.compatibilityJSON?1===n?"":"number"==typeof n?`_plural_${n.toString()}`:r():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?r():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!N.includes(this.options.compatibilityJSON)}}const U=function(e,i,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=((e,t,i)=>{const n=c(e,i);return void 0!==n?n:c(t,i)})(e,i,n);return!o&&s&&t(n)&&(o=v(e,n,r),void 0===o&&(o=v(i,n,r))),o},P=e=>e.replace(/\$/g,"$$$$");class _{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=S.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:i,useRawValueToEscape:n,prefix:r,prefixEscaped:s,suffix:o,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:g,nestingSuffixEscaped:v,nestingOptionsSeparator:m,maxReplaces:y,alwaysFormat:E}=e.interpolation;this.escape=void 0!==t?t:f,this.escapeValue=void 0===i||i,this.useRawValueToEscape=void 0!==n&&n,this.prefix=r?d(r):s||"{{",this.suffix=o?d(o):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=h?d(h):p||d("$t("),this.nestingSuffix=g?d(g):v||d(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=y||1e3,this.alwaysFormat=void 0!==E&&E,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,i,r,s){let o,a,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){const t=U(i,c,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(t,void 0,r,{...s,...i,interpolationkey:e}):t}const t=e.split(this.formatSeparator),n=t.shift().trim(),o=t.join(this.formatSeparator).trim();return this.format(U(i,c,n,this.options.keySeparator,this.options.ignoreJSONStructure),o,r,{...s,...i,interpolationkey:n})};this.resetRegExp();const d=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,h=s&&s.interpolation&&void 0!==s.interpolation.skipOnVariables?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>P(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?P(this.escape(e)):P(e)}].forEach(i=>{for(l=0;o=i.regex.exec(e);){const r=o[1].trim();if(a=u(r),void 0===a)if("function"==typeof d){const i=d(e,o,s);a=t(i)?i:""}else if(s&&Object.prototype.hasOwnProperty.call(s,r))a="";else{if(h){a=o[0];continue}this.logger.warn(`missed to pass in variable ${r} for interpolating ${e}`),a=""}else t(a)||this.useRawValueToEscape||(a=n(a));const c=i.safeValue(a);if(e=e.replace(o[0],c),h?(i.regex.lastIndex+=a.length,i.regex.lastIndex-=o[0].length):i.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,i){let r,s,o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const l=(e,t)=>{const i=this.nestingOptionsSeparator;if(e.indexOf(i)<0)return e;const n=e.split(new RegExp(`${i}[ ]*{`));let r=`{${n[1]}`;e=n[0],r=this.interpolate(r,o);const s=r.match(/'/g),a=r.match(/"/g);(s&&s.length%2==0&&!a||a.length%2!=0)&&(r=r.replace(/'/g,'"'));try{o=JSON.parse(r),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${i}${r}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let c=[];o={...a},o=o.replace&&!t(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){const e=r[1].split(this.formatSeparator).map(e=>e.trim());r[1]=e.shift(),c=e,u=!0}if(s=i(l.call(this,r[1].trim(),o),o),s&&r[0]===e&&!t(s))return s;t(s)||(s=n(s)),s||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),s=""),u&&(s=c.reduce((e,t)=>this.format(e,t,a.lng,{...a,interpolationkey:r[1].trim()}),s.trim())),e=e.replace(r[0],s),this.regexp.lastIndex=0}return e}}const V=e=>{const t={};return(i,n,r)=>{let s=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(s={...s,[r.interpolationkey]:void 0});const o=n+JSON.stringify(s);let a=t[o];return a||(a=e(m(n),r),t[o]=a),a(i)}};class M{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=S.create("formatter"),this.options=e,this.formats={number:V((e,t)=>{const i=new Intl.NumberFormat(e,{...t});return e=>i.format(e)}),currency:V((e,t)=>{const i=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>i.format(e)}),datetime:V((e,t)=>{const i=new Intl.DateTimeFormat(e,{...t});return e=>i.format(e)}),relativetime:V((e,t)=>{const i=new Intl.RelativeTimeFormat(e,{...t});return e=>i.format(e,t.range||"day")}),list:V((e,t)=>{const i=new Intl.ListFormat(e,{...t});return e=>i.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=V(t)}format(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(e=>e.indexOf(")")>-1)){const e=r.findIndex(e=>e.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,e)].join(this.formatSeparator)}return r.reduce((e,t)=>{const{formatName:r,formatOptions:s}=(e=>{let t=e.toLowerCase().trim();const i={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const r=n[1].substring(0,n[1].length-1);"currency"===t&&r.indexOf(":")<0?i.currency||(i.currency=r.trim()):"relativetime"===t&&r.indexOf(":")<0?i.range||(i.range=r.trim()):r.split(";").forEach(e=>{if(e){const[t,...n]=e.split(":"),r=n.join(":").trim().replace(/^'+|'+$/g,""),s=t.trim();i[s]||(i[s]=r),"false"===r&&(i[s]=!1),"true"===r&&(i[s]=!0),isNaN(r)||(i[s]=parseInt(r,10))}})}return{formatName:t,formatOptions:i}})(t);if(this.formats[r]){let t=e;try{const o=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},a=o.locale||o.lng||n.locale||n.lng||i;t=this.formats[r](e,a,{...s,...n,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${r}`),e},e)}}class j extends b{constructor(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=n,this.logger=S.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,n.backend,n)}queueLoad(e,t,i,n){const r={},s={},o={},a={};return e.forEach(e=>{let n=!0;t.forEach(t=>{const o=`${e}|${t}`;!i.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(1===this.state[o]?void 0===s[o]&&(s[o]=!0):(this.state[o]=1,n=!1,void 0===s[o]&&(s[o]=!0),void 0===r[o]&&(r[o]=!0),void 0===a[t]&&(a[t]=!0)))}),n||(o[e]=!0)}),(Object.keys(r).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(r),pending:Object.keys(s),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(a)}}loaded(e,t,i){const n=e.split("|"),r=n[0],s=n[1];t&&this.emit("failedLoading",r,s,t),!t&&i&&this.store.addResourceBundle(r,s,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);const o={};this.queue.forEach(i=>{((e,t,i)=>{const{obj:n,k:r}=a(e,t,Object);n[r]=n[r]||[],n[r].push(i)})(i.loaded,[r],s),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(i,e),t&&i.errors.push(t),0!==i.pendingCount||i.done||(Object.keys(i.loaded).forEach(e=>{o[e]||(o[e]={});const t=i.loaded[e];t.length&&t.forEach(t=>{void 0===o[e][t]&&(o[e][t]=!0)})}),i.done=!0,i.errors.length?i.callback(i.errors):i.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:i,tried:n,wait:r,callback:s});this.readingCalls++;const o=(o,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}o&&a&&n<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,i,n+1,2*r,s)},r):s(o,a)},a=this.backend[i].bind(this.backend);if(2!==a.length)return a(e,t,o);try{const i=a(e,t);i&&"function"==typeof i.then?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}}prepareLoading(e,i){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();t(e)&&(e=this.languageUtils.toResolveHierarchy(e)),t(i)&&(i=[i]);const s=this.queueLoad(e,i,n,r);if(!s.toLoad.length)return s.pending.length||r(),null;s.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const i=e.split("|"),n=i[0],r=i[1];this.read(n,r,"read",void 0,void 0,(i,s)=>{i&&this.logger.warn(`${t}loading namespace ${r} for language ${n} failed`,i),!i&&s&&this.logger.log(`${t}loaded namespace ${r} for language ${n}`,s),this.loaded(e,i,s)})}saveMissing(e,t,i,n,r){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${i}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=i&&""!==i){if(this.backend&&this.backend.create){const a={...s,isUpdate:r},l=this.backend.create.bind(this.backend);if(l.length<6)try{let r;r=5===l.length?l(e,t,i,n,a):l(e,t,i,n),r&&"function"==typeof r.then?r.then(e=>o(null,e)).catch(o):o(null,r)}catch(e){o(e)}else l(e,t,i,n,o,a)}e&&e[0]&&this.store.addResource(e[0],t,i,n)}}}const q=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let i={};if("object"==typeof e[1]&&(i=e[1]),t(e[1])&&(i.defaultValue=e[1]),t(e[2])&&(i.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const t=e[3]||e[2];Object.keys(t).forEach(e=>{i[e]=t[e]})}return i},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),F=e=>(t(e.ns)&&(e.ns=[e.ns]),t(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),t(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),$=()=>{};class B extends b{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var i;if(super(),this.options=F(e),this.services={},this.logger=S,this.modules={external:[]},i=this,Object.getOwnPropertyNames(Object.getPrototypeOf(i)).forEach(e=>{"function"==typeof i[e]&&(i[e]=i[e].bind(i))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof n&&(r=n,n={}),!n.defaultNS&&!1!==n.defaultNS&&n.ns&&(t(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=q();this.options={...s,...this.options,...F(n)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),void 0!==n.keySeparator&&(this.options.userDefinedKeySeparator=n.keySeparator),void 0!==n.nsSeparator&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?S.init(o(this.modules.logger),this.options):S.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=M);const i=new O(this.options);this.store=new w(this.options.resources,this.options);const n=this.services;n.logger=S,n.resourceStore=this.store,n.languageUtils=i,n.pluralResolver=new D(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format||(n.formatter=o(t),n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new _(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new j(o(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on("*",function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];e.emit(t,...n)}),this.modules.languageDetector&&(n.languageDetector=o(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=o(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new A(this.services,this.options),this.translator.on("*",function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];e.emit(t,...n)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,r||(r=$),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});const a=i(),l=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(t),r(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),a}loadResources(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$;const n=t(e)?e:this.language;if("function"==typeof e&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return i();const e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};n?t(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload&&this.options.preload.forEach(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),i(e)})}else i(null)}reloadResources(e,t,n){const r=i();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=$),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&k.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,n){var r=this;this.isLanguageChangingTo=e;const s=i();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(e,t)=>{t?(o(t),this.translator.changeLanguage(t),this.isLanguageChangingTo=void 0,this.emit("languageChanged",t),this.logger.log("languageChanged",t)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(e,function(){return r.t(...arguments)})},l=i=>{e||i||!this.services.languageDetector||(i=[]);const n=t(i)?i:this.services.languageUtils.getBestMatchFromCodes(i);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,e=>{a(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e):l(this.services.languageDetector.detect()),s}getFixedT(e,i,n){var r=this;const s=function(e,t){let i;if("object"!=typeof t){for(var o=arguments.length,a=new Array(o>2?o-2:0),l=2;l<o;l++)a[l-2]=arguments[l];i=r.options.overloadTranslationOptionHandler([e,t].concat(a))}else i={...t};i.lng=i.lng||s.lng,i.lngs=i.lngs||s.lngs,i.ns=i.ns||s.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||s.keyPrefix);const c=r.options.keySeparator||".";let u;return u=i.keyPrefix&&Array.isArray(e)?e.map(e=>`${i.keyPrefix}${c}${e}`):i.keyPrefix?`${i.keyPrefix}${c}${e}`:e,r.t(u,i)};return t(e)?s.lng=e:s.lngs=e,s.ns=i,s.keyPrefix=n,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;const s=(e,t)=>{const i=this.services.backendConnector.state[`${e}|${t}`];return-1===i||0===i||2===i};if(t.precheck){const e=t.precheck(this,s);if(void 0!==e)return e}return!(!this.hasResourceBundle(i,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!s(i,e)||n&&!s(r,e)))}loadNamespaces(e,n){const r=i();return this.options.ns?(t(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{r.resolve(),n&&n(e)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=i();t(e)&&(e=[e]);const s=this.options.preload||[],o=e.filter(e=>s.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=s.concat(o),this.loadResources(e=>{r.resolve(),n&&n(e)}),r):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new O(q());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new B(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const n={...this.options,...e,isClone:!0},r=new B(n);return void 0===e.debug&&void 0===e.prefix||(r.logger=r.logger.clone(e)),["store","services","language"].forEach(e=>{r[e]=this[e]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},i&&(r.store=new w(this.store.data,n),r.services.resourceStore=r.store),r.translator=new A(r.services,n),r.translator.on("*",function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];r.emit(e,...i)}),r.init(n,t),r.translator.options=n,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const H=B.createInstance();H.createInstance=B.createInstance,e.exports=H},327(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends Error{}class n extends i{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class r extends i{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class s extends i{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class o extends i{}class a extends i{constructor(e){super(`Invalid unit ${e}`)}}class l extends i{}class c extends i{constructor(){super("Zone is an abstract class")}}const u="numeric",d="short",h="long",f={year:u,month:u,day:u},p={year:u,month:d,day:u},g={year:u,month:d,day:u,weekday:d},v={year:u,month:h,day:u},m={year:u,month:h,day:u,weekday:h},y={hour:u,minute:u},E={hour:u,minute:u,second:u},S={hour:u,minute:u,second:u,timeZoneName:d},b={hour:u,minute:u,second:u,timeZoneName:h},w={hour:u,minute:u,hourCycle:"h23"},k={hour:u,minute:u,second:u,hourCycle:"h23"},I={hour:u,minute:u,second:u,hourCycle:"h23",timeZoneName:d},A={hour:u,minute:u,second:u,hourCycle:"h23",timeZoneName:h},C={year:u,month:u,day:u,hour:u,minute:u},O={year:u,month:u,day:u,hour:u,minute:u,second:u},T={year:u,month:d,day:u,hour:u,minute:u},R={year:u,month:d,day:u,hour:u,minute:u,second:u},N={year:u,month:d,day:u,weekday:d,hour:u,minute:u},L={year:u,month:h,day:u,hour:u,minute:u,timeZoneName:d},x={year:u,month:h,day:u,hour:u,minute:u,second:u,timeZoneName:d},D={year:u,month:h,day:u,weekday:h,hour:u,minute:u,timeZoneName:h},U={year:u,month:h,day:u,weekday:h,hour:u,minute:u,second:u,timeZoneName:h};class P{get type(){throw new c}get name(){throw new c}get ianaName(){return this.name}get isUniversal(){throw new c}offsetName(e,t){throw new c}formatOffset(e,t){throw new c}offset(e){throw new c}equals(e){throw new c}get isValid(){throw new c}}let _=null;class V extends P{static get instance(){return null===_&&(_=new V),_}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Ke(e,t,i)}formatOffset(e,t){return et(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}let M={};const j={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let q={};class F extends P{static create(e){return q[e]||(q[e]=new F(e)),q[e]}static resetCache(){q={},M={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=F.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Ke(e,t,i,this.name)}formatOffset(e,t){return et(this.offset(e),t)}offset(e){const t=new Date(e);if(isNaN(t))return NaN;const i=(n=this.name,M[n]||(M[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),M[n]);var n;let[r,s,o,a,l,c,u]=i.formatToParts?function(e,t){const i=e.formatToParts(t),n=[];for(let e=0;e<i.length;e++){const{type:t,value:r}=i[e],s=j[t];"era"===t?n[s]=r:Re(s)||(n[s]=parseInt(r,10))}return n}(i,t):function(e,t){const i=e.format(t).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(i),[,r,s,o,a,l,c,u]=n;return[o,r,s,a,l,c,u]}(i,t);"BC"===a&&(r=1-Math.abs(r));let d=+t;const h=d%1e3;return d-=h>=0?h:1e3+h,(We({year:r,month:s,day:o,hour:24===l?0:l,minute:c,second:u,millisecond:0})-d)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let $={},B={};function H(e,t={}){const i=JSON.stringify([e,t]);let n=B[i];return n||(n=new Intl.DateTimeFormat(e,t),B[i]=n),n}let z={},W={},J=null,Z={};function G(e,t,i,n){const r=e.listingMode();return"error"===r?null:"en"===r?i(t):n(t)}class K{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:n,floor:r,...s}=i;if(!t||Object.keys(s).length>0){const t={useGrouping:!1,...i};i.padTo>0&&(t.minimumIntegerDigits=i.padTo),this.inf=function(e,t={}){const i=JSON.stringify([e,t]);let n=z[i];return n||(n=new Intl.NumberFormat(e,t),z[i]=n),n}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Me(this.floor?Math.floor(e):$e(e,3),this.padTo)}}class Y{constructor(e,t,i){let n;if(this.opts=i,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,i=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&F.create(i).valid?(n=i,this.dt=e):(n="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,n=e.zone.name):(n="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const r={...this.opts};r.timeZone=r.timeZone||n,this.dtf=H(t,r)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class X{constructor(e,t,i){this.opts={style:"long",...i},!t&&xe()&&(this.rtf=function(e,t={}){const{base:i,...n}=t,r=JSON.stringify([e,n]);let s=W[r];return s||(s=new Intl.RelativeTimeFormat(e,t),W[r]=s),s}(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,i="always",n=!1){const r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===i&&s){const i="days"===e;switch(t){case 1:return i?"tomorrow":`next ${r[e][0]}`;case-1:return i?"yesterday":`last ${r[e][0]}`;case 0:return i?"today":`this ${r[e][0]}`}}const o=Object.is(t,-0)||t<0,a=Math.abs(t),l=1===a,c=r[e],u=n?l?c[1]:c[2]||c[1]:l?r[e][0]:e;return o?`${a} ${u} ago`:`in ${a} ${u}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const Q={firstDay:1,minimalDays:4,weekend:[6,7]};class ee{static fromOpts(e){return ee.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,i,n,r=!1){const s=e||fe.defaultLocale,o=s||(r?"en-US":J||(J=(new Intl.DateTimeFormat).resolvedOptions().locale,J)),a=t||fe.defaultNumberingSystem,l=i||fe.defaultOutputCalendar,c=_e(n)||fe.defaultWeekSettings;return new ee(o,a,l,c,s)}static resetCache(){J=null,B={},z={},W={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i,weekSettings:n}={}){return ee.create(e,t,i,n)}constructor(e,t,i,n,r){const[s,o,a]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const i=e.indexOf("-u-");if(-1===i)return[e];{let t,n;try{t=H(e).resolvedOptions(),n=e}catch(r){const s=e.substring(0,i);t=H(s).resolvedOptions(),n=s}const{numberingSystem:r,calendar:s}=t;return[n,r,s]}}(e);this.locale=s,this.numberingSystem=t||o||null,this.outputCalendar=i||a||null,this.weekSettings=n,this.intl=function(e,t,i){return i||t?(e.includes("-u-")||(e+="-u"),i&&(e+=`-ca-${i}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?ee.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,_e(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return G(this,e,st,()=>{const i=t?{month:e,day:"numeric"}:{month:e},n=t?"format":"standalone";return this.monthsCache[n][e]||(this.monthsCache[n][e]=function(e){const t=[];for(let i=1;i<=12;i++){const n=an.utc(2009,i,1);t.push(e(n))}return t}(e=>this.extract(e,i,"month"))),this.monthsCache[n][e]})}weekdays(e,t=!1){return G(this,e,ct,()=>{const i=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},n=t?"format":"standalone";return this.weekdaysCache[n][e]||(this.weekdaysCache[n][e]=function(e){const t=[];for(let i=1;i<=7;i++){const n=an.utc(2016,11,13+i);t.push(e(n))}return t}(e=>this.extract(e,i,"weekday"))),this.weekdaysCache[n][e]})}meridiems(){return G(this,void 0,()=>ut,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[an.utc(2016,11,13,9),an.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return G(this,e,pt,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[an.utc(-40,1,1),an.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,i){const n=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===i);return n?n.value:null}numberFormatter(e={}){return new K(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Y(e,this.intl,t)}relFormatter(e={}){return new X(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const i=JSON.stringify([e,t]);let n=$[i];return n||(n=new Intl.ListFormat(e,t),$[i]=n),n}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:De()?function(e){let t=Z[e];if(!t){const i=new Intl.Locale(e);t="getWeekInfo"in i?i.getWeekInfo():i.weekInfo,Z[e]=t}return t}(this.locale):Q}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}let te=null;class ie extends P{static get utcInstance(){return null===te&&(te=new ie(0)),te}static instance(e){return 0===e?ie.utcInstance:new ie(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new ie(Ye(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${et(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${et(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return et(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class ne extends P{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function re(e,t){if(Re(e)||null===e)return t;if(e instanceof P)return e;if("string"==typeof e){const i=e.toLowerCase();return"default"===i?t:"local"===i||"system"===i?V.instance:"utc"===i||"gmt"===i?ie.utcInstance:ie.parseSpecifier(i)||F.create(e)}return Ne(e)?ie.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new ne(e)}let se,oe=()=>Date.now(),ae="system",le=null,ce=null,ue=null,de=60,he=null;class fe{static get now(){return oe}static set now(e){oe=e}static set defaultZone(e){ae=e}static get defaultZone(){return re(ae,V.instance)}static get defaultLocale(){return le}static set defaultLocale(e){le=e}static get defaultNumberingSystem(){return ce}static set defaultNumberingSystem(e){ce=e}static get defaultOutputCalendar(){return ue}static set defaultOutputCalendar(e){ue=e}static get defaultWeekSettings(){return he}static set defaultWeekSettings(e){he=_e(e)}static get twoDigitCutoffYear(){return de}static set twoDigitCutoffYear(e){de=e%100}static get throwOnInvalid(){return se}static set throwOnInvalid(e){se=e}static resetCaches(){ee.resetCache(),F.resetCache()}}class pe{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const ge=[0,31,59,90,120,151,181,212,243,273,304,334],ve=[0,31,60,91,121,152,182,213,244,274,305,335];function me(e,t){return new pe("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function ye(e,t,i){const n=new Date(Date.UTC(e,t-1,i));e<100&&e>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const r=n.getUTCDay();return 0===r?7:r}function Ee(e,t,i){return i+(Be(e)?ve:ge)[t-1]}function Se(e,t){const i=Be(e)?ve:ge,n=i.findIndex(e=>e<t);return{month:n+1,day:t-i[n]}}function be(e,t){return(e-t+7)%7+1}function we(e,t=4,i=1){const{year:n,month:r,day:s}=e,o=Ee(n,r,s),a=be(ye(n,r,s),i);let l,c=Math.floor((o-a+14-t)/7);return c<1?(l=n-1,c=Ze(l,t,i)):c>Ze(n,t,i)?(l=n+1,c=1):l=n,{weekYear:l,weekNumber:c,weekday:a,...tt(e)}}function ke(e,t=4,i=1){const{weekYear:n,weekNumber:r,weekday:s}=e,o=be(ye(n,1,t),i),a=He(n);let l,c=7*r+s-o-7+t;c<1?(l=n-1,c+=He(l)):c>a?(l=n+1,c-=He(n)):l=n;const{month:u,day:d}=Se(l,c);return{year:l,month:u,day:d,...tt(e)}}function Ie(e){const{year:t,month:i,day:n}=e;return{year:t,ordinal:Ee(t,i,n),...tt(e)}}function Ae(e){const{year:t,ordinal:i}=e,{month:n,day:r}=Se(t,i);return{year:t,month:n,day:r,...tt(e)}}function Ce(e,t){if(!Re(e.localWeekday)||!Re(e.localWeekNumber)||!Re(e.localWeekYear)){if(!Re(e.weekday)||!Re(e.weekNumber)||!Re(e.weekYear))throw new o("Cannot mix locale-based week fields with ISO-based week fields");return Re(e.localWeekday)||(e.weekday=e.localWeekday),Re(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Re(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Oe(e){const t=Le(e.year),i=Ve(e.month,1,12),n=Ve(e.day,1,ze(e.year,e.month));return t?i?!n&&me("day",e.day):me("month",e.month):me("year",e.year)}function Te(e){const{hour:t,minute:i,second:n,millisecond:r}=e,s=Ve(t,0,23)||24===t&&0===i&&0===n&&0===r,o=Ve(i,0,59),a=Ve(n,0,59),l=Ve(r,0,999);return s?o?a?!l&&me("millisecond",r):me("second",n):me("minute",i):me("hour",t)}function Re(e){return void 0===e}function Ne(e){return"number"==typeof e}function Le(e){return"number"==typeof e&&e%1==0}function xe(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function De(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Ue(e,t,i){if(0!==e.length)return e.reduce((e,n)=>{const r=[t(n),n];return e&&i(e[0],r[0])===e[0]?e:r},null)[1]}function Pe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _e(e){if(null==e)return null;if("object"!=typeof e)throw new l("Week settings must be an object");if(!Ve(e.firstDay,1,7)||!Ve(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!Ve(e,1,7)))throw new l("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Ve(e,t,i){return Le(e)&&e>=t&&e<=i}function Me(e,t=2){let i;return i=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),i}function je(e){return Re(e)||null===e||""===e?void 0:parseInt(e,10)}function qe(e){return Re(e)||null===e||""===e?void 0:parseFloat(e)}function Fe(e){if(!Re(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function $e(e,t,i=!1){const n=10**t;return(i?Math.trunc:Math.round)(e*n)/n}function Be(e){return e%4==0&&(e%100!=0||e%400==0)}function He(e){return Be(e)?366:365}function ze(e,t){const i=(n=t-1)-12*Math.floor(n/12)+1;var n;return 2===i?Be(e+(t-i)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][i-1]}function We(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Je(e,t,i){return-be(ye(e,1,t),i)+t-1}function Ze(e,t=4,i=1){const n=Je(e,t,i),r=Je(e+1,t,i);return(He(e)-n+r)/7}function Ge(e){return e>99?e:e>fe.twoDigitCutoffYear?1900+e:2e3+e}function Ke(e,t,i,n=null){const r=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(s.timeZone=n);const o={timeZoneName:t,...s},a=new Intl.DateTimeFormat(i,o).formatToParts(r).find(e=>"timezonename"===e.type.toLowerCase());return a?a.value:null}function Ye(e,t){let i=parseInt(e,10);Number.isNaN(i)&&(i=0);const n=parseInt(t,10)||0;return 60*i+(i<0||Object.is(i,-0)?-n:n)}function Xe(e){const t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new l(`Invalid unit value ${e}`);return t}function Qe(e,t){const i={};for(const n in e)if(Pe(e,n)){const r=e[n];if(null==r)continue;i[t(n)]=Xe(r)}return i}function et(e,t){const i=Math.trunc(Math.abs(e/60)),n=Math.trunc(Math.abs(e%60)),r=e>=0?"+":"-";switch(t){case"short":return`${r}${Me(i,2)}:${Me(n,2)}`;case"narrow":return`${r}${i}${n>0?`:${n}`:""}`;case"techie":return`${r}${Me(i,2)}${Me(n,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function tt(e){return function(e){return["hour","minute","second","millisecond"].reduce((t,i)=>(t[i]=e[i],t),{})}(e)}const it=["January","February","March","April","May","June","July","August","September","October","November","December"],nt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],rt=["J","F","M","A","M","J","J","A","S","O","N","D"];function st(e){switch(e){case"narrow":return[...rt];case"short":return[...nt];case"long":return[...it];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const ot=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],at=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],lt=["M","T","W","T","F","S","S"];function ct(e){switch(e){case"narrow":return[...lt];case"short":return[...at];case"long":return[...ot];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const ut=["AM","PM"],dt=["Before Christ","Anno Domini"],ht=["BC","AD"],ft=["B","A"];function pt(e){switch(e){case"narrow":return[...ft];case"short":return[...ht];case"long":return[...dt];default:return null}}function gt(e,t){let i="";for(const n of e)n.literal?i+=n.val:i+=t(n.val);return i}const vt={D:f,DD:p,DDD:v,DDDD:m,t:y,tt:E,ttt:S,tttt:b,T:w,TT:k,TTT:I,TTTT:A,f:C,ff:T,fff:L,ffff:D,F:O,FF:R,FFF:x,FFFF:U};class mt{static create(e,t={}){return new mt(e,t)}static parseFormat(e){let t=null,i="",n=!1;const r=[];for(let s=0;s<e.length;s++){const o=e.charAt(s);"'"===o?(i.length>0&&r.push({literal:n||/^\s+$/.test(i),val:i}),t=null,i="",n=!n):n||o===t?i+=o:(i.length>0&&r.push({literal:/^\s+$/.test(i),val:i}),i=o,t=o)}return i.length>0&&r.push({literal:n||/^\s+$/.test(i),val:i}),r}static macroTokenToFormatOpts(e){return vt[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return Me(e,t);const i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const i="en"===this.loc.listingMode(),n=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,r=(t,i)=>this.loc.extract(e,t,i),s=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",o=(t,n)=>i?function(e,t){return st(t)[e.month-1]}(e,t):r(n?{month:t}:{month:t,day:"numeric"},"month"),a=(t,n)=>i?function(e,t){return ct(t)[e.weekday-1]}(e,t):r(n?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),l=t=>{const i=mt.macroTokenToFormatOpts(t);return i?this.formatWithSystemDefault(e,i):t},c=t=>i?function(e,t){return pt(t)[e.year<0?0:1]}(e,t):r({era:t},"era");return gt(mt.parseFormat(t),t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return i?function(e){return ut[e.hour<12?0:1]}(e):r({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return n?r({day:"numeric"},"day"):this.num(e.day);case"dd":return n?r({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return a("short",!0);case"cccc":return a("long",!0);case"ccccc":return a("narrow",!0);case"EEE":return a("short",!1);case"EEEE":return a("long",!1);case"EEEEE":return a("narrow",!1);case"L":return n?r({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return n?r({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return o("short",!0);case"LLLL":return o("long",!0);case"LLLLL":return o("narrow",!0);case"M":return n?r({month:"numeric"},"month"):this.num(e.month);case"MM":return n?r({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return o("short",!1);case"MMMM":return o("long",!1);case"MMMMM":return o("narrow",!1);case"y":return n?r({year:"numeric"},"year"):this.num(e.year);case"yy":return n?r({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return n?r({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return n?r({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return l(t)}})}formatDurationFromString(e,t){const i=e=>{switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},n=mt.parseFormat(t),r=n.reduce((e,{literal:t,val:i})=>t?e:e.concat(i),[]);return gt(n,(e=>t=>{const n=i(t);return n?this.num(e.get(n),t.length):t})(e.shiftTo(...r.map(i).filter(e=>e))))}}const yt=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Et(...e){const t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function St(...e){return t=>e.reduce(([e,i,n],r)=>{const[s,o,a]=r(t,n);return[{...e,...s},o||i,a]},[{},null,1]).slice(0,2)}function bt(e,...t){if(null==e)return[null,null];for(const[i,n]of t){const t=i.exec(e);if(t)return n(t)}return[null,null]}function wt(...e){return(t,i)=>{const n={};let r;for(r=0;r<e.length;r++)n[e[r]]=je(t[i+r]);return[n,null,i+r]}}const kt=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,It=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,At=RegExp(`${It.source}(?:${kt.source}?(?:\\[(${yt.source})\\])?)?`),Ct=RegExp(`(?:T${At.source})?`),Ot=wt("weekYear","weekNumber","weekDay"),Tt=wt("year","ordinal"),Rt=RegExp(`${It.source} ?(?:${kt.source}|(${yt.source}))?`),Nt=RegExp(`(?: ${Rt.source})?`);function Lt(e,t,i){const n=e[t];return Re(n)?i:je(n)}function xt(e,t){return[{hours:Lt(e,t,0),minutes:Lt(e,t+1,0),seconds:Lt(e,t+2,0),milliseconds:Fe(e[t+3])},null,t+4]}function Dt(e,t){const i=!e[t]&&!e[t+1],n=Ye(e[t+1],e[t+2]);return[{},i?null:ie.instance(n),t+3]}function Ut(e,t){return[{},e[t]?F.create(e[t]):null,t+1]}const Pt=RegExp(`^T?${It.source}$`),_t=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Vt(e){const[t,i,n,r,s,o,a,l,c]=e,u="-"===t[0],d=l&&"-"===l[0],h=(e,t=!1)=>void 0!==e&&(t||e&&u)?-e:e;return[{years:h(qe(i)),months:h(qe(n)),weeks:h(qe(r)),days:h(qe(s)),hours:h(qe(o)),minutes:h(qe(a)),seconds:h(qe(l),"-0"===l),milliseconds:h(Fe(c),d)}]}const Mt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function jt(e,t,i,n,r,s,o){const a={year:2===t.length?Ge(je(t)):je(t),month:nt.indexOf(i)+1,day:je(n),hour:je(r),minute:je(s)};return o&&(a.second=je(o)),e&&(a.weekday=e.length>3?ot.indexOf(e)+1:at.indexOf(e)+1),a}const qt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ft(e){const[,t,i,n,r,s,o,a,l,c,u,d]=e,h=jt(t,r,n,i,s,o,a);let f;return f=l?Mt[l]:c?0:Ye(u,d),[h,new ie(f)]}const $t=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Bt=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Ht=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function zt(e){const[,t,i,n,r,s,o,a]=e;return[jt(t,r,n,i,s,o,a),ie.utcInstance]}function Wt(e){const[,t,i,n,r,s,o,a]=e;return[jt(t,a,i,n,r,s,o),ie.utcInstance]}const Jt=Et(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ct),Zt=Et(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Ct),Gt=Et(/(\d{4})-?(\d{3})/,Ct),Kt=Et(At),Yt=St(function(e,t){return[{year:Lt(e,t),month:Lt(e,t+1,1),day:Lt(e,t+2,1)},null,t+3]},xt,Dt,Ut),Xt=St(Ot,xt,Dt,Ut),Qt=St(Tt,xt,Dt,Ut),ei=St(xt,Dt,Ut),ti=St(xt),ii=Et(/(\d{4})-(\d\d)-(\d\d)/,Nt),ni=Et(Rt),ri=St(xt,Dt,Ut),si="Invalid Duration",oi={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},ai={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...oi},li={years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...oi},ci=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ui=ci.slice(0).reverse();function di(e,t,i=!1){const n={values:i?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new pi(n)}function hi(e,t){var i;let n=null!=(i=t.milliseconds)?i:0;for(const i of ui.slice(1))t[i]&&(n+=t[i]*e[i].milliseconds);return n}function fi(e,t){const i=hi(e,t)<0?-1:1;ci.reduceRight((n,r)=>{if(Re(t[r]))return n;if(n){const s=t[n]*i,o=e[r][n],a=Math.floor(s/o);t[r]+=a*i,t[n]-=a*o*i}return r},null),ci.reduce((i,n)=>{if(Re(t[n]))return i;if(i){const r=t[i]%1;t[i]-=r,t[n]+=r*e[i][n]}return n},null)}class pi{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let i=t?li:ai;e.matrix&&(i=e.matrix),this.values=e.values,this.loc=e.loc||ee.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(e,t){return pi.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new l("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new pi({values:Qe(e,pi.normalizeUnit),loc:ee.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(Ne(e))return pi.fromMillis(e);if(pi.isDuration(e))return e;if("object"==typeof e)return pi.fromObject(e);throw new l(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=function(e){return bt(e,[_t,Vt])}(e);return i?pi.fromObject(i,t):pi.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=function(e){return bt(e,[Pt,ti])}(e);return i?pi.fromObject(i,t):pi.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new l("need to specify a reason the Duration is invalid");const i=e instanceof pe?e:new pe(e,t);if(fe.throwOnInvalid)throw new s(i);return new pi({invalid:i})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new a(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const i={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?mt.create(this.loc,i).formatDurationFromString(this,e):si}toHuman(e={}){if(!this.isValid)return si;const t=ci.map(t=>{const i=this.values[t];return Re(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:t.slice(0,-1)}).format(i)}).filter(e=>e);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=$e(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},an.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?hi(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=pi.fromDurationLike(e),i={};for(const e of ci)(Pe(t.values,e)||Pe(this.values,e))&&(i[e]=t.get(e)+this.get(e));return di(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=pi.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const i of Object.keys(this.values))t[i]=Xe(e(this.values[i],i));return di(this,{values:t},!0)}get(e){return this[pi.normalizeUnit(e)]}set(e){return this.isValid?di(this,{values:{...this.values,...Qe(e,pi.normalizeUnit)}}):this}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i,matrix:n}={}){return di(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:n,conversionAccuracy:i})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return fi(this.matrix,e),di(this,{values:e},!0)}rescale(){return this.isValid?di(this,{values:function(e){const t={};for(const[i,n]of Object.entries(e))0!==n&&(t[i]=n);return t}(this.normalize().shiftToAll().toObject())},!0):this}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>pi.normalizeUnit(e));const t={},i={},n=this.toObject();let r;for(const s of ci)if(e.indexOf(s)>=0){r=s;let e=0;for(const t in i)e+=this.matrix[t][s]*i[t],i[t]=0;Ne(n[s])&&(e+=n[s]);const o=Math.trunc(e);t[s]=o,i[s]=(1e3*e-1e3*o)/1e3}else Ne(n[s])&&(i[s]=n[s]);for(const e in i)0!==i[e]&&(t[r]+=e===r?i[e]:i[e]/this.matrix[r][e]);return fi(this.matrix,t),di(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return di(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const i of ci)if(!t(this.values[i],e.values[i]))return!1;return!0}}const gi="Invalid Interval";class vi{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new l("need to specify a reason the Interval is invalid");const i=e instanceof pe?e:new pe(e,t);if(fe.throwOnInvalid)throw new r(i);return new vi({invalid:i})}static fromDateTimes(e,t){const i=ln(e),n=ln(t),r=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?vi.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null:vi.invalid("missing or invalid end"):vi.invalid("missing or invalid start")}(i,n);return r??new vi({start:i,end:n})}static after(e,t){const i=pi.fromDurationLike(t),n=ln(e);return vi.fromDateTimes(n,n.plus(i))}static before(e,t){const i=pi.fromDurationLike(t),n=ln(e);return vi.fromDateTimes(n.minus(i),n)}static fromISO(e,t){const[i,n]=(e||"").split("/",2);if(i&&n){let e,r,s,o;try{e=an.fromISO(i,t),r=e.isValid}catch(n){r=!1}try{s=an.fromISO(n,t),o=s.isValid}catch(n){o=!1}if(r&&o)return vi.fromDateTimes(e,s);if(r){const i=pi.fromISO(n,t);if(i.isValid)return vi.after(e,i)}else if(o){const e=pi.fromISO(i,t);if(e.isValid)return vi.before(s,e)}}return vi.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const i=this.start.startOf(e,t);let n;return n=null!=t&&t.useLocaleWeeks?this.end.reconfigure({locale:i.locale}):this.end,n=n.startOf(e,t),Math.floor(n.diff(i,e).get(e))+(n.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&this.s<=e&&this.e>e}set({start:e,end:t}={}){return this.isValid?vi.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(ln).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),i=[];let{s:n}=this,r=0;for(;n<this.e;){const e=t[r]||this.e,s=+e>+this.e?this.e:e;i.push(vi.fromDateTimes(n,s)),n=s,r+=1}return i}splitBy(e){const t=pi.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let i,{s:n}=this,r=1;const s=[];for(;n<this.e;){const e=this.start.plus(t.mapUnits(e=>e*r));i=+e>+this.e?this.e:e,s.push(vi.fromDateTimes(n,i)),n=i,r+=1}return s}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e===+e.s}abutsEnd(e){return!!this.isValid&&+e.e===+this.s}engulfs(e){return!!this.isValid&&this.s<=e.s&&this.e>=e.e}equals(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,i=this.e<e.e?this.e:e.e;return t>=i?null:vi.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,i=this.e>e.e?this.e:e.e;return vi.fromDateTimes(t,i)}static merge(e){const[t,i]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],i)=>t?t.overlaps(i)||t.abutsStart(i)?[e,t.union(i)]:[e.concat([t]),i]:[e,i],[[],null]);return i&&t.push(i),t}static xor(e){let t=null,i=0;const n=[],r=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),s=Array.prototype.concat(...r).sort((e,t)=>e.time-t.time);for(const e of s)i+="s"===e.type?1:-1,1===i?t=e.time:(t&&+t!==+e.time&&n.push(vi.fromDateTimes(t,e.time)),t=null);return vi.merge(n)}difference(...e){return vi.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:gi}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=f,t={}){return this.isValid?mt.create(this.s.loc.clone(t),e).formatInterval(this):gi}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:gi}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:gi}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:gi}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:gi}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):pi.invalid(this.invalidReason)}mapEndpoints(e){return vi.fromDateTimes(e(this.s),e(this.e))}}class mi{static hasDST(e=fe.defaultZone){const t=an.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return F.isValidZone(e)}static normalizeZone(e){return re(e,fe.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||ee.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||ee.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||ee.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:n=null,outputCalendar:r="gregory"}={}){return(n||ee.create(t,i,r)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:n=null,outputCalendar:r="gregory"}={}){return(n||ee.create(t,i,r)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:n=null}={}){return(n||ee.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:n=null}={}){return(n||ee.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ee.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return ee.create(t,null,"gregory").eras(e)}static features(){return{relative:xe(),localeWeek:De()}}}function yi(e,t){const i=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=i(t)-i(e);return Math.floor(pi.fromMillis(n).as("days"))}const Ei={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[０-９]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Si={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},bi=Ei.hanidec.replace(/[\[|\]]/g,"").split("");function wi({numberingSystem:e},t=""){return new RegExp(`${Ei[e||"latn"]}${t}`)}function ki(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let i=0;i<e.length;i++){const n=e.charCodeAt(i);if(-1!==e[i].search(Ei.hanidec))t+=bi.indexOf(e[i]);else for(const e in Si){const[i,r]=Si[e];n>=i&&n<=r&&(t+=n-i)}}return parseInt(t,10)}return t}(e))}}const Ii=`[ ${String.fromCharCode(160)}]`,Ai=new RegExp(Ii,"g");function Ci(e){return e.replace(/\./g,"\\.?").replace(Ai,Ii)}function Oi(e){return e.replace(/\./g,"").replace(Ai," ").toLowerCase()}function Ti(e,t){return null===e?null:{regex:RegExp(e.map(Ci).join("|")),deser:([i])=>e.findIndex(e=>Oi(i)===Oi(e))+t}}function Ri(e,t){return{regex:e,deser:([,e,t])=>Ye(e,t),groups:t}}function Ni(e){return{regex:e,deser:([e])=>e}}const Li={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let xi=null;function Di(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const i=Pi(mt.macroTokenToFormatOpts(e.val),t);return null==i||i.includes(void 0)?e:i}(e,t)))}function Ui(e,t,i){const n=Di(mt.parseFormat(i),e),r=n.map(t=>function(e,t){const i=wi(t),n=wi(t,"{2}"),r=wi(t,"{3}"),s=wi(t,"{4}"),o=wi(t,"{6}"),a=wi(t,"{1,2}"),l=wi(t,"{1,3}"),c=wi(t,"{1,6}"),u=wi(t,"{1,9}"),d=wi(t,"{2,4}"),h=wi(t,"{4,6}"),f=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},p=(p=>{if(e.literal)return f(p);switch(p.val){case"G":return Ti(t.eras("short"),0);case"GG":return Ti(t.eras("long"),0);case"y":return ki(c);case"yy":case"kk":return ki(d,Ge);case"yyyy":case"kkkk":return ki(s);case"yyyyy":return ki(h);case"yyyyyy":return ki(o);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return ki(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return ki(n);case"MMM":return Ti(t.months("short",!0),1);case"MMMM":return Ti(t.months("long",!0),1);case"LLL":return Ti(t.months("short",!1),1);case"LLLL":return Ti(t.months("long",!1),1);case"o":case"S":return ki(l);case"ooo":case"SSS":return ki(r);case"u":return Ni(u);case"uu":return Ni(a);case"uuu":case"E":case"c":return ki(i);case"a":return Ti(t.meridiems(),0);case"EEE":return Ti(t.weekdays("short",!1),1);case"EEEE":return Ti(t.weekdays("long",!1),1);case"ccc":return Ti(t.weekdays("short",!0),1);case"cccc":return Ti(t.weekdays("long",!0),1);case"Z":case"ZZ":return Ri(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return Ri(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return Ni(/[a-z_+-/]{1,256}?/i);case" ":return Ni(/[^\S\n\r]/);default:return f(p)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return p.token=e,p}(t,e)),s=r.find(e=>e.invalidReason);if(s)return{input:t,tokens:n,invalidReason:s.invalidReason};{const[e,i]=function(e){return[`^${e.map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"")}$`,e]}(r),s=RegExp(e,"i"),[a,l]=function(e,t,i){const n=e.match(t);if(n){const e={};let t=1;for(const r in i)if(Pe(i,r)){const s=i[r],o=s.groups?s.groups+1:1;!s.literal&&s.token&&(e[s.token.val[0]]=s.deser(n.slice(t,t+o))),t+=o}return[n,e]}return[n,{}]}(t,s,i),[c,u,d]=l?function(e){let t,i=null;return Re(e.z)||(i=F.create(e.z)),Re(e.Z)||(i||(i=new ie(e.Z)),t=e.Z),Re(e.q)||(e.M=3*(e.q-1)+1),Re(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),Re(e.u)||(e.S=Fe(e.u)),[Object.keys(e).reduce((t,i)=>{const n=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(i);return n&&(t[n]=e[i]),t},{}),i,t]}(l):[null,null,void 0];if(Pe(l,"a")&&Pe(l,"H"))throw new o("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:n,regex:s,rawMatches:a,matches:l,result:c,zone:u,specificOffset:d}}}function Pi(e,t){if(!e)return null;const i=mt.create(t,e).dtFormatter((xi||(xi=an.fromMillis(1555555555555)),xi)),n=i.formatToParts(),r=i.resolvedOptions();return n.map(t=>function(e,t,i){const{type:n,value:r}=e;if("literal"===n){const e=/^\s+$/.test(r);return{literal:!e,val:e?" ":r}}const s=t[n];let o=n;"hour"===n&&(o=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":i.hour12?"hour12":"hour24");let a=Li[o];if("object"==typeof a&&(a=a[s]),a)return{literal:!1,val:a}}(t,e,r))}const _i="Invalid DateTime",Vi=864e13;function Mi(e){return new pe("unsupported zone",`the zone "${e.name}" is not supported`)}function ji(e){return null===e.weekData&&(e.weekData=we(e.c)),e.weekData}function qi(e){return null===e.localWeekData&&(e.localWeekData=we(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Fi(e,t){const i={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new an({...i,...t,old:i})}function $i(e,t,i){let n=e-60*t*1e3;const r=i.offset(n);if(t===r)return[n,t];n-=60*(r-t)*1e3;const s=i.offset(n);return r===s?[n,r]:[e-60*Math.min(r,s)*1e3,Math.max(r,s)]}function Bi(e,t){const i=new Date(e+=60*t*1e3);return{year:i.getUTCFullYear(),month:i.getUTCMonth()+1,day:i.getUTCDate(),hour:i.getUTCHours(),minute:i.getUTCMinutes(),second:i.getUTCSeconds(),millisecond:i.getUTCMilliseconds()}}function Hi(e,t,i){return $i(We(e),t,i)}function zi(e,t){const i=e.o,n=e.c.year+Math.trunc(t.years),r=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),s={...e.c,year:n,month:r,day:Math.min(e.c.day,ze(n,r))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},o=pi.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=We(s);let[l,c]=$i(a,i,e.zone);return 0!==o&&(l+=o,c=e.zone.offset(l)),{ts:l,o:c}}function Wi(e,t,i,n,r,s){const{setZone:o,zone:a}=i;if(e&&0!==Object.keys(e).length||t){const n=t||a,r=an.fromObject(e,{...i,zone:n,specificOffset:s});return o?r:r.setZone(a)}return an.invalid(new pe("unparsable",`the input "${r}" can't be parsed as ${n}`))}function Ji(e,t,i=!0){return e.isValid?mt.create(ee.create("en-US"),{allowZ:i,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Zi(e,t){const i=e.c.year>9999||e.c.year<0;let n="";return i&&e.c.year>=0&&(n+="+"),n+=Me(e.c.year,i?6:4),t?(n+="-",n+=Me(e.c.month),n+="-",n+=Me(e.c.day)):(n+=Me(e.c.month),n+=Me(e.c.day)),n}function Gi(e,t,i,n,r,s){let o=Me(e.c.hour);return t?(o+=":",o+=Me(e.c.minute),0===e.c.millisecond&&0===e.c.second&&i||(o+=":")):o+=Me(e.c.minute),0===e.c.millisecond&&0===e.c.second&&i||(o+=Me(e.c.second),0===e.c.millisecond&&n||(o+=".",o+=Me(e.c.millisecond,3))),r&&(e.isOffsetFixed&&0===e.offset&&!s?o+="Z":e.o<0?(o+="-",o+=Me(Math.trunc(-e.o/60)),o+=":",o+=Me(Math.trunc(-e.o%60))):(o+="+",o+=Me(Math.trunc(e.o/60)),o+=":",o+=Me(Math.trunc(e.o%60)))),s&&(o+="["+e.zone.ianaName+"]"),o}const Ki={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Yi={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Xi={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Qi=["year","month","day","hour","minute","second","millisecond"],en=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],tn=["year","ordinal","hour","minute","second","millisecond"];function nn(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return function(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new a(e);return t}(e)}}function rn(e,t){const i=re(t.zone,fe.defaultZone),n=ee.fromObject(t),r=fe.now();let s,o;if(Re(e.year))s=r;else{for(const t of Qi)Re(e[t])&&(e[t]=Ki[t]);const t=Oe(e)||Te(e);if(t)return an.invalid(t);const n=i.offset(r);[s,o]=Hi(e,n,i)}return new an({ts:s,zone:i,loc:n,o})}function sn(e,t,i){const n=!!Re(i.round)||i.round,r=(e,r)=>(e=$e(e,n||i.calendary?0:2,!0),t.loc.clone(i).relFormatter(i).format(e,r)),s=n=>i.calendary?t.hasSame(e,n)?0:t.startOf(n).diff(e.startOf(n),n).get(n):t.diff(e,n).get(n);if(i.unit)return r(s(i.unit),i.unit);for(const e of i.units){const t=s(e);if(Math.abs(t)>=1)return r(t,e)}return r(e>t?-0:0,i.units[i.units.length-1])}function on(e){let t,i={};return e.length>0&&"object"==typeof e[e.length-1]?(i=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[i,t]}class an{constructor(e){const t=e.zone||fe.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new pe("invalid input"):null)||(t.isValid?null:Mi(t));this.ts=Re(e.ts)?fe.now():e.ts;let n=null,r=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[n,r]=[e.old.c,e.old.o];else{const e=t.offset(this.ts);n=Bi(this.ts,e),i=Number.isNaN(n.year)?new pe("invalid input"):null,n=i?null:n,r=i?null:e}this._zone=t,this.loc=e.loc||ee.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=n,this.o=r,this.isLuxonDateTime=!0}static now(){return new an({})}static local(){const[e,t]=on(arguments),[i,n,r,s,o,a,l]=t;return rn({year:i,month:n,day:r,hour:s,minute:o,second:a,millisecond:l},e)}static utc(){const[e,t]=on(arguments),[i,n,r,s,o,a,l]=t;return e.zone=ie.utcInstance,rn({year:i,month:n,day:r,hour:s,minute:o,second:a,millisecond:l},e)}static fromJSDate(e,t={}){const i=(n=e,"[object Date]"===Object.prototype.toString.call(n)?e.valueOf():NaN);var n;if(Number.isNaN(i))return an.invalid("invalid input");const r=re(t.zone,fe.defaultZone);return r.isValid?new an({ts:i,zone:r,loc:ee.fromObject(t)}):an.invalid(Mi(r))}static fromMillis(e,t={}){if(Ne(e))return e<-Vi||e>Vi?an.invalid("Timestamp out of range"):new an({ts:e,zone:re(t.zone,fe.defaultZone),loc:ee.fromObject(t)});throw new l(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(Ne(e))return new an({ts:1e3*e,zone:re(t.zone,fe.defaultZone),loc:ee.fromObject(t)});throw new l("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=re(t.zone,fe.defaultZone);if(!i.isValid)return an.invalid(Mi(i));const n=ee.fromObject(t),r=Qe(e,nn),{minDaysInFirstWeek:s,startOfWeek:a}=Ce(r,n),l=fe.now(),c=Re(t.specificOffset)?i.offset(l):t.specificOffset,u=!Re(r.ordinal),d=!Re(r.year),h=!Re(r.month)||!Re(r.day),f=d||h,p=r.weekYear||r.weekNumber;if((f||u)&&p)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&u)throw new o("Can't mix ordinal dates with month/day");const g=p||r.weekday&&!f;let v,m,y=Bi(l,c);g?(v=en,m=Yi,y=we(y,s,a)):u?(v=tn,m=Xi,y=Ie(y)):(v=Qi,m=Ki);let E=!1;for(const e of v)Re(r[e])?r[e]=E?m[e]:y[e]:E=!0;const S=g?function(e,t=4,i=1){const n=Le(e.weekYear),r=Ve(e.weekNumber,1,Ze(e.weekYear,t,i)),s=Ve(e.weekday,1,7);return n?r?!s&&me("weekday",e.weekday):me("week",e.weekNumber):me("weekYear",e.weekYear)}(r,s,a):u?function(e){const t=Le(e.year),i=Ve(e.ordinal,1,He(e.year));return t?!i&&me("ordinal",e.ordinal):me("year",e.year)}(r):Oe(r),b=S||Te(r);if(b)return an.invalid(b);const w=g?ke(r,s,a):u?Ae(r):r,[k,I]=Hi(w,c,i),A=new an({ts:k,zone:i,o:I,loc:n});return r.weekday&&f&&e.weekday!==A.weekday?an.invalid("mismatched weekday",`you can't specify both a weekday of ${r.weekday} and a date of ${A.toISO()}`):A}static fromISO(e,t={}){const[i,n]=function(e){return bt(e,[Jt,Yt],[Zt,Xt],[Gt,Qt],[Kt,ei])}(e);return Wi(i,n,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,n]=function(e){return bt(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[qt,Ft])}(e);return Wi(i,n,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,n]=function(e){return bt(e,[$t,zt],[Bt,zt],[Ht,Wt])}(e);return Wi(i,n,t,"HTTP",t)}static fromFormat(e,t,i={}){if(Re(e)||Re(t))throw new l("fromFormat requires an input string and a format");const{locale:n=null,numberingSystem:r=null}=i,s=ee.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),[o,a,c,u]=function(e,t,i){const{result:n,zone:r,specificOffset:s,invalidReason:o}=Ui(e,t,i);return[n,r,s,o]}(s,e,t);return u?an.invalid(u):Wi(o,a,i,`format ${t}`,e,c)}static fromString(e,t,i={}){return an.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,n]=function(e){return bt(e,[ii,Yt],[ni,ri])}(e);return Wi(i,n,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new l("need to specify a reason the DateTime is invalid");const i=e instanceof pe?e:new pe(e,t);if(fe.throwOnInvalid)throw new n(i);return new an({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const i=Pi(e,ee.fromObject(t));return i?i.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return Di(mt.parseFormat(e),ee.fromObject(t)).map(e=>e.val).join("")}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ji(this).weekYear:NaN}get weekNumber(){return this.isValid?ji(this).weekNumber:NaN}get weekday(){return this.isValid?ji(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?qi(this).weekday:NaN}get localWeekNumber(){return this.isValid?qi(this).weekNumber:NaN}get localWeekYear(){return this.isValid?qi(this).weekYear:NaN}get ordinal(){return this.isValid?Ie(this.c).ordinal:NaN}get monthShort(){return this.isValid?mi.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?mi.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?mi.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?mi.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,i=We(this.c),n=this.zone.offset(i-e),r=this.zone.offset(i+e),s=this.zone.offset(i-n*t),o=this.zone.offset(i-r*t);if(s===o)return[this];const a=i-s*t,l=i-o*t,c=Bi(a,s),u=Bi(l,o);return c.hour===u.hour&&c.minute===u.minute&&c.second===u.second&&c.millisecond===u.millisecond?[Fi(this,{ts:a}),Fi(this,{ts:l})]:[this]}get isInLeapYear(){return Be(this.year)}get daysInMonth(){return ze(this.year,this.month)}get daysInYear(){return this.isValid?He(this.year):NaN}get weeksInWeekYear(){return this.isValid?Ze(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Ze(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:n}=mt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:n}}toUTC(e=0,t={}){return this.setZone(ie.instance(e),t)}toLocal(){return this.setZone(fe.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if((e=re(e,fe.defaultZone)).equals(this.zone))return this;if(e.isValid){let n=this.ts;if(t||i){const t=e.offset(this.ts),i=this.toObject();[n]=Hi(i,t,e)}return Fi(this,{ts:n,zone:e})}return an.invalid(Mi(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){return Fi(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=Qe(e,nn),{minDaysInFirstWeek:i,startOfWeek:n}=Ce(t,this.loc),r=!Re(t.weekYear)||!Re(t.weekNumber)||!Re(t.weekday),s=!Re(t.ordinal),a=!Re(t.year),l=!Re(t.month)||!Re(t.day),c=a||l,u=t.weekYear||t.weekNumber;if((c||s)&&u)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new o("Can't mix ordinal dates with month/day");let d;r?d=ke({...we(this.c,i,n),...t},i,n):Re(t.ordinal)?(d={...this.toObject(),...t},Re(t.day)&&(d.day=Math.min(ze(d.year,d.month),d.day))):d=Ae({...Ie(this.c),...t});const[h,f]=Hi(d,this.o,this.zone);return Fi(this,{ts:h,o:f})}plus(e){return this.isValid?Fi(this,zi(this,pi.fromDurationLike(e))):this}minus(e){return this.isValid?Fi(this,zi(this,pi.fromDurationLike(e).negate())):this}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const i={},n=pi.normalizeUnit(e);switch(n){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0}if("weeks"===n)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(i.weekNumber=this.weekNumber-1),i.weekday=e}else i.weekday=1;if("quarters"===n){const e=Math.ceil(this.month/3);i.month=3*(e-1)+1}return this.set(i)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?mt.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):_i}toLocaleString(e=f,t={}){return this.isValid?mt.create(this.loc.clone(t),e).formatDateTime(this):_i}toLocaleParts(e={}){return this.isValid?mt.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:n=!0,extendedZone:r=!1}={}){if(!this.isValid)return null;const s="extended"===e;let o=Zi(this,s);return o+="T",o+=Gi(this,s,t,i,n,r),o}toISODate({format:e="extended"}={}){return this.isValid?Zi(this,"extended"===e):null}toISOWeekDate(){return Ji(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:n=!1,extendedZone:r=!1,format:s="extended"}={}){return this.isValid?(n?"T":"")+Gi(this,"extended"===s,t,e,i,r):null}toRFC2822(){return Ji(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ji(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Zi(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let n="HH:mm:ss.SSS";return(t||e)&&(i&&(n+=" "),t?n+="z":e&&(n+="ZZ")),Ji(this,n,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():_i}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",i={}){if(!this.isValid||!e.isValid)return pi.invalid("created by diffing an invalid DateTime");const n={locale:this.locale,numberingSystem:this.numberingSystem,...i},r=(a=t,Array.isArray(a)?a:[a]).map(pi.normalizeUnit),s=e.valueOf()>this.valueOf(),o=function(e,t,i,n){let[r,s,o,a]=function(e,t,i){const n=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const i=yi(e,t);return(i-i%7)/7}],["days",yi]],r={},s=e;let o,a;for(const[l,c]of n)i.indexOf(l)>=0&&(o=l,r[l]=c(e,t),a=s.plus(r),a>t?(r[l]--,(e=s.plus(r))>t&&(a=e,r[l]--,e=s.plus(r))):e=a);return[e,r,a,o]}(e,t,i);const l=t-r,c=i.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===c.length&&(o<t&&(o=r.plus({[a]:1})),o!==r&&(s[a]=(s[a]||0)+l/(o-r)));const u=pi.fromObject(s,n);return c.length>0?pi.fromMillis(l,n).shiftTo(...c).plus(u):u}(s?this:e,s?e:this,r,n);var a;return s?o.negate():o}diffNow(e="milliseconds",t={}){return this.diff(an.now(),e,t)}until(e){return this.isValid?vi.fromDateTimes(this,e):this}hasSame(e,t,i){if(!this.isValid)return!1;const n=e.valueOf(),r=this.setZone(e.zone,{keepLocalTime:!0});return r.startOf(t,i)<=n&&n<=r.endOf(t,i)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||an.fromObject({},{zone:this.zone}),i=e.padding?this<t?-e.padding:e.padding:0;let n=["years","months","days","hours","minutes","seconds"],r=e.unit;return Array.isArray(e.unit)&&(n=e.unit,r=void 0),sn(t,this.plus(i),{...e,numeric:"always",units:n,unit:r})}toRelativeCalendar(e={}){return this.isValid?sn(e.base||an.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(an.isDateTime))throw new l("min requires all arguments be DateTimes");return Ue(e,e=>e.valueOf(),Math.min)}static max(...e){if(!e.every(an.isDateTime))throw new l("max requires all arguments be DateTimes");return Ue(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:n=null,numberingSystem:r=null}=i;return Ui(ee.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,i={}){return an.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return f}static get DATE_MED(){return p}static get DATE_MED_WITH_WEEKDAY(){return g}static get DATE_FULL(){return v}static get DATE_HUGE(){return m}static get TIME_SIMPLE(){return y}static get TIME_WITH_SECONDS(){return E}static get TIME_WITH_SHORT_OFFSET(){return S}static get TIME_WITH_LONG_OFFSET(){return b}static get TIME_24_SIMPLE(){return w}static get TIME_24_WITH_SECONDS(){return k}static get TIME_24_WITH_SHORT_OFFSET(){return I}static get TIME_24_WITH_LONG_OFFSET(){return A}static get DATETIME_SHORT(){return C}static get DATETIME_SHORT_WITH_SECONDS(){return O}static get DATETIME_MED(){return T}static get DATETIME_MED_WITH_SECONDS(){return R}static get DATETIME_MED_WITH_WEEKDAY(){return N}static get DATETIME_FULL(){return L}static get DATETIME_FULL_WITH_SECONDS(){return x}static get DATETIME_HUGE(){return D}static get DATETIME_HUGE_WITH_SECONDS(){return U}}function ln(e){if(an.isDateTime(e))return e;if(e&&e.valueOf&&Ne(e.valueOf()))return an.fromJSDate(e);if(e&&"object"==typeof e)return an.fromObject(e);throw new l(`Unknown datetime argument: ${e}, of type ${typeof e}`)}t.DateTime=an,t.Duration=pi,t.FixedOffsetZone=ie,t.IANAZone=F,t.Info=mi,t.Interval=vi,t.InvalidZone=ne,t.Settings=fe,t.SystemZone=V,t.VERSION="3.4.4",t.Zone=P},566(e,t,i){"use strict";var n=i(684);e.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!n(e)}},23(e,t,i){"use strict";var n=i(265),r={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!n(e)&&hasOwnProperty.call(r,typeof e)}},131(e,t,i){"use strict";var n=i(566),r=/^\s*class[\s{/}]/,s=Function.prototype.toString;e.exports=function(e){return!!n(e)&&!r.test(s.call(e))}},684(e,t,i){"use strict";var n=i(23);e.exports=function(e){if(!n(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},265(e){"use strict";e.exports=function(e){return null!=e}},960(e,t,i){"use strict";i.r(t),i.d(t,{v1:()=>f,v3:()=>b,v4:()=>w,v5:()=>A});var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),r=new Uint8Array(16);function s(){if(!n)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(r)}for(var o=[],a=0;a<256;++a)o[a]=(a+256).toString(16).substr(1);const l=function(e,t){var i=t||0,n=o;return[n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],"-",n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]],n[e[i++]]].join("")};var c,u,d=0,h=0;const f=function(e,t,i){var n=t&&i||0,r=t||[],o=(e=e||{}).node||c,a=void 0!==e.clockseq?e.clockseq:u;if(null==o||null==a){var f=e.random||(e.rng||s)();null==o&&(o=c=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==a&&(a=u=16383&(f[6]<<8|f[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),g=void 0!==e.nsecs?e.nsecs:h+1,v=p-d+(g-h)/1e4;if(v<0&&void 0===e.clockseq&&(a=a+1&16383),(v<0||p>d)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=p,h=g,u=a;var m=(1e4*(268435455&(p+=122192928e5))+g)%4294967296;r[n++]=m>>>24&255,r[n++]=m>>>16&255,r[n++]=m>>>8&255,r[n++]=255&m;var y=p/4294967296*1e4&268435455;r[n++]=y>>>8&255,r[n++]=255&y,r[n++]=y>>>24&15|16,r[n++]=y>>>16&255,r[n++]=a>>>8|128,r[n++]=255&a;for(var E=0;E<6;++E)r[n+E]=o[E];return t||l(r)};function p(e,t,i){var n=function(e,n,r,s){var o=r&&s||0;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=new Array(e.length),i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t}(e)),"string"==typeof n&&(n=function(e){var t=[];return e.replace(/[a-fA-F0-9]{2}/g,function(e){t.push(parseInt(e,16))}),t}(n)),!Array.isArray(e))throw TypeError("value must be an array of bytes");if(!Array.isArray(n)||16!==n.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var a=i(n.concat(e));if(a[6]=15&a[6]|t,a[8]=63&a[8]|128,r)for(var c=0;c<16;++c)r[o+c]=a[c];return r||l(a)};try{n.name=e}catch(e){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}function g(e,t){var i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function v(e,t,i,n,r,s){return g((o=g(g(t,e),g(n,s)))<<(a=r)|o>>>32-a,i);var o,a}function m(e,t,i,n,r,s,o){return v(t&i|~t&n,e,t,r,s,o)}function y(e,t,i,n,r,s,o){return v(t&n|i&~n,e,t,r,s,o)}function E(e,t,i,n,r,s,o){return v(t^i^n,e,t,r,s,o)}function S(e,t,i,n,r,s,o){return v(i^(t|~n),e,t,r,s,o)}const b=p("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Array(t.length);for(var i=0;i<t.length;i++)e[i]=t.charCodeAt(i)}return function(e){var t,i,n,r=[],s=32*e.length,o="0123456789abcdef";for(t=0;t<s;t+=8)i=e[t>>5]>>>t%32&255,n=parseInt(o.charAt(i>>>4&15)+o.charAt(15&i),16),r.push(n);return r}(function(e,t){var i,n,r,s,o;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var a=1732584193,l=-271733879,c=-1732584194,u=271733878;for(i=0;i<e.length;i+=16)n=a,r=l,s=c,o=u,a=m(a,l,c,u,e[i],7,-680876936),u=m(u,a,l,c,e[i+1],12,-389564586),c=m(c,u,a,l,e[i+2],17,606105819),l=m(l,c,u,a,e[i+3],22,-1044525330),a=m(a,l,c,u,e[i+4],7,-176418897),u=m(u,a,l,c,e[i+5],12,1200080426),c=m(c,u,a,l,e[i+6],17,-1473231341),l=m(l,c,u,a,e[i+7],22,-45705983),a=m(a,l,c,u,e[i+8],7,1770035416),u=m(u,a,l,c,e[i+9],12,-1958414417),c=m(c,u,a,l,e[i+10],17,-42063),l=m(l,c,u,a,e[i+11],22,-1990404162),a=m(a,l,c,u,e[i+12],7,1804603682),u=m(u,a,l,c,e[i+13],12,-40341101),c=m(c,u,a,l,e[i+14],17,-1502002290),a=y(a,l=m(l,c,u,a,e[i+15],22,1236535329),c,u,e[i+1],5,-165796510),u=y(u,a,l,c,e[i+6],9,-1069501632),c=y(c,u,a,l,e[i+11],14,643717713),l=y(l,c,u,a,e[i],20,-373897302),a=y(a,l,c,u,e[i+5],5,-701558691),u=y(u,a,l,c,e[i+10],9,38016083),c=y(c,u,a,l,e[i+15],14,-660478335),l=y(l,c,u,a,e[i+4],20,-405537848),a=y(a,l,c,u,e[i+9],5,568446438),u=y(u,a,l,c,e[i+14],9,-1019803690),c=y(c,u,a,l,e[i+3],14,-187363961),l=y(l,c,u,a,e[i+8],20,1163531501),a=y(a,l,c,u,e[i+13],5,-1444681467),u=y(u,a,l,c,e[i+2],9,-51403784),c=y(c,u,a,l,e[i+7],14,1735328473),a=E(a,l=y(l,c,u,a,e[i+12],20,-1926607734),c,u,e[i+5],4,-378558),u=E(u,a,l,c,e[i+8],11,-2022574463),c=E(c,u,a,l,e[i+11],16,1839030562),l=E(l,c,u,a,e[i+14],23,-35309556),a=E(a,l,c,u,e[i+1],4,-1530992060),u=E(u,a,l,c,e[i+4],11,1272893353),c=E(c,u,a,l,e[i+7],16,-155497632),l=E(l,c,u,a,e[i+10],23,-1094730640),a=E(a,l,c,u,e[i+13],4,681279174),u=E(u,a,l,c,e[i],11,-358537222),c=E(c,u,a,l,e[i+3],16,-722521979),l=E(l,c,u,a,e[i+6],23,76029189),a=E(a,l,c,u,e[i+9],4,-640364487),u=E(u,a,l,c,e[i+12],11,-421815835),c=E(c,u,a,l,e[i+15],16,530742520),a=S(a,l=E(l,c,u,a,e[i+2],23,-995338651),c,u,e[i],6,-198630844),u=S(u,a,l,c,e[i+7],10,1126891415),c=S(c,u,a,l,e[i+14],15,-1416354905),l=S(l,c,u,a,e[i+5],21,-57434055),a=S(a,l,c,u,e[i+12],6,1700485571),u=S(u,a,l,c,e[i+3],10,-1894986606),c=S(c,u,a,l,e[i+10],15,-1051523),l=S(l,c,u,a,e[i+1],21,-2054922799),a=S(a,l,c,u,e[i+8],6,1873313359),u=S(u,a,l,c,e[i+15],10,-30611744),c=S(c,u,a,l,e[i+6],15,-1560198380),l=S(l,c,u,a,e[i+13],21,1309151649),a=S(a,l,c,u,e[i+4],6,-145523070),u=S(u,a,l,c,e[i+11],10,-1120210379),c=S(c,u,a,l,e[i+2],15,718787259),l=S(l,c,u,a,e[i+9],21,-343485551),a=g(a,n),l=g(l,r),c=g(c,s),u=g(u,o);return[a,l,c,u]}(function(e){var t,i=[];for(i[(e.length>>2)-1]=void 0,t=0;t<i.length;t+=1)i[t]=0;var n=8*e.length;for(t=0;t<n;t+=8)i[t>>5]|=(255&e[t/8])<<t%32;return i}(e),8*e.length))}),w=function(e,t,i){var n=t&&i||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var r=(e=e||{}).random||(e.rng||s)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t)for(var o=0;o<16;++o)t[n+o]=r[o];return t||l(r)};function k(e,t,i,n){switch(e){case 0:return t&i^~t&n;case 1:case 3:return t^i^n;case 2:return t&i^t&n^i&n}}function I(e,t){return e<<t|e>>>32-t}const A=p("v5",80,function(e){var t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var n=unescape(encodeURIComponent(e));e=new Array(n.length);for(var r=0;r<n.length;r++)e[r]=n.charCodeAt(r)}e.push(128);var s=e.length/4+2,o=Math.ceil(s/16),a=new Array(o);for(r=0;r<o;r++){a[r]=new Array(16);for(var l=0;l<16;l++)a[r][l]=e[64*r+4*l]<<24|e[64*r+4*l+1]<<16|e[64*r+4*l+2]<<8|e[64*r+4*l+3]}for(a[o-1][14]=8*(e.length-1)/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=8*(e.length-1)&4294967295,r=0;r<o;r++){for(var c=new Array(80),u=0;u<16;u++)c[u]=a[r][u];for(u=16;u<80;u++)c[u]=I(c[u-3]^c[u-8]^c[u-14]^c[u-16],1);var d=i[0],h=i[1],f=i[2],p=i[3],g=i[4];for(u=0;u<80;u++){var v=Math.floor(u/20),m=I(d,5)+k(v,h,f,p)+g+t[v]+c[u]>>>0;g=p,p=f,f=I(h,30)>>>0,h=d,d=m}i[0]=i[0]+d>>>0,i[1]=i[1]+h>>>0,i[2]=i[2]+f>>>0,i[3]=i[3]+p>>>0,i[4]=i[4]+g>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]})},901(e,t,i){"use strict";function n(e,t){return function(){return e.apply(t,arguments)}}const{toString:r}=Object.prototype,{getPrototypeOf:s}=Object,{iterator:o,toStringTag:a}=Symbol,l=(c=Object.create(null),e=>{const t=r.call(e);return c[t]||(c[t]=t.slice(8,-1).toLowerCase())});var c;const u=e=>(e=e.toLowerCase(),t=>l(t)===e),d=e=>t=>typeof t===e,{isArray:h}=Array,f=d("undefined");function p(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&m(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const g=u("ArrayBuffer"),v=d("string"),m=d("function"),y=d("number"),E=e=>null!==e&&"object"==typeof e,S=e=>{if("object"!==l(e))return!1;const t=s(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||a in e||o in e)},b=u("Date"),w=u("File"),k=u("Blob"),I=u("FileList"),A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==i.g?i.g:{},C=void 0!==A.FormData?A.FormData:void 0,O=u("URLSearchParams"),[T,R,N,L]=["ReadableStream","Request","Response","Headers"].map(u);function x(e,t,{allOwnKeys:i=!1}={}){if(null==e)return;let n,r;if("object"!=typeof e&&(e=[e]),h(e))for(n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else{if(p(e))return;const r=i?Object.getOwnPropertyNames(e):Object.keys(e),s=r.length;let o;for(n=0;n<s;n++)o=r[n],t.call(null,e[o],o,e)}}function D(e,t){if(p(e))return null;t=t.toLowerCase();const i=Object.keys(e);let n,r=i.length;for(;r-- >0;)if(n=i[r],t===n.toLowerCase())return n;return null}const U="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:i.g,P=e=>!f(e)&&e!==U,_=(V="undefined"!=typeof Uint8Array&&s(Uint8Array),e=>V&&e instanceof V);var V;const M=u("HTMLFormElement"),j=(({hasOwnProperty:e})=>(t,i)=>e.call(t,i))(Object.prototype),{propertyIsEnumerable:q}=Object.prototype,F=u("RegExp"),$=(e,t)=>{const i=Object.getOwnPropertyDescriptors(e),n={};x(i,(i,r)=>{let s;!1!==(s=t(i,r,e))&&(n[r]=s||i)}),Object.defineProperties(e,n)},B=u("AsyncFunction"),H=(z="function"==typeof setImmediate,W=m(U.postMessage),z?setImmediate:W?(J=`axios@${Math.random()}`,Z=[],U.addEventListener("message",({source:e,data:t})=>{e===U&&t===J&&Z.length&&Z.shift()()},!1),e=>{Z.push(e),U.postMessage(J,"*")}):e=>setTimeout(e));var z,W,J,Z;const G="undefined"!=typeof queueMicrotask?queueMicrotask.bind(U):"undefined"!=typeof process&&process.nextTick||H;var K={isArray:h,isArrayBuffer:g,isBuffer:p,isFormData:e=>{if(!e)return!1;if(C&&e instanceof C)return!0;const t=s(e);if(!t||t===Object.prototype)return!1;if(!m(e.append))return!1;const i=l(e);return"formdata"===i||"object"===i&&m(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&g(e.buffer),t},isString:v,isNumber:y,isBoolean:e=>!0===e||!1===e,isObject:E,isPlainObject:S,isEmptyObject:e=>{if(!E(e)||p(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:T,isRequest:R,isResponse:N,isHeaders:L,isUndefined:f,isDate:b,isFile:w,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:k,isRegExp:F,isFunction:m,isStream:e=>E(e)&&m(e.pipe),isURLSearchParams:O,isTypedArray:_,isFileList:I,forEach:x,merge:function e(...t){const{caseless:i,skipUndefined:n}=P(this)&&this||{},r={},s=(t,s)=>{if("__proto__"===s||"constructor"===s||"prototype"===s)return;const o=i&&"string"==typeof s&&D(r,s)||s,a=j(r,o)?r[o]:void 0;S(a)&&S(t)?r[o]=e(a,t):S(t)?r[o]=e({},t):h(t)?r[o]=t.slice():n&&f(t)||(r[o]=t)};for(let e=0,i=t.length;e<i;e++){const i=t[e];if(!i||p(i))continue;if(x(i,s),"object"!=typeof i||h(i))continue;const n=Object.getOwnPropertySymbols(i);for(let e=0;e<n.length;e++){const t=n[e];q.call(i,t)&&s(i[t],t)}}return r},extend:(e,t,i,{allOwnKeys:r}={})=>(x(t,(t,r)=>{i&&m(t)?Object.defineProperty(e,r,{__proto__:null,value:n(t,i),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,i,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),i&&Object.assign(e.prototype,i)},toFlatObject:(e,t,i,n)=>{let r,o,a;const l={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),o=r.length;o-- >0;)a=r[o],n&&!n(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==i&&s(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:u,endsWith:(e,t,i)=>{e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=t.length;const n=e.indexOf(t,i);return-1!==n&&n===i},toArray:e=>{if(!e)return null;if(h(e))return e;let t=e.length;if(!y(t))return null;const i=new Array(t);for(;t-- >0;)i[t]=e[t];return i},forEachEntry:(e,t)=>{const i=(e&&e[o]).call(e);let n;for(;(n=i.next())&&!n.done;){const i=n.value;t.call(e,i[0],i[1])}},matchAll:(e,t)=>{let i;const n=[];for(;null!==(i=e.exec(t));)n.push(i);return n},isHTMLForm:M,hasOwnProperty:j,hasOwnProp:j,reduceDescriptors:$,freezeMethods:e=>{$(e,(t,i)=>{if(m(e)&&["arguments","caller","callee"].includes(i))return!1;const n=e[i];m(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")}))})},toObjectSet:(e,t)=>{const i={},n=e=>{e.forEach(e=>{i[e]=!0})};return h(e)?n(e):n(String(e).split(t)),i},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,i){return t.toUpperCase()+i}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:D,global:U,isContextDefined:P,isSpecCompliantForm:function(e){return!!(e&&m(e.append)&&"FormData"===e[a]&&e[o])},toJSONObject:e=>{const t=new WeakSet,i=e=>{if(E(e)){if(t.has(e))return;if(p(e))return e;if(!("toJSON"in e)){t.add(e);const n=h(e)?[]:{};return x(e,(e,t)=>{const r=i(e);!f(r)&&(n[t]=r)}),t.delete(e),n}}return e};return i(e)},isAsyncFn:B,isThenable:e=>e&&(E(e)||m(e))&&m(e.then)&&m(e.catch),setImmediate:H,asap:G,isIterable:e=>null!=e&&m(e[o])};const Y=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),X=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Q=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ee(e,t){return K.isArray(e)?e.map(e=>ee(e,t)):function(e){let t=0,i=e.length;for(;t<i;){const i=e.charCodeAt(t);if(9!==i&&32!==i)break;t+=1}for(;i>t;){const t=e.charCodeAt(i-1);if(9!==t&&32!==t)break;i-=1}return 0===t&&i===e.length?e:e.slice(t,i)}(String(e).replace(t,""))}function te(e){const t=Object.create(null);return K.forEach(e.toJSON(),(e,i)=>{t[i]=(e=>ee(e,Q))(e)}),t}const ie=Symbol("internals");function ne(e){return e&&String(e).trim().toLowerCase()}function re(e){return!1===e||null==e?e:K.isArray(e)?e.map(re):(e=>ee(e,X))(String(e))}function se(e,t,i,n,r){return K.isFunction(n)?n.call(this,t,i):(r&&(t=i),K.isString(t)?K.isString(n)?-1!==t.indexOf(n):K.isRegExp(n)?n.test(t):void 0:void 0)}class oe{constructor(e){e&&this.set(e)}set(e,t,i){const n=this;function r(e,t,i){const r=ne(t);if(!r)return;const s=K.findKey(n,r);(!s||void 0===n[s]||!0===i||void 0===i&&!1!==n[s])&&(n[s||t]=re(e))}const s=(e,t)=>K.forEach(e,(e,i)=>r(e,i,t));if(K.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(K.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let i,n,r;return e&&e.split("\n").forEach(function(e){r=e.indexOf(":"),i=e.substring(0,r).trim().toLowerCase(),n=e.substring(r+1).trim(),!i||t[i]&&Y[i]||("set-cookie"===i?t[i]?t[i].push(n):t[i]=[n]:t[i]=t[i]?t[i]+", "+n:n)}),t})(e),t);else if(K.isObject(e)&&K.isIterable(e)){let i,n,r={};for(const t of e){if(!K.isArray(t))throw new TypeError("Object iterator must return a key-value pair");r[n=t[0]]=(i=r[n])?K.isArray(i)?[...i,t[1]]:[i,t[1]]:t[1]}s(r,t)}else null!=e&&r(t,e,i);return this}get(e,t){if(e=ne(e)){const i=K.findKey(this,e);if(i){const e=this[i];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=i.exec(e);)t[n[1]]=n[2];return t}(e);if(K.isFunction(t))return t.call(this,e,i);if(K.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ne(e)){const i=K.findKey(this,e);return!(!i||void 0===this[i]||t&&!se(0,this[i],i,t))}return!1}delete(e,t){const i=this;let n=!1;function r(e){if(e=ne(e)){const r=K.findKey(i,e);!r||t&&!se(0,i[r],r,t)||(delete i[r],n=!0)}}return K.isArray(e)?e.forEach(r):r(e),n}clear(e){const t=Object.keys(this);let i=t.length,n=!1;for(;i--;){const r=t[i];e&&!se(0,this[r],r,e,!0)||(delete this[r],n=!0)}return n}normalize(e){const t=this,i={};return K.forEach(this,(n,r)=>{const s=K.findKey(i,r);if(s)return t[s]=re(n),void delete t[r];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,i)=>t.toUpperCase()+i)}(r):String(r).trim();o!==r&&delete t[r],t[o]=re(n),i[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return K.forEach(this,(i,n)=>{null!=i&&!1!==i&&(t[n]=e&&K.isArray(i)?i.join(", "):i)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach(e=>i.set(e)),i}static accessor(e){const t=(this[ie]=this[ie]={accessors:{}}).accessors,i=this.prototype;function n(e){const n=ne(e);t[n]||(function(e,t){const i=K.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+i,{__proto__:null,value:function(e,i,r){return this[n].call(this,t,e,i,r)},configurable:!0})})}(i,e),t[n]=!0)}return K.isArray(e)?e.forEach(n):n(e),this}}oe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(oe.prototype,({value:e},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[i]=e}}}),K.freezeMethods(oe);class ae extends Error{static from(e,t,i,n,r,s){const o=new ae(e.message,t||e.code,i,n,r);return o.cause=e,o.name=e.name,null!=e.status&&null==o.status&&(o.status=e.status),s&&Object.assign(o,s),o}constructor(e,t,i,n,r){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),i&&(this.config=i),n&&(this.request=n),r&&(this.response=r,this.status=r.status)}toJSON(){const e=this.config,t=e&&K.hasOwnProp(e,"redact")?e.redact:void 0,i=K.isArray(t)&&t.length>0?function(e,t){const i=new Set(t.map(e=>String(e).toLowerCase())),n=[],r=e=>{if(null===e||"object"!=typeof e)return e;if(K.isBuffer(e))return e;if(-1!==n.indexOf(e))return;let t;if(e instanceof oe&&(e=e.toJSON()),n.push(e),K.isArray(e))t=[],e.forEach((e,i)=>{const n=r(e);K.isUndefined(n)||(t[i]=n)});else{if(!K.isPlainObject(e)&&function(e){if(K.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(K.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return n.pop(),e;t=Object.create(null);for(const[n,s]of Object.entries(e)){const e=i.has(n.toLowerCase())?"[REDACTED ****]":r(s);K.isUndefined(e)||(t[n]=e)}}return n.pop(),t};return r(e)}(e,t):K.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:i,code:this.code,status:this.status}}}function le(e){return K.isPlainObject(e)||K.isArray(e)}function ce(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function ue(e,t,i){return e?e.concat(t).map(function(e,t){return e=ce(e),!i&&t?"["+e+"]":e}).join(i?".":""):t}ae.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",ae.ERR_BAD_OPTION="ERR_BAD_OPTION",ae.ECONNABORTED="ECONNABORTED",ae.ETIMEDOUT="ETIMEDOUT",ae.ECONNREFUSED="ECONNREFUSED",ae.ERR_NETWORK="ERR_NETWORK",ae.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",ae.ERR_DEPRECATED="ERR_DEPRECATED",ae.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",ae.ERR_BAD_REQUEST="ERR_BAD_REQUEST",ae.ERR_CANCELED="ERR_CANCELED",ae.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",ae.ERR_INVALID_URL="ERR_INVALID_URL",ae.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const de=K.toFlatObject(K,{},null,function(e){return/^is[A-Z]/.test(e)});function he(e,t,i){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(i=K.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!K.isUndefined(t[e])})).metaTokens,r=i.visitor||d,s=i.dots,o=i.indexes,a=i.Blob||"undefined"!=typeof Blob&&Blob,l=void 0===i.maxDepth?100:i.maxDepth,c=a&&K.isSpecCompliantForm(t);if(!K.isFunction(r))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(K.isDate(e))return e.toISOString();if(K.isBoolean(e))return e.toString();if(!c&&K.isBlob(e))throw new ae("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(e)||K.isTypedArray(e)?c&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function d(e,i,r){let a=e;if(K.isReactNative(t)&&K.isReactNativeBlob(e))return t.append(ue(r,i,s),u(e)),!1;if(e&&!r&&"object"==typeof e)if(K.endsWith(i,"{}"))i=n?i:i.slice(0,-2),e=JSON.stringify(e);else if(K.isArray(e)&&function(e){return K.isArray(e)&&!e.some(le)}(e)||(K.isFileList(e)||K.endsWith(i,"[]"))&&(a=K.toArray(e)))return i=ce(i),a.forEach(function(e,n){!K.isUndefined(e)&&null!==e&&t.append(!0===o?ue([i],n,s):null===o?i:i+"[]",u(e))}),!1;return!!le(e)||(t.append(ue(r,i,s),u(e)),!1)}const h=[],f=Object.assign(de,{defaultVisitor:d,convertValue:u,isVisitable:le});if(!K.isObject(e))throw new TypeError("data must be an object");return function e(i,n,s=0){if(!K.isUndefined(i)){if(s>l)throw new ae("Object is too deeply nested ("+s+" levels). Max depth: "+l,ae.ERR_FORM_DATA_DEPTH_EXCEEDED);if(-1!==h.indexOf(i))throw new Error("Circular reference detected in "+n.join("."));h.push(i),K.forEach(i,function(i,o){!0===(!(K.isUndefined(i)||null===i)&&r.call(t,i,K.isString(o)?o.trim():o,n,f))&&e(i,n?n.concat(o):[o],s+1)}),h.pop()}}(e),t}function fe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function pe(e,t){this._pairs=[],e&&he(e,this,t)}const ge=pe.prototype;function ve(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function me(e,t,i){if(!t)return e;const n=i&&i.encode||ve,r=K.isFunction(i)?{serialize:i}:i,s=r&&r.serialize;let o;if(o=s?s(t,r):K.isURLSearchParams(t)?t.toString():new pe(t,r).toString(n),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}ge.append=function(e,t){this._pairs.push([e,t])},ge.toString=function(e){const t=e?function(t){return e.call(this,t,fe)}:fe;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class ye{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){K.forEach(this.handlers,function(t){null!==t&&e(t)})}}var Ee={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1},Se={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:pe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const be="undefined"!=typeof window&&"undefined"!=typeof document,we="object"==typeof navigator&&navigator||void 0,ke=be&&(!we||["ReactNative","NativeScript","NS"].indexOf(we.product)<0),Ie="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ae=be&&window.location.href||"http://localhost";var Ce={...Object.freeze({__proto__:null,hasBrowserEnv:be,hasStandardBrowserEnv:ke,hasStandardBrowserWebWorkerEnv:Ie,navigator:we,origin:Ae}),...Se};function Oe(e){function t(e,i,n,r){let s=e[r++];if("__proto__"===s)return!0;const o=Number.isFinite(+s),a=r>=e.length;return s=!s&&K.isArray(n)?n.length:s,a?(K.hasOwnProp(n,s)?n[s]=K.isArray(n[s])?n[s].concat(i):[n[s],i]:n[s]=i,!o):(K.hasOwnProp(n,s)&&K.isObject(n[s])||(n[s]=[]),t(e,i,n[s],r)&&K.isArray(n[s])&&(n[s]=function(e){const t={},i=Object.keys(e);let n;const r=i.length;let s;for(n=0;n<r;n++)s=i[n],t[s]=e[s];return t}(n[s])),!o)}if(K.isFormData(e)&&K.isFunction(e.entries)){const i={};return K.forEachEntry(e,(e,n)=>{t(function(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,i,0)}),i}return null}const Te=(e,t)=>null!=e&&K.hasOwnProp(e,t)?e[t]:void 0,Re={transitional:Ee,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const i=t.getContentType()||"",n=i.indexOf("application/json")>-1,r=K.isObject(e);if(r&&K.isHTMLForm(e)&&(e=new FormData(e)),K.isFormData(e))return n?JSON.stringify(Oe(e)):e;if(K.isArrayBuffer(e)||K.isBuffer(e)||K.isStream(e)||K.isFile(e)||K.isBlob(e)||K.isReadableStream(e))return e;if(K.isArrayBufferView(e))return e.buffer;if(K.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(r){const t=Te(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return he(e,new Ce.classes.URLSearchParams,{visitor:function(e,t,i,n){return Ce.isNode&&K.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((s=K.isFileList(e))||i.indexOf("multipart/form-data")>-1){const i=Te(this,"env"),n=i&&i.FormData;return he(s?{"files[]":e}:e,n&&new n,t)}}return r||n?(t.setContentType("application/json",!1),function(e){if(K.isString(e))try{return(0,JSON.parse)(e),K.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=Te(this,"transitional")||Re.transitional,i=t&&t.forcedJSONParsing,n=Te(this,"responseType"),r="json"===n;if(K.isResponse(e)||K.isReadableStream(e))return e;if(e&&K.isString(e)&&(i&&!n||r)){const i=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,Te(this,"parseReviver"))}catch(e){if(i){if("SyntaxError"===e.name)throw ae.from(e,ae.ERR_BAD_RESPONSE,this,null,Te(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ce.classes.FormData,Blob:Ce.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function Ne(e,t){const i=this||Re,n=t||i,r=oe.from(n.headers);let s=n.data;return K.forEach(e,function(e){s=e.call(i,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function Le(e){return!(!e||!e.__CANCEL__)}K.forEach(["delete","get","head","post","put","patch","query"],e=>{Re.headers[e]={}});class xe extends ae{constructor(e,t,i){super(e??"canceled",ae.ERR_CANCELED,t,i),this.name="CanceledError",this.__CANCEL__=!0}}function De(e,t,i){const n=i.config.validateStatus;i.status&&n&&!n(i.status)?t(new ae("Request failed with status code "+i.status,i.status>=400&&i.status<500?ae.ERR_BAD_REQUEST:ae.ERR_BAD_RESPONSE,i.config,i.request,i)):e(i)}const Ue=(e,t,i=3)=>{let n=0;const r=function(e,t){e=e||10;const i=new Array(e),n=new Array(e);let r,s=0,o=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=n[o];r||(r=l),i[s]=a,n[s]=l;let u=o,d=0;for(;u!==s;)d+=i[u++],u%=e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),l-r<t)return;const h=c&&l-c;return h?Math.round(1e3*d/h):void 0}}(50,250);return function(i,s){let o,a,l=0,c=1e3/s;const u=(i,s=Date.now())=>{l=s,o=null,a&&(clearTimeout(a),a=null),(i=>{if(!i||"number"!=typeof i.loaded)return;const s=i.loaded,o=i.lengthComputable?i.total:void 0,a=null!=o?Math.min(s,o):s,l=Math.max(0,a-n),c=r(l);n=Math.max(n,a),e({loaded:a,total:o,progress:o?a/o:void 0,bytes:l,rate:c||void 0,estimated:c&&o?(o-a)/c:void 0,event:i,lengthComputable:null!=o,[t?"download":"upload"]:!0})})(...i)};return[(...e)=>{const t=Date.now(),i=t-l;i>=c?u(e,t):(o=e,a||(a=setTimeout(()=>{a=null,u(o)},c-i)))},()=>o&&u(o)]}(0,i)},Pe=(e,t)=>{const i=null!=e;return[n=>t[0]({lengthComputable:i,total:e,loaded:n}),t[1]]},_e=e=>(...t)=>K.asap(()=>e(...t));var Ve=Ce.hasStandardBrowserEnv?((e,t)=>i=>(i=new URL(i,Ce.origin),e.protocol===i.protocol&&e.host===i.host&&(t||e.port===i.port)))(new URL(Ce.origin),Ce.navigator&&/(msie|trident)/i.test(Ce.navigator.userAgent)):()=>!0,Me=Ce.hasStandardBrowserEnv?{write(e,t,i,n,r,s,o){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];K.isNumber(i)&&a.push(`expires=${new Date(i).toUTCString()}`),K.isString(n)&&a.push(`path=${n}`),K.isString(r)&&a.push(`domain=${r}`),!0===s&&a.push("secure"),K.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.split(";");for(let i=0;i<t.length;i++){const n=t[i].replace(/^\s+/,""),r=n.indexOf("=");if(-1!==r&&n.slice(0,r)===e)return decodeURIComponent(n.slice(r+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function je(e,t,i){let n=!("string"==typeof(r=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r));var r;return e&&(n||!1===i)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const qe=e=>e instanceof oe?{...e}:e;function Fe(e,t){t=t||{};const i=Object.create(null);function n(e,t,i,n){return K.isPlainObject(e)&&K.isPlainObject(t)?K.merge.call({caseless:n},e,t):K.isPlainObject(t)?K.merge({},t):K.isArray(t)?t.slice():t}function r(e,t,i,r){return K.isUndefined(t)?K.isUndefined(e)?void 0:n(void 0,e,0,r):n(e,t,0,r)}function s(e,t){if(!K.isUndefined(t))return n(void 0,t)}function o(e,t){return K.isUndefined(t)?K.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(i,r,s){return K.hasOwnProp(t,s)?n(i,r):K.hasOwnProp(e,s)?n(void 0,i):void 0}Object.defineProperty(i,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:a,headers:(e,t,i)=>r(qe(e),qe(t),0,!0)};return K.forEach(Object.keys({...e,...t}),function(n){if("__proto__"===n||"constructor"===n||"prototype"===n)return;const s=K.hasOwnProp(l,n)?l[n]:r,o=s(K.hasOwnProp(e,n)?e[n]:void 0,K.hasOwnProp(t,n)?t[n]:void 0,n);K.isUndefined(o)&&s!==a||(i[n]=o)}),i}const $e=["content-type","content-length"];function Be(e){const t=Fe({},e),i=e=>K.hasOwnProp(t,e)?t[e]:void 0,n=i("data");let r=i("withXSRFToken");const s=i("xsrfHeaderName"),o=i("xsrfCookieName");let a=i("headers");const l=i("auth"),c=i("baseURL"),u=i("allowAbsoluteUrls"),d=i("url");var h;if(t.headers=a=oe.from(a),t.url=me(je(c,d,u),i("params"),i("paramsSerializer")),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?(h=l.password,encodeURIComponent(h).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)))):""))),K.isFormData(n)&&(Ce.hasStandardBrowserEnv||Ce.hasStandardBrowserWebWorkerEnv||K.isReactNative(n)?a.setContentType(void 0):K.isFunction(n.getHeaders)&&function(e,t,i){"content-only"===i?Object.entries(t).forEach(([t,i])=>{$e.includes(t.toLowerCase())&&e.set(t,i)}):e.set(t)}(a,n.getHeaders(),i("formDataHeaderPolicy"))),Ce.hasStandardBrowserEnv&&(K.isFunction(r)&&(r=r(t)),!0===r||null==r&&Ve(t.url))){const e=s&&o&&Me.read(o);e&&a.set(s,e)}return t}var He="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,i){const n=Be(e);let r=n.data;const s=oe.from(n.headers).normalize();let o,a,l,c,u,{responseType:d,onUploadProgress:h,onDownloadProgress:f}=n;function p(){c&&c(),u&&u(),n.cancelToken&&n.cancelToken.unsubscribe(o),n.signal&&n.signal.removeEventListener("abort",o)}let g=new XMLHttpRequest;function v(){if(!g)return;const n=oe.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());De(function(e){t(e),p()},function(e){i(e),p()},{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g}),g=null}g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout,"onloadend"in g?g.onloadend=v:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&g.responseURL.startsWith("file:"))&&setTimeout(v)},g.onabort=function(){g&&(i(new ae("Request aborted",ae.ECONNABORTED,e,g)),p(),g=null)},g.onerror=function(t){const n=t&&t.message?t.message:"Network Error",r=new ae(n,ae.ERR_NETWORK,e,g);r.event=t||null,i(r),p(),g=null},g.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const r=n.transitional||Ee;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),i(new ae(t,r.clarifyTimeoutError?ae.ETIMEDOUT:ae.ECONNABORTED,e,g)),p(),g=null},void 0===r&&s.setContentType(null),"setRequestHeader"in g&&K.forEach(te(s),function(e,t){g.setRequestHeader(t,e)}),K.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),d&&"json"!==d&&(g.responseType=n.responseType),f&&([l,u]=Ue(f,!0),g.addEventListener("progress",l)),h&&g.upload&&([a,c]=Ue(h),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",c)),(n.cancelToken||n.signal)&&(o=t=>{g&&(i(!t||t.type?new xe(null,e,g):t),g.abort(),p(),g=null)},n.cancelToken&&n.cancelToken.subscribe(o),n.signal&&(n.signal.aborted?o():n.signal.addEventListener("abort",o)));const m=function(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}(n.url);!m||Ce.protocols.includes(m)?g.send(r||null):i(new ae("Unsupported protocol "+m+":",ae.ERR_BAD_REQUEST,e))})};const ze=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const i=new AbortController;let n=!1;const r=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;i.abort(t instanceof ae?t:new xe(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,r(new ae(`timeout of ${t}ms exceeded`,ae.ETIMEDOUT))},t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(r):e.removeEventListener("abort",r)}),e=null)};e.forEach(e=>e.addEventListener("abort",r));const{signal:a}=i;return a.unsubscribe=()=>K.asap(o),a},We=function*(e,t){let i=e.byteLength;if(i<t)return void(yield e);let n,r=0;for(;r<i;)n=r+t,yield e.slice(r,n),r=n},Je=(e,t,i,n)=>{const r=async function*(e,t){for await(const i of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:i}=await t.read();if(e)break;yield i}}finally{await t.cancel()}}(e))yield*We(i,t)}(e,t);let s,o=0,a=e=>{s||(s=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await r.next();if(t)return a(),void e.close();let s=n.byteLength;if(i){let e=o+=s;i(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),r.return())},{highWaterMark:2})},Ze="1.17.0",{isFunction:Ge}=K,Ke=e=>{if(!K.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},Ye=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Xe=e=>{const t=void 0!==K.global&&null!==K.global?K.global:globalThis,{ReadableStream:i,TextEncoder:n}=t;e=K.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:r,Request:s,Response:o}=e,a=r?Ge(r):"function"==typeof fetch,l=Ge(s),c=Ge(o);if(!a)return!1;const u=a&&Ge(i),d=a&&("function"==typeof n?(h=new n,e=>h.encode(e)):async e=>new Uint8Array(await new s(e).arrayBuffer()));var h;const f=l&&u&&Ye(()=>{let e=!1;const t=new s(Ce.origin,{body:new i,method:"POST",get duplex(){return e=!0,"half"}}),n=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!n}),p=c&&u&&Ye(()=>K.isReadableStream(new o("").body)),g={stream:p&&(e=>e.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!g[e]&&(g[e]=(t,i)=>{let n=t&&t[e];if(n)return n.call(t);throw new ae(`Response type '${e}' is not supported`,ae.ERR_NOT_SUPPORT,i)})});const v=async(e,t)=>K.toFiniteNumber(e.getContentLength())??(async e=>{if(null==e)return 0;if(K.isBlob(e))return e.size;if(K.isSpecCompliantForm(e)){const t=new s(Ce.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return K.isArrayBufferView(e)||K.isArrayBuffer(e)?e.byteLength:(K.isURLSearchParams(e)&&(e+=""),K.isString(e)?(await d(e)).byteLength:void 0)})(t);return async e=>{let{url:t,method:i,data:a,signal:c,cancelToken:u,timeout:d,onDownloadProgress:h,onUploadProgress:m,responseType:y,headers:E,withCredentials:S="same-origin",fetchOptions:b,maxContentLength:w,maxBodyLength:k}=Be(e);const I=K.isNumber(w)&&w>-1,A=K.isNumber(k)&&k>-1;let C=r||fetch;y=y?(y+"").toLowerCase():"text";let O=ze([c,u&&u.toAbortSignal()],d),T=null;const R=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let N;try{let r;const c=(x="auth",K.hasOwnProp(e,x)?e[x]:void 0);if(c){r={username:c.username||"",password:c.password||""}}if((e=>{const t=e.indexOf("://");let i=e;return-1!==t&&(i=i.slice(t+3)),i.includes("@")||i.includes(":")})(t)){const e=new URL(t,Ce.origin);if(!r&&(e.username||e.password)){r={username:Ke(e.username),password:Ke(e.password)}}(e.username||e.password)&&(e.username="",e.password="",t=e.href)}if(r&&(E.delete("authorization"),E.set("Authorization","Basic "+btoa((L=(r.username||"")+":"+(r.password||""),encodeURIComponent(L).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))))),I&&"string"==typeof t&&t.startsWith("data:")){const i=function(e){if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const i=e.slice(5,t),n=e.slice(t+1);if(/;base64/i.test(i)){let e=n.length;const t=n.length;for(let i=0;i<t;i++)if(37===n.charCodeAt(i)&&i+2<t){const t=n.charCodeAt(i+1),r=n.charCodeAt(i+2);(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102)&&(e-=2,i+=2)}let i=0,r=t-1;const s=e=>e>=2&&37===n.charCodeAt(e-2)&&51===n.charCodeAt(e-1)&&(68===n.charCodeAt(e)||100===n.charCodeAt(e));r>=0&&(61===n.charCodeAt(r)?(i++,r--):s(r)&&(i++,r-=3)),1===i&&r>=0&&(61===n.charCodeAt(r)||s(r))&&i++;const o=3*Math.floor(e/4)-(i||0);return o>0?o:0}if("undefined"!=typeof Buffer&&"function"==typeof Buffer.byteLength)return Buffer.byteLength(n,"utf8");let r=0;for(let e=0,t=n.length;e<t;e++){const i=n.charCodeAt(e);if(i<128)r+=1;else if(i<2048)r+=2;else if(i>=55296&&i<=56319&&e+1<t){const t=n.charCodeAt(e+1);t>=56320&&t<=57343?(r+=4,e++):r+=3}else r+=3}return r}(t);if(i>w)throw new ae("maxContentLength size of "+w+" exceeded",ae.ERR_BAD_RESPONSE,e,T)}if(A&&"get"!==i&&"head"!==i){const t=await v(E,a);if("number"==typeof t&&isFinite(t)&&t>k)throw new ae("Request body larger than maxBodyLength limit",ae.ERR_BAD_REQUEST,e,T)}if(m&&f&&"get"!==i&&"head"!==i&&0!==(N=await v(E,a))){let e,i=new s(t,{method:"POST",body:a,duplex:"half"});if(K.isFormData(a)&&(e=i.headers.get("content-type"))&&E.setContentType(e),i.body){const[e,t]=Pe(N,Ue(_e(m)));a=Je(i.body,65536,e,t)}}K.isString(S)||(S=S?"include":"omit");const u=l&&"credentials"in s.prototype;if(K.isFormData(a)){const e=E.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&E.delete("content-type")}E.set("User-Agent","axios/"+Ze,!1);const d={...b,signal:O,method:i.toUpperCase(),headers:te(E.normalize()),body:a,duplex:"half",credentials:u?S:void 0};T=l&&new s(t,d);let D=await(l?C(T,b):C(t,d));if(I){const t=K.toFiniteNumber(D.headers.get("content-length"));if(null!=t&&t>w)throw new ae("maxContentLength size of "+w+" exceeded",ae.ERR_BAD_RESPONSE,e,T)}const U=p&&("stream"===y||"response"===y);if(p&&D.body&&(h||I||U&&R)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=D[e]});const i=K.toFiniteNumber(D.headers.get("content-length")),[n,r]=h&&Pe(i,Ue(_e(h),!0))||[];let s=0;const a=t=>{if(I&&(s=t,s>w))throw new ae("maxContentLength size of "+w+" exceeded",ae.ERR_BAD_RESPONSE,e,T);n&&n(t)};D=new o(Je(D.body,65536,a,()=>{r&&r(),R&&R()}),t)}y=y||"text";let P=await g[K.findKey(g,y)||"text"](D,e);if(I&&!p&&!U){let t;if(null!=P&&("number"==typeof P.byteLength?t=P.byteLength:"number"==typeof P.size?t=P.size:"string"==typeof P&&(t="function"==typeof n?(new n).encode(P).byteLength:P.length)),"number"==typeof t&&t>w)throw new ae("maxContentLength size of "+w+" exceeded",ae.ERR_BAD_RESPONSE,e,T)}return!U&&R&&R(),await new Promise((t,i)=>{De(t,i,{data:P,headers:oe.from(D.headers),status:D.status,statusText:D.statusText,config:e,request:T})})}catch(t){if(R&&R(),O&&O.aborted&&O.reason instanceof ae){const i=O.reason;throw i.config=e,T&&(i.request=T),t!==i&&(i.cause=t),i}if(t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new ae("Network Error",ae.ERR_NETWORK,e,T,t&&t.response),{cause:t.cause||t});throw ae.from(t,t&&t.code,e,T,t&&t.response)}var L,x}},Qe=new Map,et=e=>{let t=e&&e.env||{};const{fetch:i,Request:n,Response:r}=t,s=[n,r,i];let o,a,l=s.length,c=Qe;for(;l--;)o=s[l],a=c.get(o),void 0===a&&c.set(o,a=l?new Map:Xe(t)),c=a;return a};et();const tt={http:null,xhr:He,fetch:{get:et}};K.forEach(tt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const it=e=>`- ${e}`,nt=e=>K.isFunction(e)||null===e||!1===e;var rt=function(e,t){e=K.isArray(e)?e:[e];const{length:i}=e;let n,r;const s={};for(let o=0;o<i;o++){let i;if(n=e[o],r=n,!nt(n)&&(r=tt[(i=String(n)).toLowerCase()],void 0===r))throw new ae(`Unknown adapter '${i}'`);if(r&&(K.isFunction(r)||(r=r.get(t))))break;s[i||"#"+o]=r}if(!r){const e=Object.entries(s).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=i?e.length>1?"since :\n"+e.map(it).join("\n"):" "+it(e[0]):"as no adapter specified";throw new ae("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return r};function st(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new xe(null,e)}function ot(e){return st(e),e.headers=oe.from(e.headers),e.data=Ne.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),rt(e.adapter||Re.adapter,e)(e).then(function(t){st(e),e.response=t;try{t.data=Ne.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=oe.from(t.headers),t},function(t){if(!Le(t)&&(st(e),t&&t.response)){e.response=t.response;try{t.response.data=Ne.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=oe.from(t.response.headers)}return Promise.reject(t)})}const at={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{at[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const lt={};at.transitional=function(e,t,i){function n(e,t){return"[Axios v"+Ze+"] Transitional option '"+e+"'"+t+(i?". "+i:"")}return(i,r,s)=>{if(!1===e)throw new ae(n(r," has been removed"+(t?" in "+t:"")),ae.ERR_DEPRECATED);return t&&!lt[r]&&(lt[r]=!0,console.warn(n(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,r,s)}},at.spelling=function(e){return(t,i)=>(console.warn(`${i} is likely a misspelling of ${e}`),!0)};var ct={assertOptions:function(e,t,i){if("object"!=typeof e)throw new ae("options must be an object",ae.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let r=n.length;for(;r-- >0;){const s=n[r],o=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(o){const t=e[s],i=void 0===t||o(t,s,e);if(!0!==i)throw new ae("option "+s+" must be "+i,ae.ERR_BAD_OPTION_VALUE);continue}if(!0!==i)throw new ae("Unknown option "+s,ae.ERR_BAD_OPTION)}},validators:at};const ut=ct.validators;class dt{constructor(e){this.defaults=e||{},this.interceptors={request:new ye,response:new ye}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const i=(()=>{if(!t.stack)return"";const e=t.stack.indexOf("\n");return-1===e?"":t.stack.slice(e+1)})();try{if(e.stack){if(i){const t=i.indexOf("\n"),n=-1===t?-1:i.indexOf("\n",t+1),r=-1===n?"":i.slice(n+1);String(e.stack).endsWith(r)||(e.stack+="\n"+i)}}else e.stack=i}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Fe(this.defaults,t);const{transitional:i,paramsSerializer:n,headers:r}=t;void 0!==i&&ct.assertOptions(i,{silentJSONParsing:ut.transitional(ut.boolean),forcedJSONParsing:ut.transitional(ut.boolean),clarifyTimeoutError:ut.transitional(ut.boolean),legacyInterceptorReqResOrdering:ut.transitional(ut.boolean),advertiseZstdAcceptEncoding:ut.transitional(ut.boolean)},!1),null!=n&&(K.isFunction(n)?t.paramsSerializer={serialize:n}:ct.assertOptions(n,{encode:ut.function,serialize:ut.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ct.assertOptions(t,{baseUrl:ut.spelling("baseURL"),withXsrfToken:ut.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=r&&K.merge(r.common,r[t.method]);r&&K.forEach(["delete","get","head","post","put","patch","query","common"],e=>{delete r[e]}),t.headers=oe.concat(s,r);const o=[];let a=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;a=a&&e.synchronous;const i=t.transitional||Ee;i&&i.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,d=0;if(!a){const e=[ot.bind(this),void 0];for(e.unshift(...o),e.push(...l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=o.length;let h=t;for(;d<u;){const e=o[d++],t=o[d++];try{h=e(h)}catch(e){t.call(this,e);break}}try{c=ot.call(this,h)}catch(e){return Promise.reject(e)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return me(je((e=Fe(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}K.forEach(["delete","get","head","options"],function(e){dt.prototype[e]=function(t,i){return this.request(Fe(i||{},{method:e,url:t,data:(i||{}).data}))}}),K.forEach(["post","put","patch","query"],function(e){function t(t){return function(i,n,r){return this.request(Fe(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:i,data:n}))}}dt.prototype[e]=t(),"query"!==e&&(dt.prototype[e+"Form"]=t(!0))});class ht{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const i=this;this.promise.then(e=>{if(!i._listeners)return;let t=i._listeners.length;for(;t-- >0;)i._listeners[t](e);i._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{i.subscribe(e),t=e}).then(e);return n.cancel=function(){i.unsubscribe(t)},n},e(function(e,n,r){i.reason||(i.reason=new xe(e,n,r),t(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ht(function(t){e=t}),cancel:e}}}const ft={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ft).forEach(([e,t])=>{ft[t]=e});const pt=function e(t){const i=new dt(t),r=n(dt.prototype.request,i);return K.extend(r,dt.prototype,i,{allOwnKeys:!0}),K.extend(r,i,null,{allOwnKeys:!0}),r.create=function(i){return e(Fe(t,i))},r}(Re);pt.Axios=dt,pt.CanceledError=xe,pt.CancelToken=ht,pt.isCancel=Le,pt.VERSION=Ze,pt.toFormData=he,pt.AxiosError=ae,pt.Cancel=pt.CanceledError,pt.all=function(e){return Promise.all(e)},pt.spread=function(e){return function(t){return e.apply(null,t)}},pt.isAxiosError=function(e){return K.isObject(e)&&!0===e.isAxiosError},pt.mergeConfig=Fe,pt.AxiosHeaders=oe,pt.formToJSON=e=>Oe(K.isHTMLForm(e)?new FormData(e):e),pt.getAdapter=rt,pt.HttpStatusCode=ft,pt.default=pt,e.exports=pt},972(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>k});var n=[],r=n.slice,s=n.forEach,o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,a={create(e,t,i,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};i&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+60*i*1e3)),n&&(r.domain=n),document.cookie=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"},n=encodeURIComponent(t),r="".concat(e,"=").concat(n);if(i.maxAge>0){var s=i.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");r+="; Max-Age=".concat(Math.floor(s))}if(i.domain){if(!o.test(i.domain))throw new TypeError("option domain is invalid");r+="; Domain=".concat(i.domain)}if(i.path){if(!o.test(i.path))throw new TypeError("option path is invalid");r+="; Path=".concat(i.path)}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw new TypeError("option expires is invalid");r+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(r+="; HttpOnly"),i.secure&&(r+="; Secure"),i.sameSite)switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i.partitioned&&(r+="; Partitioned"),r}(e,t,r)},read(e){for(var t="".concat(e,"="),i=document.cookie.split(";"),n=0;n<i.length;n++){for(var r=i[n];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return r.substring(t.length,r.length)}return null},remove(e,t){this.create(e,"",-1,t)}},l={name:"cookie",lookup(e){var t=e.lookupCookie;if(t&&"undefined"!=typeof document)return a.read(t)||void 0},cacheUserLanguage(e,t){var i=t.lookupCookie,n=t.cookieMinutes,r=t.cookieDomain,s=t.cookieOptions;i&&"undefined"!=typeof document&&a.create(i,e,n,r,s)}},c={name:"querystring",lookup(e){var t,i=e.lookupQuerystring;if("undefined"!=typeof window){var n,r=window.location.search;!window.location.search&&(null===(n=window.location.hash)||void 0===n?void 0:n.indexOf("?"))>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var s=r.substring(1).split("&"),o=0;o<s.length;o++){var a=s[o].indexOf("=");a>0&&s[o].substring(0,a)===i&&(t=s[o].substring(a+1))}}return t}},u={name:"hash",lookup(e){var t,i=e.lookupHash,n=e.lookupFromHashIndex;if("undefined"!=typeof window){var r=window.location.hash;if(r&&r.length>2){var s=r.substring(1);if(i)for(var o=s.split("&"),a=0;a<o.length;a++){var l=o[a].indexOf("=");l>0&&o[a].substring(0,l)===i&&(t=o[a].substring(l+1))}if(t)return t;if(!t&&n>-1){var c,u=r.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(u))return;return null===(c=u["number"==typeof n?n:0])||void 0===c?void 0:c.replace("/","")}}}return t}},d=null,h=()=>{if(null!==d)return d;try{if(!(d="undefined"!=typeof window&&null!==window.localStorage))return!1;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){d=!1}return d},f={name:"localStorage",lookup(e){var t=e.lookupLocalStorage;if(t&&h())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){var i=t.lookupLocalStorage;i&&h()&&window.localStorage.setItem(i,e)}},p=null,g=()=>{if(null!==p)return p;try{if(!(p="undefined"!=typeof window&&null!==window.sessionStorage))return!1;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){p=!1}return p},v={name:"sessionStorage",lookup(e){var t=e.lookupSessionStorage;if(t&&g())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){var i=t.lookupSessionStorage;i&&g()&&window.sessionStorage.setItem(i,e)}},m={name:"navigator",lookup(e){var t=[];if("undefined"!=typeof navigator){var i=navigator,n=i.languages,r=i.userLanguage,s=i.language;if(n)for(var o=0;o<n.length;o++)t.push(n[o]);r&&t.push(r),s&&t.push(s)}return t.length>0?t:void 0}},y={name:"htmlTag",lookup(e){var t,i=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return i&&"function"==typeof i.getAttribute&&(t=i.getAttribute("lang")),t}},E={name:"path",lookup(e){var t,i=e.lookupFromPathIndex;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(n))return null===(t=n["number"==typeof i?i:0])||void 0===t?void 0:t.replace("/","")}}},S={name:"subdomain",lookup(e){var t,i=e.lookupFromSubdomainIndex,n="number"==typeof i?i+1:1,r="undefined"!=typeof window&&(null===(t=window.location)||void 0===t||null===(t=t.hostname)||void 0===t?void 0:t.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}},b=!1;try{document.cookie,b=!0}catch(e){}var w=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];b||w.splice(1,1);class k{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return s.call(r.call(arguments,1),t=>{if(t)for(var i in t)void 0===e[i]&&(e[i]=t[i])}),e}(t,this.options||{},{order:w,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(l),this.addDetector(c),this.addDetector(f),this.addDetector(v),this.addDetector(m),this.addDetector(y),this.addDetector(E),this.addDetector(S),this.addDetector(u)}addDetector(e){return this.detectors[e.name]=e,this}detect(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){var i=this.detectors[e].lookup(this.options);i&&"string"==typeof i&&(i=[i]),i&&(t=t.concat(i))}}),t=t.filter(e=>{return null!=e&&!("string"==typeof(t=e)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(e=>e.test(t)));var t}).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}k.type="languageDetector"},855(e,t,i){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}i.r(t),i.d(t,{default:()=>D});var s=["__proto__","constructor","prototype"];function o(e){return!("string"!=typeof e||0===e.length||e.length>128||s.indexOf(e)>-1||e.indexOf("..")>-1||e.indexOf("\\")>-1||/[?#%\s@]/.test(e)||/[\x00-\x1F\x7F]/.test(e))}function a(e){return!(!o(e)||e.indexOf("/")>-1)}var l={lng:a,ns:function(e){return o(e)}};function c(e){return"string"!=typeof e?e:e.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function u(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":r(XMLHttpRequest))}var d=/\{\{(.+?)\}\}/g;function h(e,t){var i=!1,r=e.replace(d,function(e,r){var o=r.trim();if(s.indexOf(o)>-1)return e;var c=t[o];if(null==c)return e;var u,d=l[o]||a,h=String(c).split("+"),f=function(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return n(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var r=0,s=function(){};return{s,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==i.return||i.return()}finally{if(l)throw o}}}}(h);try{for(f.s();!(u=f.n()).done;)if(!d(u.value))return i=!0,e}catch(e){f.e(e)}finally{f.f()}return h.join("+")});return i?null:r}function f(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function p(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?f(Object(i),!0).forEach(function(t){g(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):f(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function g(e,t,i){return(t=function(e){var t=function(e){if("object"!=v(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=v(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}var m,y,E="function"==typeof fetch?fetch:void 0;if(void 0!==i.g&&i.g.fetch?E=i.g.fetch:"undefined"!=typeof window&&window.fetch&&(E=window.fetch),u()&&(void 0!==i.g&&i.g.XMLHttpRequest?m=i.g.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(m=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&(void 0!==i.g&&i.g.ActiveXObject?y=i.g.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(y=window.ActiveXObject)),"function"!=typeof E&&(E=void 0),!E&&!m&&!y)try{Promise.resolve().then(i.t.bind(i,911,19)).then(function(e){E=e.default}).catch(function(){})}catch(N){}var S=["__proto__","constructor","prototype"],b=function(e,t){if(t&&"object"===v(t)){for(var i="",n=0,r=Object.keys(t);n<r.length;n++){var s=r[n];S.indexOf(s)>-1||(i+="&"+encodeURIComponent(s)+"="+encodeURIComponent(t[s]))}if(!i)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+i.slice(1)}return e},w=function(e,t,i,n){var r=function(e){if(!e.ok)return i(e.statusText||"Error",{status:e.status});e.text().then(function(t){i(null,{status:e.status,data:t})}).catch(i)};if(n){var s=n(e,t);if(s instanceof Promise)return void s.then(r).catch(i)}"function"==typeof fetch?fetch(e,t).then(r).catch(i):E(e,t).then(r).catch(i)};const k=function(e,t,n,r){return"function"==typeof n&&(r=n,n=void 0),r=r||function(){},E&&0!==t.indexOf("file:")?function(e,t,n,r){e.queryStringParams&&(t=b(t,e.queryStringParams));var s=p({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);"undefined"==typeof window&&void 0!==i.g&&void 0!==i.g.process&&i.g.process.versions&&i.g.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(i.g.process.version,"; ").concat(i.g.process.platform," ").concat(i.g.process.arch,")")),n&&(s["Content-Type"]="application/json");var o="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,a=p({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:s},e._omitFetchOptions?{}:o),l="function"==typeof e.alternateFetch&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{w(t,a,r,l)}catch(i){if(!o||0===Object.keys(o).length||!i.message||i.message.indexOf("not implemented")<0)return r(i);try{Object.keys(o).forEach(function(e){delete a[e]}),w(t,a,r,l),e._omitFetchOptions=!0}catch(e){r(e)}}}(e,t,n,r):u()||"function"==typeof ActiveXObject?function(e,t,i,n){i&&"object"===v(i)&&(i=b("",i).slice(1)),e.queryStringParams&&(t=b(t,e.queryStringParams));try{var r=m?new m:new y("MSXML2.XMLHTTP.3.0");r.open(i?"POST":"GET",t,1),e.crossDomain||r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.withCredentials=!!e.withCredentials,i&&r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.overrideMimeType&&r.overrideMimeType("application/json");var s=e.customHeaders;if(s="function"==typeof s?s():s)for(var o=0,a=Object.keys(s);o<a.length;o++){var l=a[o];S.indexOf(l)>-1||r.setRequestHeader(l,s[l])}r.onreadystatechange=function(){r.readyState>3&&n(r.status>=400?r.statusText:null,{status:r.status,data:r.responseText})},r.send(i)}catch(e){console&&console.log(e)}}(e,t,n,r):void r(new Error("No fetch and no xhr implementation found!"))};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function A(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function C(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?A(Object(i),!0).forEach(function(t){T(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):A(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function O(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,R(n.key),n)}}function T(e,t,i){return(t=R(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function R(e){var t=function(e){if("object"!=I(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=I(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==I(t)?t:t+""}var N,L,x=(N=function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.services=t,this.options=i,this.allOptions=n,this.type="backend",this.init(t,i,n)},L=[{key:"init",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.services=e,this.options=C(C(C({},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,i){return T({},t,i||"")},parseLoadPayload:function(e,t){},request:k,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}),this.options||{}),i),this.allOptions=n,this.services&&this.options.reloadInterval){var r=setInterval(function(){return t.reload()},this.options.reloadInterval);"object"===I(r)&&"function"==typeof r.unref&&r.unref()}}},{key:"readMulti",value:function(e,t,i){this._readAny(e,e,t,t,i)}},{key:"read",value:function(e,t,i){this._readAny([e],e,[t],t,i)}},{key:"_readAny",value:function(e,t,i,n,r){var s,o=this,a=this.options.loadPath;"function"==typeof this.options.loadPath&&(a=this.options.loadPath(e,i)),(a=function(e){return!!e&&"function"==typeof e.then}(s=a)?s:Promise.resolve(s)).then(function(s){if(!s)return r(null,{});var a=h(s,{lng:e.join("+"),ns:i.join("+")});if(null==a){var l=e.map(c).join(", "),u=i.map(c).join(", ");return r(new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+l+"] namespaces=["+u+"]"),!1)}o.loadUrl(a,r,t,n)})}},{key:"loadUrl",value:function(e,t,i,n){var r=this,s="string"==typeof i?[i]:i,o="string"==typeof n?[n]:n,a=this.options.parseLoadPayload(s,o),l=c(function(e){if("string"!=typeof e||0===e.length)return e;try{var t=new URL(e);return t.username||t.password?(t.username="",t.password="",t.toString()):e}catch(t){return e.replace(/(\/\/)[^/@\s]+@/g,"$1")}}(e));this.options.request(this.options,e,a,function(e,s){if(s&&(s.status>=500&&s.status<600||!s.status))return t("failed loading "+l+"; status code: "+s.status,!0);if(s&&s.status>=400&&s.status<500)return t("failed loading "+l+"; status code: "+s.status,!1);if(!s&&e&&e.message){var o=e.message.toLowerCase();if(["failed","fetch","network","load"].find(function(e){return o.indexOf(e)>-1}))return t("failed loading "+l+": "+c(e.message),!0)}if(e)return t(e,!1);var a,u;try{a="string"==typeof s.data?r.options.parse(s.data,i,n):s.data}catch(e){u="failed parsing "+l+" to json"}if(u)return t(u,!1);t(null,a)})}},{key:"create",value:function(e,t,i,n,r){var s=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var o=this.options.parsePayload(t,i,n),a=0,l=[],c=[];e.forEach(function(i){var n=s.options.addPath;"function"==typeof s.options.addPath&&(n=s.options.addPath(i,t));var u=h(n,{lng:i,ns:t});if(null==u)return a+=1,void(r&&a===e.length&&r(l,c));s.options.request(s.options,u,o,function(t,i){a+=1,l.push(t),c.push(i),a===e.length&&"function"==typeof r&&r(l,c)})})}}},{key:"reload",value:function(){var e=this,t=this.services,i=t.backendConnector,n=t.languageUtils,r=t.logger,s=i.language;if(!s||"cimode"!==s.toLowerCase()){var o=[],a=function(e){n.toResolveHierarchy(e).forEach(function(e){o.indexOf(e)<0&&o.push(e)})};a(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return a(e)}),o.forEach(function(t){e.allOptions.ns.forEach(function(e){i.read(t,e,"read",null,null,function(n,s){n&&r.warn("loading namespace ".concat(e," for language ").concat(t," failed"),n),!n&&s&&r.log("loaded namespace ".concat(e," for language ").concat(t),s),i.loaded("".concat(t,"|").concat(e),n,s)})})})}}}],L&&O(N.prototype,L),Object.defineProperty(N,"prototype",{writable:!1}),N);x.type="backend";const D=x}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var s=n[e]={exports:{}};return i[e](s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(i,n){if(1&n&&(i=this(i)),8&n)return i;if("object"==typeof i&&i){if(4&n&&i.__esModule)return i;if(16&n&&"function"==typeof i.then)return i}var s=Object.create(null);r.r(s);var o={};e=e||[null,t({}),t([]),t(t)];for(var a=2&n&&i;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>o[e]=()=>i[e]);return o.default=()=>i,r.d(s,o),s},r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{"use strict";r.r(s),r.d(s,{Desktop:()=>Ke});var e=r(316);const t=(0,e.createLogger)("agentx-js-api"),i=(e,t)=>({info:(...i)=>e.info(t,...i),warn:(...i)=>e.warn(t,...i),error:(...i)=>e.error(t,...i)});class n{constructor(e){this.logger=e.logger}check(e){return e?!!e.isInited||(this.logger.error("SERVICE still not initialized... Await it's init(...) first."),!1):(this.logger.error("SERVICE is not defined..."),!1)}}const o=e=>new n(e);var a=function(e,t,i,n){return new(i||(i=Promise))(function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const l="jsapi",c={rps:120,tag:l},u={rps:0,tag:l},d={tag:l},h=e=>e.actionsChannels.createSource("fireGeneralSilentNotification/Req",c),f=e=>e.actionsChannels.createSource("fireGeneralAutoDismissNotification/Req",u),p=e=>e.actionsChannels.createDestination("fireGeneralAutoDismissNotification/Res",u),g=e=>e.actionsChannels.createSource("fireGeneralAcknowledgeNotification/Req",u),v=e=>e.actionsChannels.createDestination("fireGeneralAcknowledgeNotification/Res",u),m=e=>e.actionsChannels.createSource("addCustomTask",c),y=e=>e.actionsChannels.createSource("getToken/Req",u),E=e=>e.actionsChannels.createDestination("getToken/Res",d),S=e=>e.actionsChannels.createSource("getTaskMap/Req",u),b=e=>e.actionsChannels.createDestination("getTaskMap/Res",d),w=e=>e.actionsChannels.createSource("getMediaTypeQueue/Req",u),k=e=>e.actionsChannels.createDestination("getMediaTypeQueue/Res",d),I=e=>e.actionsChannels.createSource("getIdleCodes/Req",u),A=e=>e.actionsChannels.createDestination("getIdleCodes/Res",d),C=e=>e.actionsChannels.createSource("getWrapUpCodes/Req",u),O=e=>e.actionsChannels.createDestination("getWrapUpCodes/Res",d);class T{checkService(){return this.serviceChecker.check(this.SERVICE)}getNextReqId(){const e=Date.now();return this.lastReqTs!==e?(this.lastReqTs=e,this.lastReqN=0):this.lastReqN++,`${this.lastReqTs}_${this.lastReqN}`}constructor(e){this.lastReqTs=Date.now(),this.lastReqN=0,this.toggleMiximizeRestore=e=>{var i;if(e&&e.target){const n=null===(i=this.getClosestElement(e.target,".dynamic-widget-wrapper"))||void 0===i?void 0:i.id;if(n){const e=new CustomEvent("toggle-maximize-restore",{detail:{widgetId:n}});window.dispatchEvent(e),t.info("Dispatching toggle-maximize-restore event for widgetId:",n)}}},this.toggleVoiceInteractionPanel=()=>{window.dispatchEvent(new CustomEvent("toggle-voice-interaction-panel")),t.info("Dispatching toggl-voice-interaction-panel")},this.toggleMuteUnmuteWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-mute-unmute",{});window.dispatchEvent(e),t.info("Dispatching ax-web-call-mute-unmute event")},this.declineWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-decline",{});window.dispatchEvent(e),t.info("Dispatching ax-web-call-decline event")},this.acceptWebRtcCall=()=>{const e=new CustomEvent("ax-web-call-answer",{});window.dispatchEvent(e),t.info("Dispatching ax-web-call-answer event")},this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.sourceActionsChannels={fireGeneralSilentNotification:h(this.SERVICE),fireGeneralAutoDismissNotification:f(this.SERVICE),fireGeneralAcknowledgeNotification:g(this.SERVICE),addCustomTask:m(this.SERVICE),getToken:y(this.SERVICE),getTaskMap:S(this.SERVICE),getMediaTypeQueue:w(this.SERVICE),getIdleCodes:I(this.SERVICE),getWrapUpCodes:C(this.SERVICE)},this.destinationActionsChannels={fireGeneralAutoDismissNotification:p(this.SERVICE),fireGeneralAcknowledgeNotification:v(this.SERVICE),getToken:E(this.SERVICE),getTaskMap:b(this.SERVICE),getMediaTypeQueue:k(this.SERVICE),getIdleCodes:A(this.SERVICE),getWrapUpCodes:O(this.SERVICE)},this.logger.info("Inited"))}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}fireGeneralSilentNotification(...e){this.checkService()&&this.sourceActionsChannels.fireGeneralSilentNotification.send(...e)}fireGeneralAutoDismissNotification(...t){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(i=>{const n=this.getNextReqId(),r=({args:[t,s,o,a]})=>{a===n&&(o!==e.Notifications.ItemMeta.Mode.AutoDismiss&&o!==e.Notifications.ItemMeta.Mode.Silent||t===e.Notifications.ItemMeta.Status.Deactivated&&(i([t,s,o]),this.destinationActionsChannels.fireGeneralAutoDismissNotification.removeListener(r)))};this.destinationActionsChannels.fireGeneralAutoDismissNotification.addListener(r),this.sourceActionsChannels.fireGeneralAutoDismissNotification.send(t[0],n)})})}fireGeneralAcknowledgeNotification(...t){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(i=>{const n=this.getNextReqId(),r=({args:[t,s,o,a]})=>{a===n&&(o!==e.Notifications.ItemMeta.Mode.Acknowledge&&o!==e.Notifications.ItemMeta.Mode.Silent||t===e.Notifications.ItemMeta.Status.Deactivated&&(i([t,s,o]),this.destinationActionsChannels.fireGeneralAcknowledgeNotification.removeListener(r)))};this.destinationActionsChannels.fireGeneralAcknowledgeNotification.addListener(r),this.sourceActionsChannels.fireGeneralAcknowledgeNotification.send(t[0],n)})})}addCustomTask(...e){this.checkService()&&this.sourceActionsChannels.addCustomTask.send(...e)}getTaskMap(){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(e=>{const t=this.getNextReqId(),i=({args:[n,r]})=>{r===t&&(e(n),this.destinationActionsChannels.getTaskMap.removeListener(i))};this.destinationActionsChannels.getTaskMap.addListener(i),this.sourceActionsChannels.getTaskMap.send(t)})})}getMediaTypeQueue(e){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(t=>{const i=this.getNextReqId(),n=({args:[e,r]})=>{r===i&&(t(e),this.destinationActionsChannels.getMediaTypeQueue.removeListener(n))};this.destinationActionsChannels.getMediaTypeQueue.addListener(n),this.sourceActionsChannels.getMediaTypeQueue.send(e,i)})})}getToken(){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(e=>{const t=this.getNextReqId(),i=({args:[n,r]})=>{r===t&&(e(n),this.destinationActionsChannels.getToken.removeListener(i))};this.destinationActionsChannels.getToken.addListener(i),this.sourceActionsChannels.getToken.send(t)})})}getIdleCodes(){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(e=>{const t=this.getNextReqId(),i=({args:[n,r]})=>{r===t&&(e(n),this.destinationActionsChannels.getIdleCodes.removeListener(i))};this.destinationActionsChannels.getIdleCodes.addListener(i),this.sourceActionsChannels.getIdleCodes.send(t)})})}getWrapUpCodes(){return a(this,void 0,void 0,function*(){if(this.checkService())return new Promise(e=>{const t=this.getNextReqId(),i=({args:[n,r]})=>{r===t&&(e(n),this.destinationActionsChannels.getWrapUpCodes.removeListener(i))};this.destinationActionsChannels.getWrapUpCodes.addListener(i),this.sourceActionsChannels.getWrapUpCodes.send(t)})})}getClosestElement(e,t){return e&&e!==document&&e!==window?e instanceof ShadowRoot?this.getClosestElement(e.host,t):e instanceof HTMLElement&&e.matches(t)?e:this.getClosestElement(e.parentNode,t):null}}const R=i(t,"[Actions JSAPI] =>");class N{constructor(e){this.isInited=!1,this.listeners=new Map,this.listenersOnce=new Map,this.logger=e.logger}init(e){this.aqmServiceEntity=e.aqmServiceEntity,this.aqmServiceEntityString=e.aqmServiceEntityString,this.isInited=!0}cleanup(){this.removeAllEventListeners(),this.aqmServiceEntity=void 0,this.aqmServiceEntityString=void 0,this.isInited=!1}_addEventListener(e,t,i){var n,r,s;const o=i?"listenersOnce":"listeners";this[o].has(e)||this[o].set(e,new Map);const a=this[o].get(e),l=i?"listenOnce":"listen",c=n=>{let r=null;return i&&(r=this.aqmServiceEntity[e].listenOnce(()=>this.removeOnceEventListener(e,t))),()=>{var t;if(n){i?(n.stopListenOnce(),r&&r.stopListenOnce()):n.stopListen();const s=[];s.push(`UnBound "${e.toString()}"`),i&&s.push("Once"),this.aqmServiceEntityString&&s.push(`from "${this.aqmServiceEntityString}"`),null===(t=this.logger)||void 0===t||t.info(s.join(" "))}}};if(this.aqmServiceEntity)if(e in this.aqmServiceEntity&&l in this.aqmServiceEntity[e]){const r=this.aqmServiceEntity[e][l](t);a.set(t,c(r));const s=[];s.push(`Bound "${e.toString()}"`),i&&s.push("Once"),this.aqmServiceEntityString&&s.push(`to "${this.aqmServiceEntityString}"`),null===(n=this.logger)||void 0===n||n.info(s.join(" "))}else null===(r=this.logger)||void 0===r||r.warn(`EventName "${e.toString()}" is not recognized, so won't be subscribed...`);else null===(s=this.logger)||void 0===s||s.error(`"${this.aqmServiceEntityString}" is not ready yet. .init(...) first...`)}_removeEventListener(e,t,i){const n=i?"listenersOnce":"listeners";if(this[n].has(e)){const i=this[n].get(e);i&&(i.has(t)&&(i.get(t)(),i.delete(t)),i.size<1&&this[n].delete(e))}}addEventListener(e,t){this._addEventListener(e,t,!1)}addOnceEventListener(e,t){this._addEventListener(e,t,!0)}removeEventListener(e,t){this._removeEventListener(e,t,!1)}removeOnceEventListener(e,t){this._removeEventListener(e,t,!0)}removeAllEventListeners(){["listeners","listenersOnce"].forEach(e=>{this[e].forEach((e,t)=>{e.forEach((e,t)=>e()),e.clear()}),this[e].clear()})}}const L=e=>new N(e);var x,D,U,P,_,V,M,j;!function(e){e.TELEPHONY="telephony",e.CHAT="chat",e.EMAIL="email",e.SOCIAL="social",e.MIDCALL_TELEPHONY="midcall telephony",e.APPLE_MESSAGES="appleMessages"}(x||(x={})),function(e){e.QUEUE="queue",e.DIAL_NUMBER="dialNumber",e.AGENT="agent",e.EPDN="entrypointDialNumber",e.ENTRY_POINT="entryPoint"}(D||(D={})),function(e){e.IDLE="Idle",e.AVAILABLE="Available",e.RONA="RONA"}(U||(U={})),function(e){e.All="All",e.TELEPHONY="telephony",e.CHAT="chat",e.EMAIL="email",e.SOCIAL="social",e.CUSTOM_MESSAGING="customMessaging"}(P||(P={})),function(e){e.SMS="SMS",e.TELEPHONY="Call",e.CHAT="Chat",e.EMAIL="Email",e.MESSENGER="Messenger",e.WHATSAPP="WhatsApp",e.APPLE_BUSINESS_CHAT="Apple Business Chat",e.GOOGLE_BUSINESS_MESSAGES="Google's Business Messages"}(_||(_={})),function(e){e.MIDCALL="midcall",e.ADHOC="adhoc",e.CONTINUOUS="continuous",e.SCHEDULED="scheduled"}(V||(V={})),function(e){e.EMAIL="email",e.CHAT="chat",e.TELEPHONY="telephony",e.SOCIAL="social",e.SMS="sms",e.FACEBOOK="facebook",e.WHATSAPP="whatsapp",e.APPLEMESSAGES="appleMessages",e.GOOGLEMESSAGES="googleMessages"}(M||(M={})),function(t){const i="is not a valid UUID",n="is not a valid media type",r="is not a valid destination type";t.validatePropValueNotNullAndEmpty=e=>null!==e&&""!==e,t.validateAgentState=e=>Object.values(U).includes(e),t.validateURL=e=>/^(https?:\/\/)?(www\.)?[a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e),t.validateChannelName=e=>Object.values(_).includes(e),t.validateStateChannelType=e=>Array.isArray(e)&&e.length>0&&e.every(e=>["telephony","chat","email","social"].includes(e)),t.validateDestinationType=e=>Object.values(D).includes(e),t.validateMediaType=e=>Object.values(x).includes(e),t.validateUTCTimeStampNumberFormat=e=>Number.isInteger(e)&&e>=0&&e<=4102444799999,t.validateNumber=e=>Number.isInteger(e)&&e>=0&&e<=2147483647,t.validateBoolean=e=>"boolean"==typeof e||(0===e||1===e)&&t.validatePropValueNotNullAndEmpty(e),t.validateStringToBoolean=e=>{const t=null==e?void 0:e.toLowerCase();return"true"===t||"false"===t||"0"===t||"1"===t},t.validateChannelType=e=>Object.values(_).includes(e),t.validateMonitorType=e=>Object.values(V).includes(e),t.validateUUID=e=>/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(e),t.validateStringNumberOnly=e=>/^(\+)?\d+$/.test(e),t.validateBuddyAgents=(i,n)=>{e.AssertUtils.check(t.validateUUID(null==i?void 0:i.agentProfileId),n,"agentProfileId is not a valid UUID"),e.AssertUtils.check(t.validateChannelName(null==i?void 0:i.channelName),n,"channelName is not a valid channel name"),void 0!==(null==i?void 0:i.state)&&e.AssertUtils.check(t.validateAgentState(i.state),n,"state is not a valid state"),void 0!==(null==i?void 0:i.trackingId)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.trackingId),n,"trackingId is not a valid string")},t.validateAuxCodeType=(i,n)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i),n,"value is null or empty"),e.AssertUtils.check("IDLE_CODE"===i||"WRAP_UP_CODE"===i,n,"value is not IDLE_CODE or WRAP_UP_CODE")},t.validateAuxCodePayload=(i,n)=>{t.validateAuxCodeType(i.workType,n),void 0!==i.page&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.page),n,"page is is null or empty"),void 0!==i.pageSize&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.pageSize),n,"pageSize is is null or empty"),void 0!==i.search&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.search),n,"search is is null or empty"),void 0!==i.customFilter&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.customFilter),n,"customFilter is is null or empty")},t.validateCancelCtq=(n,r)=>{e.AssertUtils.check(t.validateUUID(null==n?void 0:n.agentId),r,`agentId ${i}`),e.AssertUtils.check(t.validateUUID(null==n?void 0:n.queueId),r,`queueId ${i}`)},t.validateWrapupPayload=(i,n)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.wrapUpReason),n,"wrapUpReason is not a valid string"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.auxCodeId),n,"auxCodeId is not a valid string"),e.AssertUtils.check(t.validateStringToBoolean(null==i?void 0:i.isAutoWrapup),n,"isAutoWrapup is not a valid boolean value")},t.validateVTeamTransferPayload=(i,n)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.vteamId),n,"vteamId is not a valid string"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.vteamType),n,"vteamType is not a valid string")},t.validateBlindTransferPayload=(r,s)=>{e.AssertUtils.check(t.validateUUID(null==r?void 0:r.agentId),s,`agentId ${i}`),e.AssertUtils.check(t.validateUUID(null==r?void 0:r.destAgentId),s,`destAgentId ${i}`),e.AssertUtils.check(t.validateMediaType(null==r?void 0:r.mediaType),s,n),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==r?void 0:r.destAgentTeamId),s,"destAgentTeamId is not a valid string"),e.AssertUtils.check(t.validateStringNumberOnly(null==r?void 0:r.destAgentDN),s,"destAgentDN is not a numbers only string"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==r?void 0:r.destSiteId),s,"destSiteId is not a valid string")},t.validateConsultPayload=(r,s)=>{e.AssertUtils.check(t.validateUUID(null==r?void 0:r.agentId),s,`agentId ${i}`),void 0!==(null==r?void 0:r.destAgentId)&&e.AssertUtils.check(t.validateUUID(null==r?void 0:r.destAgentId),s,`destAgentId ${i}`),void 0!==(null==r?void 0:r.mediaType)&&e.AssertUtils.check(t.validateMediaType(null==r?void 0:r.mediaType),s,n),void 0!==(null==r?void 0:r.holdParticipants)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==r?void 0:r.holdParticipants),s,"holdParticipants is not valid")},t.validateConsultTransferPayLoad=(s,o)=>{void 0!==(null==s?void 0:s.agentId)&&e.AssertUtils.check(t.validateUUID(null==s?void 0:s.agentId),o,`agentId ${i}`),e.AssertUtils.check(t.validateUUID(null==s?void 0:s.destAgentId),o,`destagentId ${i}`),e.AssertUtils.check(t.validateMediaType(null==s?void 0:s.mediaType),o,n),e.AssertUtils.check(t.validateUUID(null==s?void 0:s.mediaResourceId),o,`mediaResourceId ${i}`),e.AssertUtils.check(t.validateDestinationType(null==s?void 0:s.destinationType),o,r)},t.validateWrapUpV2Payload=(i,n)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.wrapUpReason),n,"wrapUpReason is not a valid string"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.auxCodeId),n,"auxCodeId is not a valid string")},t.validateChangeAgentStateType=(i,n)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.state),n,"state is null or empty"),e.AssertUtils.check("available"===i.state.toLowerCase()||"idle"===i.state.toLowerCase(),n,"state is not Available or Idle"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.auxCodeId),n,"auxCodeId is null or empty"),e.AssertUtils.check(t.validateUUID(i.agentId),n,"agentId is not a valid UUID")},t.validateConsultDataV2Payload=(i,n)=>{void 0!==(null==i?void 0:i.to)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.to),n,"to is not a valid string or not undefined"),e.AssertUtils.check(t.validateDestinationType(null==i?void 0:i.destinationType),n,r),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.holdParticipants),n,"holdParticipants is not valid")},t.validateConsultConferenceDataV2Payload=(n,s)=>{void 0!==(null==n?void 0:n.agentId)&&e.AssertUtils.check(t.validateUUID(null==n?void 0:n.agentId),s,`agentId ${i}`),void 0!==(null==n?void 0:n.to)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==n?void 0:n.to),s,"to is not a valid string or not undefined"),e.AssertUtils.check(t.validateDestinationType(null==n?void 0:n.destinationType),s,r)},t.validateTransferV2Payload=(i,n)=>{void 0!==(null==i?void 0:i.to)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.to),n,"to is not a valid string or not undefined"),e.AssertUtils.check(t.validateDestinationType(null==i?void 0:i.destinationType),n,r)},t.validateBuddyAgentsV2Payload=(r,s)=>{e.AssertUtils.check(t.validateUUID(null==r?void 0:r.agentProfileId),s,`agentProfileId ${i}`),e.AssertUtils.check(t.validateMediaType(null==r?void 0:r.mediaType),s,n),e.AssertUtils.check(t.validateAgentState(null==r?void 0:r.state),s,"state is not a valid state")},t.validateVTeam=(i,n)=>{e.AssertUtils.check(t.validateUUID(null==i?void 0:i.agentProfileId),n,"agentProfileId is not a valid UUID"),e.AssertUtils.check(t.validateUUID(null==i?void 0:i.agentSessionId),n,"agentSessionId is not a valid UUID"),e.AssertUtils.check(t.validateChannelType(null==i?void 0:i.channelType),n,"channelType is not a valid channel type"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.type),n,"type is not a valid string"),void 0!==(null==i?void 0:i.trackingId)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.trackingId),n,"trackingId is not a valid string")},t.validateDialerTasks=(i,n)=>{(null==i?void 0:i.id)&&e.AssertUtils.check(t.validateUUID(i.id),n,"id is not a valid UUID"),e.AssertUtils.check(t.validateUUID(null==i?void 0:i.entryPointId),n,"entryPointId is not a valid UUID"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.destination),n,"destination is null or empty"),e.AssertUtils.check(t.validateUUID(null==i?void 0:i.direction),n,"direction is not a valid UUID"),(null==i?void 0:i.origin)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.origin),n,"origin is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.attributes.key),n,"attributes.key is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.attributes.value),n,"attributes.value is null or empty"),e.AssertUtils.check(t.validateMediaType(null==i?void 0:i.mediaType),n,"mediaType is not a valid media type"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.outboundType),n,"outboundType is null or empty")},t.validatePreviewCampaignPayload=(i,n)=>{e.AssertUtils.check(t.validateUUID(null==i?void 0:i.interactionId),n,"interactionId is not a valid UUID"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(null==i?void 0:i.campaignId),n,"campaignId is null or empty")},t.validateMonitoringRequest=(i,n)=>{e.AssertUtils.check(t.validateUUID(null==i?void 0:i.id),n,"id is not a valid UUID"),e.AssertUtils.check(t.validateMonitorType(null==i?void 0:i.monitorType),n,"monitorType is not a valid monitor type"),void 0!==(null==i?void 0:i.queueIds)&&i.queueIds.forEach(i=>{e.AssertUtils.check(t.validateUUID(i),n,"queueIds is not a valid UUID")}),void 0!==(null==i?void 0:i.teams)&&i.teams.forEach(i=>{e.AssertUtils.check(t.validateUUID(i),n,"team is not a valid UUID")}),void 0!==(null==i?void 0:i.sites)&&i.sites.forEach(i=>{e.AssertUtils.check(t.validateUUID(i),n,"site is not a valid UUID")}),void 0!==(null==i?void 0:i.agents)&&i.agents.forEach(i=>{e.AssertUtils.check(t.validateUUID(i),n,"agent is not a valid UUID")}),void 0!==(null==i?void 0:i.startUTCTimestamp)&&e.AssertUtils.check(t.validateUTCTimeStampNumberFormat(i.startUTCTimestamp),n,"startUTCTimestamp is not a valid timestamp"),void 0!==(null==i?void 0:i.continuousDuration)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.continuousDuration),n,"continuousDuration is not a valid string or not undefined"),void 0!==(null==i?void 0:i.taskId)&&e.AssertUtils.check(t.validateUUID(i.taskId),n,"taskId is not a valid UUID"),e.AssertUtils.check(t.validateUUID(null==i?void 0:i.trackingId),n,"trackingId is not a valid UUID"),(null==i?void 0:i.invisibleMode)&&e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.invisibleMode),n,"invisibleMode is not a valid string or not undefined")},t.validateMultiConsultPayload=(s,o)=>{s&&Object.entries(s).forEach(([s,a])=>{switch(s){case"agentId":e.AssertUtils.check(t.validateUUID(String(a)),o,`agentId ${i}`);break;case"destAgentId":e.AssertUtils.check(t.validateUUID(String(a)),o,`destAgentId ${i}`);break;case"mediaType":e.AssertUtils.check(t.validateMediaType(a),o,n);break;case"holdParticipants":e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(a),o,"holdParticipants is not valid");break;case"destAgentDN":e.AssertUtils.check(t.validateStringNumberOnly(String(a)),o,"destAgentDN is not a numbers only string");break;case"destinationType":e.AssertUtils.check(t.validateDestinationType(a),o,r);break;case"destAgentTeamId":e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(String(a)),o,"destAgentTeamId is not a valid string");break;case"destSiteId":e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(String(a)),o,"destSiteId is not a valid string");break;case"queueId":e.AssertUtils.check(t.validateUUID(String(a)),o,`queueId ${i}`);break;case"trackingId":e.AssertUtils.check(t.validateUUID(String(a)),o,"trackingId is not a valid string")}})},t.validateFetchByAssigneeAgentIdType=(i,n,r)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i),r,"page is is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(n),r,"assigneeAgent is is null or empty"),e.AssertUtils.check(t.validateUUID(n),r,"assigneeAgent is not a valid UUID")},t.validatefetchByCallbackPhoneNumberType=(i,n,r)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i),r,"page is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(n),r,"phoneNumber is is null or empty")},t.validateCreateOrUpdateScheduleCallbackType=(i,n,r=!1)=>{r&&(e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.id),n,"id is null or empty"),i.id&&e.AssertUtils.check(t.validateUUID(i.id),n,"id is not a valid UUID")),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.customerName),n,"customerName is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.callbackNumber),n,"callbackNumber is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.timezone),n,"timezone is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.scheduleDate),n,"scheduleDate is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.startTime),n,"startTime is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.endTime),n,"endTime is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i.queueId),n,"queueId is null or empty")},t.validateGetValidCampaignTimesType=(i,n,r,s)=>{e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(i),s,"campaignId is null or empty"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(n),s,"agentId is null or empty"),e.AssertUtils.check(t.validateUUID(n),s,"agentId is not a valid UUID"),e.AssertUtils.check(t.validatePropValueNotNullAndEmpty(r),s,"interactionId is null or empty")}}(j||(j={}));var q=function(e,t,i,n){return new(i||(i=Promise))(function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const F="interactionId is not a valid UUID";class ${checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.contact,aqmServiceEntityString:"SERVICE.aqm.contact"}),this.logger.info("Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}sendDtmf(e){if(!this.checkService())return;const t="string"==typeof e?Number(e):e;Number.isNaN(t)?this.logger.warn(`sendDtmf: invalid digit "${e}"`):this.SERVICE.webCalling.sendDTMF(t)}accept(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"accept",F),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.accept(t)})}consultAccept(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultAccept",F),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultAccept(t)})}buddyAgents(e){return q(this,void 0,void 0,function*(){var t;if(this.checkService())return j.validateBuddyAgents(e.data,"buddyAgents"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.buddyAgents(e)})}end(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"end",F),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.end(t)})}consultEnd(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultEnd",F),e.AssertUtils.check(j.validateBoolean(t.isConsult),"consultEnd","isConsult is not a valid boolean value"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultEnd(t)})}cancelCtq(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"cancelCtq",F),j.validateCancelCtq(t.data,"cancelCtq"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.cancelCtq(t)})}wrapup(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"wrapup",F),j.validateWrapupPayload(t.data,"wrapup"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.wrapup(t)})}vteamTransfer(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"vteamTransfer",F),j.validateVTeamTransferPayload(t.data,"vteamTransfer"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.vteamTransfer(t)})}blindTransfer(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"blindTransfer",F),j.validateBlindTransferPayload(t.data,"blindTransfer"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.blindTransfer(t)})}hold(t){return q(this,void 0,void 0,function*(){var i,n;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"hold",F),e.AssertUtils.check(j.validateUUID(null===(i=t.data)||void 0===i?void 0:i.mediaResourceId),"hold","mediaResourceId is not a valid UUID"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.hold(t)})}unHold(t){return q(this,void 0,void 0,function*(){var i,n;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"unHold",F),e.AssertUtils.check(j.validateUUID(null===(i=t.data)||void 0===i?void 0:i.mediaResourceId),"unHold","mediaResourceId is not a valid UUID"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.unHold(t)})}consult(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consult",F),e.AssertUtils.check(j.validateURL(t.url),"consult","url is not a valid URL"),j.validateMultiConsultPayload(t.data,"consult"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consult(t)})}consultConference(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultConference",F),j.validateConsultPayload(t.data,"consultConference"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultConference(t)})}decline(t){return q(this,void 0,void 0,function*(){var i,n;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"decline","ERROR_INTERACTION_ID_INVALID"),e.AssertUtils.check(j.validateUUID(null===(i=t.data)||void 0===i?void 0:i.mediaResourceId),"decline","mediaResourceId is not a valid UUID"),e.AssertUtils.check(j.validateBoolean(t.isConsult),"decline","isConsult is not a valid boolean value"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.decline(t)})}consultTransfer(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"decline","ERROR_INTERACTION_ID_INVALID"),j.validateConsultTransferPayLoad(t.data,"consultTransfer"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultTransfer(t)})}vteamList(e){return q(this,void 0,void 0,function*(){var t;if(this.checkService())return j.validateVTeam(e.data,"vteamList"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.vteamList(e)})}pauseRecording(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"pauseRecording","ERROR_INTERACTION_ID_INVALID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.pauseRecording(t)})}resumeRecording(t){return q(this,void 0,void 0,function*(){var i,n;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"resumeRecording","ERROR_INTERACTION_ID_INVALID"),e.AssertUtils.check(j.validateBoolean(null===(i=t.data)||void 0===i?void 0:i.autoResumed),"resumeRecording","autoResumed is not a valid boolean value"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.resumeRecording(t)})}acceptV2(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"acceptV2","ERROR_INTERACTION_ID_INVALID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.acceptV2(t)})}endV2(t){return q(this,void 0,void 0,function*(){var i,n;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"endV2","ERROR_INTERACTION_ID_INVALID"),t.isEndingFromNonPrimary&&e.AssertUtils.check(j.validateBoolean(t.isEndingFromNonPrimary),"endV2","isEndingFromNonPrimary is not a valid boolean value"),(null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.endV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.endV2(t):void 0})}cancelTaskV2(t){return q(this,void 0,void 0,function*(){var i,n;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"cancelTaskV2","ERROR_INTERACTION_ID_INVALID"),(null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.cancelTaskV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.cancelTaskV2(t):void 0})}pauseRecordingV2(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"pauseRecordingV2","ERROR_INTERACTION_ID_INVALID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.pauseRecordingV2(t)})}resumeRecordingV2(t){return q(this,void 0,void 0,function*(){var i,n;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"resumeRecordingV2","ERROR_INTERACTION_ID_INVALID"),e.AssertUtils.check(j.validateBoolean(null===(i=t.data)||void 0===i?void 0:i.autoResumed),"resumeRecordingV2","autoResumed is not a valid boolean value"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.resumeRecordingV2(t)})}wrapupV2(t){return q(this,void 0,void 0,function*(){var i,n;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"wrapupV2","ERROR_INTERACTION_ID_INVALID"),j.validateWrapUpV2Payload(t.data,"wrapupV2"),(null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.wrapupV2)?null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.contact.wrapupV2(t):void 0})}consultV2(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultV2","ERROR_INTERACTION_ID_INVALID"),j.validateConsultDataV2Payload(t.data,"consultV2"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultV2(t)})}consultEndV2(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultEndV2","ERROR_INTERACTION_ID_INVALID"),e.AssertUtils.check(j.validateBoolean(t.isConsult),"consultEndV2","isConsult is not a valid boolean value"),t.isSecondaryEpDnAgent&&e.AssertUtils.check(j.validateBoolean(t.isSecondaryEpDnAgent),"consultEndV2","isSecondaryEpDnAgent is not a valid boolean value"),t.queueId&&e.AssertUtils.check(j.validateUUID(t.queueId),"consultEndV2","queueId is not a valid UUID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultEndV2(t)})}consultConferenceV2(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultConferenceV2","ERROR_INTERACTION_ID_INVALID"),j.validateConsultConferenceDataV2Payload(t.data,"consultConferenceV2"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultConferenceV2(t)})}exitConference(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"exitConference","ERROR_INTERACTION_ID_INVALID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.exitConference(t)})}consultTransferV2(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"consultTransferV2","ERROR_INTERACTION_ID_INVALID"),j.validateTransferV2Payload(t.data,"consultTransferV2"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.consultTransferV2(t)})}blindTransferV2(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"blindTransferV2","ERROR_INTERACTION_ID_INVALID"),j.validateTransferV2Payload(t.data,"blindTransferV2"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.blindTransferV2(t)})}vteamTransferV2(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"vteamTransferV2","ERROR_INTERACTION_ID_INVALID"),j.validateTransferV2Payload(t.data,"vteamTransferV2"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.vteamTransferV2(t)})}buddyAgentsV2(e){return q(this,void 0,void 0,function*(){var t;if(this.checkService())return j.validateBuddyAgentsV2Payload(e.data,"buddyAgentsV2"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.contact.buddyAgentsV2(e)})}dropConferenceParticipant(t){return q(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"dropConferenceParticipant","ERROR_INTERACTION_ID_INVALID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.contact.dropConferenceParticipant(t)})}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const B=i(t,"[AgentContact JSAPI] =>"),H=i(B,"[AqmServiceEvents: Contact] => ");var z=r(322),W=r.n(z),J=r(497),Z=r.n(J),G=function(e,t,i,n){return new(i||(i=Promise))(function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const K={agentName:void 0,agentProfileID:void 0,agentSessionId:void 0,idleCode:void 0,teamId:void 0,teamName:void 0,dn:void 0,status:void 0,subStatus:void 0,idleCodes:void 0,wrapupCodes:void 0,outDialRegex:void 0,isOutboundEnabledForTenant:void 0,isOutboundEnabledForAgent:void 0,isEndCallEnabled:void 0,isEndConsultEnabled:void 0,allowConsultToQueue:void 0,isAdhocDialingEnabled:void 0,isAgentAvailableAfterOutdial:void 0,isCampaignManagementEnabled:void 0,agentPersonalStatsEnabled:void 0};class Y{stateChangeByChannelType(e){throw new Error("Method not implemented.")}checkService(){return this.serviceChecker.check(this.SERVICE)}emit(e,...t){this.emitter.emit(e,...t)}update(e){const t=Object.keys(e).reduce((t,i)=>{const n=e[i],r=this.latestData[i];return JSON.stringify(n)!==JSON.stringify(r)&&t.push({name:i,value:n,oldValue:r}),t},[]);t.length&&(t.forEach(e=>this.latestData[e.name]=e.value),this.emit("updated",t))}static getOutdialRegex(e){if(e&&e.dialPlanEntity){const t=e.dialPlanEntity.find(e=>"Any Format"===e.name);if(t)return t.regex}return""}constructor(e){this.emitter=W()(),this.listeners=new Set,this.teams=[],this.idleCodes={},this.latestData=Object.assign({},K),this.logger=e.logger,this.serviceChecker=e.serviceChecker}static findTeamName(e,t){const i=e.find(e=>e.teamId===t);return(null==i?void 0:i.teamName)||""}init(e){return G(this,void 0,void 0,function*(){e&&(this.SERVICE=e),this.checkService()&&(yield this.fetchLatestData(),this.subscribeSelfDataEvents(),this.logger.info("Inited"))})}cleanup(){this.unsubscribeSelfDataEvents(),this.removeAllEventListeners(),this.SERVICE=void 0,this.update(Object.assign({},K)),this.logger.info("Cleaned")}fetchLatestData(){return G(this,void 0,void 0,function*(){var e,t,i,n,r,s,o;const a=(null===(e=this.SERVICE)||void 0===e?void 0:e.conf.profile)?null===(t=this.SERVICE)||void 0===t?void 0:t.conf.profile:yield null===(i=this.SERVICE)||void 0===i?void 0:i.conf.fetchProfile();if(a){const{teams:e,agentName:t,agentProfileID:i,defaultDn:l,agentSubStatus:c,agentStatus:u,idleCodes:d,wrapupCodes:h,dialPlan:f,isOutboundEnabledForTenant:p,isOutboundEnabledForAgent:g,isAdhocDialingEnabled:v,isEndCallEnabled:m,isEndConsultEnabled:y,allowConsultToQueue:E,isAgentAvailableAfterOutdial:S,isCampaignManagementEnabled:b,agentPersonalStatsEnabled:w}=a;let{idleCode:k}=a;const I=l;let A=u,C=c;if(this.teams=e,null==d||d.forEach(e=>{this.idleCodes[e.id]={id:e.id,name:e.name}}),!k||!(null===(n=this.SERVICE)||void 0===n?void 0:n.conf.isReloginSuccess)){const e=yield null===(r=this.SERVICE)||void 0===r?void 0:r.aqm.agent.reload();(null==e?void 0:e.data)&&(k="0"!==e.data.auxCodeId&&e.data.auxCodeId?this.idleCodes[e.data.auxCodeId]:void 0,A=null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.status,C=null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.subStatus)}const O=Y.getOutdialRegex(f);this.update({agentName:t,agentProfileID:i,dn:I,status:A,subStatus:C,idleCode:k,idleCodes:d,wrapupCodes:h,outDialRegex:O,isOutboundEnabledForTenant:p,isOutboundEnabledForAgent:g,isAdhocDialingEnabled:v,isEndCallEnabled:m,isEndConsultEnabled:y,allowConsultToQueue:E,isAgentAvailableAfterOutdial:S,isCampaignManagementEnabled:b,agentPersonalStatsEnabled:w})}})}subscribeSelfDataEvents(){var e,t,i,n,r,s;if(this.checkService()){{const t=null===(e=this.SERVICE)||void 0===e?void 0:e.aqm.agent.eAgentReloginSuccess.listen(e=>{const{agentSessionId:t="",teamId:i="",dn:n="",status:r="",subStatus:s="",auxCodeId:o=""}=e.data,a=Y.findTeamName(this.teams,i);this.update({agentSessionId:t,teamId:i,teamName:a,dn:n,status:r,subStatus:s,idleCode:this.idleCodes[o]}),this.emit("eAgentReloginSuccess",e)});this.listeners.add(()=>null==t?void 0:t.stopListen())}{const e=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent.eAgentStationLoginSuccess.listen(({data:{agentSessionId:e="",teamId:t="",status:i="",subStatus:n="",auxCodeId:r=""}})=>{const s=Y.findTeamName(this.teams,t);this.update({agentSessionId:e,teamId:t,teamName:s,status:i,subStatus:n,idleCode:this.idleCodes[r]})});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.agent.eAgentStateChangeSuccess.listen(({data:{agentSessionId:e="",status:t="",subStatus:i="",auxCodeId:n=""}})=>{var r;const s=this.idleCodes?null===(r=this.idleCodes[n])||void 0===r?void 0:r.name:"";this.update({agentSessionId:e,status:t,subStatus:i,idleCode:{id:n,name:s}})});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.agent.eAgentDNRegistered.listen(({data:{dn:e=""}})=>{this.update({dn:e})});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(r=this.SERVICE)||void 0===r?void 0:r.aqm.agent.eAgentChannelReloginSuccess.listen(e=>{this.emit("eAgentChannelReloginSuccess",e)});this.listeners.add(()=>null==e?void 0:e.stopListen())}{const e=null===(s=this.SERVICE)||void 0===s?void 0:s.aqm.agent.eAgentChannelStateChanged.listen(e=>{this.emit("eAgentChannelStateChanged",e)});this.listeners.add(()=>null==e?void 0:e.stopListen())}}}unsubscribeSelfDataEvents(){this.listeners.forEach(e=>e()),this.listeners.clear()}stateChange(t){return G(this,void 0,void 0,function*(){var i,n,r;if(this.checkService())return e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.state),"stateChange","state is null or empty"),e.AssertUtils.check("available"===(null===(i=t.state)||void 0===i?void 0:i.toLowerCase())||"idle"===(null===(n=t.state)||void 0===n?void 0:n.toLowerCase()),"stateChange","state is not Available or Idle"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.auxCodeIdArray),"stateChange","auxCodeIdArray is null or empty"),null===(r=this.SERVICE)||void 0===r?void 0:r.aqm.agent.stateChange({data:t})})}stateChangeV2(i){return G(this,void 0,void 0,function*(){var n;if(this.checkService())return e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(i.state),"stateChange","state is null or empty"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(i.auxCodeId),"stateChange","auxCodeId is null or empty"),e.AssertUtils.check(j.validateStateChannelType(i.channelType),"stateChange","channelType is null or empty or invalid"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.agent.stateChangeV2({data:i});t.info("stateChangeV2 - Service is not available")})}mockOutdialAniList(){return G(this,void 0,void 0,function*(){var e,t;if(this.checkService())return(null===(e=this.SERVICE)||void 0===e?void 0:e.aqm.agent.mockOutdialAniList)&&(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent.mockOutdialAniList())})}fetchAddressBooks(){return G(this,void 0,void 0,function*(){var e,t;if(this.checkService())return(null===(e=this.SERVICE)||void 0===e?void 0:e.aqm.agent.fetchAddressBooks)&&(null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.agent.fetchAddressBooks())})}changeAgentState(t,i){return G(this,void 0,void 0,function*(){var n;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t),"changeAgentState","orgId is not a valid UUID"),j.validateChangeAgentStateType(i,"changeAgentState"),null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.supervisor.changeAgentState({orgId:t,data:i})})}fetchAgentIdleCodes(t,i){return G(this,void 0,void 0,function*(){var n;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t),"fetchAgentIdleCodes","orgId is not a valid UUID"),e.AssertUtils.check(j.validateUUID(i),"fetchAgentIdleCodes","agentId is not a valid UUID"),yield null===(n=this.SERVICE)||void 0===n?void 0:n.abs.fetchAgentIdleCodes({orgId:t,agentId:i})})}fetchOrganizationIdleCodes(t){return G(this,void 0,void 0,function*(){var i;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t),"fetchOrganizationIdleCodes","orgId is not a valid UUID"),yield null===(i=this.SERVICE)||void 0===i?void 0:i.abs.fetchIdleCodes({orgId:t,accessType:"ALL"})})}addEventListener(e,t){this.checkService()&&this.emitter.on(e,t)}removeEventListener(e,t){this.checkService()&&this.emitter.off(e,t)}removeAllEventListeners(){Z()(this.emitter)}}const X=i(t,"[AgentInfo JSAPI] =>");var Q=function(e,t,i,n){return new(i||(i=Promise))(function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const ee=1e3/30;class te{waitUntil(e){return Q(this,void 0,void 0,function*(){"function"==typeof e&&(yield new Promise(e=>setTimeout(e,ee)),!e()&&(yield this.waitUntil(e)))})}constructor(e){this.initEventType={},this.emitter=W()(),this.logger=e.logger,this.agentxSERVICE=e.SERVICE}checkService(e){return Q(this,void 0,void 0,function*(){e?(e.isInited||(this.logger.warn("SERVICE is not inited. Awaiting it's initAgentxServices(...)..."),yield this.waitUntil(()=>e.isInited)),this.logger.info("SERVICE is inited. Continuing..."),this.emit("inited")):this.logger.error("SERVICE is not defiend...")})}emit(e,...t){this.emitter.emit(e,...t)}init(e){return Q(this,void 0,void 0,function*(){this.agentxSERVICE?yield this.checkService(this.agentxSERVICE):this.logger.error("SERVICE is not defined..."),this.initEventType.widgetName=e.widgetName,this.initEventType.widgetProvider=e.widgetProvider,this.publishEvent("agentx-js-sdk-init")})}registerCrmConnector(e){if(window.self!==window.top){this.initEventType.crmPlatform=e.crmPlatform,this.initEventType.crmConnectorProvider=e.crmConnectorProvider||"Cisco",t.info(`CRm Connector registered through JS SDK... [crmPlatform: ${this.initEventType.crmPlatform}, widgetProvider: ${this.initEventType.crmConnectorProvider}]  `);const i=document.referrer;t.info("This Desktop is loaded inside an iframe.",i),this.publishEvent("agentx-js-sdk-register-crm-connector")}else t.warn("This Desktop is not loaded inside an iframe. CRM Connector is not registered.")}publishEvent(e){const{crmPlatform:i,crmConnectorProvider:n,widgetName:r,widgetProvider:s}=this.initEventType,o=Object.assign({},...Object.entries(this.initEventType).map(([e,t])=>t?{[e]:t}:{}));this.logger.info("initEvent",o),t.info(`Publishing js sdk init ${e} event : [widgetName: ${r}, widgetProvider: ${s}, crmPlatform: ${i}, crmConnectorProvider: ${n}]`),this.agentxSERVICE&&this.agentxSERVICE.isInited&&this.agentxSERVICE.webexMetrics&&(t.info(`tracking behavioral for ${e} event `),this.agentxSERVICE.webexMetrics.trackBehavioralEvent(e,Object.assign({},o)))}cleanup(){this.agentxSERVICE=void 0,this.emit("cleaned"),this.logger.info("Cleaned")}get clientLocale(){return void 0!==window.navigator.languages?window.navigator.languages[0]:window.navigator.language}addEventListener(e,t){this.emitter.on(e,t)}removeEventListener(e,t){this.emitter.off(e,t)}}const ie=i(t,"[Config JSAPI] =>");var ne=function(e,t,i,n){return new(i||(i=Promise))(function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};class re{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.dialer,aqmServiceEntityString:"SERVICE.aqm.dialer"}),this.logger.info("Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}startOutdial(e){return ne(this,void 0,void 0,function*(){var t;if(this.checkService())return j.validateDialerTasks(e.data,"startOutdial"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.startOutdial(e)})}previewCampaignAccept(e){return ne(this,void 0,void 0,function*(){var t;if(this.checkService())return j.validatePreviewCampaignPayload(e.data,"previewCampaignAccept"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.acceptPreviewContact(e)})}previewCampaignSkip(e){return ne(this,void 0,void 0,function*(){var t;if(this.checkService())return j.validatePreviewCampaignPayload(e.data,"previewCampaignSkip"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.skipPreviewContact(e)})}removePreviewContact(e){return ne(this,void 0,void 0,function*(){var t;if(this.checkService())return j.validatePreviewCampaignPayload(e.data,"removePreviewContact"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.dialer.removePreviewContact(e)})}updateCadVariables(t){return ne(this,void 0,void 0,function*(){var i,n,r,s,o;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"updateCadVariables","interactionId is not valid UUID"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(null===(n=null===(i=t.data)||void 0===i?void 0:i.attributes)||void 0===n?void 0:n.key),"updateCadVariables","attributes.key is not valid"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(null===(s=null===(r=t.data)||void 0===r?void 0:r.attributes)||void 0===s?void 0:s.value),"updateCadVariables","attributes.value is not valid"),t.secureCad&&t.secureCad.forEach(t=>{e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t),"updateCadVariables","secureCad is not valid")}),t.keyId&&e.AssertUtils.check(j.validateUUID(t.keyId),"updateCadVariables","keyId is not valid UUID"),t.keyVersion&&e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.keyVersion),"updateCadVariables","keyVersion is not valid"),null===(o=this.SERVICE)||void 0===o?void 0:o.aqm.dialer.updateCadVariables(t)})}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const se=i(t,"[Dialer JSAPI] =>"),oe=i(se,"[AqmServiceEvents: Dialer] =>");class ae{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("Inited")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}createInstance(t){return e.I18N.createService(t)}createMixin(t){return e.I18N.createMixin(t)}get DEFAULT_INIT_OPTIONS(){var e;if(this.checkService())return null===(e=this.SERVICE)||void 0===e?void 0:e.i18n.DEFAULT_INIT_OPTIONS}getMergedInitOptions(...t){return e.I18N.mergeServiceInitOptions(...t)}}const le=i(t,"[I18N JSAPI] =>");class ce{constructor(e){this.clientLoggers=new Map,this.logger=e.logger}createLogger(t){const i=(0,e.createLogger)(t);return this.clientLoggers.set(t,i),this.logger.info(`Client logger created: "${t}"`),i}cleanupLogs(t){this.clientLoggers.has(t)&&e.Logger.POOL.cleanupPrefixedLogs(t)}browserDownloadLogsJson(t){this.clientLoggers.has(t)&&e.Logger.POOL.browserDownloadPrefixedLogsJson(t)}browserDownloadLogsText(t){this.clientLoggers.has(t)&&e.Logger.POOL.browserDownloadPrefixedLogsText(t)}getLogsCollection(t){if(this.clientLoggers.has(t))return e.Logger.POOL.getPrefixedLogsCollection(t)}getLogsJsonUrl(t){if(this.clientLoggers.has(t))return e.Logger.POOL.getPrefixedLogsJsonUrl(t)}getLogsTextUrl(t){if(this.clientLoggers.has(t))return e.Logger.POOL.getPrefixedLogsTextUrl(t)}}const ue=i(t,"[Logger JSAPI] =>");var de=function(e,t,i,n){return new(i||(i=Promise))(function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const he=()=>{};function fe(e){if(e)return e.popover}class pe{constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.serviceChecker.check(this.SERVICE)&&(fe(this.SERVICE)?this.logger.info("Inited"):this.logger.info("Popover shim not available — Desktop.popover requires the iframe shell context (host-rendered widgets must use <md-popover> directly)."))}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}isActive(){const e=fe(this.SERVICE);return!!e&&e.isActive()}open(e){return de(this,void 0,void 0,function*(){const t=fe(this.SERVICE);if(t){if((null==e?void 0:e.comp)&&e.script)return t.open(e);this.logger.error("open() requires both `comp` and `script`")}else this.logger.warn("open() ignored — popover shim not available in this context")})}close(){return de(this,void 0,void 0,function*(){const e=fe(this.SERVICE);e?yield e.close():this.logger.warn("close() ignored — popover shim not available in this context")})}resize(e){return de(this,void 0,void 0,function*(){const t=fe(this.SERVICE);t?yield t.resize(e):this.logger.warn("resize() ignored — popover shim not available in this context")})}onOpen(e){const t=fe(this.SERVICE);return t?t.onOpen(e):(this.logger.warn("onOpen() ignored — popover shim not available in this context"),he)}onClose(e){const t=fe(this.SERVICE);return t?t.onClose(e):(this.logger.warn("onClose() ignored — popover shim not available in this context"),he)}}const ge=i(t,"[Popover JSAPI] =>");var ve=function(e,t,i,n){return new(i||(i=Promise))(function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};class me{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("[JSAPI] ScheduleCallbackJsApi Initialized")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}fetchByAssigneeAgentId(e){return ve(this,void 0,void 0,function*(){var t;if(!this.checkService())return;const{page:i,assigneeAgent:n,sortBy:r,sortOrder:s}=e.data;return j.validateFetchByAssigneeAgentIdType(i,n,"fetchByAssigneeAgentId"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.scheduleCallback.fetchByAssigneeAgentId(i,n,r,s)})}fetchByCallbackPhoneNumber(e){return ve(this,void 0,void 0,function*(){var t;if(!this.checkService())return;const{page:i,phoneNumber:n}=e.data;return j.validatefetchByCallbackPhoneNumberType(i,n,"fetchByCallbackPhoneNumber"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.scheduleCallback.fetchByCallbackPhoneNumber(i,n)})}createScheduleCallback(e){return ve(this,void 0,void 0,function*(){var t;if(this.checkService())return j.validateCreateOrUpdateScheduleCallbackType(e.data,"createScheduleCallback"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.scheduleCallback.save(e.data)})}updateCallBackDetails(e){return ve(this,void 0,void 0,function*(){var t;if(this.checkService())return j.validateCreateOrUpdateScheduleCallbackType(e.data,"updateCallBackDetails",!0),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.scheduleCallback.updateCallBackDetails(e.data)})}deleteScheduleCallback(t){return ve(this,void 0,void 0,function*(){var i;if(!this.checkService())return;const{id:n}=t.data;return e.AssertUtils.check(j.validateUUID(n),"deleteScheduleCallback","id is not a valid UUID"),null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.scheduleCallback.deleteScheduleCallback(n)})}getValidCampaignTimes(e){return ve(this,void 0,void 0,function*(){var t;if(!this.checkService())return;const{campaignId:i,agentId:n,interactionId:r}=e.data;return j.validateGetValidCampaignTimesType(i,n,r,"getValidCampaignTimes"),null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.scheduleCallback.getValidCampaignTimes(i,n,r)})}}const ye=i(t,"[SCHEDULE CALLBACK JSAPI] =>");class Ee{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.screenpop,aqmServiceEntityString:"SERVICE.aqm.screenpop"}),this.logger.info("Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const Se=i(t,"[ScreenPop JSAPI] =>"),be=i(Se,"[AqmServiceEvents: ScreenPop] =>");class we{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("Inited")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}listenKeyPress(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.event.listenKeyPress(...e))}listenKeyConflict(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.event.listenKeyConflict(...e))}listenConflictResolved(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.event.listenConflictResolved(...e))}register(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.register(...e))}unregisterKeys(...e){var t;this.checkService()&&(null===(t=this.SERVICE)||void 0===t||t.shortcut.unregisterKeys(...e))}getRegisteredKeys(){var e;if(this.checkService())return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.getRegisteredKeys()}get DEFAULT_SHORTCUT_KEYS(){var e;return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.DEFAULT_SHORTCUT_KEYS}get MODIFIERS(){var e;return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.MODIFIERS}get REGISTERED_KEYS(){var e;return null===(e=this.SERVICE)||void 0===e?void 0:e.shortcut.REGISTERED_KEYS}}const ke=i(t,"[ShortcutKey JSAPI] =>");var Ie=function(e,t,i,n){return new(i||(i=Promise))(function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const Ae=1e3/30;class Ce{waitUntil(e){return Ie(this,void 0,void 0,function*(){"function"==typeof e&&(yield new Promise(e=>setTimeout(e,Ae)),!e()&&(yield this.waitUntil(e)))})}checkService(){return Ie(this,void 0,void 0,function*(){var e,t,i,n,r;window.wxcc&&(null===(e=window.wxcc)||void 0===e?void 0:e.rtdwc)?((null===(i=null===(t=window.wxcc)||void 0===t?void 0:t.rtdwc)||void 0===i?void 0:i.error)&&(this.logger.error("RTDWC initialization failed. Awaiting Websocket connection to establish",null===(r=null===(n=window.wxcc)||void 0===n?void 0:n.rtdwc)||void 0===r?void 0:r.error),yield this.waitUntil(()=>{var e,t;return!(null===(t=null===(e=window.wxcc)||void 0===e?void 0:e.rtdwc)||void 0===t?void 0:t.error)})),this.logger.info("Websocket connection established successfully. Continue to subscribe...")):this.logger.error("issue in loading rtdwc")})}constructor(e){this.emitter=W()(),this.logger=e.logger}init(){return Ie(this,void 0,void 0,function*(){yield this.checkService(),this.logger.info("rtdwc initialized")})}subscribe(e){return Ie(this,arguments,void 0,function*({datasetName:e,update:t,error:i}){var n,r;return yield this.checkService(),null===(r=null===(n=window.wxcc)||void 0===n?void 0:n.rtdwc)||void 0===r?void 0:r.subscribe({datasetName:e,update:t,error:i})})}getConnectionState(){return Ie(this,void 0,void 0,function*(){var e,t,i;return yield this.checkService(),null===(i=null===(t=null===(e=window.wxcc)||void 0===e?void 0:e.rtdwc)||void 0===t?void 0:t.getConnectionState)||void 0===i?void 0:i.call(t)})}onConnectionStatusChange(e){return Ie(this,void 0,void 0,function*(){var t,i,n;return yield this.checkService(),null===(n=null===(i=null===(t=window.wxcc)||void 0===t?void 0:t.rtdwc)||void 0===i?void 0:i.onConnectionStatusChange)||void 0===n?void 0:n.call(i,e)})}}const Oe=i(t,"[RTDWC JSAPI] =>");var Te=function(e,t,i,n){return new(i||(i=Promise))(function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const Re="interactionId is not valid UUID";class Ne{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.supervisor,aqmServiceEntityString:"SERVICE.aqm.supervisor"}),this.logger.info("[JSAPI] Monitoring Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}startMonitoring(e){return Te(this,void 0,void 0,function*(){var t,i;if(this.checkService())return j.validateMonitoringRequest(e.data,"startMonitoring"),null===(i=null===(t=this.SERVICE)||void 0===t?void 0:t.aqm.supervisor)||void 0===i?void 0:i.startMonitoring(e)})}endMonitoring(t){return Te(this,void 0,void 0,function*(){var i,n;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"endMonitoring",Re),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.supervisor)||void 0===n?void 0:n.endMonitoring(t)})}holdMonitoring(t){return Te(this,void 0,void 0,function*(){var i,n;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"holdMonitoring",Re),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.supervisor)||void 0===n?void 0:n.holdMonitoring(t)})}unHoldMonitoring(t){return Te(this,void 0,void 0,function*(){var i,n;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"unHoldMonitoring",Re),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.supervisor)||void 0===n?void 0:n.unHoldMonitoring(t)})}bargeIn(t){return Te(this,void 0,void 0,function*(){var i,n;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.interactionId),"bargeIn",Re),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.supervisor)||void 0===n?void 0:n.bargeIn(t)})}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const Le=i(t,"[Call Monitoring JSAPI] =>"),xe=i(Le,"[AqmServiceEvents: Call Monitoring] =>");class De{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("Inited")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}trackBehavioralEvent(...e){var i;if(this.checkService())try{t.info("[webexMetrics Internal JSAPI] => event=trackBehavioralEvent for",e),null===(i=this.SERVICE)||void 0===i||i.webexMetrics.trackBehavioralEvent(...e)}catch(e){t.error("[webexMetrics Internal JSAPI] => event=trackBehavioralEvent Error",e)}}}const Ue=i(t,"[webexMetrics Internal JSAPI] =>");var Pe=function(e,t,i,n){return new(i||(i=Promise))(function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};class _e{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.agent,aqmServiceEntityString:"SERVICE.aqm.agent"}),this.logger.info("[JSAPI] Logout Inited"))}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned")}desktopLogout(t){return Pe(this,void 0,void 0,function*(){var i,n;if(!this.checkService())return;const r=yield Ke.actions.getTaskMap();if(0!==(null==r?void 0:r.size))throw new Error("You cannot sign out now because you have active conversations. Complete them and try again.");return void 0!==t.data.logoutReason&&e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.data.logoutReason),"desktopLogout","logoutReason is null or empty"),void 0!==t.data.logoutReason&&e.AssertUtils.check("user requested logout"===t.data.logoutReason.toLowerCase()||"inactivity Logout"===t.data.logoutReason.toLowerCase(),"desktopLogout","logoutReason should be either 'User requested logout' or 'Inactivity Logout'"),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.aqm.agent)||void 0===n?void 0:n.logout(t)})}signoutAgent(i){return Pe(this,void 0,void 0,function*(){var n,r;if(this.checkService())try{return t.info("[App:TPW] event=signoutAgentBySupervisor for agent ",i.data.agentId),e.AssertUtils.check(j.validateUUID(i.orgId),"signoutAgent","orgId is not a valid UUID"),e.AssertUtils.check(j.validateUUID(i.data.agentId),"signoutAgent","agentId is not a valid UUID"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(i.data.logoutReason),"signoutAgent","logoutReason is null or empty"),null===(r=null===(n=this.SERVICE)||void 0===n?void 0:n.aqm.supervisor)||void 0===r?void 0:r.signoutAgent(i)}catch(e){return void t.error("[App:TPW] event=signoutAgentBySupervisorFailed for agent ",i.data.agentId,e)}})}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const Ve=i(t,"[Station Logout JSAPI] =>"),Me=i(Ve,"[AqmServiceEvents: Call Monitoring] =>");class je{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){var t,i;e&&(this.SERVICE=e),this.checkService()?(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.aqm.aiAssistant,aqmServiceEntityString:"SERVICE.aqm.aiAssistant"}),this.logger.info("AiAssistantJsApi inited.")):null===(i=(t=this.logger).warn)||void 0===i||i.call(t,"Service check failed")}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned AiAssistantJsApi.")}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const qe=i(t,"[AI Assistant JSAPI] =>"),Fe=i(qe,"[AqmServiceEvents: AiAssistant] =>");class $e{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.aqmEvents=e.aqmEvents,this.serviceChecker=e.serviceChecker}init(e){var t,i;e&&(this.SERVICE=e),this.checkService()?(this.aqmEvents.init({aqmServiceEntity:this.SERVICE.dataNotifs.aiAssistant,aqmServiceEntityString:"SERVICE.dataNotifs.aiAssistant"}),this.logger.info("AiAssistantJsApi inited.")):null===(i=(t=this.logger).warn)||void 0===i||i.call(t,"Service check failed")}cleanup(){this.aqmEvents.cleanup(),this.SERVICE=void 0,this.logger.info("Cleaned AiAssistantJsApi.")}addEventListener(e,t){this.checkService()&&this.aqmEvents.addEventListener(e,t)}addOnceEventListener(e,t){this.checkService()&&this.aqmEvents.addOnceEventListener(e,t)}removeEventListener(e,t){this.aqmEvents.removeEventListener(e,t)}removeOnceEventListener(e,t){this.aqmEvents.removeOnceEventListener(e,t)}removeAllEventListeners(){this.aqmEvents.removeAllEventListeners()}}const Be=i(t,"[AI Assistant JSAPI] =>"),He=i(Be,"[AqmServiceEvents: AiAssistant] =>");var ze=function(e,t,i,n){return new(i||(i=Promise))(function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};class We{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("[JSAPI] Initialized")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}fetchTasks(t){return ze(this,void 0,void 0,function*(){var i,n;if(this.checkService())return e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.startTime),"fetchTasks","startTime is null or empty"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.endTime),"fetchTasks","endTime is null or empty"),e.AssertUtils.check(j.validatePropValueNotNullAndEmpty(t.pageNumber),"fetchTasks","pageNumber is null or empty"),e.AssertUtils.check(j.validateNumber(t.startTime),"fetchTasks","startTime is not a valid time"),e.AssertUtils.check(j.validateNumber(t.endTime),"fetchTasks","endTime is not a valid time"),e.AssertUtils.check(j.validateNumber(t.pageNumber),"fetchTasks","pageNumber is not a valid number"),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.qmw)||void 0===n?void 0:n.fetchTasks(t)})}fetchCapture(t){return ze(this,void 0,void 0,function*(){var i,n;if(this.checkService())return e.AssertUtils.check(j.validateUUID(t.taskId),"fetchCapture","taskId is not a valid UUID"),null===(n=null===(i=this.SERVICE)||void 0===i?void 0:i.qmw)||void 0===n?void 0:n.fetchCapture(t)})}}const Je=i(t,"[PI JSAPI] =>");class Ze{checkService(){return this.serviceChecker.check(this.SERVICE)}constructor(e){this.logger=e.logger,this.serviceChecker=e.serviceChecker}init(e){e&&(this.SERVICE=e),this.checkService()&&this.logger.info("[JSAPI] AgentConfigJsApi Initialized")}cleanup(){this.SERVICE=void 0,this.logger.info("Cleaned")}fetchPaginatedAuxCodes(e){return t=this,i=void 0,r=function*(){var t,i;if(this.checkService())return j.validateAuxCodePayload(e,"fetchPaginatedAuxCodes"),yield null===(i=null===(t=this.SERVICE)||void 0===t?void 0:t.abs)||void 0===i?void 0:i.fetchPaginatedAuxCodes(e)},new((n=void 0)||(n=Promise))(function(e,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n(function(e){e(i)})).then(o,a)}l((r=r.apply(t,i||[])).next())});var t,i,n,r}}const Ge=i(t,"[AGENT CONFIG JSAPI] =>"),Ke=(()=>{AGENTX_SERVICE?t.info('Found global "AGENTX_SERVICE"!'):t.error('Missed global "AGENTX_SERVICE"...');const e=(i=AGENTX_SERVICE,new te({logger:ie,SERVICE:i}));var i;const n=new ce({logger:ue}),r=new we({logger:ke,serviceChecker:o({logger:ke})}),s=new T({logger:R,serviceChecker:o({logger:R})}),a=new Y({logger:X,serviceChecker:o({logger:X})}),l=new $({logger:B,serviceChecker:o({logger:B}),aqmEvents:L({logger:H})}),c=new re({logger:se,aqmEvents:L({logger:oe}),serviceChecker:o({logger:se})}),u=new Ne({logger:Le,aqmEvents:L({logger:xe}),serviceChecker:o({logger:Le})}),d=new Ee({logger:Se,aqmEvents:L({logger:be}),serviceChecker:o({logger:Se})}),h=new _e({logger:Ve,aqmEvents:L({logger:Me}),serviceChecker:o({logger:Ve})}),f=new je({logger:qe,aqmEvents:L({logger:Fe}),serviceChecker:o({logger:qe})}),p=new $e({logger:Be,aqmEvents:L({logger:He}),serviceChecker:o({logger:Be})}),g=new me({logger:ye,serviceChecker:o({logger:ye})}),v=new ae({logger:le,serviceChecker:o({logger:le})}),m=new Ce({logger:Oe});m.init();const y=new We({logger:Je,serviceChecker:o({logger:Je})}),E=new Ze({logger:Ge,serviceChecker:o({logger:Ge})}),S=new De({logger:Ue,serviceChecker:o({logger:Ue})}),b=new pe({logger:ge,serviceChecker:o({logger:ge})});return e.addEventListener("inited",()=>{l.init(AGENTX_SERVICE),a.init(AGENTX_SERVICE),c.init(AGENTX_SERVICE),u.init(AGENTX_SERVICE),d.init(AGENTX_SERVICE),h.init(AGENTX_SERVICE),f.init(AGENTX_SERVICE),p.init(AGENTX_SERVICE),g.init(AGENTX_SERVICE),y.init(AGENTX_SERVICE),r.init(AGENTX_SERVICE),s.init(AGENTX_SERVICE),v.init(AGENTX_SERVICE),E.init(AGENTX_SERVICE),S.init(AGENTX_SERVICE),b.init(AGENTX_SERVICE)}),e.addEventListener("cleaned",()=>{l.cleanup(),a.cleanup(),c.cleanup(),u.cleanup(),d.cleanup(),h.cleanup(),f.cleanup(),p.cleanup(),g.cleanup(),y.cleanup(),r.cleanup(),v.cleanup(),s.cleanup(),E.cleanup(),S.cleanup(),b.cleanup()}),{config:e,logger:n,monitoring:u,shortcutKey:r,actions:s,agentContact:l,agentStateInfo:a,dialer:c,screenpop:d,aiAssistant:f,dataNotifsAiAssistant:p,i18n:v,rtdwc:m,postInteractions:y,logout:h,agentConfigJsApi:E,webexMetricsInternal:S,scheduleCallback:g,popover:b}})()})(),s})());