!function(){"use strict";function e(){e=function(){return t};var t={},n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof d?t:d,o=Object.create(i.prototype),a=new O(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return N()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var c=E(a,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=l(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(e,n,a),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f={};function d(){}function h(){}function p(){}var v={};s(v,o,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(S([])));y&&y!==n&&r.call(y,o)&&(v=y);var _=p.prototype=d.prototype=Object.create(v);function m(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(i,o,a,c){var s=l(e[i],e,o);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(f).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,c)}))}c(s.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function E(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:N}}function N(){return{value:void 0,done:!0}}return h.prototype=p,s(_,"constructor",p),s(p,"constructor",h),h.displayName=s(p,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,s(e,c,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},m(b.prototype),s(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},m(_),s(_,c,"Generator"),s(_,o,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function t(e){return 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},t(e)}function n(e,t,n,r,i,o,a){try{var c=e[o](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,i)}function r(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function c(e){n(a,i,o,c,s,"next",e)}function s(e){n(a,i,o,c,s,"throw",e)}c(void 0)}))}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function d(e,t,n){return d=f()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&l(i,n.prototype),i},d.apply(null,arguments)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function v(e){var t=f();return function(){var n,r=u(e);if(t){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return p(this,n)}}function g(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=g(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},y.apply(this,arguments)}function _(e,t){return E(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){c=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw i}}return o}(e,t)||T(e,t)||S()}function m(e){return E(e)||I(e)||T(e)||S()}function b(e){return function(e){if(Array.isArray(e))return O(e)}(e)||I(e)||T(e)||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.")}()}function E(e){if(Array.isArray(e))return e}function I(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function T(e,t){if(e){if("string"==typeof e)return O(e,t);var n=Object.prototype.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)?O(e,t):void 0}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function S(){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 N(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=T(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}var A,R="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};!function(e){!function(t){var n="object"==typeof R?R:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),r=i(e);function i(e,t){return function(n,r){"function"!=typeof e[n]&&Object.defineProperty(e,n,{configurable:!0,writable:!0,value:r}),t&&t(n,r)}}void 0===n.Reflect?n.Reflect=e:r=i(n.Reflect,r),function(e){var t=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,r=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,a={__proto__:[]}instanceof Array,c=!o&&!a,s={create:o?function(){return re(Object.create(null))}:a?function(){return re({__proto__:null})}:function(){return re({})},has:c?function(e,n){return t.call(e,n)}:function(e,t){return t in e},get:c?function(e,n){return t.call(e,n)?e[n]:void 0}:function(e,t){return e[t]}},u=Object.getPrototypeOf(Function),l="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,f=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?ee():Map,d=l||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?te():Set,h=new(l||"function"!=typeof WeakMap?ne():WeakMap);function p(e,t,n,r){if(L(n)){if(!J(e))throw new TypeError;if(!K(t))throw new TypeError;return O(e,t)}if(!J(e))throw new TypeError;if(!U(t))throw new TypeError;if(!U(r)&&!L(r)&&!j(r))throw new TypeError;return j(r)&&(r=void 0),S(e,t,n=V(n),r)}function v(e,t){function n(n,r){if(!U(n))throw new TypeError;if(!L(r)&&!Y(r))throw new TypeError;P(e,t,n,r)}return n}function g(e,t,n,r){if(!U(n))throw new TypeError;return L(r)||(r=V(r)),P(e,t,n,r)}function y(e,t,n){if(!U(t))throw new TypeError;return L(n)||(n=V(n)),A(e,t,n)}function _(e,t,n){if(!U(t))throw new TypeError;return L(n)||(n=V(n)),R(e,t,n)}function m(e,t,n){if(!U(t))throw new TypeError;return L(n)||(n=V(n)),w(e,t,n)}function b(e,t,n){if(!U(t))throw new TypeError;return L(n)||(n=V(n)),C(e,t,n)}function E(e,t){if(!U(e))throw new TypeError;return L(t)||(t=V(t)),k(e,t)}function I(e,t){if(!U(e))throw new TypeError;return L(t)||(t=V(t)),M(e,t)}function T(e,t,n){if(!U(t))throw new TypeError;L(n)||(n=V(n));var r=N(t,n,!1);if(L(r))return!1;if(!r.delete(e))return!1;if(r.size>0)return!0;var i=h.get(t);return i.delete(n),i.size>0||h.delete(t),!0}function O(e,t){for(var n=e.length-1;n>=0;--n){var r=(0,e[n])(t);if(!L(r)&&!j(r)){if(!K(r))throw new TypeError;t=r}}return t}function S(e,t,n,r){for(var i=e.length-1;i>=0;--i){var o=(0,e[i])(t,n,r);if(!L(o)&&!j(o)){if(!U(o))throw new TypeError;r=o}}return r}function N(e,t,n){var r=h.get(e);if(L(r)){if(!n)return;r=new f,h.set(e,r)}var i=r.get(t);if(L(i)){if(!n)return;i=new f,r.set(t,i)}return i}function A(e,t,n){if(R(e,t,n))return!0;var r=$(t);return!j(r)&&A(e,r,n)}function R(e,t,n){var r=N(t,n,!1);return!L(r)&&H(r.has(e))}function w(e,t,n){if(R(e,t,n))return C(e,t,n);var r=$(t);return j(r)?void 0:w(e,r,n)}function C(e,t,n){var r=N(t,n,!1);if(!L(r))return r.get(e)}function P(e,t,n,r){N(n,r,!0).set(e,t)}function k(e,t){var n=M(e,t),r=$(e);if(null===r)return n;var i=k(r,t);if(i.length<=0)return n;if(n.length<=0)return i;for(var o=new d,a=[],c=0,s=n;c<s.length;c++){var u=s[c];o.has(u)||(o.add(u),a.push(u))}for(var l=0,f=i;l<f.length;l++){u=f[l];o.has(u)||(o.add(u),a.push(u))}return a}function M(e,t){var n=[],r=N(e,t,!1);if(L(r))return n;for(var i=X(r.keys()),o=0;;){var a=z(i);if(!a)return n.length=o,n;var c=Q(a);try{n[o]=c}catch(e){try{Z(i)}finally{throw e}}o++}}function D(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function L(e){return void 0===e}function j(e){return null===e}function x(e){return"symbol"==typeof e}function U(e){return"object"==typeof e?null!==e:"function"==typeof e}function F(e,t){switch(D(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var n=3===t?"string":5===t?"number":"default",i=q(e,r);if(void 0!==i){var o=i.call(e,n);if(U(o))throw new TypeError;return o}return B(e,"default"===n?"number":n)}function B(e,t){if("string"===t){var n=e.toString;if(W(n))if(!U(i=n.call(e)))return i;if(W(r=e.valueOf))if(!U(i=r.call(e)))return i}else{var r;if(W(r=e.valueOf))if(!U(i=r.call(e)))return i;var i,o=e.toString;if(W(o))if(!U(i=o.call(e)))return i}throw new TypeError}function H(e){return!!e}function G(e){return""+e}function V(e){var t=F(e,3);return x(t)?t:G(t)}function J(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function W(e){return"function"==typeof e}function K(e){return"function"==typeof e}function Y(e){switch(D(e)){case 3:case 4:return!0;default:return!1}}function q(e,t){var n=e[t];if(null!=n){if(!W(n))throw new TypeError;return n}}function X(e){var t=q(e,i);if(!W(t))throw new TypeError;var n=t.call(e);if(!U(n))throw new TypeError;return n}function Q(e){return e.value}function z(e){var t=e.next();return!t.done&&t}function Z(e){var t=e.return;t&&t.call(e)}function $(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===u)return t;if(t!==u)return t;var n=e.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return t;var i=r.constructor;return"function"!=typeof i||i===e?t:i}function ee(){var e={},t=[],n=function(){function e(e,t,n){this._index=0,this._keys=e,this._values=t,this._selector=n}return e.prototype["@@iterator"]=function(){return this},e.prototype[i]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var n=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},t.prototype.delete=function(t){var n=this._find(t,!1);if(n>=0){for(var r=this._keys.length,i=n+1;i<r;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,t===this._cacheKey&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new n(this._keys,this._values,r)},t.prototype.values=function(){return new n(this._keys,this._values,o)},t.prototype.entries=function(){return new n(this._keys,this._values,a)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[i]=function(){return this.entries()},t.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function r(e,t){return e}function o(e,t){return t}function a(e,t){return[e,t]}}function te(){return function(){function e(){this._map=new f}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.values()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[i]=function(){return this.keys()},e}()}function ne(){var e=16,n=s.create(),r=i();return function(){function e(){this._key=i()}return e.prototype.has=function(e){var t=o(e,!1);return void 0!==t&&s.has(t,this._key)},e.prototype.get=function(e){var t=o(e,!1);return void 0!==t?s.get(t,this._key):void 0},e.prototype.set=function(e,t){return o(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=o(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=i()},e}();function i(){var e;do{e="@@WeakMap@@"+u()}while(s.has(n,e));return n[e]=!0,e}function o(e,n){if(!t.call(e,r)){if(!n)return;Object.defineProperty(e,r,{value:s.create()})}return e[r]}function a(e,t){for(var n=0;n<t;++n)e[n]=255*Math.random()|0;return e}function c(e){return"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(e)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(e)):a(new Uint8Array(e),e):a(new Array(e),e)}function u(){var t=c(e);t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var n="",r=0;r<e;++r){var i=t[r];4!==r&&6!==r&&8!==r||(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}function re(e){return e.__=void 0,delete e.__,e}e("decorate",p),e("metadata",v),e("ttq_defineMetadata",g),e("ttq_hasMetadata",y),e("ttq_hasOwnMetadata",_),e("ttq_getMetadata",m),e("getOwnMetadata",b),e("getMetadataKeys",E),e("getOwnMetadataKeys",I),e("deleteMetadata",T)}(r)}()}(A||(A={}));var w,C={},P={};w=P,Object.defineProperty(w,"__esModule",{value:!0}),w.NON_CUSTOM_TAG_KEYS=w.POST_CONSTRUCT=w.DESIGN_PARAM_TYPES=w.PARAM_TYPES=w.TAGGED_PROP=w.TAGGED=w.MULTI_INJECT_TAG=w.INJECT_TAG=w.OPTIONAL_TAG=w.UNMANAGED_TAG=w.NAME_TAG=w.NAMED_TAG=void 0,w.NAMED_TAG="named",w.NAME_TAG="name",w.UNMANAGED_TAG="unmanaged",w.OPTIONAL_TAG="optional",w.INJECT_TAG="inject",w.MULTI_INJECT_TAG="multi_inject",w.TAGGED="inversify:tagged",w.TAGGED_PROP="inversify:tagged_props",w.PARAM_TYPES="inversify:paramtypes",w.DESIGN_PARAM_TYPES="design:paramtypes",w.POST_CONSTRUCT="post_construct",w.NON_CUSTOM_TAG_KEYS=[w.INJECT_TAG,w.MULTI_INJECT_TAG,w.NAME_TAG,w.UNMANAGED_TAG,w.NAMED_TAG,w.OPTIONAL_TAG];var k={},M={},D={};Object.defineProperty(D,"__esModule",{value:!0}),D.TargetTypeEnum=D.BindingTypeEnum=D.BindingScopeEnum=void 0;D.BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"};D.BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};D.TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"};var L={};Object.defineProperty(L,"__esModule",{value:!0}),L.id=void 0;var j=0;L.id=function(){return j++},Object.defineProperty(M,"__esModule",{value:!0}),M.Binding=void 0;var x=D,U=L,F=function(){function e(e,t){this.id=U.id(),this.activated=!1,this.serviceIdentifier=e,this.scope=t,this.type=x.BindingTypeEnum.Invalid,this.constraint=function(e){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.dynamicValue=null}return e.prototype.clone=function(){var t=new e(this.serviceIdentifier,this.scope);return t.activated=t.scope===x.BindingScopeEnum.Singleton&&this.activated,t.implementationType=this.implementationType,t.dynamicValue=this.dynamicValue,t.scope=this.scope,t.type=this.type,t.factory=this.factory,t.provider=this.provider,t.constraint=this.constraint,t.onActivation=this.onActivation,t.cache=this.cache,t},e}();M.Binding=F;var B={};Object.defineProperty(B,"__esModule",{value:!0}),B.STACK_OVERFLOW=B.CIRCULAR_DEPENDENCY_IN_FACTORY=B.POST_CONSTRUCT_ERROR=B.MULTIPLE_POST_CONSTRUCT_METHODS=B.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=B.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=B.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=B.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=B.ARGUMENTS_LENGTH_MISMATCH=B.INVALID_DECORATOR_OPERATION=B.INVALID_TO_SELF_VALUE=B.INVALID_FUNCTION_BINDING=B.INVALID_MIDDLEWARE_RETURN=B.NO_MORE_SNAPSHOTS_AVAILABLE=B.INVALID_BINDING_TYPE=B.NOT_IMPLEMENTED=B.CIRCULAR_DEPENDENCY=B.UNDEFINED_INJECT_ANNOTATION=B.MISSING_INJECT_ANNOTATION=B.MISSING_INJECTABLE_ANNOTATION=B.NOT_REGISTERED=B.CANNOT_UNBIND=B.AMBIGUOUS_MATCH=B.KEY_NOT_FOUND=B.NULL_ARGUMENT=B.DUPLICATED_METADATA=B.DUPLICATED_INJECTABLE_DECORATOR=void 0,B.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",B.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",B.NULL_ARGUMENT="NULL argument",B.KEY_NOT_FOUND="Key Not Found",B.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",B.CANNOT_UNBIND="Could not unbind serviceIdentifier:",B.NOT_REGISTERED="No matching bindings found for serviceIdentifier:",B.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",B.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:";B.UNDEFINED_INJECT_ANNOTATION=function(e){return"@inject called with undefined this could mean that the class "+e+" has a circular dependency problem. You can use a LazyServiceIdentifer to  overcome this limitation."},B.CIRCULAR_DEPENDENCY="Circular dependency found:",B.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.",B.INVALID_BINDING_TYPE="Invalid binding type:",B.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",B.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",B.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",B.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",B.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.";B.ARGUMENTS_LENGTH_MISMATCH=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"The number of constructor arguments in the derived class "+e[0]+" must be >= than the number of constructor arguments of its base class."},B.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",B.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",B.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",B.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",B.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";B.POST_CONSTRUCT_ERROR=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"@postConstruct error in class "+e[0]+": "+e[1]};B.CIRCULAR_DEPENDENCY_IN_FACTORY=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"It looks like there is a circular dependency in one of the '"+e[0]+"' bindings. Please investigate bindings withservice identifier '"+e[1]+"'."},B.STACK_OVERFLOW="Maximum call stack size exceeded";var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.MetadataReader=void 0;var G=P,V=function(){function e(){}return e.prototype.getConstructorMetadata=function(e){return{compilerGeneratedMetadata:Reflect.ttq_getMetadata(G.PARAM_TYPES,e),userGeneratedMetadata:Reflect.ttq_getMetadata(G.TAGGED,e)||{}}},e.prototype.getPropertiesMetadata=function(e){return Reflect.ttq_getMetadata(G.TAGGED_PROP,e)||[]},e}();H.MetadataReader=V;var J={},W={};Object.defineProperty(W,"__esModule",{value:!0}),W.BindingCount=void 0;W.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1};var K={};Object.defineProperty(K,"__esModule",{value:!0}),K.isStackOverflowExeption=void 0;var Y=B;K.isStackOverflowExeption=function(e){return e instanceof RangeError||e.message===Y.STACK_OVERFLOW};var q={};Object.defineProperty(q,"__esModule",{value:!0}),q.circularDependencyToException=q.listMetadataForTarget=q.listRegisteredBindingsForServiceIdentifier=q.getServiceIdentifierAsString=q.getFunctionName=void 0;var X=B;function Q(e){return"function"==typeof e?e.name:"symbol"==typeof e?e.toString():e}function z(e,t){return null!==e.parentRequest&&(e.parentRequest.serviceIdentifier===t||z(e.parentRequest,t))}function Z(e){if(e.name)return e.name;var t=e.toString(),n=t.match(/^function\s*([^\s(]+)/);return n?n[1]:"Anonymous function: "+t}q.getServiceIdentifierAsString=Q,q.listRegisteredBindingsForServiceIdentifier=function(e,t,n){var r="",i=n(e,t);return 0!==i.length&&(r="\nRegistered bindings:",i.forEach((function(e){var t="Object";null!==e.implementationType&&(t=Z(e.implementationType)),r=r+"\n "+t,e.constraint.metaData&&(r=r+" - "+e.constraint.metaData)}))),r},q.circularDependencyToException=function e(t){t.childRequests.forEach((function(t){if(z(t,t.serviceIdentifier)){var n=function(e){return function e(t,n){void 0===n&&(n=[]);var r=Q(t.serviceIdentifier);return n.push(r),null!==t.parentRequest?e(t.parentRequest,n):n}(e).reverse().join(" --\x3e ")}(t);throw new Error(X.CIRCULAR_DEPENDENCY+" "+n)}e(t)}))},q.listMetadataForTarget=function(e,t){if(t.isTagged()||t.isNamed()){var n="",r=t.getNamedTag(),i=t.getCustomTags();return null!==r&&(n+=r.toString()+"\n"),null!==i&&i.forEach((function(e){n+=e.toString()+"\n"}))," "+e+"\n "+e+" - "+n}return" "+e},q.getFunctionName=Z;var $={};Object.defineProperty($,"__esModule",{value:!0}),$.Context=void 0;var ee=L,te=function(){function e(e){this.id=ee.id(),this.container=e}return e.prototype.addPlan=function(e){this.plan=e},e.prototype.setCurrentRequest=function(e){this.currentRequest=e},e}();$.Context=te;var ne={};Object.defineProperty(ne,"__esModule",{value:!0}),ne.Metadata=void 0;var re=P,ie=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.toString=function(){return this.key===re.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},e}();ne.Metadata=ie;var oe={};Object.defineProperty(oe,"__esModule",{value:!0}),oe.Plan=void 0;var ae=function(e,t){this.parentContext=e,this.rootRequest=t};oe.Plan=ae;var ce={},se={},ue={};Object.defineProperty(ue,"__esModule",{value:!0}),ue.tagProperty=ue.tagParameter=ue.decorate=void 0;var le=B,fe=P;function de(e,t,n,r,i){var o={},a="number"==typeof i,c=void 0!==i&&a?i.toString():n;if(a&&void 0!==n)throw new Error(le.INVALID_DECORATOR_OPERATION);Reflect.ttq_hasOwnMetadata(e,t)&&(o=Reflect.ttq_getMetadata(e,t));var s=o[c];if(Array.isArray(s))for(var u=0,l=s;u<l.length;u++){var f=l[u];if(f.key===r.key)throw new Error(le.DUPLICATED_METADATA+" "+f.key.toString())}else s=[];s.push(r),o[c]=s,Reflect.ttq_defineMetadata(e,o,t)}function he(e,t){Reflect.decorate(e,t)}function pe(e,t){return function(n,r){t(n,r,e)}}ue.tagParameter=function(e,t,n,r){de(fe.TAGGED,e,t,r,n)},ue.tagProperty=function(e,t,n){de(fe.TAGGED_PROP,e.constructor,t,n)},ue.decorate=function(e,t,n){"number"==typeof n?he([pe(n,e)],t):"string"==typeof n?Reflect.decorate([e],t,n):he([e],t)},Object.defineProperty(se,"__esModule",{value:!0}),se.inject=se.LazyServiceIdentifer=void 0;var ve=B,ge=P,ye=ne,_e=ue,me=function(){function e(e){this._cb=e}return e.prototype.unwrap=function(){return this._cb()},e}();se.LazyServiceIdentifer=me,se.inject=function(e){return function(t,n,r){if(void 0===e)throw new Error(ve.UNDEFINED_INJECT_ANNOTATION(t.name));var i=new ye.Metadata(ge.INJECT_TAG,e);"number"==typeof r?_e.tagParameter(t,n,r,i):_e.tagProperty(t,n,i)}};var be={},Ee={};Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.QueryableString=void 0;var Ie=function(){function e(e){this.str=e}return e.prototype.startsWith=function(e){return 0===this.str.indexOf(e)},e.prototype.endsWith=function(e){var t,n=e.split("").reverse().join("");return t=this.str.split("").reverse().join(""),this.startsWith.call({str:t},n)},e.prototype.contains=function(e){return-1!==this.str.indexOf(e)},e.prototype.equals=function(e){return this.str===e},e.prototype.value=function(){return this.str},e}();Ee.QueryableString=Ie,Object.defineProperty(be,"__esModule",{value:!0}),be.Target=void 0;var Te=P,Oe=L,Se=ne,Ne=Ee,Ae=function(){function e(e,t,n,r){this.id=Oe.id(),this.type=e,this.serviceIdentifier=n,this.name=new Ne.QueryableString(t||""),this.metadata=new Array;var i=null;"string"==typeof r?i=new Se.Metadata(Te.NAMED_TAG,r):r instanceof Se.Metadata&&(i=r),null!==i&&this.metadata.push(i)}return e.prototype.hasTag=function(e){for(var t=0,n=this.metadata;t<n.length;t++){if(n[t].key===e)return!0}return!1},e.prototype.isArray=function(){return this.hasTag(Te.MULTI_INJECT_TAG)},e.prototype.matchesArray=function(e){return this.matchesTag(Te.MULTI_INJECT_TAG)(e)},e.prototype.isNamed=function(){return this.hasTag(Te.NAMED_TAG)},e.prototype.isTagged=function(){return this.metadata.some((function(e){return Te.NON_CUSTOM_TAG_KEYS.every((function(t){return e.key!==t}))}))},e.prototype.isOptional=function(){return this.matchesTag(Te.OPTIONAL_TAG)(!0)},e.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter((function(e){return e.key===Te.NAMED_TAG}))[0]:null},e.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter((function(e){return Te.NON_CUSTOM_TAG_KEYS.every((function(t){return e.key!==t}))})):null},e.prototype.matchesNamedTag=function(e){return this.matchesTag(Te.NAMED_TAG)(e)},e.prototype.matchesTag=function(e){var t=this;return function(n){for(var r=0,i=t.metadata;r<i.length;r++){var o=i[r];if(o.key===e&&o.value===n)return!0}return!1}},e}();be.Target=Ae,function(e){var t=R&&R.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.getFunctionName=e.getBaseClassDependencyCount=e.getDependencies=void 0;var n=se,r=B,i=D,o=P,a=q;Object.defineProperty(e,"getFunctionName",{enumerable:!0,get:function(){return a.getFunctionName}});var c=be;function s(e,n,i,o){var a=e.getConstructorMetadata(i),c=a.compilerGeneratedMetadata;if(void 0===c){var s=r.MISSING_INJECTABLE_ANNOTATION+" "+n+".";throw new Error(s)}var f=a.userGeneratedMetadata,d=Object.keys(f),h=0===i.length&&d.length>0,p=d.length>i.length,v=function(e,t,n,r,i){for(var o=[],a=0;a<i;a++){var c=u(a,e,t,n,r);null!==c&&o.push(c)}return o}(o,n,c,f,h||p?d.length:i.length),g=l(e,i);return t(t([],v),g)}function u(e,t,o,a,s){var u=s[e.toString()]||[],l=f(u),d=!0!==l.unmanaged,h=a[e],p=l.inject||l.multiInject;if((h=p||h)instanceof n.LazyServiceIdentifer&&(h=h.unwrap()),d){if(!t&&(h===Object||h===Function||void 0===h)){var v=r.MISSING_INJECT_ANNOTATION+" argument "+e+" in class "+o+".";throw new Error(v)}var g=new c.Target(i.TargetTypeEnum.ConstructorArgument,l.targetName,h);return g.metadata=u,g}return null}function l(e,n){for(var r=e.getPropertiesMetadata(n),o=[],a=0,s=Object._ttq_keys(r);a<s.length;a++){var u=s[a],d=r[u],h=f(r[u]),p=h.targetName||u,v=h.inject||h.multiInject,g=new c.Target(i.TargetTypeEnum.ClassProperty,p,v);g.metadata=d,o.push(g)}var y=Object.getPrototypeOf(n.prototype).constructor;if(y!==Object){var _=l(e,y);o=t(t([],o),_)}return o}function f(e){var t={};return e.forEach((function(e){t[e.key.toString()]=e.value})),{inject:t[o.INJECT_TAG],multiInject:t[o.MULTI_INJECT_TAG],targetName:t[o.NAME_TAG],unmanaged:t[o.UNMANAGED_TAG]}}e.getDependencies=function(e,t){return s(e,a.getFunctionName(t),t,!1)},e.getBaseClassDependencyCount=function e(t,n){var r=Object.getPrototypeOf(n.prototype).constructor;if(r!==Object){var i=s(t,a.getFunctionName(r),r,!0),c=i.map((function(e){return e.metadata.filter((function(e){return e.key===o.UNMANAGED_TAG}))})),u=[].concat.apply([],c).length,l=i.length-u;return l>0?l:e(t,r)}return 0}}(ce);var Re={};Object.defineProperty(Re,"__esModule",{value:!0}),Re.Request=void 0;var we=L,Ce=function(){function e(e,t,n,r,i){this.id=we.id(),this.serviceIdentifier=e,this.parentContext=t,this.parentRequest=n,this.target=i,this.childRequests=[],this.bindings=Array.isArray(r)?r:[r],this.requestScope=null===n?new Map:null}return e.prototype.addChildRequest=function(t,n,r){var i=new e(t,this.parentContext,this,n,r);return this.childRequests.push(i),i},e}();Re.Request=Ce,Object.defineProperty(J,"__esModule",{value:!0}),J.getBindingDictionary=J.createMockRequest=J.plan=void 0;var Pe=W,ke=B,Me=D,De=P,Le=K,je=q,xe=$,Ue=ne,Fe=oe,Be=ce,He=Re,Ge=be;function Ve(e){return e._bindingDictionary}function Je(e,t,n,r,i){var o=Ke(n.container,i.serviceIdentifier),a=[];return o.length===Pe.BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&"function"==typeof i.serviceIdentifier&&e.getConstructorMetadata(i.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(i.serviceIdentifier).toSelf(),o=Ke(n.container,i.serviceIdentifier)),a=t?o:o.filter((function(e){var t=new He.Request(e.serviceIdentifier,n,r,e,i);return e.constraint(t)})),function(e,t,n,r){switch(t.length){case Pe.BindingCount.NoBindingsAvailable:if(n.isOptional())return t;var i=je.getServiceIdentifierAsString(e),o=ke.NOT_REGISTERED;throw o+=je.listMetadataForTarget(i,n),o+=je.listRegisteredBindingsForServiceIdentifier(r,i,Ke),new Error(o);case Pe.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return t;case Pe.BindingCount.MultipleBindingsAvailable:default:if(n.isArray())return t;i=je.getServiceIdentifierAsString(e),o=ke.AMBIGUOUS_MATCH+" "+i;throw o+=je.listRegisteredBindingsForServiceIdentifier(r,i,Ke),new Error(o)}}(i.serviceIdentifier,a,i,n.container),a}function We(e,t,n,r,i,o){var a,c;if(null===i){a=Je(e,t,r,null,o),c=new He.Request(n,r,null,a,o);var s=new Fe.Plan(r,c);r.addPlan(s)}else a=Je(e,t,r,i,o),c=i.addChildRequest(o.serviceIdentifier,a,o);a.forEach((function(t){var n=null;if(o.isArray())n=c.addChildRequest(t.serviceIdentifier,t,o);else{if(t.cache)return;n=c}if(t.type===Me.BindingTypeEnum.Instance&&null!==t.implementationType){var i=Be.getDependencies(e,t.implementationType);if(!r.container.options.skipBaseClassChecks){var a=Be.getBaseClassDependencyCount(e,t.implementationType);if(i.length<a){var s=ke.ARGUMENTS_LENGTH_MISMATCH(Be.getFunctionName(t.implementationType));throw new Error(s)}}i.forEach((function(t){We(e,!1,t.serviceIdentifier,r,n,t)}))}}))}function Ke(e,t){var n=[],r=Ve(e);return r.hasKey(t)?n=r.get(t):null!==e.parent&&(n=Ke(e.parent,t)),n}J.getBindingDictionary=Ve,J.plan=function(e,t,n,r,i,o,a,c){void 0===c&&(c=!1);var s=new xe.Context(t),u=function(e,t,n,r,i,o){var a=e?De.MULTI_INJECT_TAG:De.INJECT_TAG,c=new Ue.Metadata(a,n),s=new Ge.Target(t,r,n,c);if(void 0!==i){var u=new Ue.Metadata(i,o);s.metadata.push(u)}return s}(n,r,i,"",o,a);try{return We(e,c,i,s,null,u),s}catch(e){throw Le.isStackOverflowExeption(e)&&s.plan&&je.circularDependencyToException(s.plan.rootRequest),e}},J.createMockRequest=function(e,t,n,r){var i=new Ge.Target(Me.TargetTypeEnum.Variable,"",t,new Ue.Metadata(n,r)),o=new xe.Context(e);return new He.Request(t,o,null,[],i)};var Ye={},qe={},Xe=R&&R.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(qe,"__esModule",{value:!0}),qe.resolveInstance=void 0;var Qe=B,ze=D,Ze=P;qe.resolveInstance=function(e,t,n){var r,i,o=null;if(t.length>0){var a=t.filter((function(e){return null!==e.target&&e.target.type===ze.TargetTypeEnum.ConstructorArgument})).map(n);i=a,o=function(e,t,n){var r=t.filter((function(e){return null!==e.target&&e.target.type===ze.TargetTypeEnum.ClassProperty})),i=r.map(n);return r.forEach((function(t,n){var r;r=t.target.name.value();var o=i[n];e[r]=o})),e}(o=new((r=e)._ttq_bind.apply(r,Xe([void 0],i))),t,n)}else o=new e;return function(e,t){if(Reflect.ttq_hasMetadata(Ze.POST_CONSTRUCT,e)){var n=Reflect.ttq_getMetadata(Ze.POST_CONSTRUCT,e);try{t[n.value]()}catch(t){throw new Error(Qe.POST_CONSTRUCT_ERROR(e.name,t.message))}}}(e,o),o},Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.resolve=void 0;var $e=B,et=D,tt=K,nt=q,rt=qe,it=function(e,t,n){try{return n()}catch(n){throw tt.isStackOverflowExeption(n)?new Error($e.CIRCULAR_DEPENDENCY_IN_FACTORY(e,t.toString())):n}},ot=function(e){return function(t){t.parentContext.setCurrentRequest(t);var n=t.bindings,r=t.childRequests,i=t.target&&t.target.isArray(),o=!(t.parentRequest&&t.parentRequest.target&&t.target&&t.parentRequest.target.matchesArray(t.target.serviceIdentifier));if(i&&o)return r.map((function(t){return ot(e)(t)}));var a=null;if(!t.target.isOptional()||0!==n.length){var c=n[0],s=c.scope===et.BindingScopeEnum.Singleton,u=c.scope===et.BindingScopeEnum.Request;if(s&&c.activated)return c.cache;if(u&&null!==e&&e.has(c.id))return e.get(c.id);if(c.type===et.BindingTypeEnum.ConstantValue)a=c.cache,c.activated=!0;else if(c.type===et.BindingTypeEnum.Function)a=c.cache,c.activated=!0;else if(c.type===et.BindingTypeEnum.Constructor)a=c.implementationType;else if(c.type===et.BindingTypeEnum.DynamicValue&&null!==c.dynamicValue)a=it("toDynamicValue",c.serviceIdentifier,(function(){return c.dynamicValue(t.parentContext)}));else if(c.type===et.BindingTypeEnum.Factory&&null!==c.factory)a=it("toFactory",c.serviceIdentifier,(function(){return c.factory(t.parentContext)}));else if(c.type===et.BindingTypeEnum.Provider&&null!==c.provider)a=it("toProvider",c.serviceIdentifier,(function(){return c.provider(t.parentContext)}));else{if(c.type!==et.BindingTypeEnum.Instance||null===c.implementationType){var l=nt.getServiceIdentifierAsString(t.serviceIdentifier);throw new Error($e.INVALID_BINDING_TYPE+" "+l)}a=rt.resolveInstance(c.implementationType,r,ot(e))}return"function"==typeof c.onActivation&&(a=c.onActivation(t.parentContext,a)),s&&(c.cache=a,c.activated=!0),u&&null!==e&&!e.has(c.id)&&e.set(c.id,a),a}}};Ye.resolve=function(e){return ot(e.plan.rootRequest.requestScope)(e.plan.rootRequest)};var at={},ct={},st={},ut={},lt={},ft={},dt={};Object.defineProperty(dt,"__esModule",{value:!0}),dt.typeConstraint=dt.namedConstraint=dt.taggedConstraint=dt.traverseAncerstors=void 0;var ht=P,pt=ne,vt=function(e,t){var n=e.parentRequest;return null!==n&&(!!t(n)||vt(n,t))};dt.traverseAncerstors=vt;var gt=function(e){return function(t){var n=function(n){return null!==n&&null!==n.target&&n.target.matchesTag(e)(t)};return n.metaData=new pt.Metadata(e,t),n}};dt.taggedConstraint=gt;var yt=gt(ht.NAMED_TAG);dt.namedConstraint=yt;dt.typeConstraint=function(e){return function(t){var n=null;if(null!==t){if(n=t.bindings[0],"string"==typeof e)return n.serviceIdentifier===e;var r=t.bindings[0].implementationType;return e===r}return!1}},Object.defineProperty(ft,"__esModule",{value:!0}),ft.BindingWhenSyntax=void 0;var _t=lt,mt=dt,bt=function(){function e(e){this._binding=e}return e.prototype.when=function(e){return this._binding.constraint=e,new _t.BindingOnSyntax(this._binding)},e.prototype.whenTargetNamed=function(e){return this._binding.constraint=mt.namedConstraint(e),new _t.BindingOnSyntax(this._binding)},e.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(e){return null!==e.target&&!e.target.isNamed()&&!e.target.isTagged()},new _t.BindingOnSyntax(this._binding)},e.prototype.whenTargetTagged=function(e,t){return this._binding.constraint=mt.taggedConstraint(e)(t),new _t.BindingOnSyntax(this._binding)},e.prototype.whenInjectedInto=function(e){return this._binding.constraint=function(t){return mt.typeConstraint(e)(t.parentRequest)},new _t.BindingOnSyntax(this._binding)},e.prototype.whenParentNamed=function(e){return this._binding.constraint=function(t){return mt.namedConstraint(e)(t.parentRequest)},new _t.BindingOnSyntax(this._binding)},e.prototype.whenParentTagged=function(e,t){return this._binding.constraint=function(n){return mt.taggedConstraint(e)(t)(n.parentRequest)},new _t.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorIs=function(e){return this._binding.constraint=function(t){return mt.traverseAncerstors(t,mt.typeConstraint(e))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorIs=function(e){return this._binding.constraint=function(t){return!mt.traverseAncerstors(t,mt.typeConstraint(e))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorNamed=function(e){return this._binding.constraint=function(t){return mt.traverseAncerstors(t,mt.namedConstraint(e))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorNamed=function(e){return this._binding.constraint=function(t){return!mt.traverseAncerstors(t,mt.namedConstraint(e))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._binding.constraint=function(n){return mt.traverseAncerstors(n,mt.taggedConstraint(e)(t))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorTagged=function(e,t){return this._binding.constraint=function(n){return!mt.traverseAncerstors(n,mt.taggedConstraint(e)(t))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorMatches=function(e){return this._binding.constraint=function(t){return mt.traverseAncerstors(t,e)},new _t.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorMatches=function(e){return this._binding.constraint=function(t){return!mt.traverseAncerstors(t,e)},new _t.BindingOnSyntax(this._binding)},e}();ft.BindingWhenSyntax=bt,Object.defineProperty(lt,"__esModule",{value:!0}),lt.BindingOnSyntax=void 0;var Et=ft,It=function(){function e(e){this._binding=e}return e.prototype.onActivation=function(e){return this._binding.onActivation=e,new Et.BindingWhenSyntax(this._binding)},e}();lt.BindingOnSyntax=It,Object.defineProperty(ut,"__esModule",{value:!0}),ut.BindingWhenOnSyntax=void 0;var Tt=lt,Ot=ft,St=function(){function e(e){this._binding=e,this._bindingWhenSyntax=new Ot.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new Tt.BindingOnSyntax(this._binding)}return e.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},e.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(e,t){return this._bindingWhenSyntax.whenTargetTagged(e,t)},e.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},e.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},e.prototype.whenParentTagged=function(e,t){return this._bindingWhenSyntax.whenParentTagged(e,t)},e.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},e.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},e.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,t)},e.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},e.prototype.whenNoAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenNoAncestorTagged(e,t)},e.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},e.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},e.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},e}();ut.BindingWhenOnSyntax=St,Object.defineProperty(st,"__esModule",{value:!0}),st.BindingInSyntax=void 0;var Nt=D,At=ut,Rt=function(){function e(e){this._binding=e}return e.prototype.inRequestScope=function(){return this._binding.scope=Nt.BindingScopeEnum.Request,new At.BindingWhenOnSyntax(this._binding)},e.prototype.inSingletonScope=function(){return this._binding.scope=Nt.BindingScopeEnum.Singleton,new At.BindingWhenOnSyntax(this._binding)},e.prototype.inTransientScope=function(){return this._binding.scope=Nt.BindingScopeEnum.Transient,new At.BindingWhenOnSyntax(this._binding)},e}();st.BindingInSyntax=Rt,Object.defineProperty(ct,"__esModule",{value:!0}),ct.BindingInWhenOnSyntax=void 0;var wt=st,Ct=lt,Pt=ft,kt=function(){function e(e){this._binding=e,this._bindingWhenSyntax=new Pt.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new Ct.BindingOnSyntax(this._binding),this._bindingInSyntax=new wt.BindingInSyntax(e)}return e.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},e.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},e.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},e.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},e.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(e,t){return this._bindingWhenSyntax.whenTargetTagged(e,t)},e.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},e.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},e.prototype.whenParentTagged=function(e,t){return this._bindingWhenSyntax.whenParentTagged(e,t)},e.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},e.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},e.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,t)},e.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},e.prototype.whenNoAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenNoAncestorTagged(e,t)},e.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},e.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},e.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},e}();ct.BindingInWhenOnSyntax=kt,Object.defineProperty(at,"__esModule",{value:!0}),at.BindingToSyntax=void 0;var Mt=B,Dt=D,Lt=ct,jt=ut,xt=function(){function e(e){this._binding=e}return e.prototype.to=function(e){return this._binding.type=Dt.BindingTypeEnum.Instance,this._binding.implementationType=e,new Lt.BindingInWhenOnSyntax(this._binding)},e.prototype.toSelf=function(){if("function"!=typeof this._binding.serviceIdentifier)throw new Error(""+Mt.INVALID_TO_SELF_VALUE);var e=this._binding.serviceIdentifier;return this.to(e)},e.prototype.toConstantValue=function(e){return this._binding.type=Dt.BindingTypeEnum.ConstantValue,this._binding.cache=e,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=Dt.BindingScopeEnum.Singleton,new jt.BindingWhenOnSyntax(this._binding)},e.prototype.toDynamicValue=function(e){return this._binding.type=Dt.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=e,this._binding.implementationType=null,new Lt.BindingInWhenOnSyntax(this._binding)},e.prototype.toConstructor=function(e){return this._binding.type=Dt.BindingTypeEnum.Constructor,this._binding.implementationType=e,this._binding.scope=Dt.BindingScopeEnum.Singleton,new jt.BindingWhenOnSyntax(this._binding)},e.prototype.toFactory=function(e){return this._binding.type=Dt.BindingTypeEnum.Factory,this._binding.factory=e,this._binding.scope=Dt.BindingScopeEnum.Singleton,new jt.BindingWhenOnSyntax(this._binding)},e.prototype.toFunction=function(e){if("function"!=typeof e)throw new Error(Mt.INVALID_FUNCTION_BINDING);var t=this.toConstantValue(e);return this._binding.type=Dt.BindingTypeEnum.Function,this._binding.scope=Dt.BindingScopeEnum.Singleton,t},e.prototype.toAutoFactory=function(e){return this._binding.type=Dt.BindingTypeEnum.Factory,this._binding.factory=function(t){return function(){return t.container.get(e)}},this._binding.scope=Dt.BindingScopeEnum.Singleton,new jt.BindingWhenOnSyntax(this._binding)},e.prototype.toProvider=function(e){return this._binding.type=Dt.BindingTypeEnum.Provider,this._binding.provider=e,this._binding.scope=Dt.BindingScopeEnum.Singleton,new jt.BindingWhenOnSyntax(this._binding)},e.prototype.toService=function(e){this.toDynamicValue((function(t){return t.container.get(e)}))},e}();at.BindingToSyntax=xt;var Ut={};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.ContainerSnapshot=void 0;var Ft=function(){function e(){}return e.of=function(t,n){var r=new e;return r.bindings=t,r.middleware=n,r},e}();Ut.ContainerSnapshot=Ft;var Bt={};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.Lookup=void 0;var Ht=B,Gt=function(){function e(){this._map=new Map}return e.prototype.getMap=function(){return this._map},e.prototype.add=function(e,t){if(null==e)throw new Error(Ht.NULL_ARGUMENT);if(null==t)throw new Error(Ht.NULL_ARGUMENT);var n=this._map.get(e);void 0!==n?(n.push(t),this._map.set(e,n)):this._map.set(e,[t])},e.prototype.get=function(e){if(null==e)throw new Error(Ht.NULL_ARGUMENT);var t=this._map.get(e);if(void 0!==t)return t;throw new Error(Ht.KEY_NOT_FOUND)},e.prototype.remove=function(e){if(null==e)throw new Error(Ht.NULL_ARGUMENT);if(!this._map.delete(e))throw new Error(Ht.KEY_NOT_FOUND)},e.prototype.removeByCondition=function(e){var t=this;this._map.forEach((function(n,r){var i=n.filter((function(t){return!e(t)}));i.length>0?t._map.set(r,i):t._map.delete(r)}))},e.prototype.hasKey=function(e){if(null==e)throw new Error(Ht.NULL_ARGUMENT);return this._map.has(e)},e.prototype.clone=function(){var t=new e;return this._map.forEach((function(e,n){e.forEach((function(e){return t.add(n,e.clone())}))})),t},e.prototype.traverse=function(e){this._map.forEach((function(t,n){e(n,t)}))},e}();Bt.Lookup=Gt;var Vt=R&&R.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},Jt=R&&R.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}},Wt=R&&R.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(k,"__esModule",{value:!0}),k.Container=void 0;var Kt=M,Yt=B,qt=D,Xt=P,Qt=H,zt=J,Zt=Ye,$t=at,en=L,tn=q,nn=Ut,rn=Bt,on=function(){function e(e){this._appliedMiddleware=[];var t=e||{};if("object"!=typeof t)throw new Error(""+Yt.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(void 0===t.defaultScope)t.defaultScope=qt.BindingScopeEnum.Transient;else if(t.defaultScope!==qt.BindingScopeEnum.Singleton&&t.defaultScope!==qt.BindingScopeEnum.Transient&&t.defaultScope!==qt.BindingScopeEnum.Request)throw new Error(""+Yt.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(void 0===t.autoBindInjectable)t.autoBindInjectable=!1;else if("boolean"!=typeof t.autoBindInjectable)throw new Error(""+Yt.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(void 0===t.skipBaseClassChecks)t.skipBaseClassChecks=!1;else if("boolean"!=typeof t.skipBaseClassChecks)throw new Error(""+Yt.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:t.autoBindInjectable,defaultScope:t.defaultScope,skipBaseClassChecks:t.skipBaseClassChecks},this.id=en.id(),this._bindingDictionary=new rn.Lookup,this._snapshots=[],this._middleware=null,this.parent=null,this._metadataReader=new Qt.MetadataReader}return e.merge=function(t,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var o=new e,a=Wt([t,n],r).map((function(e){return zt.getBindingDictionary(e)})),c=zt.getBindingDictionary(o);function s(e,t){e.traverse((function(e,n){n.forEach((function(e){t.add(e.serviceIdentifier,e.clone())}))}))}return a.forEach((function(e){s(e,c)})),o},e.prototype.load=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=this._getContainerModuleHelpersFactory(),r=0,i=e;r<i.length;r++){var o=i[r],a=n(o.id);o.registry(a.bindFunction,a.unbindFunction,a.isboundFunction,a.rebindFunction)}},e.prototype.loadAsync=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Vt(this,void 0,void 0,(function(){var t,n,r,i,o;return Jt(this,(function(a){switch(a.label){case 0:t=this._getContainerModuleHelpersFactory(),n=0,r=e,a.label=1;case 1:return n<r.length?(i=r[n],o=t(i.id),[4,i.registry(o.bindFunction,o.unbindFunction,o.isboundFunction,o.rebindFunction)]):[3,4];case 2:a.sent(),a.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},e.prototype.unload=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=function(e){return function(t){return t.moduleId===e}};t.forEach((function(t){var n=r(t.id);e._bindingDictionary.removeByCondition(n)}))},e.prototype.bind=function(e){var t=this.options.defaultScope||qt.BindingScopeEnum.Transient,n=new Kt.Binding(e,t);return this._bindingDictionary.add(e,n),new $t.BindingToSyntax(n)},e.prototype.rebind=function(e){return this.unbind(e),this.bind(e)},e.prototype.unbind=function(e){try{this._bindingDictionary.remove(e)}catch(t){throw new Error(Yt.CANNOT_UNBIND+" "+tn.getServiceIdentifierAsString(e))}},e.prototype.unbindAll=function(){this._bindingDictionary=new rn.Lookup},e.prototype.isBound=function(e){var t=this._bindingDictionary.hasKey(e);return!t&&this.parent&&(t=this.parent.isBound(e)),t},e.prototype.isBoundNamed=function(e,t){return this.isBoundTagged(e,Xt.NAMED_TAG,t)},e.prototype.isBoundTagged=function(e,t,n){var r=!1;if(this._bindingDictionary.hasKey(e)){var i=this._bindingDictionary.get(e),o=zt.createMockRequest(this,e,t,n);r=i.some((function(e){return e.constraint(o)}))}return!r&&this.parent&&(r=this.parent.isBoundTagged(e,t,n)),r},e.prototype.snapshot=function(){this._snapshots.push(nn.ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware))},e.prototype.restore=function(){var e=this._snapshots.pop();if(void 0===e)throw new Error(Yt.NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=e.bindings,this._middleware=e.middleware},e.prototype.createChild=function(t){var n=new e(t||this.options);return n.parent=this,n},e.prototype.applyMiddleware=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._appliedMiddleware=this._appliedMiddleware.concat(e);var n=this._middleware?this._middleware:this._planAndResolve();this._middleware=e.reduce((function(e,t){return t(e)}),n)},e.prototype.applyCustomMetadataReader=function(e){this._metadataReader=e},e.prototype.get=function(e){return this._get(!1,!1,qt.TargetTypeEnum.Variable,e)},e.prototype.getTagged=function(e,t,n){return this._get(!1,!1,qt.TargetTypeEnum.Variable,e,t,n)},e.prototype.getNamed=function(e,t){return this.getTagged(e,Xt.NAMED_TAG,t)},e.prototype.getAll=function(e){return this._get(!0,!0,qt.TargetTypeEnum.Variable,e)},e.prototype.getAllTagged=function(e,t,n){return this._get(!1,!0,qt.TargetTypeEnum.Variable,e,t,n)},e.prototype.getAllNamed=function(e,t){return this.getAllTagged(e,Xt.NAMED_TAG,t)},e.prototype.resolve=function(e){var t=this.createChild();return t.bind(e).toSelf(),this._appliedMiddleware.forEach((function(e){t.applyMiddleware(e)})),t.get(e)},e.prototype._getContainerModuleHelpersFactory=function(){var e=this,t=function(e,t){e._binding.moduleId=t},n=function(n){return function(r){var i=e.rebind.bind(e)(r);return t(i,n),i}};return function(r){return{bindFunction:(i=r,function(n){var r=e.bind.bind(e)(n);return t(r,i),r}),isboundFunction:function(t){return e.isBound.bind(e)(t)},rebindFunction:n(r),unbindFunction:function(t){e.unbind.bind(e)(t)}};var i}},e.prototype._get=function(e,t,n,r,i,o){var a=null,c={avoidConstraints:e,contextInterceptor:function(e){return e},isMultiInject:t,key:i,serviceIdentifier:r,targetType:n,value:o};if(this._middleware){if(null==(a=this._middleware(c)))throw new Error(Yt.INVALID_MIDDLEWARE_RETURN)}else a=this._planAndResolve()(c);return a},e.prototype._planAndResolve=function(){var e=this;return function(t){var n=zt.plan(e._metadataReader,e,t.isMultiInject,t.targetType,t.serviceIdentifier,t.key,t.value,t.avoidConstraints);return n=t.contextInterceptor(n),Zt.resolve(n)}},e}();k.Container=on;var an={};Object.defineProperty(an,"__esModule",{value:!0}),an.AsyncContainerModule=an.ContainerModule=void 0;var cn=L,sn=function(e){this.id=cn.id(),this.registry=e};an.ContainerModule=sn;var un=function(e){this.id=cn.id(),this.registry=e};an.AsyncContainerModule=un;var ln={};Object.defineProperty(ln,"__esModule",{value:!0}),ln.injectable=void 0;var fn=B,dn=P;ln.injectable=function(){return function(e){if(Reflect.ttq_hasOwnMetadata(dn.PARAM_TYPES,e))throw new Error(fn.DUPLICATED_INJECTABLE_DECORATOR);var t=Reflect.ttq_getMetadata(dn.DESIGN_PARAM_TYPES,e)||[];return Reflect.ttq_defineMetadata(dn.PARAM_TYPES,t,e),e}};var hn={};Object.defineProperty(hn,"__esModule",{value:!0}),hn.tagged=void 0;var pn=ne,vn=ue;hn.tagged=function(e,t){return function(n,r,i){var o=new pn.Metadata(e,t);"number"==typeof i?vn.tagParameter(n,r,i,o):vn.tagProperty(n,r,o)}};var gn={};Object.defineProperty(gn,"__esModule",{value:!0}),gn.named=void 0;var yn=P,_n=ne,mn=ue;gn.named=function(e){return function(t,n,r){var i=new _n.Metadata(yn.NAMED_TAG,e);"number"==typeof r?mn.tagParameter(t,n,r,i):mn.tagProperty(t,n,i)}};var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.optional=void 0;var En=P,In=ne,Tn=ue;bn.optional=function(){return function(e,t,n){var r=new In.Metadata(En.OPTIONAL_TAG,!0);"number"==typeof n?Tn.tagParameter(e,t,n,r):Tn.tagProperty(e,t,r)}};var On={};Object.defineProperty(On,"__esModule",{value:!0}),On.unmanaged=void 0;var Sn=P,Nn=ne,An=ue;On.unmanaged=function(){return function(e,t,n){var r=new Nn.Metadata(Sn.UNMANAGED_TAG,!0);An.tagParameter(e,t,n,r)}};var Rn={};Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.multiInject=void 0;var wn=P,Cn=ne,Pn=ue;Rn.multiInject=function(e){return function(t,n,r){var i=new Cn.Metadata(wn.MULTI_INJECT_TAG,e);"number"==typeof r?Pn.tagParameter(t,n,r,i):Pn.tagProperty(t,n,i)}};var kn={};Object.defineProperty(kn,"__esModule",{value:!0}),kn.targetName=void 0;var Mn=P,Dn=ne,Ln=ue;kn.targetName=function(e){return function(t,n,r){var i=new Dn.Metadata(Mn.NAME_TAG,e);Ln.tagParameter(t,n,r,i)}};var jn={};Object.defineProperty(jn,"__esModule",{value:!0}),jn.postConstruct=void 0;var xn=B,Un=P,Fn=ne;jn.postConstruct=function(){return function(e,t,n){var r=new Fn.Metadata(Un.POST_CONSTRUCT,t);if(Reflect.ttq_hasOwnMetadata(Un.POST_CONSTRUCT,e.constructor))throw new Error(xn.MULTIPLE_POST_CONSTRUCT_METHODS);Reflect.ttq_defineMetadata(Un.POST_CONSTRUCT,r,e.constructor)}};var Bn={};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.multiBindToService=void 0;Bn.multiBindToService=function(e){return function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.forEach((function(n){return e.bind(n).toService(t)}))}}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.multiBindToService=e.getServiceIdentifierAsString=e.typeConstraint=e.namedConstraint=e.taggedConstraint=e.traverseAncerstors=e.decorate=e.id=e.MetadataReader=e.postConstruct=e.targetName=e.multiInject=e.unmanaged=e.optional=e.LazyServiceIdentifer=e.inject=e.named=e.tagged=e.injectable=e.ContainerModule=e.AsyncContainerModule=e.TargetTypeEnum=e.BindingTypeEnum=e.BindingScopeEnum=e.Container=e.METADATA_KEY=void 0;var t=P;e.METADATA_KEY=t;var n=k;Object.defineProperty(e,"Container",{enumerable:!0,get:function(){return n.Container}});var r=D;Object.defineProperty(e,"BindingScopeEnum",{enumerable:!0,get:function(){return r.BindingScopeEnum}}),Object.defineProperty(e,"BindingTypeEnum",{enumerable:!0,get:function(){return r.BindingTypeEnum}}),Object.defineProperty(e,"TargetTypeEnum",{enumerable:!0,get:function(){return r.TargetTypeEnum}});var i=an;Object.defineProperty(e,"AsyncContainerModule",{enumerable:!0,get:function(){return i.AsyncContainerModule}}),Object.defineProperty(e,"ContainerModule",{enumerable:!0,get:function(){return i.ContainerModule}});var o=ln;Object.defineProperty(e,"injectable",{enumerable:!0,get:function(){return o.injectable}});var a=hn;Object.defineProperty(e,"tagged",{enumerable:!0,get:function(){return a.tagged}});var c=gn;Object.defineProperty(e,"named",{enumerable:!0,get:function(){return c.named}});var s=se;Object.defineProperty(e,"inject",{enumerable:!0,get:function(){return s.inject}}),Object.defineProperty(e,"LazyServiceIdentifer",{enumerable:!0,get:function(){return s.LazyServiceIdentifer}});var u=bn;Object.defineProperty(e,"optional",{enumerable:!0,get:function(){return u.optional}});var l=On;Object.defineProperty(e,"unmanaged",{enumerable:!0,get:function(){return l.unmanaged}});var f=Rn;Object.defineProperty(e,"multiInject",{enumerable:!0,get:function(){return f.multiInject}});var d=kn;Object.defineProperty(e,"targetName",{enumerable:!0,get:function(){return d.targetName}});var h=jn;Object.defineProperty(e,"postConstruct",{enumerable:!0,get:function(){return h.postConstruct}});var p=H;Object.defineProperty(e,"MetadataReader",{enumerable:!0,get:function(){return p.MetadataReader}});var v=L;Object.defineProperty(e,"id",{enumerable:!0,get:function(){return v.id}});var g=ue;Object.defineProperty(e,"decorate",{enumerable:!0,get:function(){return g.decorate}});var y=dt;Object.defineProperty(e,"traverseAncerstors",{enumerable:!0,get:function(){return y.traverseAncerstors}}),Object.defineProperty(e,"taggedConstraint",{enumerable:!0,get:function(){return y.taggedConstraint}}),Object.defineProperty(e,"namedConstraint",{enumerable:!0,get:function(){return y.namedConstraint}}),Object.defineProperty(e,"typeConstraint",{enumerable:!0,get:function(){return y.typeConstraint}});var _=q;Object.defineProperty(e,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return _.getServiceIdentifierAsString}});var m=Bn;Object.defineProperty(e,"multiBindToService",{enumerable:!0,get:function(){return m.multiBindToService}})}(C);var Hn,Gn,Vn,Jn,Wn,Kn,Yn,qn,Xn,Qn,zn=["ttuts","ad_info_from"];!function(e){e.LDU="limited_data_use",e.EVENTID="eventID",e.EVENT_ID="event_id"}(Hn||(Hn={})),function(e){e[e.defaultReport=0]="defaultReport",e[e.httpReport=1]="httpReport",e[e.htmlHttpReport=2]="htmlHttpReport"}(Gn||(Gn={})),function(e){e.Normal="1",e.Iframe="2",e.WebWorker="3",e.SandboxIframe="4"}(Vn||(Vn={})),function(e){e.EMPTY_VALUE="empty_value",e.WRONG_FORMAT="wrong_format",e.CORRECT_FORMAT="correct_format",e.HASHED="hashed",e.HASHED_ERR="hashed_err",e.HASHED_CORRECT="hashed_correct",e.PLAINTEXT_EMAIL="plaintext_email",e.PLAINTEXT_PHONE="plaintext_phone"}(Jn||(Jn={})),function(e){e.EMPTY_VALUE="empty_value",e.PLAIN_EMAIL="plain_email",e.PLAIN_PHONE="plain_phone",e.HASHED="hashed",e.FILTER_EVENTS="filter_events",e.UNKNOWN_INVALID="unknown_invalid",e.BASE64_STRING_HASHED="base64_string_hashed",e.BASE64_HEX_HASHED="base64_hex_hashed",e.PLAIN_MDN_EMAIL="plain_mdn_email"}(Wn||(Wn={})),function(e){e.Manual="manual",e.Auto="auto"}(Kn||(Kn={})),function(e){e.empty="empty",e.whitespace="whitespace",e.hardcode="hardcode",e.encode="encode"}(Yn||(Yn={})),function(e){e.letterCase="letter_case",e.isNotValidEmail="is_not_valid_email",e.isNotPossibleEmail="is_not_possible_email",e.domainTypo="domain_typo",e.addressFormat="address_format"}(qn||(qn={})),function(e){e.invalidCountry="invalid_country",e.notANumber="not_a_number",e.tooShort="too_short",e.tooLong="too_long",e.invalidLength="invalid_length",e.emptyCountryCodeThroughIP="empty_country_code_through_ip",e.invalidCountryAfterInjectPlus="invalid_country_after_inject_plus",e.notANumberAfterInjectPlus="not_a_number_after_inject_plus",e.tooShortAfterInjectPlus="too_short_after_inject_plus",e.tooLongAfterInjectPlus="too_long_after_inject_plus",e.invalidLengthAfterInjectPlus="invalid_length_after_inject_plus",e.invalidCountryAfterInjectCountry="invalid_country_after_inject_country",e.notANumberAfterInjectCountry="not_a_number_after_inject_country",e.tooShortAfterInjectCountry="too_short_after_inject_country",e.tooLongAfterInjectCountry="too_long_after_inject_country",e.invalidLengthAfterInjectCountry="invalid_length_after_inject_country"}(Xn||(Xn={})),function(e){e.missing="missing",e.valid="valid",e.invalid="invalid"}(Qn||(Qn={}));var Zn,$n,er={raw_email:{label:Qn.missing},raw_auto_email:{label:Qn.missing},raw_phone:{label:Qn.missing},raw_auto_phone:{label:Qn.missing},hashed_email:{label:Qn.missing},hashed_phone:{label:Qn.missing}};!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.HOLD=1]="HOLD",e[e.REVOKE=2]="REVOKE",e[e.GRANT=3]="GRANT"}(Zn||(Zn={})),function(e){e[e.NOT_SURE=0]="NOT_SURE",e[e.INVOKE_METHOD_ENABLED=1]="INVOKE_METHOD_ENABLED",e[e.INVOKE_METHOD_NOT_ENABLED=2]="INVOKE_METHOD_NOT_ENABLED",e[e.TOUTIAO_BRIDGE_NOT_ENABLED=3]="TOUTIAO_BRIDGE_NOT_ENABLED"}($n||($n={}));var tr=function(e){return"[object Object]"===Object.prototype.toString.call(e)},nr=function(e){return"".concat(e,"-").concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)},rr=function(e,t){return"".concat(e,"-").concat(t)},ir=function(){return new Date(Date.now()+864e5).toUTCString()};var or,ar,cr,sr="tt_adInfo",ur="tt_appInfo",lr="_tt_enable_cookie",fr="_ttp",dr="pageId",hr="messageId",pr="tt_sessionId",vr="tt_pixel_session_index",gr="default_eventId";!function(e){e[e.OFFSITE=0]="OFFSITE",e[e.ONSITE=1]="ONSITE"}(or||(or={})),function(e){e.INIT_START="initStart",e.INIT_END="initEnd",e.CONTEXT_INIT_START="contextInitStart",e.CONTEXT_INIT_END="contextInitEnd",e.PAGE_URL_WILL_CHANGE="pageUrlWillChange",e.PAGE_URL_DID_CHANGE="pageUrlDidChange",e.PAGE_DID_LOAD="pageDidLoad",e.PAGE_WILL_LEAVE="pageWillLeave",e.AD_INFO_INIT_START="adInfoInitStart",e.AD_INFO_INIT_END="adInfoInitEnd",e.BEFORE_AD_INFO_INIT_START="beforeAdInfoInitStart",e.BEFORE_SHOPIFY_PIXEL_SEND="beforeShopifyPixelSend",e.PIXEL_SEND="pixelSend",e.PIXEL_DID_MOUNT="pixelDidMount"}(ar||(ar={})),function(e){e.EXTERNAL="external",e.APP="app",e.TIKTOK="tiktok"}(cr||(cr={}));var yr,_r="Pageview",mr=[],br={TTQ:Symbol.for("TTQ"),GLOBAL_TTQ:Symbol.for("GLOBAL_TTQ"),SHOPIFY_TTQ:Symbol.for("SHOPIFY_TTQ"),ENV:Symbol.for("ENV"),CONTEXT:Symbol.for("CONTEXT"),REPORTER:Symbol.for("REPORTER"),REPORTERS:Symbol.for("REPORTERS"),PLUGIN:Symbol.for("PLUGIN"),PLUGINS:Symbol.for("PLUGINS"),TTQ_GLOBAL_OPTIONS:Symbol.for("TTQ_GLOBAL_OPTIONS"),PERFORMANCE_PLUGIN:Symbol.for("PERFORMANCE_PLUGIN"),INTERACTION_PLUGIN:Symbol.for("INTERACTION_PLUGIN"),INTERACTION_PLUGIN_MONITOR:Symbol.for("INTERACTION_PLUGIN_MONITOR"),PERFORMANCE_PLUGIN_MONITOR:Symbol.for("PERFORMANCE_PLUGIN_MONITOR"),ADVANCED_MATCHING_PLUGIN:Symbol.for("ADVANCED_MATCHING_PLUGIN"),AUTO_ADVANCED_MATCHING_PLUGIN:Symbol.for("AUTO_ADVANCED_MATCHING_PLUGIN"),CALLBACK_PLUGIN:Symbol.for("CALLBACK_PLUGIN"),IDENTIFY_PLUGIN:Symbol.for("IDENTIFY_PLUGIN"),MONITOR_PLUGIN:Symbol.for("MONITOR_PLUGIN"),PERFORMANCE_INTERACTION_PLUGIN:Symbol.for("PERFORMANCE_INTERACTION_PLUGIN"),WEB_FL_PLUGIN:Symbol.for("WEB_FL_PLUGIN"),SHOPIFY_PLUGIN:Symbol.for("SHOPIFY_PLUGIN"),AUTO_CONFIG_PLUGIN:Symbol.for("AUTO_CONFIG_PLUGIN"),DIAGNOSTICS_CONSOLE_PLUGIN:Symbol.for("DIAGNOSTICS_CONSOLE_PLUGIN"),COMPETITOR_INSIGHT_PLUGIN:Symbol.for("COMPETITOR_INSIGHT_PLUGIN"),PANGLE_COOKIE_MATCHING_PLUGIN:Symbol.for("PANGLE_COOKIE_MATCHING_PLUGIN"),BATCH_SERVICE:Symbol.for("BATCH_SERVICE"),REPORT_SERVICE:Symbol.for("REPORT_SERVICE"),AD_SERVICE:Symbol.for("AD_SERVICE"),APP_SERVICE:Symbol.for("APP_SERVICE"),BRIDGE_SERVICE:Symbol.for("BRIDGE"),HTTP_SERVICE:Symbol.for("HTTP_SERVICE"),COOKIE_SERVICE:Symbol.for("COOKIE_SERVICE"),CONSENT_SERVICE:Symbol.for("CONSENT_SERVICE"),JS_BRIDGE:Symbol("JS_BRIDGE"),TTQ_REPORTERS:Symbol.for("TTQ_REPORTERS"),INTERACTION_MONITOR:Symbol.for("INTERACTION_MONITOR"),PERFORMANCE_MONITOR:Symbol.for("PERFORMANCE_MONITOR")};!function(e){e.TRACK="track",e.PERFORMANCE="performance",e.INTERACTION="interaction",e.PCM="PCM",e.PERFORMANCE_INTERACTION="performance_interaction",e.SELFHOST="selfhost",e.AUTO_CONFIG="auto_config"}(yr||(yr={}));var Er,Ir,Tr=["EnrichAM"],Or="https://analytics.tiktok.com/api/v2",Sr="".concat(Or,"/pixel"),Nr="".concat(Or,"/performance"),Ar="".concat(Or,"/interaction"),Rr="".concat(Or,"/performance_interaction"),wr="".concat(Or,"/pixel/act"),Cr="ttclid",Pr="ext_params",kr="_toutiao_params",Mr="ttuts",Dr=["phone_number","email","external_id"],Lr="email_is_hashed",jr="phone_is_hashed",xr="sha256_email",Ur="sha256_phone",Fr="auto_trigger_type";!function(e){e.LOAD_START="load_start",e.LOAD_END="load_end",e.BEFORE_INIT="before_init",e.INIT_START="init_start",e.INIT_END="init_end",e.JSB_INIT_START="jsb_init_start",e.JSB_INIT_END="jsb_init_end",e.BEFORE_AD_INFO_INIT_START="before_ad_info_init_start",e.AD_INFO_INIT_START="ad_info_init_start",e.AD_INFO_INIT_END="ad_info_init_end",e.IDENTIFY_INIT_START="identify_init_start",e.IDENTIFY_INIT_END="identify_init_end",e.PLUGIN_INIT_START="_init_start",e.PLUGIN_INIT_END="_init_end",e.PIXEL_SEND="pixel_send",e.PIXEL_SEND_PCM="pixel_send_PCM",e.JSB_SEND="jsb_send",e.HTTP_SEND="http_send",e.HANDLE_CACHE="handle_cache",e.INIT_ERROR="init_error",e.PIXEL_EMPTY="pixel_empty",e.JSB_ERROR="jsb_error",e.API_ERROR="api_error",e.PLUGIN_ERROR="plugin_error",e.CUSTOM_INFO="custom_info",e.CUSTOM_ERROR="custom_error"}(Er||(Er={})),function(e){e.EMPTY_EVENT_TYPE_NAME="EMPTY_EVENT_TYPE_NAME",e.MISMATCHED_EVENT_TYPE_NAME_FOR_CUSTOM_EVENT="MISMATCHED_EVENT_TYPE_NAME_FOR_CUSTOM_EVENT",e.LONG_EVENT_TYPE_NAME="LONG_EVENT_TYPE_NAME",e.MISSING_VALUE_PARAMETER="MISSING_VALUE_PARAMETER",e.MISSING_CURRENCY_PARAMETER="MISSING_CURRENCY_PARAMETER",e.MISSING_CONTENT_ID="MISSING_CONTENT_ID",e.MISSING_EMAIL_AND_PHONE="MISSING_EMAIL_AND_PHONE",e.INVALID_EVENT_PARAMETER_VALUE="INVALID_EVENT_PARAMETER_VALUE",e.INVALID_CURRENCY_CODE="INVALID_CURRENCY_CODE",e.INVALID_CONTENT_ID="INVALID_CONTENT_ID",e.INVALID_CONTENT_TYPE="INVALID_CONTENT_TYPE",e.INVALID_EMAIL_FORMAT="INVALID_EMAIL_FORMAT",e.INVALID_PHONE_NUMBER_FORMAT="INVALID_PHONE_NUMBER_FORMAT",e.INVALID_EMAIL_INFORMATION="INVALID_EMAIL_INFORMATION",e.INVALID_PHONE_NUMBER_INFORMATION="INVALID_PHONE_NUMBER_INFORMATION",e.DUPLICATE_PIXEL_CODE="DUPLICATE_PIXEL_CODE",e.MISSING_PIXEL_CODE="MISSING_PIXEL_CODE",e.INVALID_PIXEL_CODE="INVALID_PIXEL_CODE"}(Ir||(Ir={}));var Br=null,Hr=function(){return"object"===("undefined"==typeof window?"undefined":t(window))&&window.TiktokAnalyticsObject||"ttq"},Gr=function(){return Br||"object"===("undefined"==typeof window?"undefined":t(window))&&window[Hr()]},Vr=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:new Function("return this")()},Jr=function(){var e=Vr();return void 0!==e.DedicatedWorkerGlobalScope?e instanceof e.DedicatedWorkerGlobalScope:"DedicatedWorkerGlobalScope"===e.constructor.name},Wr=function(){return!!Gr()._is_onsite},Kr=function(){var e=Vr();return"object"===("undefined"==typeof navigator?"undefined":t(navigator))?navigator.userAgent:e._userAgent||""},Yr=function(e){try{var t=Gr();return t&&t._self_host_config&&t._self_host_config[e]||""}catch(e){return""}},qr=function(){var e=Gr();return e._partner?e._partner:""};var Xr=function(e){return Boolean(e)},Qr=function(e){var t;return Object.keys((null===(t=null==e?void 0:e.context)||void 0===t?void 0:t.user)||{}).some((function(e){return-1!==Dr.indexOf(e)}))};function zr(e,t){var n,r=e;return function(){if(r){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];n=e.apply(t,o),r=null}return n}}var Zr=function(e){return((e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),""))(e)};function $r(e,t){var n=Object.assign({},e);return t.forEach((function(e){null!==n[e]&&void 0!==n[e]&&delete n[e]})),n}var ei=function(e,t){if(!e)return{};var n={};return Object.keys(e).forEach((function(r){t[r]&&(n[r]=e[r])})),n};function ti(e,t,n){var r;return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(r),r=setTimeout((function(){e.apply(n,o)}),t)}}function ni(){return ri.apply(this,arguments)}function ri(){return ri=r(e().mark((function t(){var n,r=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:500,e.abrupt("return",new Promise((function(e){setTimeout((function(){e(!0)}),n)})));case 2:case"end":return e.stop()}}),t)}))),ri.apply(this,arguments)}var ii=["input[type='button']","input[type='image']","input[type='submit']","button","[class*=btn]","[class*=Btn]","[class*=button]","[class*=Button]","[role*=button]","[id*=btn]","[id*=Btn]","[id*=button]","[id*=Button]","a"],oi=["[href^='tel:']","[href^='callto:']","[href^='sms:']","[href^='skype:']","[href^='whatsapp:']","[href^='mailto:']"],ai=function(e){var t=ii.some((function(t){return e.matches(t)})),n=oi.some((function(t){return e.matches(t)}));return t&&!n};function ci(e,n){var r={};for(var i in e)if(e.hasOwnProperty(i)&&!n.hasOwnProperty(i))r[i]=e[i];else if(e.hasOwnProperty(i)&&n.hasOwnProperty(i)&&e[i]!==n[i])if("object"===t(e[i])&&"object"===t(n[i])){var o=ci(e[i],n[i]);Object.keys(o).length>0&&(r[i]=o)}else r[i]=e[i];for(var a in n)n.hasOwnProperty(a)&&!e.hasOwnProperty(a)&&(r[a]=n[a]);return r}function si(e,t){return Object.keys(ci(e,t)).length>0}function ui(e,t){var n={};return e&&("string"==typeof e||"number"==typeof e?n.external_id=e.toString():tr(e)&&(n=e)),t&&tr(t)&&Object.assign(n,t),n}var li=function(){var e,t;return(null===(t=null===(e=Gr())||void 0===e?void 0:e._env)||void 0===t?void 0:t.env)||cr.EXTERNAL},fi=function(){var e,t;return null!==(t=null===(e=Gr())||void 0===e?void 0:e._is_onsite)&&void 0!==t?t:or.OFFSITE},di=function(e){return(e||li())!==cr.EXTERNAL},hi=function(e){return(e||li())===cr.TIKTOK},pi=function(){var e=Kr();return/windows phone/i.test(e)?"Windows Phone":/android/i.test(e)?"android":/iPad|iPhone|iPod/.test(e)?"ios":"pc"},vi=function(){try{return navigator.userAgentData.getHighEntropyValues(["model","platformVersion"])}catch(e){return Promise.resolve({})}},gi=function(){return"android"===pi()},yi=function(){return"ios"===pi()},_i=zr((function(){return/open_news/i.test(Kr())})),mi=zr((function(){return/ultralite/i.test(Kr())}));function bi(){var e;return[$n.INVOKE_METHOD_ENABLED,$n.INVOKE_METHOD_NOT_ENABLED,$n.TOUTIAO_BRIDGE_NOT_ENABLED][[!!(null===(e=null===window||void 0===window?void 0:window.ToutiaoJSBridge)||void 0===e?void 0:e.invokeMethod),!!(null===window||void 0===window?void 0:window.ToutiaoJSBridge),!0].findIndex((function(e){return e}))]}var Ei=function(){return Jr()?Vn.WebWorker:globalThis.self&&globalThis.self!==globalThis.self.top?Vn.Iframe:Vn.Normal},Ii=function(){var e=((Gr()||[])._sapi||self._sapi||{}).settings;return{lib:"ttq",pixelCode:(void 0===e?{}:e).pixelCode||""}};function Ti(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{var r=Gr(),i=r.getPlugin&&r.getPlugin("Monitor")||null;i&&i.info&&"function"==typeof i.info&&i.info.call(i,e,t,n)}catch(e){}}function Oi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];try{var i=Gr(),o=i.getPlugin&&i.getPlugin("Monitor")||null;o&&o.error&&"function"==typeof o.error&&o.error.call(o,e,t,n,r)}catch(e){}}function Si(e,t){try{var n=Gr(),r=n.getPlugin&&n.getPlugin("DiagnosticsConsole")||null;r&&r.warn.apply(r,[e,t])}catch(e){}}function Ni(){try{if(Jr())return Ii();0;var e=document&&document.currentScript,t=e&&e.src||"http://emptyURLSrc";return{pixelCode:new URL(t).searchParams.get("sdkid")||e&&e.getAttribute("data-id")||"",lib:Hr()||"ttq"}}catch(e){return{lib:"ttq",pixelCode:""}}}var Ai=function(e,t){if("selfhost"===e&&t&&Yr(t))return"https://".concat(Yr(t),"/api/v2/pixel");var n={track:Sr,performance:Nr,interaction:Ar,performance_interaction:Rr,auto_config:wr}[e];return n||null},Ri=function(e){try{var t=window.sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return null}},wi=function(e,t){try{var n=JSON.stringify(t);window.sessionStorage.setItem(e,n)}catch(e){}};function Ci(e,t){try{return new URL(e).searchParams.get(t)||""}catch(e){return""}}var Pi=function(e,t){var n=Ci(t||window.location.href,e);return n||Ci(document.referrer,e)},ki="",Mi=function(e){if(0===document.cookie.length)return"";var t=document.cookie.indexOf("".concat(e,"="));if(-1!==t){var n=t+e.length+1,r=document.cookie.indexOf(";",n);return-1===r?unescape(document.cookie.substring(n)):unescape(document.cookie.substring(n,r))}return""},Di=function(e,t,n){try{if(n){if(ki)return n.domain=ki,void(document.cookie="".concat(e,"=").concat(t).concat(Li(n)));for(var r=(n.domain||window.location.hostname).split("."),i=r.length,o="",a=0;a<i;a++){if(o=".".concat(r[i-a-1]).concat(o),n.domain=o,document.cookie="".concat(e,"=").concat(t).concat(Li(n)),Mi(e)){ki=o;break}}}else document.cookie="".concat(e,"=").concat(t).concat(Li(n))}catch(e){}},Li=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},{path:"/"},e);"number"==typeof t.expires&&(t.expires=new Date(Date.now()+864e5*t.expires)),t.expires instanceof Date&&(t.expires=t.expires.toUTCString());var n="";for(var r in t)t[r]&&(n+="; ".concat(r),!0!==t[r]&&(n+="=".concat(t[r].split(";")[0])));return n},ji=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ir(),i={path:n,expires:r};Di(e,t,i)};function xi(e){return new Promise((function(t,n){var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src=e;var i=document.getElementsByTagName("script")[0];i&&i.parentNode?i.parentNode.insertBefore(r,i):n("none element"),r.onload=function(){t(!0)},r.onerror=n}))}var Ui=function(){var t=r(e().mark((function t(n){var r,i=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((r=i.length>1&&void 0!==i[1]?i[1]:1)>=0)){e.next=13;break}return e.prev=2,e.next=5,xi(n);case 5:return e.abrupt("return",Promise.resolve(!0));case 8:return e.prev=8,e.t0=e.catch(2),e.abrupt("return",Ui.call(null,n,r-1));case 11:e.next=14;break;case 13:throw Error;case 14:case"end":return e.stop()}}),t,null,[[2,8]])})));return function(e){return t.apply(this,arguments)}}(),Fi=function(e){return"function"==typeof Promise.allSettled?Promise.allSettled(e):function(e){var t=new Array(e.length),n=0;return new Promise((function(r,i){for(var o=function(i){var o=e[i];o&&"function"==typeof o.then?o.then((function(o){t[i]={status:"fulfilled",value:o},++n===e.length&&r(t)})).catch((function(o){t[i]={status:"rejected",reason:o},++n===e.length&&r(t)})):(t[i]={status:"fulfilled",value:o},++n===e.length&&r(t))},a=0;a<e.length;a++)o(a)}))}(e)},Bi=["COP","USD","DZD","TWD","QAR","VES","NGN","EGP","IDR","HNL","ISK","CRC","PEN","AED","GBP","BOB","DKK","CAD","PKR","MXN","HUF","VND","KWD","RON","BIF","MYR","ZAR","SAR","NOK","SGD","HKD","AUD","CHF","KRW","CNY","TRY","BDT","NZD","CLP","THB","EUR","ARS","NIO","KZT","GTQ","RUB","SEK","MOP","PYG","INR","JPY","CZK","BRL","MAD","PLN","PHP","KES","ILS"];function Hi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t||Bi;return n.includes(e)}function Gi(e){return!isNaN(e)&&e>=0}var Vi=String.fromCharCode.bind(String),Ji=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Wi=function(e){if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?Vi(192|t>>>6)+Vi(128|63&t):Vi(224|t>>>12&15)+Vi(128|t>>>6&63)+Vi(128|63&t)}var n=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return Vi(240|n>>>18&7)+Vi(128|n>>>12&63)+Vi(128|n>>>6&63)+Vi(128|63&n)},Ki=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Yi=function(e){return function(e){return e.replace(/=/g,"").replace(/[+\/]/g,(function(e){return"+"===e?"-":"_"}))}(function(e){for(var t,n,r,i,o="",a=e.length%3,c=0;c<e.length;){if((n=e.charCodeAt(c++))>255||(r=e.charCodeAt(c++))>255||(i=e.charCodeAt(c++))>255)throw new TypeError("invalid character found");o+=Ji[(t=n<<16|r<<8|i)>>18&63]+Ji[t>>12&63]+Ji[t>>6&63]+Ji[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o}(e.replace(Ki,Wi)))},qi=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Xi=function(){function e(t){i(this,e),this.userFormatInfo={},this.userFormatInfoV2={},this.enableAdTracking=!0,this.offsiteAdInfo={},this.tt_test_id="",this.signalDiagnosticLabels=Object.assign({},er),this.init(t)}return a(e,[{key:"init",value:function(e){this.userInfo={},this.adInfo={},this.appInfo={},this.pageInfo={url:"",referrer:""},this.pageSign={sessionId:"",pageId:""},this.libraryInfo=e}},{key:"getAllData",value:function(){return{userInfo:this.userInfo,adInfo:this.adInfo,appInfo:this.appInfo,libraryInfo:this.libraryInfo,pageInfo:this.pageInfo,pageSign:this.pageSign,signalType:this.signalType,userFormatInfo:this.userFormatInfo,userFormatInfoV2:this.userFormatInfoV2,enableAdTracking:this.enableAdTracking,offsiteAdInfo:this.offsiteAdInfo,tt_test_id:this.tt_test_id}}},{key:"getLibraryInfo",value:function(){return this.libraryInfo}},{key:"setSignalType",value:function(e){this.signalType=e}},{key:"getSignalType",value:function(){return this.signalType}},{key:"setTestID",value:function(e){this.tt_test_id=e}},{key:"getTestID",value:function(){return this.tt_test_id}},{key:"setEnableAdTracking",value:function(e){this.enableAdTracking=e}},{key:"getEnableAdTracking",value:function(){return this.enableAdTracking}},{key:"setOffsiteAdInfo",value:function(e){this.offsiteAdInfo=Object.assign({},this.offsiteAdInfo,e)}},{key:"getOffsiteAdInfo",value:function(){return this.offsiteAdInfo}},{key:"getUserFormatInfo",value:function(){return this.userFormatInfo}},{key:"setUserFormatInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.assign(this.userFormatInfo,e)}},{key:"getUserFormatInfoV2",value:function(){return this.userFormatInfoV2}},{key:"setUserFormatInfoV2",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.assign(this.userFormatInfoV2,e)}},{key:"setUserInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.assign(this.userInfo,e)}},{key:"setUserInfoWithoutIdentifyPlugin",value:function(e){e&&Object.assign(this.userInfo,e)}},{key:"getUserInfo",value:function(){return this.userInfo}},{key:"getAdInfo",value:function(){return this.adInfo}},{key:"setAdInfo",value:function(e){e&&(this.adInfo?this.adInfo=Object.assign({},this.adInfo,e):this.adInfo=e)}},{key:"getAppInfo",value:function(){return this.appInfo}},{key:"setAppInfo",value:function(e){e&&(this.appInfo=Object.assign({},this.appInfo,e))}},{key:"getPageInfo",value:function(){return this.pageInfo}},{key:"getPageSign",value:function(){return this.pageSign}},{key:"setPageInfo",value:function(e,t){var n=Object.assign({},this.pageInfo),r=Object.assign({},this.pageSign);if(n.url!==e){var i,o=n.url;if(void 0!==n.url&&(n.referrer=n.url),void 0!==t&&(n.referrer=t),r.pageId=this.getPageId(),void 0!==r.index){var a=r.index+1;r.index=a,i=a,sessionStorage.setItem(vr,JSON.stringify({index:i}))}return n.url=e,this.pageInfo=n,this.pageSign=r,{from:o}}}},{key:"setPageInfoData",value:function(e){this.pageInfo=Object.assign({},this.pageInfo,e)}},{key:"getSessionIdFromCache",value:function(){return null}},{key:"setSessionIdToCache",value:function(e){}},{key:"setSignalDiagnosticLabels",value:function(e){Object.assign(this.signalDiagnosticLabels,e)}},{key:"getSignalDiagnosticLabels",value:function(){return this.signalDiagnosticLabels}},{key:"getPageId",value:function(){return nr(dr)}},{key:"getVariationId",value:function(){return""}},{key:"isLegacyPixel",value:function(e){return!1}},{key:"initPageSign",value:function(){var e=this.getSessionIdFromCache();null===e&&(e=nr("sessionId"),this.setSessionIdToCache(e));var t={sessionId:e,pageId:nr(dr)};this.pageSign=t}}]),e}();Xi=qi([C.injectable()],Xi);var Qi=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},zi=function(){function e(){i(this,e),this.events={}}return a(e,[{key:"on",value:function(e,t){var n=this.events[e]||[];n.push(t),this.events[e]=n}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=this.events[e]||[];i.forEach((function(e){return e.apply(void 0,n)}))}},{key:"off",value:function(e,t){var n=this.events[e]||[];this.events[e]=n.filter((function(e){return e!==t}))}}]),e}();zi=Qi([C.injectable()],zi);var Zi=function(){function e(t){i(this,e),this.pixelCode="",this.loaded=!1,this.status=1,this.name="",this.advertiserID="",this.setupMode=0,this.partner="",this.reporterInfo={},this.plugins={},this.options={},this.rules=[],this.pixelCode=t}return a(e,[{key:"getParameterInfo",value:function(){return Promise.resolve({pixelCode:this.pixelCode,name:this.name,status:this.status,setupMode:this.setupMode,advertiserID:this.advertiserID,partner:this.partner,is_onsite:!1,advancedMatchingAvailableProperties:{}})}},{key:"getReporterId",value:function(){return""}},{key:"getReporterPartner",value:function(){}},{key:"getReporterInfo",value:function(){return{reporter:{}}}},{key:"getReportResultSet",value:function(){return[]}},{key:"isOnsite",value:function(){return!1}},{key:"setAdvancedMatchingAvailableProperties",value:function(e){}},{key:"clearHistory",value:function(){}},{key:"page",value:function(e){}},{key:"track",value:function(e,t,n){return Promise.resolve(null)}},{key:"getUserInfo",value:function(e){return{}}},{key:"getReporterMatchedUserFormatInfo",value:function(){return{}}},{key:"getReporterMatchedUserFormatInfoV2",value:function(){return{}}},{key:"assemblyData",value:function(){return{event:"",message_id:"",event_id:"",is_onsite:!1,properties:{},context:{ad:{},device:{},library:{name:"",version:""},page:{url:""},pageview_id:"",session_id:"",variation_id:"",user:{}},partner:"",timestamp:""}}},{key:"assemblySelfHostData",value:function(){return this.assemblyData()}},{key:"trackSync",value:function(){}},{key:"getReportEventHistoryKey",value:function(e){return"tiktok"}},{key:"hasReportEventHistory",value:function(e,t){return!1}}]),e}();new Zi("empty");var $i=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},eo=function(e){s(n,e);var t=v(n);function n(e,r){var o;return i(this,n),(o=t.call(this)).reporterInfo={},o.options={},o.plugins={},o.rules=[],o.reportEventHistory={},o.reportResultSet=[],o.selfHostConfig={},o.currentHref="",o.advancedMatchingAvailableProperties={external_id:!0},o.reportService=r,o.context=e,o}return a(n,[{key:"getParameterInfo",value:function(){var e=this;return this.getInstance().then((function(){var t=e.reporterInfo,n=t.name,r=void 0===n?"":n,i=t.status,o=void 0===i?1:i,a=t.setupMode,c=void 0===a?0:a,s=t.advertiserID,u=void 0===s?"":s,l=t.is_onsite,f=void 0!==l&&l;return{pixelCode:e.getReporterId(),name:r,status:o,setupMode:c,advertiserID:u.toString(),partner:e.getReporterPartner()||"",is_onsite:f,advancedMatchingAvailableProperties:e.advancedMatchingAvailableProperties,rules:e.rules}}))}},{key:"getInstance",value:function(){return this.pixelPromise=Promise.resolve(this)}},{key:"getReporterId",value:function(){return""}},{key:"getReporterPartner",value:function(){}},{key:"getReporterInfo",value:function(){return{pixel:{code:this.getReporterId()}}}},{key:"setAdvancedMatchingAvailableProperties",value:function(e){this.advancedMatchingAvailableProperties=Object.assign({},this.advancedMatchingAvailableProperties,e)}},{key:"isOnsite",value:function(){return!1}},{key:"getReportResultSet",value:function(){return this.reportResultSet}},{key:"getUserInfo",value:function(e){return{}}},{key:"getReporterMatchedUserFormatInfo",value:function(){return{}}},{key:"getReporterMatchedUserFormatInfoV2",value:function(){return{}}},{key:"getReportEventHistoryKey",value:function(e){return"tiktok"}},{key:"clearHistory",value:function(){this.reportEventHistory={}}},{key:"pushReport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"tiktok";this.reportEventHistory[t]||(this.reportEventHistory[t]=[]),this.reportEventHistory[t].push(e)}},{key:"hasReportEventHistory",value:function(e,t){var n=this.getReportEventHistoryKey(t);return this.reportEventHistory[n]?!(!mr.includes(e)||!this.reportEventHistory[n].includes(e)):(this.reportEventHistory[n]=[],!1)}},{key:"page",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.context.getPageInfo();t.url!==this.currentHref&&(this.currentHref=t.url,this.track(_r,e,{}))}},{key:"track",value:function(e,t,n,r,i){var o=this,a=r||yr.TRACK,c=i||Gn.defaultReport;return!this.reportService||this.hasReportEventHistory(e,c)?Promise.resolve(null):(this.pushReport(e,this.getReportEventHistoryKey(c)),Fi(this.reportService.reportPreposition||[]).then((function(){var r=o.getReporterId(),i=o.trackSync(r,e,t,n,a,c);if(o.trackPostTask({reporterId:r,eventType:e,properties:t,eventConfig:n,type:a,reportType:c,reportData:i})&&i){var s={reporterId:r,eventType:e,properties:t,eventConfig:n,type:a,reportType:c,reportData:i};return Promise.resolve(s)}return Promise.resolve(null)})))}},{key:"getEventType",value:function(e){return e}},{key:"trackPostTask",value:function(e){return!0}},{key:"trackSync",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:yr.TRACK,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Gn.defaultReport,a=i!==yr.SELFHOST?this.assemblyData(e,t,n,r,i):this.assemblySelfHostData(e,t,n,r,i),c=Ai(i,e);if(null!==c&&this.reportService)return this.emit("beforeReport",e,t,a,r,i),this.reportResultSet.push(this.reportService.report(c,a,o)),a}},{key:"handlePropertiesToOptions",value:function(e,t){var n={};return t.forEach((function(t){n[t]=e[t],delete e[t]})),n}},{key:"assemblyData",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};arguments.length>4&&void 0!==arguments[4]||yr.TRACK;var i=this.context.getAllData(),o=i.adInfo,a=i.userInfo,c=i.appInfo,s=i.pageSign,u=i.libraryInfo,l=i.pageInfo,f=i.signalType,d=s.sessionId,h=s.pageId,p=s.variationId,v=Object.assign({},n),g=v&&v.pixelMethod||"";v&&v.pixelMethod&&delete v.pixelMethod;var y=Object.assign({},u,{version:this.context.isLegacyPixel(e)?"legacy-".concat(u.version):u.version}),_=$r(o,zn),m=Object.assign({},_,{device_id:c.device_id,uid:c.user_id}),b=this.handlePropertiesToOptions(v,[Hn.LDU,Hn.EVENTID,Hn.EVENT_ID]),E=this.options.limited_data_use,I=null!==b.limited_data_use&&void 0!==b.limited_data_use?b.limited_data_use:E;null==I?delete b.limited_data_use:b.limited_data_use=!!I;var T=r&&(r.event_id||r.eventID)||"";b.event_id=T||b.event_id||b.eventID||"",delete b.eventID;var O=this.getReporterInfo();O.pixel&&(O.pixel.runtime=Ei(),g&&(O.pixel.mode=g));var S=this.getUserInfo(Kn.Manual)||{},N=this.getReporterMatchedUserFormatInfoV2();N&&(null==v?void 0:v.dynamic_parameter_config)?(N.dynamic_parameter_config=null==v?void 0:v.dynamic_parameter_config,null==v||delete v.dynamic_parameter_config):(null==v?void 0:v.dynamic_parameter_config)&&(N={dynamic_parameter_config:null==v?void 0:v.dynamic_parameter_config},null==v||delete v.dynamic_parameter_config);var A=this.getUserInfo(Kn.Auto)||{};A.auto_trigger_type&&(Object.assign(v,{auto_trigger_type:A.auto_trigger_type}),delete A.auto_trigger_type),gi()&&Object.assign(v,{android_version:c.android_version,device_model:c.device_model});var R={};a.anonymous_id&&(R.anonymous_id=a.anonymous_id);var w=this.getEventType(t),C={event:w,event_id:T,message_id:rr(nr(hr),e),is_onsite:!!f,timestamp:(new Date).toJSON(),context:Object.assign(Object.assign({ad:m,device:{platform:c.platform},user:Object.assign({},R,S,A)},O),{page:Object.assign({},l),library:Object.assign({},y),session_id:rr(d,e),pageview_id:rr(h,e),variation_id:p||""}),_inspection:N,properties:v};return Object.assign(C,b)}},{key:"assemblySelfHostData",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4?arguments[4]:void 0;return this.assemblyData(e,t,n,r,i)}}]),n}(zi);eo=$i([C.injectable()],eo);var to=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},no=function(){function e(t){var n=t.name,r=t.context,o=t.reporters;i(this,e),this.reporters=[],this.context=r,this.reporters=o,this.name=n}return a(e,[{key:"initStart",value:function(){}},{key:"initEnd",value:function(){}},{key:"adInfoInitStart",value:function(){}},{key:"adInfoInitEnd",value:function(){}},{key:"contextInitStart",value:function(){}},{key:"contextInitEnd",value:function(){}},{key:"pageUrlWillChange",value:function(e,t){}},{key:"pageUrlDidChange",value:function(e,t){}},{key:"pageDidLoad",value:function(){}},{key:"pageWillLeave",value:function(e){}},{key:"pixelSend",value:function(e,t,n,r,i){}},{key:"pixelDidMount",value:function(e){}}]),e}();no=to([C.injectable()],no);var ro=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},io=function(){function t(e,n,r,o){i(this,t),this.initialize=!1,this.plugins=[],this.reporters=[],this.context=e,this.adService=n,this.appService=r,this.reportService=o}return a(t,[{key:"init",value:function(){this.initContextInfo(),this.initialize=!0}},{key:"initContextInfo",value:function(){var e=this;this.dispatch(ar.INIT_START),this.dispatch(ar.CONTEXT_INIT_START);var t=(null===window||void 0===window?void 0:window.location)||{href:""};this.initAdInfo(t.href),this.initAppInfo(t.href),this.reportService.pushPreposition(Promise.resolve().then((function(){return e.initUserInfo()}))),this.initTestId(t.href),this.dispatch(ar.CONTEXT_INIT_END),this.dispatch(ar.INIT_END)}},{key:"setPageInfo",value:function(e,t){var n=this.context.getPageInfo();if(n.url!==e){this.dispatch(ar.PAGE_URL_WILL_CHANGE,n.url,e);var r=this.context.setPageInfo(e,t);r&&this.dispatch(ar.PAGE_URL_DID_CHANGE,e,r.from||"")}}},{key:"initAdInfo",value:function(t,n){var i=this;this.reportService.pushPreposition(r(e().mark((function r(){var o;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.adService.getAdInfo(t);case 3:o=e.sent,i.context.setAdInfo(o),i.initOffsiteAdInfo(o),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),n&&n(e.t0);case 11:case"end":return e.stop()}}),r,null,[[0,8]])})))())}},{key:"initOffsiteAdInfo",value:function(e){}},{key:"initAppInfo",value:function(t){var n=this;this.reportService.pushPreposition(r(e().mark((function r(){var i;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.appService.getAppInfo(t);case 2:i=e.sent,n.context.setAppInfo(i);case 4:case"end":return e.stop()}}),r)})))())}},{key:"initUserInfo",value:function(){}},{key:"initTestId",value:function(e){}},{key:"usePlugin",value:function(e){try{if(!this.plugins.find((function(t){return t.name===e.name}))){this.plugins.push(e);var t=e.name;if(t)this["".concat(t[0].toLowerCase()+t.slice(1),"Plugin")]=e}}catch(e){}}},{key:"getPlugin",value:function(e){return this.plugins.find((function(t){return t.name===e}))||null}},{key:"getReporter",value:function(e){return this.reporters.find((function(t){return t.getReporterId()===e}))}},{key:"instance",value:function(e){var t=this.getReporter(e);return t||(Oi(Er.PIXEL_EMPTY,new Error(""),{pixelCode:e}),new Zi(e))}},{key:"instances",value:function(){return this.reporters}},{key:"identify",value:function(e,t){var n=ui(e,t);this.context.setUserInfo(n)}},{key:"page",value:function(e){e.url!==this.context.getPageInfo().url&&(this.setPageInfo(e.url,e.referrer),this.reporters.forEach((function(e){e.clearHistory()})));var t=Object.assign({},e);delete t.url,delete t.referrer,this.reporters.forEach((function(e){e.page(t)}))}},{key:"isOnsitePage",value:function(){return this.context.getSignalType()===or.ONSITE||this.reporters.every((function(e){return e.isOnsite()}))}},{key:"track",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.pixel_code;if(void 0===r)this.instances().forEach((function(r,i){r.track(e,t,Object.assign({_i:i},n))}));else{var i=this.instance(r);if(i instanceof Zi)return;i.track(e,t,n)}}},{key:"dispatch",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.plugins.forEach((function(t){if("function"==typeof t[e])try{t[e].apply(t,n)}catch(r){Oi(Er.PLUGIN_ERROR,r,{extJSON:{plugin_name:t.name,cycle_name:e,data:n}})}}))}},{key:"getAllReportResultSet",value:function(){return this.instances().reduce((function(e,t){return e.concat(t.getReportResultSet())}),[])}},{key:"resetCookieExpires",value:function(){}},{key:"enableCookie",value:function(){}},{key:"disableCookie",value:function(){}}]),t}();io=ro([C.injectable()],io);var oo,ao=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},co=function(){function t(e,n){i(this,t),this.reportPreposition=[],this.httpService=e,this.bridgeService=n}var n;return a(t,[{key:"pushPreposition",value:function(e){this.reportPreposition.push(e)}},{key:"report",value:(n=r(e().mark((function t(n,r,i){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve());case 1:case"end":return e.stop()}}),t)}))),function(e,t,r){return n.apply(this,arguments)})}]),t}();co=ao([C.injectable()],co),function(e){e[e.Live=0]="Live",e[e.NoRecord=1]="NoRecord"}(oo||(oo={}));var so,uo={ID:Symbol.for("ID"),Type:Symbol.for("type"),Partner:Symbol.for("partner"),Options:Symbol.for("Options"),Plugins:Symbol.for("Plugins"),Rules:Symbol.for("Rules"),Info:Symbol.for("Info"),ExtraParams:Symbol.for("extraParams"),WebLibraryInfo:Symbol.for("WebLibraryInfo"),SignalType:Symbol.for("SignalType"),IsOnsitePage:Symbol.for("IsOnsitePage")};!function(e){e.BIND="bind",e.REBIND="rebind"}(so||(so={}));var lo={ViewForm:"ViewContent",ViewConsultationPage:"ViewContent",ViewDownloadPage:"ViewContent",Checkout:"PlaceAnOrder",Purchase:"CompletePayment",Registration:"CompleteRegistration",AddBilling:"AddPaymentInfo",StartCheckout:"InitiateCheckout",ClickInDownloadPage:"ClickButton",ClickInConsultationPage:"ClickButton",ClickForm:"ClickButton",ClickToDownload:"Download",Consult:"Contact",ConsultByPhone:"Contact"},fo=function(){var e=Gr();return"object"===t(e)&&e._i?e._i:{}},ho=function(e,t){var n=fo()||{};Object.keys(n).forEach((function(r){var i=n[r];i._init||i.push([e].concat(t))}))},po=function(e,t,n){var r=(fo()||{})[e];if(r){if(r._init)return;r.push([t].concat(n))}};function vo(e,t){var n=history[e];return function(){var e=Array.prototype.slice.call(arguments);n.apply(history,e),t()}}var go=function(e){var t;return e.context.ad={},Object.keys((null===(t=null==e?void 0:e.context)||void 0===t?void 0:t.user)||{}).forEach((function(t){e.context.user[t]=""})),e};function yo(){!function(){if("function bind() { [native code] }"===Function.prototype.bind.toString())return!0;function e(){}return new(e.bind.apply(e,[void 0,1]))instanceof e}()?Function.prototype._ttq_bind=function(e){if("function"!=typeof this)throw new TypeError("What is being called by bind is not a function.");var t=e||window,n=Array.prototype.slice.call(arguments).slice(1),r=Symbol("key");return t[r]=this,function e(){return this instanceof e?d(t[r],b(n).concat(Array.prototype.slice.call(arguments))):t[r].apply(t,b(n).concat(Array.prototype.slice.call(arguments)))}}:Function.prototype._ttq_bind=Function.prototype.bind}var _o,mo=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},bo=function(e,t){return function(n,r){t(n,r,e)}};!function(e){e.PIXEL_CODE="pixelCode",e.EVENT_SOURCE_ID="eventSourceId",e.SHOP_ID="shopId"}(_o||(_o={}));var Eo=function(e){s(r,e);var n=v(r);function r(e,t,o,a,s,u,l,f,d,h){var p;return i(this,r),(p=n.call(this,a,l)).ttp="",p.id=e,p.type=t,p.isOnsitePage=o,p.options=h||{},p.plugins=f||{},p.rules=d||[],p.reporterInfo=Object.assign(s||{},c({},t,e)),p.ttp=u.ttp||"",p.currency_list=u.currency_list||null,p.ttqPartner=u.partner||"",p.selfHostConfig=u.self_host_config||{},p.pixelPromise=p.getInstance(),p}return a(r,[{key:"identify",value:function(e,t){var n=ui(e,t);this.context.setUserInfo(n)}},{key:"getReporterId",value:function(){return this.id||""}},{key:"getReporterPartner",value:function(){var e;return(null===(e=this.reporterInfo)||void 0===e?void 0:e.partner)||""}},{key:"setPixelInfo",value:function(e,t,n){var r=this.type;this.reporterInfo=Object.assign(this.reporterInfo,Object.assign({},e),c({},r,this.getReporterId())),t&&(this.rules=t),n&&(this.plugins=n)}},{key:"getInstance",value:function(){var e=this;if(this.pixelPromise)return this.pixelPromise;var t=function(e){return fo()[e]||{}}(this.id);return Wr()||t&&t.info?this.pixelPromise=Promise.resolve(this):(this.pixelPromise=new Promise((function(t,n){var r,i;Ui((r=e.id,i=location&&location.hostname,"".concat("https://analytics.tiktok.com/i18n/pixel/config.js","?sdkid=").concat(r,"&hostname=").concat(i))).then((function(){t(e)})).catch((function(t){e.pixelPromise=null,n(t)}))})),this.pixelPromise)}},{key:"getReporterInfo",value:function(){return this.reporterInfo.pixelCode?y(u(r.prototype),"getReporterInfo",this).call(this):{shop_id:this.reporterInfo.shopId,eventSourceId:this.reporterInfo.eventSourceId}}},{key:"getUserInfo",value:function(e){var t=this.context.getUserInfo(),n=ei(t,Object.assign({},this.advancedMatchingAvailableProperties));switch(e){case Kn.Manual:var r=this.getReporterPartner();return ei(r&&"None"!==r?n:t,{external_id:!0,email:!0,phone_number:!0});case Kn.Auto:var i=ei(n,{external_id:!0,auto_email:!0,auto_phone_number:!0});return Object.assign(i,(i.auto_email||i.auto_phone_number)&&t.auto_trigger_type?{auto_trigger_type:t.auto_trigger_type}:{});default:return n}}},{key:"getReporterMatchedUserFormatInfo",value:function(){var e=this.context.getUserFormatInfo(),t=this.getReporterPartner(),n=function(e,t){var n={identity_params:{}};return 0===Object.keys(e).length?{}:(Object.entries(t).forEach((function(t){var r=_(t,2),i=r[0];if(r[1])if(e[i]&&e[i].length){var o=e[i]||[Jn.EMPTY_VALUE];n.identity_params[i]=b(o)}else n.identity_params[i]=[Jn.EMPTY_VALUE]})),n)}(e,t&&"None"!==t?this.advancedMatchingAvailableProperties:{external_id:!0,email:!0,phone_number:!0}),r=ei(e,{auto_email:!0,auto_phone_number:!0});return Object.keys(r).length>0&&(n.identity_params||(n.identity_params={}),Object.assign(n.identity_params,r)),n}},{key:"getReporterMatchedUserFormatInfoV2",value:function(){var e=this.context.getUserFormatInfoV2(),t=this.getReporterPartner();return function(e,t){if(0===Object.keys(e).length)return{};var n={identity_params:{}},r={email:["email_is_hashed","sha256_email"],phone_number:["phone_is_hashed","sha256_phone"]};return Object.entries(t).forEach((function(t){var i=_(t,2),o=i[0];i[1]&&r[o]&&r[o].forEach((function(t){if(n.identity_params[t]=[Jn.EMPTY_VALUE],e[t]){var r=e[t]||[Jn.EMPTY_VALUE];n.identity_params&&(n.identity_params[t]=b(r))}}))})),n}(e,t&&"None"!==t?this.advancedMatchingAvailableProperties:{external_id:!0,email:!0,phone_number:!0})}},{key:"isOnsite",value:function(){var e;return!!(null===(e=this.reporterInfo)||void 0===e?void 0:e.is_onsite)}},{key:"isNonPartner",value:function(){var e=this.reporterInfo.partner;return!e||"None"===e}},{key:"getSignalDiagnosticLabels",value:function(){var e=this.context.getSignalDiagnosticLabels();if(!e)return Object.assign({},er);var t=this.advancedMatchingAvailableProperties,n=t.email,r=t.phone_number,i=this.advancedMatchingAvailableProperties,o=i.auto_email,a=i.auto_phone_number;n=!!this.isNonPartner()||n,r=!!this.isNonPartner()||r;var c=ei(e,{raw_email:n,raw_phone:r,hashed_email:n,hashed_phone:r,raw_auto_email:o,raw_auto_phone:a});return Object.assign({},er,c)}},{key:"assemblyData",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:yr.TRACK,a=y(u(r.prototype),"assemblyData",this).call(this,e,t,n,i,o);a.is_onsite=this.isOnsitePage.value;var c=this.ttqPartner;c&&(a.partner=c),a.signal_diagnostic_labels=this.getSignalDiagnosticLabels();var s=Kr();return s&&(a.context.userAgent=s),a.context.ad.sdk_env=li(),a.context.ad.jsb_status=bi(),o!==yr.INTERACTION&&o!==yr.PERFORMANCE&&o!==yr.PERFORMANCE_INTERACTION||!1!==this.context.getEnableAdTracking()||this.isOnsitePage.value||(a.context.user={},a.context.ad=this.context.getOffsiteAdInfo(),a.context.ad=$r(a.context.ad,zn)),a}},{key:"track",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:yr.TRACK,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Gn.defaultReport;return this.getInstance().then((function(){var c=t.getReporterId();if(Tr.includes(e))return y(u(r.prototype),"track",t).call(t,e,n,i,o,a);var s=Object.assign({},i);return t.selfHostConfig[c]&&!i.eventID&&(s=Object.assign({},s,{eventID:rr(nr(gr),c)})),y(u(r.prototype),"track",t).call(t,e,n,s,o,a)}))}},{key:"getEventType",value:function(e){return lo[e]||e}},{key:"trackSync",value:function(e,n){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:yr.TRACK,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Gn.defaultReport;if("track"===c&&Ti(Er.PIXEL_SEND,{pixelCode:e,extJSON:{event:n}}),c===yr.TRACK){o&&"string"==typeof o.currency&&(o.currency=o.currency.toUpperCase());var l=this.context.getTestID();if(l){var f=this.assemblyData(e,n,o,a);f.tt_test_id=l;var d=go(f);return null===(i=null==this?void 0:this.reportService)||void 0===i||i.report(Sr,d,Gn.httpReport),d}if(o&&"object"===t(o)){var h=o.value,p=o.currency;void 0===h||Gi(h)||Ti(Er.CUSTOM_ERROR,{pixelCode:e,custom_name:"invalid_value",extJSON:{event:n,value:h,currency:p}}),void 0===p||Hi(p,this.currency_list)||Ti(Er.CUSTOM_ERROR,{pixelCode:e,custom_name:"invalid_currency",extJSON:{event:n,value:h,currency:p}})}return y(u(r.prototype),"trackSync",this).call(this,e,n,o,a,c,s)}y(u(r.prototype),"trackSync",this).call(this,e,n,o,a,c,s)}},{key:"trackPostTask",value:function(e){var t=e.reporterId,n=e.eventType,r=e.properties,i=e.eventConfig;return!Tr.includes(n)&&(this.selfHostConfig[t]&&!this.hasReportEventHistory(n,Gn.htmlHttpReport)&&(this.pushReport(n,this.getReportEventHistoryKey(Gn.htmlHttpReport)),this.trackSync(t,n,r,i,yr.SELFHOST,Gn.htmlHttpReport)),!0)}},{key:"getReportEventHistoryKey",value:function(e){return e===Gn.htmlHttpReport?this.selfHostConfig[this.getReporterId()]:"tiktok"}},{key:"assemblySelfHostData",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4?arguments[4]:void 0,o=this.assemblyData(e,t,n,r,i),a=this.ttp;return a&&(o.context.user.ttp=a),o}}]),r}(eo),Io=function(e){s(n,e);var t=v(n);function n(){return i(this,n),t.apply(this,arguments)}return a(n,[{key:"track",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return po(this.getReporterId(),"track",[e,t,n]),Promise.resolve(null)}}]),n}(Eo=mo([C.injectable(),bo(0,C.inject(uo.ID)),bo(1,C.inject(uo.Type)),bo(2,C.inject(uo.IsOnsitePage)),bo(3,C.inject(br.CONTEXT)),bo(4,C.inject(uo.Info)),bo(5,C.inject(br.TTQ_GLOBAL_OPTIONS)),bo(6,C.inject(br.REPORT_SERVICE)),bo(6,C.optional()),bo(7,C.inject(uo.Plugins)),bo(7,C.optional()),bo(8,C.inject(uo.Rules)),bo(8,C.optional()),bo(9,C.inject(uo.Options)),bo(9,C.optional())],Eo)),To=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Oo=function(e,t){return function(n,r){t(n,r,e)}},So=function(t){s(c,t);var n,o=v(c);function c(e,t,n,r,a,s,u,l,f,d,h,p,v,g,y,_,m,b,E){var I;return i(this,c),(I=o.call(this,e,n,r,a)).env=l,I.reporters=t,I.cookieService=s,I.consentService=u,I.autoAdvancedMatchingPlugin=d,I.callbackPlugin=h,I.identifyPlugin=p,I.monitorPlugin=f,I.performanceInteractionPlugin=v,I.webFLPlugin=g,I.shopifyPlugin=y,I.autoConfigPlugin=_,I.diagnosticsConsolePlugin=m,I.competitorInsightPlugin=b,I.pangleCookieMatchingPlugin=E,I.autoAdvancedMatchingPlugin&&I.usePlugin(I.autoAdvancedMatchingPlugin),I.callbackPlugin&&I.usePlugin(I.callbackPlugin),I.identifyPlugin&&I.usePlugin(I.identifyPlugin),I.monitorPlugin&&I.usePlugin(I.monitorPlugin),I.performanceInteractionPlugin&&I.usePlugin(I.performanceInteractionPlugin),I.webFLPlugin&&I.usePlugin(I.webFLPlugin),I.shopifyPlugin&&I.usePlugin(I.shopifyPlugin),I.autoConfigPlugin&&I.usePlugin(I.autoConfigPlugin),I.diagnosticsConsolePlugin&&I.usePlugin(I.diagnosticsConsolePlugin),I.competitorInsightPlugin&&I.usePlugin(I.competitorInsightPlugin),I.pangleCookieMatchingPlugin&&I.usePlugin(I.pangleCookieMatchingPlugin),I.onPageLoaded(),I.onPageLeave(),I.init(),I.initExtension(),I.setPageInfo(location.href,document.referrer),I}return a(c,[{key:"initExtension",value:function(){this.listenSPAHistoryChange()}},{key:"initAdInfo",value:function(e){var t=Ri(sr);this.dispatch(ar.BEFORE_AD_INFO_INIT_START),t?this.initAdCache(t):this.initBaseAdInfo(e)}},{key:"initAdCache",value:function(e){this.dispatch(ar.AD_INFO_INIT_START),e.ad_info_from="cache",e.ad_info_status="fulfilled(cache)",this.setAdInfo(e),this.initOffsiteAdInfo(e)}},{key:"initBaseAdInfo",value:function(e){this.adService.webBridgeService.jsbridge&&this.dispatch(ar.AD_INFO_INIT_START),y(u(c.prototype),"initAdInfo",this).call(this,e,(function(e){Oi(Er.INIT_ERROR,e,{extJSON:{position:"initAdInfo"}})}))}},{key:"initOffsiteAdInfo",value:function(e){var t=function(e,t){var n={};try{var r=e.creative_id,i=(e.callback,e.idc),o=e.convert_id,a=e.ad_info_from,c=e.ad_info_status,s=e.log_extra,u=e.ext_params,l=e.ATTStatus;if(r&&(n.creative_id=r),i&&(n.idc=i),o&&(n.convert_id=o),a&&(n.ad_info_from=a),c&&(n.ad_info_status=c),u&&(n.ext_params=u),l&&(n.ATTStatus=l),s){var f=JSON.parse(s),d=f.ad_user_agent,h=f.ad_id,p=f.rit,v=f.ocbs,g=f.vid,y=f.idc,_=f.country_id;h&&(n.ad_id=h),p&&(n.rit=p),d&&(n.ad_user_agent=d),v&&(n.ocbs=v),g&&(n.vid=g),y&&(n.idc=y),_&&(n.country_id=_)}return n}catch(e){return t&&t(e),n}}(e,(function(e){Oi(Er.INIT_ERROR,e,{extJSON:{position:"handleAdInfoOfficial"}})}));this.context.setOffsiteAdInfo(t);var n=function(e,t){try{var n=e.log_extra,r=e.ttuts;return!yi()||(hi(t)?n?1!==JSON.parse(n).user_tracking_status:null===e.ATTStatus||void 0===e.ATTStatus||3===e.ATTStatus:null==r||1!==r)}catch(e){return!1}}(e,this.env);this.context.setEnableAdTracking(n),this.dispatch(ar.AD_INFO_INIT_END,{extJSON:{enabledAdTracking:n}})}},{key:"initAppInfo",value:function(t){var n=this,i=Ri(ur);i?this.context.setAppInfo(i):this.reportService.pushPreposition(r(e().mark((function r(){var i;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.initBaseAppInfo(t);case 2:return i=e.sent,e.abrupt("return",i);case 4:case"end":return e.stop()}}),r)})))())}},{key:"initBaseAppInfo",value:(n=r(e().mark((function t(n){var r;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.appService.getAppInfo(n);case 2:return r=e.sent,this.context.setAppInfo(r),e.abrupt("return",r);case 5:case"end":return e.stop()}}),t,this)}))),function(e){return n.apply(this,arguments)})},{key:"initTestId",value:function(e){if(!this.context.getTestID()){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{var n=Pi("tt_test_id",e);return n&&n!==t&&ji("tt_test_id",n,void 0,"session"),n||t}catch(e){return""}}(e,Mi("tt_test_id"));this.context.setTestID(t)}}},{key:"initUserInfo",value:function(){this.setCookieInfo()}},{key:"instance",value:function(e){var t=this.getReporter(e);return t||new Io(e,_o.PIXEL_CODE,{value:!1},this.context,{pixelCode:e},{})}},{key:"instances",value:function(){return this.reporters}},{key:"page",value:function(e){y(u(c.prototype),"page",this).call(this,Object.assign({url:(null==e?void 0:e.page)||location.href,referrer:(null==e?void 0:e.referrer)||document.referrer},e))}},{key:"setAdInfo",value:function(e){this.context.setAdInfo(e)}},{key:"enableFirstPartyCookie",value:function(e){this.cookieService.enableFirstPartyCookie(e),e&&this.setCookieInfo()}},{key:"enableCookie",value:function(){this.cookieService.enableFirstPartyCookie(!0),this.setCookieInfo(),this.cookieService.enableCookie()}},{key:"disableCookie",value:function(){this.cookieService.disableCookie(),this.context.setUserInfoWithoutIdentifyPlugin({anonymous_id:void 0}),this.disablePangleCookie()}},{key:"holdConsent",value:function(){this.consentService.setConsentMode(Zn.HOLD)}},{key:"revokeConsent",value:function(){this.consentService.setConsentMode(Zn.REVOKE)}},{key:"grantConsent",value:function(){this.consentService.setConsentMode(Zn.GRANT)}},{key:"disablePangleCookie",value:function(){this.pangleCookieMatchingPlugin&&this.pangleCookieMatchingPlugin.disablePangleCookie()}},{key:"setAnonymousId",value:function(e){this.cookieService.setAnonymousId(e),this.initUserInfo()}},{key:"resetCookieExpires",value:function(){this.cookieService.resetExpires()}},{key:"setCookieInfo",value:function(){if(this.cookieService.canUseCookie()){var e=this.cookieService.getAnonymousId();if(e){var t={anonymous_id:e};this.context.setUserInfoWithoutIdentifyPlugin(t)}}}},{key:"onPageLoaded",value:function(){var e=this;window.addEventListener("load",(function(){e.dispatch(ar.PAGE_DID_LOAD)}),{once:!0})}},{key:"onPageLeave",value:function(){var e=this,t=function(){var t=Date.now();e.dispatch(ar.PAGE_WILL_LEAVE,t),e.consentService.updateCache()};window.addEventListener("beforeunload",t,{once:!0}),yi()&&window.addEventListener("onpagehide"in window?"pagehide":"unload",t)}},{key:"listenSPAHistoryChange",value:function(){var e=this,t=this.context.getPageInfo().url,n=function(n){var r=location.href;r!==t&&e.setPageInfo(r)};window.addEventListener("popstate",n),history.pushState=vo("pushState",n),history.replaceState=vo("replaceState",n)}},{key:"loadPixel",value:function(e,t){e&&(this.reporters.find((function(t){return t.getReporterId()===e}))?Si(Ir.DUPLICATE_PIXEL_CODE):Gr().load(e,t||{}))}}]),c}(io),No=So=To([C.injectable(),Oo(0,C.inject(br.CONTEXT)),Oo(1,C.inject(br.TTQ_REPORTERS)),Oo(2,C.inject(br.AD_SERVICE)),Oo(3,C.inject(br.APP_SERVICE)),Oo(4,C.inject(br.REPORT_SERVICE)),Oo(5,C.inject(br.COOKIE_SERVICE)),Oo(6,C.inject(br.CONSENT_SERVICE)),Oo(7,C.inject(br.ENV)),Oo(8,C.inject(br.MONITOR_PLUGIN)),Oo(8,C.optional()),Oo(9,C.inject(br.AUTO_ADVANCED_MATCHING_PLUGIN)),Oo(9,C.optional()),Oo(10,C.inject(br.CALLBACK_PLUGIN)),Oo(10,C.optional()),Oo(11,C.inject(br.IDENTIFY_PLUGIN)),Oo(11,C.optional()),Oo(12,C.inject(br.PERFORMANCE_INTERACTION_PLUGIN)),Oo(12,C.optional()),Oo(13,C.inject(br.WEB_FL_PLUGIN)),Oo(13,C.optional()),Oo(14,C.inject(br.SHOPIFY_PLUGIN)),Oo(14,C.optional()),Oo(15,C.inject(br.AUTO_CONFIG_PLUGIN)),Oo(15,C.optional()),Oo(16,C.inject(br.DIAGNOSTICS_CONSOLE_PLUGIN)),Oo(16,C.optional()),Oo(17,C.inject(br.COMPETITOR_INSIGHT_PLUGIN)),Oo(17,C.optional()),Oo(18,C.inject(br.PANGLE_COOKIE_MATCHING_PLUGIN)),Oo(18,C.optional())],So),Ao=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Ro=function(e,t){return function(n,r){t(n,r,e)}},wo=function(e){s(n,e);var t=v(n);function n(e,r,o,a,c){var s;return i(this,n),(s=t.call(this,e)).setSignalType(c||or.OFFSITE),s.pageSign={sessionId:"",pageId:"",variationId:"",index:-1},s.legacy=o.legacy||[],s.variationId=o.variation_id||"",s.serverUniqueId=o.server_unqiue_id||"",s.reportService=r,s.initPageSign(),hi(a)&&yi()&&(s.enableAdTracking=!1),s.data=h(s),s}return a(n,[{key:"getSessionIdFromCache",value:function(){var e=null;try{e=JSON.parse(sessionStorage.getItem(pr)||"")}catch(e){}return e}},{key:"setSessionIdToCache",value:function(e){wi(pr,e)}},{key:"getVariationId",value:function(){return this.variationId}},{key:"isLegacyPixel",value:function(e){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];try{return t.includes(e)}catch(e){return!1}}(e,this.legacy)}},{key:"assignPageInfo",value:function(e){Object.assign(this.pageInfo,e)}},{key:"getSessionIndex",value:function(){try{var e=JSON.parse(sessionStorage.getItem(vr)||"");if(e)return e.index}catch(e){}return-1}},{key:"setUserInfo",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0!==Object.keys(t).length){var n={};Object.entries(t).forEach((function(t){var r=_(t,2),i=r[0],o=r[1];o&&(i!==Fr?n[i]=String(o).trim():e.setUserInfoWithoutIdentifyPlugin(c({},Fr,o)))}));var r=Gr(),i=null==r?void 0:r.getPlugin("Identify");i&&this.reportService.pushPreposition(i.handleUserProperties(n,t).then((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.userProperties,o=t.userDataFormat,a=t.userDataFormatV2;if(r){Object.assign(e.userInfo,r);var c=e.getUserFormatInfo()||{},s=e.getUserFormatInfoV2()||{},u=e.getSignalDiagnosticLabels()||{};if(e.setUserFormatInfo(Object.assign({},c,o)),e.setUserFormatInfoV2(Object.assign({},s,a)),e.setSignalDiagnosticLabels(Object.assign({},u,t.identifierLabel||{})),0===Object.keys(e.userInfo).length||1===Object.keys(n).length&&Object.keys(n).includes("external_id"))return;var l=i.reporters[0]||null,f=l?Object.keys(Object.assign({},l.getUserInfo(Kn.Manual),l.getUserInfo(Kn.Auto))):[];l&&f.length&&l.track("EnrichAM",{},{},yr.TRACK)}})).catch((function(e){Oi(Er.API_ERROR,e,{extJSON:{api:"identify"}})})))}}},{key:"initPageSign",value:function(){var e,t=this.getSessionIdFromCache();null===t&&(t=(e=this.serverUniqueId)?"".concat(e,"::").concat(Zr(20)):nr("sessionId"),this.setSessionIdToCache(t));var n=this.getPageId(),r=this.getVariationId(),i=this.getSessionIndex();this.pageSign={sessionId:t,pageId:n,variationId:r,index:i}}}]),n}(Xi);wo=Ao([C.injectable(),Ro(0,C.inject(uo.WebLibraryInfo)),Ro(1,C.inject(br.REPORT_SERVICE)),Ro(2,C.inject(br.TTQ_GLOBAL_OPTIONS)),Ro(3,C.inject(br.ENV)),Ro(3,C.optional()),Ro(4,C.inject(uo.SignalType)),Ro(4,C.optional())],wo);var Co=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Po=function(e,t){return function(n,r){t(n,r,e)}},ko=function(){function t(e){i(this,t),this.webBridgeService=e}var n;return a(t,[{key:"getAdInfo",value:(n=r(e().mark((function t(){var n,r,i,o,a=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>0&&void 0!==a[0]?a[0]:window.location.href,r=this.getAdInfoFromURL(n),!this.webBridgeService.jsbridge){e.next=8;break}return e.next=5,this.webBridgeService.getAdInfo();case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0={};case 9:return i=e.t0,(o=Object.assign({},r,i))&&(o.creative_id&&o.log_extra||o.callback)&&wi(sr,o),e.abrupt("return",o);case 13:case"end":return e.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"getAdInfoFromURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.href;try{var t=Pi(Cr,e)||void 0,n=Pi(Pr,e)||void 0,r=Pi(kr,e)||void 0,i=parseInt(Pi(Mr,e),10)||void 0,o=r?JSON.parse(r):{},a=o.log_extra,c=void 0===a?void 0:a,s=o.idc,u=void 0===s?void 0:s,l=o.cid,f=void 0===l?void 0:l;return{callback:t,ext_params:n,log_extra:c,creative_id:f,idc:u,ttuts:i,ad_info_from:(c||u||f)&&"url"}}catch(e){return{}}}}]),t}();ko=Co([C.injectable(),Po(0,C.inject(br.BRIDGE_SERVICE))],ko);var Mo=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Do=function(e,t){return function(n,r){t(n,r,e)}},Lo=function(){function t(e){i(this,t),this.webBridgeService=e}var n;return a(t,[{key:"getAppInfo",value:(n=r(e().mark((function t(n){var r,i,o,a,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n||window.location.href,(i=this.getAppInfoFromURL(r)).platform=pi(),!gi()){e.next=11;break}return e.next=6,vi();case 6:o=e.sent,a=o.model,c=o.platformVersion,i.device_model=a,i.android_version=c;case 11:return t=i,"{}"!==JSON.stringify(t)&&wi(ur,i),e.abrupt("return",i);case 13:case"end":return e.stop()}var t}),t,this)}))),function(e){return n.apply(this,arguments)})},{key:"getAppInfoFromURL",value:function(e){try{var t=Pi(kr,e||window.location.href),n=t&&JSON.parse(t);return{device_id:n.device_id,user_id:n.uid}}catch(e){return{}}}}]),t}();Lo=Mo([C.injectable(),Do(0,C.inject(br.BRIDGE_SERVICE))],Lo);var jo="ad_analytics_msg",xo="insight_log",Uo=function(e){return t=JSON.stringify(e),Yi(t);var t},Fo=function(e){return Boolean(e)},Bo=function(e){return!!(e.code&&e.data&&e.ret)};function Ho(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n={};try{if("string"==typeof e)n.data=JSON.parse(e);else if(Bo(e))(n=e).__data&&(n.data=n.__data);else if(void 0!==e.code){var r=Object.assign({},e),i=r.code;n.code=i,delete r.code,r.data?n.data=r.data:n.data=r}else n.data=e}catch(e){t&&Oi(Er.JSB_ERROR,e,{extJSON:{position:"getCallPromise bridge.call"}})}return n}var Go,Vo=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Jo=function(e,t){return function(n,r){t(n,r,e)}},Wo=function(){function t(e,n){i(this,t),this.env=e,di(this.env)&&(this.jsbridge=n),this.bridgeTimeout=400}var n,o,c,s,u,l,f;return a(t,[{key:"getAdInfo",value:(f=r(e().mark((function t(){var n=this;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.jsbridge){t.next=3;break}return Oi(Er.JSB_ERROR,new Error("tt bridge error when getting ad info"),{extJSON:{position:"getAdInfo"}}),t.abrupt("return",Promise.resolve({}));case 3:return t.abrupt("return",new Promise(function(){var t=r(e().mark((function t(r){var i;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.callAdInfo();case 3:(i=e.sent).ad_info_from="jsb",i.ad_info_status=i.ad_info_status||"fulfilled",r(i),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),r({}),Oi(Er.JSB_ERROR,e.t0,{extJSON:{position:"getAdInfo"}});case 13:case"end":return e.stop()}}),t,null,[[0,9]])})));return function(e){return t.apply(this,arguments)}}()));case 4:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"callAdInfo",value:(l=r(e().mark((function t(){var n,r;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.call("adInfo",{},window.top!==window?3500:5e3);case 3:if((n=e.sent).data){e.next=6;break}return e.abrupt("return",Promise.reject("adInfo no data"));case 6:return r={creative_id:n.data.cid,log_extra:n.data.log_extra},e.abrupt("return",r);case 10:if(e.prev=10,e.t0=e.catch(0),"JSBRIDGE TIMEOUT"!==e.t0){e.next=17;break}return Ti(Er.CUSTOM_INFO,{custom_name:"ad_info_init_timeout"}),e.abrupt("return",{ad_info_status:"timeout"});case 17:return Oi(Er.JSB_ERROR,e.t0,{extJSON:{position:"getAdInfo"}}),e.abrupt("return",{});case 19:case"end":return e.stop()}}),t,this,[[0,10]])}))),function(){return l.apply(this,arguments)})},{key:"getAppInfo",value:(u=r(e().mark((function t(){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve({}));case 1:case"end":return e.stop()}}),t)}))),function(){return u.apply(this,arguments)})},{key:"send",value:(s=r(e().mark((function t(n,r){var i,o,a,c,s,u,l,f;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.jsbridge){e.next=2;break}return e.abrupt("return",Promise.resolve());case 2:if(a=(null===(o=null===(i=null==n?void 0:n.context)||void 0===i?void 0:i.ad)||void 0===o?void 0:o.creative_id)||"0",c=Uo(n),s={analytics_message:c,trackLogData:JSON.stringify(n),category:"ad_analytics_msg",tag:jo,label:xo},!hi(this.env)){e.next=13;break}if(!yi()||!r){e.next=9;break}return u={eventName:xo,params:s},e.abrupt("return",this.call("sendLogWithAdInfo",u,this.bridgeTimeout));case 9:return l={eventName:jo,labelName:xo,value:a,extValue:"0",extJson:s},e.abrupt("return",this.call("sendLog",l,this.bridgeTimeout));case 13:return f={event_name:xo,version:2,properties:s},e.abrupt("return",this.call("track_event",f,400));case 15:case"end":return e.stop()}}),t,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"call",value:(c=r(e().mark((function t(n){var r,i,o,a=this,c=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=c.length>1&&void 0!==c[1]?c[1]:{},i=c.length>2&&void 0!==c[2]?c[2]:400,o=!(c.length>3&&void 0!==c[3])||c[3],e.abrupt("return",new Promise((function(e,t){if(!a.jsbridge)return t("JSBRIDGE ERROR"),void(o&&Oi(Er.JSB_ERROR,new Error("JSBRIDGE ERROR"),{extJSON:{position:"getCallPromise"}}));var c;i>0&&(c=window.setTimeout((function(){t("JSBRIDGE TIMEOUT"),o&&Oi(Er.JSB_ERROR,new Error("JSBRIDGE TIMEOUT"),{extJSON:{position:"getCallPromise",method:n}})}),i)),a.jsbridge&&a.jsbridge.call&&a.jsbridge.call(n,r,(function(t){var n=Ho(t,o);e(n),window.clearTimeout(c)}))})));case 4:case"end":return e.stop()}}),t)}))),function(e){return c.apply(this,arguments)})},{key:"sendAnalyticsEvent",value:(o=r(e().mark((function t(n){var r,i,o,a,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.method,i=n.path,o=n.params,a=n.data,e.next=3,this.call("sendAnalyticsEvent",{method:r,path:i,params:o,data:a,header:{"Content-Type":"application/json"}},0,!1);case 3:return c=e.sent,e.abrupt("return",null==c?void 0:c.code);case 5:case"end":return e.stop()}}),t,this)}))),function(e){return o.apply(this,arguments)})},{key:"updateWebFlData",value:(n=r(e().mark((function t(n){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!hi(this.env)||!yi()){e.next=2;break}return e.abrupt("return",this.call("updateFLLocalConv",n,this.bridgeTimeout));case 2:case"end":return e.stop()}}),t,this)}))),function(e){return n.apply(this,arguments)})}]),t}();Wo=Vo([C.injectable(),Jo(0,C.inject(br.ENV)),Jo(0,C.optional()),Jo(1,C.inject(br.JS_BRIDGE)),Jo(1,C.optional())],Wo),function(e){e[e.P0=4]="P0",e[e.P1=3]="P1",e[e.P2=2]="P2",e[e.P3=1]="P3"}(Go||(Go={}));var Ko=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Yo="tt_hold_events",qo=function(e){s(n,e);var t=v(n);function n(){var e;return i(this,n),(e=t.apply(this,arguments)).consentMode=Zn.UNKNOWN,e.queue=[],e.debounceUpdateCache=ti((function(){e.updateCache()}),200,h(e)),e.handleHistoryQueue=zr((function(){var t=Ri(Yo);Array.isArray(t)&&(e.queue=e.queue.concat(t),e.changeQueueWithConsent())})),e}return a(n,[{key:"on",value:function(e,t){y(u(n.prototype),"on",this).call(this,e,t),this.handleHistoryQueue()}},{key:"setConsentMode",value:function(e){this.consentMode=e,this.changeQueueWithConsent()}},{key:"changeQueueWithConsent",value:function(){switch(this.consentMode){case Zn.REVOKE:this.cleanQueue();break;case Zn.GRANT:this.releaseQueue(),this.cleanQueue();case Zn.HOLD:case Zn.UNKNOWN:}}},{key:"getConsentMode",value:function(){return this.consentMode}},{key:"cacheReportTask",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Gn.defaultReport;this.queue.push({url:e,data:t,type:n}),this.debounceUpdateCache()}},{key:"cleanQueue",value:function(){this.queue=[],function(e){try{window.sessionStorage.removeItem(e)}catch(e){}}(Yo)}},{key:"updateCache",value:function(){this.queue&&this.queue.length>0&&wi(Yo,this.queue)}},{key:"releaseQueue",value:function(){var e=this;this.queue.sort((function(t,n){return e.getEventPriority(n.data)-e.getEventPriority(t.data)})),this.emit("queue",this.queue)}},{key:"getEventPriority",value:function(e){return e.event&&e.event.length>0?Go.P0:e.action&&e.action.length>0?Go.P1:""===e.event?Go.P2:Go.P3}}]),n}(zi);qo=Ko([C.injectable()],qo);var Xo=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Qo=function(){function t(){i(this,t)}var n;return a(t,[{key:"send",value:(n=r(e().mark((function t(n,r){var i,o,a=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=a.length>2&&void 0!==a[2]?a[2]:0,e.prev=1,navigator&&navigator.sendBeacon){e.next=4;break}return e.abrupt("return",!1);case 4:if((o=navigator.sendBeacon(n,JSON.stringify(r)))||"number"!=typeof i||!(i>0)){e.next=10;break}return i--,e.next=9,ni(200);case 9:return e.abrupt("return",this.send(n,r,i));case 10:return e.abrupt("return",o);case 13:return e.prev=13,e.t0=e.catch(1),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),t,this,[[1,13]])}))),function(e,t){return n.apply(this,arguments)})},{key:"sendByImage",value:function(e,t){(new Image).src=function(e,t){var n=new URL(e);return Object.keys(t).forEach((function(e){var r=t[e].toJSON?t[e].toJSON():String(t[e]);n.searchParams.set(e,r)})),n.toString()}(e,t)}}]),t}();Qo=Xo([C.injectable()],Qo);var zo=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Zo=function(e,t){return function(n,r){t(n,r,e)}},$o=function(t){s(f,t);var n,o,c,u,l=v(f);function f(e,t,n,r){var o;return i(this,f),(o=l.call(this,e,t)).supportSendAnalyticsEvent=!0,o.consentService=n,o.consentService.on("queue",(function(e){e.forEach((function(e){var t=e.url,n=e.data,r=e.type;o.report(t,n,r)}))})),o.env=r,o}return a(f,[{key:"send",value:(u=r(e().mark((function t(n,r,i){var o,a,c,s,u,l;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.bridgeService.jsbridge){e.next=2;break}return e.abrupt("return");case 2:return u=!!r.context&&"timeout"===(null===(a=null===(o=r.context)||void 0===o?void 0:o.ad)||void 0===a?void 0:a.ad_info_status),l={},e.prev=4,e.next=7,this.bridgeService.send(r,u);case 7:if((l=e.sent)&&1===l.code){e.next=10;break}throw new Error("[fetch bridge] sendLog error: code ".concat(l&&l.code,", data: ").concat(l&&JSON.stringify(l)));case 10:return Ti(Er.JSB_SEND,{pixelCode:null===(c=r.context.pixel)||void 0===c?void 0:c.code,app_name:mi()?"ultralite":"",extJSON:{event:r.event,event_id:r.event_id,need_inject_ad_info:u}}),e.abrupt("return",l);case 14:e.prev=14,e.t0=e.catch(4),Oi(Er.JSB_ERROR,e.t0,{pixelCode:null===(s=r.context.pixel)||void 0===s?void 0:s.code,custom_name:"sendReportData",custom_enum:l&&l.code?"".concat(l.code):"non",app_name:mi()?"ultralite":"",extJSON:{position:"sendReportData"}}),mi()&&gi()&&this.sendHttpReport(n,r,i);case 18:case"end":return e.stop()}}),t,this,[[4,14]])}))),function(e,t,n){return u.apply(this,arguments)})},{key:"sendHttpReport",value:(c=r(e().mark((function t(n,r,i){var o,a,c,s=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=!(s.length>3&&void 0!==s[3])||s[3],a=s.length>4?s[4]:void 0,e.next=4,this.httpService.send(n,r,a);case 4:e.sent||this.httpService.sendByImage(n,{analytics_message:i}),o&&Ti(Er.HTTP_SEND,{pixelCode:null===(c=r.context.pixel)||void 0===c?void 0:c.code,extJSON:{event:r.event,event_id:r.event_id}});case 7:case"end":return e.stop()}}),t,this)}))),function(e,t,n){return c.apply(this,arguments)})},{key:"beforeReport",value:(o=r(e().mark((function t(n,r){var i,o,a=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=a.length>2&&void 0!==a[2]?a[2]:Gn.defaultReport,(o=this.consentService.getConsentMode())!==Zn.REVOKE){e.next=4;break}return e.abrupt("return",!1);case 4:if(o!==Zn.HOLD){e.next=7;break}return this.consentService.cacheReportTask(n,r,i),e.abrupt("return",!1);case 7:return e.abrupt("return",!0);case 8:case"end":return e.stop()}}),t,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"report",value:(n=r(e().mark((function t(n,r){var i,o,a,c,s,u=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=u.length>2&&void 0!==u[2]?u[2]:Gn.defaultReport,e.next=3,this.beforeReport(n,r,i);case 3:if(e.sent){e.next=6;break}return e.abrupt("return");case 6:if(o=Uo(r),i!==Gn.defaultReport||!this.bridgeService.jsbridge){e.next=11;break}return e.next=10,this.send(n,r,o);case 10:return e.abrupt("return",e.sent);case 11:if(i!==Gn.httpReport||!this.bridgeService.jsbridge||!hi(this.env)||_i()||!this.supportSendAnalyticsEvent){e.next=30;break}return a=n,e.prev=13,a=new URL(n).pathname,e.next=17,this.bridgeService.sendAnalyticsEvent({path:a,method:"POST",data:r});case 17:if(c=e.sent,s=new Error("sendAnalyticsEvent not support: code ".concat(c,", path: ").concat(a,", data: ").concat(JSON.stringify(r))),null!=c&&-2!==c){e.next=22;break}throw this.supportSendAnalyticsEvent=!1,s;case 22:if(1!==c){e.next=24;break}return e.abrupt("return");case 24:throw s;case 27:e.prev=27,e.t0=e.catch(13),Oi(Er.CUSTOM_ERROR,e.t0,{custom_name:"sendAnalyticsEvent",custom_enum:String(c)},!0);case 30:this.sendHttpReport(n,r,o,!(!Xr(r.event)||!Qr(r)),Fo(r.action)?3:void 0);case 31:case"end":return e.stop()}}),t,this,[[13,27]])}))),function(e,t){return n.apply(this,arguments)})},{key:"reportFL",value:function(e){this.bridgeService.jsbridge&&this.bridgeService.updateWebFlData(e)}}]),f}(co);$o=zo([C.injectable(),Zo(0,C.inject(br.HTTP_SERVICE)),Zo(1,C.inject(br.BRIDGE_SERVICE)),Zo(2,C.inject(br.CONSENT_SERVICE)),Zo(3,C.inject(br.ENV)),Zo(3,C.optional())],$o);var ea=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},ta={expires:390},na=function(){function t(){i(this,t)}var n;return a(t,[{key:"genCookieID",value:function(){return Zr(27)}},{key:"enableCookie",value:(n=r(e().mark((function t(){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Di(lr,"1",ta),e.abrupt("return",Ui("https://analytics.tiktok.com/i18n/pixel/enable_cookie"));case 2:case"end":return e.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"enableFirstPartyCookie",value:function(e){if(e){Di(lr,"1",ta);var t=this.genCookieID(),n=this.getAnonymousId();this.setAnonymousId(n||t)}}},{key:"disableCookie",value:function(){Di(lr,"0",ta),Di(fr,"",Object.assign(ta,{expires:-1})),Ui("https://analytics.tiktok.com/i18n/pixel/disable_cookie")}},{key:"setAnonymousId",value:function(e){var t=this.getAnonymousId()||e;t&&Di(fr,t,ta)}},{key:"getAnonymousId",value:function(){return Mi(fr)||""}},{key:"canUseCookie",value:function(){try{return"0"!==Mi(lr)}catch(e){}return!1}},{key:"resetExpires",value:function(){var e=Mi(lr);e&&Di(lr,e,ta);var t=this.getAnonymousId();t&&this.setAnonymousId(t)}}]),t}();na=ea([C.injectable()],na);var ra=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},ia=function(e,t){return function(n,r){t(n,r,e)}},oa=function(e){s(n,e);var t=v(n);function n(e,r){return i(this,n),t.call(this,{name:"Callback",reporters:r,context:e})}return a(n,[{key:"pixelDidMount",value:function(e){var t=Pi("ttclid");t&&ji("ttclid",t)}},{key:"beforeShopifyPixelSend",value:function(e,t){var n=Ci(e,"ttclid");n||(n=Ci(t,"ttclid")),n&&ji("ttclid",n)}}]),n}(no);oa=ra([C.injectable(),ia(0,C.inject(br.CONTEXT)),ia(1,C.inject(br.TTQ_REPORTERS))],oa);var aa=["(null)","","''\"",void 0,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","eb045d78d273107348b0300c01d29b7552d622abbc6faf81b3ec55359aa9950c","not set",null,"6181738008c985a1b5f106b796c98e719efcc3c0ff68ddcd14a049825f4900a8","2a539d6520266b56c3b0c525b9e6128858baeccb5ee9b694a2906e123c8d6dd3","c6e52c372287175a895926604fa738a0ad279538a67371cd56909c7917e69ea1","None","74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b","f24f02d3c35894296522abac8c4b2439b1c1b650e1fb4c97c0f3c50b580b0a3c","no","a683c5c5349f6f7fb903ba8a9e7e55d0ba1b8f03579f95be83f4954c33e81098","f18a2548c063c5a2b1560c6f2b9ec44bf9ed9017884404016d74f330119aaefe","449f06574cd639e1826848ff5d70ba95904574be84f34e61baa526d517dfb493","fcbcf165908dd18a9e49f7ff27810176db8e9f63b4352213741664245224f8aa","NA","bc857c49633bbc75644c51f36b16b2f768cc0ee13f65402ec7c32c96308272dd","42cbf37902c6911d7b4e371fe8f8708a0ceda6946249d4a3e23de8d5e60ae8b7"],ca={isHash:function(e){return!1},genIdentifierLabelByUserProperties:function(e){return{}}},sa={validatePhoneNumberLength:function(e){},parsePhoneNumberFromString:function(e){}},ua={tryDecodeHashedBase64String:function(e){return null},tryDecodeHashedBase64Hex:function(e){return null}},la=function(e){var t,n=e.parsePhoneNumberFromString,r=e.validatePhoneNumberLength,i=e.isHash,o=e.genIdentifierLabelByUserProperties,a=e.tryDecodeHashedBase64String,c=e.tryDecodeHashedBase64Hex,s=e.checkEmailFormat,u=e.checkMDNEmailFormat;e.sha256,t={checkEmailFormat:s,checkMDNEmailFormat:u},t.checkMDNEmailFormat,function(e){var t=e.tryDecodeHashedBase64String,n=e.tryDecodeHashedBase64Hex;ua.tryDecodeHashedBase64String=t,ua.tryDecodeHashedBase64Hex=n}({tryDecodeHashedBase64String:a,tryDecodeHashedBase64Hex:c}),function(e){var t=e.isHash,n=e.genIdentifierLabelByUserProperties;ca.isHash=t,ca.genIdentifierLabelByUserProperties=n}({isHash:i,genIdentifierLabelByUserProperties:o}),function(e){var t=e.parsePhoneNumberFromString,n=e.validatePhoneNumberLength;sa.parsePhoneNumberFromString=t,sa.validatePhoneNumberLength=n}({parsePhoneNumberFromString:n,validatePhoneNumberLength:r})},fa=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:sa.parsePhoneNumberFromString,r=e,i=t?n(e,t):n(e);return i?r="86"===i.countryCallingCode?i.nationalNumber:i.number:e.replace(/[^0-9]/g,"").length>0&&(r=e.replace(/[^0-9]/g,"")),r},da=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},ha=function(e,t){return function(n,r){t(n,r,e)}},pa=function(t){s(c,t);var n,o=v(c);function c(e,t){var n;return i(this,c),(n=o.call(this,{name:"Identify",reporters:t,context:e})).init(),n}return a(c,[{key:"setIdentifyUtils",value:function(e){var t=e.isHash,n=e.sha256,r=e.genIdentifierLabelByUserProperties,i=e.tryDecodeHashedBase64String,o=e.tryDecodeHashedBase64Hex,a=e.validatePhoneNumberLength,c=e.parsePhoneNumberFromString,s=e.checkEmailFormat,u=e.checkMDNEmailFormat;la({isHash:t,sha256:n,genIdentifierLabelByUserProperties:r,tryDecodeHashedBase64String:i,tryDecodeHashedBase64Hex:o,validatePhoneNumberLength:a,parsePhoneNumberFromString:c,checkEmailFormat:s,checkMDNEmailFormat:u}),this.parsePhoneNumberFromString=c,this.checkMDNEmailFormat=u,this.checkEmailFormat=s,this.sha256=n}},{key:"init",value:function(){return this.pluginPromise||(Ti(Er.IDENTIFY_INIT_START),this.pluginPromise=Ui("https://analytics.tiktok.com/i18n/pixel/static/identify_e50fd6f6.js").then((function(){Ti(Er.IDENTIFY_INIT_END)})).catch((function(){var e=new Error("Loading chunk identify failed.\n(error: ".concat(window.location.host,"/static/identify.js)"));return e.name="ChunkLoadError",Promise.reject(e)}))),this.pluginPromise}},{key:"handleUserProperties",value:(n=r(e().mark((function t(n,r){var i,o,a,c=this;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return",void 0);case 2:return e.next=4,this.init();case 4:return i=this.identifyParamsFormattedInfo(n),o=this.identifyParamsFormattedInfoV2(n),a=ca.genIdentifierLabelByUserProperties(r),this.handlePIIDiagnostics(o),Object.entries(n).forEach((function(e){var t=_(e,2),r=t[0],i=t[1],a=void 0===i?"":i;if(a){var s=String(a);if(["email","phone_number","sha256_email","sha256_phone_number"].includes(r)){var u=c.getUserDataFormatInfoV2KeyName(r),l=ua.tryDecodeHashedBase64Hex(s);if(null!==l)n[r]=l,null!==u&&(o=c.updateUserDataFormatV2LabelForBase64(u,Wn.BASE64_HEX_HASHED,o));else{var f=ua.tryDecodeHashedBase64String(s);f&&(n[r]=f,null!==u&&(o=c.updateUserDataFormatV2LabelForBase64(u,Wn.BASE64_STRING_HASHED,o)))}}switch(r){case"email":n.email=ca.isHash(s)&&!c.checkEmailFormat(s)?s:c.sha256(c.handleEmail(s));break;case"phone_number":n.phone_number=ca.isHash(s)?s:c.sha256(c.handlePhoneNumber(s));break;case"auto_email":n.auto_email=c.sha256(c.handleEmail(s));break;case"auto_phone_number":n.auto_phone_number=c.sha256(c.handlePhoneNumber(s));break;default:return}}})),n.sha256_email&&(n.email=this.handleCheckHashedEmailValue(String(n.sha256_email),i)),n.sha256_phone_number&&(n.phone_number=this.handleCheckHashedPhoneValue(String(n.sha256_phone_number),i)),e.abrupt("return",{userProperties:n,userDataFormat:i,userDataFormatV2:o,identifierLabel:a});case 12:case"end":return e.stop()}}),t,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"identifyParamsFormattedInfo",value:function(e){var t=this,n={},r=/^sha256_(.*)$/;return Object.entries(e).forEach((function(e){var i=_(e,2),o=i[0],a=i[1],c=String(void 0===a?"":a),s=o.match(r);switch(o){case"email":t.handleEmailFormat(c,"email",n);break;case"phone_number":t.handlePhoneNumberFormat(c,"phone_number",n);break;case"auto_email":t.handleEmailFormat(c,"auto_email",n);break;case"auto_phone_number":t.handlePhoneNumberFormat(c,"auto_phone_number",n);break;case(s||{}).input:var u=null==s?void 0:s.pop();u&&Dr.includes(u)&&(n[u]=[Jn.HASHED]);break;default:n[o]=[Jn.CORRECT_FORMAT]}})),n}},{key:"identifyParamsFormattedInfoV2",value:function(e){var t=this,n={};return Object.entries(e).forEach((function(e){var r=_(e,2),i=r[0],o=r[1],a=String(void 0===o?"":o);switch(i){case"email":t.handlePixelValidation(a,Lr,n);break;case"phone_number":t.handlePixelValidation(a,jr,n);break;case"sha256_email":t.handlePixelValidation(a,xr,n);break;case"sha256_phone_number":t.handlePixelValidation(a,Ur,n);break;default:n[i]=[Wn.UNKNOWN_INVALID]}})),n}},{key:"handlePixelValidation",value:function(e,t,n){n[t]=[],aa.includes(e)&&n[t].push(Wn.FILTER_EVENTS),e&&ca.isHash(e)&&n[t].push(Wn.HASHED),e&&this.checkEmailFormat(e)&&n[t].push(Wn.PLAIN_EMAIL),e&&this.checkMDNEmailFormat(e)&&n[t].push(Wn.PLAIN_MDN_EMAIL),e&&this.parsePhoneNumberFromString(e)&&n[t].push(Wn.PLAIN_PHONE),e&&0===n[t].length&&n[t].push(Wn.UNKNOWN_INVALID)}},{key:"handleEmail",value:function(e){return e.toLowerCase()}},{key:"handlePhoneNumber",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.parsePhoneNumberFromString;return fa(e,"",t)}},{key:"handleEmailFormat",value:function(e,t,n){var r=this.handleCheckEmail(String(e),this.checkEmailFormat);n&&n[t]&&(n[t]||[]).includes(Jn.HASHED)||(n[t]=r)}},{key:"handlePhoneNumberFormat",value:function(e,t,n){var r=this.handleCheckPhoneNumber(String(e),this.parsePhoneNumberFromString);n[t]=r}},{key:"handleCheckPhoneNumber",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.parsePhoneNumberFromString,n=[];if(!e)return n.push(Jn.EMPTY_VALUE),n;if(ca.isHash(e))return n.push(Jn.HASHED),n;var r=t(e);return r?(n.push(Jn.CORRECT_FORMAT),n):(n.push(Jn.WRONG_FORMAT),n)}},{key:"handleCheckEmail",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.checkEmailFormat,n=[];return e?ca.isHash(e)?(n.push(Jn.HASHED),n):t(e)?(n.push(Jn.CORRECT_FORMAT),n):(n.push(Jn.WRONG_FORMAT),n):(n.push(Jn.EMPTY_VALUE),n)}},{key:"handleCheckHashedEmailValue",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.checkEmailFormat;return t.email=t.email||[],ca.isHash(e)?(null==t||t.email.push(Jn.HASHED_CORRECT),e):n(e)?(null==t||t.email.push(Jn.PLAINTEXT_EMAIL),this.sha256(this.handleEmail(String(e)))):(null==t||t.email.push(Jn.HASHED_ERR),this.sha256(e))}},{key:"handleCheckHashedPhoneValue",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.parsePhoneNumberFromString;return t.phone_number=t.phone_number||[],ca.isHash(e)?(null==t||t.phone_number.push(Jn.HASHED_CORRECT),e):n(e)?(t.phone_number.push(Jn.PLAINTEXT_PHONE),this.sha256(this.handlePhoneNumber(String(e),n))):(null==t||t.phone_number.push(Jn.HASHED_ERR),this.sha256(e))}},{key:"handlePIIDiagnostics",value:function(e){try{var t=e.email_is_hashed,n=void 0===t?[]:t,r=e.sha256_email,i=void 0===r?[]:r,o=e.phone_is_hashed,a=void 0===o?[]:o,c=e.sha256_phone,s=void 0===c?[]:c;if(n.includes(Wn.UNKNOWN_INVALID)||i.includes(Wn.UNKNOWN_INVALID))return void Si(Ir.INVALID_EMAIL_FORMAT);if(a.includes(Wn.UNKNOWN_INVALID)||s.includes(Wn.UNKNOWN_INVALID))return void Si(Ir.INVALID_PHONE_NUMBER_FORMAT);if(n.includes(Wn.FILTER_EVENTS)||i.includes(Wn.FILTER_EVENTS))return void Si(Ir.INVALID_EMAIL_INFORMATION);if(a.includes(Wn.FILTER_EVENTS)||s.includes(Wn.FILTER_EVENTS))return void Si(Ir.INVALID_PHONE_NUMBER_INFORMATION)}catch(e){}}},{key:"getUserDataFormatInfoV2KeyName",value:function(e){return{email:"email_is_hashed",phone_number:"phone_is_hashed",sha256_email:"sha256_email",sha256_phone_number:"sha256_phone"}[e]||null}},{key:"updateUserDataFormatV2LabelForBase64",value:function(e,t,n){var r,i;return(null===n[e]||void 0===n[e]||(null===(r=n[e])||void 0===r?void 0:r.includes(Wn.UNKNOWN_INVALID)))&&(n[e]=[]),null===(i=n[e])||void 0===i||i.push(t),n}}]),c}(no);function va(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=Date.now();return function(){var r=Array.prototype.slice.call(arguments),i=Date.now();i-n>=t&&(e.apply(void 0,b(r)),n=i)}}pa=da([C.injectable(),ha(0,C.inject(br.CONTEXT)),ha(1,C.inject(br.TTQ_REPORTERS))],pa);var ga={fcp:"first_contentful_paint",lcp:"largest_contentful_paint",cls:"cumulative_layout_shift",fid:"first_input_delay",tti:"time_to_interactive",navigationStart:"navigation_start",loadEventStart:"load_event_start",requestStart:"request_start",enterTime:"enter_time",leaveTime:"leave_time",docHeight:"doc_height",maxScrollHeight:"max_scroll_height",clickTimes:"click_times",scrollTimes:"scroll_times",connectionType:"connection_type"},ya=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},_a=function(e,t){return function(n,r){t(n,r,e)}},ma=function(e){s(n,e);var t=v(n);function n(e,r,o,a,c,s,u){var l;return i(this,n),(l=t.call(this,{name:"PerformanceInteraction",reporters:o,context:r})).monitors=[],l.currentUrl="",l.ttqOptions={},l.env=e,l.reportService=a,l.interactionMonitor=c,l.performanceMonitor=s,l.ttqOptions=u,l.init(),l}return a(n,[{key:"reportSwitch",value:function(){var e,t,n=Pi(Cr),r="";try{var i=window.sessionStorage&&window.sessionStorage.getItem(sr);if(i)r=JSON.parse(i).callback}catch(e){}return!!(n||r||hi(this.env)||(null===(t=null===(e=this.ttqOptions)||void 0===e?void 0:e.plugins)||void 0===t?void 0:t.PerformanceInteraction))}},{key:"init",value:function(){var e=this;this.reportSwitch()&&(this.monitors.push(this.interactionMonitor),this.monitors.push(this.performanceMonitor),this.monitors.forEach((function(e){e.init()})),setInterval((function(){e.report()}),1e4))}},{key:"pageUrlWillChange",value:function(e,t){this.reportSwitch()&&(this.monitors.forEach((function(n){n.pageUrlWillChange(e,t)})),e&&this.report())}},{key:"pageWillLeave",value:function(e){this.reportSwitch()&&(this.monitors.forEach((function(t){t.pageWillLeave(e)})),this.report())}},{key:"pageUrlDidChange",value:function(e){this.currentUrl!==e&&this.reportSwitch()&&(this.currentUrl=e,this.monitors.forEach((function(t){t.pageUrlDidChange(e)})),this.report())}},{key:"report",value:function(){var e=this;if(this.reportSwitch()){var t=this.transformReportData(this.collectorData());if(Object.keys(t).length){var n=yr.PERFORMANCE_INTERACTION,r=Ai(n);null!==r&&Fi(this.reportService.reportPreposition||[]).then((function(){e.reportService.report(r,e.assemblyMergedData(t,n),function(e){return{performance_interaction:Gn.httpReport}[e]||Gn.htmlHttpReport}(n))}))}}}},{key:"assemblyMergedData",value:function(e,t){var n=this.context.getPageSign(),r=this.reporters[0],i=(null==r?void 0:r.getReporterId())||"",o=this.reporters.map((function(e){return e.getReporterId()})).join("|"),a=null==r?void 0:r.assemblyData(i,"",e,{},t);return a&&(a.context.pixel&&(a.context.pixel.codes=o),a.context.index=n.index,a.context.session_id=n.sessionId),a||{}}},{key:"collectorData",value:function(){return this.monitors.reduce((function(e,t){return t.isChanged()&&(e=Object.assign({},e,t.getResult())),e}),{})}},{key:"transformReportData",value:function(e){return Object.entries(e).reduce((function(e,t){var n=_(t,2),r=n[0],i=n[1];return e[ga[r]]=i,e}),{})}}]),n}(no);function ba(){var e=document.body,t=document.documentElement;return Math.max(e?e.scrollHeight:0,e?e.offsetHeight:0,t?t.clientHeight:0,t?t.scrollHeight:0,t?t.offsetHeight:0)}function Ea(){return document.documentElement.clientHeight+window.pageYOffset}ma=ya([C.injectable(),_a(0,C.inject(br.ENV)),_a(1,C.inject(br.CONTEXT)),_a(2,C.inject(br.TTQ_REPORTERS)),_a(3,C.inject(br.REPORT_SERVICE)),_a(4,C.inject(br.INTERACTION_MONITOR)),_a(5,C.inject(br.PERFORMANCE_MONITOR)),_a(6,C.inject(br.TTQ_GLOBAL_OPTIONS))],ma);var Ia=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Ta=function(){function e(){i(this,e),this.connectionType="",this._docHeight=0,this._maxScrollHeight=0,this.clickTimes=0,this.scrollTimes=0,this.isDocHeightChanged=!1,this.isMaxScrollHeightChanged=!1,this.enterTime=0,this.leaveTime=0,this.isFirstReport=!0}return a(e,[{key:"init",value:function(){!function(e){var t=va((function(t){e()}),100);window.addEventListener("click",t,{capture:!0})}(this.updateClickTimes.bind(this)),function(e){var t=va((function(){var t={scrollHeight:Ea(),docHeight:ba()};e(t)}),500);window.addEventListener("scroll",t,{passive:!0})}(this.updateScrollData.bind(this))}},{key:"pageUrlWillChange",value:function(e,t){""!==e?this.leaveTime=Date.now():this.enterTime=window.performance.timing.navigationStart}},{key:"pageUrlDidChange",value:function(e){0!==this.enterTime&&(this.resetAfterPageChange(),this.initInteractionData(),this.enterTime=Date.now())}},{key:"pageWillLeave",value:function(e){this.leaveTime=e}},{key:"updateClickTimes",value:function(){this.clickTimes+=1}},{key:"updateScrollData",value:function(e){var t=e.scrollHeight,n=e.docHeight;this.scrollTimes+=1,this.maxScrollHeight=t,this.docHeight=n}},{key:"initInteractionData",value:function(){var e,t={docHeight:ba(),scrollHeight:Ea(),connectionType:(e=navigator.connection,e&&e.effectiveType?e.effectiveType:"")},n=t.docHeight,r=t.scrollHeight,i=t.connectionType;this.docHeight=n,this.maxScrollHeight=r,this.connectionType=i}},{key:"resetAfterPageChange",value:function(){this.clearAfterReport(),this.maxScrollHeight=0,this.docHeight=0,this.leaveTime=0,this.isFirstReport=!0,this.connectionType=""}},{key:"clearAfterReport",value:function(){this.clickTimes=0,this.scrollTimes=0,this.isDocHeightChanged=!1,this.isMaxScrollHeightChanged=!1,this.isFirstReport=!1}},{key:"getResult",value:function(){var e={};return this.scrollTimes&&(e.scrollTimes=this.scrollTimes),this.clickTimes&&(e.clickTimes=this.clickTimes),this.leaveTime&&(e.leaveTime=this.leaveTime),this.isDocHeightChanged&&(e.docHeight=this.docHeight),this.isMaxScrollHeightChanged&&(e.maxScrollHeight=this.maxScrollHeight),this.isFirstReport&&(e.connectionType=this.connectionType,e.enterTime=this.enterTime),this.clearAfterReport(),e}},{key:"isChanged",value:function(){return this.isDocHeightChanged||this.isMaxScrollHeightChanged||0!==this.scrollTimes||0!==this.clickTimes||0!==this.leaveTime}},{key:"docHeight",get:function(){return this._docHeight},set:function(e){e>this._docHeight?(this._docHeight=e,this.isDocHeightChanged=!0):0===e&&(this._docHeight=0,this.isDocHeightChanged=!1)}},{key:"maxScrollHeight",get:function(){return this._maxScrollHeight},set:function(e){e>this._maxScrollHeight?(this._maxScrollHeight=e,this.isMaxScrollHeightChanged=!0):0===e&&(this._maxScrollHeight=0,this.isMaxScrollHeightChanged=!1)}}]),e}();Ta=Ia([C.injectable()],Ta);var Oa,Sa=function(e,t){try{var n=null==t?void 0:t.type;if(n&&PerformanceObserver.supportedEntryTypes.indexOf(n)>-1){var r=new PerformanceObserver((function(t){t.getEntries().forEach(e)}));return r.observe(t),r}}catch(e){}},Na=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];document.addEventListener("visibilitychange",(function(t){"hidden"===document.visibilityState&&e(t)}),{once:t})},Aa=function(){return void 0===Oa&&(Oa="hidden"===document.visibilityState?0:1/0,Na((function(e){Oa=Math.min(Oa,e.timeStamp)}))),{get timeStamp(){return Oa}}},Ra="first-contentful-paint";function wa(e){if(!(window&&window.performance&&(null===(t=window.performance)||void 0===t?void 0:t.getEntries)))return-1;var t,n=performance.getEntriesByType("paint");if(Array.isArray(n)){var r=n.filter((function(t){return t.name===e}));return r.length&&r[0]&&r[0].startTime&&r[0].startTime||-1}return-1}var Ca,Pa={exports:{}};Ca=Pa,function(){var e="undefined"!=typeof window&&window===this?this:void 0!==R&&null!=R?R:this,t="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)};function n(){n=function(){},e.Symbol||(e.Symbol=i)}var r=0;function i(e){return"jscomp_symbol_"+(e||"")+r++}function o(){n();var r=e.Symbol.iterator;r||(r=e.Symbol.iterator=e.Symbol("iterator")),"function"!=typeof Array.prototype[r]&&t(Array.prototype,r,{configurable:!0,writable:!0,value:function(){return a(this)}}),o=function(){}}function a(t){var n=0;return function(t){return o(),(t={next:t})[e.Symbol.iterator]=function(){return this},t}((function(){return n<t.length?{done:!1,value:t[n++]}:{done:!0}}))}function c(e){o();var t=e[Symbol.iterator];return t?t.call(e):a(e)}function s(e){if(!(e instanceof Array)){e=c(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}var u=0,l="img script iframe link audio video source".split(" ");function f(e,t){for(var n=(e=c(e)).next();!n.done;n=e.next())if(n=n.value,t.includes(n.nodeName.toLowerCase())||f(n.children,t))return!0;return!1}function d(e,t){if(2<e.length)return performance.now();for(var n=[],r=(t=c(t)).next();!r.done;r=t.next())r=r.value,n.push({timestamp:r.start,type:"requestStart"}),n.push({timestamp:r.end,type:"requestEnd"});for(r=(t=c(e)).next();!r.done;r=t.next())n.push({timestamp:r.value,type:"requestStart"});for(n.sort((function(e,t){return e.timestamp-t.timestamp})),e=e.length,t=n.length-1;0<=t;t--)switch(r=n[t],r.type){case"requestStart":e--;break;case"requestEnd":if(2<++e)return r.timestamp;break;default:throw Error("Internal Error: This should never happen")}return 0}function h(e){e=e||{},this.w=!!e.useMutationObserver,this.u=e.minValue||null,e=window.__tti&&window.__tti.e;var t=window.__tti&&window.__tti.o;this.a=e?e.map((function(e){return{start:e.startTime,end:e.startTime+e.duration}})):[],t&&t.disconnect(),this.b=[],this.f=new Map,this.j=null,this.v=-1/0,this.i=!1,this.h=this.c=this.s=null,function(e,t){var n=XMLHttpRequest.prototype.send,r=u++;XMLHttpRequest.prototype.send=function(i){for(var o=[],a=0;a<arguments.length;++a)o[a-0]=arguments[a];var c=this;return e(r),this.addEventListener("readystatechange",(function(){4===c.readyState&&t(r)})),n.apply(this,o)}}(this.m.bind(this),this.l.bind(this)),function(e,t){var n=fetch;fetch=function(r){for(var i=[],o=0;o<arguments.length;++o)i[o-0]=arguments[o];return new Promise((function(r,o){var a=u++;e(a),n.apply(null,[].concat(s(i))).then((function(e){t(a),r(e)}),(function(e){t(e),o(e)}))}))}}(this.m.bind(this),this.l.bind(this)),function(e){e.c=new PerformanceObserver((function(t){for(var n=(t=c(t.getEntries())).next();!n.done;n=t.next())if("resource"===(n=n.value).entryType&&(e.b.push({start:n.fetchStart,end:n.responseEnd}),v(e,d(e.g,e.b)+5e3)),"longtask"===n.entryType){var r=n.startTime+n.duration;e.a.push({start:n.startTime,end:r}),v(e,r+5e3)}})),e.c.observe({entryTypes:["longtask","resource"]})}(this),this.w&&(this.h=function(e){var t=new MutationObserver((function(t){for(var n=(t=c(t)).next();!n.done;n=t.next())("childList"==(n=n.value).type&&f(n.addedNodes,l)||"attributes"==n.type&&l.includes(n.target.tagName.toLowerCase()))&&e(n)}));return t.observe(document,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["href","src"]}),t}(this.B.bind(this)))}function p(e){e.i=!0;var t=0<e.a.length?e.a[e.a.length-1].end:0,n=d(e.g,e.b);v(e,Math.max(n+5e3,t))}function v(e,t){!e.i||e.v>t||(clearTimeout(e.j),e.j=setTimeout((function(){var t=performance.timing.navigationStart,n=d(e.g,e.b);if(t=(window.a&&window.a.A?1e3*window.a.A().C-t:0)||performance.timing.domContentLoadedEventEnd-t,e.u)var r=e.u;else r=performance.timing.domContentLoadedEventEnd?(r=performance.timing).domContentLoadedEventEnd-r.navigationStart:null;var i=performance.now();null===r&&v(e,Math.max(n+5e3,i+1e3));var o=e.a;(n=5e3>i-n||5e3>i-(n=o.length?o[o.length-1].end:t)?null:Math.max(n,r))&&(e.s(n),clearTimeout(e.j),e.i=!1,e.c&&e.c.disconnect(),e.h&&e.h.disconnect()),v(e,performance.now()+1e3)}),t-performance.now()),e.v=t)}h.prototype.getFirstConsistentlyInteractive=function(){var e=this;return new Promise((function(t){e.s=t,"complete"==document.readyState?p(e):window.addEventListener("load",(function(){p(e)}))}))},h.prototype.m=function(e){this.f.set(e,performance.now())},h.prototype.l=function(e){this.f.delete(e)},h.prototype.B=function(){v(this,performance.now()+5e3)},e.Object.defineProperties(h.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return[].concat(s(this.f.values()))}}});var g={getFirstConsistentlyInteractive:function(e){return e=e||{},"PerformanceLongTaskTiming"in window?new h(e).getFirstConsistentlyInteractive():Promise.resolve(null)}};Ca.exports?Ca.exports=g:window.ttiPolyfill=g}();var ka=Pa.exports,Ma=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Da=["fcp","lcp","cls","fid","tti","navigationStart","loadEventStart","requestStart"],La=function(){function e(){i(this,e),this.fcp=-1,this.lcp=-1,this.cls=-1,this.fid=-1,this.tti=-1,this.navigationStart=-1,this.loadEventStart=-1,this.requestStart=-1,this.everythingDone=!1,this.changedMap={},this.init()}return a(e,[{key:"init",value:function(){var e,t,n,r;this.updatePerformanceTiming(),e=this.baseHandler.bind(this,"cls"),t=0,r=Sa(n=function(e){e.hadRecentInput||(t+=e.value)},{type:"layout-shift",buffered:!0}),Na((function(){r&&(r.takeRecords().forEach(n),r.disconnect()),e(t)})),function(e){var t=wa(Ra);if(-1===t){var n=Aa();Sa((function(t){if(t.name===Ra){if(t.startTime<n.timeStamp)return void e(t.startTime);e(-1)}}),{type:"paint",buffered:!0})}else e(t)}(this.baseHandler.bind(this,"fcp")),function(e){var t=Aa();Sa((function(n){if(n.startTime<t.timeStamp){var r=n.processingStart-n.startTime;e(r)}}),{type:"first-input"})}(this.baseHandler.bind(this,"fid")),function(e){var t=Aa(),n=0,r=function(r){r.startTime<t.timeStamp&&(n=r.startTime,e(n))},i=Sa(r,{type:"largest-contentful-paint",buffered:!0});Na((function(){i&&(i.takeRecords().forEach(r),i.disconnect()),e(n)}))}(this.baseHandler.bind(this,"lcp")),function(e){ka.getFirstConsistentlyInteractive({}).then((function(t){e(t)}))}(this.baseHandler.bind(this,"tti"))}},{key:"updatePerformanceTiming",value:function(){var e=this,t=function(){var e=window.performance.timing;return{navigationStart:(null==e?void 0:e.navigationStart)||0,loadEventStart:(null==e?void 0:e.loadEventStart)||0,requestStart:(null==e?void 0:e.responseStart)||0}}(),n=t.navigationStart,r=t.loadEventStart,i=t.requestStart;this.baseHandler("navigationStart",n),this.baseHandler("loadEventStart",r),this.baseHandler("requestStart",i),0!==n&&0!==r&&0!==i||setTimeout((function(){e.updatePerformanceTiming()}),5e3)}},{key:"baseHandler",value:function(e,t){this.everythingDone||-1===this[e]&&0!==t&&-1!==t&&(this.changedMap[e]=!0,this[e]=t)}},{key:"isChanged",value:function(){return 0!==Object.keys(this.changedMap).length}},{key:"getResult",value:function(){var e={};if(this.everythingDone)e=this.getAllData();else for(var t=0,n=Object.keys(this.changedMap);t<n.length;t++){var r=n[t];e[r]=this[r]}return this.clearAfterReport(),e}},{key:"getAllData",value:function(){var e=this;return Da.reduce((function(t,n){return t[n]=e[n],t}),{})}},{key:"clearAfterReport",value:function(){this.changedMap={}}},{key:"pageUrlWillChange",value:function(e,t){}},{key:"pageUrlDidChange",value:function(e){var t=this;this.everythingDone=Da.every((function(e){return-1!==t[e]}),this),this.changedMap.navigationStart=!0}},{key:"pageWillLeave",value:function(e){}}]),e}();La=Ma([C.injectable()],La);var ja,xa=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Ua=function(e,t){return function(n,r){t(n,r,e)}},Fa=function(e){s(n,e);var t=v(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this,{name:"WebFL",reporters:r,context:e})).reportService=o,c.ttqOptions=a,c.useExchangeRate=a.usd_exchange_rate,c}return a(n,[{key:"pixelSend",value:function(e,t,n){var r,i;Boolean(null===(i=null===(r=this.ttqOptions)||void 0===r?void 0:r.plugins)||void 0===i?void 0:i.WebFL)&&n&&this.reportFlConv(n)}},{key:"reportFlConv",value:function(e){var t;if(e&&"Pageview"!==e.event){var n,r=e.context,i=e.properties,o=void 0===i?{}:i,a=void 0!==r.ad.log_extra?r.ad.log_extra:"{}";try{n=JSON.parse(a)}catch(e){n={}}var c={req_id:n.req_id||"",cid:r.ad.creative_id||"",value:o.value||"",currency:o.currency||"",raw:Object.assign({},o)},s=o.value,u=o.currency,l=function(e,t,n){return isNaN(e)||e<0||null===n||!n[t]?"":(e/n[t]*1e5).toFixed(0)}(s,u,this.useExchangeRate||null),f=r.pixel?r.pixel.code:"";l&&(c.usd_value=l,Ti(Er.CUSTOM_INFO,{pixelCode:f,custom_name:"odfl_rate_exchange",extJSON:{message_id:e.message_id,cid:c.cid,event:e.event,value:s,currency:u,usdValue:l}}));var d={business:"devicefl_join_label",entrance:"app_to_web_conversion",inputParams:{message_id:e.message_id,event:e.event,event_props:c,event_source_id:null===(t=r.pixel)||void 0===t?void 0:t.code,event_source_type:"web"}};this.reportService&&this.reportService.reportFL&&(this.reportService.reportFL(d),Ti(Er.CUSTOM_INFO,{pixelCode:f,custom_name:"fl_jsb_report",extJSON:{message_id:e.message_id,cid:c.cid,event:e.event}}))}}}]),n}(no);Fa=xa([C.injectable(),Ua(0,C.inject(br.CONTEXT)),Ua(1,C.inject(br.TTQ_REPORTERS)),Ua(2,C.inject(br.REPORT_SERVICE)),Ua(3,C.inject(br.TTQ_GLOBAL_OPTIONS))],Fa),function(e){e.ERROR_FORMAT="error_format",e.OVER_LENGTH="over_length_3e4",e.FILTER_SENSITIVE_FIELDS="filter_sensitive_fields"}(ja||(ja={}));var Ba,Ha,Ga,Va,Ja,Wa="form_detail_error";!function(e){e.GET_ELEMENTS_ERROR="get_elements_error",e.INIT_ERROR="init_error",e.ASSEMBLE_FORM_DETAIL_ERROR="assemble_form_detail_error",e.DETECT_FORM_ELEMENT_ERROR="detect_form_element_error",e.GET_OVERALL_FORM_DETAIL_ERROR="get_overall_form_detail_error",e.FORM_OBSERVER_ERROR="form_observer_error",e.OVER_LENGTH="over_length_3e4"}(Ba||(Ba={})),function(e){e.METADATA="Metadata",e.CLICK="Click"}(Ha||(Ha={})),function(e){e.AUTO_COLLECTION="AUTO_COLLECTION",e.AUTO_FORM="AUTO_FORM",e.AUTO_CLICK="AUTO_CLICK",e.AUTO_VC="AUTO_VC",e.AUTO_VC_REVERSE="AUTO_VC_REVERSE"}(Ga||(Ga={})),function(e){e.AUTO_FORM="form_rules",e.AUTO_VC="vc_rules",e.AUTO_VC_REVERSE="vc_rules_reverse"}(Va||(Va={})),function(e){e.PAGE_LEAVE="PageLeave",e.PAGE_VIEW="PageView",e.DOM_CHANGE="DomChange",e.URL_CHANGE="UrlChange",e.CLICK="Click",e.SCROLL="Scroll"}(Ja||(Ja={}));var Ka=["AnatomicalStructure","AnatomicalSystem","ApprovedIndication","ArriveAction","Artery","BioChemEntity","BloodTest","Bone","BorrowAction","BrainStructure","BrokerageAccount","CDCPMDRecord","ChemicalSubstance","CovidTestingFacility","DDxElement","DepartAction","DepositAccount","DiagnosticLab","DiagnosticProcedure","Diet","DietarySupplement","DoseSchedule","ElementarySchool","HighSchool","ExercisePlan","Gene","GovernmentBenefitsType","GovernmentService","HealthAspectEnumeration","HealthInsurancePlan","HealthPlanCostSharingSpecification","HealthTopicContent","Hospital","ImagingTest","InfectiousAgentClass","InvestmentFund","InvestmentOrDeposit","Invoice","Joint","LendAction","LifestyleModification","Ligament","LoanOrCredit","LymphaticVessel","MaximumDoseSchedule","MedicalAudience","MedicalAudienceType","MedicalCause","MedicalCode","MedicalCondition","MedicalConditionStage","MedicalContraindication","MedicalDevice","MedicalEntity","MedicalEvidenceLevel","MedicalGuidelineContraindication","MedicalIndication","MedicalIntangible","MedicalObservationalStudy","MedicalOrganization","MedicalProcedure","MedicalProcedureType","MedicalRiskCalculator","MedicalRiskFactor","MedicalRiskScore","MedicalSign","MedicalSignOrSymptom","MedicalStudy","MedicalSymptom","MedicalTest","MedicalTestPanel","MedicalTherapy","MedicalTrial","MiddleSchool","MoneyTransfer","Muscle","Nerve","OccupationalTherapy","Order","PalliativeProcedure","ParentAudience","PathologyTest","Patient","PeopleAudience","Person","Pharmacy","PhysicalActivity","PhysicalTherapy","Physician","PoliticalParty","Preschool","PreventionIndication","Protein","PsychologicalTreatment","RadiationTherapy","RecommendedDoseSchedule","ReportedDoseSchedule","School","Substance","SuperficialAnatomy","SurgicalProcedure","Text","TherapeuticProcedure","TreatmentIndication","URL","Vein","Vessel","VitalSign","WorkersUnion"],Ya=2e3;function qa(e){return/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi.test(e)||/(\+?0?86-?)?1[3-9]\d{9}/g.test(e)||/(\+\d{1,2}\s?)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}/g.test(e)||/^[\-!$><-==&_\/\?\.,0-9:; \]\[%~\"\{\}\)\(\+\@\^\`]/g.test(e)||Ka.some((function(t){return e.toLowerCase().indexOf(t.toLowerCase())>-1}))}var Xa=function e(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return"";if(t===document.documentElement)return"/HTML";for(var n=1,r=t.previousSibling;r;)r.nodeType===Node.ELEMENT_NODE&&r.tagName===t.tagName&&n++,r=r.previousSibling;var i=t.tagName.toLowerCase(),o=e(t.parentNode);return"".concat(o,"/").concat(i,"[").concat(n,"]")};function Qa(e){return Xa(e)}function za(e,t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];window.requestIdleCallback&&window.requestIdleCallback(e.bind.apply(e,[t].concat(r))),e.apply(t,r)}}function Za(e){var t=e.options,n=e.plugins;return t&&!1!==t.autoConfig&&n&&n[Hc]}function $a(e,t){if(!Va[t])return!0;var n=e.plugins;return t===Ga.AUTO_VC_REVERSE?Za(e)&&n[Hc]&&!n[Hc][Va.AUTO_VC]:Za(e)&&n[Hc]&&n[Hc][Va[t]]}function ec(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=-1;return function(){var r=Array.prototype.slice.apply(arguments);Date.now()-n>=t&&(e.apply(void 0,b(r)),n=Date.now())}}((function(t){e(t)}),1e3);document.querySelectorAll(ii.join(", ")).forEach((function(e){oi.some((function(t){return e.matches(t)}))||e.addEventListener("click",t,{capture:!0})}))}var tc=function e(t){for(var n=0,r=t.children,i=0;i<r.length;i++){var o=r[i],a=!1;try{a=ai(o)}catch(e){Oi(Er.CUSTOM_ERROR,e,{custom_name:"button_check_error",custom_enum:"auto_click",extJSON:{element:o}}),a=!1}a&&n++,n+=e(o)}return n},nc=function(e){var t,n,r,i,o="";if("A"===e.tagName.toUpperCase())o=null!==(t=e.getAttribute("href"))&&void 0!==t?t:"";else if("BUTTON"===e.tagName.toUpperCase()){var a=null!==(n=e.getAttribute("onclick"))&&void 0!==n?n:"",c=null!==(r=e.getAttribute("formaction"))&&void 0!==r?r:"",s=a.match(/^.*=(['"])(.*)\1.*$/);c?o=c:s&&(o=s[2])}else"FORM"===e.tagName.toUpperCase()&&(o=null!==(i=e.getAttribute("action"))&&void 0!==i?i:"");return o};function rc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return"string"!=typeof e?"":(e=e.trim()).length<t?e:e.slice(0,500)}function ic(e){return null!=["og:image"].filter((function(t){return t===e}))[0]}function oc(e,t){return null!=[{property:"image",type:"Product"}].filter((function(n){return(e==="https://schema.org/"+n.type||e==="http://schema.org/"+n.type)&&n.property===t}))[0]}function ac(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{items:e,has:function(e){return this.items.some((function(t){return t===e}))},add:function(e){this.has(e)||this.items.push(e)}}}function cc(e){var t;switch(e.tagName.toLowerCase()){case"meta":t=e.getAttribute("content");break;case"audio":case"embed":case"iframe":case"img":case"source":case"track":case"video":t=e.getAttribute("src");break;case"a":case"area":case"link":t=e.getAttribute("href");break;case"object":t=e.getAttribute("data");break;case"data":case"meter":t=e.getAttribute("value");break;case"time":t=e.getAttribute("datetime");break;default:t=function(e){if(e){if(e.innerText&&e.innerText.length>0)return e.innerText;if(e.textContent&&e.textContent.length>0)return e.textContent}return""}(e)||""}return"string"==typeof t?rc(t):""}function sc(e,n){if("object"===t(e)){if(Array.isArray(e))return e.map((function(e){return sc(e,n)}));var r={};for(var i in e)uc(i,n)||(r[i]=sc(e[i],n));return r}return e}function uc(e,t){return!!(t&&t.length>0)&&t.some((function(t){return e.toLowerCase()===t.toLowerCase()}))}function lc(e){if("object"===t(e)){if(Array.isArray(e))return e.map((function(e){return lc(e)}));var n=Object.assign({},e),r=n["@type"];for(var i in n)"@type"!==i&&"@context"!==i&&("object"===t(n[i])?n[i]=lc(n[i]):r&&fc(r)&&delete n[i]);return n}return e}function fc(e){return Array.isArray(e)?e.some((function(e){return fc(e)})):"string"==typeof e&&(e=e.toLowerCase().replace(/https?:\/\/schema\.org\//,""),Ka.some((function(t){return e===t.toLowerCase()})))}function dc(e){var t={open_graph:"{}",microdata:"[]",json_ld:"[]",meta:"{}"};try{t.microdata=function(){for(var e=document.querySelectorAll("[itemscope]"),t=[],n=ac(),r=0;r<e.length;r++)n.add(e[r]);for(var i=e.length-1;i>=0;i--){var o=e[i],a=o.getAttribute("itemtype");if("string"==typeof a&&""!==a){for(var c={},s=o.querySelectorAll("[itemprop]"),u=0;u<s.length;u++){var l=s[u];if(!n.has(l)){n.add(l);var f=l.getAttribute("itemprop");if("string"==typeof f&&""!==f){var d=cc(l);if(null!=d){var h=c[f];null!=h&&oc(a,f)?Array.isArray(h)?c[f].push(d):c[f]=[h,d]:c[f]=d}}}}t.unshift({schema:{dimensions:{h:o.clientHeight,w:o.clientWidth},properties:fc(a)?{}:c,subscopes:[],type:a},scope:o})}}for(var p=[],v=[],g=0;g<t.length;g++){for(var y=t[g],_=y.scope,m=y.schema,b=p.length-1;b>=0;b--){if(p[b].scope.contains(_)){p[b].schema.subscopes.push(m);break}p.pop()}0===p.length&&v.push(m),p.push({schema:m,scope:_})}return JSON.stringify(v)}()}catch(e){Oi(Er.CUSTOM_ERROR,e,{custom_name:"assemble_auto_config_failed",custom_enum:"microdata"})}try{var n=function(){for(var e=[],t=[],n=document.querySelectorAll('script[type="application/ld+json"]'),r=0,i=0;i<n.length;i++){var o=n[i].innerText;if(null!=o&&""!==o){if((r+=o.length)>3e4)return{data:JSON.stringify([]),errors:[{name:ja.OVER_LENGTH,message:"".concat(String(r))}]};var a=void 0;try{a=JSON.parse(o.replace(/[\n\r\t]+/g," "))}catch(e){t.push({name:ja.ERROR_FORMAT,message:e.message})}try{a=lc(a)}catch(e){return{data:JSON.stringify([]),errors:[{name:ja.FILTER_SENSITIVE_FIELDS,message:e.message}]}}a&&e.push(a)}}return{data:JSON.stringify(e),errors:t}}(),r=n.data,i=n.errors;t.json_ld=r,i&&i.forEach((function(e){var t=e.name,n=e.message;Oi(Er.CUSTOM_ERROR,{message:n},{custom_name:"parse_json_ld_failed",custom_enum:t})}))}catch(e){Oi(Er.CUSTOM_ERROR,e,{custom_name:"assemble_auto_config_failed",custom_enum:"json_ld"})}try{t.open_graph=function(e){for(var t=ac(["og","product","music","video","article","book","profile","website","twitter"]),n={},r=document.querySelectorAll("meta[property],meta[name]"),i=0;i<r.length;i++){var o=r[i],a=o.getAttribute("property")||o.getAttribute("name"),c=rc(o.getAttribute("content"));if("string"==typeof a&&-1!==a.indexOf(":")&&"string"==typeof c&&t.has(a.split(":")[0])){var s=n[a];null!=s&&ic(a)?Array.isArray(s)?n[a].push(c):n[a]=[s,c]:n[a]=c}}return JSON.stringify(sc(n,e))}(e.open_graph)}catch(e){Oi(Er.CUSTOM_ERROR,e,{custom_name:"assemble_auto_config_failed",custom_enum:"open_graph"})}try{t.meta=function(e){var t={},n=ac(["description","keywords","keyword"]),r=document.querySelector("title");r&&(t.title=rc(r.innerText));for(var i=document.querySelectorAll("meta[property],meta[name]"),o=0;o<i.length;o++){var a=i[o],c=a.getAttribute("name")||a.getAttribute("property"),s=rc(a.getAttribute("content"));"string"==typeof c&&"string"==typeof s&&n.has(c)&&(t[c]=s)}return JSON.stringify(sc({title:t.title,"meta:description":t.description,"meta:keywords":t.keywords||t.keyword},e))}(e.meta)}catch(e){Oi(Er.CUSTOM_ERROR,e,{custom_name:"assemble_auto_config_failed",custom_enum:"meta"})}return t}var hc,pc=["form","[id*=form], [class*=form]"],vc=["label"],gc=["input,select,textarea"],yc=["radio","checkbox"],_c=["hidden","reset","submit","password"];function mc(e,t){try{for(var n=0;n<e.length;n++){var r=t.querySelectorAll(e[n]);if(r&&r.length>0)return Array.from(r)}return[]}catch(e){return Oi(Er.CUSTOM_ERROR,e,{custom_name:Wa,custom_enum:Ba.GET_ELEMENTS_ERROR}),[]}}function bc(e){var t="";return function e(n){for(;n;)n.nodeType===Node.TEXT_NODE?t+=n.textContent:"SELECT"!==n.nodeName&&n.firstChild&&e(n.firstChild),n=n.nextSibling}(e.firstChild),t.replace(/[\t\n]/g,"").trim()}function Ec(e){if(!e)return!1;var t=window.getComputedStyle(e);return"none"!==t.display&&("visible"===t.visibility&&(!Ic(e)&&(0!==e.offsetWidth||0!==e.offsetHeight)))}function Ic(e){return!(!e||e.isSameNode(document.body)||e.isSameNode(document))&&("0"==window.getComputedStyle(e).opacity||Ic(e.parentElement))}function Tc(e){var t=e.getAttribute("type");return!!t&&_c.indexOf(t)>-1}function Oc(e){return e&&qa(e)?"__Text__":e}!function(e){e[e.CONTAIN=0]="CONTAIN",e[e.ID=1]="ID",e[e.SELECTOR=2]="SELECTOR"}(hc||(hc={}));var Sc=function(){function e(t){i(this,e),this.formUpdateHandlers=[],this.answerMap={},this.rules=this.getRules(t),this.init()}return a(e,[{key:"getRules",value:function(e){var t=e.plugins&&e.plugins.AutoConfig;return t&&t[Va.AUTO_FORM]}},{key:"init",value:function(){var e=this;try{this.forms=this.detectFormElement(),this.forms&&this.forms.forEach((function(t){t.formDetail=e.assembleFormDetail(t),e.startFormObserver(t,e.formUpdateHandlers)}))}catch(e){Oi(Er.CUSTOM_ERROR,e,{custom_name:Wa,custom_enum:Ba.INIT_ERROR})}}},{key:"getOverallFormDetail",value:function(){try{return this.forms&&this.forms.length>0?(this.forms.some((function(e){var t=e.el;return!document.body.contains(t)}))&&this.init(),JSON.stringify(this.forms.map((function(e){return e.formDetail})).filter((function(e){return e})))):"[]"}catch(e){return Oi(Er.CUSTOM_ERROR,e,{custom_name:Wa,custom_enum:Ba.GET_OVERALL_FORM_DETAIL_ERROR}),"[]"}}},{key:"addFormUpdateHandler",value:function(e){this.formUpdateHandlers.push(e)}},{key:"startFormObserver",value:function(e,t){var n=this;try{var r=ti((function(){var r=n.assembleFormDetail(e);(!e.formDetail||r&&si(r,e.formDetail))&&(e.formDetail=r,t.forEach((function(t){return t.call(n,e.formDetail)})))}),Ya,this);if(e.el.parentNode){var i=e.el.parentNode;this.observer&&this.observer.disconnect(),this.observer=new MutationObserver(r),this.observer.observe(i,{attributes:!0,childList:!0,subtree:!0}),i.addEventListener("click",r,{capture:!0})}}catch(e){Oi(Er.CUSTOM_ERROR,e,{custom_name:Wa,custom_enum:Ba.FORM_OBSERVER_ERROR})}}},{key:"detectFormElement",value:function(){try{var e=[0,0,0],t=function(e){return(t=mc(e||pc,document)).filter((function(e){return!t.some((function(t){return t.contains(e)&&t!==e}))}));var t}(this.rules);if(!t)return[];var n=t.map((function(e){return{el:e,questions:[]}}));return n.forEach((function(t){var n,r=function(e){return mc(vc,e)}(t.el),i=new Set([]);r.forEach((function(n){var r=function(e,t){var n=mc(gc,e);if(n&&n.length)return{els:n,from:hc.CONTAIN};var r=e.getAttribute("for");return!(!r||(n=function(e,t){return mc(["input[id='".concat(e,"'],select[id='").concat(e,"'],textarea[id='").concat(e,"']")],t)}(r,t),!n))&&{els:n,from:hc.ID}}(n,t.el);if(r){var o=r.els,a=r.from,c=o.filter((function(e){return!Tc(e)})).map((function(e){return i.add(e),{el:e,from:a}}));c&&c.length&&(e[a]=1,t.questions.push({el:n,answers:c}))}})),(n=t.el,mc(gc,n)).filter((function(e){return!Tc(e)})).forEach((function(n){if(!i.has(n)){e[hc.SELECTOR]=1;var r=function(e,t){return function e(n){return null==n||n.isSameNode(t)?t:bc(n).length>0?n:e(n.parentNode)}(e.parentNode)}(n,t.el);t.questions.push({el:r,answers:[{el:n,from:hc.SELECTOR}]})}}))})),Ti(Er.CUSTOM_INFO,{custom_name:"form_detail_answer_from",custom_enum:e.join("")}),n}catch(e){return Oi(Er.CUSTOM_ERROR,e,{custom_name:Wa,custom_enum:Ba.DETECT_FORM_ELEMENT_ERROR}),[]}}},{key:"calculateQuestionFilledTime",value:function(e){var t=e.el,n=e.answers,r=Qa(t),i=n.reduce((function(e,t){var n=t.el,r=n.getAttribute("type");return r&&yc.indexOf(r.toLowerCase())>-1?"".concat(e,",").concat(n.checked):"".concat(e,",").concat(n.value)}),"");this.answerMap[r]||(this.answerMap[r]={defaultValue:i,value:i});var o=this.answerMap[r],a=o.defaultValue,c=o.filledTime;if(this.answerMap[r].value=i,a!==i)return c||(this.answerMap[r].filledTime=+new Date);delete this.answerMap[r].filledTime}},{key:"assembleFormDetail",value:function(e){var t=this,n=e.el,r=e.questions;try{var i={xpath:Qa(n),id:n.id,name:Oc(n.getAttribute("name")),tag:n.tagName.toLowerCase(),class_name:n.className,questions:[],width:n.offsetWidth,height:n.offsetHeight,is_visible:Ec(n)};return i.questions=r.map((function(e){var n=e.el,r=e.answers,i={xpath:Qa(n),id:n.id,name:Oc(bc(n)),tag:n.tagName.toLowerCase(),class_name:n.className,filled_time:t.calculateQuestionFilledTime(e),answers:[],width:n.offsetWidth,height:n.offsetHeight,is_visible:Ec(n)};return r.forEach((function(e){var t=e.el,n=e.from;t&&"SELECT"===t.tagName.toUpperCase()?i.answers=i.answers.concat(Array.from(t.querySelectorAll("option")).map((function(e){return{xpath:Qa(e),id:e.id,name:Oc(e.value||e.innerText),tag:e.tagName.toLowerCase(),class_name:e.className,from:n,width:e.offsetWidth,height:e.offsetHeight,is_visible:Ec(t)}}))):i.answers.push({xpath:Qa(t),id:t.id,name:Oc(t.getAttribute("name")),tag:t.tagName.toLowerCase(),class_name:t.className,input_type:t.getAttribute("type"),placeholder:Oc(t.getAttribute("placeholder")),from:n,width:t.offsetWidth,height:t.offsetHeight,is_visible:Ec(t)})})),i})),i}catch(e){return void Oi(Er.CUSTOM_ERROR,e,{custom_name:Wa,custom_enum:Ba.ASSEMBLE_FORM_DETAIL_ERROR})}}}]),e}(),Nc=["United States","US","Canada","CA","Australia","AU","Mexico","MX","Argentina","AR","Chile","CL","Colombia","CO","Fiji","FJ","Liberia","LR","Namibia","NA","New Zealand","NZ","Singapore","SG","Solomon Islands","SB","Suriname","SR","South Africa","ZA","Barbados","BB","Belize","BZ","Cuba","CU","Dominican Republic","DO","Guyana","GY","Jamaica","JM","Cayman Islands","KY","Trinidad and Tobago","TT","Tuvalu","TV","Zimbabwe","ZW","United Kingdom","GB","Egypt","EG","Falkland Islands","FK","Gibraltar","GI","Guernsey","GG","Isle of Man","IM","Jersey","JE","Lebanon","LB","Saint Helena","SH","Syria","SY","Sudan","SD","Japan","JP","China","CN","Japan","JP","CN","South Korea","KR","Philippines","PH","Cuba","CU","Sweden","SE","Norway","NO","Denmark","DK","Iceland","IS","Costa Rica","CR","El Salvador","SV","Bolivia","BO","Venezuela","VE","Bahamas","BS","Brunei","BN","Ethiopia","ET","Eritrea","ER","Iran","IR","Oman","OM","Qatar","QA","Saudi Arabia","SA","Yemen","YE","Bulgaria","BG","Kyrgyzstan","KG","Central African CFA franc zone","XAF","West African CFA franc zone","XOF"].map((function(e){return e.toUpperCase()})),Ac=["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTC","BTN","BWP","BYN","BYR","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNH","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EEK","EGP","ERN","ETB","ETH","EUR","FJD","FKP","GBP","GEL","GGP","GHC","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","IMP","INR","IQD","IRR","ISK","JEP","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTC","LTL","LVL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RMB","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRL","TRY","TTD","TVD","TWD","TZS","UAH","UGX","USD","UYI","UYU","UYW","UZS","VEF","VES","VND","VUV","WST","XAF","XBT","XCD","XOF","XPF","XSU","XUA","YER","ZAR","ZMW","ZWD","ZWL"],Rc=function(e){try{var t=e.plugins&&e.plugins.AutoConfig;return t&&t.vc_rules}catch(e){return}},wc=function(e,t){var n,r;try{var i=e.getPageInfo();if(i.url.includes("checkout")){var o=Object.values(t)[0];for(var a in t)i.url.includes(a)&&(o=t[a]);if(o){var c,s=N(o);try{for(s.s();!(c=s.n()).done;){var u=c.value,l=u.currency.val,f=Cc(u.valueXpath,u.valueClass),d=null==f?void 0:f.textContent;if(d){var h=Pc(d);if(h){var p=void 0,v=void 0,g=void 0;if(u.currency.xpath){var y=null===(n=document.evaluate(u.currency.xpath,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue)||void 0===n?void 0:n.textContent;y&&Ti(Er.CUSTOM_INFO,{custom_name:"auto_value_currency_currency_code_form_xpath",extJSON:{url:i.url,currencyCode:y,vcConfig:t}}),y&&Ac.includes(y.toUpperCase().trim())&&(v=y.toUpperCase().trim())}if(u.countryCodeXpath){var _=null===(r=document.evaluate(u.countryCodeXpath,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue)||void 0===r?void 0:r.textContent;_&&Ti(Er.CUSTOM_INFO,{custom_name:"auto_value_currency_country_form_xpath",extJSON:{url:i.url,country:_,vcConfig:t}}),_&&Nc.includes(_.toUpperCase().trim())&&(p=_.toUpperCase().trim())}try{var m=new URL(null==i?void 0:i.url).hostname.split(".");for(var b in m)Nc.includes(m[b].toUpperCase())&&(g=m[b].toUpperCase())}catch(e){}var E={vc_properties:{value:h,currency:v||l,ori_value:d,rule_key:u.rule_key,country_code:p||g}};return Ti(Er.CUSTOM_INFO,{custom_name:"auto_value_currency_update_info",extJSON:{url:i.url,autoProperties:E,vcConfig:t}}),kc(Dc,E),E}}}}catch(e){s.e(e)}finally{s.f()}}return null}return null}catch(e){return Oi(Er.CUSTOM_ERROR,e,{custom_name:"auto_value_currency_update_error",custom_enum:"auto_value_currency",extJSON:{error:e}}),null}};function Cc(e,t){for(var n,r=document.evaluate(e,document,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null),i=null;n=r.iterateNext();)/\d/.test(n.innerText)&&(i=n);if(!i&&t)for(var o=document.getElementsByClassName(t),a=0;a<o.length;a++){var c=o[a];c instanceof HTMLElement&&/\d/.test(c.innerText)&&(i=c)}return i}function Pc(e){var t,n,r,i,o=e.match(/(?:\d[\d\s,.]*\d|\d)/g);if(o){var a,c=o[0],s=N(o);try{for(s.s();!(a=s.n()).done;){if(a.value!==c)return null}}catch(e){s.e(e)}finally{s.f()}return n=(t=c).replace(/[\s,\.]/g,""),r=Math.max(t.lastIndexOf("."),t.lastIndexOf(",")),i=!1,-1!==r&&r>=t.length-3&&(i=!0),i&&(n=n.slice(0,r-(t.length-1))+"."+n.slice(r-(t.length-1))),n}return null}var kc=function(e,t){try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){}},Mc=function(e){try{var t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return null}},Dc="value_currency_rule",Lc=[Ja.CLICK,Ja.SCROLL],jc=function(){function e(t){var n=this;i(this,e),this.handlerArray=t,Lc.forEach((function(e){window.addEventListener(e.toLowerCase(),ti((function(){n.interactionHandler(e)}),Ya,n),{capture:!0,passive:!0})}))}return a(e,[{key:"iterateHandlerArray",value:function(e){this.handlerArray.forEach((function(t){return t(e)}))}},{key:"interactionHandler",value:function(e){var t=this;this.timeoutId&&clearTimeout(this.timeoutId),this.iterateHandlerArray(e),this.timeoutId=setTimeout((function(){t.iterateHandlerArray(e)}),Ya)}}]),e}(),xc=function(){function e(){i(this,e),this.history={}}return a(e,[{key:"hasReport",value:function(e,t,n){var r=this.genHistoryKey(e,t);return this.history[r]&&this.history[r].indexOf(n)>-1}},{key:"addHistory",value:function(e,t,n){var r=this.genHistoryKey(e,t);this.history[r]||(this.history[r]=[]),this.history[r].push(n)}},{key:"clearHistory",value:function(){this.history={}}},{key:"genHistoryKey",value:function(e,t){return"".concat(e,":").concat(t)}}]),e}(),Uc=function(){function e(t,n,r){i(this,e),this.context=t,this.reportHistory=new xc,this.reporters=n,this.reportService=r}return a(e,[{key:"report",value:function(e,t,n){var r=this,i=Ai(yr.AUTO_CONFIG),o=this.getReportPixelList(t,n),a=this.assemblyReportData(e,n,o);a&&i&&Fi(this.reportService.reportPreposition||[]).then((function(){r.reportService.report(i,a,Gn.defaultReport)}))}},{key:"clearHistory",value:function(){this.reportHistory.clearHistory()}},{key:"getReportPixelList",value:function(e,t){var n=this,r=JSON.stringify(Object.assign({},t,{page_trigger:void 0}));return this.reporters.filter((function(t){return!!Za(t)&&$a(t,e)})).filter((function(t){var i=t.getReporterId();return!([Ga.AUTO_COLLECTION,Ga.AUTO_FORM].indexOf(e)>-1&&n.reportHistory.hasReport(e,i,r))&&(n.reportHistory.addHistory(e,i,r),t)}))}},{key:"assemblyReportData",value:function(e,t,n){if(0!==n.length){var r=n.map((function(e){return e.getReporterId()})),i=this.context.getPageSign(),o=this.reporters[0].assemblyData(r[0],"",{},{},yr.AUTO_CONFIG);return delete o.event,o.action=e,o.auto_collected_properties=t,o.context.pixel||(o.context.pixel={}),o.context.pixel.code=r[0],o.context.pixel.codes=r.join("|"),o.context.index=i.index,o.context.session_id=i.sessionId,o.context.pageview_id=i.pageId,o.message_id=o.message_id.replace(/-[^-]*$/,""),o}}}]),e}(),Fc=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Bc=function(e,t){return function(n,r){t(n,r,e)}},Hc="AutoConfig",Gc=function(e){s(n,e);var t=v(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this,{name:Hc,reporters:r,context:e})).autoCollectedMetadata={},c.initialize=!1,c.autoFormUpdateHandler=ti((function(e){if(c.autoForm){if(c.autoCollectedFormDetail=c.autoForm.getOverallFormDetail(),c.autoCollectedFormDetail.length>3e4)return void Oi(Er.CUSTOM_ERROR,{message:"".concat(String(c.autoCollectedFormDetail.length))},{custom_name:Wa,custom_enum:Ba.OVER_LENGTH});c.actTracker.report(Ha.METADATA,Ga.AUTO_FORM,{page_trigger:e,form_details:c.autoCollectedFormDetail})}}),200,h(c)),c.autoCollectionUpdateHandler=ti((function(e){c.autoCollectedMetadata=dc(c.filter),c.actTracker.report(Ha.METADATA,Ga.AUTO_COLLECTION,{page_trigger:e,content_data:c.autoCollectedMetadata})}),200,h(c)),c.autoClickCallback=function(e){try{c.signal_insights_config&&wc(c.context,c.signal_insights_config);var t=function(e){var t=e,n=e.parentNode,r=0,i=!1;try{i=ai(t)}catch(e){Oi(Er.CUSTOM_ERROR,e,{custom_name:"button_check_error",custom_enum:"auto_click",extJSON:{element:t}}),i=!1}if(i)return t;for(;r<5&&n&&n!==document;){var o=!1;try{o=ai(n)}catch(e){Oi(Er.CUSTOM_ERROR,e,{custom_name:"button_check_error",custom_enum:"auto_click",extJSON:{element:t}}),o=!1}if(o)return n;n=n.parentNode,r++}return e}(e.target);if(t){var n=function(e){var t=e.tag,n=e.class,r=e.destination,i=e.id,o=e.name,a=e.type,c=e.value,s=e.rect,u=e.xpath,l=e.inner_text,f=e.image_url,d={tag:t,attributes:{},inner_text:l,xpath:u,num_child_buttons:e.num_child_buttons,timestamp:(new Date).toISOString(),position:s?{x:s.x,y:s.y}:{x:"",y:""}};return n&&(d.attributes.class=n),r&&(d.attributes.destination=r),i&&(d.attributes.id=i),o&&(d.attributes.name=o),a&&(d.attributes.type=a),c&&(d.attributes.value=c),f&&(d.image_url=f),d}(function(e){for(var t,n,r,i,o,a,c,s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],u=e.attributes,l={type:"",value:"",name:"",class:"",dataset:"",id:"",tag:"",destination:"",xpath:"",inner_text:"",image_url:"",num_child_buttons:0},f=0;f<u.length;f++){var d=u[f];l[d.name]=d.value}var h=e.dataset;l.dataset=JSON.stringify(h),l.id=null!==(t=e.id)&&void 0!==t?t:"",l.class=null!==(n=e.className)&&void 0!==n?n:"",l.tag=e.tagName,l.destination=nc(e),l.name=null!==(r=e.getAttribute("name"))&&void 0!==r?r:"",l.value=null!==(i=e.getAttribute("value"))&&void 0!==i?i:"",l.type=null!==(o=e.getAttribute("type"))&&void 0!==o?o:"";var p=e.getBoundingClientRect();l.rect=p;try{l.xpath=Xa(e)}catch(t){l.xpath="",Oi(Er.CUSTOM_ERROR,t,{custom_name:"button_check_error",custom_enum:"auto_click",extJSON:{element:e}})}return l.inner_text=null!==(a=e.innerText)&&void 0!==a?a:"",l.image_url=null!==(c=e.getAttribute("src"))&&void 0!==c?c:"",l.num_child_buttons=s?tc(e):0,l}(t));if(function(e){var t,n,r=(null===(t=e.inner_text)||void 0===t?void 0:t.toString().toLowerCase())||"",i=(null===(n=e.image_url)||void 0===n?void 0:n.toString().toLowerCase())||"",o=[];if(e.attributes){var a=e.attributes;o=[a.class,a.id,a.name,a.type,a.value,a.destination].map((function(e){return(null==e?void 0:e.toString().toLowerCase())||""}))}return[r,i].concat(b(o)).some(qa)}(n))return void Ti(Er.CUSTOM_INFO,{custom_name:"sensitive_button",extJSON:{attributes:{id:n.attributes.id,tag:n.tag,class:n.attributes.class}}});c.reportButtonClick(n)}}catch(e){Oi(Er.CUSTOM_ERROR,e,{custom_name:"auto_click_callback_error",custom_enum:"auto_click"})}},c.filter=o.auto_config||{open_graph:[],microdata:[],json_ld:[],meta:[]},c.actTracker=new Uc(e,r,a),c}return a(n,[{key:"initBaseFeature",value:function(e){!this.initialize&&Za(e)&&(this.initAutoClick(),this.initAutoCollection(),this.initInteractionListener(e),this.initialize=!0)}},{key:"initExtraFeature",value:function(e){!this.autoForm&&this.initialize&&$a(e,Ga.AUTO_FORM)&&this.initAutoForm(e),this.initAutoVC(e)}},{key:"initInteractionListener",value:function(e){var t=this,n=e.options;!this.initialize&&n&&!1!==n.autoConfigListener&&new jc([function(e){za(t.autoCollectionUpdateHandler,t)(e)},function(e){za(t.autoFormUpdateHandler,t)(e)}])}},{key:"initAutoClick",value:function(){ec(this.autoClickCallback)}},{key:"initAutoVC",value:function(e){var t=Rc(e);t&&(this.signal_insights_config=t)}},{key:"initAutoCollection",value:function(){}},{key:"initAutoForm",value:function(e){this.autoForm=new Sc(e),this.autoForm.addFormUpdateHandler(this.autoFormUpdateHandler.bind(this)),this.autoCollectedFormDetail=this.autoForm.getOverallFormDetail()}},{key:"pixelDidMount",value:function(e){this.initBaseFeature(e),this.initExtraFeature(e)}},{key:"pixelSend",value:function(e,t,n){var r=this.reporters.find((function(t){return t.getReporterId()===e}));this.signal_insights_config&&wc(this.context,this.signal_insights_config),r&&Rc(r)&&Mc(Dc)&&("CompletePayment"===t||"Pageview"===t||"InitiateCheckout"===t||"PlaceAnOrder"===t)&&(n.auto_collected_properties=Mc(Dc)),"CompletePayment"===t&&setTimeout((function(){!function(e){try{sessionStorage.removeItem(e)}catch(e){}}(Dc)}),500),"Pageview"===t&&(r&&!Za(r)||(za(this.autoCollectionUpdateHandler,this)(Ja.PAGE_VIEW),za(this.autoFormUpdateHandler,this)(Ja.PAGE_VIEW)))}},{key:"pageUrlDidChange",value:function(e,t){null!=t&&""!=t&&(this.autoCollectionUpdateHandler(Ja.URL_CHANGE),this.autoFormUpdateHandler(Ja.URL_CHANGE))}},{key:"pageWillLeave",value:function(){this.autoCollectionUpdateHandler(Ja.PAGE_LEAVE),this.autoFormUpdateHandler(Ja.PAGE_LEAVE)}},{key:"reportButtonClick",value:function(e){var t;this.actTracker.report(Ha.CLICK,Ga.AUTO_VC,{page_trigger:Ja.CLICK,trigger_element:e,vc_properties:null===(t=Mc(Dc))||void 0===t?void 0:t.vc_properties}),this.actTracker.report(Ha.CLICK,Ga.AUTO_VC_REVERSE,{page_trigger:Ja.CLICK,trigger_element:e})}}]),n}(no);Gc=Fc([C.injectable(),Bc(0,C.inject(br.CONTEXT)),Bc(1,C.inject(br.TTQ_REPORTERS)),Bc(2,C.inject(br.TTQ_GLOBAL_OPTIONS)),Bc(3,C.inject(br.REPORT_SERVICE))],Gc);var Vc={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Boolean]",a="[object Date]",c="[object Function]",s="[object GeneratorFunction]",u="[object Map]",l="[object Number]",f="[object Object]",d="[object Promise]",h="[object RegExp]",p="[object Set]",v="[object String]",g="[object Symbol]",y="[object WeakMap]",_="[object ArrayBuffer]",m="[object DataView]",b="[object Float32Array]",E="[object Float64Array]",I="[object Int8Array]",T="[object Int16Array]",O="[object Int32Array]",S="[object Uint8Array]",N="[object Uint8ClampedArray]",A="[object Uint16Array]",w="[object Uint32Array]",C=/\w*$/,P=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,M={};M[i]=M["[object Array]"]=M[_]=M[m]=M[o]=M[a]=M[b]=M[E]=M[I]=M[T]=M[O]=M[u]=M[l]=M[f]=M[h]=M[p]=M[v]=M[g]=M[S]=M[N]=M[A]=M[w]=!0,M["[object Error]"]=M[c]=M[y]=!1;var D="object"==typeof R&&R&&R.Object===Object&&R,L="object"==typeof self&&self&&self.Object===Object&&self,j=D||L||Function("return this")(),x=t&&!t.nodeType&&t,U=x&&e&&!e.nodeType&&e,F=U&&U.exports===x;function B(e,t){return e.set(t[0],t[1]),e}function H(e,t){return e.add(t),e}function G(e,t,n,r){var i=-1,o=e?e.length:0;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function V(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function J(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function W(e,t){return function(n){return e(t(n))}}function K(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Y=Array.prototype,q=Function.prototype,X=Object.prototype,Q=j["__core-js_shared__"],z=function(){var e=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Z=q.toString,$=X.hasOwnProperty,ee=X.toString,te=RegExp("^"+Z.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=F?j.Buffer:void 0,re=j.Symbol,ie=j.Uint8Array,oe=W(Object.getPrototypeOf,Object),ae=Object.create,ce=X.propertyIsEnumerable,se=Y.splice,ue=Object.getOwnPropertySymbols,le=ne?ne.isBuffer:void 0,fe=W(Object.keys,Object),de=xe(j,"DataView"),he=xe(j,"Map"),pe=xe(j,"Promise"),ve=xe(j,"Set"),ge=xe(j,"WeakMap"),ye=xe(Object,"create"),_e=Ge(de),me=Ge(he),be=Ge(pe),Ee=Ge(ve),Ie=Ge(ge),Te=re?re.prototype:void 0,Oe=Te?Te.valueOf:void 0;function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ae(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Re(e){this.__data__=new Ne(e)}function we(e,t){var n=Je(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&We(e)}(e)&&$.call(e,"callee")&&(!ce.call(e,"callee")||ee.call(e)==i)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,o=!!r;for(var a in e)!t&&!$.call(e,a)||o&&("length"==a||Be(a,r))||n.push(a);return n}function Ce(e,t,n){var r=e[t];$.call(e,t)&&Ve(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function Pe(e,t){for(var n=e.length;n--;)if(Ve(e[n][0],t))return n;return-1}function ke(e,t,n,r,d,y,R){var P;if(r&&(P=y?r(e,d,y,R):r(e)),void 0!==P)return P;if(!qe(e))return e;var k=Je(e);if(k){if(P=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&$.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(e,P)}else{var D=Fe(e),L=D==c||D==s;if(Ke(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(D==f||D==i||L&&!y){if(V(e))return y?e:{};if(P=function(e){return"function"!=typeof e.constructor||He(e)?{}:(t=oe(e),qe(t)?ae(t):{});var t}(L?{}:e),!t)return function(e,t){return Le(e,Ue(e),t)}(e,function(e,t){return e&&Le(t,Xe(t),e)}(P,e))}else{if(!M[D])return y?e:{};P=function(e,t,n,r){var i=e.constructor;switch(t){case _:return De(e);case o:case a:return new i(+e);case m:return function(e,t){var n=t?De(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case b:case E:case I:case T:case O:case S:case N:case A:case w:return function(e,t){var n=t?De(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case u:return function(e,t,n){return G(t?n(J(e),!0):J(e),B,new e.constructor)}(e,r,n);case l:case v:return new i(e);case h:return function(e){var t=new e.constructor(e.source,C.exec(e));return t.lastIndex=e.lastIndex,t}(e);case p:return function(e,t,n){return G(t?n(K(e),!0):K(e),H,new e.constructor)}(e,r,n);case g:return c=e,Oe?Object(Oe.call(c)):{}}var c}(e,D,ke,t)}}R||(R=new Re);var j=R.get(e);if(j)return j;if(R.set(e,P),!k)var x=n?function(e){return function(e,t,n){var r=t(e);return Je(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Xe,Ue)}(e):Xe(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(x||e,(function(i,o){x&&(i=e[o=i]),Ce(P,o,ke(i,t,n,r,o,e,R))})),P}function Me(e){return!(!qe(e)||(t=e,z&&z in t))&&(Ye(e)||V(e)?te:P).test(Ge(e));var t}function De(e){var t=new e.constructor(e.byteLength);return new ie(t).set(new ie(e)),t}function Le(e,t,n,r){n||(n={});for(var i=-1,o=t.length;++i<o;){var a=t[i],c=r?r(n[a],e[a],a,n,e):void 0;Ce(n,a,void 0===c?e[a]:c)}return n}function je(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function xe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Me(n)?n:void 0}Se.prototype.clear=function(){this.__data__=ye?ye(null):{}},Se.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Se.prototype.get=function(e){var t=this.__data__;if(ye){var r=t[e];return r===n?void 0:r}return $.call(t,e)?t[e]:void 0},Se.prototype.has=function(e){var t=this.__data__;return ye?void 0!==t[e]:$.call(t,e)},Se.prototype.set=function(e,t){return this.__data__[e]=ye&&void 0===t?n:t,this},Ne.prototype.clear=function(){this.__data__=[]},Ne.prototype.delete=function(e){var t=this.__data__,n=Pe(t,e);return!(n<0)&&(n==t.length-1?t.pop():se.call(t,n,1),!0)},Ne.prototype.get=function(e){var t=this.__data__,n=Pe(t,e);return n<0?void 0:t[n][1]},Ne.prototype.has=function(e){return Pe(this.__data__,e)>-1},Ne.prototype.set=function(e,t){var n=this.__data__,r=Pe(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Ae.prototype.clear=function(){this.__data__={hash:new Se,map:new(he||Ne),string:new Se}},Ae.prototype.delete=function(e){return je(this,e).delete(e)},Ae.prototype.get=function(e){return je(this,e).get(e)},Ae.prototype.has=function(e){return je(this,e).has(e)},Ae.prototype.set=function(e,t){return je(this,e).set(e,t),this},Re.prototype.clear=function(){this.__data__=new Ne},Re.prototype.delete=function(e){return this.__data__.delete(e)},Re.prototype.get=function(e){return this.__data__.get(e)},Re.prototype.has=function(e){return this.__data__.has(e)},Re.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ne){var r=n.__data__;if(!he||r.length<199)return r.push([e,t]),this;n=this.__data__=new Ae(r)}return n.set(e,t),this};var Ue=ue?W(ue,Object):function(){return[]},Fe=function(e){return ee.call(e)};function Be(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||k.test(e))&&e>-1&&e%1==0&&e<t}function He(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||X)}function Ge(e){if(null!=e){try{return Z.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ve(e,t){return e===t||e!=e&&t!=t}(de&&Fe(new de(new ArrayBuffer(1)))!=m||he&&Fe(new he)!=u||pe&&Fe(pe.resolve())!=d||ve&&Fe(new ve)!=p||ge&&Fe(new ge)!=y)&&(Fe=function(e){var t=ee.call(e),n=t==f?e.constructor:void 0,r=n?Ge(n):void 0;if(r)switch(r){case _e:return m;case me:return u;case be:return d;case Ee:return p;case Ie:return y}return t});var Je=Array.isArray;function We(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Ye(e)}var Ke=le||function(){return!1};function Ye(e){var t=qe(e)?ee.call(e):"";return t==c||t==s}function qe(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Xe(e){return We(e)?we(e):function(e){if(!He(e))return fe(e);var t=[];for(var n in Object(e))$.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return ke(e,!0,!0)}}(Vc,Vc.exports);var Jc=Vc.exports,Wc={EMPTY_EVENT_TYPE_NAME:{title:"Missing Event Name",desc:"The event name for one or more of your events is empty. This can affect the accuracy of reporting for your conversions.",suggestion:"Go to your source code and add a name that follows our format requirements and TikTok policies.",link:"https://ads.tiktok.com/marketing_api/docs?rid=5ipocbxyw8v&id=1701890973258754"},INVALID_CONTENT_ID:{title:"Missing value for content ID",desc:"Include a value for your 'content_id' parameter. This is required for Video Shopping Ads (VSA).",suggestion:"If you are or plan to run Video Shopping Ads (VSA), go to your source code and include a value for the 'content_id' parameter.",link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},INVALID_CONTENT_TYPE:{title:"Invalid content type",desc:'The content type for one or more of your events is invalid. Content type must be either "product" or "product_group".',suggestion:"Go to your source code and update the content type.",link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},INVALID_CURRENCY_CODE:{title:"Invalid currency code",desc:"The currency code for one or more of your events isn't supported. This can affect the accuracy of reporting for your ROAS.",suggestion:"Go to your source code and update the 'currency' parameters with a supported currency code.",link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},INVALID_EMAIL_FORMAT:{title:"Incorrect email format",desc:"The email format for your events does not match the format supported. This can impact Advanced Matching and your ad performance.",suggestion:"Go to your source code and update the format of your shared emails. It should follow 'xxx@xxx.com' format.",link:"https://ads.tiktok.com/marketing_api/docs?id=1739585700402178"},INVALID_EMAIL_INFORMATION:{title:"Invalid email information",desc:"The emails shared with your events were invalid.",suggestion:'Go to your source code to double check shared emails. Leave your string empty when customer information isn\'t available. Avoid spaces, "undefined", or other hardcoded values.',link:"https://ads.tiktok.com/marketing_api/docs?id=1739585700402178"},INVALID_EVENT_PARAMETER_VALUE:{title:"Invalid value parameter",desc:"The 'value' parameter for one or more of your events is invalid. This is used calculate ROAS for people and the bid for your highest value customers. Parameters must be an integer or in the decimal format (e.g. 9.99). Also, they can't contain currency symbols, special characters, letters, or commas.",suggestion:"Go to your source code and update the 'value' parameter. It can only include numbers greater than or equal to zero (e.g. 9.99). Do not include currency symbols, special characters, letters, or commas.",link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},INVALID_PHONE_NUMBER_FORMAT:{title:"Incorrect phone number format",desc:"The phone number format for your events doesn't follow the E.164 format. This can affect Advanced Matching and your ad performance.",suggestion:"Go to your source code and update your shared phone numbers. It should follow the E.164 format.",link:"https://ads.tiktok.com/marketing_api/docs?id=1739585700402178"},INVALID_PHONE_NUMBER_INFORMATION:{title:"Invalid phone number information",desc:"The phone numbers shared with your events were invalid.",suggestion:'Go to your source code to double check shared phone numbers. Leave your string empty when customer information isn\'t available. Avoid spaces, "undefined", or other hardcoded values.',link:"https://ads.tiktok.com/marketing_api/docs?id=1739585700402178"},LONG_EVENT_TYPE_NAME:{title:"Event Name Too Long",desc:"1 event type exceeds the 50 character limit.",suggestion:"Go to your source code and make these event names 50 characters or less.",link:"https://ads.tiktok.com/help/article/custom-events?lang=en"},MISMATCHED_EVENT_TYPE_NAME_FOR_CUSTOM_EVENT:{title:"Invalid Event Name Format",desc:"1 event name was rejected for not following TikTok format requirements.",suggestion:"Go to your source code and update these event types according to TikTok format requirements.",link:"https://ads.tiktok.com/help/article/custom-events?lang=en"},MISSING_CONTENT_ID:{title:"Missing 'content_id' paramter",desc:"The 'content_id' parameter isn't being received. This is required for Video Shopping Ads (VSA).",suggestion:"Include the 'content_id' parameter in your source code. This is required for Video Shopping Ads (VSA).",link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},MISSING_CURRENCY_PARAMETER:{title:'Missing "currency" parameter',desc:"Events shared are missing a 'currency' parameter. This impacts our ability to receive the value amount correctly, which can affect the accuracy of reporting for your return on ad spend.",suggestion:'Go to your source code and include the "currency" parameter. You can check supported currency codes. {{learn_more}}',link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},MISSING_EMAIL_AND_PHONE:{title:"Missing email and phone number",desc:"Email and phone number info isn't being received. This information is required for Complete Payment events.",suggestion:"Improve your email and phone coverage. This allows you to attribute more conversions and reach more people with your ads.",link:"https://ads.tiktok.com/marketing_api/docs?rid=5ipocbxyw8v&id=1701890972946433"},MISSING_VALUE_PARAMETER:{title:'Missing "value" parameter',desc:"Events shared are missing a 'value' parameter'. This is used calculate ROAS for people and the bid for your highest value customers. ",suggestion:'Go to your source code and include the "value" parameter.',link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},DUPLICATE_PIXEL_CODE:{title:"Duplicate Pixel ID",desc:"The pixel ID is duplicate. This could impact the pixel data accuracy.",suggestion:"Please double check and delete any unnecessary pixel code.",link:""},MISSING_PIXEL_CODE:{title:"Missing pixel ID",desc:"Some of the events sent to your TikTok account are missing a pixel ID.",suggestion:"Go to your source code and double check that the 20-character pixel ID has been added to the ttq.load() function. Don't send null values or spaces. If you edited the base code, ensure the event.js has the 'sdkid' in the Chrome network panel.",link:""},INVALID_PIXEL_CODE:{title:"Invalid pixel ID",desc:"The pixel ID is invalid. This could prevent your pixel from receiving data.",suggestion:"Please go to Events Manager and find the correct pixel ID.",link:""}},Kc=/^[a-zA-Z]([a-zA-Z_\-\d]{0,}[a-zA-Z\d])?$/,Yc=["product","product_group"],qc=["email_is_hashed","phone_is_hashed","sha256_email","sha256_phone"],Xc=["AED","ARS","AUD","BDT","BHD","BIF","BOB","BRL","CAD","CHF","CLP","CNY","COP","CRC","CZK","DKK","DZD","EGP","EUR","GBP","GTQ","HKD","HNL","HUF","IDR","ILS","INR","ISK","JPY","KES","KHR","KRW","KWD","KZT","MAD","MOP","MXN","MYR","NGN","NIO","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RUB","SAR","SEK","SGD","THB","TRY","TWD","UAH","USD","VES","VND","ZAR"],Qc=["CompletePayment","InitiateCheckout","AddToCart","PlaceAnOrder","ViewContent","AddToWishlist"],zc=function(e){return void 0===e},Zc="CompletePayment",$c=function(e){var t=e.event,n=void 0===t?"":t;return!!["null","undefined"].includes(n)||(!!/^\s*$/.test(n)||!n)},es=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},ts=function(e,t){return function(n,r){t(n,r,e)}},ns=function(e){s(n,e);var t=v(n);function n(e,r,o){var a,c;return i(this,n),(a=t.call(this,{name:"DiagnosticsConsole",reporters:r,context:e})).isEnableDiagnosticsConsole=!1,a.isEnableDiagnosticsConsole=Boolean(null===(c=null==o?void 0:o.plugins)||void 0===c?void 0:c.DiagnosticsConsole),a}return a(n,[{key:"isDisableDiagnosticsConsole",value:function(){try{return!this.isEnableDiagnosticsConsole||Boolean(Object.values(this.reporters).some((function(e){var t,n;return void 0!==(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.diagnostics)&&!(null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.diagnostics)})))}catch(e){return!1}}},{key:"warn",value:function(e,t){try{if(this.isDisableDiagnosticsConsole())return;!function(e,t){if(Ir[e]){var n=Vr(),r=Wc[e],i="".concat("[TikTok Pixel]"," - ").concat(r.title);r.desc&&(i+="\nIssue: ".concat(r.desc)),r.suggestion&&(i+="\nSuggestion: ".concat(r.suggestion)),t&&Object.keys(t).forEach((function(e){i=i.split("{{".concat(e,"}}")).join(t[e])})),i=i.trim(),r.link&&(i+=" See ".concat(r.link," for more information.")),n&&n.console&&n.console.warn&&n.console.warn(i)}}(e,t)}catch(t){Oi(Er.CUSTOM_ERROR,t,{custom_name:"diagnostics_console",custom_enum:e})}}},{key:"pixelDidMount",value:function(e){var t=this;e.getParameterInfo().then((function(e){t.handlePixelInfoValidate(e)})).catch((function(e){Oi(Er.CUSTOM_ERROR,e,{custom_name:"diagnostics_console",custom_enum:"pixel"})}))}},{key:"pixelSend",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4?arguments[4]:void 0;try{r&&r._i||i!==yr.TRACK||t===_r||this.handleEventPayloadValidate(Jc(n||{}))}catch(e){Oi(Er.CUSTOM_ERROR,e,{custom_name:"diagnostics_console",custom_enum:"track"})}}},{key:"handlePixelInfoValidate",value:function(e){if(e.status===oo.Live);else this.warn(Ir.INVALID_PIXEL_CODE)}},{key:"handleEventPayloadValidate",value:function(e){e.properties||(e.properties={}),$c(e)&&this.warn(Ir.EMPTY_EVENT_TYPE_NAME),function(e){var t=e.event,n=void 0===t?"":t;return!!$c(e)||Kc.test(n)}(e)||this.warn(Ir.MISMATCHED_EVENT_TYPE_NAME_FOR_CUSTOM_EVENT),function(e){var t=e.event;return(void 0===t?"":t).length<=50}(e)||this.warn(Ir.LONG_EVENT_TYPE_NAME),function(e){var t=e.event,n=e._inspection;if(t===Zc){var r=(void 0===n?{}:n).identity_params,i=void 0===r?{}:r;return 0===Object.keys(i).length||qc.every((function(e){return(i[e]||[]).includes(Wn.EMPTY_VALUE)}))}return!1}(e)&&this.warn(Ir.MISSING_EMAIL_AND_PHONE),function(e){var t=e._inspection,n=void 0===t?{}:t;return!(!n||!n.identity_params)&&((n.identity_params.email_is_hashed||[]).includes(Wn.FILTER_EVENTS)||(n.identity_params.sha256_email||[]).includes(Wn.FILTER_EVENTS))}(e)&&this.warn(Ir.INVALID_EMAIL_INFORMATION),function(e){var t=e._inspection,n=void 0===t?{}:t;return!(!n||!n.identity_params)&&((n.identity_params.email_is_hashed||[]).includes(Wn.UNKNOWN_INVALID)||(n.identity_params.sha256_email||[]).includes(Wn.UNKNOWN_INVALID))}(e)&&this.warn(Ir.INVALID_EMAIL_FORMAT),function(e){var t=e._inspection,n=void 0===t?{}:t;return!(!n||!n.identity_params)&&((n.identity_params.phone_is_hashed||[]).includes(Wn.FILTER_EVENTS)||(n.identity_params.sha256_phone||[]).includes(Wn.FILTER_EVENTS))}(e)&&this.warn(Ir.INVALID_PHONE_NUMBER_INFORMATION),function(e){var t=e._inspection,n=void 0===t?{}:t;return!(!n||!n.identity_params)&&((n.identity_params.phone_is_hashed||[]).includes(Wn.UNKNOWN_INVALID)||(n.identity_params.sha256_phone||[]).includes(Wn.UNKNOWN_INVALID))}(e)&&this.warn(Ir.INVALID_PHONE_NUMBER_FORMAT),function(e){var t=e.event,n=void 0===t?"":t,r=e.properties,i=void 0===r?{}:r;if(Qc.includes(n)){if(zc(i.contents)&&zc(i.content_id))return!0;if(!zc(i.contents))return!Array.isArray(i.contents)||i.contents.length<1||!i.contents.every((function(e){return e&&!zc(e.content_id)}))}return!1}(e)&&this.warn(Ir.MISSING_CONTENT_ID),function(e){var t=e.properties,n=void 0===t?{}:t,r=n.content_id,i=n.contents;return!(!zc(r)&&/^\s*$/.test(r))&&(!(!zc(i)&&Array.isArray(i))||i.every((function(e){return e&&!zc(e.content_id)&&!/^\s*$/.test(e.content_id)})))}(e)||this.warn(Ir.INVALID_CONTENT_ID),function(e){var t=e.properties.content_type;return!t||Yc.includes(t)}(e)||this.warn(Ir.INVALID_CONTENT_TYPE),function(e){var t=e.properties.value;return!t||"number"==typeof t||!("string"!=typeof t||!/^\d+(\.\d+)?$/.test(t)&&!/^\d+$/.test(t))}(e)||this.warn(Ir.INVALID_EVENT_PARAMETER_VALUE),function(e){var t=e.event,n=void 0===t?"":t,r=e.properties,i=void 0===r?{}:r;return!(n!==Zc||!zc(i.value))||!(zc(i.currency)||!zc(i.value))}(e)&&this.warn(Ir.MISSING_VALUE_PARAMETER),function(e){var t=e.properties.currency;return!t||Xc.includes(t)}(e)||this.warn(Ir.INVALID_CURRENCY_CODE),function(e){var t=e.event,n=void 0===t?"":t,r=e.properties,i=void 0===r?{}:r;return!(n!==Zc||!zc(i.currency))||!(zc(i.value)||!zc(i.currency))}(e)&&this.warn(Ir.MISSING_CURRENCY_PARAMETER,{learn_more:""})}}]),n}(no);ns=es([C.injectable(),ts(0,C.inject(br.CONTEXT)),ts(1,C.inject(br.TTQ_REPORTERS)),ts(2,C.inject(br.TTQ_GLOBAL_OPTIONS))],ns);var rs=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},is=function(e,t){return function(n,r){t(n,r,e)}},os=function(e){s(n,e);var t=v(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this,{name:"PangleCookieMatching",reporters:r,context:e})).hasReport=!1,c.reportService=o,c.env=a,c}return a(n,[{key:"isPixelPangleCookieMatching",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.reporters;if(e){var n=t.find((function(t){return t.getReporterId()===e}));if(n&&n.plugins.PangleCookieMatching)return!0}else if(t.some((function(e){return Boolean(e.plugins.PangleCookieMatching)})))return!0;return!1}},{key:"disablePangleCookie",value:function(){this.isPixelPangleCookieMatching()&&Ui("https://analytics.pangle-ads.com/api/v2/pangle_disable_cookie")}},{key:"pixelSend",value:function(e,t,n){try{if(0===this.context.getPageSign().index&&!di(this.env)&&n&&n.message_id&&this.isPixelPangleCookieMatching(e)&&!this.hasReport){var r={event:n.event,message_id:n.message_id,context:{library:n.context.library},timestamp:(new Date).toJSON()};this.hasReport=!0,this.reportService.report("https://analytics.pangle-ads.com/api/v2/pangle_pixel",r,Gn.httpReport)}}catch(e){Oi(Er.CUSTOM_ERROR,e,{custom_name:"pangle_report"})}}}]),n}(no);os=rs([C.injectable(),is(0,C.inject(br.CONTEXT)),is(1,C.inject(br.TTQ_REPORTERS)),is(2,C.inject(br.REPORT_SERVICE)),is(3,C.inject(br.ENV))],os);var as=[{identifier:br.CALLBACK_PLUGIN,to:oa,name:"Callback"},{identifier:br.IDENTIFY_PLUGIN,to:pa,name:"Identify",required:!0},{identifier:br.WEB_FL_PLUGIN,to:Fa,name:"WebFL"},{identifier:br.PERFORMANCE_INTERACTION_PLUGIN,to:ma,required:!0,name:"PerformanceInteraction"},{identifier:br.INTERACTION_MONITOR,to:Ta,name:"WebInteractionMonitor",required:!0},{identifier:br.PERFORMANCE_MONITOR,to:La,name:"WebPerformanceMonitor",required:!0},{identifier:br.AUTO_CONFIG_PLUGIN,to:Gc,name:"AutoConfig"},{identifier:br.DIAGNOSTICS_CONSOLE_PLUGIN,to:ns,name:"DiagnosticsConsole"},{identifier:br.PANGLE_COOKIE_MATCHING_PLUGIN,to:os,name:"PangleCookieMatching"}],cs=function(e,t){return cs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},cs(e,t)};function ss(e,t){function n(){this.constructor=e}cs(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var us,ls=function(){return ls=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ls.apply(this,arguments)};!function(e){e[e.Failure=0]="Failure",e[e.Success=1]="Success",e[e.Unauthorized=-1]="Unauthorized",e[e.NotExist=-2]="NotExist"}(us||(us={}));var fs=function(){function e(e){this.version=e.version||"2.0.2",this.nativeMethodInvoker=e.nativeMethodInvoker,this.nativeEventListener=e.nativeEventListener,this.scheme=e.scheme||"nativeapp://",this.dispatchMessagePath=e.dispatchMessagePath||"dispatch_message/",this.setResultPath=e.setResultPath||"private/setresult/SCENE_FETCHQUEUE",this.dispatchMessageIFrameId=e.dispatchMessageIFrameId||"__JSBridgeIframe__",this.setResultIFrameId=e.setResultIFrameId||"__JSBridgeIframe_SetResult__",this.listenNativeEvent=!0===e.listenNativeEvent,this.callbackId=1023,this.callbackMap={},this.eventMap={},this.javascriptMessageQueue=[],this.callbackProcessor=e.callbackProcessor}return e.prototype.call=function(e,t,n,r){void 0===r&&(r=this.version);var i,o=this.version;if(e&&"string"==typeof e){"object"!=typeof t&&(t={}),"string"==typeof r?o=r||this.version:"object"==typeof r&&(i=r.namespace,o=r.sdkVersion||this.version);var a={func:e,params:t,JSSDK:o,__msg_type:"call",namespace:i};if("function"==typeof n||void 0===n){var c=this.registerCallback(e,n);a.__callback_id=c}"undefined"==typeof __PIA_WORKER__&&window.parent!==window&&(a.__iframe_url=window.location.href),this.sendMessageToNative(a)}},e.prototype.on=function(e,t,n){if(void 0===n&&(n=!1),e&&"string"==typeof e&&"function"==typeof t){var r=this.registerCallback(e,t);return this.eventMap[e]=this.eventMap[e]||{},this.eventMap[e][r]={once:n},this.listenNativeEvent&&(this.nativeEventListener?this.nativeEventListener(e):this.call("addEventListener",{name:e},null,{sdkVersion:1})),r}},e.prototype.once=function(e,t){return this.on(e,t,!0)},e.prototype.off=function(e,t){if(!e||"string"!=typeof e)return!0;var n=this.eventMap[e];return!n||"object"!=typeof n||!n.hasOwnProperty(t)||(this.deregisterCallback(t),delete n[t],!0)},e.prototype.trigger=function(e,t){return this.handleMessageFromNative({__msg_type:"event",__params:t,__event_id:e})},e.prototype.handleMessageFromNative=function(e){var t=this,n=e,r=String(n.__callback_id);if(this.callbackProcessor&&"function"==typeof this.callbackProcessor){var i=(this.callbackMap&&this.callbackMap[r]||{}).method;this.callbackProcessor(n,i)}var o=n.__params,a=String(n.__event_id||""),c=n.__msg_type;this.callbackMap[r]?c="callback":this.eventMap[r]&&(c="event",a=a||r);var s={__err_code:"cb404"};switch(c){case"callback":var u=(this.callbackMap&&this.callbackMap[r]||{}).callback;"function"==typeof u&&(s=u(o)),this.deregisterCallback(r);break;case"event":var l=this.eventMap[a];l&&"object"==typeof l&&Object.keys(l).forEach((function(e){var n=(t.callbackMap&&t.callbackMap[e]||{}).callback,r=l[e];"function"==typeof n&&(s=n(o)),r&&r.once&&(t.deregisterCallback(e),delete l[e])}))}return s},e.prototype.fetchJavaScriptMessageQueue=function(){var e=JSON.stringify(this.javascriptMessageQueue),t=btoa(unescape(encodeURIComponent(e)));return this.setResultIFrame&&this.javascriptMessageQueue.length>0&&(this.setResultIFrame.src=""+this.scheme+this.setResultPath+"&"+t),this.javascriptMessageQueue.splice(0,this.javascriptMessageQueue.length),e},e.prototype.sendMessageToNative=function(e){if("1"!==String(e.JSSDK)&&this.nativeMethodInvoker){var t=this.nativeMethodInvoker(e);if(t){var n=JSON.parse(t);this.handleMessageFromNative(n)}}else this.javascriptMessageQueue.push(e),this.dispatchMessageIFrame||this.tryCreateIFrames(),this.dispatchMessageIFrame.src=""+this.scheme+this.dispatchMessagePath},e.prototype.registerCallback=function(e,t){var n=String(this.callbackId++);return this.callbackMap[n]={method:e,callback:t},n},e.prototype.deregisterCallback=function(e){delete this.callbackMap[e]},e.prototype.tryCreateIFrames=function(){this.dispatchMessageIFrame=this.createIFrame(this.dispatchMessageIFrameId),this.setResultIFrame=this.createIFrame(this.setResultIFrameId)},e.prototype.createIFrame=function(e){var t=document.getElementById(e);return t&&"IFRAME"===t.tagName||((t=document.createElement("iframe")).style.display="none",t.id=e,document.documentElement.appendChild(t)),t},e}(),ds="2.2.15",hs="undefined"!=typeof __PIA_WORKER__?new Function("return this")():"undefined"!=typeof window?window:{},ps=void 0!==hs&&hs.navigator?hs.navigator.userAgent:"",vs=(!!ps.match(/(newsarticle|videoarticle|lv|faceu|ulike|beauty_me_|faceu-os|ulike-os|beauty_me_oversea_|retouch)\/([\d.]+)/i)||/super|automobile/gi.test(ps))&&!/webcast/gi.test(ps)&&!/luckycatversion/gi.test(ps),gs=!!ps.match(/(faceu)\/([\d.]+)/i)||/gsdk/gi.test(ps)||/PIANativeWorker/gi.test(ps),ys=!!ps.match(/ttad\/0/i),_s=!!ps.match(/aweme|trill|musical_ly|phoenix_\d+|TikTokNow_\d+/i),ms=!!ps.match(/live_stream/i),bs=!!ps.match(/Webcast/i),Es=!!ps.match(/super/i),Is=!!ps.match(/life_service_merchant/i),Ts=/super/gi.test(ps);function Os(){var e;if(vs)return hs.JSBridge&&hs.JSBridge.on?e=hs.JSBridge.on:hs.JS2NativeBridge&&hs.JS2NativeBridge.on?e=function(e){var t={JSSDK:ds,__msg_type:"event",__callback_id:e,func:e};hs.JS2NativeBridge.on(e,JSON.stringify(t))}:hs.webkit&&hs.webkit.messageHandlers&&hs.webkit.messageHandlers.onMethodParams?e=function(e){var t={JSSDK:ds,__msg_type:"event",__callback_id:e,func:e};hs.webkit.messageHandlers.onMethodParams.postMessage(t)}:hs.onMethodParams&&(e=function(e){var t={JSSDK:ds,__msg_type:"event",__callback_id:e,func:e};return hs.onMethodParams(e,t)}),e}function Ss(e,t){if(("string"!=typeof t||!0!==/^(x|tc)\./.test(t))&&(_s||ms||bs||Is)){var n=e.__params;hs.JS2NativeBridge&&hs.JS2NativeBridge._invokeMethod&&(e.__params=ls({code:n.code},n.data))}}var Ns=function(e){function t(){var t=e.call(this,{version:ds,scheme:"bytedance://",listenNativeEvent:!0,dispatchMessageIFrameId:"__JSBridgeIframe_1.0__",setResultIFrameId:"__JSBridgeIframe_SetResult_1.0__",nativeEventListener:Os(),callbackProcessor:Ss})||this;return t.publicApi={call:t.call.bind(t),on:t.on.bind(t),once:t.once.bind(t),off:t.off.bind(t),trigger:t.trigger.bind(t),_fetchQueue:t.fetchJavaScriptMessageQueue.bind(t),_handleMessageFromToutiao:t.handleMessageFromNative.bind(t)},t}return ss(t,e),t.prototype.exposePublicApiToGlobal=function(){hs.ToutiaoJSBridge=Object.assign(hs.ToutiaoJSBridge||{},this.publicApi)},t}(fs),As=function(e){function t(t){var n,r=e.call(this,{version:ds,nativeMethodInvoker:(hs.JS2NativeBridge&&hs.JS2NativeBridge._invokeMethod?n=function(e){return hs.JS2NativeBridge._invokeMethod(JSON.stringify(e))}:hs.ToutiaoJSBridge&&hs.ToutiaoJSBridge.invokeMethod?n=function(e){return hs.ToutiaoJSBridge.invokeMethod(JSON.stringify(e))}:hs.JS2NativeBridge&&hs.JS2NativeBridge.call?n=function(e){return hs.JS2NativeBridge.call(e.func,JSON.stringify(e))}:hs.webkit&&hs.webkit.messageHandlers&&hs.webkit.messageHandlers.callMethodParams?n=function(e){hs.webkit.messageHandlers.callMethodParams.postMessage(e)}:hs.callMethodParams&&(n=function(e){return hs.callMethodParams(e.func,e)}),n),nativeEventListener:Os(),scheme:Es?"bds://":Ts?"bytedance://":vs||hs.JSBridge&&hs.JSBridge._invokeMethod?"nativeapp://":"bytedance://",listenNativeEvent:vs,callbackProcessor:Ss})||this;return r.toutiaoLegacyJSB=t,r.publicApi={call:r.call.bind(r),on:r.on.bind(r),once:r.once.bind(r),off:r.off.bind(r),trigger:r.trigger.bind(r),_fetchQueue:r.fetchJavaScriptMessageQueue.bind(r),_handleMessageFromApp:r.handleMessageFromNative.bind(r),_handleMessageFromToutiao:r.handleMessageFromNative.bind(r)},r}return ss(t,e),t.prototype.call=function(t,n,r,i){void 0===i&&(i=ds),this.isLegacyCall(t)?this.toutiaoLegacyJSB.call(t,n,r,i):e.prototype.call.call(this,t,n,r,i)},t.prototype.on=function(t,n,r,i){return void 0===r&&(r=!1),(i||{}).useLegacy||this.isLegacyCall(t)?this.toutiaoLegacyJSB.on(t,n,r):e.prototype.on.call(this,t,n,r)},t.prototype.once=function(t,n){return this.isLegacyCall(t)?this.toutiaoLegacyJSB.once(t,n):e.prototype.once.call(this,t,n)},t.prototype.off=function(t,n){return this.isLegacyCall(t)?this.toutiaoLegacyJSB.off(t,n):e.prototype.off.call(this,t,n)},t.prototype.trigger=function(t,n){return this.isLegacyCall(t)?this.toutiaoLegacyJSB.trigger(t,n):e.prototype.trigger.call(this,t,n)},t.prototype.exposePublicApiToGlobal=function(){var e=this;hs.JSBridge=Object.assign(hs.JSBridge||{},this.publicApi),hs.__DISABLE_JSB_PROTOCAL2__||(hs.Native2JSBridge=Object.assign(hs.Native2JSBridge||{},this.publicApi)),Ts?hs.ToutiaoJSBridge=Object.assign(hs.ToutiaoJSBridge||{},this.publicApi):(vs||ys)&&this.toutiaoLegacyJSB?this.toutiaoLegacyJSB.exposePublicApiToGlobal():hs.ToutiaoJSBridge=Object.assign(hs.ToutiaoJSBridge||{},this.publicApi),hs.parent!==hs&&hs.addEventListener&&hs.addEventListener("message",(function(t){t&&t.data&&t.data.__callback_id&&e.handleMessageFromNative(t.data)}),!1),Object.defineProperties(hs,{JSBridge:{writable:!1},Native2JSBridge:{writable:!1},ToutiaoJSBridge:{writable:!1}}),Object.freeze(hs.JSBridge),Object.freeze(hs.Native2JSBridge),Object.freeze(hs.ToutiaoJSBridge)},t.prototype.isLegacyCall=function(e){return!(!e||"string"!=typeof e||!this.toutiaoLegacyJSB)&&(!!ys||!gs&&!Ts&&(vs&&e.indexOf(".")<0))},t}(fs);function Rs(e,t){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var n=Object(e),r=1;r<arguments.length;r++){var i=arguments[r];if(null!=i)for(var o=Object.keys(Object(i)),a=0,c=o.length;a<c;a++){var s=o[a],u=Object.getOwnPropertyDescriptor(i,s);void 0!==u&&u.enumerable&&(n[s]=i[s])}}return n}({assign:Rs,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:Rs})}}).polyfill();var ws=new As(new Ns);try{ws.exposePublicApiToGlobal()}catch(LN){}var Cs,Ps=ws.publicApi;globalThis.window&&(window.CustomEvent||((Cs=function(e,t){var n;return t=t||{bubbles:!1,cancelable:!1,detail:void 0},(n=document.createEvent("CustomEvent")).initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}).prototype=window.Event.prototype,window.CustomEvent=Cs));var ks=function(e){var n,r,i;return r=function(e){var t=document.createElement("iframe");t.style.display="none",t.src=e,document.body.appendChild(t),setTimeout((function(){document.body.removeChild(t)}),100)},n=window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.pacific?function(e,t){i={action:e,parameters:(t=t||{}).params,print:!!t.print},"string"==typeof t.callback?i.callback={type:0,name:t.callback,parameters:["key"]}:i.callback=t.callback,window.webkit.messageHandlers.pacific.postMessage(i)}:function(n,i){var o,a,c,s=[];if(o=((i=i||{}).protocol||"sslocal")+"://"+n,i.callback&&(i.params=i.params||{},i.params.callback=i.callback),i.params){for(a in c=i.params)if(c.hasOwnProperty(a)){var u=c[a];"object"==t(u)&&(u=JSON.stringify(u)),s.push(encodeURIComponent(a)+"="+encodeURIComponent(u))}s.push("r="+(Math.random()+"").slice(2)),o+="?"+s.join("&")}e?(i.debugCall&&i.debugCall(n,i.params),(console.dir||console.log)(o)):r(o)},{call:function(t,r,i){var o=r=r||{};if(i&&"function"==typeof i){var a=t+"DidFinish"+(e?"":"_"+Math.random().toString(36).slice(2));document.addEventListener(a,(function e(t){"success"===t.detail.message&&i(t.detail.data),document.removeEventListener(a,e)}))}n(t,{callback:a,params:o})}}}(!!window.globalConfig&&window.globalConfig.isDebug),Ms=ks,Ds=Gr(),Ls=(null==Ds?void 0:Ds._container)||new C.Container,js=(null==Ds?void 0:Ds._container)?so.REBIND:so.BIND;li();var xs=Ls[js](br.ENV),Us=Ls[js](uo.SignalType),Fs=Ls[js](uo.ID),Bs=Ls[js](uo.Type),Hs=Ls[js](uo.Options),Gs=Ls[js](uo.Plugins),Vs=Ls[js](uo.Rules),Js=Ls[js](uo.Info),Ws=Ls[js](uo.WebLibraryInfo),Ks=Ls[js](br.TTQ_GLOBAL_OPTIONS);try{if(!Ls.get(br.TTQ_GLOBAL_OPTIONS))throw new Error("")}catch(e){Ks.toConstantValue({})}var Ys=function(e,t){var n=function(e){return{name:"pixel.js",version:"2.2.0",options:e}}(),r=fi();Ws.toConstantValue(n),xs.toConstantValue(t),Us.toConstantValue(r),!e||e._mounted||Ls.isBound(br.JS_BRIDGE)||di(t)&&(hi(t)?Ls.bind(br.JS_BRIDGE).toConstantValue(function(){if(window&&window.ToutiaoJSBridge&&window.ToutiaoJSBridge.call)return window.ToutiaoJSBridge}()||Ps):Ls.bind(br.JS_BRIDGE).toConstantValue(Ms))},qs=function(e){var t=e||{},n=t._partner,r=t._ttp,i=t._self_host_config,o=t._usd_exchange_rate,a=t._legacy,c=t._cc,s=t._variation_id,u=t._server_unique_id,l=t._currency_list,f=t._plugins,d=t._aam,h=t._auto_config,p=Ls.get(br.TTQ_GLOBAL_OPTIONS)||{};Object.assign(p,{partner:n,ttp:r,cc:c,self_host_config:i,usd_exchange_rate:o,legacy:a,variation_id:s,server_unqiue_id:u,currency_list:l,plugins:f,aam:d,auto_config:h}),Ks.toConstantValue(p)},Xs=function(e){(null==e?void 0:e._container)||(Ls.bind(br.TTQ).to(No).inSingletonScope(),Ls.bind(br.CONTEXT).to(wo).inSingletonScope(),Ls.bind(br.REPORTER).to(Eo),Ls.bind(br.TTQ_REPORTERS).toConstantValue([]),Ls.bind(br.REPORT_SERVICE).to($o).inSingletonScope(),Ls.bind(br.AD_SERVICE).to(ko).inSingletonScope(),Ls.bind(br.APP_SERVICE).to(Lo).inSingletonScope(),Ls.bind(br.BRIDGE_SERVICE).to(Wo).inSingletonScope(),Ls.bind(br.HTTP_SERVICE).to(Qo).inSingletonScope(),Ls.bind(uo.IsOnsitePage).toConstantValue({value:!1}),Ls.bind(br.COOKIE_SERVICE).to(na).inSingletonScope(),Ls.bind(br.CONSENT_SERVICE).to(qo).inSingletonScope()),e&&!e._container&&(e._container=Ls)},Qs=function(e){as.forEach((function(t){var n=t.to,r=t.name,i=void 0===r?"":r,o=t.required,a=void 0!==o&&o,c=t.identifier;!a&&!(null==e?void 0:e._plugins[i])||Ls.isBound(c)||Ls.bind(c).to(n).inSingletonScope()}))},zs=function(e){var t=e.id,n=e.type,r=void 0===n?_o.PIXEL_CODE:n,i=e.info,o=e.options,a=void 0===o?{}:o,s=e.plugins,u=void 0===s?{}:s,l=e.rules,f=void 0===l?[]:l,d=Ls.get(br.TTQ),h=Ls.get(br.TTQ_REPORTERS);if(!h.some((function(e){return e.getReporterId()===t}))){Fs.toConstantValue(t),Bs.toConstantValue(r),Js.toConstantValue(i||c({},r,t)),Hs.toConstantValue(a),Gs.toConstantValue(u),Vs.toConstantValue(f),d.enableFirstPartyCookie((null==i?void 0:i.firstPartyCookieEnabled)||!1);var p=Ls.get(br.REPORTER);if(u){var v=u.AdvancedMatching,g=u.AutoAdvancedMatching,y={};v&&Object.assign(y,v),g&&Object.assign(y,g),p.setAdvancedMatchingAvailableProperties(y)}return p.on("beforeReport",(function(e,t,n,r,i){d.dispatch(ar.PIXEL_SEND,e,t,n,r,i)})),h.push(p),Ls.rebind(br.TTQ_REPORTERS).toConstantValue(h),d.dispatch(ar.PIXEL_DID_MOUNT,p),p}},Zs=function(e){return e&&e.Math==Math&&e},$s=Zs("object"==typeof globalThis&&globalThis)||Zs("object"==typeof window&&window)||Zs("object"==typeof self&&self)||Zs("object"==typeof R&&R)||function(){return this}()||Function("return this")(),eu={},tu=function(e){try{return!!e()}catch(e){return!0}},nu=!tu((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),ru=!tu((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),iu=ru,ou=Function.prototype.call,au=iu?ou.bind(ou):function(){return ou.apply(ou,arguments)},cu={},su={}.propertyIsEnumerable,uu=Object.getOwnPropertyDescriptor,lu=uu&&!su.call({1:2},1);cu.f=lu?function(e){var t=uu(this,e);return!!t&&t.enumerable}:su;var fu,du,hu=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},pu=ru,vu=Function.prototype,gu=vu.bind,yu=vu.call,_u=pu&&gu.bind(yu,yu),mu=pu?function(e){return e&&_u(e)}:function(e){return e&&function(){return yu.apply(e,arguments)}},bu=mu,Eu=bu({}.toString),Iu=bu("".slice),Tu=function(e){return Iu(Eu(e),8,-1)},Ou=tu,Su=Tu,Nu=Object,Au=mu("".split),Ru=Ou((function(){return!Nu("z").propertyIsEnumerable(0)}))?function(e){return"String"==Su(e)?Au(e,""):Nu(e)}:Nu,wu=TypeError,Cu=function(e){if(null==e)throw wu("Can't call method on "+e);return e},Pu=Ru,ku=Cu,Mu=function(e){return Pu(ku(e))},Du=function(e){return"function"==typeof e},Lu=Du,ju=function(e){return"object"==typeof e?null!==e:Lu(e)},xu=$s,Uu=Du,Fu=function(e){return Uu(e)?e:void 0},Bu=function(e,t){return arguments.length<2?Fu(xu[e]):xu[e]&&xu[e][t]},Hu=mu({}.isPrototypeOf),Gu=Bu("navigator","userAgent")||"",Vu=$s,Ju=Gu,Wu=Vu.process,Ku=Vu.Deno,Yu=Wu&&Wu.versions||Ku&&Ku.version,qu=Yu&&Yu.v8;qu&&(du=(fu=qu.split("."))[0]>0&&fu[0]<4?1:+(fu[0]+fu[1])),!du&&Ju&&(!(fu=Ju.match(/Edge\/(\d+)/))||fu[1]>=74)&&(fu=Ju.match(/Chrome\/(\d+)/))&&(du=+fu[1]);var Xu=du,Qu=Xu,zu=tu,Zu=!!Object.getOwnPropertySymbols&&!zu((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Qu&&Qu<41})),$u=Zu&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,el=Bu,tl=Du,nl=Hu,rl=Object,il=$u?function(e){return"symbol"==typeof e}:function(e){var t=el("Symbol");return tl(t)&&nl(t.prototype,rl(e))},ol=String,al=function(e){try{return ol(e)}catch(e){return"Object"}},cl=Du,sl=al,ul=TypeError,ll=function(e){if(cl(e))return e;throw ul(sl(e)+" is not a function")},fl=ll,dl=function(e,t){var n=e[t];return null==n?void 0:fl(n)},hl=au,pl=Du,vl=ju,gl=TypeError,yl={exports:{}},_l=$s,ml=Object.defineProperty,bl=function(e,t){try{ml(_l,e,{value:t,configurable:!0,writable:!0})}catch(n){_l[e]=t}return t},El=bl,Il="__core-js_shared__",Tl=$s[Il]||El(Il,{}),Ol=Tl;(yl.exports=function(e,t){return Ol[e]||(Ol[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.23.5",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.5/LICENSE",source:"https://github.com/zloirock/core-js"});var Sl=Cu,Nl=Object,Al=function(e){return Nl(Sl(e))},Rl=Al,wl=mu({}.hasOwnProperty),Cl=Object.hasOwn||function(e,t){return wl(Rl(e),t)},Pl=mu,kl=0,Ml=Math.random(),Dl=Pl(1..toString),Ll=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Dl(++kl+Ml,36)},jl=$s,xl=yl.exports,Ul=Cl,Fl=Ll,Bl=Zu,Hl=$u,Gl=xl("wks"),Vl=jl.Symbol,Jl=Vl&&Vl.for,Wl=Hl?Vl:Vl&&Vl.withoutSetter||Fl,Kl=function(e){if(!Ul(Gl,e)||!Bl&&"string"!=typeof Gl[e]){var t="Symbol."+e;Bl&&Ul(Vl,e)?Gl[e]=Vl[e]:Gl[e]=Hl&&Jl?Jl(t):Wl(t)}return Gl[e]},Yl=au,ql=ju,Xl=il,Ql=dl,zl=function(e,t){var n,r;if("string"===t&&pl(n=e.toString)&&!vl(r=hl(n,e)))return r;if(pl(n=e.valueOf)&&!vl(r=hl(n,e)))return r;if("string"!==t&&pl(n=e.toString)&&!vl(r=hl(n,e)))return r;throw gl("Can't convert object to primitive value")},Zl=TypeError,$l=Kl("toPrimitive"),ef=function(e,t){if(!ql(e)||Xl(e))return e;var n,r=Ql(e,$l);if(r){if(void 0===t&&(t="default"),n=Yl(r,e,t),!ql(n)||Xl(n))return n;throw Zl("Can't convert object to primitive value")}return void 0===t&&(t="number"),zl(e,t)},tf=il,nf=function(e){var t=ef(e,"string");return tf(t)?t:t+""},rf=ju,of=$s.document,af=rf(of)&&rf(of.createElement),cf=function(e){return af?of.createElement(e):{}},sf=cf,uf=!nu&&!tu((function(){return 7!=Object.defineProperty(sf("div"),"a",{get:function(){return 7}}).a})),lf=nu,ff=au,df=cu,hf=hu,pf=Mu,vf=nf,gf=Cl,yf=uf,_f=Object.getOwnPropertyDescriptor;eu.f=lf?_f:function(e,t){if(e=pf(e),t=vf(t),yf)try{return _f(e,t)}catch(e){}if(gf(e,t))return hf(!ff(df.f,e,t),e[t])};var mf={},bf=nu&&tu((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ef=ju,If=String,Tf=TypeError,Of=function(e){if(Ef(e))return e;throw Tf(If(e)+" is not an object")},Sf=nu,Nf=uf,Af=bf,Rf=Of,wf=nf,Cf=TypeError,Pf=Object.defineProperty,kf=Object.getOwnPropertyDescriptor,Mf="enumerable",Df="configurable",Lf="writable";mf.f=Sf?Af?function(e,t,n){if(Rf(e),t=wf(t),Rf(n),"function"==typeof e&&"prototype"===t&&"value"in n&&Lf in n&&!n.writable){var r=kf(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:Df in n?n.configurable:r.configurable,enumerable:Mf in n?n.enumerable:r.enumerable,writable:!1})}return Pf(e,t,n)}:Pf:function(e,t,n){if(Rf(e),t=wf(t),Rf(n),Nf)try{return Pf(e,t,n)}catch(e){}if("get"in n||"set"in n)throw Cf("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var jf=mf,xf=hu,Uf=nu?function(e,t,n){return jf.f(e,t,xf(1,n))}:function(e,t,n){return e[t]=n,e},Ff={exports:{}},Bf=nu,Hf=Cl,Gf=Function.prototype,Vf=Bf&&Object.getOwnPropertyDescriptor,Jf=Hf(Gf,"name"),Wf={EXISTS:Jf,PROPER:Jf&&"something"===function(){}.name,CONFIGURABLE:Jf&&(!Bf||Bf&&Vf(Gf,"name").configurable)},Kf=Du,Yf=Tl,qf=mu(Function.toString);Kf(Yf.inspectSource)||(Yf.inspectSource=function(e){return qf(e)});var Xf,Qf,zf,Zf=Yf.inspectSource,$f=Du,ed=Zf,td=$s.WeakMap,nd=$f(td)&&/native code/.test(ed(td)),rd=yl.exports,id=Ll,od=rd("keys"),ad=function(e){return od[e]||(od[e]=id(e))},cd={},sd=nd,ud=$s,ld=mu,fd=ju,dd=Uf,hd=Cl,pd=Tl,vd=ad,gd=cd,yd="Object already initialized",_d=ud.TypeError,md=ud.WeakMap;if(sd||pd.state){var bd=pd.state||(pd.state=new md),Ed=ld(bd.get),Id=ld(bd.has),Td=ld(bd.set);Xf=function(e,t){if(Id(bd,e))throw new _d(yd);return t.facade=e,Td(bd,e,t),t},Qf=function(e){return Ed(bd,e)||{}},zf=function(e){return Id(bd,e)}}else{var Od=vd("state");gd[Od]=!0,Xf=function(e,t){if(hd(e,Od))throw new _d(yd);return t.facade=e,dd(e,Od,t),t},Qf=function(e){return hd(e,Od)?e[Od]:{}},zf=function(e){return hd(e,Od)}}var Sd={set:Xf,get:Qf,has:zf,enforce:function(e){return zf(e)?Qf(e):Xf(e,{})},getterFor:function(e){return function(t){var n;if(!fd(t)||(n=Qf(t)).type!==e)throw _d("Incompatible receiver, "+e+" required");return n}}},Nd=tu,Ad=Du,Rd=Cl,wd=nu,Cd=Wf.CONFIGURABLE,Pd=Zf,kd=Sd.enforce,Md=Sd.get,Dd=Object.defineProperty,Ld=wd&&!Nd((function(){return 8!==Dd((function(){}),"length",{value:8}).length})),jd=String(String).split("String"),xd=Ff.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Rd(e,"name")||Cd&&e.name!==t)&&(wd?Dd(e,"name",{value:t,configurable:!0}):e.name=t),Ld&&n&&Rd(n,"arity")&&e.length!==n.arity&&Dd(e,"length",{value:n.arity});try{n&&Rd(n,"constructor")&&n.constructor?wd&&Dd(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=kd(e);return Rd(r,"source")||(r.source=jd.join("string"==typeof t?t:"")),e};Function.prototype.toString=xd((function(){return Ad(this)&&Md(this).source||Pd(this)}),"toString");var Ud=Du,Fd=mf,Bd=Ff.exports,Hd=bl,Gd=function(e,t,n,r){r||(r={});var i=r.enumerable,o=void 0!==r.name?r.name:t;if(Ud(n)&&Bd(n,o,r),r.global)i?e[t]=n:Hd(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:Fd.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},Vd={},Jd=Math.ceil,Wd=Math.floor,Kd=Math.trunc||function(e){var t=+e;return(t>0?Wd:Jd)(t)},Yd=function(e){var t=+e;return t!=t||0===t?0:Kd(t)},qd=Yd,Xd=Math.max,Qd=Math.min,zd=function(e,t){var n=qd(e);return n<0?Xd(n+t,0):Qd(n,t)},Zd=Yd,$d=Math.min,eh=function(e){return e>0?$d(Zd(e),9007199254740991):0},th=function(e){return eh(e.length)},nh=Mu,rh=zd,ih=th,oh=function(e){return function(t,n,r){var i,o=nh(t),a=ih(o),c=rh(r,a);if(e&&n!=n){for(;a>c;)if((i=o[c++])!=i)return!0}else for(;a>c;c++)if((e||c in o)&&o[c]===n)return e||c||0;return!e&&-1}},ah={includes:oh(!0),indexOf:oh(!1)},ch=Cl,sh=Mu,uh=ah.indexOf,lh=cd,fh=mu([].push),dh=function(e,t){var n,r=sh(e),i=0,o=[];for(n in r)!ch(lh,n)&&ch(r,n)&&fh(o,n);for(;t.length>i;)ch(r,n=t[i++])&&(~uh(o,n)||fh(o,n));return o},hh=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ph=dh,vh=hh.concat("length","prototype");Vd.f=Object.getOwnPropertyNames||function(e){return ph(e,vh)};var gh={};gh.f=Object.getOwnPropertySymbols;var yh=Bu,_h=Vd,mh=gh,bh=Of,Eh=mu([].concat),Ih=yh("Reflect","ownKeys")||function(e){var t=_h.f(bh(e)),n=mh.f;return n?Eh(t,n(e)):t},Th=Cl,Oh=Ih,Sh=eu,Nh=mf,Ah=function(e,t,n){for(var r=Oh(t),i=Nh.f,o=Sh.f,a=0;a<r.length;a++){var c=r[a];Th(e,c)||n&&Th(n,c)||i(e,c,o(t,c))}},Rh=tu,wh=Du,Ch=/#|\.prototype\./,Ph=function(e,t){var n=Mh[kh(e)];return n==Lh||n!=Dh&&(wh(t)?Rh(t):!!t)},kh=Ph.normalize=function(e){return String(e).replace(Ch,".").toLowerCase()},Mh=Ph.data={},Dh=Ph.NATIVE="N",Lh=Ph.POLYFILL="P",jh=Ph,xh=$s,Uh=eu.f,Fh=Uf,Bh=Gd,Hh=bl,Gh=Ah,Vh=jh,Jh=function(e,t){var n,r,i,o,a,c=e.target,s=e.global,u=e.stat;if(n=s?xh:u?xh[c]||Hh(c,{}):(xh[c]||{}).prototype)for(r in t){if(o=t[r],i=e.dontCallGetSet?(a=Uh(n,r))&&a.value:n[r],!Vh(s?r:c+(u?".":"#")+r,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;Gh(o,i)}(e.sham||i&&i.sham)&&Fh(o,"sham",!0),Bh(n,r,o,e)}},Wh={};Wh[Kl("toStringTag")]="z";var Kh="[object z]"===String(Wh),Yh=Kh,qh=Du,Xh=Tu,Qh=Kl("toStringTag"),zh=Object,Zh="Arguments"==Xh(function(){return arguments}()),$h=Yh?Xh:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=zh(e),Qh))?n:Zh?Xh(t):"Object"==(r=Xh(t))&&qh(t.callee)?"Arguments":r},ep=$h,tp=String,np=function(e){if("Symbol"===ep(e))throw TypeError("Cannot convert a Symbol value to a string");return tp(e)},rp={},ip=dh,op=hh,ap=Object.keys||function(e){return ip(e,op)},cp=nu,sp=bf,up=mf,lp=Of,fp=Mu,dp=ap;rp.f=cp&&!sp?Object.defineProperties:function(e,t){lp(e);for(var n,r=fp(t),i=dp(t),o=i.length,a=0;o>a;)up.f(e,n=i[a++],r[n]);return e};var hp,pp=Bu("document","documentElement"),vp=Of,gp=rp,yp=hh,_p=cd,mp=pp,bp=cf,Ep=ad("IE_PROTO"),Ip=function(){},Tp=function(e){return"<script>"+e+"</"+"script>"},Op=function(e){e.write(Tp("")),e.close();var t=e.parentWindow.Object;return e=null,t},Sp=function(){try{hp=new ActiveXObject("htmlfile")}catch(e){}var e,t;Sp="undefined"!=typeof document?document.domain&&hp?Op(hp):((t=bp("iframe")).style.display="none",mp.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Tp("document.F=Object")),e.close(),e.F):Op(hp);for(var n=yp.length;n--;)delete Sp.prototype[yp[n]];return Sp()};_p[Ep]=!0;var Np=Object.create||function(e,t){var n;return null!==e?(Ip.prototype=vp(e),n=new Ip,Ip.prototype=null,n[Ep]=e):n=Sp(),void 0===t?n:gp.f(n,t)},Ap={},Rp=nf,wp=mf,Cp=hu,Pp=function(e,t,n){var r=Rp(t);r in e?wp.f(e,r,Cp(0,n)):e[r]=n},kp=zd,Mp=th,Dp=Pp,Lp=Array,jp=Math.max,xp=Tu,Up=Mu,Fp=Vd.f,Bp=function(e,t,n){for(var r=Mp(e),i=kp(t,r),o=kp(void 0===n?r:n,r),a=Lp(jp(o-i,0)),c=0;i<o;i++,c++)Dp(a,c,e[i]);return a.length=c,a},Hp="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ap.f=function(e){return Hp&&"Window"==xp(e)?function(e){try{return Fp(e)}catch(e){return Bp(Hp)}}(e):Fp(Up(e))};var Gp={},Vp=Kl;Gp.f=Vp;var Jp=$s,Wp=Jp,Kp=Cl,Yp=Gp,qp=mf.f,Xp=au,Qp=Bu,zp=Kl,Zp=Gd,$p=mf.f,ev=Cl,tv=Kl("toStringTag"),nv=function(e,t,n){e&&!n&&(e=e.prototype),e&&!ev(e,tv)&&$p(e,tv,{configurable:!0,value:t})},rv=ll,iv=ru,ov=mu(mu.bind),av=function(e,t){return rv(e),void 0===t?e:iv?ov(e,t):function(){return e.apply(t,arguments)}},cv=Tu,sv=Array.isArray||function(e){return"Array"==cv(e)},uv=mu,lv=tu,fv=Du,dv=$h,hv=Zf,pv=function(){},vv=[],gv=Bu("Reflect","construct"),yv=/^\s*(?:class|function)\b/,_v=uv(yv.exec),mv=!yv.exec(pv),bv=function(e){if(!fv(e))return!1;try{return gv(pv,vv,e),!0}catch(e){return!1}},Ev=function(e){if(!fv(e))return!1;switch(dv(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return mv||!!_v(yv,hv(e))}catch(e){return!0}};Ev.sham=!0;var Iv=!gv||lv((function(){var e;return bv(bv.call)||!bv(Object)||!bv((function(){e=!0}))||e}))?Ev:bv,Tv=sv,Ov=Iv,Sv=ju,Nv=Kl("species"),Av=Array,Rv=function(e){var t;return Tv(e)&&(t=e.constructor,(Ov(t)&&(t===Av||Tv(t.prototype))||Sv(t)&&null===(t=t[Nv]))&&(t=void 0)),void 0===t?Av:t},wv=av,Cv=Ru,Pv=Al,kv=th,Mv=function(e,t){return new(Rv(e))(0===t?0:t)},Dv=mu([].push),Lv=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,c=5==e||o;return function(s,u,l,f){for(var d,h,p=Pv(s),v=Cv(p),g=wv(u,l),y=kv(v),_=0,m=f||Mv,b=t?m(s,y):n||a?m(s,0):void 0;y>_;_++)if((c||_ in v)&&(h=g(d=v[_],_,p),e))if(t)b[_]=h;else if(h)switch(e){case 3:return!0;case 5:return d;case 6:return _;case 2:Dv(b,d)}else switch(e){case 4:return!1;case 7:Dv(b,d)}return o?-1:r||i?i:b}},jv={forEach:Lv(0),map:Lv(1),filter:Lv(2),some:Lv(3),every:Lv(4),find:Lv(5),findIndex:Lv(6),filterReject:Lv(7)},xv=Jh,Uv=$s,Fv=au,Bv=mu,Hv=nu,Gv=Zu,Vv=tu,Jv=Cl,Wv=Hu,Kv=Of,Yv=Mu,qv=nf,Xv=np,Qv=hu,zv=Np,Zv=ap,$v=Vd,eg=Ap,tg=gh,ng=eu,rg=mf,ig=rp,og=cu,ag=Gd,cg=yl.exports,sg=cd,ug=Ll,lg=Kl,fg=Gp,dg=function(e){var t=Wp.Symbol||(Wp.Symbol={});Kp(t,e)||qp(t,e,{value:Yp.f(e)})},hg=function(){var e=Qp("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=zp("toPrimitive");t&&!t[r]&&Zp(t,r,(function(e){return Xp(n,this)}),{arity:1})},pg=nv,vg=Sd,gg=jv.forEach,yg=ad("hidden"),_g="Symbol",mg=vg.set,bg=vg.getterFor(_g),Eg=Object.prototype,Ig=Uv.Symbol,Tg=Ig&&Ig.prototype,Og=Uv.TypeError,Sg=Uv.QObject,Ng=ng.f,Ag=rg.f,Rg=eg.f,wg=og.f,Cg=Bv([].push),Pg=cg("symbols"),kg=cg("op-symbols"),Mg=cg("wks"),Dg=!Sg||!Sg.prototype||!Sg.prototype.findChild,Lg=Hv&&Vv((function(){return 7!=zv(Ag({},"a",{get:function(){return Ag(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Ng(Eg,t);r&&delete Eg[t],Ag(e,t,n),r&&e!==Eg&&Ag(Eg,t,r)}:Ag,jg=function(e,t){var n=Pg[e]=zv(Tg);return mg(n,{type:_g,tag:e,description:t}),Hv||(n.description=t),n},xg=function(e,t,n){e===Eg&&xg(kg,t,n),Kv(e);var r=qv(t);return Kv(n),Jv(Pg,r)?(n.enumerable?(Jv(e,yg)&&e[yg][r]&&(e[yg][r]=!1),n=zv(n,{enumerable:Qv(0,!1)})):(Jv(e,yg)||Ag(e,yg,Qv(1,{})),e[yg][r]=!0),Lg(e,r,n)):Ag(e,r,n)},Ug=function(e,t){Kv(e);var n=Yv(t),r=Zv(n).concat(Gg(n));return gg(r,(function(t){Hv&&!Fv(Fg,n,t)||xg(e,t,n[t])})),e},Fg=function(e){var t=qv(e),n=Fv(wg,this,t);return!(this===Eg&&Jv(Pg,t)&&!Jv(kg,t))&&(!(n||!Jv(this,t)||!Jv(Pg,t)||Jv(this,yg)&&this[yg][t])||n)},Bg=function(e,t){var n=Yv(e),r=qv(t);if(n!==Eg||!Jv(Pg,r)||Jv(kg,r)){var i=Ng(n,r);return!i||!Jv(Pg,r)||Jv(n,yg)&&n[yg][r]||(i.enumerable=!0),i}},Hg=function(e){var t=Rg(Yv(e)),n=[];return gg(t,(function(e){Jv(Pg,e)||Jv(sg,e)||Cg(n,e)})),n},Gg=function(e){var t=e===Eg,n=Rg(t?kg:Yv(e)),r=[];return gg(n,(function(e){!Jv(Pg,e)||t&&!Jv(Eg,e)||Cg(r,Pg[e])})),r};Gv||(Ig=function(){if(Wv(Tg,this))throw Og("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Xv(arguments[0]):void 0,t=ug(e),n=function(e){this===Eg&&Fv(n,kg,e),Jv(this,yg)&&Jv(this[yg],t)&&(this[yg][t]=!1),Lg(this,t,Qv(1,e))};return Hv&&Dg&&Lg(Eg,t,{configurable:!0,set:n}),jg(t,e)},ag(Tg=Ig.prototype,"toString",(function(){return bg(this).tag})),ag(Ig,"withoutSetter",(function(e){return jg(ug(e),e)})),og.f=Fg,rg.f=xg,ig.f=Ug,ng.f=Bg,$v.f=eg.f=Hg,tg.f=Gg,fg.f=function(e){return jg(lg(e),e)},Hv&&(Ag(Tg,"description",{configurable:!0,get:function(){return bg(this).description}}),ag(Eg,"propertyIsEnumerable",Fg,{unsafe:!0}))),xv({global:!0,constructor:!0,wrap:!0,forced:!Gv,sham:!Gv},{Symbol:Ig}),gg(Zv(Mg),(function(e){dg(e)})),xv({target:_g,stat:!0,forced:!Gv},{useSetter:function(){Dg=!0},useSimple:function(){Dg=!1}}),xv({target:"Object",stat:!0,forced:!Gv,sham:!Hv},{create:function(e,t){return void 0===t?zv(e):Ug(zv(e),t)},defineProperty:xg,defineProperties:Ug,getOwnPropertyDescriptor:Bg}),xv({target:"Object",stat:!0,forced:!Gv},{getOwnPropertyNames:Hg}),hg(),pg(Ig,_g),sg[yg]=!0;var Vg=Zu&&!!Symbol.for&&!!Symbol.keyFor,Jg=Jh,Wg=Bu,Kg=Cl,Yg=np,qg=yl.exports,Xg=Vg,Qg=qg("string-to-symbol-registry"),zg=qg("symbol-to-string-registry");Jg({target:"Symbol",stat:!0,forced:!Xg},{for:function(e){var t=Yg(e);if(Kg(Qg,t))return Qg[t];var n=Wg("Symbol")(t);return Qg[t]=n,zg[n]=t,n}});var Zg=Jh,$g=Cl,ey=il,ty=al,ny=Vg,ry=(0,yl.exports)("symbol-to-string-registry");Zg({target:"Symbol",stat:!0,forced:!ny},{keyFor:function(e){if(!ey(e))throw TypeError(ty(e)+" is not a symbol");if($g(ry,e))return ry[e]}});var iy=ru,oy=Function.prototype,ay=oy.apply,cy=oy.call,sy="object"==typeof Reflect&&Reflect.apply||(iy?cy.bind(ay):function(){return cy.apply(ay,arguments)}),uy=mu([].slice),ly=Jh,fy=Bu,dy=sy,hy=au,py=mu,vy=tu,gy=sv,yy=Du,_y=ju,my=il,by=uy,Ey=Zu,Iy=fy("JSON","stringify"),Ty=py(/./.exec),Oy=py("".charAt),Sy=py("".charCodeAt),Ny=py("".replace),Ay=py(1..toString),Ry=/[\uD800-\uDFFF]/g,wy=/^[\uD800-\uDBFF]$/,Cy=/^[\uDC00-\uDFFF]$/,Py=!Ey||vy((function(){var e=fy("Symbol")();return"[null]"!=Iy([e])||"{}"!=Iy({a:e})||"{}"!=Iy(Object(e))})),ky=vy((function(){return'"\\udf06\\ud834"'!==Iy("\udf06\ud834")||'"\\udead"'!==Iy("\udead")})),My=function(e,t){var n=by(arguments),r=t;if((_y(t)||void 0!==e)&&!my(e))return gy(t)||(t=function(e,t){if(yy(r)&&(t=hy(r,this,e,t)),!my(t))return t}),n[1]=t,dy(Iy,null,n)},Dy=function(e,t,n){var r=Oy(n,t-1),i=Oy(n,t+1);return Ty(wy,e)&&!Ty(Cy,i)||Ty(Cy,e)&&!Ty(wy,r)?"\\u"+Ay(Sy(e,0),16):e};Iy&&ly({target:"JSON",stat:!0,arity:3,forced:Py||ky},{stringify:function(e,t,n){var r=by(arguments),i=dy(Py?My:Iy,null,r);return ky&&"string"==typeof i?Ny(i,Ry,Dy):i}});var Ly=gh,jy=Al;Jh({target:"Object",stat:!0,forced:!Zu||tu((function(){Ly.f(1)}))},{getOwnPropertySymbols:function(e){var t=Ly.f;return t?t(jy(e)):[]}});var xy=nu,Uy=mu,Fy=au,By=tu,Hy=ap,Gy=gh,Vy=cu,Jy=Al,Wy=Ru,Ky=Object.assign,Yy=Object.defineProperty,qy=Uy([].concat),Xy=!Ky||By((function(){if(xy&&1!==Ky({b:1},Ky(Yy({},"a",{enumerable:!0,get:function(){Yy(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=Ky({},e)[n]||Hy(Ky({},t)).join("")!=r}))?function(e,t){for(var n=Jy(e),r=arguments.length,i=1,o=Gy.f,a=Vy.f;r>i;)for(var c,s=Wy(arguments[i++]),u=o?qy(Hy(s),o(s)):Hy(s),l=u.length,f=0;l>f;)c=u[f++],xy&&!Fy(a,s,c)||(n[c]=s[c]);return n}:Ky,Qy=Xy;Jh({target:"Object",stat:!0,arity:2,forced:Object.assign!==Qy},{assign:Qy}),Jh({target:"Object",stat:!0,sham:!nu},{create:Np});var zy=Jh,Zy=nu,$y=mf.f;zy({target:"Object",stat:!0,forced:Object.defineProperty!==$y,sham:!Zy},{defineProperty:$y});var e_=Jh,t_=nu,n_=rp.f;e_({target:"Object",stat:!0,forced:Object.defineProperties!==n_,sham:!t_},{defineProperties:n_});var r_=nu,i_=mu,o_=ap,a_=Mu,c_=i_(cu.f),s_=i_([].push),u_=function(e){return function(t){for(var n,r=a_(t),i=o_(r),o=i.length,a=0,c=[];o>a;)n=i[a++],r_&&!c_(r,n)||s_(c,e?[n,r[n]]:r[n]);return c}},l_={entries:u_(!0),values:u_(!1)},f_=l_.entries;Jh({target:"Object",stat:!0},{entries:function(e){return f_(e)}});var d_=!tu((function(){return Object.isExtensible(Object.preventExtensions({}))})),h_={exports:{}},p_=tu((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),v_=tu,g_=ju,y_=Tu,__=p_,m_=Object.isExtensible,b_=v_((function(){m_(1)}))||__?function(e){return!!g_(e)&&((!__||"ArrayBuffer"!=y_(e))&&(!m_||m_(e)))}:m_,E_=Jh,I_=mu,T_=cd,O_=ju,S_=Cl,N_=mf.f,A_=Vd,R_=Ap,w_=b_,C_=d_,P_=!1,k_=Ll("meta"),M_=0,D_=function(e){N_(e,k_,{value:{objectID:"O"+M_++,weakData:{}}})},L_=h_.exports={enable:function(){L_.enable=function(){},P_=!0;var e=A_.f,t=I_([].splice),n={};n[k_]=1,e(n).length&&(A_.f=function(n){for(var r=e(n),i=0,o=r.length;i<o;i++)if(r[i]===k_){t(r,i,1);break}return r},E_({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:R_.f}))},fastKey:function(e,t){if(!O_(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!S_(e,k_)){if(!w_(e))return"F";if(!t)return"E";D_(e)}return e[k_].objectID},getWeakData:function(e,t){if(!S_(e,k_)){if(!w_(e))return!0;if(!t)return!1;D_(e)}return e[k_].weakData},onFreeze:function(e){return C_&&P_&&w_(e)&&!S_(e,k_)&&D_(e),e}};T_[k_]=!0;var j_=Jh,x_=d_,U_=tu,F_=ju,B_=h_.exports.onFreeze,H_=Object.freeze;j_({target:"Object",stat:!0,forced:U_((function(){H_(1)})),sham:!x_},{freeze:function(e){return H_&&F_(e)?H_(B_(e)):e}});var G_={},V_=G_,J_=Kl("iterator"),W_=Array.prototype,K_=$h,Y_=dl,q_=G_,X_=Kl("iterator"),Q_=function(e){if(null!=e)return Y_(e,X_)||Y_(e,"@@iterator")||q_[K_(e)]},z_=au,Z_=ll,$_=Of,em=al,tm=Q_,nm=TypeError,rm=au,im=Of,om=dl,am=av,cm=au,sm=Of,um=al,lm=function(e){return void 0!==e&&(V_.Array===e||W_[J_]===e)},fm=th,dm=Hu,hm=function(e,t){var n=arguments.length<2?tm(e):t;if(Z_(n))return $_(z_(n,e));throw nm(em(e)+" is not iterable")},pm=Q_,vm=function(e,t,n){var r,i;im(e);try{if(!(r=om(e,"return"))){if("throw"===t)throw n;return n}r=rm(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return im(r),n},gm=TypeError,ym=function(e,t){this.stopped=e,this.result=t},_m=ym.prototype,mm=function(e,t,n){var r,i,o,a,c,s,u,l=n&&n.that,f=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_RECORD),h=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=am(t,l),g=function(e){return r&&vm(r,"normal",e),new ym(!0,e)},y=function(e){return f?(sm(e),p?v(e[0],e[1],g):v(e[0],e[1])):p?v(e,g):v(e)};if(d)r=e.iterator;else if(h)r=e;else{if(!(i=pm(e)))throw gm(um(e)+" is not iterable");if(lm(i)){for(o=0,a=fm(e);a>o;o++)if((c=y(e[o]))&&dm(_m,c))return c;return new ym(!1)}r=hm(e,i)}for(s=d?e.next:r.next;!(u=cm(s,r)).done;){try{c=y(u.value)}catch(e){vm(r,"throw",e)}if("object"==typeof c&&c&&dm(_m,c))return c}return new ym(!1)},bm=mm,Em=Pp;Jh({target:"Object",stat:!0},{fromEntries:function(e){var t={};return bm(e,(function(e,n){Em(t,e,n)}),{AS_ENTRIES:!0}),t}});var Im=Jh,Tm=tu,Om=Mu,Sm=eu.f,Nm=nu,Am=Tm((function(){Sm(1)}));Im({target:"Object",stat:!0,forced:!Nm||Am,sham:!Nm},{getOwnPropertyDescriptor:function(e,t){return Sm(Om(e),t)}});var Rm=Ih,wm=Mu,Cm=eu,Pm=Pp;Jh({target:"Object",stat:!0,sham:!nu},{getOwnPropertyDescriptors:function(e){for(var t,n,r=wm(e),i=Cm.f,o=Rm(r),a={},c=0;o.length>c;)void 0!==(n=i(r,t=o[c++]))&&Pm(a,t,n);return a}});var km=Jh,Mm=tu,Dm=Ap.f;km({target:"Object",stat:!0,forced:Mm((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:Dm});var Lm=!tu((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),jm=Cl,xm=Du,Um=Al,Fm=Lm,Bm=ad("IE_PROTO"),Hm=Object,Gm=Hm.prototype,Vm=Fm?Hm.getPrototypeOf:function(e){var t=Um(e);if(jm(t,Bm))return t[Bm];var n=t.constructor;return xm(n)&&t instanceof n?n.prototype:t instanceof Hm?Gm:null},Jm=Al,Wm=Vm,Km=Lm;Jh({target:"Object",stat:!0,forced:tu((function(){Wm(1)})),sham:!Km},{getPrototypeOf:function(e){return Wm(Jm(e))}}),Jh({target:"Object",stat:!0},{hasOwn:Cl}),Jh({target:"Object",stat:!0},{is:Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}});var Ym=b_;Jh({target:"Object",stat:!0,forced:Object.isExtensible!==Ym},{isExtensible:Ym});var qm=Jh,Xm=tu,Qm=ju,zm=Tu,Zm=p_,$m=Object.isFrozen;qm({target:"Object",stat:!0,forced:Xm((function(){$m(1)}))||Zm},{isFrozen:function(e){return!Qm(e)||(!(!Zm||"ArrayBuffer"!=zm(e))||!!$m&&$m(e))}});var eb=Jh,tb=tu,nb=ju,rb=Tu,ib=p_,ob=Object.isSealed;eb({target:"Object",stat:!0,forced:tb((function(){ob(1)}))||ib},{isSealed:function(e){return!nb(e)||(!(!ib||"ArrayBuffer"!=rb(e))||!!ob&&ob(e))}});var ab=Al,cb=ap;Jh({target:"Object",stat:!0,forced:tu((function(){cb(1)}))},{keys:function(e){return cb(ab(e))}});var sb=Jh,ub=ju,lb=h_.exports.onFreeze,fb=d_,db=tu,hb=Object.preventExtensions;sb({target:"Object",stat:!0,forced:db((function(){hb(1)})),sham:!fb},{preventExtensions:function(e){return hb&&ub(e)?hb(lb(e)):e}});var pb=Jh,vb=ju,gb=h_.exports.onFreeze,yb=d_,_b=tu,mb=Object.seal;pb({target:"Object",stat:!0,forced:_b((function(){mb(1)})),sham:!yb},{seal:function(e){return mb&&vb(e)?mb(gb(e)):e}});var bb=Du,Eb=String,Ib=TypeError,Tb=mu,Ob=Of,Sb=function(e){if("object"==typeof e||bb(e))return e;throw Ib("Can't set "+Eb(e)+" as a prototype")},Nb=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Tb(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Ob(n),Sb(r),t?e(n,r):n.__proto__=r,n}}():void 0);Jh({target:"Object",stat:!0},{setPrototypeOf:Nb});var Ab=l_.values;Jh({target:"Object",stat:!0},{values:function(e){return Ab(e)}});var Rb=$h,wb=Kh?{}.toString:function(){return"[object "+Rb(this)+"]"};Kh||Gd(Object.prototype,"toString",wb,{unsafe:!0});var Cb=Gu.match(/AppleWebKit\/(\d+)\./),Pb=!!Cb&&+Cb[1],kb=$s,Mb=Pb,Db=!tu((function(){if(!(Mb&&Mb<535)){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete kb[e]}})),Lb=ll,jb=Al,xb=mf;nu&&Jh({target:"Object",proto:!0,forced:Db},{__defineGetter__:function(e,t){xb.f(jb(this),e,{get:Lb(t),enumerable:!0,configurable:!0})}});var Ub=ll,Fb=Al,Bb=mf;nu&&Jh({target:"Object",proto:!0,forced:Db},{__defineSetter__:function(e,t){Bb.f(Fb(this),e,{set:Ub(t),enumerable:!0,configurable:!0})}});var Hb=Jh,Gb=nu,Vb=Db,Jb=Al,Wb=nf,Kb=Vm,Yb=eu.f;Gb&&Hb({target:"Object",proto:!0,forced:Vb},{__lookupGetter__:function(e){var t,n=Jb(this),r=Wb(e);do{if(t=Yb(n,r))return t.get}while(n=Kb(n))}});var qb=Jh,Xb=nu,Qb=Db,zb=Al,Zb=nf,$b=Vm,eE=eu.f;Xb&&qb({target:"Object",proto:!0,forced:Qb},{__lookupSetter__:function(e){var t,n=zb(this),r=Zb(e);do{if(t=eE(n,r))return t.set}while(n=$b(n))}}),nv($s.JSON,"JSON",!0),nv(Math,"Math",!0);var tE=$s,nE=nv;Jh({global:!0},{Reflect:{}}),nE(tE.Reflect,"Reflect",!0),Jp.Object;var rE=Error,iE=mu("".replace),oE=String(rE("zxcasd").stack),aE=/\n\s*at [^:]*:[^\n]*/,cE=aE.test(oE),sE=ju,uE=Uf,lE=np,fE=hu,dE=!tu((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",fE(1,7)),7!==e.stack)})),hE=Jh,pE=Hu,vE=Vm,gE=Nb,yE=Ah,_E=Np,mE=Uf,bE=hu,EE=function(e,t){if(cE&&"string"==typeof e&&!rE.prepareStackTrace)for(;t--;)e=iE(e,aE,"");return e},IE=function(e,t){sE(t)&&"cause"in t&&uE(e,"cause",t.cause)},TE=mm,OE=function(e,t){return void 0===e?arguments.length<2?"":t:lE(e)},SE=dE,NE=Kl("toStringTag"),AE=Error,RE=[].push,wE=function(e,t){var n,r=arguments.length>2?arguments[2]:void 0,i=pE(CE,this);gE?n=gE(new AE,i?vE(this):CE):(n=i?this:_E(CE),mE(n,NE,"Error")),void 0!==t&&mE(n,"message",OE(t)),SE&&mE(n,"stack",EE(n.stack,1)),IE(n,r);var o=[];return TE(e,RE,{that:o}),mE(n,"errors",o),n};gE?gE(wE,AE):yE(wE,AE,{name:!0});var CE=wE.prototype=_E(AE.prototype,{constructor:bE(1,wE),message:bE(1,""),name:bE(1,"AggregateError")});hE({global:!0,constructor:!0,arity:2},{AggregateError:wE});var PE=Kl,kE=Np,ME=mf.f,DE=PE("unscopables"),LE=Array.prototype;null==LE[DE]&&ME(LE,DE,{configurable:!0,value:kE(null)});var jE,xE,UE,FE=tu,BE=Du,HE=Vm,GE=Gd,VE=Kl("iterator"),JE=!1;[].keys&&("next"in(UE=[].keys())?(xE=HE(HE(UE)))!==Object.prototype&&(jE=xE):JE=!0);var WE=null==jE||FE((function(){var e={};return jE[VE].call(e)!==e}));WE&&(jE={}),BE(jE[VE])||GE(jE,VE,(function(){return this}));var KE={IteratorPrototype:jE,BUGGY_SAFARI_ITERATORS:JE},YE=KE.IteratorPrototype,qE=Np,XE=hu,QE=nv,zE=G_,ZE=function(){return this},$E=Jh,eI=au,tI=Du,nI=function(e,t,n,r){var i=t+" Iterator";return e.prototype=qE(YE,{next:XE(+!r,n)}),QE(e,i,!1),zE[i]=ZE,e},rI=Vm,iI=Nb,oI=nv,aI=Uf,cI=Gd,sI=G_,uI=Wf.PROPER,lI=Wf.CONFIGURABLE,fI=KE.IteratorPrototype,dI=KE.BUGGY_SAFARI_ITERATORS,hI=Kl("iterator"),pI="keys",vI="values",gI="entries",yI=function(){return this},_I=function(e,t,n,r,i,o,a){nI(n,t,r);var c,s,u,l=function(e){if(e===i&&v)return v;if(!dI&&e in h)return h[e];switch(e){case pI:case vI:case gI:return function(){return new n(this,e)}}return function(){return new n(this)}},f=t+" Iterator",d=!1,h=e.prototype,p=h[hI]||h["@@iterator"]||i&&h[i],v=!dI&&p||l(i),g="Array"==t&&h.entries||p;if(g&&(c=rI(g.call(new e)))!==Object.prototype&&c.next&&(rI(c)!==fI&&(iI?iI(c,fI):tI(c[hI])||cI(c,hI,yI)),oI(c,f,!0)),uI&&i==vI&&p&&p.name!==vI&&(lI?aI(h,"name",vI):(d=!0,v=function(){return eI(p,this)})),i)if(s={values:l(vI),keys:o?v:l(pI),entries:l(gI)},a)for(u in s)(dI||d||!(u in h))&&cI(h,u,s[u]);else $E({target:t,proto:!0,forced:dI||d},s);return h[hI]!==v&&cI(h,hI,v,{name:i}),sI[t]=v,s},mI=Mu,bI=function(e){LE[DE][e]=!0},EI=G_,II=Sd,TI=mf.f,OI=_I,SI=nu,NI="Array Iterator",AI=II.set,RI=II.getterFor(NI);OI(Array,"Array",(function(e,t){AI(this,{type:NI,target:mI(e),index:0,kind:t})}),(function(){var e=RI(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");var wI=EI.Arguments=EI.Array;if(bI("keys"),bI("values"),bI("entries"),SI&&"values"!==wI.name)try{TI(wI,"name",{value:"values"})}catch(LN){}var CI,PI,kI,MI,DI="process"==Tu($s.process),LI=Bu,jI=mf,xI=nu,UI=Kl("species"),FI=Hu,BI=TypeError,HI=Iv,GI=al,VI=TypeError,JI=Of,WI=function(e){if(HI(e))return e;throw VI(GI(e)+" is not a constructor")},KI=Kl("species"),YI=function(e,t){var n,r=JI(e).constructor;return void 0===r||null==(n=JI(r)[KI])?t:WI(n)},qI=TypeError,XI=/(?:ipad|iphone|ipod).*applewebkit/i.test(Gu),QI=$s,zI=sy,ZI=av,$I=Du,eT=Cl,tT=tu,nT=pp,rT=uy,iT=cf,oT=function(e,t){if(e<t)throw qI("Not enough arguments");return e},aT=XI,cT=DI,sT=QI.setImmediate,uT=QI.clearImmediate,lT=QI.process,fT=QI.Dispatch,dT=QI.Function,hT=QI.MessageChannel,pT=QI.String,vT=0,gT={},yT="onreadystatechange";try{CI=QI.location}catch(LN){}var _T=function(e){if(eT(gT,e)){var t=gT[e];delete gT[e],t()}},mT=function(e){return function(){_T(e)}},bT=function(e){_T(e.data)},ET=function(e){QI.postMessage(pT(e),CI.protocol+"//"+CI.host)};sT&&uT||(sT=function(e){oT(arguments.length,1);var t=$I(e)?e:dT(e),n=rT(arguments,1);return gT[++vT]=function(){zI(t,void 0,n)},PI(vT),vT},uT=function(e){delete gT[e]},cT?PI=function(e){lT.nextTick(mT(e))}:fT&&fT.now?PI=function(e){fT.now(mT(e))}:hT&&!aT?(MI=(kI=new hT).port2,kI.port1.onmessage=bT,PI=ZI(MI.postMessage,MI)):QI.addEventListener&&$I(QI.postMessage)&&!QI.importScripts&&CI&&"file:"!==CI.protocol&&!tT(ET)?(PI=ET,QI.addEventListener("message",bT,!1)):PI=yT in iT("script")?function(e){nT.appendChild(iT("script")).onreadystatechange=function(){nT.removeChild(this),_T(e)}}:function(e){setTimeout(mT(e),0)});var IT,TT,OT,ST,NT,AT,RT,wT,CT={set:sT,clear:uT},PT=$s,kT=/ipad|iphone|ipod/i.test(Gu)&&void 0!==PT.Pebble,MT=/web0s(?!.*chrome)/i.test(Gu),DT=$s,LT=av,jT=eu.f,xT=CT.set,UT=XI,FT=kT,BT=MT,HT=DI,GT=DT.MutationObserver||DT.WebKitMutationObserver,VT=DT.document,JT=DT.process,WT=DT.Promise,KT=jT(DT,"queueMicrotask"),YT=KT&&KT.value;YT||(IT=function(){var e,t;for(HT&&(e=JT.domain)&&e.exit();TT;){t=TT.fn,TT=TT.next;try{t()}catch(e){throw TT?ST():OT=void 0,e}}OT=void 0,e&&e.enter()},UT||HT||BT||!GT||!VT?!FT&&WT&&WT.resolve?((RT=WT.resolve(void 0)).constructor=WT,wT=LT(RT.then,RT),ST=function(){wT(IT)}):HT?ST=function(){JT.nextTick(IT)}:(xT=LT(xT,DT),ST=function(){xT(IT)}):(NT=!0,AT=VT.createTextNode(""),new GT(IT).observe(AT,{characterData:!0}),ST=function(){AT.data=NT=!NT}));var qT=YT||function(e){var t={fn:e,next:void 0};OT&&(OT.next=t),TT||(TT=t,ST()),OT=t},XT=$s,QT=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},zT=function(){this.head=null,this.tail=null};zT.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var ZT=zT,$T=$s.Promise,eO="object"==typeof window&&"object"!=typeof Deno,tO=$s,nO=$T,rO=Du,iO=jh,oO=Zf,aO=Kl,cO=eO,sO=Xu;nO&&nO.prototype;var uO=aO("species"),lO=!1,fO=rO(tO.PromiseRejectionEvent),dO=iO("Promise",(function(){var e=oO(nO),t=e!==String(nO);if(!t&&66===sO)return!0;if(sO>=51&&/native code/.test(e))return!1;var n=new nO((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[uO]=r,!(lO=n.then((function(){}))instanceof r)||!t&&cO&&!fO})),hO={CONSTRUCTOR:dO,REJECTION_EVENT:fO,SUBCLASSING:lO},pO={},vO=ll,gO=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=vO(t),this.reject=vO(n)};pO.f=function(e){return new gO(e)};var yO,_O,mO,bO=Jh,EO=DI,IO=$s,TO=au,OO=Gd,SO=Nb,NO=nv,AO=function(e){var t=LI(e),n=jI.f;xI&&t&&!t[UI]&&n(t,UI,{configurable:!0,get:function(){return this}})},RO=ll,wO=Du,CO=ju,PO=function(e,t){if(FI(t,e))return e;throw BI("Incorrect invocation")},kO=YI,MO=CT.set,DO=qT,LO=function(e,t){var n=XT.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},jO=QT,xO=ZT,UO=Sd,FO=$T,BO=pO,HO="Promise",GO=hO.CONSTRUCTOR,VO=hO.REJECTION_EVENT,JO=hO.SUBCLASSING,WO=UO.getterFor(HO),KO=UO.set,YO=FO&&FO.prototype,qO=FO,XO=YO,QO=IO.TypeError,zO=IO.document,ZO=IO.process,$O=BO.f,eS=$O,tS=!!(zO&&zO.createEvent&&IO.dispatchEvent),nS="unhandledrejection",rS=function(e){var t;return!(!CO(e)||!wO(t=e.then))&&t},iS=function(e,t){var n,r,i,o=t.value,a=1==t.state,c=a?e.ok:e.fail,s=e.resolve,u=e.reject,l=e.domain;try{c?(a||(2===t.rejection&&uS(t),t.rejection=1),!0===c?n=o:(l&&l.enter(),n=c(o),l&&(l.exit(),i=!0)),n===e.promise?u(QO("Promise-chain cycle")):(r=rS(n))?TO(r,n,s,u):s(n)):u(o)}catch(e){l&&!i&&l.exit(),u(e)}},oS=function(e,t){e.notified||(e.notified=!0,DO((function(){for(var n,r=e.reactions;n=r.get();)iS(n,e);e.notified=!1,t&&!e.rejection&&cS(e)})))},aS=function(e,t,n){var r,i;tS?((r=zO.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),IO.dispatchEvent(r)):r={promise:t,reason:n},!VO&&(i=IO["on"+e])?i(r):e===nS&&LO("Unhandled promise rejection",n)},cS=function(e){TO(MO,IO,(function(){var t,n=e.facade,r=e.value;if(sS(e)&&(t=jO((function(){EO?ZO.emit("unhandledRejection",r,n):aS(nS,n,r)})),e.rejection=EO||sS(e)?2:1,t.error))throw t.value}))},sS=function(e){return 1!==e.rejection&&!e.parent},uS=function(e){TO(MO,IO,(function(){var t=e.facade;EO?ZO.emit("rejectionHandled",t):aS("rejectionhandled",t,e.value)}))},lS=function(e,t,n){return function(r){e(t,r,n)}},fS=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,oS(e,!0))},dS=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw QO("Promise can't be resolved itself");var r=rS(t);r?DO((function(){var n={done:!1};try{TO(r,t,lS(dS,n,e),lS(fS,n,e))}catch(t){fS(n,t,e)}})):(e.value=t,e.state=1,oS(e,!1))}catch(t){fS({done:!1},t,e)}}};if(GO&&(qO=function(e){PO(this,XO),RO(e),TO(yO,this);var t=WO(this);try{e(lS(dS,t),lS(fS,t))}catch(e){fS(t,e)}},XO=qO.prototype,(yO=function(e){KO(this,{type:HO,done:!1,notified:!1,parent:!1,reactions:new xO,rejection:!1,state:0,value:void 0})}).prototype=OO(XO,"then",(function(e,t){var n=WO(this),r=$O(kO(this,qO));return n.parent=!0,r.ok=!wO(e)||e,r.fail=wO(t)&&t,r.domain=EO?ZO.domain:void 0,0==n.state?n.reactions.add(r):DO((function(){iS(r,n)})),r.promise})),_O=function(){var e=new yO,t=WO(e);this.promise=e,this.resolve=lS(dS,t),this.reject=lS(fS,t)},BO.f=$O=function(e){return e===qO||undefined===e?new _O(e):eS(e)},wO(FO)&&YO!==Object.prototype)){mO=YO.then,JO||OO(YO,"then",(function(e,t){var n=this;return new qO((function(e,t){TO(mO,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete YO.constructor}catch(LN){}SO&&SO(YO,XO)}bO({global:!0,constructor:!0,wrap:!0,forced:GO},{Promise:qO}),NO(qO,HO,!1),AO(HO);var hS=Kl("iterator"),pS=!1;try{var vS=0,gS={next:function(){return{done:!!vS++}},return:function(){pS=!0}};gS[hS]=function(){return this},Array.from(gS,(function(){throw 2}))}catch(LN){}var yS=$T,_S=function(e,t){if(!t&&!pS)return!1;var n=!1;try{var r={};r[hS]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},mS=hO.CONSTRUCTOR||!_S((function(e){yS.all(e).then(void 0,(function(){}))})),bS=au,ES=ll,IS=pO,TS=QT,OS=mm;Jh({target:"Promise",stat:!0,forced:mS},{all:function(e){var t=this,n=IS.f(t),r=n.resolve,i=n.reject,o=TS((function(){var n=ES(t.resolve),o=[],a=0,c=1;OS(e,(function(e){var s=a++,u=!1;c++,bS(n,t,e).then((function(e){u||(u=!0,o[s]=e,--c||r(o))}),i)})),--c||r(o)}));return o.error&&i(o.value),n.promise}});var SS=Jh,NS=hO.CONSTRUCTOR,AS=$T,RS=Bu,wS=Du,CS=Gd,PS=AS&&AS.prototype;if(SS({target:"Promise",proto:!0,forced:NS,real:!0},{catch:function(e){return this.then(void 0,e)}}),wS(AS)){var kS=RS("Promise").prototype.catch;PS.catch!==kS&&CS(PS,"catch",kS,{unsafe:!0})}var MS=au,DS=ll,LS=pO,jS=QT,xS=mm;Jh({target:"Promise",stat:!0,forced:mS},{race:function(e){var t=this,n=LS.f(t),r=n.reject,i=jS((function(){var i=DS(t.resolve);xS(e,(function(e){MS(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var US=au,FS=pO;Jh({target:"Promise",stat:!0,forced:hO.CONSTRUCTOR},{reject:function(e){var t=FS.f(this);return US(t.reject,void 0,e),t.promise}});var BS=Of,HS=ju,GS=pO,VS=function(e,t){if(BS(e),HS(t)&&t.constructor===e)return t;var n=GS.f(e);return(0,n.resolve)(t),n.promise},JS=Jh,WS=hO.CONSTRUCTOR,KS=VS;Bu("Promise"),JS({target:"Promise",stat:!0,forced:WS},{resolve:function(e){return KS(this,e)}});var YS=au,qS=ll,XS=pO,QS=QT,zS=mm;Jh({target:"Promise",stat:!0},{allSettled:function(e){var t=this,n=XS.f(t),r=n.resolve,i=n.reject,o=QS((function(){var n=qS(t.resolve),i=[],o=0,a=1;zS(e,(function(e){var c=o++,s=!1;a++,YS(n,t,e).then((function(e){s||(s=!0,i[c]={status:"fulfilled",value:e},--a||r(i))}),(function(e){s||(s=!0,i[c]={status:"rejected",reason:e},--a||r(i))}))})),--a||r(i)}));return o.error&&i(o.value),n.promise}});var ZS=au,$S=ll,eN=Bu,tN=pO,nN=QT,rN=mm,iN="No one promise resolved";Jh({target:"Promise",stat:!0},{any:function(e){var t=this,n=eN("AggregateError"),r=tN.f(t),i=r.resolve,o=r.reject,a=nN((function(){var r=$S(t.resolve),a=[],c=0,s=1,u=!1;rN(e,(function(e){var l=c++,f=!1;s++,ZS(r,t,e).then((function(e){f||u||(u=!0,i(e))}),(function(e){f||u||(f=!0,a[l]=e,--s||o(new n(a,iN)))}))})),--s||o(new n(a,iN))}));return a.error&&o(a.value),r.promise}});var oN=Jh,aN=$T,cN=tu,sN=Bu,uN=Du,lN=YI,fN=VS,dN=Gd,hN=aN&&aN.prototype;if(oN({target:"Promise",proto:!0,real:!0,forced:!!aN&&cN((function(){hN.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=lN(this,sN("Promise")),n=uN(e);return this.then(n?function(n){return fN(t,e()).then((function(){return n}))}:e,n?function(n){return fN(t,e()).then((function(){throw n}))}:e)}}),uN(aN)){var pN=sN("Promise").prototype.finally;hN.finally!==pN&&dN(hN,"finally",pN,{unsafe:!0})}var vN=mu,gN=Yd,yN=np,_N=Cu,mN=vN("".charAt),bN=vN("".charCodeAt),EN=vN("".slice),IN=function(e){return function(t,n){var r,i,o=yN(_N(t)),a=gN(n),c=o.length;return a<0||a>=c?e?"":void 0:(r=bN(o,a))<55296||r>56319||a+1===c||(i=bN(o,a+1))<56320||i>57343?e?mN(o,a):r:e?EN(o,a,a+2):i-56320+(r-55296<<10)+65536}},TN={codeAt:IN(!1),charAt:IN(!0)}.charAt,ON=np,SN=Sd,NN=_I,AN="String Iterator",RN=SN.set,wN=SN.getterFor(AN);NN(String,"String",(function(e){RN(this,{type:AN,string:ON(e),index:0})}),(function(){var e,t=wN(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=TN(n,r),t.index+=e.length,{value:e,done:!1})})),Jp.Promise,function(){if("undefined"!=typeof window)try{var e=new window.CustomEvent("test",{cancelable:!0});if(e.preventDefault(),!0!==e.defaultPrevented)throw new Error("Could not prevent default")}catch(e){var t=function(e,t){var n,r;return(t=t||{}).bubbles=!!t.bubbles,t.cancelable=!!t.cancelable,(n=document.createEvent("CustomEvent")).initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r=n.preventDefault,n.preventDefault=function(){r.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(e){this.defaultPrevented=!0}},n};t.prototype=window.Event.prototype,window.CustomEvent=t}}(),function(){if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var e=window.document;n.prototype.THROTTLE_TIMEOUT=100,n.prototype.POLL_INTERVAL=null,n.prototype.USE_MUTATION_OBSERVER=!0,n.prototype.observe=function(e){if(!this._observationTargets.some((function(t){return t.element==e}))){if(!e||1!=e.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},n.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter((function(t){return t.element!=e})),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},n.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},n.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},n.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter((function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]}))},n.prototype._parseRootMargin=function(e){var t=(e||"0px").split(/\s+/).map((function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}}));return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},n.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(r(window,"resize",this._checkForIntersections,!0),r(e,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in window&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},n.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,i(window,"resize",this._checkForIntersections,!0),i(e,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},n.prototype._checkForIntersections=function(){var e=this._rootIsInDom(),n=e?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach((function(r){var i=r.element,a=o(i),c=this._rootContainsTarget(i),s=r.entry,u=e&&c&&this._computeTargetAndRootIntersection(i,n),l=r.entry=new t({time:window.performance&&performance.now&&performance.now(),target:i,boundingClientRect:a,rootBounds:n,intersectionRect:u});s?e&&c?this._hasCrossedThreshold(s,l)&&this._queuedEntries.push(l):s&&s.isIntersecting&&this._queuedEntries.push(l):this._queuedEntries.push(l)}),this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},n.prototype._computeTargetAndRootIntersection=function(t,n){if("none"!=window.getComputedStyle(t).display){for(var r,i,a,s,u,l,f,d,h=o(t),p=c(t),v=!1;!v;){var g=null,y=1==p.nodeType?window.getComputedStyle(p):{};if("none"==y.display)return;if(p==this.root||p==e?(v=!0,g=n):p!=e.body&&p!=e.documentElement&&"visible"!=y.overflow&&(g=o(p)),g&&(r=g,i=h,a=void 0,s=void 0,u=void 0,l=void 0,f=void 0,d=void 0,a=Math.max(r.top,i.top),s=Math.min(r.bottom,i.bottom),u=Math.max(r.left,i.left),l=Math.min(r.right,i.right),d=s-a,!(h=(f=l-u)>=0&&d>=0&&{top:a,bottom:s,left:u,right:l,width:f,height:d})))break;p=c(p)}return h}},n.prototype._getRootRect=function(){var t;if(this.root)t=o(this.root);else{var n=e.documentElement,r=e.body;t={top:0,left:0,right:n.clientWidth||r.clientWidth,width:n.clientWidth||r.clientWidth,bottom:n.clientHeight||r.clientHeight,height:n.clientHeight||r.clientHeight}}return this._expandRectByRootMargin(t)},n.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map((function(t,n){return"px"==t.unit?t.value:t.value*(n%2?e.width:e.height)/100})),n={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},n.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,r=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==r)for(var i=0;i<this.thresholds.length;i++){var o=this.thresholds[i];if(o==n||o==r||o<n!=o<r)return!0}},n.prototype._rootIsInDom=function(){return!this.root||a(e,this.root)},n.prototype._rootContainsTarget=function(t){return a(this.root||e,t)},n.prototype._registerInstance=function(){},n.prototype._unregisterInstance=function(){},window.IntersectionObserver=n,window.IntersectionObserverEntry=t}function t(e){this.time=e.time,this.target=e.target,this.rootBounds=e.rootBounds,this.boundingClientRect=e.boundingClientRect,this.intersectionRect=e.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0},this.isIntersecting=!!e.intersectionRect;var t=this.boundingClientRect,n=t.width*t.height,r=this.intersectionRect,i=r.width*r.height;this.intersectionRatio=n?Number((i/n).toFixed(4)):this.isIntersecting?1:0}function n(e,t){var n,r,i,o=t||{};if("function"!=typeof e)throw new Error("callback must be a function");if(o.root&&1!=o.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),r=this.THROTTLE_TIMEOUT,i=null,function(){i||(i=setTimeout((function(){n(),i=null}),r))}),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(o.rootMargin),this.thresholds=this._initThresholds(o.threshold),this.root=o.root||null,this.rootMargin=this._rootMarginValues.map((function(e){return e.value+e.unit})).join(" ")}function r(e,t,n,r){"function"==typeof e.addEventListener?e.addEventListener(t,n,r||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,n)}function i(e,t,n,r){"function"==typeof e.removeEventListener?e.removeEventListener(t,n,r||!1):"function"==typeof e.detatchEvent&&e.detatchEvent("on"+t,n)}function o(e){var t;try{t=e.getBoundingClientRect()}catch(e){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function a(e,t){for(var n=t;n;){if(n==e)return!0;n=c(n)}return!1}function c(e){var t=e.parentNode;return t&&11==t.nodeType&&t.host?t.host:t&&t.assignedSlot?t.assignedSlot.parentNode:t}}();var CN;!function(e){e.LOAD_START="load_start",e.LOAD_END="load_end",e.BEFORE_INIT="before_init",e.INIT_START="init_start",e.INIT_END="init_end",e.JSB_INIT_START="jsb_init_start",e.JSB_INIT_END="jsb_init_end",e.BEFORE_AD_INFO_INIT_START="before_ad_info_init_start",e.AD_INFO_INIT_START="ad_info_init_start",e.AD_INFO_INIT_END="ad_info_init_end",e.IDENTIFY_INIT_START="identify_init_start",e.IDENTIFY_INIT_END="identify_init_end",e.PLUGIN_INIT_START="_init_start",e.PLUGIN_INIT_END="_init_end",e.PIXEL_SEND="pixel_send",e.PIXEL_SEND_PCM="pixel_send_PCM",e.JSB_SEND="jsb_send",e.HTTP_SEND="http_send",e.HANDLE_CACHE="handle_cache",e.INIT_ERROR="init_error",e.PIXEL_EMPTY="pixel_empty",e.JSB_ERROR="jsb_error",e.API_ERROR="api_error",e.PLUGIN_ERROR="plugin_error",e.CUSTOM_INFO="custom_info",e.CUSTOM_ERROR="custom_error"}(CN||(CN={}));var PN=function(){return"object"===("undefined"==typeof window?"undefined":t(window))&&window["object"===("undefined"==typeof window?"undefined":t(window))&&window.TiktokAnalyticsObject||"ttq"]},kN=["input[type='button']","input[type='image']","input[type='submit']","button","[class*=btn]","[class*=Btn]","[class*=button]","[class*=Button]","[role*=button]","[id*=btn]","[id*=Btn]","[id*=button]","[id*=Button]","a"],MN=["[href^='tel:']","[href^='callto:']","[href^='sms:']","[href^='skype:']","[href^='whatsapp:']","[href^='mailto:']"],DN=function(e){var t=kN.some((function(t){return e.matches(t)})),n=MN.some((function(t){return e.matches(t)}));return t&&!n};function LN(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];try{var i=PN(),o=i.getPlugin&&i.getPlugin("Monitor")||null;o&&o.error&&"function"==typeof o.error&&o.error.call(o,e,t,n,r)}catch(e){}}var jN,xN=["","webkit","Moz","MS","ms","o"],UN=window,FN=void 0!==function(e,t){var n,r,i=t[0].toUpperCase()+t.slice(1),o=0;for(;o<xN.length;){if((r=(n=xN[o])?n+i:t)in e)return e[r];o++}return}(UN,"PointerEvent"),BN="ontouchstart"in UN;!function(e){e[e.Default=0]="Default",e[e.Start=1]="Start",e[e.Move=2]="Move",e[e.End=4]="End",e[e.Cancle=8]="Cancle"}(jN||(jN={}));var HN={pointer:{events:["pointerdown","pointermove","pointerup","pointercancel"],handler:function(e){var t=e.type,n={status:jN.Default,timestamp:Date.now(),position:[e.clientX,e.clientY]};return t!==this.events[0]||0!==e.button&&"touch"!==e.pointerType?t===this.events[1]?n.status=jN.Move:t===this.events[2]?n.status=jN.End:t===this.events[3]&&(n.status=jN.Cancle):n.status=jN.Start,n}},touch:{events:["touchstart","touchmove","touchend","touchcancel"],handler:function(e){var t=e.type;if(1!==e.changedTouches.length)return null;var n={status:jN.Default,timestamp:Date.now(),position:[e.changedTouches[0].clientX,e.changedTouches[0].clientY]};return t===this.events[0]?n.status=jN.Start:t===this.events[1]?n.status=jN.Move:t===this.events[2]?n.status=jN.End:t===this.events[3]&&(n.status=jN.Cancle),n.status===jN.Default?null:n}},mouse:{events:["mousedown","mousemove","mouseup"],handler:function(e){var t=e.type,n={status:jN.Default,timestamp:Date.now(),position:[e.clientX,e.clientY]};return t===this.events[0]&&0===e.button?n.status=jN.Start:t===this.events[1]?n.status=jN.Move:t===this.events[2]&&(n.status=jN.End),n.status&jN.Move&&1!==e.which&&(n.status=jN.End),n.status===jN.Default?null:n}}};"MSPointerEvent"in UN&&!("PointerEvent"in UN)&&(HN.pointer.events=["MSPointerDown","MSPointerMove","MSPointerUp","MSPointerCancel"]);var GN=250,VN=9;function JN(e,t,n){for(var r=0;r<e.length;r++)document.addEventListener(e[r],t,n)}var WN=function(e,t){var n=function(t){var n,r,i;return function(o){var a=HN[t].handler(o);if(null!==a){if(a.status&jN.Start)return n=jN.Start,r=a.timestamp,void(i=a.position);if(a.status&jN.End)n&jN.Start&&a.timestamp-r<GN&&Math.sqrt(Math.pow(a.position[0]-i[0],2)+Math.pow(a.position[1]-i[1],2))<VN&&e(o);else if(a.status&jN.Move&&n&jN.Start)return}n=0,r=0,i=[0,0]}};FN?JN(HN.pointer.events,n("pointer"),t):BN?JN(HN.touch.events,n("touch"),t):JN(HN.mouse.events,n("mouse"),t)},KN=function(e,t,n){var r=document.querySelectorAll(t);for(var i in r)if(n){if(Object.is(i,e))return!0}else if(!Object.is(i,e))return!0;return!1},YN=function(e){var t=document.createRange(),n=document.body?document.body:document.head;t.selectNode(n);var r=t.createContextualFragment(e);n.appendChild(r)},qN=function(e,t,n){var r=function(){var e={},t=new Promise((function(t,n){e.resolve=t,e.reject=n}));return e.promise=t,e}(),i=new IntersectionObserver((function(e){e.forEach((function(e){if(e.isIntersecting){var i={result:e.isIntersecting,curValue:t,condition:n};r.resolve(i)}}))}),{root:null,rootMargin:"0px",threshold:.5});return i.observe(e),r.promise};function XN(e,t){var n=history[e],r="".concat(e,"-").concat(t);return function(){n.apply(history,arguments);var e=new CustomEvent(r,{detail:arguments});window.dispatchEvent(e)}}var QN=function(e){history.pushState=XN("pushState",e),history.replaceState=XN("replaceState",e)},zN=function(e,t){var n=e.getComputedStyle(t);return"none"!==n.display&&("visible"===n.visibility&&!(Number(n.opacity)<.1))},ZN=function(e){var t=e;if("string"==typeof e)try{t=decodeURI(e)}catch(n){t=e}return t},$N=function(e,t){try{var n=new URL(e);return n.searchParams.delete(t),n.toString()}catch(t){return e}},eA='"pixelMethod":"standard"',tA=function(e,t){try{var n=e.split(eA),r="";return t&&(r+=',"is_button":"true"'),r?n[0]+eA+r+n[1]:e}catch(t){return e}},nA=function(e){try{var t=e.split(eA);return t[0]+eA+',"is_standard_mode":"1"'+t[1]}catch(t){return e}};String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{value:function(e,t){return t=!t||t<0?0:+t,this.substring(t,t+e.length)===e}}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){return(void 0===t||t>this.length)&&(t=this.length),this.substring(t-e.length,t)===e});var rA=function(e,t,n,r){switch(t){case"EQUALS":if("ELEMENT"==r)try{for(var i=document.querySelectorAll(n),o=Array.prototype.slice.call(i),a=0;a<o.length;a++)if(o[a].contains(e))return!0}catch(e){return!1}if(n.split(";").filter((function(t){return e==t})).length>0)return!0;break;case"LT":if(e<n)return!0;break;case"GT":if(e>n)return!0;break;case"LT_OR_EQUAL":if(e<=n)return!0;break;case"GT_OR_EQUAL":if(e>=n)return!0;break;case"CONTAINS":if(n.split(";").filter((function(t){return e.indexOf(t)>-1})).length>0)return!0;break;case"DOES_NOT_EQUAL":if(0==n.split(";").filter((function(t){return e==t})).length)return!0;break;case"DOES_NOT_CONTAIN":if(-1==e.indexOf(n))return!0;break;case"STARTS_WITH":if(e.startsWith(n))return!0;break;case"ENDS_WITH":if(e.endsWith(n))return!0;break;case"MATCHES_REGEX":if(n.test(e))return!0;break;case"MATCHES_REGEX_IGNORE_CASE":if(!n.test(e))return!0;break;case"MATCHES_CSS_SELECTOR":if(KN(e,n,!0))return!0;break;case"DOSE_NOT_MATCHES_CSS_SELECTOR":if(KN(e,n,!1))return!0}return!1},iA={click:["ELEMENT","ELEMENT_CLASSES","ELEMENT_ID","ELEMENT_TARGET","ElEMENT_URL","ELEMENT_TEXT"],pageview:["PAGE_URL","PAGE_HOSTNAME","PAGE_PATH","REFERRER"],visibility:["ELEMENT","ELEMENT_CLASSES","ELEMENT_ID"],history_change:["NEW_HISTORY_FRAGMENT","OLD_HISTORY_FRAGMENT","NEW_HISTORY_STATE","OLD_HISTORY_STATE","HISTORY_SOURCE"]},oA="ttclid",aA=function(){function e(){i(this,e)}return a(e,[{key:"dispatcher",value:function(e,t,n,r){var i,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:document,a=t.variable_type,c=N("visibility"==e?["pageview","history_change","visibility"]:["pageview","history_change","click"]);try{for(c.s();!(i=c.n()).done;){var s=i.value;if(iA[s].indexOf(a)>-1){var u=void 0;switch(s){case"click":u=this.click(a,n);break;case"pageview":u=this.pageview(a);break;case"history_change":u=this.history_change(a,n,r);break;case"visibility":u=this.visibility(a,t.value,o)}return u}}}catch(e){c.e(e)}finally{c.f()}}},{key:"click",value:function(e,t){var n;if(!t)return!1;switch(e){case"ELEMENT":case"ELEMENT_TARGET":n=t.target;break;case"ELEMENT_CLASSES":n=t.target.className;break;case"ELEMENT_ID":n=t.target.id;break;case"ElEMENT_URL":n=t.target.href||t.target.src||"";break;case"ELEMENT_TEXT":n=t.target.text||"";break;default:n=null}return n}},{key:"pageview",value:function(e){var t;switch(e){case"PAGE_URL":t=$N(location.href,oA);break;case"PAGE_HOSTNAME":t=location.hostname;break;case"PAGE_PATH":t=location.pathname;break;case"REFERRER":t=$N(document.referrer,oA);break;default:t=null}return t}},{key:"history_change",value:function(e,t,n){var r;switch(e){case"NEW_HISTORY_FRAGMENT":r=location.hash;break;case"OLD_HISTORY_FRAGMENT":r=n.old_hash;break;case"NEW_HISTORY_STATE":r=history.state;break;case"OLD_HISTORY_STATE":r=n.old_state;break;case"HISTORY_SOURCE":r=t.type;break;default:r=null}return r}},{key:"visibility",value:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;switch(e){case"ELEMENT_ID":n="#"+t;break;case"ELEMENT_CLASS":n="."+t;break;case"ELEMENT":n=t;break;default:n=null}return r.querySelector(n)}}]),e}(),cA={exports:{}};!function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}}(cA);var sA,uA,lA=cA.exports,fA=function(e){s(n,e);var t=v(n);function n(e,r){var o;return i(this,n),(o=t.call(this)).BaseConf=e,o.SDK_ID=r,o.BaseConf.forEach((function(e){e.id=e.code_id,e.conditions=e.conditions||[],e.conditions.forEach((function(e){e.result=!1}))})),o}return a(n,[{key:"sendDebugEvent",value:function(e,t,n){var r=this.BaseConf,i=[];r.forEach((function(e){e.code_id==t&&(e.conditions=n),i.push(e)}));var o={sdk_id:this.SDK_ID,event_name:e,data:i};this.emit("jelly_message",o)}}]),n}(lA);!function(e){e[e.WRONG=-1]="WRONG",e[e.KEEP=0]="KEEP",e[e.ARRAY=-2]="ARRAY",e[e.TURNINTOINTEGER=1]="TURNINTOINTEGER",e[e.TURNINTODECIMAL=2]="TURNINTODECIMAL"}(sA||(sA={})),function(e){e[e.CLICK_EVENT=0]="CLICK_EVENT",e[e.DESTINATION_URL=1]="DESTINATION_URL"}(uA||(uA={}));var dA,hA=function(e){var t,n={};try{if(e.currency&&(n.currency=e.currency),e.value){document.querySelectorAll(e.value).length;var r=document.querySelector(e.value);(null==r?void 0:r.innerHTML)&&(n.ori_value=r.innerHTML,n.value=pA(null===(t=r.innerHTML)||void 0===t?void 0:t.trim(),e.value_index,e.value_parsing_method))}if(e.contents&&void 0!==e.contents[0].content_type&&(1===e.contents[0].content_type&&(n.content_type="product"),2===e.contents[0].content_type&&(n.content_type="product_group")),e.contents&&e.contents[0].content_name){var i=document.querySelector(e.contents[0].content_name);n.content_name=null==i?void 0:i.innerHTML}if(e.contents&&e.contents[0].content_id)if(e.contents[0].content_from===uA.CLICK_EVENT){var o=document.querySelector(e.contents[0].content_id);n.content_id=null==o?void 0:o.innerHTML}else if(e.contents[0].content_from===uA.DESTINATION_URL){var a=new URL(location.href);if(e.contents[0].content_id.startsWith("path")){var c=a.pathname.split("/"),s=e.contents[0].content_id.split("|")[1];n.content_id=c[s]}if(e.contents[0].content_id.startsWith("search")){var u=new URLSearchParams(a.search),l=e.contents[0].content_id.split("|")[1];n.content_id=u.get(l)}}return n}catch(e){return n}},pA=function(e,t,n){var r="";if(-1===t||void 0===t){var i=gA(e)[0];r=void 0!==i?vA(i,n):""}else{var o=gA(e)[t];r=void 0!==o?vA(o,n):""}return r},vA=function(e,t){var n="";if(t!==sA.KEEP&&t!==sA.WRONG||(n=e),t===sA.TURNINTOINTEGER&&(n=e.replace(/[,\.]/g,"")),t===sA.TURNINTODECIMAL){var r=e.split(/[,\.]/g),i="";r.forEach((function(e,t){t<r.length-1?i+=e:i+="."+e})),n=i}return n},gA=function(e){for(var t,n=/[\d|\.|,]+/gm,r=[];null!==(t=n.exec(e));)t.index===n.lastIndex&&n.lastIndex++,t.forEach((function(e){r.push(e)}));return r},yA=function(e,t,n){try{var r=e.split(eA),i="";return Object.keys(t).forEach((function(e){null===t[e]&&void 0===t[e]||(i+=',"'+e+'":"'+("value"!==e?encodeURIComponent(t[e]):t[e])+'"')})),n&&(i+=',"dynamic_parameter_config":'+JSON.stringify(n)),i?r[0]+eA+i+r[1]:e}catch(t){return e}},_A=new aA,mA=function(e){s(n,e);var t=v(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this)).on("jelly_message",a),c.SendEvent=new fA(r,o),c.SendEvent.on("jelly_message",(function(e){c.emit("jelly_message",e)})),c.CLICK=e.CLICK||[],c.PAGEVIEW=e.PAGEVIEW||[],c.VISIBILITY=e.VISIBILITY||[],c.HISTORY_CHANGE=e.HISTORY_CHANGE||[],c.SDK_ID=o||"",c.click(),c.pageview(),c.visibility(),c}return a(n,[{key:"dispatcher",value:function(e,t,n,r){if(t){var i,o=N(t);try{for(o.s();!(i=o.n()).done;){var a,c=i.value,s=[],u=N(c.conditions);try{for(u.s();!(a=u.n()).done;){var l=a.value,f=_A.dispatcher(e,l,n,r),d=rA(f,l.operator,l.value,l.variable_type);if("history_change"!==e&&"pageview"!==e||(d=d||rA(ZN(f),l.operator,l.value,l.variable_type)),d){var h=!1;try{h="ELEMENT"===(null==l?void 0:l.variable_type)&&DN(f)}catch(e){h=!1,LN(CN.CUSTOM_ERROR,e,{custom_name:"button_check_jelly_error",custom_enum:"auto_click",extJSON:{element:f}})}var p=tA(c.code,h);if(p=nA(p),l.dynamic_parameter)try{var v=hA(l.dynamic_parameter),g=yA(p,v,l.dynamic_parameter);YN(g)}catch(e){YN(p)}else YN(p);this.SendEvent.sendDebugEvent("jelly."+e,c.code_id,s)}s.push(Object.assign(l,{cur_value:f,result:d}))}}catch(e){u.e(e)}finally{u.f()}}}catch(e){o.e(e)}finally{o.f()}}}},{key:"click",value:function(){var e=this;WN((function(t){e.dispatcher("click",e.CLICK,t)}),!0)}},{key:"pageview",value:function(){this.dispatcher("pageview",this.PAGEVIEW),this.history_change(this.PAGEVIEW)}},{key:"history_change",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.HISTORY_CHANGE,t=this,n=history.state,r=location.hash,i=location.href;QN(this.SDK_ID),window.addEventListener("pushState-".concat(this.SDK_ID),(function(r){if(location.href!=i){var o={old_state:n};t.dispatcher("history_change",e,r,o),n=history.state,i=location.href}})),window.addEventListener("replaceState-".concat(this.SDK_ID),(function(){if(location.href!=i){var r={old_state:n};t.dispatcher("history_change",e,r),n=history.state,i=location.href}})),window.addEventListener("popstate",(function(n){if(location.href!=i){var o={old_hash:r};t.dispatcher("history_change",e,n,o),r=location.hash,i=location.href}}))}},{key:"visibility",value:function(){if(!(this.VISIBILITY.length<1)){var e=this.VISIBILITY,t=this.SendEvent.sendDebugEvent.bind(this.SendEvent);new MutationObserver(bA(e,t,window)).observe(document,{childList:!0,characterData:!0,subtree:!0,attributes:!0});for(var n=document.getElementsByTagName("iframe"),r=0;r<n.length;r++)try{var i=n[r].contentWindow;if(null!=i)new MutationObserver(bA(e,t,i)).observe(i.document,{childList:!0,characterData:!0,subtree:!0,attributes:!0})}catch(e){}}}}]),n}(lA),bA=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window,r={};return function(){e.forEach((function(e){var i=!0,o=[],a=[];e.conditions.forEach((function(e){if(iA.visibility.indexOf(e.variable_type)>-1){var t=_A.dispatcher("visibility",e,null,null,n.document),c="_"+e.value;t&&zN(n,t)&&!r[c]&&(o.push(qN(t,"",e)),r[c]=!0)}else{var s=_A.dispatcher("visibility",e),u=rA(s,e.operator,e.value,e.variable_type);u||(i=!1),a.push(Object.assign(e,{cur_value:s,result:u}))}})),o.length>0&&Promise.all(o).then((function(n){var r,o=!0,c=N(n);try{for(c.s();!(r=c.n()).done;){var s=r.value;a.push(Object.assign(s.condition,{cur_value:s.curValue,result:s.result})),s.result&&i||(o=!1)}}catch(e){c.e(e)}finally{c.f()}o&&YN(e.code),t("jelly.visibility",e.code_id,a)}),(function(){}))}))}},EA=function(e){s(n,e);var t=v(n);function n(e,r){var o;if(i(this,n),(o=t.call(this)).BaseConf=r,o.SDK_ID=e,window.jelly_tool_events&&window.jelly_tool_events.length&&window.jelly_tool_events.forEach((function(e){o.on(e.name,e.callback)})),o.emit("jelly_event",{SDK_ID:e,BaseConf:r||[]}),o.BaseConf instanceof Array){if(self._jelly_sdks=self._jelly_sdks||{},self._jelly_sdks[e])return p(o);self._jelly_sdks[e]=!0;var a=o.dispatch();o.trigger=new mA(a,r,e,(function(e){o.emit("jelly_message",e)}))}return o}return a(n,[{key:"dispatch",value:function(){var e={CLICK:[],PAGEVIEW:[],VISIBILITY:[],HISTORY_CHANGE:[]};return this.BaseConf.forEach((function(t){var n={code_id:t.code_id,code:t.code,conditions:t.conditions||[]};void 0!==t.trigger_type&&e[t.trigger_type]&&e[t.trigger_type].push(n)})),e}}]),n}(lA);window.TiktokJelly=EA;var IA=Hr();function TA(){var e=window[IA];return e&&e._i||{}}function OA(e){var t=window[IA],n=Ni().pixelCode,r=void 0===n?"":n;["instance","instances","usePlugin","loadPixel","enableCookie","disableCookie","holdConsent","revokeConsent","grantConsent"].forEach((function(n){Object.defineProperty(t,n,{get:function(){return function(){try{var t=Array.prototype.slice.call(arguments);return setTimeout((function(){Ti(Er.CUSTOM_INFO,{pixelCode:r,custom_name:n,custom_enum:JSON.stringify(t)})})),e[n].apply(e,t)}catch(e){return Oi(Er.API_ERROR,e,{extJSON:{api:n}}),{}}}},set:function(){}})})),["page","track","identify"].forEach((function(n){Object.defineProperty(t,n,{get:function(){return function(){try{var t=1===arguments.length&&void 0===arguments[0]?[]:Array.prototype.slice.call(arguments);return setTimeout((function(){var e=JSON.stringify(t.map((function(e){return tr(e)?Object.keys(e):e})));Ti(Er.CUSTOM_INFO,{pixelCode:r,custom_name:n,custom_enum:e})})),ho(n,t),e[n].apply(e,t)}catch(e){return Oi(Er.API_ERROR,e,{extJSON:{api:n}}),{}}}},set:function(){}})})),window[IA]._mounted=!0,function(e){Br=e}(window[IA])}function SA(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zs;null==e||e.resetCookieExpires();var n=window[IA],r=TA();if(Object.entries(r).forEach((function(n){var r=_(n,2),i=r[0],o=r[1];if(!o._init&&("Tealium"===qr()||Wr()||o.info))if(e.getReporter(i))Si(Ir.DUPLICATE_PIXEL_CODE);else if(t({id:i,type:_o.PIXEL_CODE,info:o.info,options:o.options,rules:o.rules,plugins:o.plugins}),o._init=!0,o.length>0)for(;o.length;){var a=o.shift();if(a){var c=m(a),s=c[0],u=c.slice(1),l=e.instance(i);if(l)switch(s){case"identify":e.identify(u[0],u[1]);break;case"page":e.page(u[0]);break;case"track":l.track(u[0],u[1],u[2]||{});break;default:l[s]?l[s](u[0],u[1],u[2]||{}):Oi(Er.CUSTOM_ERROR,new Error("action not find: ".concat(l[s])))}}}})),n.length>0)for(;n.length;){var i=n.shift();if(i){var o=m(i),a=o[0],c=o.slice(1);switch("Tealium"!==qr()&&ho(a,c),a){case"identify":e.identify(c[0],c[1]);break;case"page":e.page(c[0]);break;case"track":e.track(c[0],c[1],c[2]||{});break;case"enableCookie":e.enableCookie();break;case"disableCookie":e.disableCookie();break;case"holdConsent":e.holdConsent();break;case"revokeConsent":e.revokeConsent();break;case"grantConsent":e.grantConsent()}}}}try{!function(){var e,t=Ni().pixelCode,n=Hr(),r=Gr(),i=li(),o=fi();if(yo(),Object._ttq_keys=function(e){try{return Array.isArray(e)?Object.keys(e).filter((function(e){return-1===["each","eachSlice","all","any","collect","detect","findAll","grep","include","inGroupsOf","inject","invoke","max","min","partition","pluck","reject","sortBy","toArray","zip","size","inspect","select","member","_reverse","_each","clear","first","last","compact","flatten","without","uniq","intersect","clone","toJSON"].indexOf(e)})):Object.keys(e)}catch(t){return Object.keys(e)}},function(e,t,n){Ys(e,n),qs(e),Xs(e),Qs(e)}(r,0,i),null===(e=null==r?void 0:r._plugins)||void 0===e?void 0:e.Monitor){var a=function(){try{return Ls.get(br.MONITOR_PLUGIN)||null}catch(e){return null}}();null==a||a.info(Er.BEFORE_INIT,{pixelCode:t})}if(r){r._mounted?(Ti(Er.HANDLE_CACHE,{pixelCode:t}),SA(r)):(dA=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:or.OFFSITE;return xs.toConstantValue(e),Us.toConstantValue(t),Ls.get(br.TTQ)}(i,o),window[n]=function(e,t){return["getReporter","getPlugin","resetCookieExpires"].forEach((function(n){e[n]=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return t[n].apply(t,r)}})),e.context=t.context,e.reporters=t.reporters,e}(r,dA),SA(dA),OA(dA));var c=Ls.get(uo.IsOnsitePage);c.value=o===or.ONSITE||r.instances().every((function(e){return e.isOnsite()})),Ls.rebind(uo.IsOnsitePage).toConstantValue(c),function(e){e.instances().forEach((function(e){e.rules&&new EA(e.getReporterId(),e.rules)}))}(r)}}()}catch(Cs){Oi(Er.INIT_ERROR,Cs)}}();
