webcom
Version:
Webcom library
19 lines • 261 kB
JavaScript
/*!
* Webcom. Build realtime apps. Share and sync data instantly between your clients
*
* Module name: Webcom
* Version: 3.10.1
* Created: 2025-11-07T12:56:29.976Z
*
* Copyright (C) <2015-2025> Orange
*
* This software is confidential and proprietary information of Orange.
* You shall not disclose such Confidential Information and shall use it only in
* accordance with the terms of the agreement you entered into.
* Unauthorized copying of this file, via any medium is strictly prohibited.
*
* If you are Orange employee you shall use this software in accordance with
* the Orange Source Charter (http://opensource.itn.ftgroup/index.php/Orange_Source_Charter)
*/(()=>{var e={79:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i},e.exports.__esModule=!0,e.exports.default=e.exports},171:(e,t,n)=>{"use strict";n.d(t,{J:()=>i});var i=function(){if("undefined"!=typeof globalThis)return globalThis;return global}()},579:(e,t,n)=>{var i=n(3738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(i(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},887:(e,t,n)=>{var i=n(6993),r=n(1791);e.exports=function(e,t,n,o,a){return new r(i().w(e,t,n,o),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},1132:(e,t,n)=>{var i=n(5901),r=n(9291),o=n(7122),a=n(1869);e.exports=function(e){return i(e)||r(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},1133:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>P,MX:()=>p,d1:()=>R,h:()=>T});var i=n(1132),r=n.n(i),o=n(7383),a=n.n(o),s=n(4579),u=n.n(s),c=n(5715),l=n.n(c),h=n(9224),d=n(9170),f=n(8203),v=-1,p=" ",g=!1,y=15,_=[],m={},k={},b={},w="_leaf_";function C(e){return e?e.split("."):[]}function S(e){return{disabledDepth:E(e,b),enabledDepth:E(e,k)}}function D(e,t,n,i){for(var r=0;r<e.length;){var o=e[r++];t.hasOwnProperty(o)||(t[o]={}),t=t[o]}i&&Object.keys(t).forEach(function(e){return delete t[e]}),t[w]=n}function A(e,t){for(var n=0;n<e.length;){var i=e[n++];if(!t.hasOwnProperty(i))return;t=t[i]}delete t[w]}function E(e,t){var n=-1,i=0;do{t.hasOwnProperty(w)&&(n=i)}while(i<e.length&&(t=t[e[i++]]));return n}function O(e,t){Object.entries(e||{}).forEach(function(e){var n=l()(e,2),i=n[0],r=n[1];i===w?t(r):O(r,t)})}function x(e,t){for(var n=[],i=0;t&&i<e.length;)t=t[e[i++]];return O(t,function(e){return n.push(e)}),n}function N(e){g=e,_.forEach(function(e){return e.displayTimestamp=g})}var R="LogManager",P=function(){function e(){a()(this,e)}return u()(e,null,[{key:"enable",value:function(t){(0,f.ar)([R,".enable"],arguments,(0,f.lq)(f.Yj));var n=C(t),i=S(n),r=i.enabledDepth,o=i.disabledDepth;r<=o&&(o<0&&e.disable(),D(n,k,!0,!0),A(n,b),x(n,m).forEach(function(e){return e.setLevel(I)}))}},{key:"disable",value:function(e){(0,f.ar)([R,".disable"],arguments,(0,f.lq)(f.Yj));var t=C(e),n=S(t),i=n.enabledDepth;n.disabledDepth<=i&&(D(t,b,!0,!0),A(t,k),x(t,m).forEach(function(e){return e.setLevel(v)}))}},{key:"showTimestamp",value:function(){(0,f.ar)([R,".showTimestamp"],arguments),N(!0)}},{key:"hideTimestamp",value:function(){(0,f.ar)([R,".hideTimestamp"],arguments),N(!1)}},{key:"setPrefixWidth",value:function(e){(0,f.ar)([R,".setPrefixWidth"],arguments,f.vM),e<0?e=0:e>p.length&&(e=p.length),y=e,_.forEach(function(e){return e.setPrefixWidth(y)})}},{key:"level",get:function(){return I},set:function(e){(0,f.ar)([R,".level"],arguments,f.vM),e>v&&e!==I&&(_.forEach(function(t){return t.updateLevel(e)}),I=e)}},{key:"LOG",get:function(){return 4}},{key:"INFO",get:function(){return 3}},{key:"WARN",get:function(){return 2}},{key:"ERROR",get:function(){return 1}},{key:"NONE",get:function(){return 0}},{key:"debugOnCallback",value:function(e){var t=e&&e.toUpperCase();return function(e,n){return d.k.log("********** UPDATE ".concat(t||e.ref().pathString()," **********"),e.toString(),n?"[<<".concat(n,"]"):"")}}},{key:"debugOnCompletionCallback",value:function(e,t){var n=e&&e.toUpperCase();return function(e){return e?d.k.log("********** REVOKED ".concat(n," **********"),e):d.k.log("********** COMPLETED ".concat(n," **********")),t}}},{key:"debugOnCallbackWithCancel",value:function(t){var n=t&&t.toUpperCase();return[e.debugOnCallback(t),function(e){return d.k.log.apply(d.k,["********** COMPLETE ".concat(n," **********")].concat(r()(e?["FAILED:",e.code,e.message]:["cancelled"])))}]}}])}();function T(e,t){var n=C(e),i=new h.A(n,t||n[n.length-1],g,y);return function(e){var t=e.fqdn;D(t,m,e),_.push(e);var n=S(t),i=n.disabledDepth,r=n.enabledDepth;e.setLevel(r>=i?I:v)}(i),i}var I=P.INFO},1156:e=>{e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(i=o.call(n)).done)&&(s.push(i.value),s.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports},1791:(e,t,n)=>{var i=n(5172),r=n(5546);e.exports=function e(t,n){function o(e,r,a,s){try{var u=t[e](r),c=u.value;return c instanceof i?n.resolve(c.v).then(function(e){o("next",e,a,s)},function(e){o("throw",e,a,s)}):n.resolve(c).then(function(e){u.value=e,a(u)},function(e){return o("throw",e,a,s)})}catch(e){s(e)}}var a;this.next||(r(e.prototype),r(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),r(this,"_invoke",function(e,t,i){function r(){return new n(function(t,n){o(e,i,t,n)})}return a=a?a.then(r,r):r()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},1869:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},2395:(e,t,n)=>{var i=n(9552);function r(){return e.exports=r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=i(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},e.exports.__esModule=!0,e.exports.default=e.exports,r.apply(null,arguments)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},2475:e=>{e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},2987:e=>{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},3072:e=>{function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},3412:(e,t,n)=>{"use strict";n.d(t,{Et:()=>u,Gv:()=>l,Kg:()=>s,Lm:()=>a,Tn:()=>c,yi:()=>h});var i=n(3738),r=n.n(i),o=n(5296);function a(e){return"boolean"==typeof e}function s(e){return"string"==typeof e}function u(e){return"number"==typeof e}function c(e){return"function"==typeof e}function l(e){return"object"===r()(e)}function h(){return o.Ls&&(window.navigator.userAgent.match(/CriOS|Twitter for iPhone|FBAN\/FBIOS|Windows Phone/)||window.navigator.standalone)}},3693:(e,t,n)=>{var i=n(7736);e.exports=function(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},3738:e=>{function t(n){return e.exports=t="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},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4373:e=>{e.exports=function(e){var t=Object(e),n=[];for(var i in t)n.unshift(i);return function e(){for(;n.length;)if((i=n.pop())in t)return e.value=i,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},4579:(e,t,n)=>{var i=n(7736);function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},4633:(e,t,n)=>{var i=n(5172),r=n(6993),o=n(5869),a=n(887),s=n(1791),u=n(4373),c=n(579);function l(){"use strict";var t=r(),n=t.m(l),h=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function d(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))}var f={throw:1,return:2,break:3,continue:3};function v(e){var t,n;return function(i){t||(t={stop:function(){return n(i.a,2)},catch:function(){return i.v},abrupt:function(e,t){return n(i.a,f[e],t)},delegateYield:function(e,r,o){return t.resultName=r,n(i.d,c(e),o)},finish:function(e){return n(i.f,e)}},n=function(e,n,r){i.p=t.prev,i.n=t.next;try{return e(n,r)}finally{t.next=i.n}}),t.resultName&&(t[t.resultName]=i.v,t.resultName=void 0),t.sent=i.v,t.next=i.n;try{return e.call(this,t)}finally{i.p=t.prev,i.n=t.next}}}return(e.exports=l=function(){return{wrap:function(e,n,i,r){return t.w(v(e),n,i,r&&r.reverse())},isGeneratorFunction:d,mark:t.m,awrap:function(e,t){return new i(e,t)},AsyncIterator:s,async:function(e,t,n,i,r){return(d(t)?a:o)(v(e),t,n,i,r)},keys:u,values:c}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports},4756:(e,t,n)=>{var i=n(4633)();e.exports=i;try{regeneratorRuntime=i}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},5172:e=>{e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},5280:(e,t,n)=>{"use strict";n.d(t,{DJ:()=>u,vG:()=>d,wg:()=>a,yb:()=>l});var i=n(171),r=n(5854),o="setTimeout",a=r.y[o];a||(a=i.J[o]),(0,r.aZ)(o,function(){return a},function(e){return a=e}),i.J[o]||(i.J[o]=a),i.J.setImmediate||(i.J.setImmediate=a);var s="clearTimeout",u=r.y[s];u||(u=i.J[s]),(0,r.aZ)(s,function(){return u},function(e){return u=e}),i.J[s]||(i.J[s]=u),i.J.clearImmediate||(i.J.clearImmediate=u);var c="setInterval",l=r.y[c];l||(l=i.J[c]),(0,r.aZ)(c,function(){return l},function(e){return l=e});var h="clearInterval",d=r.y[h];d||(d=i.J[h]),(0,r.aZ)(h,function(){return d},function(e){return d=e})},5296:(e,t,n)=>{"use strict";n.d(t,{Ls:()=>h,Ov:()=>l,Xb:()=>d});n(171);var i=n(5854),r="browser",o="mobile/",a="node",s="".concat(o,"android"),u="".concat(o,"iOS"),c={};c[r]="b",c[s]="a",c[u]="i",c[a]="n";var l,h=!0,d=!1,f="device",v=i.y[f];v||p(a);function p(e){v=e,h=e===r,d=0===e.indexOf(o),l=(c[e]||"")+"3.10.1"}(0,i.aZ)(f,function(){return v},function(e){return p(e)})},5304:(e,t,n)=>{"use strict";n.d(t,{P2:()=>o,cs:()=>a,lQ:()=>r,si:()=>s});var i=n(5280),r=Function.prototype;function o(e){try{e()}catch(e){(0,i.wg)(function(){throw e})}}function a(e,t){var n=e||r;try{return t(n)}catch(e){n(e)}}function s(e){return new Promise(function(t,n){return e(function(e,i){return e&&n(e)||t(i)})})}},5407:e=>{e.exports=function(e){throw new TypeError('"'+e+'" is read-only')},e.exports.__esModule=!0,e.exports.default=e.exports},5546:e=>{function t(n,i,r,o){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}e.exports=t=function(e,n,i,r){function o(n,i){t(e,n,function(e){return this._invoke(n,i,e)})}n?a?a(e,n,{value:i,enumerable:!r,configurable:!r,writable:!r}):e[n]=i:(o("next",0),o("throw",1),o("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,i,r,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},5636:e=>{function t(n,i){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},5715:(e,t,n)=>{var i=n(2987),r=n(1156),o=n(7122),a=n(7752);e.exports=function(e,t){return i(e)||r(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},5854:(e,t,n)=>{"use strict";n.d(t,{El:()=>r,aZ:()=>o,y:()=>i});var i=n(171).J.WebcomDependencies||{},r={};function o(e,t,n){Object.defineProperty(r,e,{enumerable:!0,get:t,set:n})}},5869:(e,t,n)=>{var i=n(887);e.exports=function(e,t,n,r,o){var a=i(e,t,n,r,o);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},5901:(e,t,n)=>{var i=n(79);e.exports=function(e){if(Array.isArray(e))return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},6749:(e,t,n)=>{"use strict";n.d(t,{n:()=>g});var i=n(5715),r=n.n(i),o=n(7383),a=n.n(o),s=n(4579),u=n.n(s),c=n(7234);const l=require("http");var h=n.n(l);const d=require("https");var f=n.n(d),v=n(3412),p=n(8203),g=u()(function e(){a()(this,e),this.readyState=0,this._headers={},this.status=0},[{key:"open",value:function(e,t){this._method=e,this._href=t}},{key:"setRequestHeader",value:function(e,t){this._headers[e]=t}},{key:"send",value:function(e){(0,v.Tn)(this.onreadystatechange)||(0,p.$8)("NodeXmlHttpRequest","missing onreadystatechange event handler"),e&&(e=Buffer.from(e),this._headers["Content-Length"]=e.length),_.call(this,e)}},{key:"getAllResponseHeaders",value:function(){return Object.entries(this._headers).reduce(function(e,t){var n=r()(t,2),i=n[0],o=n[1];return"".concat(e,"\n").concat(i,": ").concat(o)},"")}}],[{key:"DONE",get:function(){return 4}}]);function y(e){this.responseText=e.message,this._headers={},this.readyState=4,this.onreadystatechange()}function _(e){var t=this,n=(0,c.u)(this._href),i=n.url,r=n.secure,o=n.proxy;if(o)if(r){var a=i.hostname+":443",s=h().request({protocol:o.protocol,hostname:o.hostname,port:o.port,method:"CONNECT",path:a});s.on("connect",function(n,r){if(200===n.statusCode){var o=f().request({host:i.host,path:i.pathname+i.search+i.hash,method:t._method,agent:new(f().Agent)({socket:r})});m.call(t,o,e)}else y.call(t,new Error("Status ".concat(n.statusCode)))}),s.on("error",y.bind(this)),s.setHeader("Host",a),s.end()}else{var u=h().request({protocol:o.protocol,hostname:o.hostname,port:o.port,method:this._method,path:i.href});u.setHeader("Host",i.host),m.call(this,u,e)}else{var l=(r?f():h()).request({protocol:i.protocol,hostname:i.hostname,port:i.port,method:this._method,path:i.pathname+i.search+i.hash});l.setHeader("Host",i.host),m.call(this,l,e)}}function m(e,t){var n=this;Object.entries(this._headers).forEach(function(t){var n=r()(t,2),i=n[0],o=n[1];return e.setHeader(i,o)}),t&&e.write(t),e.on("error",y.bind(this)),e.on("response",function(e){var i=[];e.on("data",function(e){return i.push(e)}),e.on("error",y.bind(n)),e.on("end",function(){n.status=e.statusCode;var r=[301,302,303,307,308].includes(n.status)&&e.headers.location;r?(n._href=r,_.call(n,t)):(n.readyState=4,n.responseText=Buffer.concat(i).toString("utf8"),n._headers=e.headers,n.onreadystatechange())})}),e.end()}},6779:(e,t)=>{"use strict";var n,i={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(e){this.toString=function(){return"CORRUPT: "+this.message},this.message=e},invalid:function(e){this.toString=function(){return"INVALID: "+this.message},this.message=e},bug:function(e){this.toString=function(){return"BUG: "+this.message},this.message=e},notReady:function(e){this.toString=function(){return"NOT READY: "+this.message},this.message=e}}};i.bitArray={bitSlice:function(e,t,n){return e=i.bitArray._shiftRight(e.slice(t/32),32-(31&t)).slice(1),void 0===n?e:i.bitArray.clamp(e,n-t)},extract:function(e,t,n){var i=Math.floor(-t-n&31);return(-32&(t+n-1^t)?e[t/32|0]<<32-i^e[t/32+1|0]>>>i:e[t/32|0]>>>i)&(1<<n)-1},concat:function(e,t){if(0===e.length||0===t.length)return e.concat(t);var n=e[e.length-1],r=i.bitArray.getPartial(n);return 32===r?e.concat(t):i.bitArray._shiftRight(t,r,0|n,e.slice(0,e.length-1))},bitLength:function(e){var t,n=e.length;return 0===n?0:(t=e[n-1],32*(n-1)+i.bitArray.getPartial(t))},clamp:function(e,t){if(32*e.length<t)return e;var n=(e=e.slice(0,Math.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=i.bitArray.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:function(e,t,n){return 32===e?t:(n?0|t:t<<32-e)+1099511627776*e},getPartial:function(e){return Math.round(e/1099511627776)||32},equal:function(e,t){if(i.bitArray.bitLength(e)!==i.bitArray.bitLength(t))return!1;var n,r=0;for(n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r},_shiftRight:function(e,t,n,r){var o,a,s;for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(o=0;o<e.length;o++)r.push(n|e[o]>>>t),n=e[o]<<32-t;return a=e.length?e[e.length-1]:0,s=i.bitArray.getPartial(a),r.push(i.bitArray.partial(t+s&31,t+s>32?n:r.pop(),1)),r},_xor4:function(e,t){return[e[0]^t[0],e[1]^t[1],e[2]^t[2],e[3]^t[3]]},byteswapM:function(e){var t,n;for(t=0;t<e.length;++t)n=e[t],e[t]=n>>>24|n>>>8&65280|(65280&n)<<8|n<<24;return e}},i.codec.utf8String={fromBits:function(e){var t,n,r="",o=i.bitArray.bitLength(e);for(t=0;t<o/8;t++)3&t||(n=e[t/4]),r+=String.fromCharCode(n>>>8>>>8>>>8),n<<=8;return decodeURIComponent(escape(r))},toBits:function(e){e=unescape(encodeURIComponent(e));var t,n=[],r=0;for(t=0;t<e.length;t++)r=r<<8|e.charCodeAt(t),3&~t||(n.push(r),r=0);return 3&t&&n.push(i.bitArray.partial(8*(3&t),r)),n}},i.codec.base64={_chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fromBits:function(e,t,n){var r,o="",a=0,s=i.codec.base64._chars,u=0,c=i.bitArray.bitLength(e);for(n&&(s=s.substr(0,62)+"-_"),r=0;6*o.length<c;)o+=s.charAt((u^e[r]>>>a)>>>26),a<6?(u=e[r]<<6-a,a+=26,r++):(u<<=6,a-=6);for(;3&o.length&&!t;)o+="=";return o},toBits:function(e,t){e=e.replace(/\s|=/g,"");var n,r,o=[],a=0,s=i.codec.base64._chars,u=0;for(t&&(s=s.substr(0,62)+"-_"),n=0;n<e.length;n++){if((r=s.indexOf(e.charAt(n)))<0)throw new i.exception.invalid("this isn't base64!");a>26?(a-=26,o.push(u^r>>>a),u=r<<32-a):u^=r<<32-(a+=6)}return 56&a&&o.push(i.bitArray.partial(56&a,u,1)),o}},i.codec.base64url={fromBits:function(e){return i.codec.base64.fromBits(e,1,1)},toBits:function(e){return i.codec.base64.toBits(e,1)}},i.hash.sha256=function(e){this._key[0]||this._precompute(),e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()},i.hash.sha256.hash=function(e){return(new i.hash.sha256).update(e).finalize()},i.hash.sha256.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(e){"string"==typeof e&&(e=i.codec.utf8String.toBits(e));var t,n=this._buffer=i.bitArray.concat(this._buffer,e),r=this._length,o=this._length=r+i.bitArray.bitLength(e);if(o>9007199254740991)throw new i.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){var a=new Uint32Array(n),s=0;for(t=512+r-(512+r&511);t<=o;t+=512)this._block(a.subarray(16*s,16*(s+1))),s+=1;n.splice(0,16*s)}else for(t=512+r-(512+r&511);t<=o;t+=512)this._block(n.splice(0,16));return this},finalize:function(){var e,t=this._buffer,n=this._h;for(e=(t=i.bitArray.concat(t,[i.bitArray.partial(1,1)])).length+2;15&e;e++)t.push(0);for(t.push(Math.floor(this._length/4294967296)),t.push(0|this._length);t.length;)this._block(t.splice(0,16));return this.reset(),n},_init:[],_key:[],_precompute:function(){var e,t,n=0,i=2;function r(e){return 4294967296*(e-Math.floor(e))|0}for(;n<64;i++){for(t=!0,e=2;e*e<=i;e++)if(i%e===0){t=!1;break}t&&(n<8&&(this._init[n]=r(Math.pow(i,.5))),this._key[n]=r(Math.pow(i,1/3)),n++)}},_block:function(e){var t,n,i,r,o=this._h,a=this._key,s=o[0],u=o[1],c=o[2],l=o[3],h=o[4],d=o[5],f=o[6],v=o[7];for(t=0;t<64;t++)t<16?n=e[t]:(i=e[t+1&15],r=e[t+14&15],n=e[15&t]=(i>>>7^i>>>18^i>>>3^i<<25^i<<14)+(r>>>17^r>>>19^r>>>10^r<<15^r<<13)+e[15&t]+e[t+9&15]|0),n=n+v+(h>>>6^h>>>11^h>>>25^h<<26^h<<21^h<<7)+(f^h&(d^f))+a[t],v=f,f=d,d=h,h=l+n|0,l=c,c=u,s=n+((u=s)&c^l&(u^c))+(u>>>2^u>>>13^u>>>22^u<<30^u<<19^u<<10)|0;o[0]=o[0]+s|0,o[1]=o[1]+u|0,o[2]=o[2]+c|0,o[3]=o[3]+l|0,o[4]=o[4]+h|0,o[5]=o[5]+d|0,o[6]=o[6]+f|0,o[7]=o[7]+v|0}},i.hash.sha1=function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()},i.hash.sha1.hash=function(e){return(new i.hash.sha1).update(e).finalize()},i.hash.sha1.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(e){"string"==typeof e&&(e=i.codec.utf8String.toBits(e));var t,n=this._buffer=i.bitArray.concat(this._buffer,e),r=this._length,o=this._length=r+i.bitArray.bitLength(e);if(o>9007199254740991)throw new i.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){var a=new Uint32Array(n),s=0;for(t=this.blockSize+r-(this.blockSize+r&this.blockSize-1);t<=o;t+=this.blockSize)this._block(a.subarray(16*s,16*(s+1))),s+=1;n.splice(0,16*s)}else for(t=this.blockSize+r-(this.blockSize+r&this.blockSize-1);t<=o;t+=this.blockSize)this._block(n.splice(0,16));return this},finalize:function(){var e,t=this._buffer,n=this._h;for(e=(t=i.bitArray.concat(t,[i.bitArray.partial(1,1)])).length+2;15&e;e++)t.push(0);for(t.push(Math.floor(this._length/4294967296)),t.push(0|this._length);t.length;)this._block(t.splice(0,16));return this.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:function(e,t,n,i){return e<=19?t&n|~t&i:e<=39?t^n^i:e<=59?t&n|t&i|n&i:e<=79?t^n^i:void 0},_S:function(e,t){return t<<e|t>>>32-e},_block:function(e){var t,n,i,r,o,a,s,u,c=this._h;if("undefined"!=typeof Uint32Array){u=Array(80);for(var l=0;l<16;l++)u[l]=e[l]}else u=e;for(i=c[0],r=c[1],o=c[2],a=c[3],s=c[4],t=0;t<=79;t++)t>=16&&(u[t]=this._S(1,u[t-3]^u[t-8]^u[t-14]^u[t-16])),n=this._S(5,i)+this._f(t,r,o,a)+s+u[t]+this._key[Math.floor(t/20)]|0,s=a,a=o,o=this._S(30,r),r=i,i=n;c[0]=c[0]+i|0,c[1]=c[1]+r|0,c[2]=c[2]+o|0,c[3]=c[3]+a|0,c[4]=c[4]+s|0}},e.exports&&(e.exports=i),void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)},6982:e=>{"use strict";e.exports=require("crypto")},6993:(e,t,n)=>{var i=n(5546);function r(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
var t,n,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.toStringTag||"@@toStringTag";function u(e,r,o,a){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return i(u,"_invoke",function(e,i,r){var o,a,s,u=0,l=r||[],h=!1,d={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,d.n=n,c}};function f(e,i){for(a=e,s=i,n=0;!h&&u&&!r&&n<l.length;n++){var r,o=l[n],f=d.p,v=o[2];e>3?(r=v===i)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((r=e<2&&f<o[1])?(a=0,d.v=i,d.n=o[1]):f<v&&(r=e<3||o[0]>i||i>v)&&(o[4]=e,o[5]=i,d.n=v,a=0))}if(r||e>1)return c;throw h=!0,i}return function(r,l,v){if(u>1)throw TypeError("Generator is already running");for(h&&1===l&&f(l,v),a=l,s=v;(n=a<2?t:s)||!h;){o||(a?a<3?(a>1&&(d.n=-1),f(a,s)):d.n=s:d.v=s);try{if(u=2,o){if(a||(r="next"),n=o[r]){if(!(n=n.call(o,s)))throw TypeError("iterator result is not an object");if(!n.done)return n;s=n.value,a<2&&(a=0)}else 1===a&&(n=o.return)&&n.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),a=1);o=t}else if((n=(h=d.n<0)?s:e.call(i,d))!==c)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:n,done:h}}}(e,o,a),!0),u}var c={};function l(){}function h(){}function d(){}n=Object.getPrototypeOf;var f=[][a]?n(n([][a]())):(i(n={},a,function(){return this}),n),v=d.prototype=l.prototype=Object.create(f);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,i(e,s,"GeneratorFunction")),e.prototype=Object.create(v),e}return h.prototype=d,i(v,"constructor",d),i(d,"constructor",h),h.displayName="GeneratorFunction",i(d,s,"GeneratorFunction"),i(v),i(v,s,"Generator"),i(v,a,function(){return this}),i(v,"toString",function(){return"[object Generator]"}),(e.exports=r=function(){return{w:u,m:p}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},7122:(e,t,n)=>{var i=n(79);e.exports=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},7234:(e,t,n)=>{"use strict";n.d(t,{u:()=>d});var i=n(5854),r="env",o=i.y[r];o||(o=process[r]),(0,i.aZ)(r,function(){return o},function(e){return o=e});var a,s,u,c,l=(0,n(1133).h)("network.nodeProxy");function h(e){try{return new URL(e)}catch(e){return null}}function d(e){var t=new URL(e);switch(t.protocol){case"http:":case"ws:":return a&&c(t)?{url:t,secure:!1,proxy:a}:{url:t,secure:!1};case"https:":case"wss:":return s&&c(t)?{url:t,secure:!0,proxy:s}:{url:t,secure:!0};default:return{url:t,secure:!1}}}!function(){if(a=h(o.http_proxy||o.HTTP_PROXY),s=h(o.https_proxy||o.HTTPS_PROXY),u=o.no_proxy||o.NO_PROXY,l.log("Node.js proxy layer set to: http_proxy='".concat(a,"'; https_proxy='").concat(s,"'; no_proxy=").concat(u)),u){var e=u.split(",");c=e.indexOf("*")<0?function(t){return e.every(function(e){return!t.origin.endsWith(e)})}:function(){return!1}}else c=function(){return!0}}()},7383:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},7550:e=>{function t(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(n){}return(e.exports=t=function(){return!!n},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},7736:(e,t,n)=>{var i=n(3738).default,r=n(9045);e.exports=function(e){var t=r(e,"string");return"symbol"==i(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},7752:e=>{e.exports=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.")},e.exports.__esModule=!0,e.exports.default=e.exports},8203:(e,t,n)=>{"use strict";n.d(t,{$8:()=>v,$x:()=>g,Ik:()=>E,Pc:()=>S,Tq:()=>I,WP:()=>x,YD:()=>d,Yj:()=>C,ar:()=>p,b0:()=>c,cK:()=>W,gP:()=>O,gp:()=>k,lq:()=>y,nd:()=>T,se:()=>f,vA:()=>l,vD:()=>w,vM:()=>A,y:()=>m,yL:()=>N,zB:()=>_,zM:()=>D,zR:()=>u});var i=n(3738),r=n.n(i),o=n(1132),a=n.n(o),s=n(3412),u="Webcom internal error";function c(){v(u,"not (yet) implemented abstract member!")}function l(e,t){e||v(u,t)}var h={values:[]};function d(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];Object.assign(h,{method:e,args:t||[],checkers:i})}function f(e,t,n){h.values.push({name:e,value:t,checker:n})}var v=function(e,t){var n;throw new Error("".concat((n="").concat.apply(n,a()(e)),": ").concat(t))};function p(e,t){if(!h.method){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];d.apply(void 0,[e,t].concat(i))}var o=h.method,a=h.args,s=h.checkers,u=h.values;Object.assign(h,{method:void 0,args:void 0,checkers:void 0,values:[]}),a.length>s.length&&v(o,"too many arguments, ".concat(a.length," instead of ").concat(s.length)),s.forEach(function(e,t){return g(e,a[t],o,function(e){return"argument #".concat(t+1," ").concat(e)})}),u.forEach(function(e){var t=e.name,n=e.value;return g(e.checker,n,o,function(e){return"".concat(t," ").concat(e)})})}function g(e,t,n,i){var r=e(t);r&&v(n,i(r))}function y(e){return function(t){return b("undefined")(t)&&e&&e(t)}}function _(e){return function(t){return null===t?"must not be null":e&&e(t)}}var m=function(e){return void 0===e?"is missing":""};function k(e){return function(t){return!(t instanceof e)&&"must be an instance of ".concat(e.name)}}function b(e){return function(t){return r()(t)!==e&&"must be a ".concat(e)}}var w=b("undefined"),C=b("string"),S=b("function"),D=b("boolean"),A=P(Number.isFinite,"must be a finite number"),E=b("object");function O(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.every(function(t){return t(e)})&&"either ".concat(t.map(function(t){return t(e)}).join(" or "))}}function x(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){var n;return t.some(function(t){return n=t(e)})&&n}}function N(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.every(function(t){return t!==e})&&"must be either ".concat(t.join(" or "))}}var R="is not valid";function P(e,t){return function(n){return!e(n)&&(t||R)}}var T=P(function(e){return(0,s.Et)(e)&&Math.floor(e)===e},"must be an integer");function I(e,t){return P(function(n){return n>=e&&n<(void 0===t?1/0:t)},"must be between ".concat(e," and ").concat(t))}function W(e,t){return P(function(t){return e.test(t)},t)}},8399:e=>{"use strict";e.exports=require("faye-websocket")},8452:(e,t,n)=>{var i=n(3738).default,r=n(2475);e.exports=function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},9045:(e,t,n)=>{var i=n(3738).default;e.exports=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},9170:(e,t,n)=>{"use strict";n.d(t,{a:()=>l,k:()=>c});var i=n(1132),r=n.n(i),o=n(171),a=n(5854),s=n(3412),u="console",c=a.y[u],l=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var o=function(e){return(0,s.Gv)(e)?JSON.stringify(e):(e||"undefined").toString()};if((0,s.Kg)(e)){var a=0;return[e=e.replace(/%(.)/g,function(e,t){switch(t){case"%":return"%";case"s":case"o":case"O":return o(n[a++]);case"d":case"i":case"f":return n[a++];default:return e}})].concat(r()(n.slice(a).map(o))).join(" ")}return[e].concat(n).map(o).join(" ")};function h(e,t,n,i,r){if(!n||!i||!r){var o=t,a=function(e){return function(t){return o("[".concat(e,"] ").concat(t))}};n=n||a("INFO"),i=i||a("WARN"),r=r||a("ERR!"),t=a("LOG ")}return{log:function(){return t.call(e,l.apply(void 0,arguments))},info:function(){return n.call(e,l.apply(void 0,arguments))},warn:function(){return i.call(e,l.apply(void 0,arguments))},error:function(){return r.call(e,l.apply(void 0,arguments))}}}if((0,s.Tn)(c))c=h(o.J,c);else if((0,s.Gv)(c)&&c){var d=c,f=d.log,v=d.info,p=d.warn,g=d.error;c=h(c,f,v,p,g)}else{var y=function(e,t,n){for(var i=arguments.length,r=new Array(i>3?i-3:0),o=3;o<i;o++)r[o-3]=arguments[o];(0,s.Kg)(n)?(n="[".concat(e,"] ")+n,t.apply(void 0,[n].concat(r))):t.apply(void 0,["[".concat(e,"] "),n].concat(r))};c={log:y.bind(void 0,"LOG ",o.J[u].log),info:y.bind(void 0,"INFO",o.J[u].info),warn:y.bind(void 0,"WARN",o.J[u].warn),error:y.bind(void 0,"ERR!",o.J[u].error)}}(0,a.aZ)(u,function(){return c},function(e){return c=e})},9224:(e,t,n)=>{"use strict";n.d(t,{A:()=>_,h:()=>y});var i=n(7383),r=n.n(i),o=n(4579),a=n.n(o),s=n(1132),u=n.n(s),c=n(1133),l=n(9170),h=n(3412),d=n(8203),f=n(5304),v={};function p(e,t){var n=e.length;return n>=t?e.substring(0,t):e+c.MX.substring(0,t-n)}function g(e){return e.map(function(e){return(0,h.Tn)(e)?e():e})}function y(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];(0,d.$8)(d.zR,l.a.apply(void 0,u()(g(t))))}var _=a()(function e(t,n,i,o){r()(this,e),this._fqdn=t,this._prefix=n;var a=t.join(".");this._count=void 0===v[a]?v[a]=0:++v[a],this.displayTimestamp=i,this.setPrefixWidth(o||8),this._log=this._emitLog.bind(this,l.k.log),this._info=this._emitLog.bind(this,l.k.info),this._warn=this._emitLog.bind(this,l.k.warn),this._error=this._emitLog.bind(this,l.k.error),this._enabled=!0},[{key:"fqdn",get:function(){return this._fqdn}},{key:"_emitLog",value:function(e,t){var n=this.displayTimestamp?[(new Date).toISOString()]:[];n.push(this._displayedPrefix);for(var i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];(0,h.Kg)(t)?(n.push(t),t=n.join(" "),e.apply(void 0,[t].concat(u()(g(r))))):e.apply(void 0,n.concat(u()(g([t].concat(r)))))}},{key:"setPrefixWidth",value:function(e){this._displayedPrefix="".concat(p(this._prefix,e)," #").concat(p(this._count.toString(),3))}},{key:"setLevel",value:function(e){this._enabled=e>=0,this.log=e>=c.Ay.LOG?this._log:f.lQ,this.info=e>=c.Ay.INFO?this._info:f.lQ,this.warn=e>=c.Ay.WARN?this._warn:f.lQ,this.error=e>=c.Ay.ERROR?this._error:f.lQ}},{key:"updateLevel",value:function(e){this._enabled&&this.setLevel(e)}}])},9291:e=>{e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},9293:e=>{function t(e,t,n,i,r,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(i,r)}e.exports=function(e){return function(){var n=this,i=arguments;return new Promise(function(r,o){var a=e.apply(n,i);function s(e){t(a,r,o,s,u,"next",e)}function u(e){t(a,r,o,s,u,"throw",e)}s(void 0)})}},e.exports.__esModule=!0,e.exports.default=e.exports},9511:(e,t,n)=>{var i=n(5636);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},9552:(e,t,n)=>{var i=n(3072);e.exports=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=i(e)););return e},e.exports.__esModule=!0,e.exports.default=e.exports},9646:(e,t,n)=>{var i=n(7550),r=n(5636);e.exports=function(e,t,n){if(i())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var a=new(e.bind.apply(e,o));return n&&r(a,n.prototype),a},e.exports.__esModule=!0,e.exports.default=e.exports},9896:e=>{"use strict";e.exports=require("fs")}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i={};(()=>{"use strict";n.d(i,{default:()=>D});var e=n(171),t=n(7383),r=n.n(t),o=n(4579),a=n.n(o),s=n(5715),u=n.n(s),c=n(8203),l=n(1133),h=n(3412),d="WebcomApp",f=a()(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r()(this,e),(0,c.ar)(["new ",d],arguments,(0,c.cK)(/^[a-z0-9](?:[-a-z0-9]{0,38}[a-z0-9])?$/),(0,c.lq)((0,c.gP)(c.Ik,c.Yj))),this._logger=(0,l.h)("api.WebcomApp",d),this._services={},this.appId=t,this.config={},(0,h.Kg)(n)&&(n=Object.keys(y).reduce(function(e,t){return e[t]={baseUrl:n},e},{})),this._fillConfig(n),this._logger.log("Initialized %s with options %s",t,JSON.stringify(this.config))},[{key:"dispose",value:function(){(0,c.ar)([d,"#dispose"],arguments),Object.values(this._services).forEach(function(e){return e._dispose()}),this._services={}}},{key:"_fillConfig",value:function(e){v.call(this,e,y)}},{key:"toString",value:function(){return"".concat(this.appId,"{").concat(Object.keys(this._services).join(","),"}")}}]);function v(e,t){var n=this,i=function(e,t,r,o){var a=function(e){return"".concat(d,".Configuration.").concat(o.concat(e).join("."))};t=Object.assign({},t),Object.entries(r).forEach(function(r){var s=u()(r,2),l=s[0],h=s[1];if(h instanceof Object&&!(h instanceof Array))e[l]=e[l]||{},i(e[l],t[l]||{},h,o.concat(l));else{var d=t[l],f=h[1]||function(e){return e};try{e[l]=f(void 0===d?void 0===e[l]?h.length?h[0]:h:e[l]:d)}catch(t){var v=a(l);void 0===t.value?(0,c.$8)(v,t.message):(n._logger.warn("%s: %s",v,t.message),e[l]=t.value)}}delete t[l]}),Object.keys(t).forEach(function(e){return n._logger.warn("%s: unknown config key",a(e))})};i(this.config,e,t,[])}function p(e,t){var n=t.baseUrl;return"/".concat(n.protocol.slice(0,-1),"/").concat(n.host,"/").concat(e.appId,"/")}function g(e,t,n){return"".concat(n.key,":").concat(t,":").concat(p(e,n))}var y={},_=n(5854),m="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",k=0,b=[];function w(e){var t=e===k;k=e;var n,i=new Array(8);for(n=7;n>=0;n--)i[n]=m.charAt(e%64),e=Math.floor(e/64);(0,c.vA)(0===e,"Cannot push at time == 0");var r=i.join("");if(t){for(n=11;n>=0&&63===b[n];n--)b[n]=0;b[n]++}else for(n=0;n<12;n++)b[n]=Math.floor(64*Math.random());for(n=0;n<12;n++)r+=m.charAt(b[n]);return(0,c.vA)(20===r.length,"nextPushId: Length should be 20."),r}function C(e){for(var t=e.substring(0,8),n=0,i=0;i<8;++i)n=64*n+m.indexOf(t[i]);return n}var S="Webcom",D=a()(function e(){r()(this,e),this._init.apply(this,arguments)},[{key:"_init",value:function(){(0,c.$8)(["new ",S],"this static class cannot be instantiated")}}],[{key:"SDK_VERSION",get:function(){return"3.10.1"}},{key:"Log",get:function(){return l.Ay}},{key:"App",value:function(e,t){return new f(e,t)}},{key:"getUniqueKeyDate",value:function(e){return new Date(C(e))}},{key:"dependencies",get:function(){return _.El}}]),A=(0,l.h)("api.Webcom",S),E=n(1132),O=n.n(E),x=n(5296);function N(e){"http:"===e.protocol&&x.Ls&&"https:"===window.location.protocol&&this._logger.warn("Insecure access to a Webcom service from a secure page. Please setup your service with an https protocol.")}var R=new RegExp("^(?:([^:]+:)//)?(?:[^/@]+@)?([^/:]+(?::\\d+)?)(?:/.*)?$"),P="io.datasync.orange.com";function T(t){if(t&&(e.J.URL&&t instanceof URL||t.href&&t.protocol&&t.host))return t;var n=t?R.exec(t):[P,void 0,P];if(n){var i=u()(n,3),r=i[0],o=i[1],a=i[2];return o||(r="".concat(o="https:","//").concat(r)),{href:r,protocol:o,host:a}}throw new Error("cannot parse base URL: ".concat(t))}function I(e,t){return function(n){var i=e(n);if(i)throw new Error(i);return t?t(n):n}}function W(e,t,n){return function(i){if(void 0!==e&&i<e){var r="must be higher than ".concat(e);throw n?{value:e,message:r}:new Error(r)}if(void 0!==t&&i>t){var o="must be lower than ".concat(t);throw n?{value:t,message:o}:new Error(o)}return i}}var j=n(3738),M=n.n(j);function q(e,t,n,i){return F(e.prototype,t,n,i)}function L(e,t,n,i){return U(e.prototype,t,n,i)}function F(e,t,n,i){return Q(e,t,{value:n},i)}function U(e,t,n,i){return Q(e,t,{get:n},i)}function Q(e,t,n,i){return Object.defineProperty(e,t,Object.assign(n,{enumerable:i,configurable:!0}))}function V(e,t){var n=M()(e);if(n!==M()(t))return!1;if("object"!==n)return e===t;if(e===t)return!0;if(!e||!t)return!1;var i=Object.entries(e);return i.length===Object.keys(t).length&&i.every(function(e){var n=u()(e,2),i=n[0];return V(n[1],t[i])})}var Y="some",K="required",B="none",H=a()(function e(t,n){r()(this,e),(0,c.vA)(t===Y||t===K||t===B,"Wrong state value for a new State object: expecting 'some', 'required' or 'none'."),this.state=t,(0,c.vA)(t!==Y||n&&n.webcomAuthToken,"Missing details or webcomAuthToken for a new 'some' State"),this.details=n},[{key:"isUnauthenticated",value:function(){return this.state===B}},{key:"isAuthenticated",value:function(){return this.state===Y}},{key:"isRequired",value:function(){return this.state===K}},{key:"isSameAs",value:function(e){return this.state===e.state&&(this.state!==Y||this.details.webcomAuthToken===e.details.webcomAuthToken)}}]),J=new H(B),G=new H(K),z=function(e){return new H(Y,e)};function $(e){try{return new H(e.state,e.details)}catch(e){return J}}var X,Z="Authentication";function ee(e){switch((0,c.ar)([S,".avatarURL"],arguments,c.Ik),e&&e.provider){case"facebook":return"https://graph.facebook.com/".concat(e.providerUid,"/picture?type=large");case"github":return e.providerProfile.avatar_url;case"gitlab":case"google":return e.providerProfile.picture}}y[Z]={from:[void 0,I((0,c.lq)((0,c.gp)(f)))],baseUrl:[null,T],storage:[void 0,I((0,c.lq)((0,c.gP)(c.Yj,c.Pc)))],initialState:[void 0,function(e){return e&&JSON.parse(e)}],key:[void 0,I(c.vD,function(){return"auth"})]},L(f,"authentication",function(){var e=this._services[Z];if(!e){var t=this.config[Z].from;e=t?t.authentication:X(this),this._services[Z]=e}return e});var te=n(5280);function ne(e){var t=e.code||"UNKNOWN_ERROR",n=e.message||JSON.stringify(e),i=new Error("".concat(t,"[").concat(n,"]"));return i.code=t,i}var ie=a()(function e(){r()(this,e),this.cache_={}},[{key:"length",get:function(){return Object.keys(this.cache_).length}},{key:"key",value:function(e){var t=Object.keys(this.cache_);return 0<=e&&e<t.length?t[e]:null}},{key:"getItem",value:function(e){return this.cache_.hasOwnProperty(e)?this.cache_[e]:null}},{key:"setItem",value:function(e,t){this.cache_[e]=t}},{key:"removeItem",value:function(e){delete this.cache_[e]}},{key:"clear",value:function(){this.cache_={}}}]),re="localStorage",oe=_.y[re];oe||(oe=e.J[re]||new ie),(0,_.aZ)(re,function(){return oe},function(e){return oe=e});var ae="sessionStorage",se=_.y[ae];function ue(e){return"webcom:"+e}se||(se=e.J[ae]||null),(0,_.aZ)(ae,function(){return se},function(e){return se=e});var ce=a()(function e(t,n){r()(this,e);var i=t();if(i){var o=ue("sentinel");i.setItem(o,""),i.removeItem(o)}function a(){return t()||(0,c.$8)("JSONStorage","the ".concat(n," implementation could not be found!"))}this.set=function(e,t){if(null===t)a().removeItem(ue(e));else{var n=JSON.stringify(t);a().setItem(ue(e),"string"==typeof n?n:"null")}},this.get=function(e){var t=a().getItem(ue(e));return t&&JSON.parse(t)},this.remove=function(e){a().removeItem(ue(e))}}),le=new ce(function(){return oe},"localStorage"),he=new ce(function(){return se},"sessionStorage"),de=n(6779),fe=n.n(de);function ve(e){return decodeURIComponent(e.replace(/\+/g," "))}function pe(){var e=2147483648;return Math.floor(Math.random()*e).toString(36)+Math.abs(Math.floor(Math.random()*e)^Date.now()).toString(36)}function ge(e){var t={};return e.replace(/^[^?]*\?/,"").split("&").forEach(function(e){var n=e.indexOf("=");if(n<0)t[ve(e)]=!0;else{var i=ve(e.substring(0,n));t[i]=ve(e.substring(n+1))}}),t}function ye(e){if(!e)return"";var t=[];return Object.entries(e).forEach(function(e){var n=u()(e,2),i=n[0],r=n[1];null!=r&&((0,h.Gv)(r)&&(r=JSON.stringify(r)),t.push(encodeURIComponent(i)+"="+encodeURIComponent(r)))}),t.join("&")}function _e(e,t){var n=e.indexOf("?"),i=t?(n<0?"?":"&")+ye(t):"",r=e.indexOf("#");return r<0?e+i:e.substring(0,r)+i+e.substring(r)}function me(e,t){return fe().codec.base64.fromBits(fe().hash.sha1.hash(e),!1,t)}var ke=n(9646),be=n.n(ke);var we="XMLHttpRequest",Ce=_.y[we];Ce||(Ce=n(6749).n),(0,_.aZ)(we,function(){return Ce},function(e){return Ce=e});var Se=(0,l.h)("network.HttpRequest","HttpRequest"),De="application/x-www-form-urlencoded",Ae="application/json",Ee="Content-Type",Oe="PUT",xe="PATCH",Ne="POST",Re="DELETE",Pe="GET",Te=a()(function e(t,n){r()(this,e),this.name=t,this.value=n}),Ie=a()(function e(t,n){r()(this,e);for(var i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];this.url=_e([n].concat(O()(o.filter(function(e){return e&&e.length}).map(function(e){return encodeURIComponent(e)}))).join("/"),{c:x.Ov}),this.method=t.toUpperCase(),this.headers={Accept:"application/json, text/plain"}},[{key:"addQueryParameters",value:function(e){return this.url=_e(this.url,e),this}},{key:"addJson",value:function(e){return this.contentType=Ae,this.data=e,this}},{key:"addForm",value:function(e){return this.contentType=De,this.data=e,this}},{key:"addHeader",value:function(e){return(0,c.ar)(["HttpRequest","#addHeader"],arguments,(0,c.lq)((0,c.gp)(Te))),e&&(this.headers[e.name]=e.value),this}},{key:"readResponseHeaders",value:function(){return this.readHeaders=!0,this}},{key:"send",value:function(){var e=this;return new Promise(function(t,n){var i=null;void 0!==e.data&&[Ne,Oe,xe].indexOf(e.method)>=0&&((i=e.contentType===De?ye(e.data):e.contentType===Ae?JSON.stringify(e.data):e.data)?e.headers[Ee]=e.contentType:delete e.headers[Ee]),Se.log("==> ".concat(e.method," ").concat(e.url)),Object.keys(e.headers).forEach(function(t){return Se.log(" > HEADER ".concat(t,": ").concat(e.headers[t]))}),i&&Se.log(" > DATA: ".concat(i)),e._open(i,t,function(e){Se.log("<== ERROR: ".concat(JSON.stringify(e))),n(ne(e))})})}},{key:"_open",value:function(e,t,n){var i=this,r=new Ce,o="RESPONSE_PAYLOAD_ERROR";r.onreadystatechange=function(){if(4===r.readyState){var e=r.responseText,a=r.status;if(a>=500)n({code:o,message:"HTTP status ".concat(a)});else try{var s=e.length?JSON.parse(e):{};if(a>=400)n(s.error||s);else if(a>=200&&a<300||304===a){var u={body:s},c=u.body.error||null;c?n((0,h.Gv)(c)?c:{code:u.body.status,message:c}):(i.readHeaders&&(u.headers=function(e){var t=e.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};return t.forEach(function(e){var t=e.indexOf(": "),i=e.substring(0,t).toLowerCase();n[i]=e.substring(t+2)}),n}(r)),Se.log("<== ".concat(JSON.stringify(u))),t(u))}else n({code:o,message:"HTTP status ".concat(a)})}catch(e){n({code:o,message:"invalid response payload, not a Json content type"})}}},r.open(this.method,this.url,!0),Object.entries(this.headers).forEach(function(e){var t=u()(e,2),n=t[0],i=t[1];return r.setRequestHeader(n,i)}),r.send(e)}}]);function We(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return be()(Ie,[Pe,e].concat(n))}function je(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return be()(Ie,[Oe,e].concat(n))}function Me(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return be()(Ie,[Ne,e].concat(n))}function qe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return be()(Ie,[xe,e].concat(n))}function Le(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return be()(Ie,[Re,e].concat(n))}function Fe(e){if(e)return new Te("Authorization","Bearer ".concat(e))}var Ue=a()(function e(t){r()(this,e),F(this,"name",t),this.counters_={}},[{key:"attach",value:function(e){this.counters_=e.counters_}},{key:"incrementCounter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.counters_[e]=(this.counters_[e]||0)+t}},{key:"get",value:function(){return Object.assign({},this.counters_)}}]),Qe=new Ue("deprecated"),Ve=n(5304);function Ye(e,t,n,i){i=i&&i.concat(": ")||"",n=n?"use ".concat(n," instead"):"it should no longer be used",e.warn("".concat(i).concat(t," is deprecated, ").concat(n,".")),Qe.incrementCounter(t)}F(l.Ay,"showDeprecations",function(){(0,c.ar)([l.d1,"showDeprecations"],arguments),Ke=Ye}),F(l.Ay,"hideDeprecations",function(){(0,c.ar)([l.d1,"hideDeprecations"],arguments),Ke=Ve.lQ});var Ke=Ye;F(D,"Authentication",{avatarURL:ee}),U(D,"avatarURL",function(){return Ke(A,"Webcom.avatarURL","Webcom.Authentication.avatarURL"),ee});var Be={code:"USER_DENIED",message:"The user aborted authentication"},He={facebook:{height:650,width:680},google:{height:460,width:490},github:{height:760,width:340},gitlab:{height:710,width:800},orange:{height:700,width:1e3},mobileconnectOFR:{height:540,width:700}},Je={menubar:0,location:0,resizable:0,scrollbars:1,status:0,dialog:1,width:700,height:375};function Ge(e,t){var n=e.config[Z];return(0,h.Kg)(n.storage)?n.storage:g(e,"state",n)+t}function ze(e,t,n){(0,te.wg)(function(){return e(t,n)})}function $e(){return x.Ls&&(he.get(this._oauthSessionKey)||le.get(this._oauthSessionKey))}var Xe=a()(function e(t){r()(this,e),this._logger=(0,l.h)("api.Authentication",Z),this._logger.log("Initializing with options ".concat(JSON.stringify(t.config[Z]))),this._app=t,this._init(t)},[{key:"_init",value:function(e){var t=e.config[Z];N.call(this,t.baseUrl);var n=this._logger._count;this._currentState=$(function(e,t){var n=e.config[Z];return n.initialState||((0,h.Tn)(n.storage)?{}:le.get(Ge(e,t)))}(e,n)),this._authStateSetter=function(e,t){var n=e.config[Z];if((0,h.Tn)(n.storage))return function(e){return n.storage(JSON.stringify(e))};var i=Ge(e,t);return function(e){return e&&!e.isUnauthenticated()?le.set(i,e):le.remove(i)}}(e,n),this._oauthSessionKey=g(e,"ongoing",t)+n,this.isAuthContextual=!1,this._firstSubscriptions=[],this._lastSubscriptions=[],this._authRoute="".concat(t.baseUrl.href,"/auth/v2/").concat(e.appId),this._resumeAuthState(),this._logger.log("Initialized for appId %s",e.appId)}},{key:"_dispose",value:function(){}},{key:"currentState",get:function(){return this._currentState},set:function(e){this._currentState.isSameAs(e)||(this._currentState=function(e){if(e.isAuthenticated()){var t=Object.assign({},e.details);return delete t.extra,z(t)}return e}(e),this._authStateSetter(this._currentState),this._notifyErrorOrAuthStateChanged(null,e))}},{key:"_resumeAuthState",value:function(){var e=this;if(x.Ls)if("popup"===le.get(this._oauthSessionKey))document.body.style.display="none",le.set(this._oauthSessionKey,ge(location.search).__wcsession),window.close();else{var t=he.get(this._oauthSessionKey);if(t){var n=ge(location.search).__wcsession;if(n)return void(this._oauthSessionPromise=this.resumeSession(n,t).finally(function(){delete e._oauthSessionPromise,he.remove(e._oauthSessionKey)}).catch(Ve.lQ));he.remove(this._o