!function(){"use strict";function t(){t=function(){return e};var e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new I(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return T()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=g(a,r);if(c){if(c===s)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var s={};function p(){}function h(){}function y(){}var d={};u(d,i,(function(){return this}));var _=Object.getPrototypeOf,v=_&&_(_(S([])));v&&v!==r&&n.call(v,i)&&(d=v);var m=y.prototype=p.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==typeof s&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function g(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,g(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,s;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),s}},e}function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}function n(){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(t){return!1}}function o(t,e,i){return o=n()?Reflect.construct.bind():function(t,e,n){var o=[null];o.push.apply(o,e);var i=new(Function.bind.apply(t,o));return n&&r(i,n.prototype),i},o.apply(null,arguments)}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t)||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 a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];try{var o=s(),i=o.getPlugin&&o.getPlugin("Monitor")||null;i&&i.error&&"function"==typeof i.error?i.error.call(i,t,e,r,n):p("Monitor")&&h.error.push({event:t,err:e,detail:r,withoutJSB:n})}catch(t){}}(u.INIT_ERROR,t)}}(); !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._ttq_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 w()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var c=b(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 p(){}function h(){}var v={};s(v,o,(function(){return this}));var _=Object.getPrototypeOf,g=_&&_(_(S([])));g&&g!==n&&r.call(g,o)&&(v=g);var y=h.prototype=d.prototype=Object._ttq_create(v);function m(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(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 b(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,b(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=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=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=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;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=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 S,w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};!function(e){!function(t){var n="object"==typeof w?w:"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._ttq_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,p=new(l||"function"!=typeof WeakMap?ne():WeakMap);function h(e,t,n,r){if(D(n)){if(!q(e))throw new TypeError;if(!W(t))throw new TypeError;return O(e,t)}if(!q(e))throw new TypeError;if(!U(t))throw new TypeError;if(!U(r)&&!D(r)&&!x(r))throw new TypeError;return x(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(!D(r)&&!K(r))throw new TypeError;C(e,t,n,r)}return n}function _(e,t,n,r){if(!U(n))throw new TypeError;return D(r)||(r=V(r)),C(e,t,n,r)}function g(e,t,n){if(!U(t))throw new TypeError;return D(n)||(n=V(n)),N(e,t,n)}function y(e,t,n){if(!U(t))throw new TypeError;return D(n)||(n=V(n)),R(e,t,n)}function m(e,t,n){if(!U(t))throw new TypeError;return D(n)||(n=V(n)),A(e,t,n)}function E(e,t,n){if(!U(t))throw new TypeError;return D(n)||(n=V(n)),P(e,t,n)}function b(e,t){if(!U(e))throw new TypeError;return D(t)||(t=V(t)),k(e,t)}function I(e,t){if(!U(e))throw new TypeError;return D(t)||(t=V(t)),M(e,t)}function T(e,t,n){if(!U(t))throw new TypeError;D(n)||(n=V(n));var r=w(t,n,!1);if(D(r))return!1;if(!r.delete(e))return!1;if(r.size>0)return!0;var i=p.get(t);return i.delete(n),i.size>0||p.delete(t),!0}function O(e,t){for(var n=e.length-1;n>=0;--n){var r=(0,e[n])(t);if(!D(r)&&!x(r)){if(!W(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(!D(o)&&!x(o)){if(!U(o))throw new TypeError;r=o}}return r}function w(e,t,n){var r=p.get(e);if(D(r)){if(!n)return;r=new f,p.set(e,r)}var i=r.get(t);if(D(i)){if(!n)return;i=new f,r.set(t,i)}return i}function N(e,t,n){if(R(e,t,n))return!0;var r=$(t);return!x(r)&&N(e,r,n)}function R(e,t,n){var r=w(t,n,!1);return!D(r)&&H(r.has(e))}function A(e,t,n){if(R(e,t,n))return P(e,t,n);var r=$(t);return x(r)?void 0:A(e,r,n)}function P(e,t,n){var r=w(t,n,!1);if(!D(r))return r.get(e)}function C(e,t,n,r){w(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=0&&e=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= than the number of constructor arguments of its base class."},U.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",U.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",U.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",U.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",U.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";U.POST_CONSTRUCT_ERROR=function(){for(var e=[],t=0;t0,h=d.length>i.length,v=function(e,t,n,r,i){for(var o=[],a=0;a0?l:e(t,r)}return 0}}(oe);var we={};Object.defineProperty(we,"__esModule",{value:!0}),we.Request=void 0;var Ne=M,Re=function(){function e(e,t,n,r,i){this.id=Ne.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 window[window.TiktokAnalyticsObject || "ttq"]._ttq_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}();we.Request=Re,Object.defineProperty(G,"__esModule",{value:!0}),G.getBindingDictionary=G.createMockRequest=G.plan=void 0;var Ae=V,Pe=U,Ce=k,ke=A,Me=q,Le=W,De=z,xe=ee,je=re,Ue=oe,Fe=we,Be=ye;function He(e){return e._bindingDictionary}function Ge(e,t,n,r,i){var o=qe(n.container,i.serviceIdentifier),a=[];return o.length===Ae.BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&"function"==typeof i.serviceIdentifier&&e.getConstructorMetadata(i.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(i.serviceIdentifier).toSelf(),o=qe(n.container,i.serviceIdentifier)),a=t?o:o.filter((function(e){var t=new Fe.Request(e.serviceIdentifier,n,r,e,i);return e.constraint(t)})),function(e,t,n,r){switch(t.length){case Ae.BindingCount.NoBindingsAvailable:if(n.isOptional())return t;var i=Le.getServiceIdentifierAsString(e),o=Pe.NOT_REGISTERED;throw o+=Le.listMetadataForTarget(i,n),o+=Le.listRegisteredBindingsForServiceIdentifier(r,i,qe),new Error(o);case Ae.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return t;case Ae.BindingCount.MultipleBindingsAvailable:default:if(n.isArray())return t;i=Le.getServiceIdentifierAsString(e),o=Pe.AMBIGUOUS_MATCH+" "+i;throw o+=Le.listRegisteredBindingsForServiceIdentifier(r,i,qe),new Error(o)}}(i.serviceIdentifier,a,i,n.container),a}function Ve(e,t,n,r,i,o){var a,c;if(null===i){a=Ge(e,t,r,null,o),c=new Fe.Request(n,r,null,a,o);var s=new je.Plan(r,c);r.addPlan(s)}else a=Ge(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===Ce.BindingTypeEnum.Instance&&null!==t.implementationType){var i=Ue.getDependencies(e,t.implementationType);if(!r.container.options.skipBaseClassChecks){var a=Ue.getBaseClassDependencyCount(e,t.implementationType);if(i.length0){var a=t.filter((function(e){return null!==e.target&&e.target.type===Xe.TargetTypeEnum.ConstructorArgument})).map(n);i=a,o=function(e,t,n){var r=t.filter((function(e){return null!==e.target&&e.target.type===Xe.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,Ke([void 0],i))),t,n)}else o=new e;return function(e,t){if(Reflect.ttq_hasMetadata(Qe.POST_CONSTRUCT,e)){var n=Reflect.ttq_getMetadata(Qe.POST_CONSTRUCT,e);try{t[n.value]()}catch(t){throw new Error(Ye.POST_CONSTRUCT_ERROR(e.name,t.message))}}}(e,o),o},Object.defineProperty(Je,"__esModule",{value:!0}),Je.resolve=void 0;var ze=U,Ze=k,$e=q,et=W,tt=We,nt=function(e,t,n){try{return n()}catch(n){throw $e.isStackOverflowExeption(n)?new Error(ze.CIRCULAR_DEPENDENCY_IN_FACTORY(e,t.toString())):n}},rt=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 rt(e)(t)}));var a=null;if(!t.target.isOptional()||0!==n.length){var c=n[0],s=c.scope===Ze.BindingScopeEnum.Singleton,u=c.scope===Ze.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===Ze.BindingTypeEnum.ConstantValue)a=c.cache,c.activated=!0;else if(c.type===Ze.BindingTypeEnum.Function)a=c.cache,c.activated=!0;else if(c.type===Ze.BindingTypeEnum.Constructor)a=c.implementationType;else if(c.type===Ze.BindingTypeEnum.DynamicValue&&null!==c.dynamicValue)a=nt("toDynamicValue",c.serviceIdentifier,(function(){return c.dynamicValue(t.parentContext)}));else if(c.type===Ze.BindingTypeEnum.Factory&&null!==c.factory)a=nt("toFactory",c.serviceIdentifier,(function(){return c.factory(t.parentContext)}));else if(c.type===Ze.BindingTypeEnum.Provider&&null!==c.provider)a=nt("toProvider",c.serviceIdentifier,(function(){return c.provider(t.parentContext)}));else{if(c.type!==Ze.BindingTypeEnum.Instance||null===c.implementationType){var l=et.getServiceIdentifierAsString(t.serviceIdentifier);throw new Error(ze.INVALID_BINDING_TYPE+" "+l)}a=tt.resolveInstance(c.implementationType,r,rt(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}}};Je.resolve=function(e){return rt(e.plan.rootRequest.requestScope)(e.plan.rootRequest)};var it={},ot={},at={},ct={},st={},ut={},lt={};Object.defineProperty(lt,"__esModule",{value:!0}),lt.typeConstraint=lt.namedConstraint=lt.taggedConstraint=lt.traverseAncerstors=void 0;var ft=A,dt=ee,pt=function(e,t){var n=e.parentRequest;return null!==n&&(!!t(n)||pt(n,t))};lt.traverseAncerstors=pt;var ht=function(e){return function(t){var n=function(n){return null!==n&&null!==n.target&&n.target.matchesTag(e)(t)};return n.metaData=new dt.Metadata(e,t),n}};lt.taggedConstraint=ht;var vt=ht(ft.NAMED_TAG);lt.namedConstraint=vt;lt.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(ut,"__esModule",{value:!0}),ut.BindingWhenSyntax=void 0;var _t=st,gt=lt,yt=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=gt.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=gt.taggedConstraint(e)(t),new _t.BindingOnSyntax(this._binding)},e.prototype.whenInjectedInto=function(e){return this._binding.constraint=function(t){return gt.typeConstraint(e)(t.parentRequest)},new _t.BindingOnSyntax(this._binding)},e.prototype.whenParentNamed=function(e){return this._binding.constraint=function(t){return gt.namedConstraint(e)(t.parentRequest)},new _t.BindingOnSyntax(this._binding)},e.prototype.whenParentTagged=function(e,t){return this._binding.constraint=function(n){return gt.taggedConstraint(e)(t)(n.parentRequest)},new _t.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorIs=function(e){return this._binding.constraint=function(t){return gt.traverseAncerstors(t,gt.typeConstraint(e))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorIs=function(e){return this._binding.constraint=function(t){return!gt.traverseAncerstors(t,gt.typeConstraint(e))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorNamed=function(e){return this._binding.constraint=function(t){return gt.traverseAncerstors(t,gt.namedConstraint(e))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorNamed=function(e){return this._binding.constraint=function(t){return!gt.traverseAncerstors(t,gt.namedConstraint(e))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._binding.constraint=function(n){return gt.traverseAncerstors(n,gt.taggedConstraint(e)(t))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorTagged=function(e,t){return this._binding.constraint=function(n){return!gt.traverseAncerstors(n,gt.taggedConstraint(e)(t))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorMatches=function(e){return this._binding.constraint=function(t){return gt.traverseAncerstors(t,e)},new _t.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorMatches=function(e){return this._binding.constraint=function(t){return!gt.traverseAncerstors(t,e)},new _t.BindingOnSyntax(this._binding)},e}();ut.BindingWhenSyntax=yt,Object.defineProperty(st,"__esModule",{value:!0}),st.BindingOnSyntax=void 0;var mt=ut,Et=function(){function e(e){this._binding=e}return e.prototype.onActivation=function(e){return this._binding.onActivation=e,new mt.BindingWhenSyntax(this._binding)},e}();st.BindingOnSyntax=Et,Object.defineProperty(ct,"__esModule",{value:!0}),ct.BindingWhenOnSyntax=void 0;var bt=st,It=ut,Tt=function(){function e(e){this._binding=e,this._bindingWhenSyntax=new It.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new bt.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}();ct.BindingWhenOnSyntax=Tt,Object.defineProperty(at,"__esModule",{value:!0}),at.BindingInSyntax=void 0;var Ot=k,St=ct,wt=function(){function e(e){this._binding=e}return e.prototype.inRequestScope=function(){return this._binding.scope=Ot.BindingScopeEnum.Request,new St.BindingWhenOnSyntax(this._binding)},e.prototype.inSingletonScope=function(){return this._binding.scope=Ot.BindingScopeEnum.Singleton,new St.BindingWhenOnSyntax(this._binding)},e.prototype.inTransientScope=function(){return this._binding.scope=Ot.BindingScopeEnum.Transient,new St.BindingWhenOnSyntax(this._binding)},e}();at.BindingInSyntax=wt,Object.defineProperty(ot,"__esModule",{value:!0}),ot.BindingInWhenOnSyntax=void 0;var Nt=at,Rt=st,At=ut,Pt=function(){function e(e){this._binding=e,this._bindingWhenSyntax=new At.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new Rt.BindingOnSyntax(this._binding),this._bindingInSyntax=new Nt.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}();ot.BindingInWhenOnSyntax=Pt,Object.defineProperty(it,"__esModule",{value:!0}),it.BindingToSyntax=void 0;var Ct=U,kt=k,Mt=ot,Lt=ct,Dt=function(){function e(e){this._binding=e}return e.prototype.to=function(e){return this._binding.type=kt.BindingTypeEnum.Instance,this._binding.implementationType=e,new Mt.BindingInWhenOnSyntax(this._binding)},e.prototype.toSelf=function(){if("function"!=typeof this._binding.serviceIdentifier)throw new Error(""+Ct.INVALID_TO_SELF_VALUE);var e=this._binding.serviceIdentifier;return this.to(e)},e.prototype.toConstantValue=function(e){return this._binding.type=kt.BindingTypeEnum.ConstantValue,this._binding.cache=e,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=kt.BindingScopeEnum.Singleton,new Lt.BindingWhenOnSyntax(this._binding)},e.prototype.toDynamicValue=function(e){return this._binding.type=kt.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=e,this._binding.implementationType=null,new Mt.BindingInWhenOnSyntax(this._binding)},e.prototype.toConstructor=function(e){return this._binding.type=kt.BindingTypeEnum.Constructor,this._binding.implementationType=e,this._binding.scope=kt.BindingScopeEnum.Singleton,new Lt.BindingWhenOnSyntax(this._binding)},e.prototype.toFactory=function(e){return this._binding.type=kt.BindingTypeEnum.Factory,this._binding.factory=e,this._binding.scope=kt.BindingScopeEnum.Singleton,new Lt.BindingWhenOnSyntax(this._binding)},e.prototype.toFunction=function(e){if("function"!=typeof e)throw new Error(Ct.INVALID_FUNCTION_BINDING);var t=this.toConstantValue(e);return this._binding.type=kt.BindingTypeEnum.Function,this._binding.scope=kt.BindingScopeEnum.Singleton,t},e.prototype.toAutoFactory=function(e){return this._binding.type=kt.BindingTypeEnum.Factory,this._binding.factory=function(t){return function(){return t.container.get(e)}},this._binding.scope=kt.BindingScopeEnum.Singleton,new Lt.BindingWhenOnSyntax(this._binding)},e.prototype.toProvider=function(e){return this._binding.type=kt.BindingTypeEnum.Provider,this._binding.provider=e,this._binding.scope=kt.BindingScopeEnum.Singleton,new Lt.BindingWhenOnSyntax(this._binding)},e.prototype.toService=function(e){this.toDynamicValue((function(t){return t.container.get(e)}))},e}();it.BindingToSyntax=Dt;var xt={};Object.defineProperty(xt,"__esModule",{value:!0}),xt.ContainerSnapshot=void 0;var jt=function(){function e(){}return e.of=function(t,n){var r=new e;return r.bindings=t,r.middleware=n,r},e}();xt.ContainerSnapshot=jt;var Ut={};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Lookup=void 0;var Ft=U,Bt=function(){function e(){this._map=new window[window.TiktokAnalyticsObject || "ttq"]._ttq_map}return e.prototype.getMap=function(){return this._map},e.prototype.add=function(e,t){if(null==e)throw new Error(Ft.NULL_ARGUMENT);if(null==t)throw new Error(Ft.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(Ft.NULL_ARGUMENT);var t=this._map.get(e);if(void 0!==t)return t;throw new Error(Ft.KEY_NOT_FOUND)},e.prototype.remove=function(e){if(null==e)throw new Error(Ft.NULL_ARGUMENT);if(!this._map.delete(e))throw new Error(Ft.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(Ft.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}();Ut.Lookup=Bt;var Ht=w&&w.__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())}))},Gt=w&&w.__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]2&&void 0!==arguments[2]?arguments[2]:"-";return"".concat(e).concat(n).concat(t)},ir=function(){return new Date(Date.now()+864e5).toUTCString()};function or(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=-1;return function(){var r=Array.prototype.slice.apply(arguments),i=Date.now();i-n>=t&&(e.apply(void 0,y(r)),n=Date.now())}}var ar,cr,sr,ur,lr,fr,dr="tt_adInfo",pr="tt_appInfo",hr="_tt_enable_cookie",vr="_ttp",_r="messageId",gr="tt_sessionId",yr="tt_pixel_session_index",mr="default_eventId",Er="::";!function(e){e.MUSICAL_LY="musical_ly",e.MUSICALLY_GO="musically_go",e.TRILL="trill"}(ar||(ar={})),function(e){e[e.OFFSITE=0]="OFFSITE",e[e.ONSITE=1]="ONSITE"}(cr||(cr={})),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"}(sr||(sr={})),function(e){e.UNKNOWN="-1",e.LOADING="0",e.INTERACTIVE="1",e.COMPLETE="2"}(ur||(ur={})),function(e){e.HISTORY_CHANGE="hc"}(lr||(lr={})),function(e){e.EXTERNAL="external",e.APP="app",e.TIKTOK="tiktok"}(fr||(fr={}));var br,Ir={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")},Tr="Pageview",Or=[],Sr={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"),EVENT_BUILDER_PLUGIN:Symbol.for("EVENT_BUILDER_PLUGIN"),ENRICH_IPV6_PLUGIN:Symbol.for("ENRICH_IPV6_PLUGIN"),RUNTIME_MEASUREMENT_PLUGIN:Symbol.for("RUNTIME_MEASUREMENT_PLUGIN"),PAGE_PERFORMANCE_MONITOR:Symbol.for("PAGE_PERFORMANCE_MONITOR"),PAGE_INTERACTION_MONITOR:Symbol.for("PAGE_INTERACTION_MONITOR"),PAGEDATA_PLUGIN:Symbol.for("PAGEDATA_PLUGIN"),HISTORY_OBSERVER:Symbol.for("HISTORY_OBSERVER"),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.for("JS_BRIDGE"),TTQ_REPORTERS:Symbol.for("TTQ_REPORTERS"),INTERACTION_MONITOR:Symbol.for("INTERACTION_MONITOR"),PERFORMANCE_MONITOR:Symbol.for("PERFORMANCE_MONITOR"),SANDBOX_PIXEL_API:Symbol("SANDBOX_PIXEL_API")};!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",e.PAGE="Pf"}(br||(br={}));var wr,Nr,Rr=["EnrichAM"],Ar="https://analytics.tiktok.com/api/v2",Pr="".concat(Ar,"/pixel"),Cr="".concat(Ar,"/performance"),kr="".concat(Ar,"/interaction"),Mr="".concat(Ar,"/performance_interaction"),Lr="".concat(Ar,"/pixel/act"),Dr="ttclid",xr="_toutiao_params",jr=["phone_number","email","external_id"],Ur="email_is_hashed",Fr="phone_is_hashed",Br="sha256_email",Hr="sha256_phone",Gr="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",e.CUSTOM_TIMER="custom_timer"}(wr||(wr={})),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"}(Nr||(Nr={}));var Vr=null,qr=function(){return"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof global?global:new Function("return this")()},Jr=function(){return qr().TiktokAnalyticsObject||"ttq"},Wr=function(){var e=qr();return Vr||e[Jr()]},Kr=function(){return!!Wr()._is_onsite},Yr=function(){var e=qr();return("object"===("undefined"==typeof navigator?"undefined":t(navigator))&&navigator.userAgent?navigator.userAgent:"")||e._userAgent},Xr=function(e){try{var t=Wr();return t&&t._self_host_config&&t._self_host_config[e]||""}catch(e){return""}},Qr=function(e){var t=Wr(),n=t._i||{},r=e&&n[e];return e&&r&&r._partner?r._partner:t._partner?t._partner:""},zr=function(e){var t=Wr(),n=t._i||{};return Object.keys(n).filter((function(t){return n[t]._partner===e})).length>0||t._partner===e},Zr=function(e){try{var t=Wr()._plugins||{};return null==t[e]||!!t[e]}catch(e){return!0}},$r=function(){var e;try{var t=Wr()._ppf;return null===(e=t.printAndClear)||void 0===e?void 0:e.call(t)}catch(e){}};var ei=function(e){return Boolean(e)},ti=function(e){return void 0!==e.metric_name},ni=function(e,t){var n,r;return ti(e)&&(null===(r=null===(n=null==t?void 0:t.plugins)||void 0===n?void 0:n.Monitor)||void 0===r?void 0:r.MonitorMq)?"insight_log_monitor":"insight_log"},ri=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!==jr.indexOf(e)}))};function ii(e,t){var n,r=e;return function(){if(r){for(var i=arguments.length,o=new Array(i),a=0;acrypto.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 ai(e,t){var n=Object.assign({},e);return t.forEach((function(e){null!==n[e]&&void 0!==n[e]&&delete n[e]})),n}var ci=function(e,t){if(!e)return{};var n={};return Object.keys(e).forEach((function(r){t[r]&&(n[r]=e[r])})),n};function si(e,t,n){var r;return function(){for(var i=arguments.length,o=new Array(i),a=0;a0&&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)}))),li.apply(this,arguments)}var fi=["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"],di=["[href^='tel:']","[href^='callto:']","[href^='sms:']","[href^='skype:']","[href^='whatsapp:']","[href^='mailto:']"],pi=function(e){var t=fi.some((function(t){return e.matches(t)})),n=di.some((function(t){return e.matches(t)}));return t&&!n};function hi(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=hi(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 vi(e,t){return Object.keys(hi(e,t)).length>0}function _i(e,t){var n={};return e&&(function(e){return"string"==typeof e}(e)||function(e){return"number"==typeof e}(e)?n.external_id=e.toString():er(e)&&(n=e)),t&&er(t)&&Object.assign(n,t),n}var gi=function(e){try{var t=e&&function(e){for(var t=Array.prototype.slice.call(document.getElementsByTagName("script")),n=0;n-1)return r}}(e);if(t){if(yi(t))return"isInHead";if(mi(t))return"isInBodyTop10"}return"unknown"}catch(e){return"unknown"}},yi=function e(t){var n=t.parentElement;return!!n&&("HEAD"===n.tagName||e(n))},mi=function(e){return function(e,n){for(var r,i=[document.body],o=0;o<=e&&i.length;){var a=i.pop();if(a===n)return!0;if(!("script"===(null==a?void 0:a.tagName.toLowerCase())&&(null===(r=a.src)||void 0===r?void 0:r.indexOf("analytics.tiktok.com"))>-1)&&(o++,"object"===t(a)&&a.children))for(var c=a.children.length-1;c>=0;c--)i.push(a.children[c])}return!1}(10,e)},Ei=function(){var e,t;return(null===(t=null===(e=Wr())||void 0===e?void 0:e._env)||void 0===t?void 0:t.env)||fr.EXTERNAL},bi=function(){var e,t;return null!==(t=null===(e=Wr())||void 0===e?void 0:e._is_onsite)&&void 0!==t?t:cr.OFFSITE},Ii=function(e){return(e||Ei())!==fr.EXTERNAL},Ti=function(e){return(e||Ei())===fr.TIKTOK},Oi=function(){var e=Yr();return/windows phone/i.test(e)?"Windows Phone":/android/i.test(e)?"android":/iPad|iPhone|iPod/.test(e)?"ios":"pc"},Si=function(){try{return navigator.userAgentData.getHighEntropyValues(["model","platformVersion"])}catch(e){return Promise.resolve({})}},wi=function(){return"android"===Oi()},Ni=function(){return"ios"===Oi()},Ri=ii((function(){return/open_news/i.test(Yr())})),Ai=ii((function(){return/ultralite/i.test(Yr())}));function Pi(){var e;return[zn.INVOKE_METHOD_ENABLED,zn.INVOKE_METHOD_NOT_ENABLED,zn.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 Ci=function(){try{return function(){try{return self.parent.location.href,!1}catch(e){return!0}}()?function(){try{var e=new URL(decodeURIComponent(self.location.href)),t=/https?:\/\/[^\s/$.?#].[^\s]*/i;return t.test(e.search)||t.test(e.pathname)}catch(e){return!1}}()?Hn.URL_IN_QUERY_IFRAME:self.google_tag_manager?Hn.GTM_IFRAME:self.name&&"web-pixel-sandbox"===self.name?Hn.SANDBOX_IFRAME:Hn.CROSS_DOMAIN_IFRAME:Hn.NOT_CROSS_DOMAIN_IFRAME}catch(e){return Hn.UNKNOWN_IFRAME}},ki=function(){return(void 0!==(e=qr()).DedicatedWorkerGlobalScope?e instanceof e.DedicatedWorkerGlobalScope:"DedicatedWorkerGlobalScope"===e.constructor.name)?Hn.WEB_WORKER:self&&self!==self.top?Ci():Hn.NORMAL;var e},Mi=function(){var e=Ni()?function(){for(var e=Yr(),t=0,n=Object.keys(ar);ta)return!1}return!0},Di={info:[],error:[]};function xi(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=Wr(),i=r.getPlugin&&r.getPlugin("Monitor")||null;i&&i.info&&"function"==typeof i.info?i.info.call(i,e,t,n):Zr("Monitor")&&Di.info.push({event:e,detail:t,withoutJSB:n})}catch(e){}}function ji(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=Wr(),o=i.getPlugin&&i.getPlugin("Monitor")||null;o&&o.error&&"function"==typeof o.error?o.error.call(o,e,t,n,r):Zr("Monitor")&&Di.error.push({event:e,err:t,detail:n,withoutJSB:r})}catch(e){}}function Ui(e,t){try{var n=Wr(),r=n.getPlugin&&n.getPlugin("DiagnosticsConsole")||null;r&&r.warn.apply(r,[e,t])}catch(e){}}function Fi(){try{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:Jr()||"ttq"}}catch(e){return{lib:"ttq",pixelCode:""}}}var Bi=function(e,t){if("selfhost"===e&&t&&Xr(t))return"https://".concat(Xr(t),"/api/v2/pixel");var n={track:Pr,performance:Cr,interaction:kr,performance_interaction:Mr,auto_config:Lr}[e];return n||null},Hi=function(e){try{var t=window.sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return null}},Gi=function(e,t){try{var n=JSON.stringify(t);window.sessionStorage.setItem(e,n)}catch(e){}};function Vi(e,t){try{return new URL(e).searchParams.get(t)||""}catch(e){return""}}var qi=function(e,t,n){try{var r=Vi(t||window.location.href,e);return r||Vi(n||document.referrer,e)}catch(e){}return""},Ji="",Wi=function(e){if(0===document.cookie.length)return"";var t,n,r=(t=e,n={},document.cookie.split(";").forEach((function(e){var t=e.split("="),r=t[0].trim();n[r]=t.slice(1).join("=")})),n[t]||"");return r?unescape(r):""},Ki=function(e,t,n){try{if(n){if(Ji)return n.domain=Ji,void(document.cookie="".concat(e,"=").concat(t).concat(Xi(n)));for(var r=(n.domain||window.location.hostname).split("."),i=r.length,o="",a=0;a2&&void 0!==arguments[2]?arguments[2]:"/",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ir(),i={path:n,expires:r};Ki(e,t,i)};function zi(){try{var e=document.readyState;return"loading"==e?ur.LOADING:"interactive"==e?ur.INTERACTIVE:"complete"==e?ur.COMPLETE:ur.UNKNOWN}catch(e){return ur.UNKNOWN}}function Zi(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 $i=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,Zi(n);case 5:return e.abrupt("return",Promise.resolve(!0));case 8:return e.prev=8,e.t0=e.catch(2),e.abrupt("return",$i.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)}}(),eo=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;a1&&void 0!==arguments[1]?arguments[1]:null,n=t||to;return n.includes(e)}function ro(e){return!isNaN(e)&&e>=0}var io=String.fromCharCode.bind(String),oo=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),ao=function(e){if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?io(192|t>>>6)+io(128|63&t):io(224|t>>>12&15)+io(128|t>>>6&63)+io(128|63&t)}var n=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return io(240|n>>>18&7)+io(128|n>>>12&63)+io(128|n>>>6&63)+io(128|63&n)},co=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,so=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;c255||(r=e.charCodeAt(c++))>255||(i=e.charCodeAt(c++))>255)throw new TypeError("invalid character found");o+=oo[(t=n<<16|r<<8|i)>>18&63]+oo[t>>12&63]+oo[t>>6&63]+oo[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o}(function(e){return e.replace(co,ao)}(e)))},uo=function(e){return t=JSON.stringify(e),so(t);var t},lo=function(){var e=Wr();return"object"===t(e)&&e._i?e._i:{}},fo=function(e,t){var n=lo()||{};Object.keys(n).forEach((function(r){var i=n[r];i._init||i.push([e].concat(t))}))},po=function(e,t,n){var r=(lo()||{})[e];if(r){if(r._init)return;r.push([t].concat(n))}},ho=function(e,t){try{var n=qi(Dr,e,t)||void 0,r=qi("ext_params",e,t)||void 0,i=qi(xr,e,t)||void 0,o=parseInt(qi("ttuts",e,t),10)||void 0,a=i?JSON.parse(i):{},c=a.log_extra,s=void 0===c?void 0:c,u=a.idc,l=void 0===u?void 0:u,f=a.cid,d=void 0===f?void 0:f;return{callback:n,ext_params:r,log_extra:s,creative_id:d,idc:l,ttuts:o,ad_info_from:(s||l||d)&&"url"}}catch(e){return{}}},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},_o=function(){function e(t){i(this,e),this.userFormatInfo={},this.userFormatInfoV2={},this.enableAdTracking=!0,this.offsiteAdInfo={},this.tt_test_id="",this.signalDiagnosticLabels=Object.assign({},$n),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=n.url;if(void 0!==n.url&&(n.referrer=n.url),void 0!==t&&(n.referrer=t),void 0!==r.pageIndex){var o=r.pageIndex,a=o.index,c=o.sub,s=o.main;r.pageIndex={index:++a,sub:++c,main:s}}return n.url=e,this.pageInfo=n,this.pageSign=r,{from:i,pageIndex:r.pageIndex}}}},{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(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"".concat(Date.now());return"".concat(e,"-").concat(oi(5))}},{key:"getPageViewId",value:function(){var e=this.pageSign,t=e.pageId,n=e.pageIndex;return"".concat(t).concat(n?".".concat(n.main,".").concat(n.sub):"")}},{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("pageId")};this.pageSign=t}}]),e}();_o=vo([R.injectable()],_o);var go=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=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=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){s(n,e);var t=p(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,partner_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:"getReporterUniqueLoadId",value:function(){return"".concat(this.getReporterId())}},{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:"isPartnerReporter",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]?!(!Or.includes(e)||!this.reportEventHistory[n].includes(e)):(this.reportEventHistory[n]=[],!1)}},{key:"page",value:function(){}},{key:"track",value:function(e,t,n,r,i){var o=this,a=r||br.TRACK,c=i||Bn.defaultReport;return!this.reportService||this.hasReportEventHistory(e,c)?Promise.resolve(null):(this.pushReport(e,this.getReportEventHistoryKey(c)),eo(this.reportService.reportPreposition||[]).then((function(){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var r={taskName:"track_after_report_preposition",functionName:void 0,start:performance.now()};window.ttq._pf_tn="track_after_report_preposition"}}catch(e){}var i=o.getReporterId(),s=o.trackSync(i,e,t,n,a,c);o.trackPostTask({reporterId:i,eventType:e,properties:t,eventConfig:n,type:a,reportType:c,reportData:s});var u={reporterId:i,eventType:e,properties:t,eventConfig:n,type:a,reportType:c,reportData:s};try{window.ttq&&window.ttq._ppf&&(r.end=performance.now(),window.ttq._ppf.push(r),window.ttq._pf_tn="")}catch(e){}return Promise.resolve(u)})))}},{key:"getEventType",value:function(e){return e}},{key:"trackPostTask",value:function(e){}},{key:"trackSync",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:br.TRACK,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Bn.defaultReport,a=arguments.length>6?arguments[6]:void 0,c=i!==br.SELFHOST?this.assemblyData(e,t,n,r,i):this.assemblySelfHostData(e,t,n,r,i),s=a||Bi(i,e);if(null!==s&&this.reportService)return this.emit("beforeReport",e,t,c,r,i),this.reportResultSet.push(this.reportService.report(s,c,o)),c}},{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]||br.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,p=s.variationId,h=Object.assign({},n),v=h&&h.pixelMethod||"";h&&h.pixelMethod&&delete h.pixelMethod;var _=Object.assign({},u,{version:this.context.isLegacyPixel(e)?"legacy-".concat(u.version):u.version}),g=ai(o,Xn),y=Object.assign({},g,{device_id:c.device_id,uid:c.user_id}),m=this.handlePropertiesToOptions(h,[Fn.LDU,Fn.EVENTID,Fn.EVENT_ID]),E=this.options.limited_data_use,b=null!==m.limited_data_use&&void 0!==m.limited_data_use?m.limited_data_use:E;null==b?delete m.limited_data_use:m.limited_data_use=!!b;var I=r&&(r.event_id||r.eventID)||"";m.event_id=I||m.event_id||m.eventID||"",delete m.eventID;var T=this.getReporterInfo();T.pixel&&(T.pixel.runtime=ki(),v&&(T.pixel.mode=v));var O=this.getUserInfo(qn.Manual)||{},S=this.getUserInfo(qn.ManualV2)||{},w=this.getReporterMatchedUserFormatInfoV2()||{},N=this.getUserInfo(qn.Auto)||{};N.auto_trigger_type&&(Object.assign(h,{auto_trigger_type:N.auto_trigger_type}),delete N.auto_trigger_type),wi()&&Object.assign(h,{android_version:c.android_version,device_model:c.device_model});var R={};a.anonymous_id&&(R.anonymous_id=a.anonymous_id);var A=this.getEventType(t),P={event:A,event_id:I,message_id:rr(nr(_r),e),is_onsite:!!f,timestamp:(new Date).toJSON(),context:Object.assign(Object.assign({ad:y,device:{platform:c.platform},user:Object.assign({},R,O,S,N)},T),{page:Object.assign({},l),library:Object.assign({},_),session_id:rr(d,e),pageview_id:rr(this.context.getPageViewId(),this.getReporterUniqueLoadId(),Er),variation_id:p||""}),_inspection:w,properties:h};return Object.assign(P,m)}},{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}(yo);bo=Eo([R.injectable()],bo);var Io=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},To=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}(),Oo=function(e){s(n,e);var t=p(n);function n(){return i(this,n),t.apply(this,arguments)}return a(n)}(To=Io([R.injectable()],To)),So=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},wo=function(){function e(t,n){i(this,e),this.initialize=!1,this.plugins=[],this.observers=[],this.reporters=[],this.context=t,this.reportService=n}return a(e,[{key:"init",value:function(e){this.initContextInfo(e),this.initialize=!0}},{key:"initContextInfo",value:function(e){var t=this;this.dispatch(sr.CONTEXT_INIT_START);var n=e&&e.href?e.href:"";this.initAdInfo(n),this.initAppInfo(n),this.reportService.pushPreposition(Promise.resolve().then((function(){return t.initUserInfo()}))),this.initTestId(n),this.dispatch(sr.CONTEXT_INIT_END)}},{key:"setPageIndex",value:function(e){}},{key:"setPageInfo",value:function(e,t){var n=this.context.getPageInfo();if(n.url!==e){this.dispatch(sr.PAGE_URL_WILL_CHANGE,n.url,e);var r=this.context.setPageInfo(e,t);r&&(r.pageIndex&&this.setPageIndex(r.pageIndex),this.dispatch(sr.PAGE_URL_DID_CHANGE,e,r.from||""))}}},{key:"initAdInfo",value:function(e){}},{key:"initOffsiteAdInfo",value:function(e){}},{key:"initAppInfo",value:function(e){}},{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:"useObserver",value:function(e){try{if(!this.observers.find((function(t){return t.name===e.name}))){this.observers.push(e);var t=e.name;if(t)this["".concat(t[0].toLowerCase()+t.slice(1))]=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||(ji(wr.PIXEL_EMPTY,new Error(""),{pixelCode:e}),new mo(e))}},{key:"instances",value:function(){return this.reporters}},{key:"identify",value:function(e,t){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var n={taskName:"identify_api_handler",functionName:void 0,start:performance.now()};window.ttq._pf_tn="identify_api_handler"}}catch(e){}var r=_i(e,t);this.context.setUserInfo(r);try{window.ttq&&window.ttq._ppf&&(n.end=performance.now(),window.ttq._ppf.push(n),window.ttq._pf_tn="")}catch(e){}}},{key:"page",value:function(e){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var t={taskName:"page_api_handler",functionName:void 0,start:performance.now()};window.ttq._pf_tn="page_api_handler"}}catch(e){}e.url!==this.context.getPageInfo().url&&(this.setPageInfo(e.url,e.referrer),this.reporters.forEach((function(e){e.clearHistory()})));var n=Object.assign({},e);delete n.url,delete n.referrer,this.reporters.forEach((function(e){e.page(n)}));try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t),window.ttq._pf_tn="")}catch(e){}}},{key:"isOnsitePage",value:function(){return this.context.getSignalType()===cr.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]:{};try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var r={taskName:"track_api_handler",functionName:void 0,start:performance.now()};window.ttq._pf_tn="track_api_handler"}}catch(e){}this.instances().forEach((function(r,i){r.track(e,t,Object.assign({_i:i},n))}));try{window.ttq&&window.ttq._ppf&&(r.end=performance.now(),window.ttq._ppf.push(r),window.ttq._pf_tn="")}catch(e){}}},{key:"dispatch",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=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(){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}();Ro=No([R.injectable()],Ro);var Ao,Po=function(e){s(n,e);var t=p(n);function n(e){var r;return i(this,n),(r=t.call(this,e)).observers=new Set([]),r}return a(n,[{key:"addObserver",value:function(e){this.observers.has(e)||this.observers.add(e)}},{key:"removeObserver",value:function(e){this.observers.delete(e)}},{key:"notifyObservers",value:function(e,t){this.observers.forEach((function(n){return n.call(t,e)}))}}]),n}(To);!function(e){e[e.Live=0]="Live",e[e.NoRecord=1]="NoRecord"}(Ao||(Ao={}));var Co,ko=function(e,t,n){e.isBound(t)?e.rebind(t).toConstantValue(n):e.bind(t).toConstantValue(n)},Mo=function(e,t){var n=t.id,r=t.type,i=void 0===r?Zn.PIXEL_CODE:r,o=t.info,a=t.options,s=void 0===a?{}:a,u=t.plugins,l=void 0===u?{}:u,f=t.rules,d=void 0===f?[]:f;try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var p={taskName:window.ttq._pf_tn,functionName:"webReporterFactory",start:performance.now()}}catch(e){}var h=e.get(Sr.TTQ),v=e.get(Sr.TTQ_REPORTERS);if(!v.some((function(e){return e.getReporterId()===n}))){ko(e,Ir.ID,n),ko(e,Ir.Type,i),ko(e,Ir.Info,o||c({},i,n)),ko(e,Ir.Options,s),ko(e,Ir.Plugins,l),ko(e,Ir.Rules,d),h.enableFirstPartyCookie((null==o?void 0:o.firstPartyCookieEnabled)||!1);var _=e.get(Sr.REPORTER);if(l){var g=l.AdvancedMatching,y=l.AutoAdvancedMatching,m={};g&&Object.assign(m,g),y&&Object.assign(m,y),_.setAdvancedMatchingAvailableProperties(m)}_.on("beforeReport",(function(e,t,n,r,i){h.dispatch(sr.PIXEL_SEND,e,t,n,r,i)})),v.push(_),e.rebind(Sr.TTQ_REPORTERS).toConstantValue(v),h.dispatch(sr.PIXEL_DID_MOUNT,_);try{window.ttq&&window.ttq._ppf&&(p.end=performance.now(),window.ttq._ppf.push(p))}catch(e){}return _}},Lo=function(e,t){var n=e.get(Sr.TTQ_GLOBAL_OPTIONS)||{};!function(e,t){var n=e||{},r=n._partner,i=n._ttp,o=n._self_host_config,a=n._usd_exchange_rate,c=n._legacy,s=n._cc,u=n._variation_id,l=n._server_unique_id,f=n._currency_list,d=n._plugins,p=n._aam,h=n._auto_config,v=n._sm;Object.assign(t,{partner:r,ttp:i,cc:s,self_host_config:o,usd_exchange_rate:a,legacy:c,variation_id:u,server_unqiue_id:l,currency_list:f,plugins:d,aam:p,auto_config:h,sm:v})}(t,n),e.isBound(Sr.TTQ_GLOBAL_OPTIONS)?e.rebind(Sr.TTQ_GLOBAL_OPTIONS).toConstantValue(n):e.bind(Sr.TTQ_GLOBAL_OPTIONS).toConstantValue(n)},Do=function(e){var t=qr(),n=Jr(),r=Wr(),i=Fi().pixelCode,o=void 0===i?"":i,a=["holdConsent","revokeConsent","grantConsent"];["instance","instances","loadPixel","enableCookie","disableCookie","holdConsent","revokeConsent","grantConsent"].forEach((function(t){Object.defineProperty(r,t,{get:function(){return function(){try{var n=Array.prototype.slice.call(arguments);return a.indexOf(t)>-1&&setTimeout((function(){xi(wr.CUSTOM_INFO,{pixelCode:o,custom_name:t,custom_enum:JSON.stringify(n)})})),e[t].apply(e,n)}catch(e){return ji(wr.API_ERROR,e,{extJSON:{api:t}}),{}}}},set:function(){}})})),["page","track","identify"].forEach((function(t){Object.defineProperty(r,t,{get:function(){return function(){try{var n=1===arguments.length&&void 0===arguments[0]?[]:Array.prototype.slice.call(arguments);return a.indexOf(t)>-1&&setTimeout((function(){var e=JSON.stringify(n.map((function(e){return er(e)?Object.keys(e):e})));xi(wr.CUSTOM_INFO,{pixelCode:o,custom_name:t,custom_enum:e})})),fo(t,n),e[t].apply(e,n)}catch(e){return ji(wr.API_ERROR,e,{extJSON:{api:t}}),{}}}},set:function(){}})})),t[n]._mounted=!0,t[n].initialize=!0,function(e){Vr=e}(t[n])},xo=function(e,t,n){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf)var r={taskName:window.ttq._pf_tn,functionName:"handleCache",start:performance.now()}}catch(e){}var i=Wr(),o=function(){var e=Wr();return e&&e._i||{}}();if(Object.entries(o).forEach((function(r){var i=_(r,2),o=i[0],a=i[1];if(!a._init&&("Tealium"===Qr(o)||Kr()||a.info)){if(t.getReporter(o))Ui(Nr.DUPLICATE_PIXEL_CODE);else(n||Mo)(e,{id:o,type:Zn.PIXEL_CODE,info:a.info,options:a.options,rules:a.rules,plugins:a.plugins});if(a._init=!0,a.length>0)for(;a.length;){var c=a.shift();if(c){var s=g(c),u=s[0],l=s.slice(1),f=t.instance(o);if(f)switch(u){case"identify":t.identify(l[0],l[1]);break;case"page":t.page(l[0]);break;case"track":f.track(l[0],l[1],l[2]||{});break;default:f[u]?f[u](l[0],l[1],l[2]||{}):ji(wr.CUSTOM_ERROR,new Error("action not find: ".concat(f[u])))}}}}})),i.length>0)for(;i.length;){var a=i.shift();if(a){var c=g(a),s=c[0],u=c.slice(1);switch(zr("Tealium")||fo(s,u),s){case"identify":t.identify(u[0],u[1]);break;case"page":t.page(u[0]);break;case"track":t.track(u[0],u[1],u[2]||{});break;case"enableCookie":t.enableCookie();break;case"disableCookie":t.disableCookie();break;case"holdConsent":t.holdConsent();break;case"revokeConsent":t.revokeConsent();break;case"grantConsent":t.grantConsent()}}}try{window.ttq&&window.ttq._ppf&&(r.end=performance.now(),window.ttq._ppf.push(r))}catch(e){}},jo={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"},Uo=["event_experiment","dynamic_parameter_config","eb_version","tf"],Fo=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},Bo=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.forEach((function(e){t.hasOwnProperty(e)&&(n[e]=t[e],delete t[e])})),n},Ho=function(){return"Shopify"===Qr()},Go=function(e){s(r,e);var n=p(r);function r(e){var t,o;i(this,r);var a=e.id,s=e.type,u=e.isOnsitePage,l=e.context,f=e.reporterInfo,d=e.ttqOptions,p=e.reportService,h=e.plugins,v=void 0===h?{}:h,_=e.rules,g=void 0===_?[]:_,y=e.options,m=void 0===y?{}:y;return(o=n.call(this,l,p)).ttp="",o.loaded=!1,o.id=a,o.pixelCode=a,o.type=s,o.isOnsitePage=u,o.options=m||{},o.plugins=v||{},o.rules=g||[],o.reporterInfo=Object.assign(f||{},(c(t={},s,a),c(t,"isDroppedShopifyPixel",d&&d.sm&&!!d.sm[o.id]),t)),o.ttp=d.ttp||"",o.currency_list=d.currency_list||null,o.ttqPartner=d.partner||"",o.selfHostConfig=d.self_host_config||{},o.pixelPromise=o.getInstance(),o}return a(r,[{key:"identify",value:function(e,t){var n=_i(e,t);this.context.setUserInfo(n)}},{key:"getReporterId",value:function(){return this.id||""}},{key:"getReporterUniqueLoadId",value:function(){return"".concat(this.reporterInfo.loadId,"-").concat(this.getReporterId())}},{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(){return Promise.resolve(this)}},{key:"getReporterInfo",value:function(){return this.reporterInfo.pixelCode?v(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=ci(t,Object.assign({},this.advancedMatchingAvailableProperties));switch(e){case qn.Manual:return ci(this.isPartnerReporter()?n:t,{external_id:!0,email:!0,phone_number:!0});case qn.ManualV2:return ci(this.isPartnerReporter()?n:t,{first_name:!0,last_name:!0,city:!0,state:!0,country:!0,zip_code:!0,partner_id:!0});case qn.Auto:var r=ci(n,{external_id:!0,auto_email:!0,auto_phone_number:!0});return Object.assign(r,(r.auto_email||r.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=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]||[Gn.EMPTY_VALUE];n.identity_params[i]=y(o)}else n.identity_params[i]=[Gn.EMPTY_VALUE]})),n)}(e,this.isPartnerReporter()?this.advancedMatchingAvailableProperties:{external_id:!0,email:!0,phone_number:!0}),n=ci(e,{auto_email:!0,auto_phone_number:!0});return Object.keys(n).length>0&&(t.identity_params||(t.identity_params={}),Object.assign(t.identity_params,n)),t}},{key:"getReporterMatchedUserFormatInfoV2",value:function(){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"],zip_code:["zip_code"]};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]=[Gn.EMPTY_VALUE],e[t]){var r=e[t]||[Gn.EMPTY_VALUE];n.identity_params&&(n.identity_params[t]=y(r))}}))})),n}(this.context.getUserFormatInfoV2(),this.isPartnerReporter()?this.advancedMatchingAvailableProperties:{external_id:!0,email:!0,phone_number:!0,first_name:!0,last_name:!0,city:!0,state:!0,country:!0,zip_code:!0,partner_id:!0})}},{key:"isOnsite",value:function(){var e;return!!(null===(e=this.reporterInfo)||void 0===e?void 0:e.is_onsite)}},{key:"isPartnerReporter",value:function(){var e=this.getReporterPartner();return!(!e||"None"===e)}},{key:"getSignalDiagnosticLabels",value:function(){var e=this.context.getSignalDiagnosticLabels();if(!e)return Object.assign({},$n);var t=this.advancedMatchingAvailableProperties,n=t.email,r=t.phone_number,i=t.auto_email,o=t.auto_phone_number;n=!this.isPartnerReporter()||n,r=!this.isPartnerReporter()||r;var a=ci(e,{raw_email:n,raw_phone:r,hashed_email:n,hashed_phone:r,raw_auto_email:i,raw_auto_phone:o});return Object.assign({},$n,a)}},{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]:br.TRACK,a=v(u(r.prototype),"assemblyData",this).call(this,e,t,n,i,o);a.is_onsite=this.isOnsitePage.value;var c=Qr(e)||this.ttqPartner;c&&(a.partner=c),a.signal_diagnostic_labels=this.getSignalDiagnosticLabels();var s=Yr();s&&(a.context.userAgent=s);var l=zi();return l&&(a.context.page.load_progress=l),a._inspection=Bo(Uo,a.properties,a._inspection),a._inspection.ppf=$r(),a.context.ad.sdk_env=Ei(),a.context.ad.jsb_status=Pi(),o!==br.INTERACTION&&o!==br.PERFORMANCE&&o!==br.PERFORMANCE_INTERACTION||!1!==this.context.getEnableAdTracking()||this.isOnsitePage.value||(a.context.user={},a.context.ad=this.context.getOffsiteAdInfo(),a.context.ad=ai(a.context.ad,Xn)),a}},{key:"page",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.location.href!==this.currentHref&&(this.currentHref=window.location.href,this.track(Tr,e,{}))}},{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]:br.TRACK,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Bn.defaultReport;return i&&i.pixel_code&&this.getReporterId()!==i.pixel_code?Promise.resolve(null):this.getInstance().then((function(){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var c={taskName:"track_after_reporter_init",functionName:void 0,start:performance.now()};window.ttq._pf_tn="track_after_reporter_init"}}catch(e){}var s=t.getReporterId();if(Rr.includes(e))return v(u(r.prototype),"track",t).call(t,e,n,i,o,a);var l=Object.assign({},i);t.selfHostConfig[s]&&!i.eventID&&(l=Object.assign({},l,{eventID:rr(nr(mr),s)}));try{window.ttq&&window.ttq._ppf&&(c.end=performance.now(),window.ttq._ppf.push(c),window.ttq._pf_tn="")}catch(e){}return v(u(r.prototype),"track",t).call(t,e,n,l,o,a)}))}},{key:"getEventType",value:function(e){return jo[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]:br.TRACK,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Bn.defaultReport,l=arguments.length>6?arguments[6]:void 0;if("track"===c&&xi(wr.PIXEL_SEND,{pixelCode:e,extJSON:{event:n}}),c===br.TRACK){o&&"string"==typeof o.currency&&(o.currency=o.currency.toUpperCase());var f=this.context.getTestID();if(f){var d=this.assemblyData(e,n,o,a);d.tt_test_id=f;var p=Fo(d);return null===(i=null==this?void 0:this.reportService)||void 0===i||i.report(l||Pr,p,Bn.httpReport),p}if(o&&"object"===t(o)){var h=o.value,_=o.currency;void 0===h||ro(h)||xi(wr.CUSTOM_ERROR,{pixelCode:e,custom_name:"invalid_value",extJSON:{event:n,value:h,currency:_}}),void 0===_||no(_,this.currency_list)||xi(wr.CUSTOM_ERROR,{pixelCode:e,custom_name:"invalid_currency",extJSON:{event:n,value:h,currency:_}})}return v(u(r.prototype),"trackSync",this).call(this,e,n,o,a,c,s,l)}v(u(r.prototype),"trackSync",this).call(this,e,n,o,a,c,s,l)}},{key:"trackPostTask",value:function(e){var t=e.reporterId,n=e.eventType,r=e.properties,i=e.eventConfig;Rr.includes(n)||this.selfHostConfig[t]&&!this.hasReportEventHistory(n,Bn.htmlHttpReport)&&(this.pushReport(n,this.getReportEventHistoryKey(Bn.htmlHttpReport)),this.trackSync(t,n,r,i,br.SELFHOST,Bn.htmlHttpReport))}},{key:"getReportEventHistoryKey",value:function(e){return e===Bn.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}(bo),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},qo=function(e,t){return function(n,r){t(n,r,e)}},Jo=function(e){s(n,e);var t=p(n);function n(e,r,o,a,c,s,u,l,f,d){return i(this,n),t.call(this,{id:e,type:r,isOnsitePage:o,context:a,reporterInfo:c,ttqOptions:s,reportService:u,plugins:l,rules:f,options:d})}return a(n,[{key:"getInstance",value:function(){var e=this;if(this.pixelPromise)return this.pixelPromise;var t=function(e){return lo()[e]||{}}(this.id);return Kr()||t&&t.info?(this.loaded=!0,this.pixelPromise=Promise.resolve(this)):(this.pixelPromise=new Promise((function(t,n){var r,i;$i((r=e.id,i=location&&location.hostname,"".concat("https://analytics.tiktok.com/i18n/pixel/config.js","?sdkid=").concat(r,"&hostname=").concat(i))).then((function(){e.loaded=!0,t(e)})).catch((function(t){e.pixelPromise=null,n(t)}))})),this.pixelPromise)}},{key:"track",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:br.TRACK,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Bn.defaultReport,a=r.event_id||t.event_id||"";return Ho()&&this.reporterInfo.isDroppedShopifyPixel&&a&&("Purchase"===e||a.startsWith("sh-"))&&(t.event_id&&delete t.event_id,r.event_id="trekkie_".concat(a),Object.assign(t,{event_experiment:"trekkie"})),v(u(n.prototype),"track",this).call(this,e,t,r,i,o)}}]),n}(Go),Wo=function(e){s(n,e);var t=p(n);function n(){return i(this,n),t.apply(this,arguments)}return a(n,[{key:"getInstance",value:function(){return this.pixelPromise=Promise.resolve(this),this.pixelPromise}},{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}(Jo=Vo([R.injectable(),qo(0,R.inject(Ir.ID)),qo(1,R.inject(Ir.Type)),qo(2,R.inject(Ir.IsOnsitePage)),qo(3,R.inject(Sr.CONTEXT)),qo(4,R.inject(Ir.Info)),qo(5,R.inject(Sr.TTQ_GLOBAL_OPTIONS)),qo(6,R.inject(Sr.REPORT_SERVICE)),qo(6,R.optional()),qo(7,R.inject(Ir.Plugins)),qo(7,R.optional()),qo(8,R.inject(Ir.Rules)),qo(8,R.optional()),qo(9,R.inject(Ir.Options)),qo(9,R.optional())],Jo)),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=function(e,t){return function(n,r){t(n,r,e)}},Xo=function(t){s(c,t);var n,o=p(c);function c(e,t,n,r,a,s,u,l,f,d,p,h,v,_,g,y,m,E,b,I,T,O,S,w){var N;return i(this,c),(N=o.call(this,e,a)).env=l,N.reporters=t,N.cookieService=s,N.consentService=u,N.adService=n,N.appService=r,N.historyObserver=S,N.autoAdvancedMatchingPlugin=d,N.callbackPlugin=p,N.identifyPlugin=h,N.monitorPlugin=f,N.performanceInteractionPlugin=v,N.webFLPlugin=_,N.shopifyPlugin=g,N.autoConfigPlugin=y,N.diagnosticsConsolePlugin=m,N.competitorInsightPlugin=E,N.pangleCookieMatchingPlugin=b,N.eventBuilderPlugin=I,N.pagedataPlugin=O,N.enrichIpv6Plugin=T,N.runtimeMeasurementPlugin=w,N.historyObserver&&N.useObserver(N.historyObserver),N.autoAdvancedMatchingPlugin&&N.usePlugin(N.autoAdvancedMatchingPlugin),N.callbackPlugin&&N.usePlugin(N.callbackPlugin),N.identifyPlugin&&N.usePlugin(N.identifyPlugin),N.monitorPlugin&&N.usePlugin(N.monitorPlugin),N.performanceInteractionPlugin&&N.usePlugin(N.performanceInteractionPlugin),N.webFLPlugin&&N.usePlugin(N.webFLPlugin),N.shopifyPlugin&&N.usePlugin(N.shopifyPlugin),N.autoConfigPlugin&&N.usePlugin(N.autoConfigPlugin),N.diagnosticsConsolePlugin&&N.usePlugin(N.diagnosticsConsolePlugin),N.competitorInsightPlugin&&N.usePlugin(N.competitorInsightPlugin),N.pangleCookieMatchingPlugin&&N.usePlugin(N.pangleCookieMatchingPlugin),N.eventBuilderPlugin&&N.usePlugin(N.eventBuilderPlugin),N.enrichIpv6Plugin&&N.usePlugin(N.enrichIpv6Plugin),N.runtimeMeasurementPlugin&&N.usePlugin(N.runtimeMeasurementPlugin),N.monitorPlugin&&(Di.info.forEach((function(e){var t;null===(t=N.monitorPlugin)||void 0===t||t.info(e.event,e.detail,e.withoutJSB)})),Di.error.forEach((function(e){var t;null===(t=N.monitorPlugin)||void 0===t||t.error(e.event,e.err,e.detail,e.withoutJSB)})),Di.info=[],Di.error=[]),N.dispatch(sr.INIT_START),N.pagedataPlugin&&N.usePlugin(N.pagedataPlugin),N.onPageLoaded(),N.onPageLeave(),N.init(window.location),N.setPageInfo(location.href,document.referrer),N.dispatch(sr.INIT_END),N}return a(c,[{key:"initAdInfo",value:function(e){this.dispatch(sr.BEFORE_AD_INFO_INIT_START);var t=Hi(dr);if(t)this.initAdCache(t);else if(Mi()){var n=ho(e);n&&(n.creative_id&&n.log_extra||n.callback)&&(this.dispatch(sr.AD_INFO_INIT_START),Gi(dr,n),this.setAdInfo(n),this.initOffsiteAdInfo(n))}else this.initBaseAdInfo(e)}},{key:"initAdCache",value:function(e){this.dispatch(sr.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(t){var n=this;this.adService.webBridgeService.jsbridge&&this.dispatch(sr.AD_INFO_INIT_START),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.prev=0,e.next=3,n.adService.getAdInfo(t);case 3:i=e.sent,n.context.setAdInfo(i),n.initOffsiteAdInfo(i),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),ji(wr.INIT_ERROR,e.t0,{extJSON:{position:"initAdInfo"}});case 11:case"end":return e.stop()}}),r,null,[[0,8]])})))())}},{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,p=f.ad_id,h=f.rit,v=f.ocbs,_=f.vid,g=f.idc,y=f.country_id;p&&(n.ad_id=p),h&&(n.rit=h),d&&(n.ad_user_agent=d),v&&(n.ocbs=v),_&&(n.vid=_),g&&(n.idc=g),y&&(n.country_id=y)}return n}catch(e){return t&&t(e),n}}(e,(function(e){ji(wr.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!Ni()||(Ti(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(sr.AD_INFO_INIT_END,{extJSON:{enabledAdTracking:n}})}},{key:"initAppInfo",value:function(t){var n=this,i=Hi(pr);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=qi("tt_test_id",e);return n&&n!==t&&Qi("tt_test_id",n,void 0,"session"),n||t}catch(e){return""}}(e,Wi("tt_test_id"));this.context.setTestID(t)}}},{key:"initUserInfo",value:function(){this.setCookieInfo()}},{key:"setPageIndex",value:function(e){e&&Yi(e)}},{key:"instance",value:function(e){var t=this.getReporter(e);return t||new Wo(e,Zn.PIXEL_CODE,{value:!1},this.context,{pixelCode:e},{})}},{key:"instances",value:function(){return this.reporters}},{key:"page",value:function(e){v(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:"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)v(u(c.prototype),"track",this).call(this,e,t,n);else{var i=this.instance(r);if(i instanceof Wo)return;i.track(e,t,n)}}},{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(Qn.HOLD)}},{key:"revokeConsent",value:function(){this.consentService.setConsentMode(Qn.REVOKE)}},{key:"grantConsent",value:function(){this.consentService.setConsentMode(Qn.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(sr.PAGE_DID_LOAD)}),{once:!0})}},{key:"onPageLeave",value:function(){var e=this,t=function(){var t=Date.now();e.dispatch(sr.PAGE_WILL_LEAVE,t),e.consentService.updateCache()};window.addEventListener("beforeunload",t,{once:!0}),Ni()&&window.addEventListener("onpagehide"in window?"pagehide":"unload",t)}},{key:"loadPixel",value:function(e,t){e&&(this.reporters.find((function(t){return t.getReporterId()===e}))?Ui(Nr.DUPLICATE_PIXEL_CODE):Wr().load(e,t||{}))}}]),c}(wo),Qo=Xo=Ko([R.injectable(),Yo(0,R.inject(Sr.CONTEXT)),Yo(1,R.inject(Sr.TTQ_REPORTERS)),Yo(2,R.inject(Sr.AD_SERVICE)),Yo(3,R.inject(Sr.APP_SERVICE)),Yo(4,R.inject(Sr.REPORT_SERVICE)),Yo(5,R.inject(Sr.COOKIE_SERVICE)),Yo(6,R.inject(Sr.CONSENT_SERVICE)),Yo(7,R.inject(Sr.ENV)),Yo(8,R.inject(Sr.MONITOR_PLUGIN)),Yo(8,R.optional()),Yo(9,R.inject(Sr.AUTO_ADVANCED_MATCHING_PLUGIN)),Yo(9,R.optional()),Yo(10,R.inject(Sr.CALLBACK_PLUGIN)),Yo(10,R.optional()),Yo(11,R.inject(Sr.IDENTIFY_PLUGIN)),Yo(11,R.optional()),Yo(12,R.inject(Sr.PERFORMANCE_INTERACTION_PLUGIN)),Yo(12,R.optional()),Yo(13,R.inject(Sr.WEB_FL_PLUGIN)),Yo(13,R.optional()),Yo(14,R.inject(Sr.SHOPIFY_PLUGIN)),Yo(14,R.optional()),Yo(15,R.inject(Sr.AUTO_CONFIG_PLUGIN)),Yo(15,R.optional()),Yo(16,R.inject(Sr.DIAGNOSTICS_CONSOLE_PLUGIN)),Yo(16,R.optional()),Yo(17,R.inject(Sr.COMPETITOR_INSIGHT_PLUGIN)),Yo(17,R.optional()),Yo(18,R.inject(Sr.PANGLE_COOKIE_MATCHING_PLUGIN)),Yo(18,R.optional()),Yo(19,R.inject(Sr.EVENT_BUILDER_PLUGIN)),Yo(19,R.optional()),Yo(20,R.inject(Sr.ENRICH_IPV6_PLUGIN)),Yo(20,R.optional()),Yo(21,R.inject(Sr.PAGEDATA_PLUGIN)),Yo(21,R.optional()),Yo(22,R.inject(Sr.HISTORY_OBSERVER)),Yo(22,R.optional()),Yo(23,R.inject(Sr.RUNTIME_MEASUREMENT_PLUGIN)),Yo(23,R.optional())],Xo);!function(e){e.BIND="bind",e.REBIND="rebind"}(Co||(Co={}));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(e){s(n,e);var t=p(n);function n(e,r,o,a,c){var s;return i(this,n),(s=t.call(this,e)).setSignalType(c||cr.OFFSITE),s.pageSign={sessionId:"",pageId:"",variationId:"",pageIndex:{main:-1,sub:-1,index:-1}},s.legacy=o.legacy||[],s.variationId=o.variation_id||"",s.serverUniqueId=o.server_unqiue_id||"",s.reportService=r,s.initPageSign(),Ti(a)&&Ni()&&(s.enableAdTracking=!1),s.data=f(s),s}return a(n,[{key:"getSessionIdFromCache",value:function(){var e=null;try{e=JSON.parse(sessionStorage.getItem(gr)||"")}catch(e){}return e}},{key:"setSessionIdToCache",value:function(e){Gi(gr,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(){var e={main:-1,sub:-1,index:-1};try{var t=JSON.parse(sessionStorage.getItem(yr)||"{}");if(t)return Object.assign({},e,t)}catch(e){}return e}},{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!==Gr?n[i]=String(o).trim():e.setUserInfoWithoutIdentifyPlugin(c({},Gr,o)))}));var r=Wr(),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]:{};try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var r={taskName:"identify_after_encryption",functionName:void 0,start:performance.now()};window.ttq._pf_tn="identify_after_encryption"}}catch(e){}var o=t.userProperties,a=t.userDataFormat,c=t.userDataFormatV2;if(o){Object.assign(e.userInfo,o);var s=e.getUserFormatInfo()||{},u=e.getUserFormatInfoV2()||{},l=e.getSignalDiagnosticLabels()||{};if(e.setUserFormatInfo(Object.assign({},s,a)),e.setUserFormatInfoV2(Object.assign({},u,c)),e.setSignalDiagnosticLabels(Object.assign({},l,t.identifierLabel||{})),0===Object.keys(e.userInfo).length||1===Object.keys(n).length&&Object.keys(n).includes("external_id"))return;var f=i.reporters[0]||null,d=f?Object.keys(Object.assign({},f.getUserInfo(qn.Manual),f.getUserInfo(qn.Auto))):[];f&&d.length&&f.track("EnrichAM",{},{},br.TRACK)}try{window.ttq&&window.ttq._ppf&&(r.end=performance.now(),window.ttq._ppf.push(r),window.ttq._pf_tn="")}catch(e){}})).catch((function(e){ji(wr.API_ERROR,e,{extJSON:{api:"identify"}})})))}}},{key:"initPageSign",value:function(){var e,t=this.getSessionIdFromCache();null===t&&(t=(e=this.serverUniqueId)?"".concat(e).concat(Er).concat(oi(20)):nr("sessionId"),this.setSessionIdToCache(t));var n,r=this.getPageId((n=t)?n.split(Er)[0]:""),i=this.getVariationId(),o=this.getSessionIndex();o.main++,this.pageSign={sessionId:t,pageId:r,variationId:i,pageIndex:o}}}]),n}(_o);$o=zo([R.injectable(),Zo(0,R.inject(Ir.WebLibraryInfo)),Zo(1,R.inject(Sr.REPORT_SERVICE)),Zo(2,R.inject(Sr.TTQ_GLOBAL_OPTIONS)),Zo(3,R.inject(Sr.ENV)),Zo(3,R.optional()),Zo(4,R.inject(Ir.SignalType)),Zo(4,R.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=function(e,t){return function(n,r){t(n,r,e)}},na=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)&&Gi(dr,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;return ho(e)}}]),t}();na=ea([R.injectable(),ta(0,R.inject(Sr.BRIDGE_SERVICE))],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(){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=Oi(),!wi()){e.next=11;break}return e.next=6,Si();case 6:o=e.sent,a=o.model,c=o.platformVersion,i.device_model=a,i.android_version=c;case 11:return tr(i)||Gi(pr,i),e.abrupt("return",i);case 13:case"end":return e.stop()}}),t,this)}))),function(e){return n.apply(this,arguments)})},{key:"getAppInfoFromURL",value:function(e){try{var t=qi(xr,e||window.location.href),n=t&&JSON.parse(t);return{device_id:n.device_id,user_id:n.uid}}catch(e){return{}}}}]),t}();oa=ra([R.injectable(),ia(0,R.inject(Sr.BRIDGE_SERVICE))],oa);var aa="ad_analytics_msg",ca=function(e){return!!(e.code&&e.data&&e.ret)};function sa(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(ca(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&&ji(wr.JSB_ERROR,e,{extJSON:{position:"getCallPromise bridge.call"}})}return n}var ua,la=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},fa=function(e,t){return function(n,r){t(n,r,e)}},da=function(){function t(e,n,r){i(this,t),this.env=n,Ii(this.env)&&(this.jsbridge=r),this.bridgeTimeout=400,this.ttqOptions=e}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 ji(wr.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({}),ji(wr.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 xi(wr.CUSTOM_INFO,{custom_name:"ad_info_init_timeout"}),e.abrupt("return",{ad_info_status:"timeout"});case 17:return ji(wr.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,d,p,h;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:return 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=ni(n,this.ttqOptions),u={analytics_message:c,trackLogData:JSON.stringify(n),category:"ad_analytics_msg",tag:aa,label:s},d={eventName:aa,labelName:s,value:a,extValue:"0",extJson:u},Mi()||ti(n)?(f="sendLog",l=this.call("sendLog",d,this.bridgeTimeout)):Ti(this.env)?Ni()&&r?(p={eventName:s,params:u},f="sendLogWithAdInfo",l=this.call("sendLogWithAdInfo",p,this.bridgeTimeout)):(f="sendLog",l=this.call("sendLog",d,this.bridgeTimeout)):(h={event_name:s,version:2,properties:u},f="track_event",l=this.call("track_event",h,400)),xi(wr.CUSTOM_INFO,{custom_name:"send_report_data",extJSON:{api_name:f}}),e.abrupt("return",l);case 10: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&&ji(wr.JSB_ERROR,new Error("JSBRIDGE ERROR"),{extJSON:{position:"getCallPromise"}}));var c;i>0&&(c=window.setTimeout((function(){t("JSBRIDGE TIMEOUT"),o&&ji(wr.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=sa(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(!Ti(this.env)||!Ni()){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}();da=la([R.injectable(),fa(0,R.inject(Sr.TTQ_GLOBAL_OPTIONS)),fa(1,R.inject(Sr.ENV)),fa(1,R.optional()),fa(2,R.inject(Sr.JS_BRIDGE)),fa(2,R.optional())],da),function(e){e[e.P0=4]="P0",e[e.P1=3]="P1",e[e.P2=2]="P2",e[e.P3=1]="P3"}(ua||(ua={}));var pa=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="tt_hold_events",va=function(e){s(n,e);var t=p(n);function n(){var e;return i(this,n),(e=t.apply(this,arguments)).consentMode=Qn.UNKNOWN,e.queue=[],e.debounceUpdateCache=si((function(){e.updateCache()}),200,f(e)),e.handleHistoryQueue=ii((function(){var t=Hi(ha);Array.isArray(t)&&(e.queue=e.queue.concat(t),e.changeQueueWithConsent())})),e}return a(n,[{key:"on",value:function(e,t){v(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 Qn.REVOKE:this.cleanQueue();break;case Qn.GRANT:this.releaseQueue(),this.cleanQueue();case Qn.HOLD:case Qn.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]:Bn.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){}}(ha)}},{key:"updateCache",value:function(){this.queue&&this.queue.length>0&&Gi(ha,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?ua.P0:e.action&&e.action.length>0?ua.P1:""===e.event?ua.P2:ua.P3}}]),n}(yo);va=pa([R.injectable()],va);var _a=function(e){return Boolean(e)},ga=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},ya=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,ui(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}();ya=ga([R.injectable()],ya);var 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},Ea=function(e,t){return function(n,r){t(n,r,e)}},ba=function(t){s(f,t);var n,o,c,u,l=p(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,f;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 l=!!(u=r).context&&"timeout"===(null===(a=null===(o=u.context)||void 0===o?void 0:o.ad)||void 0===a?void 0:a.ad_info_status),f={},e.prev=5,e.next=8,this.bridgeService.send(u,l);case 8:if((f=e.sent)&&1===f.code){e.next=11;break}throw new Error("[fetch bridge] sendLog error: code ".concat(f&&f.code,", data: ").concat(f&&JSON.stringify(f)));case 11:return ei(u.event)&&xi(wr.JSB_SEND,{pixelCode:null===(c=u.context.pixel)||void 0===c?void 0:c.code,app_name:Ai()?"ultralite":"",extJSON:{event:u.event,event_id:u.event_id,need_inject_ad_info:l}}),e.abrupt("return",f);case 15:e.prev=15,e.t0=e.catch(5),ei(u.event)&&ji(wr.JSB_ERROR,e.t0,{pixelCode:null===(s=u.context.pixel)||void 0===s?void 0:s.code,custom_name:"sendReportData",custom_enum:f&&f.code?"".concat(f.code):"non",app_name:Ai()?"ultralite":"",extJSON:{position:"sendReportData"}}),Ai()&&wi()&&this.sendHttpReport(n,u,i);case 19:case"end":return e.stop()}}),t,this,[[5,15]])}))),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&&xi(wr.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]:Bn.defaultReport,(o=this.consentService.getConsentMode())!==Qn.REVOKE){e.next=4;break}return e.abrupt("return",!1);case 4:if(o!==Qn.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]:Bn.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!==Bn.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!==Bn.httpReport||!this.bridgeService.jsbridge||!Ti(this.env)||Ri()||!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),ji(wr.CUSTOM_ERROR,e.t0,{custom_name:"sendAnalyticsEvent",custom_enum:String(c)},!0);case 30:this.sendHttpReport(n,r,o,!(!ei(r.event)||!ri(r)),_a(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}(Ro);ba=ma([R.injectable(),Ea(0,R.inject(Sr.HTTP_SERVICE)),Ea(1,R.inject(Sr.BRIDGE_SERVICE)),Ea(2,R.inject(Sr.CONSENT_SERVICE)),Ea(3,R.inject(Sr.ENV)),Ea(3,R.optional())],ba);var Ia={expires:390},Ta=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},Oa=function(){function t(){i(this,t)}var n;return a(t,[{key:"genCookieID",value:function(){return oi(27)}},{key:"enableCookie",value:(n=r(e().mark((function t(){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ki(hr,"1",Ia),e.abrupt("return",$i("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){Ki(hr,"1",Ia);var t=this.genCookieID(),n=this.getAnonymousId();this.setAnonymousId(n||t)}}},{key:"disableCookie",value:function(){Ki(hr,"0",Ia),Ki(vr,"",Object.assign(Ia,{expires:-1})),$i("https://analytics.tiktok.com/i18n/pixel/disable_cookie")}},{key:"setAnonymousId",value:function(e){var t=this.getAnonymousId()||e;t&&Ki(vr,t,Ia)}},{key:"getAnonymousId",value:function(){return Wi(vr)||""}},{key:"canUseCookie",value:function(){try{return"0"!==Wi(hr)}catch(e){}return!1}},{key:"resetExpires",value:function(){var e=Wi(hr);e&&Ki(hr,e,Ia);var t=this.getAnonymousId();t&&this.setAnonymousId(t)}}]),t}();Oa=Ta([R.injectable()],Oa);var Sa=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},wa=function(e,t){return function(n,r){t(n,r,e)}},Na=function(e){s(n,e);var t=p(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=qi("ttclid");t&&Qi("ttclid",t)}},{key:"beforeShopifyPixelSend",value:function(e,t){var n=Vi(e,"ttclid");n||(n=Vi(t,"ttclid")),n&&Qi("ttclid",n)}}]),n}(Oo);Na=Sa([R.injectable(),wa(0,R.inject(Sr.CONTEXT)),wa(1,R.inject(Sr.TTQ_REPORTERS))],Na);var Ra={isHash:function(e){return!1},genIdentifierLabelByUserProperties:function(e){return{}}},Aa={validatePhoneNumberLength:function(e){},parsePhoneNumberFromString:function(e){}},Pa={tryDecodeHashedBase64String:function(e){return null},tryDecodeHashedBase64Hex:function(e){return null}},Ca=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;Pa.tryDecodeHashedBase64String=t,Pa.tryDecodeHashedBase64Hex=n}({tryDecodeHashedBase64String:a,tryDecodeHashedBase64Hex:c}),function(e){var t=e.isHash,n=e.genIdentifierLabelByUserProperties;Ra.isHash=t,Ra.genIdentifierLabelByUserProperties=n}({isHash:i,genIdentifierLabelByUserProperties:o}),function(e){var t=e.parsePhoneNumberFromString,n=e.validatePhoneNumberLength;Aa.parsePhoneNumberFromString=t,Aa.validatePhoneNumberLength=n}({parsePhoneNumberFromString:n,validatePhoneNumberLength:r})},ka=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Aa.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},Ma=["(null)","","''\"",void 0,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","eb045d78d273107348b0300c01d29b7552d622abbc6faf81b3ec55359aa9950c","not set",null,"6181738008c985a1b5f106b796c98e719efcc3c0ff68ddcd14a049825f4900a8","2a539d6520266b56c3b0c525b9e6128858baeccb5ee9b694a2906e123c8d6dd3","c6e52c372287175a895926604fa738a0ad279538a67371cd56909c7917e69ea1","None","74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b","f24f02d3c35894296522abac8c4b2439b1c1b650e1fb4c97c0f3c50b580b0a3c","no","a683c5c5349f6f7fb903ba8a9e7e55d0ba1b8f03579f95be83f4954c33e81098","f18a2548c063c5a2b1560c6f2b9ec44bf9ed9017884404016d74f330119aaefe","449f06574cd639e1826848ff5d70ba95904574be84f34e61baa526d517dfb493","fcbcf165908dd18a9e49f7ff27810176db8e9f63b4352213741664245224f8aa","NA","bc857c49633bbc75644c51f36b16b2f768cc0ee13f65402ec7c32c96308272dd","42cbf37902c6911d7b4e371fe8f8708a0ceda6946249d4a3e23de8d5e60ae8b7"],La=function(e){s(n,e);var t=p(n);function n(e){var r=e.name,o=e.context,a=e.reporters;return i(this,n),t.call(this,{name:r,reporters:a,context:o})}return a(n,[{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,l=e.getCookieDeprecationLabel,f=void 0===l?function(){}:l,d=e.getAllTopics,p=void 0===d?function(){}:d;Ca({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,this.getCookieDeprecationLabel=f,this.getAllTopics=p}},{key:"baseHandleUserProperties",value:function(e,t){var n=this;try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var r={taskName:"identify_encryption",functionName:void 0,start:performance.now()};window.ttq._pf_tn="identify_encryption"}}catch(e){}if(e){var i=this.identifyParamsFormattedInfo(e),o=this.identifyParamsFormattedInfoV2(e),a=Ra.genIdentifierLabelByUserProperties(t);this.handlePIIDiagnostics(o),Object.entries(e).forEach((function(t){var r=_(t,2),i=r[0],a=r[1],c=void 0===a?"":a;if(c){var s=String(c);if(["email","phone_number","sha256_email","sha256_phone_number"].includes(i)){var u=n.getUserDataFormatInfoV2KeyName(i),l=Pa.tryDecodeHashedBase64Hex(s);if(null!==l)e[i]=l,null!==u&&(o=n.updateUserDataFormatV2Label(u,Vn.BASE64_HEX_HASHED,o));else{var f=Pa.tryDecodeHashedBase64String(s);f&&(e[i]=f,null!==u&&(o=n.updateUserDataFormatV2Label(u,Vn.BASE64_STRING_HASHED,o)))}}switch("zip_code"===i&&s&&(Ra.isHash(s)?o=n.updateUserDataFormatV2Label("zip_code",Vn.ZIP_CODE_IS_HASHED,o):(o=n.updateUserDataFormatV2Label("zip_code",Vn.ZIP_CODE_IS_NOT_HASHED,o),n.isZipFromUs(e)?(e.zip_code=n.sha256(n.truncateString(s,5)),o=n.updateUserDataFormatV2Label("zip_code",Vn.ZIP_CODE_IS_US,o)):(e.zip_code=n.sha256(s),o=n.updateUserDataFormatV2Label("zip_code",Vn.ZIP_CODE_IS_NOT_US,o)))),i){case"email":e.email=Ra.isHash(s)&&!n.checkEmailFormat(s)?s:n.sha256(n.handleEmail(s));break;case"phone_number":e.phone_number=Ra.isHash(s)?s:n.sha256(n.handlePhoneNumber(s));break;case"auto_email":e.auto_email=n.sha256(n.handleEmail(s));break;case"auto_phone_number":e.auto_phone_number=n.sha256(n.handlePhoneNumber(s));break;case"first_name":e.first_name=Ra.isHash(s)?s:n.sha256(s);break;case"last_name":e.last_name=Ra.isHash(s)?s:n.sha256(s);break;case"city":e.city=n.truncateString(s,80);break;case"state":e.state=n.truncateString(s,80);break;case"country":e.country=n.truncateString(s,80);break;default:return}}})),e.sha256_email&&(e.email=this.handleCheckHashedEmailValue(String(e.sha256_email),i)),e.sha256_phone_number&&(e.phone_number=this.handleCheckHashedPhoneValue(String(e.sha256_phone_number),i));try{window.ttq&&window.ttq._ppf&&(r.end=performance.now(),window.ttq._ppf.push(r),window.ttq._pf_tn="")}catch(e){}return{userProperties:e,userDataFormat:i,userDataFormatV2:o,identifierLabel:a}}}},{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&&jr.includes(u)&&(n[u]=[Gn.HASHED]);break;case"first_name":case"last_name":case"city":case"state":case"country":case"zip_code":case"partner_id":t.handleNewPiisFormat(c,o,n);break;default:n[o]=[Gn.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,Ur,n);break;case"phone_number":t.handlePixelValidation(a,Fr,n);break;case"sha256_email":t.handlePixelValidation(a,Br,n);break;case"sha256_phone_number":t.handlePixelValidation(a,Hr,n);break;case"first_name":case"last_name":case"city":case"state":case"country":case"zip_code":case"partner_id":break;default:n[i]=[Vn.UNKNOWN_INVALID]}})),n}},{key:"updateUserDataFormatV2Label",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(Vn.UNKNOWN_INVALID)))&&(n[e]=[]),null===(i=n[e])||void 0===i||i.push(t),n}},{key:"getUserDataFormatInfoV2KeyName",value:function(e){return{email:"email_is_hashed",phone_number:"phone_is_hashed",sha256_email:"sha256_email",sha256_phone_number:"sha256_phone",zip_code:"zip_code"}[e]||null}},{key:"handlePIIDiagnostics",value:function(e){}},{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 ka(e,"",t)}},{key:"handleCheckHashedEmailValue",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.checkEmailFormat;return t.email=t.email||[],Ra.isHash(e)?(null==t||t.email.push(Gn.HASHED_CORRECT),e):n(e)?(null==t||t.email.push(Gn.PLAINTEXT_EMAIL),this.sha256(this.handleEmail(String(e)))):(null==t||t.email.push(Gn.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||[],Ra.isHash(e)?(null==t||t.phone_number.push(Gn.HASHED_CORRECT),e):n(e)?(t.phone_number.push(Gn.PLAINTEXT_PHONE),this.sha256(this.handlePhoneNumber(String(e),n))):(null==t||t.phone_number.push(Gn.HASHED_ERR),this.sha256(e))}},{key:"handlePixelValidation",value:function(e,t,n){n[t]=[],Ma.includes(e)&&n[t].push(Vn.FILTER_EVENTS),e&&Ra.isHash(e)&&n[t].push(Vn.HASHED),e&&this.checkEmailFormat(e)&&n[t].push(Vn.PLAIN_EMAIL),e&&this.checkMDNEmailFormat(e)&&n[t].push(Vn.PLAIN_MDN_EMAIL),e&&this.parsePhoneNumberFromString(e)&&n[t].push(Vn.PLAIN_PHONE),e&&0===n[t].length&&n[t].push(Vn.UNKNOWN_INVALID)}},{key:"isZipFromUs",value:function(e){var t;return"us"===(null===(t=e.country)||void 0===t?void 0:t.toLowerCase())||!1}},{key:"truncateString",value:function(e,t){var n=Array.from(e);return n.length<=t?e:n.slice(0,t).join("")}},{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(Gn.EMPTY_VALUE),n;if(Ra.isHash(e))return n.push(Gn.HASHED),n;var r=t(e);return r?(n.push(Gn.CORRECT_FORMAT),n):(n.push(Gn.WRONG_FORMAT),n)}},{key:"handleCheckEmail",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.checkEmailFormat,n=[];return e?Ra.isHash(e)?(n.push(Gn.HASHED),n):t(e)?(n.push(Gn.CORRECT_FORMAT),n):(n.push(Gn.WRONG_FORMAT),n):(n.push(Gn.EMPTY_VALUE),n)}},{key:"handleEmailFormat",value:function(e,t,n){var r=this.handleCheckEmail(String(e),this.checkEmailFormat);n&&n[t]&&(n[t]||[]).includes(Gn.HASHED)||(n[t]=r)}},{key:"handleNewPiisFormat",value:function(e,t,n){e&&(n[t]=[Gn.CORRECT_FORMAT])}}]),n}(Oo),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},xa=function(e,t){return function(n,r){t(n,r,e)}},ja=function(t){s(u,t);var n,o,c=p(u);function u(e,t){var n;return i(this,u),(n=c.call(this,{name:"Identify",reporters:t,context:e})).init(),n}return a(u,[{key:"init",value:function(){var e=this;return this.pluginPromise||(xi(wr.IDENTIFY_INIT_START),this.pluginPromise=$i("https://analytics.tiktok.com/i18n/pixel/static/identify_7bf75739.js").then((function(){e.detectTopics(),xi(wr.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:(o=r(e().mark((function t(n,r){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 e.abrupt("return",this.baseHandleUserProperties(n,r));case 5:case"end":return e.stop()}}),t,this)}))),function(e,t){return o.apply(this,arguments)})},{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(Vn.UNKNOWN_INVALID)||i.includes(Vn.UNKNOWN_INVALID))return void Ui(Nr.INVALID_EMAIL_FORMAT);if(a.includes(Vn.UNKNOWN_INVALID)||s.includes(Vn.UNKNOWN_INVALID))return void Ui(Nr.INVALID_PHONE_NUMBER_FORMAT);if(n.includes(Vn.FILTER_EVENTS)||i.includes(Vn.FILTER_EVENTS))return void Ui(Nr.INVALID_EMAIL_INFORMATION);if(a.includes(Vn.FILTER_EVENTS)||s.includes(Vn.FILTER_EVENTS))return void Ui(Nr.INVALID_PHONE_NUMBER_INFORMATION)}catch(e){}}},{key:"detectTopics",value:(n=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.getCookieDeprecationLabel();case 3:return n=e.sent,e.next=6,this.getAllTopics();case 6:(r=e.sent)&&xi(wr.CUSTOM_INFO,{custom_name:"topics",custom_enum:r.toString(),extJSON:{cookie_label:String(n)}}),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),t,this,[[0,10]])}))),function(){return n.apply(this,arguments)})}]),u}(La);function Ua(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,y(r)),n=i)}}ja=Da([R.injectable(),xa(0,R.inject(Sr.CONTEXT)),xa(1,R.inject(Sr.TTQ_REPORTERS))],ja);var Fa={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"};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 Ha(){return document.documentElement.clientHeight+window.pageYOffset}var Ga=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},Va=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(){var e,t;e=this.updateClickTimes.bind(this),t=Ua((function(t){e()}),100),window.addEventListener("click",t,{capture:!0}),function(e){var t=Ua((function(){var t={scrollHeight:Ha(),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:Ha(),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}();Va=Ga([R.injectable()],Va);var qa,Ja=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){}},Wa=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})},Ka=function(){return void 0===qa&&(qa="hidden"===document.visibilityState?0:1/0,Wa((function(e){qa=Math.min(qa,e.timeStamp)}))),{get timeStamp(){return qa}}},Ya="first-contentful-paint";function Xa(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 Qa=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},za=["fcp","lcp","cls","fid","tti","navigationStart","loadEventStart","requestStart"],Za=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=Ja(n=function(e){e.hadRecentInput||(t+=e.value)},{type:"layout-shift",buffered:!0}),Wa((function(){r&&(r.takeRecords().forEach(n),r.disconnect()),e(t)})),function(e){var t=Xa(Ya);if(-1===t){var n=Ka();Ja((function(t){if(t.name===Ya){if(t.startTime=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},ec=function(e,t){return function(n,r){t(n,r,e)}},tc=function(e){s(n,e);var t=p(n);function n(e,r,o,a,c){var s;return i(this,n),(s=t.call(this,{name:"PerformanceInteraction",reporters:o,context:r})).monitors=[],s.currentUrl="",s.ttqOptions={},s.env=e,s.reportService=a,s.ttqOptions=c,s.init(),s}return a(n,[{key:"reportSwitch",value:function(){var e,t,n=qi(Dr),r="";try{var i=window.sessionStorage&&window.sessionStorage.getItem(dr);if(i)r=JSON.parse(i).callback}catch(e){}return!!(n||r||Ti(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.interactionMonitor=new Va,this.performanceMonitor=new Za,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=br.PERFORMANCE_INTERACTION,r=Bi(n);null!==r&&eo(this.reportService.reportPreposition||[]).then((function(){e.reportService.report(r,e.assemblyMergedData(t,n),function(e){return{performance_interaction:Bn.httpReport}[e]||Bn.htmlHttpReport}(n))}))}}}},{key:"assemblyMergedData",value:function(e,t){var n,r=this.context.getPageSign(),i=this.reporters[0],o=(null==i?void 0:i.getReporterId())||"",a=this.reporters.map((function(e){return e.getReporterId()})).join("|"),c=null==i?void 0:i.assemblyData(o,"",e,{},t);return c&&(c.context.pixel&&(c.context.pixel.codes=a),c.context.index=null===(n=r.pageIndex)||void 0===n?void 0:n.index,c.context.session_id=r.sessionId),c||{}}},{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[Fa[r]]=i,e}),{})}}]),n}(Oo);tc=$a([R.injectable(),ec(0,R.inject(Sr.ENV)),ec(1,R.inject(Sr.CONTEXT)),ec(2,R.inject(Sr.TTQ_REPORTERS)),ec(3,R.inject(Sr.REPORT_SERVICE)),ec(4,R.inject(Sr.TTQ_GLOBAL_OPTIONS))],tc);var nc,rc=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},ic=function(e,t){return function(n,r){t(n,r,e)}},oc=function(e){s(n,e);var t=p(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,xi(wr.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),xi(wr.CUSTOM_INFO,{pixelCode:f,custom_name:"fl_jsb_report",extJSON:{message_id:e.message_id,cid:c.cid,event:e.event}}))}}}]),n}(Oo);oc=rc([R.injectable(),ic(0,R.inject(Sr.CONTEXT)),ic(1,R.inject(Sr.TTQ_REPORTERS)),ic(2,R.inject(Sr.REPORT_SERVICE)),ic(3,R.inject(Sr.TTQ_GLOBAL_OPTIONS))],oc),function(e){e.ERROR_FORMAT="error_format",e.OVER_LENGTH="over_length_3e4",e.FILTER_SENSITIVE_FIELDS="filter_sensitive_fields"}(nc||(nc={}));var ac,cc,sc,uc,lc,fc="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"}(ac||(ac={})),function(e){e.METADATA="Metadata",e.CLICK="Click"}(cc||(cc={})),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"}(sc||(sc={})),function(e){e.AUTO_FORM="form_rules",e.AUTO_VC="vc_rules",e.AUTO_VC_REVERSE="vc_rules_reverse"}(uc||(uc={})),function(e){e.PAGE_LEAVE="PageLeave",e.PAGE_VIEW="PageView",e.DOM_CHANGE="DomChange",e.URL_CHANGE="UrlChange",e.CLICK="Click",e.SCROLL="Scroll"}(lc||(lc={}));var dc=["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"],pc=2e3;function hc(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)||dc.some((function(t){return e.toLowerCase().indexOf(t.toLowerCase())>-1}))}var vc=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 _c(e){return vc(e)}function gc(e,t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i1&&void 0!==arguments[1]?arguments[1]:500;return"string"!=typeof e?"":(e=e.trim()).length0&&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 wc(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?Ic(t):""}function Nc(e,n){if("object"===t(e)){if(Array.isArray(e))return e.map((function(e){return Nc(e,n)}));var r={};for(var i in e)Rc(i,n)||(r[i]=Nc(e[i],n));return r}return e}function Rc(e,t){return!!(t&&t.length>0)&&t.some((function(t){return e.toLowerCase()===t.toLowerCase()}))}function Ac(e){if("object"===t(e)){if(Array.isArray(e))return e.map((function(e){return Ac(e)}));var n=Object.assign({},e),r=n["@type"];for(var i in n)"@type"!==i&&"@context"!==i&&("object"===t(n[i])?n[i]=Ac(n[i]):r&&Pc(r)&&delete n[i]);return n}return e}function Pc(e){return Array.isArray(e)?e.some((function(e){return Pc(e)})):"string"==typeof e&&(e=e.toLowerCase().replace(/https?:\/\/schema\.org\//,""),dc.some((function(t){return e===t.toLowerCase()})))}function Cc(e){var t={open_graph:"{}",microdata:"[]",json_ld:"[]",meta:"{}"};try{t.microdata=function(){for(var e=document.querySelectorAll("[itemscope]"),t=[],n=Sc(),r=0;r=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=0;E--){if(h[E].scope.contains(y)){h[E].schema.subscopes.push(m);break}h.pop()}0===h.length&&v.push(m),h.push({schema:m,scope:y})}return JSON.stringify(v)}()}catch(e){ji(wr.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;i3e4)return{data:JSON.stringify([]),errors:[{name:nc.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:nc.ERROR_FORMAT,message:e.message})}try{a=Ac(a)}catch(e){return{data:JSON.stringify([]),errors:[{name:nc.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;ji(wr.CUSTOM_ERROR,{message:n},{custom_name:"parse_json_ld_failed",custom_enum:t})}))}catch(e){ji(wr.CUSTOM_ERROR,e,{custom_name:"assemble_auto_config_failed",custom_enum:"json_ld"})}try{t.open_graph=function(e){for(var t=Sc(["og","product","music","video","article","book","profile","website","twitter"]),n={},r=document.querySelectorAll("meta[property],meta[name]"),i=0;i0)return Array.from(r)}return[]}catch(e){return ji(wr.CUSTOM_ERROR,e,{custom_name:fc,custom_enum:ac.GET_ELEMENTS_ERROR}),[]}}function Fc(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 Bc(e){if(!e)return!1;var t=window.getComputedStyle(e);return"none"!==t.display&&("visible"===t.visibility&&(!Hc(e)&&(0!==e.offsetWidth||0!==e.offsetHeight)))}function Hc(e){return!(!e||e.isSameNode(document.body)||e.isSameNode(document))&&("0"==window.getComputedStyle(e).opacity||Hc(e.parentElement))}function Gc(e){var t=e.getAttribute("type");return!!t&&jc.indexOf(t)>-1}function Vc(e){return e&&hc(e)?"__Text__":e}!function(e){e[e.CONTAIN=0]="CONTAIN",e[e.ID=1]="ID",e[e.SELECTOR=2]="SELECTOR"}(kc||(kc={}));var qc=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[uc.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){ji(wr.CUSTOM_ERROR,e,{custom_name:fc,custom_enum:ac.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 ji(wr.CUSTOM_ERROR,e,{custom_name:fc,custom_enum:ac.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=si((function(){var r=n.assembleFormDetail(e);(!e.formDetail||r&&vi(r,e.formDetail))&&(e.formDetail=r,t.forEach((function(t){return t.call(n,e.formDetail)})))}),pc,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){ji(wr.CUSTOM_ERROR,e,{custom_name:fc,custom_enum:ac.FORM_OBSERVER_ERROR})}}},{key:"detectFormElement",value:function(){try{var e=[0,0,0],t=function(e){return(t=Uc(e||Mc,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 Uc(Lc,e)}(t.el),i=new Set([]);r.forEach((function(n){var r=function(e,t){var n=Uc(Dc,e);if(n&&n.length)return{els:n,from:kc.CONTAIN};var r=e.getAttribute("for");return!(!r||(n=function(e,t){return Uc(["input[id='".concat(e,"'],select[id='").concat(e,"'],textarea[id='").concat(e,"']")],t)}(r,t),!n))&&{els:n,from:kc.ID}}(n,t.el);if(r){var o=r.els,a=r.from,c=o.filter((function(e){return!Gc(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,Uc(Dc,n)).filter((function(e){return!Gc(e)})).forEach((function(n){if(!i.has(n)){e[kc.SELECTOR]=1;var r=function(e,t){return function e(n){return null==n||n.isSameNode(t)?t:Fc(n).length>0?n:e(n.parentNode)}(e.parentNode)}(n,t.el);t.questions.push({el:r,answers:[{el:n,from:kc.SELECTOR}]})}}))})),xi(wr.CUSTOM_INFO,{custom_name:"form_detail_answer_from",custom_enum:e.join("")}),n}catch(e){return ji(wr.CUSTOM_ERROR,e,{custom_name:fc,custom_enum:ac.DETECT_FORM_ELEMENT_ERROR}),[]}}},{key:"calculateQuestionFilledTime",value:function(e){var t=e.el,n=e.answers,r=_c(t),i=n.reduce((function(e,t){var n=t.el,r=n.getAttribute("type");return r&&xc.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:_c(n),id:n.id,name:Vc(n.getAttribute("name")),tag:n.tagName.toLowerCase(),class_name:n.className,questions:[],width:n.offsetWidth,height:n.offsetHeight,is_visible:Bc(n)};return i.questions=r.map((function(e){var n=e.el,r=e.answers,i={xpath:_c(n),id:n.id,name:Vc(Fc(n)),tag:n.tagName.toLowerCase(),class_name:n.className,filled_time:t.calculateQuestionFilledTime(e),answers:[],width:n.offsetWidth,height:n.offsetHeight,is_visible:Bc(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:_c(e),id:e.id,name:Vc(e.value||e.innerText),tag:e.tagName.toLowerCase(),class_name:e.className,from:n,width:e.offsetWidth,height:e.offsetHeight,is_visible:Bc(t)}}))):i.answers.push({xpath:_c(t),id:t.id,name:Vc(t.getAttribute("name")),tag:t.tagName.toLowerCase(),class_name:t.className,input_type:t.getAttribute("type"),placeholder:Vc(t.getAttribute("placeholder")),from:n,width:t.offsetWidth,height:t.offsetHeight,is_visible:Bc(t)})})),i})),i}catch(e){return void ji(wr.CUSTOM_ERROR,e,{custom_name:fc,custom_enum:ac.ASSEMBLE_FORM_DETAIL_ERROR})}}}]),e}(),Jc=["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()})),Wc=["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"],Kc=function(e){try{var t=e.plugins&&e.plugins.AutoConfig;return t&&t.vc_rules}catch(e){return}},Yc=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=O(o);try{for(s.s();!(c=s.n()).done;){var u=c.value,l=u.currency.val,f=Xc(u.valueXpath,u.valueClass),d=null==f?void 0:f.textContent;if(d){var p=Qc(d);if(p){var h=void 0,v=void 0,_=void 0;if(u.currency.xpath){var g=null===(n=document.evaluate(u.currency.xpath,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue)||void 0===n?void 0:n.textContent;g&&xi(wr.CUSTOM_INFO,{custom_name:"auto_value_currency_currency_code_form_xpath",extJSON:{url:i.url,currencyCode:g,vcConfig:t}}),g&&Wc.includes(g.toUpperCase().trim())&&(v=g.toUpperCase().trim())}if(u.countryCodeXpath){var y=null===(r=document.evaluate(u.countryCodeXpath,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue)||void 0===r?void 0:r.textContent;y&&xi(wr.CUSTOM_INFO,{custom_name:"auto_value_currency_country_form_xpath",extJSON:{url:i.url,country:y,vcConfig:t}}),y&&Jc.includes(y.toUpperCase().trim())&&(h=y.toUpperCase().trim())}try{var m=new URL(null==i?void 0:i.url).hostname.split(".");for(var E in m)Jc.includes(m[E].toUpperCase())&&(_=m[E].toUpperCase())}catch(e){}var b={vc_properties:{value:p,currency:v||l,ori_value:d,rule_key:u.rule_key,country_code:h||_}};return xi(wr.CUSTOM_INFO,{custom_name:"auto_value_currency_update_info",extJSON:{url:i.url,autoProperties:b,vcConfig:t}}),zc($c,b),b}}}}catch(e){s.e(e)}finally{s.f()}}return null}return null}catch(e){return ji(wr.CUSTOM_ERROR,e,{custom_name:"auto_value_currency_update_error",custom_enum:"auto_value_currency",extJSON:{error:e}}),null}};function Xc(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=t.length-3&&(i=!0),i&&(n=n.slice(0,r-(t.length-1))+"."+n.slice(r-(t.length-1))),n}return null}var zc=function(e,t){try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){}},Zc=function(e){try{var t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return null}},$c="value_currency_rule",es=[lc.CLICK,lc.SCROLL],ts=function(){function e(t){var n=this;i(this,e),this.handlerArray=t,es.forEach((function(e){window.addEventListener(e.toLowerCase(),si((function(){n.interactionHandler(e)}),pc,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)}),pc)}}]),e}(),ns=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}(),rs=function(){function e(t,n,r){i(this,e),this.context=t,this.reportHistory=new ns,this.reporters=n,this.reportService=r}return a(e,[{key:"report",value:function(e,t,n){var r=this,i=Bi(br.AUTO_CONFIG),o=this.getReportPixelList(t,n),a=this.assemblyReportData(e,n,o);a&&i&&eo(this.reportService.reportPreposition||[]).then((function(){r.reportService.report(i,a,Bn.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!!yc(t)&&mc(t,e)})).filter((function(t){var i=t.getReporterId();return!([sc.AUTO_COLLECTION,sc.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){var r;if(0!==n.length){var i=n.map((function(e){return e.getReporterId()})),o=this.context.getPageSign(),a=n[0],c=a.assemblyData(a.getReporterId(),"",{},{},br.AUTO_CONFIG);return delete c.event,c.action=e,c.auto_collected_properties=t,c.context.pixel||(c.context.pixel={}),c.context.pixel.code=i[0],c.context.pixel.codes=i.join("|"),c.context.index=null===(r=o.pageIndex)||void 0===r?void 0:r.index,c.context.session_id=o.sessionId,c.context.pageview_id=rr(this.context.getPageViewId(),a.reporterInfo.loadId,Er),c.message_id=c.message_id.replace(/-[^-]*$/,""),c}}}]),e}(),is=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},os=function(e,t){return function(n,r){t(n,r,e)}},as="AutoConfig",cs=function(e){s(n,e);var t=p(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this,{name:as,reporters:r,context:e})).autoCollectedMetadata={},c.initialize=!1,c.autoFormUpdateHandler=si((function(e){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var t={taskName:"auto_config_form_handler",functionName:void 0,start:performance.now()};window.ttq._pf_tn="auto_config_form_handler"}}catch(e){}if(c.autoForm){if(c.autoCollectedFormDetail=c.autoForm.getOverallFormDetail(),c.autoCollectedFormDetail.length>3e4)return void ji(wr.CUSTOM_ERROR,{message:"".concat(String(c.autoCollectedFormDetail.length))},{custom_name:fc,custom_enum:ac.OVER_LENGTH});c.actTracker.report(cc.METADATA,sc.AUTO_FORM,{page_trigger:e,form_details:c.autoCollectedFormDetail})}try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t),window.ttq._pf_tn="")}catch(e){}}),200,f(c)),c.autoCollectionUpdateHandler=si((function(e){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var t={taskName:"auto_config_metadata_handler",functionName:void 0,start:performance.now()};window.ttq._pf_tn="auto_config_metadata_handler"}}catch(e){}c.autoCollectedMetadata=Cc(c.filter),c.actTracker.report(cc.METADATA,sc.AUTO_COLLECTION,{page_trigger:e,content_data:c.autoCollectedMetadata});try{window.ttq&&window.ttq._ppf&&(t.end=performance.now(),window.ttq._ppf.push(t),window.ttq._pf_tn="")}catch(e){}}),200,f(c)),c.autoClickCallback=function(e){try{c.signal_insights_config&&Yc(c.context,c.signal_insights_config);var t=function(e){var t=e,n=e.parentNode,r=0,i=!1;try{i=pi(t)}catch(e){ji(wr.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=pi(n)}catch(e){ji(wr.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-1},we.prototype.set=function(e,t){var n=this.__data__,r=Ce(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Ne.prototype.clear=function(){this.__data__={hash:new Se,map:new(pe||we),string:new Se}},Ne.prototype.delete=function(e){return xe(this,e).delete(e)},Ne.prototype.get=function(e){return xe(this,e).get(e)},Ne.prototype.has=function(e){return xe(this,e).has(e)},Ne.prototype.set=function(e,t){return xe(this,e).set(e,t),this},Re.prototype.clear=function(){this.__data__=new we},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 we){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this;n=this.__data__=new Ne(r)}return n.set(e,t),this};var Ue=ue?J(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-1&&e%1==0&&e<=r}(e.length)&&!Ke(e)}var We=le||function(){return!1};function Ke(e){var t=Ye(e)?ee.call(e):"";return t==c||t==s}function Ye(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Xe(e){return Je(e)?Ae(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)}}(ss,ss.exports);var us=ss.exports,ls={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:""}},fs=/^[a-zA-Z\d]([a-zA-Z_\-\d ]{0,}[a-zA-Z_\-\d])?$/,ds=["product","product_group"],ps=["email_is_hashed","phone_is_hashed","sha256_email","sha256_phone"],hs=["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"],vs=["CompletePayment","InitiateCheckout","AddToCart","PlaceAnOrder","ViewContent","AddToWishlist"],_s=function(e){return void 0===e},gs="CompletePayment",ys=function(e){var t=e.event,n=void 0===t?"":t;return!!["null","undefined"].includes(n)||(!!/^\s*$/.test(n)||!n)},ms=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},Es=function(e,t){return function(n,r){t(n,r,e)}},bs=function(e){s(n,e);var t=p(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(Nr[e]){var n=qr(),r=ls[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){ji(wr.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){ji(wr.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!==br.TRACK||t===Tr||this.handleEventPayloadValidate(us(n||{}))}catch(e){ji(wr.CUSTOM_ERROR,e,{custom_name:"diagnostics_console",custom_enum:"track"})}}},{key:"handlePixelInfoValidate",value:function(e){if(e.status===Ao.Live);else this.warn(Nr.INVALID_PIXEL_CODE)}},{key:"handleEventPayloadValidate",value:function(e){e.properties||(e.properties={}),ys(e)&&this.warn(Nr.EMPTY_EVENT_TYPE_NAME),function(e){var t=e.event,n=void 0===t?"":t;return!!ys(e)||fs.test(n)}(e)||this.warn(Nr.MISMATCHED_EVENT_TYPE_NAME_FOR_CUSTOM_EVENT),function(e){var t=e.event;return(void 0===t?"":t).length<=50}(e)||this.warn(Nr.LONG_EVENT_TYPE_NAME),function(e){var t=e.event,n=e._inspection;if(t===gs){var r=(void 0===n?{}:n).identity_params,i=void 0===r?{}:r;return 0===Object.keys(i).length||ps.every((function(e){return(i[e]||[]).includes(Vn.EMPTY_VALUE)}))}return!1}(e)&&this.warn(Nr.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(Vn.FILTER_EVENTS)||(n.identity_params.sha256_email||[]).includes(Vn.FILTER_EVENTS))}(e)&&this.warn(Nr.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(Vn.UNKNOWN_INVALID)||(n.identity_params.sha256_email||[]).includes(Vn.UNKNOWN_INVALID))}(e)&&this.warn(Nr.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(Vn.FILTER_EVENTS)||(n.identity_params.sha256_phone||[]).includes(Vn.FILTER_EVENTS))}(e)&&this.warn(Nr.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(Vn.UNKNOWN_INVALID)||(n.identity_params.sha256_phone||[]).includes(Vn.UNKNOWN_INVALID))}(e)&&this.warn(Nr.INVALID_PHONE_NUMBER_FORMAT),function(e){var t=e.event,n=void 0===t?"":t,r=e.properties,i=void 0===r?{}:r;if(vs.includes(n)){if(_s(i.contents)&&_s(i.content_id))return!0;if(!_s(i.contents))return!Array.isArray(i.contents)||i.contents.length<1||!i.contents.every((function(e){return e&&!_s(e.content_id)}))}return!1}(e)&&this.warn(Nr.MISSING_CONTENT_ID),function(e){var t=e.properties,n=void 0===t?{}:t,r=n.content_id,i=n.contents;return!(!_s(r)&&/^\s*$/.test(r))&&(!(!_s(i)&&Array.isArray(i))||i.every((function(e){return e&&!_s(e.content_id)&&!/^\s*$/.test(e.content_id)})))}(e)||this.warn(Nr.INVALID_CONTENT_ID),function(e){var t=e.properties.content_type;return!t||ds.includes(t)}(e)||this.warn(Nr.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(Nr.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!==gs||!_s(i.value))||!(_s(i.currency)||!_s(i.value))}(e)&&this.warn(Nr.MISSING_VALUE_PARAMETER),function(e){var t=e.properties.currency;return!t||hs.includes(t)}(e)||this.warn(Nr.INVALID_CURRENCY_CODE),function(e){var t=e.event,n=void 0===t?"":t,r=e.properties,i=void 0===r?{}:r;return!(n!==gs||!_s(i.currency))||!(_s(i.value)||!_s(i.currency))}(e)&&this.warn(Nr.MISSING_CURRENCY_PARAMETER,{learn_more:""})}}]),n}(Oo);bs=ms([R.injectable(),Es(0,R.inject(Sr.CONTEXT)),Es(1,R.inject(Sr.TTQ_REPORTERS)),Es(2,R.inject(Sr.TTQ_GLOBAL_OPTIONS))],bs);var Is=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)}},Os=function(e){s(n,e);var t=p(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()&&$i("https://analytics.pangle-ads.com/api/v2/pangle_disable_cookie")}},{key:"pixelSend",value:function(e,t,n){var r;try{if(0===(null===(r=this.context.getPageSign().pageIndex)||void 0===r?void 0:r.index)&&!Ii(this.env)&&n&&n.message_id&&this.isPixelPangleCookieMatching(e)&&!this.hasReport){var i={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",i,Bn.httpReport)}}catch(e){ji(wr.CUSTOM_ERROR,e,{custom_name:"pangle_report"})}}}]),n}(Oo);Os=Is([R.injectable(),Ts(0,R.inject(Sr.CONTEXT)),Ts(1,R.inject(Sr.TTQ_REPORTERS)),Ts(2,R.inject(Sr.REPORT_SERVICE)),Ts(3,R.inject(Sr.ENV))],Os);var Ss,ws="https://analytics.tiktok.com/i18n/pixel/eb.js",Ns="_tt_event_builder";!function(e){e.EVENT_BUILD_BOOTSTRAP_ACK="event_builder_bootstrap_ack",e.EVENT_BUILD_WRONG_CODE="event_builder_wrong_code",e.EVENT_BUILD_BOOTSTRAP="event_builder_bootstrap"}(Ss||(Ss={}));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},As=function(e,t){return function(n,r){t(n,r,e)}},Ps=function(e){s(n,e);var t=p(n);function n(e,r){var o;return i(this,n),(o=t.call(this,{name:"EventBuilder",reporters:r,context:e})).pluginMounted=!1,o}return a(n,[{key:"pixelDidMount",value:function(e){var t=this;if(!this.pluginMounted){this.pluginMounted=!0;var n=Wr(),r=function(e){e.data.type!==Ss.EVENT_BUILD_BOOTSTRAP||n._event_builder_pickup_sdk_loaded||(t.reporters.find((function(t){return t.getReporterId()===e.data.pixelCode}))?(n._event_builder_pickup_sdk_loaded=!0,Gi(Ns,e.data),$i(ws).then((function(){window.opener.window.postMessage({type:Ss.EVENT_BUILD_BOOTSTRAP_ACK},"*")})).catch((function(e){ji(wr.CUSTOM_ERROR,e,{custom_name:"event_builder_load_error",custom_enum:"load_ebjs"})}))):n._event_builder_pickup_sdk_verify_flag||(setTimeout((function(){t.reporters.find((function(t){return t.getReporterId()===e.data.pixelCode}))||window.opener.window.postMessage({type:Ss.EVENT_BUILD_WRONG_CODE},"*")}),5e3),n._event_builder_pickup_sdk_verify_flag=!0))};n._event_builder_pickup_sdk_loaded||(Hi(Ns)?$i(ws).then((function(){n._event_builder_pickup_sdk_loaded=!0})):window.opener&&(window.addEventListener("message",r),setTimeout((function(){window.removeEventListener("message",r)}),8e3)))}}}]),n}(Oo);Ps=Rs([R.injectable(),As(0,R.inject(Sr.CONTEXT)),As(1,R.inject(Sr.TTQ_REPORTERS))],Ps);var Cs="https://analytics-ipv6.tiktokw.us/ipv6/enrich_ipv6",ks=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},Ms=function(e,t){return function(n,r){t(n,r,e)}},Ls="tt_pixel_is_enrich_ipv6_triggered_by_enrich_am",Ds=function(e){s(n,e);var t=p(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this,{name:"EnrichIpv6",reporters:r,context:e})).hasReported=!1,c.shouldReportAfterEnrichAM=!1,c.reportService=o,c.env=a,c}return a(n,[{key:"isPixelEnrichIpv6",value:function(){var e=this.reporters;return!(!e||0===e.length)&&e.every((function(e){return e&&e.plugins&&!0===e.plugins.EnrichIpv6}))}},{key:"isEnrichIpv6V2SwitchOn",value:function(){var e="EnrichIpv6V2";try{var t=Wr()._plugins||{};return null!=t[e]&&!!t[e]}catch(e){return!1}}},{key:"buildEnrichIpv6Data",value:function(e){var t=this.isEnrichIpv6V2SwitchOn()?"#source=2":"#source=1";return Object.assign(Object.assign({},e),{event:"EnrichIpv6",trigger_event:e.event,message_id:e.message_id+t})}},{key:"pixelSend",value:function(e,t,n){var r,i=arguments.length>4?arguments[4]:void 0;try{if(i!==br.TRACK)return;if("Shopify"!==Qr(e)&&!this.isEnrichIpv6V2SwitchOn())return;if(Ii(this.env)||!n||!n.message_id)return;var o=this.context.getPageSign();0===(null===(r=o.pageIndex)||void 0===r?void 0:r.index)&&!this.hasReported&&this.isPixelEnrichIpv6()&&(this.hasReported=!0,this.reportService.report(Cs,this.buildEnrichIpv6Data(n),Bn.htmlHttpReport));var a="true"===sessionStorage.getItem(Ls);if(a)return;"EnrichAM"===t&&(this.shouldReportAfterEnrichAM=!0),this.shouldReportAfterEnrichAM&&this.isPixelEnrichIpv6()&&(this.shouldReportAfterEnrichAM=!1,sessionStorage.setItem(Ls,"true"),this.reportService.report(Cs,this.buildEnrichIpv6Data(n),Bn.htmlHttpReport))}catch(e){ji(wr.CUSTOM_ERROR,e,{custom_name:"enrich_ipv6_report"})}}}]),n}(Oo);function xs(e,t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i1&&void 0!==arguments[1]?arguments[1]:4;try{return Number.isInteger(e)?e:parseFloat(e.toFixed(t))}catch(e){return-1}}Ds=ks([R.injectable(),Ms(0,R.inject(Sr.CONTEXT)),Ms(1,R.inject(Sr.TTQ_REPORTERS)),Ms(2,R.inject(Sr.REPORT_SERVICE)),Ms(3,R.inject(Sr.ENV))],Ds);var Us;!function(e){e.FIRST_CONTENTFUL_PAINT="fcp",e.LARGEST_CONTENTFUL_PAINT="lcp",e.FIRST_INPUT_DELAY="fid",e.TIME_TO_FIRST_BYTE="ttfb",e.PAGE_LEAVE="pl",e.LOAD_FINISH="lf",e.TIME_WINDOW_TRACKER="twt",e.TIME_TO_INTERACTIVE="tti"}(Us||(Us={}));var Fs,Bs,Hs,Gs,Vs=function(){function e(t,n,r){i(this,e),this.reportService=r,this.context=t,this.reporters=n}return a(e,[{key:"getResult",value:function(e){return{action_event:e}}},{key:"report",value:function(e){var t=this;if(void 0!==e){var n=Bi(br.AUTO_CONFIG);if(void 0!==n){var r=this.getReportPixelList(),i=this.assemblyReportData(br.PAGE,e,r);i&&n&&eo(this.reportService.reportPreposition||[]).then((function(){t.reportService.report(n,i,Bn.defaultReport)})),this.resetAfterReport()}}}},{key:"getReportPixelList",value:function(){return this.reporters}},{key:"assemblyReportData",value:function(e,t,n){var r;if(0!==n.length){var i=n.map((function(e){return e.getReporterId()})),o=this.context.getPageSign(),a=n[0],c=a.assemblyData(a.getReporterId(),"",{},{},br.AUTO_CONFIG);return delete c.event,c.action=e,c.auto_collected_properties=t,c.context.pixel||(c.context.pixel={}),c.context.pixel.code=i[0],c.context.pixel.codes=i.join("|"),c.context.index=null===(r=o.pageIndex)||void 0===r?void 0:r.index,c.context.session_id=o.sessionId,c.context.pageview_id=rr(this.context.getPageViewId(),a.reporterInfo.loadId,Er),c.message_id=c.message_id.replace(/-[^-]*$/,""),c}}}]),e}(),qs=function(e){s(n,e);var t=p(n);function n(e,r,o){var a;return i(this,n),(a=t.call(this,e,r,o)).clickTimes=0,a.scrollTimes=0,a.init(),a}return a(n,[{key:"init",value:function(){var e,t,n=this;e=xs(this.updateClickTimes,this),t=or((function(t){e()}),100),window.addEventListener("click",t,{capture:!0}),function(e){var t=or((function(){e()}),500);window.addEventListener("scroll",t,{passive:!0})}(xs(this.updateScrollTimes,this)),setInterval((function(){n.reportInteraction()}),1e4)}},{key:"reportInteraction",value:function(){this.isUpdated()&&(this.report(this.getResult(Us.TIME_WINDOW_TRACKER)),this.resetAfterReport())}},{key:"getResult",value:function(e){return{action_event:e,inter:{ct:this.clickTimes,st:this.scrollTimes}}}},{key:"updateClickTimes",value:function(){this.clickTimes+=1}},{key:"updateScrollTimes",value:function(){this.scrollTimes+=1}},{key:"isUpdated",value:function(){return 0!=this.clickTimes||0!=this.scrollTimes}},{key:"resetAfterReport",value:function(){this.clickTimes=0,this.scrollTimes=0}}]),n}(Vs),Js=function(e){var t=function(){new Promise((function(e,t){setTimeout((function(){var n=performance.getEntriesByType("navigation");if(n.length>0){var r=n[0];e(r.loadEventEnd-r.startTime)}else window.performance.timing?e(window.performance.timing.loadEventEnd-window.performance.timing.navigationStart||-1):t("Performance timing not supported")}),0)})).then((function(t){e(Us.LOAD_FINISH,t)})).catch((function(t){e(Us.LOAD_FINISH,-1)}))};"complete"===window.document.readyState?t():window.addEventListener("load",t)},Ws=-1,Ks=function(e){addEventListener("pageshow",(function(t){t.persisted&&(Ws=t.timeStamp,e(t))}),!0)},Ys=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Xs=function(){var e=Ys();return e&&e.activationStart||0},Qs=function(e,t){var n=Ys(),r="navigate";return Ws>=0?r="back-forward-cache":n&&(document.prerendering||Xs()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},zs=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},Zs=function(e,t,n,r){var i,o;return function(a){t.value>=0&&(a||r)&&((o=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=o,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},$s=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},eu=function(e){var t=function(t){"pagehide"!==t.type&&"hidden"!==document.visibilityState||e(t)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},tu=function(e){var t=!1;return function(n){t||(e(n),t=!0)}},nu=-1,ru=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},iu=function(e){"hidden"===document.visibilityState&&nu>-1&&(nu="visibilitychange"===e.type?e.timeStamp:0,au())},ou=function(){addEventListener("visibilitychange",iu,!0),addEventListener("prerenderingchange",iu,!0)},au=function(){removeEventListener("visibilitychange",iu,!0),removeEventListener("prerenderingchange",iu,!0)},cu=function(){return nu<0&&(nu=ru(),ou(),Ks((function(){setTimeout((function(){nu=ru(),ou()}),0)}))),{get firstHiddenTime(){return nu}}},su=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},uu=[1800,3e3],lu=function(e,t){t=t||{},su((function(){var n,r=cu(),i=Qs("FCP"),o=zs("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime=0&&Bs1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){hu(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,du),removeEventListener("pointercancel",r,du)};addEventListener("pointerup",n,du),addEventListener("pointercancel",r,du)}(t,e):hu(t,e)}},gu=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,_u,du)}))},yu=[100,300],mu=[2500,4e3],Eu={},bu=[800,1800],Iu=function e(t){document.prerendering?su((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},Tu=function(e,t){t=t||{};var n=Qs("TTFB"),r=Zs(e,n,bu,t.reportAllChanges);Iu((function(){var i=Ys();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-Xs(),0),n.entries=[i],r(!0),Ks((function(){n=Qs("TTFB",0),(r=Zs(e,n,bu,t.reportAllChanges))(!0)}))}}))},Ou=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},Su=function(e,t){return function(n,r){t(n,r,e)}},wu=function(e){s(n,e);var t=p(n);function n(e,r,o){var a;return i(this,n),(a=t.call(this,e,r,o)).cls=-1,a.init(),a}return a(n,[{key:"init",value:function(){var e;!function(e,t){t=t||{},lu(tu((function(){var n,r=Qs("CLS",0),i=0,o=[],a=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=o[0],n=o[o.length-1];i&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,o.push(e)):(i=e.value,o=[e])}})),i>r.value&&(r.value=i,r.entries=o,n())},c=zs("layout-shift",a);c&&(n=Zs(e,r,fu,t.reportAllChanges),eu((function(){a(c.takeRecords()),n(!0)})),Ks((function(){i=0,r=Qs("CLS",0),n=Zs(e,r,fu,t.reportAllChanges),$s((function(){return n()}))})),setTimeout(n,0))})))}(this.clsHandler.bind(this),{reportAllChanges:!0}),Tu(this.webVitalHandler.bind(this)),lu(this.webVitalHandler.bind(this)),function(e,t){t=t||{},su((function(){var n,r=cu(),i=Qs("LCP"),o=function(e){var t=e[e.length-1];t&&t.startTime=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},Ru=function(e,t){return function(n,r){t(n,r,e)}},Au=function(e){s(n,e);var t=p(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this,{name:"PageData",reporters:r,context:e})).monitors=[],c.ttqOptions={},c.reportService=o,c.context=e,c.reporters=r,c.ttqOptions=a,c.isPluginInit=!1,c}return a(n,[{key:"init",value:function(){this.isPageDataEnabled()&&(this.interactionMonitor=new qs(this.context,this.reporters,this.reportService),this.performanceMonitor=new wu(this.context,this.reporters,this.reportService),this.monitors.push(this.performanceMonitor),this.monitors.push(this.interactionMonitor))}},{key:"isPageDataEnabled",value:function(){var e,t;return null===(t=null===(e=this.ttqOptions)||void 0===e?void 0:e.plugins)||void 0===t?void 0:t.PageData}},{key:"report",value:function(e){var t=this.performanceMonitor,n=this.performanceMonitor.getResult(e),r=this.interactionMonitor.getResult(e),i=this.mergeReportData(e,r,n);t.report(i),this.interactionMonitor.resetAfterReport(),this.performanceMonitor.resetAfterReport()}},{key:"mergeReportData",value:function(e,t,n){var r={action_event:e};return r.perf=n.perf,r.inter=t.inter,r}},{key:"pageWillLeave",value:function(e){this.report(Us.PAGE_LEAVE)}},{key:"pixelDidMount",value:function(e){this.isPluginInit||(this.init(),this.isPluginInit=!0)}}]),n}(Oo);Au=Nu([R.injectable(),Ru(0,R.inject(Sr.CONTEXT)),Ru(1,R.inject(Sr.TTQ_REPORTERS)),Ru(2,R.inject(Sr.REPORT_SERVICE)),Ru(3,R.inject(Sr.TTQ_GLOBAL_OPTIONS))],Au);var Pu={initAllModule:1,webTtqFactory:2,handleCache:3,webReporterFactory:4,initAutoForm:5},Cu={identify_api_handler:{id:1,fn:[]},identify_encryption:{id:2,fn:[]},identify_after_encryption:{id:3,fn:[]},track_api_handler:{id:4,fn:[]},track_after_reporter_init:{id:5,fn:[]},track_after_report_preposition:{id:6,fn:[]},init:{id:7,fn:[Pu.initAllModule,Pu.webTtqFactory,Pu.handleCache,Pu.webReporterFactory,Pu.initAutoForm]},page_api_handler:{id:8,fn:[]},auto_advanced_matching_handler:{id:9,fn:[]},auto_config_metadata_handler:{id:10,fn:[]},auto_config_click_handler:{id:11,fn:[]},auto_config_form_handler:{id:12,fn:[]},event_builder_dispatcher:{id:13,fn:[]},page_data_web_vital_handler:{id:14,fn:[]},page_data_base_handler:{id:15,fn:[]}},ku=function(){function e(){i(this,e),this.queue=[],this.currentTaskMap={}}return a(e,[{key:"handleCache",value:function(e){var t=this;e.forEach((function(e){t.push(e)}))}},{key:"push",value:function(e){var t=e.taskName,n=e.functionName,r=e.start,i=e.end,o=Math.round(1e3*(i-r)),a=t&&this.getTaskIdFromName(t);if(a){var c=this.currentTaskMap[a];if(c||(this.currentTaskMap[a]=c={id:a,d:-1}),n){var s=this.getFunctionIdFromName(n);s&&(c.f=[].concat(y(c.f||[]),[{id:s,d:o}]))}else c.d=o,this.queue.push(c),delete this.currentTaskMap[a]}}},{key:"print",value:function(){return this.queue}},{key:"printAndClear",value:function(){var e=this.print();return this.clear(),e}},{key:"clear",value:function(){this.queue=[]}},{key:"getTaskIdFromName",value:function(e){var t;return null===(t=Cu[e])||void 0===t?void 0:t.id}},{key:"getFunctionIdFromName",value:function(e){return Pu[e]}}]),e}(),Mu=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},Lu=function(e,t){return function(n,r){t(n,r,e)}},Du=function(e){s(n,e);var t=p(n);function n(e,r){var o;return i(this,n),(o=t.call(this,{name:"RuntimeMeasurement",reporters:r,context:e})).initialize=!1,o.init(),o}return a(n,[{key:"init",value:function(){if(!this.initialize){this.performanceDataQueue=new ku;var e=Wr();e&&e._ppf&&(this.performanceDataQueue.handleCache(e._ppf),e._ppf=this.performanceDataQueue),this.initialize=!0}}}]),n}(Oo);Du=Mu([R.injectable(),Lu(0,R.inject(Sr.CONTEXT)),Lu(1,R.inject(Sr.TTQ_REPORTERS))],Du);var xu,ju,Uu=[{identifier:Sr.CALLBACK_PLUGIN,to:Na,name:"Callback"},{identifier:Sr.IDENTIFY_PLUGIN,to:ja,name:"Identify",required:!0},{identifier:Sr.WEB_FL_PLUGIN,to:oc,name:"WebFL"},{identifier:Sr.PERFORMANCE_INTERACTION_PLUGIN,to:tc,required:!0,name:"PerformanceInteraction"},{identifier:Sr.AUTO_CONFIG_PLUGIN,to:cs,name:"AutoConfig"},{identifier:Sr.DIAGNOSTICS_CONSOLE_PLUGIN,to:bs,name:"DiagnosticsConsole"},{identifier:Sr.PANGLE_COOKIE_MATCHING_PLUGIN,to:Os,name:"PangleCookieMatching"},{identifier:Sr.EVENT_BUILDER_PLUGIN,to:Ps,name:"EventBuilder"},{identifier:Sr.ENRICH_IPV6_PLUGIN,to:Ds,name:"EnrichIpv6"},{identifier:Sr.PAGEDATA_PLUGIN,to:Au,name:"PageData"},{identifier:Sr.RUNTIME_MEASUREMENT_PLUGIN,to:Du,name:"RuntimeMeasurement"}],Fu=/^[\w!#\$%&\'\*\+\/\=\?\^`\{\|\}~\-]+(:?\.[\w!#\$%&\'\*\+\/\=\?\^`\{\|\}~\-]+)*@(?:[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?$/,Bu=function(e){return"function"==typeof Element?e instanceof Element:e&&"object"===t(e)&&e.nodeType===Node.ELEMENT_NODE&&"string"==typeof e.nodeName},Hu=function(e,t){var n=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector||null;return!(null===n||!n.call(e,t.join(",")))||e instanceof HTMLButtonElement&&!!t.includes("button[type='".concat(e.type,"']"))},Gu=function(e){return e.trim().toLowerCase()},Vu=function(e,t){return!(!e||!t)&&e.indexOf(t)>=0},qu=function(e){return"string"==typeof e&&Fu.test(e)},Ju=function(e,t){var n=e.id,r=e.name,i=e.placeholder,o=void 0===i?"":i,a=e.value,c=void 0===a?"":a;return t.filter((function(e){return e.length>2?Vu(r,e)||Vu(n,e)||Vu(o,e)||Vu(c,e):r===e||n===e||o===e||c===e})).length>0},Wu=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},Ku=function(e,t){return function(n,r){t(n,r,e)}},Yu=function(e){s(r,e);var n=p(r);function r(e,t,o){var a;return i(this,r),(a=n.call(this,{name:"AutoAdvancedMatching",reporters:t,context:e})).rateMS=1e3,a.lastTime=0,a.lastElement=null,a.matchHistory=[],a.config=o.aam||{in_form:!0,selectors:{},exclude_selectors:[],phone_regex:"",phone_selectors:[],restricted_keywords:[]},a.phoneRegex=a.config.phone_regex?new RegExp(a.config.phone_regex):null,a.init(),a}return a(r,[{key:"init",value:function(){var e=this;document.addEventListener("click",(function(t){try{if(window.ttq&&!window.ttq._ppf&&(window.ttq._ppf=[]),window.ttq&&window.ttq._ppf){var n={taskName:"auto_advanced_matching_handler",functionName:void 0,start:performance.now()};window.ttq._pf_tn="auto_advanced_matching_handler"}}catch(t){}try{var r=Wr()||[],i=t&&t.target&&t.target instanceof Node&&Bu(t.target)?t.target:null;if(!i)return;if(!e.throttle(i))return;var o=e.getWrappingButton(i);if(!o)return;var a=e.getFormByButton(o);if(e.config.in_form&&!a)return;var c=e.getUserDataByForm(a);if(0===Object.keys(c).length)return;null==r||r.identify(Object.assign(c||{},{auto_trigger_type:e.getTriggerType(o,!!a)})),e.matchHistory.push(Object.assign({},c))}catch(t){xi(wr.CUSTOM_ERROR,{pixelCode:Fi().pixelCode,custom_name:"advancedMatching"})}try{window.ttq&&window.ttq._ppf&&(n.end=performance.now(),window.ttq._ppf.push(n),window.ttq._pf_tn="")}catch(t){}}),{capture:!0,once:!1,passive:!0})}},{key:"throttle",value:function(e){var t=!1;return(!this.lastElement||!this.lastTime||Date.now()-this.lastTime>=this.rateMS||this.lastElement!==e)&&(t=!0),this.lastElement=e,this.lastTime=Date.now(),t}},{key:"getWrappingButton",value:function(e){if(!e||!function(e){if(!e||e===document.body)return!1;if(e.getBoundingClientRect&&"function"==typeof e.getBoundingClientRect){var t=e.getBoundingClientRect().height||e.offsetHeight||11;return t>10&&t<600}return!0}(e))return null;if((this.config.exclude_selectors||[]).length>0&&Hu(e,this.config.exclude_selectors||[]))return null;var t=Object.keys(this.config.selectors||{});if(Hu(e,t))return e;var n=e.parentNode;return n&&Bu(n)?this.getWrappingButton(n):null}},{key:"getFormByButton",value:function(e){if(void 0!==("undefined"==typeof HTMLInputElement?"undefined":t(HTMLInputElement))&&e instanceof HTMLInputElement)return e.form;for(var n=e;"FORM"!==n.nodeName.toUpperCase();){var r=n.parentElement;if(!r)return null;n=r}return n}},{key:"getUserDataByForm",value:function(e){for(var t={},n=(e||document).querySelectorAll("input,textarea,select"),r=0;r0)||("tel"===t||"tel"===n||Ju(Object.assign(o,{placeholder:i}),this.config.phone_selectors)),u=!this.phoneRegex||this.phoneRegex.test(r);return s&&u?{auto_phone_number:r}:null}},{key:"getTriggerType",value:function(e,t){var n=this;try{var r=[];return Object.keys(this.config.selectors).forEach((function(t){Hu(e,[t])&&r.push(n.config.selectors[t])})),0===r.length?"":"".concat(r.join(","),"-").concat(t?1:0)}catch(e){return""}}}]),r}(Oo);Yu=Wu([R.injectable(),Ku(0,R.inject(Sr.CONTEXT)),Ku(1,R.inject(Sr.TTQ_REPORTERS)),Ku(2,R.inject(Sr.TTQ_GLOBAL_OPTIONS))],Yu);var Xu=function(e,t){xu=t,(ju=e).isBound(Sr.AUTO_ADVANCED_MATCHING_PLUGIN)||ju.bind(Sr.AUTO_ADVANCED_MATCHING_PLUGIN).to(Yu).inSingletonScope(),function(e,t){return!(!xu._mounted||xu.getPlugin(t)||!ju.isBound(e))}(Sr.AUTO_ADVANCED_MATCHING_PLUGIN,"AutoAdvancedMatching")&&xu.usePlugin(ju.get(Sr.AUTO_ADVANCED_MATCHING_PLUGIN))},Qu=function(e,t){return Qu=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])},Qu(e,t)};function zu(e,t){function n(){this.constructor=e}Qu(e,t),e.prototype=null===t?Object._ttq_create(t):(n.prototype=t.prototype,new n)}var Zu,$u=function(){return $u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(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}(),tl="2.2.15",nl="undefined"!=typeof __PIA_WORKER__?new Function("return this")():"undefined"!=typeof window?window:{},rl=void 0!==nl&&nl.navigator?nl.navigator.userAgent:"",il=(!!rl.match(/(newsarticle|videoarticle|lv|faceu|ulike|beauty_me_|faceu-os|ulike-os|beauty_me_oversea_|retouch)\/([\d.]+)/i)||/super|automobile/gi.test(rl))&&!/webcast/gi.test(rl)&&!/luckycatversion/gi.test(rl),ol=!!rl.match(/(faceu)\/([\d.]+)/i)||/gsdk/gi.test(rl)||/PIANativeWorker/gi.test(rl),al=!!rl.match(/ttad\/0/i),cl=!!rl.match(/aweme|trill|musical_ly|phoenix_\d+|TikTokNow_\d+/i),sl=!!rl.match(/live_stream/i),ul=!!rl.match(/Webcast/i),ll=!!rl.match(/super/i),fl=!!rl.match(/life_service_merchant/i),dl=/super/gi.test(rl);function pl(){var e;if(il)return nl.JSBridge&&nl.JSBridge.on?e=nl.JSBridge.on:nl.JS2NativeBridge&&nl.JS2NativeBridge.on?e=function(e){var t={JSSDK:tl,__msg_type:"event",__callback_id:e,func:e};nl.JS2NativeBridge.on(e,JSON.stringify(t))}:nl.webkit&&nl.webkit.messageHandlers&&nl.webkit.messageHandlers.onMethodParams?e=function(e){var t={JSSDK:tl,__msg_type:"event",__callback_id:e,func:e};nl.webkit.messageHandlers.onMethodParams.postMessage(t)}:nl.onMethodParams&&(e=function(e){var t={JSSDK:tl,__msg_type:"event",__callback_id:e,func:e};return nl.onMethodParams(e,t)}),e}function hl(e,t){if(("string"!=typeof t||!0!==/^(x|tc)\./.test(t))&&(cl||sl||ul||fl)){var n=e.__params;nl.JS2NativeBridge&&nl.JS2NativeBridge._invokeMethod&&(e.__params=$u({code:n.code},n.data))}}var vl=function(e){function t(){var t=e.call(this,{version:tl,scheme:"bytedance://",listenNativeEvent:!0,dispatchMessageIFrameId:"__JSBridgeIframe_1.0__",setResultIFrameId:"__JSBridgeIframe_SetResult_1.0__",nativeEventListener:pl(),callbackProcessor:hl})||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 zu(t,e),t.prototype.exposePublicApiToGlobal=function(){nl.ToutiaoJSBridge=Object.assign(nl.ToutiaoJSBridge||{},this.publicApi)},t}(el),_l=function(e){function t(t){var n,r=e.call(this,{version:tl,nativeMethodInvoker:(nl.JS2NativeBridge&&nl.JS2NativeBridge._invokeMethod?n=function(e){return nl.JS2NativeBridge._invokeMethod(JSON.stringify(e))}:nl.ToutiaoJSBridge&&nl.ToutiaoJSBridge.invokeMethod?n=function(e){return nl.ToutiaoJSBridge.invokeMethod(JSON.stringify(e))}:nl.JS2NativeBridge&&nl.JS2NativeBridge.call?n=function(e){return nl.JS2NativeBridge.call(e.func,JSON.stringify(e))}:nl.webkit&&nl.webkit.messageHandlers&&nl.webkit.messageHandlers.callMethodParams?n=function(e){nl.webkit.messageHandlers.callMethodParams.postMessage(e)}:nl.callMethodParams&&(n=function(e){return nl.callMethodParams(e.func,e)}),n),nativeEventListener:pl(),scheme:ll?"bds://":dl?"bytedance://":il||nl.JSBridge&&nl.JSBridge._invokeMethod?"nativeapp://":"bytedance://",listenNativeEvent:il,callbackProcessor:hl})||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 zu(t,e),t.prototype.call=function(t,n,r,i){void 0===i&&(i=tl),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;nl.JSBridge=Object.assign(nl.JSBridge||{},this.publicApi),nl.__DISABLE_JSB_PROTOCAL2__||(nl.Native2JSBridge=Object.assign(nl.Native2JSBridge||{},this.publicApi)),dl?nl.ToutiaoJSBridge=Object.assign(nl.ToutiaoJSBridge||{},this.publicApi):(il||al)&&this.toutiaoLegacyJSB?this.toutiaoLegacyJSB.exposePublicApiToGlobal():nl.ToutiaoJSBridge=Object.assign(nl.ToutiaoJSBridge||{},this.publicApi),nl.parent!==nl&&nl.addEventListener&&nl.addEventListener("message",(function(t){t&&t.data&&t.data.__callback_id&&e.handleMessageFromNative(t.data)}),!1),Object.defineProperties(nl,{JSBridge:{writable:!1},Native2JSBridge:{writable:!1},ToutiaoJSBridge:{writable:!1}}),Object.freeze(nl.JSBridge),Object.freeze(nl.Native2JSBridge),Object.freeze(nl.ToutiaoJSBridge)},t.prototype.isLegacyCall=function(e){return!(!e||"string"!=typeof e||!this.toutiaoLegacyJSB)&&(!!al||!ol&&!dl&&(il&&e.indexOf(".")<0))},t}(el);function gl(e,t){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var n=Object(e),r=1;r=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},Pl=function(e,t){return function(n,r){t(n,r,e)}},Cl=function(e){s(n,e);var t=p(n);function n(e,r){var o;return i(this,n),(o=t.call(this,{name:Tl,reporters:r,context:e})).initialize=!1,o.dynamicWebPageviewHandler=Rl.bind(null,f(o)),o}return a(n,[{key:"init",value:function(e){this.initialize||(function(e){if(!e)return!1;var t=Qr(),n=e.getReporterPartner();return!(t&&!Ol.includes(t)||n&&e.isPartnerReporter()&&!Ol.includes(n))}(e)&&this.listenSPAHistoryChange(),this.initialize=!0)}},{key:"pixelSend",value:function(e,t){var n=this.reporters.find((function(t){return t.getReporterId()===e}));n&&wl(n)&&("Pageview"===t&&this.addObserver(this.dynamicWebPageviewHandler),this.init(n))}},{key:"listenSPAHistoryChange",value:function(){var e=this,t=function(){e.notifyObservers()};window.addEventListener("popstate",t),history.pushState=Sl("pushState",t),history.replaceState=Sl("replaceState",t)}}]),n}(Po);Cl=Al([R.injectable(),Pl(0,R.inject(Sr.CONTEXT)),Pl(1,R.inject(Sr.TTQ_REPORTERS))],Cl);var kl=[{identifier:Sr.HISTORY_OBSERVER,to:Cl,name:"HistoryObserver"}],Ml=Wr(),Ll=(null==Ml?void 0:Ml._container)||new R.Container,Dl=(null==Ml?void 0:Ml._container)?Co.REBIND:Co.BIND;Ei();var xl=Ll[Dl](Sr.ENV),jl=Ll[Dl](Ir.SignalType);Ll[Dl](Ir.ID),Ll[Dl](Ir.Type),Ll[Dl](Ir.Options),Ll[Dl](Ir.Plugins),Ll[Dl](Ir.Rules),Ll[Dl](Ir.Info);var Ul=Ll[Dl](Ir.WebLibraryInfo),Fl=Ll[Dl](Sr.TTQ_GLOBAL_OPTIONS);try{if(!Ll.get(Sr.TTQ_GLOBAL_OPTIONS))throw new Error("")}catch(e){Fl.toConstantValue({})}var Bl=function(e,t){var n=function(e){return{name:"pixel.js",version:"2.2.0",options:e}}(),r=bi();Ul.toConstantValue(n),xl.toConstantValue(t),jl.toConstantValue(r),!e||e._mounted||Ll.isBound(Sr.JS_BRIDGE)||Ii(t)&&(Ti(t)?Ll.bind(Sr.JS_BRIDGE).toConstantValue(function(){if(window&&window.ToutiaoJSBridge&&window.ToutiaoJSBridge.call)return window.ToutiaoJSBridge}()||ml):Ll.bind(Sr.JS_BRIDGE).toConstantValue(Il))},Hl=function(e){(null==e?void 0:e._container)||(Ll.bind(Sr.TTQ).to(Qo).inSingletonScope(),Ll.bind(Sr.CONTEXT).to($o).inSingletonScope(),Ll.bind(Sr.REPORTER).to(Jo),Ll.bind(Sr.TTQ_REPORTERS).toConstantValue([]),Ll.bind(Sr.REPORT_SERVICE).to(ba).inSingletonScope(),Ll.bind(Sr.AD_SERVICE).to(na).inSingletonScope(),Ll.bind(Sr.APP_SERVICE).to(oa).inSingletonScope(),Ll.bind(Sr.BRIDGE_SERVICE).to(da).inSingletonScope(),Ll.bind(Sr.HTTP_SERVICE).to(ya).inSingletonScope(),Ll.bind(Ir.IsOnsitePage).toConstantValue({value:!1}),Ll.bind(Sr.COOKIE_SERVICE).to(Oa).inSingletonScope(),Ll.bind(Sr.CONSENT_SERVICE).to(va).inSingletonScope()),e&&!e._container&&(e._container=Ll)},Gl=function(){Uu.forEach((function(e){var t=e.to,n=e.name,r=void 0===n?"":n,i=e.required,o=void 0!==i&&i,a=e.identifier;!o&&!Zr(r)||Ll.isBound(a)||Ll.bind(a).to(t).inSingletonScope()}))},Vl=function(){kl.forEach((function(e){var t=e.to,n=e.name,r=void 0===n?"":n,i=e.identifier;Zr(r)&&!Ll.isBound(i)&&Ll.bind(i).to(t).inSingletonScope()}))},ql=function(e){return e&&e.Math==Math&&e},Jl=ql("object"==typeof globalThis&&globalThis)||ql("object"==typeof window&&window)||ql("object"==typeof self&&self)||ql("object"==typeof w&&w)||Function("return this")(),Wl={},Kl=function(e){try{return!!e()}catch(e){return!0}},Yl=!Kl((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),Xl={},Ql={}.propertyIsEnumerable,zl=Object.getOwnPropertyDescriptor,Zl=zl&&!Ql.call({1:2},1);Xl.f=Zl?function(e){var t=zl(this,e);return!!t&&t.enumerable}:Ql;var $l=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ef={}.toString,tf=function(e){return ef.call(e).slice(8,-1)},nf=tf,rf="".split,of=Kl((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==nf(e)?rf.call(e,""):Object(e)}:Object,af=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},cf=of,sf=af,uf=function(e){return cf(sf(e))},lf=function(e){return"object"==typeof e?null!==e:"function"==typeof e},ff=lf,df=function(e,t){if(!ff(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!ff(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!ff(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!ff(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},pf={}.hasOwnProperty,hf=function(e,t){return pf.call(e,t)},vf=lf,_f=Jl.document,gf=vf(_f)&&vf(_f.createElement),yf=function(e){return gf?_f.createElement(e):{}},mf=yf,Ef=!Yl&&!Kl((function(){return 7!=Object.defineProperty(mf("div"),"a",{get:function(){return 7}}).a})),bf=Yl,If=Xl,Tf=$l,Of=uf,Sf=df,wf=hf,Nf=Ef,Rf=Object.getOwnPropertyDescriptor;Wl.f=bf?Rf:function(e,t){if(e=Of(e),t=Sf(t,!0),Nf)try{return Rf(e,t)}catch(e){}if(wf(e,t))return Tf(!If.f.call(e,t),e[t])};var Af={},Pf=lf,Cf=function(e){if(!Pf(e))throw TypeError(String(e)+" is not an object");return e},kf=Yl,Mf=Ef,Lf=Cf,Df=df,xf=Object.defineProperty;Af.f=kf?xf:function(e,t,n){if(Lf(e),t=Df(t,!0),Lf(n),Mf)try{return xf(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var jf=Af,Uf=$l,Ff=Yl?function(e,t,n){return jf.f(e,t,Uf(1,n))}:function(e,t,n){return e[t]=n,e},Bf={exports:{}},Hf=Jl,Gf=Ff,Vf=function(e,t){try{Gf(Hf,e,t)}catch(n){Hf[e]=t}return t},qf=Vf,Jf="__core-js_shared__",Wf=Jl[Jf]||qf(Jf,{}),Kf=Wf,Yf=Function.toString;"function"!=typeof Kf.inspectSource&&(Kf.inspectSource=function(e){return Yf.call(e)});var Xf=Kf.inspectSource,Qf=Xf,zf=Jl.WeakMap,Zf="function"==typeof zf&&/native code/.test(Qf(zf)),$f={exports:{}},ed=Wf;($f.exports=function(e,t){return ed[e]||(ed[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.4",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"});var td,nd,rd,id=0,od=Math.random(),ad=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++id+od).toString(36)},cd=$f.exports,sd=ad,ud=cd("keys"),ld=function(e){return ud[e]||(ud[e]=sd(e))},fd={},dd=Zf,pd=lf,hd=Ff,vd=hf,_d=ld,gd=fd,yd=Jl.WeakMap;if(dd){var md=new yd,Ed=md.get,bd=md.has,Id=md.set;td=function(e,t){return Id.call(md,e,t),t},nd=function(e){return Ed.call(md,e)||{}},rd=function(e){return bd.call(md,e)}}else{var Td=_d("state");gd[Td]=!0,td=function(e,t){return hd(e,Td,t),t},nd=function(e){return vd(e,Td)?e[Td]:{}},rd=function(e){return vd(e,Td)}}var Od={set:td,get:nd,has:rd,enforce:function(e){return rd(e)?nd(e):td(e,{})},getterFor:function(e){return function(t){var n;if(!pd(t)||(n=nd(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},Sd=Jl,wd=Ff,Nd=hf,Rd=Vf,Ad=Xf,Pd=Od.get,Cd=Od.enforce,kd=String(String).split("String");(Bf.exports=function(e,t,n,r){var i=!!r&&!!r.unsafe,o=!!r&&!!r.enumerable,a=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof t||Nd(n,"name")||wd(n,"name",t),Cd(n).source=kd.join("string"==typeof t?t:"")),e!==Sd?(i?!a&&e[t]&&(o=!0):delete e[t],o?e[t]=n:wd(e,t,n)):o?e[t]=n:Rd(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Pd(this).source||Ad(this)}));var Md=Jl,Ld=Md,Dd=Jl,xd=function(e){return"function"==typeof e?e:void 0},jd=function(e,t){return arguments.length<2?xd(Ld[e])||xd(Dd[e]):Ld[e]&&Ld[e][t]||Dd[e]&&Dd[e][t]},Ud={},Fd=Math.ceil,Bd=Math.floor,Hd=function(e){return isNaN(e=+e)?0:(e>0?Bd:Fd)(e)},Gd=Hd,Vd=Math.min,qd=function(e){return e>0?Vd(Gd(e),9007199254740991):0},Jd=Hd,Wd=Math.max,Kd=Math.min,Yd=uf,Xd=qd,Qd=function(e,t){var n=Jd(e);return n<0?Wd(n+t,0):Kd(n,t)},zd=function(e){return function(t,n,r){var i,o=Yd(t),a=Xd(o.length),c=Qd(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}},Zd={includes:zd(!0),indexOf:zd(!1)},$d=hf,ep=uf,tp=Zd.indexOf,np=fd,rp=function(e,t){var n,r=ep(e),i=0,o=[];for(n in r)!$d(np,n)&&$d(r,n)&&o.push(n);for(;t.length>i;)$d(r,n=t[i++])&&(~tp(o,n)||o.push(n));return o},ip=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],op=rp,ap=ip.concat("length","prototype");Ud.f=Object.getOwnPropertyNames||function(e){return op(e,ap)};var cp={};cp.f=Object.getOwnPropertySymbols;var sp,up=Ud,lp=cp,fp=Cf,dp=jd("Reflect","ownKeys")||function(e){var t=up.f(fp(e)),n=lp.f;return n?t.concat(n(e)):t},pp=hf,hp=dp,vp=Wl,_p=Af,gp=Kl,yp=/#|\.prototype\./,mp=function(e,t){var n=bp[Ep(e)];return n==Tp||n!=Ip&&("function"==typeof t?gp(t):!!t)},Ep=mp.normalize=function(e){return String(e).replace(yp,".").toLowerCase()},bp=mp.data={},Ip=mp.NATIVE="N",Tp=mp.POLYFILL="P",Op=mp,Sp=Jl,wp=Wl.f,Np=Ff,Rp=Bf.exports,Ap=Vf,Pp=function(e,t){for(var n=hp(t),r=_p.f,i=vp.f,o=0;oo;)Vp.f(e,n=r[o++],t[n]);return e},Kp=jd("document","documentElement"),Yp=Cf,Xp=Wp,Qp=ip,zp=fd,Zp=Kp,$p=yf,eh=ld("IE_PROTO"),th=function(){},nh=function(e){return"