PageSourceSearch

https://www.sensorsdata.com/assets/_gatsby/992e64452f0e95cd1f4af7a78779b5637b034e80-cb9ea15991c5b320a63e.js

js sensorsdata.com collected 2026-10-03 21:10:45 UTC 305,345 bytes, 2 lines download raw bytes

1/*! For license information please see 992e64452f0e95cd1f4af7a78779b5637b034e80-cb9ea15991c5b320a63e.js.LICENSE.txt */
2(self.webpackChunksensors_www=self.webpackChunksensors_www||[]).push([[3894],{5851:function(t,e,n){"use strict";n.d(e,{V1:function(){return r}});function r(t,e,n){if(void 0===n&&(n=Error),!t)throw new n(e)}},11996:function(t,e,n){"use strict";function r(t,e){var n=e&&e.cache?e.cache:l,r=e&&e.serializer?e.serializer:u;return(e&&e.strategy?e.strategy:s)(t,{cache:n,serializer:r})}function i(t,e,n,r){var i,a=null==(i=r)||"number"==typeof i||"boolean"==typeof i?r:n(r),o=e.get(a);return void 0===o&&(o=t.call(this,r),e.set(a,o)),o}function a(t,e,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),a=e.get(i);return void 0===a&&(a=t.apply(this,r),e.set(i,a)),a}function o(t,e,n,r,i){return n.bind(e,t,r,i)}function s(t,e){return o(t,this,1===t.length?i:a,e.cache.create(),e.serializer)}n.d(e,{A:function(){return r},W:function(){return p}});var u=function(){return JSON.stringify(arguments)};function c(){this.cache=Object.create(null)}c.prototype.get=function(t){return this.cache[t]},c.prototype.set=function(t,e){this.cache[t]=e};var l={create:function(){return new c}},p={variadic:function(t,e){return o(t,this,a,e.cache.create(),e.serializer)},monadic:function(t,e){return o(t,this,i,e.cache.create(),e.serializer)}}},9175:function(t,e,n){"use strict";n.d(e,{ZE:function(){return a},Im:function(){return u},tv:function(){return l},Tu:function(){return m},eW:function(){return s},oF:function(){return c},N1:function(){return _},N6:function(){return f},jA:function(){return d},Jp:function(){return h},xm:function(){return g},Qh:function(){return p},qg:function(){return at}});var r,i=n(62449);!function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(r||(r={}));var a,o;n(53921),n(39202),n(43359);function s(t){return t.type===a.literal}function u(t){return t.type===a.argument}function c(t){return t.type===a.number}function l(t){return t.type===a.date}function p(t){return t.type===a.time}function h(t){return t.type===a.select}function f(t){return t.type===a.plural}function d(t){return t.type===a.pound}function g(t){return t.type===a.tag}function _(t){return!(!t||"object"!=typeof t||t.type!==o.number)}function m(t){return!(!t||"object"!=typeof t||t.type!==o.dateTime)}!function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"}(a||(a={})),function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"}(o||(o={}));var v=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,y=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function b(t){var e={};return t.replace(y,(function(t){var n=t.length;switch(t[0]){case"G":e.era=4===n?"long":5===n?"narrow":"short";break;case"y":e.year=2===n?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=4===n?"short":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][n-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][n-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][n-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][n-1];break;case"s":e.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),e}var w=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var S=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,E=/^(@+)?(\+|#+)?[rs]?$/g,T=/(\*)(0+)|(#+)(0+)|(0+)/g,A=/^(0+)$/;function O(t){var e={};return"r"===t[t.length-1]?e.roundingPriority="morePrecision":"s"===t[t.length-1]&&(e.roundingPriority="lessPrecision"),t.replace(E,(function(t,n,r){return"string"!=typeof r?(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length):"+"===r?e.minimumSignificantDigits=n.length:"#"===n[0]?e.maximumSignificantDigits=n.length:(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length+("string"==typeof r?r.length:0)),""})),e}function k(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function C(t){var e;if("E"===t[0]&&"E"===t[1]?(e={notation:"engineering"},t=t.slice(2)):"E"===t[0]&&(e={notation:"scientific"},t=t.slice(1)),e){var n=t.slice(0,2);if("+!"===n?(e.signDisplay="always",t=t.slice(2)):"+?"===n&&(e.signDisplay="exceptZero",t=t.slice(2)),!A.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function P(t){var e=k(t);return e||{}}function I(t){for(var e={},n=0,r=t;n<r.length;n++){var a=r[n];switch(a.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=a.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=a.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;
2case"scientific":e=(0,i.Cl)((0,i.Cl)((0,i.Cl)({},e),{notation:"scientific"}),a.options.reduce((function(t,e){return(0,i.Cl)((0,i.Cl)({},t),P(e))}),{}));continue;case"engineering":e=(0,i.Cl)((0,i.Cl)((0,i.Cl)({},e),{notation:"engineering"}),a.options.reduce((function(t,e){return(0,i.Cl)((0,i.Cl)({},t),P(e))}),{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(a.options[0]);continue;case"integer-width":if(a.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");a.options[0].replace(T,(function(t,n,r,i,a,o){if(n)e.minimumIntegerDigits=r.length;else{if(i&&a)throw new Error("We currently do not support maximum integer digits");if(o)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(A.test(a.stem))e.minimumIntegerDigits=a.stem.length;else if(S.test(a.stem)){if(a.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(S,(function(t,n,r,i,a,o){return"*"===r?e.minimumFractionDigits=n.length:i&&"#"===i[0]?e.maximumFractionDigits=i.length:a&&o?(e.minimumFractionDigits=a.length,e.maximumFractionDigits=a.length+o.length):(e.minimumFractionDigits=n.length,e.maximumFractionDigits=n.length),""}));var o=a.options[0];"w"===o?e=(0,i.Cl)((0,i.Cl)({},e),{trailingZeroDisplay:"stripIfInteger"}):o&&(e=(0,i.Cl)((0,i.Cl)({},e),O(o)))}else if(E.test(a.stem))e=(0,i.Cl)((0,i.Cl)({},e),O(a.stem));else{var s=k(a.stem);s&&(e=(0,i.Cl)((0,i.Cl)({},e),s));var u=C(a.stem);u&&(e=(0,i.Cl)((0,i.Cl)({},e),u))}}return e}var D,N={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function L(t){var e=t.hourCycle;if(void 0===e&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n,r=t.language;return"root"!==r&&(n=t.maximize().region),(N[n||""]||N[r||""]||N["".concat(r,"-001")]||N["001"])[0]}var R=new RegExp("^".concat(v.source,"*")),x=new RegExp("".concat(v.source,"*$"));function H(t,e){return{start:t,end:e}}var B=!!String.prototype.startsWith,M=!!String.fromCodePoint,j=!!Object.fromEntries,F=!!String.prototype.codePointAt,U=!!String.prototype.trimStart,$=!!String.prototype.trimEnd,G=!!Number.isSafeInteger?Number.isSafeInteger:function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},W=!0;try{W="a"===(null===(D=Q("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===D?void 0:D[0])}catch(ot){W=!1}var V,X=B?function(t,e,n){return t.startsWith(e,n)}:function(t,e,n){return t.slice(n,n+e.length)===e},J=M?String.fromCodePoint:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n,r="",i=t.length,a=0;i>a;
vendor: 12,448 bytes, line 2
2){if((n=t[a++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},q=j?Object.fromEntries:function(t){for(var e={},n=0,r=t;n<r.length;n++){var i=r[n],a=i[0],o=i[1];e[a]=o}return e},z=F?function(t,e){return t.codePointAt(e)}:function(t,e){var n=t.length;if(!(e<0||e>=n)){var r,i=t.charCodeAt(e);return i<55296||i>56319||e+1===n||(r=t.charCodeAt(e+1))<56320||r>57343?i:r-56320+(i-55296<<10)+65536}},K=U?function(t){return t.trimStart()}:function(t){return t.replace(R,"")},Y=$?function(t){return t.trimEnd()}:function(t){return t.replace(x,"")};function Q(t,e){return new RegExp(t,e)}if(W){var Z=Q("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");V=function(t,e){var n;return Z.lastIndex=e,null!==(n=Z.exec(t)[1])&&void 0!==n?n:""}}else V=function(t,e){for(var n=[];;){var r=z(t,e);if(void 0===r||nt(r)||rt(r))break;n.push(r),e+=r>=65536?2:1}return J.apply(void 0,n)};var tt=function(){function t(t,e){void 0===e&&(e={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!e.ignoreTag,this.locale=e.locale,this.requiresOtherClause=!!e.requiresOtherClause,this.shouldParseSkeletons=!!e.shouldParseSkeletons}return t.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(t,e,n){for(var i=[];!this.isEOF();){var o=this.char();if(123===o){if((s=this.parseArgument(t,n)).err)return s;i.push(s.val)}else{if(125===o&&t>0)break;if(35!==o||"plural"!==e&&"selectordinal"!==e){if(60===o&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(r.UNMATCHED_CLOSING_TAG,H(this.clonePosition(),this.clonePosition()))}if(60===o&&!this.ignoreTag&&et(this.peek()||0)){if((s=this.parseTag(t,e)).err)return s;i.push(s.val)}else{var s;if((s=this.parseLiteral(t,e)).err)return s;i.push(s.val)}}else{var u=this.clonePosition();this.bump(),i.push({type:a.pound,location:H(u,this.clonePosition())})}}}return{val:i,err:null}},t.prototype.parseTag=function(t,e){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:a.literal,value:"<".concat(i,"/>"),location:H(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,e,!0);if(o.err)return o;var s=o.val,u=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!et(this.char()))return this.error(r.INVALID_TAG,H(u,this.clonePosition()));var c=this.clonePosition();return i!==this.parseTagName()?this.error(r.UNMATCHED_CLOSING_TAG,H(c,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:a.tag,value:i,children:s,location:H(n,this.clonePosition())},err:null}:this.error(r.INVALID_TAG,H(u,this.clonePosition())))}return this.error(r.UNCLOSED_TAG,H(n,this.clonePosition()))}return this.error(r.INVALID_TAG,H(n,this.clonePosition()))},t.prototype.parseTagName=function(){var t,e=this.offset();for(this.bump();!this.isEOF()&&(45===(t=this.char())||46===t||t>=48&&t<=57||95===t||t>=97&&t<=122||t>=65&&t<=90||183==t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039);)this.bump();return this.message.slice(e,this.offset())},t.prototype.parseLiteral=function(t,e){for(var n=this.clonePosition(),r="";;){var i=this.tryParseQuote(e);if(i)r+=i;else{var o=this.tryParseUnquoted(t,e);if(o)r+=o;else{var s=this.tryParseLeftAngleBracket();if(!s)break;r+=s}}}var u=H(n,this.clonePosition());return{val:{type:a.literal,value:r,location:u},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(et(t=this.peek()||0)||47===t)?null:(this.bump(),"<");var t},t.prototype.tryParseQuote=function(t){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===t||"selectordinal"===t)break;return null;default:return null}this.bump();var e=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39!==this.peek()){this.bump();break}e.push(39),this.bump()}else e.push(n);this.bump()}return J.apply(void 0,e)},t.prototype.tryParseUnquoted=function(t,e){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===e||"selectordinal"===e)||125===n&&t>0?null:(this.bump(),J(n))},t.prototype.parseArgument=function(t,e){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,H(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(r.EMPTY_ARGUMENT,H(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(r.MALFORMED_ARGUMENT,H(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,H(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:a.argument,value:i,location:H(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,H(n,this.clonePosition())):this.parseArgumentOptions(t,e,i,n);default:return this.error(r.MALFORMED_ARGUMENT,H(n,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),e=this.offset(),n=V(this.message,e),r=e+n.length;return this.bumpTo(r),{value:n,location:H(t,this.clonePosition())}},t.prototype.parseArgumentOptions=function(t,e,n,s){var u,c=this.clonePosition(),l=this.parseIdentifierIfPossible().value,p=this.clonePosition();switch(l){case"":return this.error(r.EXPECT_ARGUMENT_TYPE,H(c,p));case"number":case"date":case"time":this.bumpSpace();var h=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition();if((S=this.parseSimpleArgStyleIfPossible()).err)return S;if(0===(m=Y(S.val)).length)return this.error(r.EXPECT_ARGUMENT_STYLE,H(this.clonePosition(),this.clonePosition()));h={style:m,styleLocation:H(f,this.clonePosition())}}if((E=this.tryParseArgumentClose(s)).err)return E;var d=H(s,this.clonePosition());if(h&&X(null==h?void 0:h.style,"::",0)){var g=K(h.style.slice(2));if("number"===l)return(S=this.parseNumberSkeletonFromString(g,h.styleLocation)).err?S:{val:{type:a.number,value:n,location:d,style:S.val},err:null};if(0===g.length)return this.error(r.EXPECT_DATE_TIME_SKELETON,d);var _=g;this.locale&&(_=function(t,e){for(var n="",r=0;r<t.length;r++){var i=t.charAt(r);if("j"===i){for(var a=0;r+1<t.length&&t.charAt(r+1)===i;)a++,r++;var o=1+(1&a),s=a<2?1:3+(a>>1),u=L(e);for("H"!=u&&"k"!=u||(s=0);s-- >0;)n+="a";for(;o-- >0;)n=u+n}else n+="J"===i?"H":i}return n}(g,this.locale));var m={type:o.dateTime,pattern:_,location:h.styleLocation,parsedOptions:this.shouldParseSkeletons?b(_):{}};return{val:{type:"date"===l?a.date:a.time,value:n,location:d,style:m},err:null}}return{val:{type:"number"===l?a.number:"date"===l?a.date:a.time,value:n,location:d,style:null!==(u=null==h?void 0:h.style)&&void 0!==u?u:null},err:null};case"plural":case"selectordinal":case"select":var v=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(r.EXPECT_SELECT_ARGUMENT_OPTIONS,H(v,(0,i.Cl)({},v)));this.bumpSpace();var y=this.parseIdentifierIfPossible(),w=0;if("select"!==l&&"offset"===y.value){if(!this.bumpIf(":"))return this.error(r.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,H(this.clonePosition(),this.clonePosition()));var S;if(this.bumpSpace(),(S=this.tryParseDecimalInteger(r.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,r.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return S;this.bumpSpace(),y=this.parseIdentifierIfPossible(),w=S.val}var E,T=this.tryParsePluralOrSelectOptions(t,l,e,y);if(T.err)return T;if((E=this.tryParseArgumentClose(s)).err)return E;var A=H(s,this.clonePosition());return"select"===l?{val:{type:a.select,value:n,options:q(T.val),location:A},err:null}:{val:{type:a.plural,value:n,options:q(T.val),offset:w,pluralType:"plural"===l?"cardinal":"ordinal",location:A},err:null};default:return this.error(r.INVALID_ARGUMENT_TYPE,H(c,p))}},t.prototype.tryParseArgumentClose=function(t){return this.isEOF()||125!==this.char()?this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,H(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,e=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(r.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,H(n,this.clonePosition()));this.bump();break;case 123:t+=1,this.bump();break;case 125:if(!(t>0))return{val:this.message.slice(e.offset,this.offset()),err:null};t-=1;break;default:this.bump()}}return{val:this.message.slice(e.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(t,e){var n=[];try{n=function(t){if(0===t.length)throw new Error("Number skeleton cannot be empty");for(var e=[],n=0,r=t.split(w).filter((function(t){return t.length>0}));n<r.length;n++){var i=r[n].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var a=i[0],o=i.slice(1),s=0,u=o;s<u.length;s++)if(0===u[s].length)throw new Error("Invalid number skeleton");e.push({stem:a,options:o})}return e}(t)}catch(i){return this.error(r.INVALID_NUMBER_SKELETON,e)}return{val:{type:o.number,tokens:n,location:e,parsedOptions:this.shouldParseSkeletons?I(n):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(t,e,n,i){for(var a,o=!1,s=[],u=new Set,c=i.value,l=i.location;;){if(0===c.length){var p=this.clonePosition();if("select"===e||!this.bumpIf("="))break;var h=this.tryParseDecimalInteger(r.EXPECT_PLURAL_ARGUMENT_SELECTOR,r.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;l=H(p,this.clonePosition()),c=this.message.slice(p.offset,this.offset())}if(u.has(c))return this.error("select"===e?r.DUPLICATE_SELECT_ARGUMENT_SELECTOR:r.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);"other"===c&&(o=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===e?r.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:r.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,H(this.clonePosition(),this.clonePosition()));var d=this.parseMessage(t+1,e,n);if(d.err)return d;var g=this.tryParseArgumentClose(f);if(g.err)return g;s.push([c,{value:d.val,location:H(f,this.clonePosition())}]),u.add(c),this.bumpSpace(),c=(a=this.parseIdentifierIfPossible()).value,l=a.location}return 0===s.length?this.error("select"===e?r.EXPECT_SELECT_ARGUMENT_SELECTOR:r.EXPECT_PLURAL_ARGUMENT_SELECTOR,H(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(r.MISSING_OTHER_CLAUSE,H(this.clonePosition(),this.clonePosition())):{val:s,err:null}},t.prototype.tryParseDecimalInteger=function(t,e){var n=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,a=0;!this.isEOF();){var o=this.char();if(!(o>=48&&o<=57))break;i=!0,a=10*a+(o-48),this.bump()}var s=H(r,this.clonePosition());return i?G(a*=n)?{val:a,err:null}:this.error(e,s):this.error(t,s)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var e=z(this.message,t);if(void 0===e)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return e},t.prototype.error=function(t,e){return{val:null,err:{kind:t,message:this.message,location:e}}},t.prototype.bump=function(){if(!this.isEOF()){var t=this.char();10===t?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},t.prototype.bumpIf=function(t){if(X(this.message,t,this.offset())){for(var e=0;e<t.length;e++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(t){var e=this.offset(),n=this.message.indexOf(t,e);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var e=this.offset();if(e===t)break;
2if(e>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&nt(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),e=this.offset(),n=this.message.charCodeAt(e+(t>=65536?2:1));return null!=n?n:null},t}();function et(t){return t>=97&&t<=122||t>=65&&t<=90}function nt(t){return t>=9&&t<=13||32===t||133===t||t>=8206&&t<=8207||8232===t||8233===t}function rt(t){return t>=33&&t<=35||36===t||t>=37&&t<=39||40===t||41===t||42===t||43===t||44===t||45===t||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||91===t||92===t||93===t||94===t||96===t||123===t||124===t||125===t||126===t||161===t||t>=162&&t<=165||166===t||167===t||169===t||171===t||172===t||174===t||176===t||177===t||182===t||187===t||191===t||215===t||247===t||t>=8208&&t<=8213||t>=8214&&t<=8215||8216===t||8217===t||8218===t||t>=8219&&t<=8220||8221===t||8222===t||8223===t||t>=8224&&t<=8231||t>=8240&&t<=8248||8249===t||8250===t||t>=8251&&t<=8254||t>=8257&&t<=8259||8260===t||8261===t||8262===t||t>=8263&&t<=8273||8274===t||8275===t||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||8608===t||t>=8609&&t<=8610||8611===t||t>=8612&&t<=8613||8614===t||t>=8615&&t<=8621||8622===t||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||8658===t||8659===t||8660===t||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||8968===t||8969===t||8970===t||8971===t||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||9001===t||9002===t||t>=9003&&t<=9083||9084===t||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||9655===t||t>=9656&&t<=9664||9665===t||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||9839===t||t>=9840&&t<=10087||10088===t||10089===t||10090===t||10091===t||10092===t||10093===t||10094===t||10095===t||10096===t||10097===t||10098===t||10099===t||10100===t||10101===t||t>=10132&&t<=10175||t>=10176&&t<=10180||10181===t||10182===t||t>=10183&&t<=10213||10214===t||10215===t||10216===t||10217===t||10218===t||10219===t||10220===t||10221===t||10222===t||10223===t||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||10627===t||10628===t||10629===t||10630===t||10631===t||10632===t||10633===t||10634===t||10635===t||10636===t||10637===t||10638===t||10639===t||10640===t||10641===t||10642===t||10643===t||10644===t||10645===t||10646===t||10647===t||10648===t||t>=10649&&t<=10711||10712===t||10713===t||10714===t||10715===t||t>=10716&&t<=10747||10748===t||10749===t||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||11158===t||t>=11159&&t<=11263||t>=11776&&t<=11777||11778===t||11779===t||11780===t||11781===t||t>=11782&&t<=11784||11785===t||11786===t||11787===t||11788===t||11789===t||t>=11790&&t<=11798||11799===t||t>=11800&&t<=11801||11802===t||11803===t||11804===t||11805===t||t>=11806&&t<=11807||11808===t||11809===t||11810===t||11811===t||11812===t||11813===t||11814===t||11815===t||11816===t||11817===t||t>=11818&&t<=11822||11823===t||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||11840===t||11841===t||11842===t||t>=11843&&t<=11855||t>=11856&&t<=11857||11858===t||t>=11859&&t<=11903||t>=12289&&t<=12291||12296===t||12297===t||12298===t||12299===t||12300===t||12301===t||12302===t||12303===t||12304===t||12305===t||t>=12306&&t<=12307||12308===t||12309===t||12310===t||12311===t||12312===t||12313===t||12314===t||12315===t||12316===t||12317===t||t>=12318&&t<=12319||12320===t||12336===t||64830===t||64831===t||t>=65093&&t<=65094}function it(t){t.forEach((function(t){if(delete t.location,h(t)||f(t))for(var e in t.options)delete t.options[e].location,it(t.options[e].value);else c(t)&&_(t.style)||(l(t)||p(t))&&m(t.style)?delete t.style.location:g(t)&&it(t.children)}))}function at(t,e){void 0===e&&(e={}),e=(0,i.Cl)({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var n=new tt(t,e).parse();if(n.err){var a=SyntaxError(r[n.err.kind]);throw a.location=n.err.location,a.originalMessage=n.err.message,a}return(null==e?void 0:e.captureLocation)||it(n.val),n.val}},86603:function(t,e,n){"use strict";n.d(e,{Ar:function(){return a},Ho:function(){return l},OC:function(){return o},hr:function(){return u},lo:function(){return r},pg:function(){return c},sb:function(){return p},uo:function(){return s}});var r,i=n(62449);!function(t){t.FORMAT_ERROR="FORMAT_ERROR",t.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",t.INVALID_CONFIG="INVALID_CONFIG",t.MISSING_DATA="MISSING_DATA",t.MISSING_TRANSLATION="MISSING_TRANSLATION"}(r||(r={}));var a=function(t){function e(n,r,i){var a=this,o=i?i instanceof Error?i:new Error(String(i)):void 0;return(a=t.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(r," \n").concat(o?"\n".concat(o.message,"\n").concat(o.stack):""))||this).code=n,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(a,e),a}return(0,i.C6)(e,t),e}(Error),o=function(t){function e(e,n){return t.call(this,r.UNSUPPORTED_FORMATTER,e,n)||this}return(0,i.C6)(e,t),e}(a),s=function(t){function e(e,n){return t.call(this,r.INVALID_CONFIG,e,n)||this}return(0,i.C6)(e,t),e}(a),u=function(t){function e(e,n){return t.call(this,r.MISSING_DATA,e,n)||this}return(0,i.C6)(e,t),e}(a),c=function(t){function e(e,n,i){return t.call(this,r.FORMAT_ERROR,"".concat(e," \nLocale: ").concat(n,"\n"),i)||this}return(0,i.C6)(e,t),e}(a),l=function(t){function e(e,n,r,i){var a=t.call(this,"".concat(e," \nMessageID: ").concat(null==r?void 0:r.id,"\nDefault Message: ").concat(null==r?void 0:r.defaultMessage,"\nDescription: ").concat(null==r?void 0:r.description," \n"),n,i)||this;return a.descriptor=r,a}return(0,i.C6)(e,t),e}(c),p=function(t){function e(e,n){var i=t.call(this,r.MISSING_TRANSLATION,'Missing message: "'.concat(e.id,'" for locale "').concat(n,'", using ').concat(e.defaultMessage?"default message":"id"," as fallback."))||this;return i.descriptor=e,i}return(0,i.C6)(e,t),e}(a)},3284:function(t,e,n){"use strict";n.d(e,{F3:function(){return h},GT:function(){return p},J9:function(){return s},JF:function(){return u},MT:function(){return c}});var r=n(62449),i=n(86114),a=n(11996),o=n(86603);function s(t,e,n){return void 0===n&&(n={}),e.reduce((function(e,r){return r in t?e[r]=t[r]:r in n&&(e[r]=n[r]),e}),{})}var u={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:function(t){0},onWarn:function(t){0}};function c(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function l(t){return{create:function(){return{get:function(e){return t[e]}
2,set:function(e,n){t[e]=n}}}}}function p(t){void 0===t&&(t={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}});var e=Intl.RelativeTimeFormat,n=Intl.ListFormat,o=Intl.DisplayNames,s=(0,a.A)((function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,(0,r.fX)([void 0],e,!1)))}),{cache:l(t.dateTime),strategy:a.W.variadic}),u=(0,a.A)((function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,(0,r.fX)([void 0],e,!1)))}),{cache:l(t.number),strategy:a.W.variadic}),c=(0,a.A)((function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,(0,r.fX)([void 0],e,!1)))}),{cache:l(t.pluralRules),strategy:a.W.variadic});return{getDateTimeFormat:s,getNumberFormat:u,getMessageFormat:(0,a.A)((function(t,e,n,a){return new i.S(t,e,n,(0,r.Cl)({formatters:{getNumberFormat:u,getDateTimeFormat:s,getPluralRules:c}},a||{}))}),{cache:l(t.message),strategy:a.W.variadic}),getRelativeTimeFormat:(0,a.A)((function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new(e.bind.apply(e,(0,r.fX)([void 0],t,!1)))}),{cache:l(t.relativeTime),strategy:a.W.variadic}),getPluralRules:c,getListFormat:(0,a.A)((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new(n.bind.apply(n,(0,r.fX)([void 0],t,!1)))}),{cache:l(t.list),strategy:a.W.variadic}),getDisplayNames:(0,a.A)((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new(o.bind.apply(o,(0,r.fX)([void 0],t,!1)))}),{cache:l(t.displayNames),strategy:a.W.variadic})}}function h(t,e,n,r){var i,a=t&&t[e];if(a&&(i=a[n]),i)return i;r(new o.OC("No ".concat(e," format named: ").concat(n)))}},76675:function(t,e,n){"use strict";n.d(e,{A:function(){return Me}});var r=n(35520),i=n(57029),a=n(71018),o=n(47728);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var u=n(67867);function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(0,u.A)(r.key),r)}}function l(t,e,n){return e&&c(t.prototype,e),n&&c(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var p,h=n(99199),f=n.n(h);function d(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return g(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function m(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach((function(e){(0,o.A)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var v=function(){return l((function t(){s(this,t),this.listeners={}}),[{key:"on",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t&&e){if(!S(e))throw new Error("listener must be a function");this.listeners[t]=this.listeners[t]||[],this.listeners[t].push({listener:e,once:n})}}},{key:"off",value:function(t,e){var n=this.listeners[t];if(null!=n&&n.length){"number"==typeof e&&n.splice(e,1);var r=n.findIndex((function(t){return t.listener===e}));
2-1!==r&&n.splice(r,1)}}},{key:"emit",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.listeners[t]&&this.listeners[t].forEach((function(n,i){var a;(a=n.listener).call.apply(a,[e].concat(r)),n.listener.once&&e.off(t,i)}))}},{key:"once",value:function(t,e){this.on(t,e,!0)}},{key:"removeAllListeners",value:function(t){t?this.listeners[t]=[]:this.listeners={}}}])}(),y={get:function(t){for(var e=t+"=",n=document.cookie.split(";"),r=0,i=n.length;r<i;r++){for(var a=n[r];" "==a.charAt(0);)a=a.substring(1,a.length);if(0==a.indexOf(e))return P(a.substring(e.length,a.length))}return null},set:function(t){var e=t.name,n=t.value,r=t.expires,i=t.samesite,a=t.secure,o=t.domain,s="",u="",c="",l="";if(0!==(r=null==r||void 0===r?365:r)){var p=new Date;"string"==typeof r?p.setTime(p.getTime()+1e3*Number(r.slice(0,-1))):p.setTime(p.getTime()+24*r*60*60*1e3),s="; expires="+p.toUTCString()}function h(t){return t?t.replace(/\r\n/g,""):""}i&&(c="; SameSite="+i),a&&(u="; secure");var f=h(e),d=h(n),g=h(o);g&&(l="; domain="+g),f&&d&&(document.cookie=f+"="+encodeURIComponent(d)+s+"; path=/"+l+c+u)},remove:function(t){var e=t?t.replace(/\r\n/g,""):"";e&&(document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")},isSupport:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.samesite,n=t.secure;if(!navigator.cookieEnabled)return!1;var r="sensorswave_cookie_support_test";return this.set({name:r,value:"1",samesite:e,secure:n}),"1"===this.get(r)&&(this.remove(r),!0)}},b=Object.prototype.toString;function w(t){return"[object Object]"===b.call(t)}function S(t){var e=b.call(t);return"[object Function]"==e||"[object AsyncFunction]"==e}function E(t){return"[object Array]"==b.call(t)}function T(t){return"[object String]"==b.call(t)}function A(t){return void 0===t}var O=Object.prototype.hasOwnProperty;function k(t){if(w(t)){for(var e in t)if(O.call(t,e))return!1;return!0}return!1}function C(t){return!(!t||1!==t.nodeType)}function P(t){var e=t;try{e=decodeURIComponent(t)}catch(b){e=t}return e}function I(t){try{return JSON.parse(t)}catch(y){return""}}var D=function(){var t=Date.now();return function(e){return Math.ceil((t=(9301*t+49297)%233280)/233280*e)}}();function N(){var t;if("function"==typeof Uint32Array&&("undefined"!=typeof crypto&&(t=crypto),t&&w(t)&&t.getRandomValues))return t.getRandomValues(new Uint32Array(1))[0]/Math.pow(2,32);return D(1e19)/1e19}var L=function(){function t(t){return("0".repeat(t)+Date.now().toString(16)).slice(-t)}return function(){var e=String(screen.height*screen.width);return e=e&&/\d{4,}/.test(e)?e.slice(-4):String(31242*N()).replace(".","").slice(0,4),t(8)+"-"+N().toString(16).replace(".","").slice(-4)+"-"+function(){var t,e=navigator.userAgent,n=[],r=0;function i(t,e){for(var r=0,i=0;i<e.length;i++)r|=n[i]<<8*i;return(t^r)>>>0}for(var a=0;a<e.length;a++)t=e.charCodeAt(a),n.unshift(255&t),n.length>=4&&(r=i(r,n),n=[]);return n.length>0&&(r=i(r,n)),("0000"+r.toString(16)).slice(-4)}()+"-"+e+"-"+t(12)||(String(N())+String(N())+String(N())).slice(2,15)}}();function R(t,e){e&&"string"==typeof e||(e="");var n=null;try{n=new URL(t).hostname}catch(w){}return n||e}function x(t){var e=[];try{e=atob(t).split("").map((function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}))}catch(b){e=[]}try{return decodeURIComponent(e.join(""))}catch(b){return e.join("")}}function H(t){var e="";try{e=btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(function(t,e){return String.fromCharCode(parseInt(e,16))})))}catch(b){e=t}return e}var B={get:function(t){return window.localStorage.getItem(t)},parse:function(t){var e;try{e=JSON.parse(B.get(t))||null}catch(b){console.warn(b)}return e},set:function(t,e){try{window.localStorage.setItem(t,e)}catch(b){console.warn(b)}},remove:function(t){window.localStorage.removeItem(t)},isSupport:function(){var t=!0;try{var e="__local_store_support__",n="testIsSupportStorage";B.set(e,n),B.get(e)!==n&&(t=!1),B.remove(e)}catch(y){t=!1}return t}};function M(t){return t.trim()}function j(t){if(!t||"string"!=typeof t)return"";try{return new URL(t,window.location.origin).pathname}catch(y){return""}}var F={},U="1.6.0",$="init-ready",G="spa-switch",W="ff-ready",V="$PageLeave",X="$Exception",J=function(t){return t[t.FEATURE_GATE=1]="FEATURE_GATE",t[t.FEATURE_CONFIG=2]="FEATURE_CONFIG",t[t.EXPERIMENT=3]="EXPERIMENT",t}(J||{}),q={crossSubdomain:!1,requests:[],_sessionState:{},_abData:[],_trace_id:"",commonProps:{}
2,_state:{anon_id:"",login_id:"",identities:{}},getIdentityCookieID:function(){var t;return(null===(t=this._state.identities)||void 0===t?void 0:t.$identity_cookie_id)||""},getCommonProps:function(){return this.commonProps||{}},setCommonProps:function(t){this.commonProps=t},getAnonId:function(){return this._state.anon_id||this.getIdentityCookieID()||L()},getLoginId:function(){return this._state.login_id},getTraceId:function(){return this._trace_id||L()},set:function(t,e){this._state[t]=e,this.save()},getCookieName:function(){return"sensorswave2025jssdkcross"},getABLSName:function(){return"sensorswave2025jssdkablatest"},save:function(){var t=JSON.parse(JSON.stringify(this._state));t.identities&&(t.identities=H(JSON.stringify(t.identities)));var e=JSON.stringify(t);y.set({name:this.getCookieName(),value:e,expires:365})},init:function(t){var e;this.crossSubdomain=t,y.isSupport()&&(e=I(y.get(this.getCookieName()))),q._state=m({},e||{}),q._state.identities&&(q._state.identities=I(x(q._state.identities))),q._state.identities&&w(q._state.identities)&&!k(q._state.identities)||(q._state.identities={$identity_cookie_id:L()}),q.save()},setLoginId:function(t){"number"==typeof t&&(t=String(t)),void 0!==t&&t&&(q.set("login_id",t),q.save())},clearLoginId:function(){this._state.login_id="",this.save()},resetAnonId:function(){this._state.anon_id="",this._state.identities={$identity_cookie_id:L()},this.save()},setAnonId:function(t){"number"==typeof t&&(t=String(t)),"string"==typeof t&&t?(q.set("anon_id",t),q.save()):console.warn("[SensorsWave store] Invalid anonId, ignored:",t)},saveABData:function(t){if(t&&!k(t)){this._abData=t;var e=JSON.parse(JSON.stringify(this._abData));e=H(JSON.stringify(e));try{localStorage.setItem(this.getABLSName(),JSON.stringify({time:Date.now(),data:e,anon_id:this.getAnonId(),login_id:this.getLoginId()}))}catch(b){console.warn("Failed to save abdata to localStorage",b)}}},getABData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6e5;try{var e=localStorage.getItem(this.getABLSName());if(e){var n=I(e)||{}
2,r=n.time,i=n.data,a=n.login_id,o=n.anon_id;if(r&&i&&Date.now()-r<t&&o===this.getAnonId()&&(!a||a===this.getLoginId())){var s=I(x(i));return this._abData=Array.isArray(s)?s:[],this._abData}localStorage.removeItem(this.getABLSName())}}catch(y){this._abData=[]}return this._abData||[]}};function z(t){return!(t>=400&&t<500)||408===t||429===t}function K(t){var e;if(t.data)return{contentType:"application/json",body:(e=t.data,JSON.stringify(e,(function(t,e){return"bigint"==typeof e?e.toString():e}),void 0))}}var Y=[];function Q(t){var e,n,r,i,a=m({},t);a.timeout=a.timeout||6e4;var o=null!==(e=a.transport)&&void 0!==e?e:"fetch",s=null!==(n=null===(r=Y.find((function(t){return t.transport===o})))||void 0===r?void 0:r.method)&&void 0!==n?n:null===(i=Y[0])||void 0===i?void 0:i.method;if(!s)throw new Error("No available transport method for HTTP request");s(a)}function Z(t){return T(t=t||document.referrer)&&(t=P(t=t.trim()))||""}function tt(t){var e=R(t=t||Z());if(!e)return"";for(var n={baidu:[/^.*\.baidu\.com$/],bing:[/^.*\.bing\.com$/],google:[/^www\.google\.com$/,/^www\.google\.com\.[a-z]{2}$/,/^www\.google\.[a-z]{2}
2$/],sm:[/^m\.sm\.cn$/],so:[/^.+\.so\.com$/],sogou:[/^.*\.sogou\.com$/],yahoo:[/^.*\.yahoo\.com$/],duckduckgo:[/^.*\.duckduckgo\.com$/]},r=0,i=Object.keys(n);r<i.length;r++)for(var a=i[r],o=n[a],s=0,u=o.length;s<u;s++)if(o[s].test(e))return a;return""}function et(t,e){return-1!==t.indexOf(e)}"function"==typeof fetch&&Y.push({transport:"fetch",method:function(t){if("undefined"!=typeof fetch){var e=K(t),n=new Headers;t.headers&&Object.keys(t.headers).forEach((function(e){n.append(e,t.headers[e])})),null!=e&&e.contentType&&n.append("Content-Type",e.contentType),fetch(t.url,{method:t.method||"GET",headers:n,body:null==e?void 0:e.body}).then((function(e){return e.text().then((function(n){var r,i={statusCode:e.status,text:n};if(200===e.status)try{i.json=JSON.parse(n)}catch(S){console.error("Failed to parse response:",S)}null===(r=t.callback)||void 0===r||r.call(t,i)}))})).catch((function(e){var n;console.error("Request failed:",e),null===(n=t.callback)||void 0===n||n.call(t,{statusCode:0,text:String(e)})}))}else console.error("fetch API is not available")}}),"undefined"!=typeof XMLHttpRequest&&Y.push({transport:"XHR",method:function(t){if("undefined"!=typeof XMLHttpRequest){var e=new XMLHttpRequest;e.open(t.method||"GET",t.url,!0);var n=K(t);t.headers&&Object.keys(t.headers).forEach((function(n){e.setRequestHeader(n,t.headers[n])})),null!=n&&n.contentType&&e.setRequestHeader("Content-Type",n.contentType),e.timeout=t.timeout||6e4,e.withCredentials=!0,e.onreadystatechange=function(){if(4===e.readyState){var r,i={statusCode:e.status,text:e.responseText};if(200===e.status)try{i.json=JSON.parse(e.responseText)}catch(n){console.error("Failed to parse JSON response:",n)}null===(r=t.callback)||void 0===r||r.call(t,i)}},e.send(null==n?void 0:n.body)}else console.error("XMLHttpRequest is not available")}});var nt={FACEBOOK:"Facebook",MOBILE:"Mobile",IOS:"iOS",ANDROID:"Android",TABLET:"Tablet",ANDROID_TABLET:"Android Tablet",IPAD:"iPad",APPLE:"Apple",APPLE_WATCH:"Apple Watch",SAFARI:"Safari",BLACKBERRY:"BlackBerry",SAMSUNG_BROWSER:"SamsungBrowser",SAMSUNG_INTERNET:"Samsung Internet",CHROME:"Chrome",CHROME_OS:"Chrome OS",CHROME_IOS:"Chrome iOS",INTERNET_EXPLORER:"Internet Explorer",INTERNET_EXPLORER_MOBILE:"Internet Explorer Mobile",OPERA:"Opera",OPERA_MINI:"Opera Mini",EDGE:"Edge",MICROSOFT_EDGE:"Microsoft Edge",FIREFOX:"Firefox",FIREFOX_IOS:"Firefox iOS",NINTENDO:"Nintendo",PLAYSTATION:"PlayStation",XBOX:"Xbox",ANDROID_MOBILE:"Android Mobile",MOBILE_SAFARI:"Mobile Safari",WINDOWS:"Windows",WINDOWS_PHONE:"Windows Phone",NOKIA:"Nokia",OUYA:"Ouya",GENERIC_MOBILE:"Generic mobile",GENERIC_TABLET:"Generic tablet",KONQUEROR:"Konqueror",UC_BROWSER:"UC Browser",HUAWEI:"Huawei",XIAOMI:"Xiaomi",OPPO:"OPPO",VIVO:"vivo"},rt="(\\d+(\\.\\d+)?)",it=new RegExp("Version/"+rt),at=new RegExp(nt.XBOX,"i"),ot=new RegExp(nt.PLAYSTATION+" \\w+","i"),st=new RegExp(nt.NINTENDO+" \\w+","i"),ut=new RegExp(nt.BLACKBERRY+"|PlayBook|BB10","i"),ct=new RegExp("(HUAWEI|honor|HONOR)","i"),lt=new RegExp("(Xiaomi|Redmi)","i"),pt=new RegExp("(OPPO|realme)","i"),ht=new RegExp("(vivo|IQOO)","i"),ft={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"};function dt(t,e){return e=e||"",et(t," OPR/")&&et(t,"Mini")?nt.OPERA_MINI:et(t," OPR/")?nt.OPERA:ut.test(t)?nt.BLACKBERRY:et(t,"IE"+nt.MOBILE)||et(t,"WPDesktop")?nt.INTERNET_EXPLORER_MOBILE:et(t,nt.SAMSUNG_BROWSER)?nt.SAMSUNG_INTERNET:et(t,nt.EDGE)||et(t,"Edg/")?nt.MICROSOFT_EDGE:et(t,"FBIOS")?nt.FACEBOOK+" "+nt.MOBILE:et(t,"UCWEB")||et(t,"UCBrowser")?nt.UC_BROWSER:et(t,"CriOS")?nt.CHROME_IOS:et(t,"CrMo")||et(t,nt.CHROME)?nt.CHROME:et(t,nt.ANDROID)&&et(t,nt.SAFARI)?nt.ANDROID_MOBILE:et(t,"FxiOS")?nt.FIREFOX_IOS:et(t.toLowerCase(),nt.KONQUEROR.toLowerCase())?nt.KONQUEROR:function(t,e){return e&&et(e,nt.APPLE)||et(n=t,nt.SAFARI)&&!et(n,nt.CHROME)&&!et(n,nt.ANDROID);var n}(t,e)?et(t,nt.MOBILE)?nt.MOBILE_SAFARI:nt.SAFARI:et(t,nt.FIREFOX)?nt.FIREFOX:et(t,"MSIE")||et(t,"Trident/")?nt.INTERNET_EXPLORER:et(t,"Gecko")?nt.FIREFOX:""}var gt=(p={},(0,o.A)((0,o.A)((0,o.A)((0,o.A)((0,o.A)((0,o.A)((0,o.A)((0,o.A)((0,o.A)((0,o.A)(p,nt.INTERNET_EXPLORER_MOBILE,[new RegExp("rv:"+rt)]),nt.MICROSOFT_EDGE,[new RegExp(nt.EDGE+"?\\/"+rt)]),nt.CHROME,[new RegExp("("+nt.CHROME+"|CrMo)\\/"+rt)]),nt.CHROME_IOS,[new RegExp("CriOS\\/"+rt)]),nt.UC_BROWSER,[new RegExp("(UCBrowser|UCWEB)\\/"+rt)]),nt.SAFARI,[it]),nt.MOBILE_SAFARI,[it]),nt.OPERA,[new RegExp("("+nt.OPERA+"|OPR)\\/"+rt)]),nt.FIREFOX,[new RegExp(nt.FIREFOX+"\\/"+rt)]),nt.FIREFOX_IOS,[new RegExp("FxiOS\\/"+rt)]),(0,o.A)((0,o.A)((0,o.A)((0,o.A)((0,o.A)((0,o.A)(p,nt.KONQUEROR,[new RegExp("Konqueror[:/]?"+rt,"i")]),nt.BLACKBERRY,[new RegExp(nt.BLACKBERRY+" "+rt),it]),nt.ANDROID_MOBILE,[new RegExp("android\\s"+rt,"i")]),nt.SAMSUNG_INTERNET,[new RegExp(nt.SAMSUNG_BROWSER+"\\/"+rt)]),nt.INTERNET_EXPLORER,[new RegExp("(rv:|MSIE )"+rt)]),"Mozilla",[new RegExp("rv:"+rt)]));function _t(t,e){var n=dt(t,e),r=gt[n];if(A(r))return null;for(var i=0;i<r.length;i++){var a=r[i],o=t.match(a);if(o)return parseFloat(o[o.length-2])}return null}var mt=[[new RegExp(nt.XBOX+"; "+nt.XBOX+" (.*?)[);]","i"),function(t){return[nt.XBOX,t&&t[1]||""]}],[new RegExp(nt.NINTENDO,"i"),[nt.NINTENDO,""]],[new RegExp(nt.PLAYSTATION,"i"),[nt.PLAYSTATION,""]],[ut,[nt.BLACKBERRY,""]],[new RegExp(nt.WINDOWS,"i"),function(t,e){if(/Phone/.test(e)||/WPDesktop/.test(e))return[nt.WINDOWS_PHONE,""];if(new RegExp(nt.MOBILE).test(e)&&!/IEMobile\b/.test(e))return[nt.WINDOWS+" "+nt.MOBILE,""];var n=/Windows NT ([0-9.]+)/i.exec(e);if(n&&n[1]){var r=n[1],i=ft[r]||"";return/arm/i.test(e)&&(i="RT"),[nt.WINDOWS,i]}return[nt.WINDOWS,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,function(t){if(t&&t[3]){var e=[t[3],t[4],t[5]||"0"];return[nt.IOS,e.join(".")]}return[nt.IOS,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,function(t){var e="";return t&&t.length>=3&&(e=A(t[2])?t[3]:t[2]),["watchOS",e]}],[new RegExp("("+nt.ANDROID+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+nt.ANDROID+")","i"),function(t){if(t&&t[2]){var e=[t[2],t[3],t[4]||"0"];return[nt.ANDROID,e.join(".")]}return[nt.ANDROID,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,function(t){var e=["Mac OS X",""];if(t&&t[1]){var n=[t[1],t[2],t[3]||"0"];e[1]=n.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[nt.CHROME_OS,""]],[/Linux|debian/i,["Linux",""]]];function vt(){var t,e,n,r,i,o=window.innerHeight||document.documentElement.clientHeight||document.body&&document.body.clientHeight||0,s=window.innerWidth||document.documentElement.clientWidth||document.body&&document.body.clientWidth||0,u=navigator.userAgent,c=function(t){for(var e=0;e<mt.length;e++){var n=(0,a.A)(mt[e],2),r=n[0],i=n[1],o=r.exec(t),s=o&&("function"==typeof i?i(o,t):i);if(s)return s}return["",""]}(u)||["",""];return{$browser:dt(u),$browser_version:_t(u),$url:null===(t=location)||void 0===t?void 0:t.href.substring(0,1e3),$host:null===(e=location)||void 0===e?void 0:e.host,$viewport_height:o,$viewport_width:s,$lib:"webjs",$lib_version:U,$search_engine:tt(),$referrer:Z(),$referrer_host:R(i=i||Z()),$title:document.title,$language:navigator.language,$model:(r=u,(st.test(r)?nt.NINTENDO:ot.test(r)?nt.PLAYSTATION:at.test(r)?nt.XBOX:new RegExp(nt.OUYA,"i").test(r)?nt.OUYA:new RegExp("("+nt.WINDOWS_PHONE+"|WPDesktop)","i").test(r)?nt.WINDOWS_PHONE:/iPad/.test(r)?nt.IPAD:/iPod/.test(r)?"iPod Touch":/iPhone/.test(r)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(r)?nt.APPLE_WATCH:ut.test(r)?nt.BLACKBERRY:/(kobo)\s(ereader|touch)/i.test(r)?"Kobo":new RegExp(nt.NOKIA,"i").test(r)?nt.NOKIA:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(r)||/(kf[a-z]+)( bui|\)).+silk\//i.test(r)?"Kindle Fire":ct.test(r)?nt.HUAWEI:lt.test(r)?nt.XIAOMI:pt.test(r)?nt.OPPO:ht.test(r)?nt.VIVO:/(Android|ZTE)/i.test(r)?!new RegExp(nt.MOBILE).test(r)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(r)?/pixel[\daxl ]{1,6}/i.test(r)&&!/pixel c/i.test(r)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(r)||/lmy47v/i.test(r)&&!/QTAQZ3/i.test(r)?nt.ANDROID:nt.ANDROID_TABLET:nt.ANDROID:new RegExp("(pda|"+nt.MOBILE+")","i").test(r)?nt.GENERIC_MOBILE:new RegExp(nt.TABLET,"i").test(r)&&!new RegExp(nt.TABLET+" pc","i").test(r)?nt.GENERIC_TABLET:"")||""),$os:(null==c?void 0:c[0])||"",$os_version:(null==c?void 0:c[1])||"",$pathname:null===(n=location)||void 0===n?void 0:n.pathname,$screen_height:Number(screen.height)||0,$screen_width:Number(screen.width)||0,$timezone_offset:60*-(new Date).getTimezoneOffset()}}
2var yt=new(function(){return l((function t(){s(this,t),this.STORAGE_KEY="sensorswave_unsent_events",this.MAX_QUEUE_SIZE=200,this.MAX_RETRY_COUNT=1,this.MAX_AGE_MS=6048e5,this.queue=[],this.loadFromStorage(),this.cleanupExpiredItems()}),[{key:"loadFromStorage",value:function(){try{var t=localStorage.getItem(this.STORAGE_KEY);t&&(this.queue=I(t)||[])}catch(v){console.warn("Failed to load queue from localStorage:",v),this.queue=[]}}},{key:"cleanupExpiredItems",value:function(){var t=this,e=Date.now(),n=this.queue.filter((function(n){return e-n.timestamp<t.MAX_AGE_MS}));n.length!==this.queue.length&&(this.queue=n,this.saveToStorage())}},{key:"saveToStorage",value:function(){try{this.cleanupExpiredItems(),this.queue.length>this.MAX_QUEUE_SIZE&&(this.queue=this.queue.slice(-this.MAX_QUEUE_SIZE)),localStorage.setItem(this.STORAGE_KEY,JSON.stringify(this.queue))}catch(v){console.warn("Failed to save queue to localStorage:",v)}}},{key:"enqueue",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.MAX_RETRY_COUNT;try{var i={id:L(),url:t,data:e,headers:n,timestamp:Date.now(),retryCount:0,maxRetries:r};return this.queue.push(i),this.saveToStorage(),i.id}catch(S){return console.warn("Failed to enqueue request:",S),""}}},{key:"dequeue",value:function(t){try{this.queue=this.queue.filter((function(e){return e.id!==t})),this.saveToStorage()}catch(y){console.warn("Failed to dequeue request:",y)}}},{key:"getAll",value:function(){try{return this.cleanupExpiredItems(),(0,i.A)(this.queue)}catch(v){return console.warn("Failed to get queue items:",v),[]}}},{key:"incrementRetryCount",value:function(t){var e=this.queue.find((function(e){return e.id===t}));return!(!e||e.retryCount>=e.maxRetries||(e.retryCount++,this.saveToStorage(),0))}},{key:"clear",value:function(){this.queue=[];try{localStorage.removeItem(this.STORAGE_KEY)}catch(v){console.warn("Failed to clear queue from localStorage:",v)}}},{key:"getItemById",value:function(t){return this.queue.find((function(e){return e.id===t}))}}])}()),bt=function(){return l((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s(this,t),this.flushTimer=null,this.isFlushing=!1,this.paused=!1,this.destroyed=!1,this.config={maxBatchSize:e.maxBatchSize||20,flushInterval:e.flushInterval||5e3},this.startFlushTimer()}),[{key:"pause",value:function(){this.paused=!0,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null)}},{key:"resume",value:function(){this.paused&&(this.paused=!1,this.startFlushTimer())}},{key:"isPaused",value:function(){return this.paused}},{key:"add",value:function(){yt.getAll().length>=this.config.maxBatchSize&&this.triggerFlush()}},{key:"triggerFlush",value:function(){this.paused||this.isFlushing||(this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.isFlushing=!0,this.flush())}},{key:"flush",value:function(){var t=this,e=yt.getAll();if(0===e.length)return this.isFlushing=!1,void this.startFlushTimer();var n=e.slice(0,this.config.maxBatchSize),r=[],a=[];n.forEach((function(t){Array.isArray(t.data)?r.push.apply(r,(0,i.A)(t.data)):r.push(t.data),a.push(t.id)}));var o=n[n.length-1],s=o.url,u=o.headers;F.instance&&F.instance.config.debug&&console.log(JSON.stringify(r,null,2)),Q({url:s,method:"POST",data:r,headers:u,callback:function(e){200===e.statusCode?a.forEach((function(t){yt.dequeue(t)})):z(e.statusCode)?console.error("Failed to send batch events:",e):a.forEach((function(t){yt.dequeue(t)})),t.isFlushing=!1,t.startFlushTimer()}})}},{key:"startFlushTimer",value:function(){var t=this;this.destroyed||(this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.flushTimer=setInterval((function(){yt.getAll().length>0&&t.triggerFlush()}),this.config.flushInterval))}},{key:"destroy",value:function(){this.destroyed=!0,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.paused||this.flush()}}])}(),wt=null,St="sensorswave2025jssdksession",Et="$session_id",Tt=null;function At(){var t=new Uint8Array(16);if("undefined"!=typeof crypto&&"function"==typeof crypto.getRandomValues)crypto.getRandomValues(t);else for(var e=6;e<16;
2e++)t[e]=Math.floor(256*Math.random());var n=new DataView(t.buffer),r=Date.now();n.setUint16(0,Math.floor(r/Math.pow(2,32))),n.setUint32(2,r%Math.pow(2,32)),t[6]=15&t[6]|112,t[8]=63&t[8]|128;for(var i=[],a=0;a<16;a++)i.push(t[a].toString(16).padStart(2,"0"));var o=i.join("");return"".concat(o.slice(0,8),"-").concat(o.slice(8,12),"-").concat(o.slice(12,16),"-").concat(o.slice(16,20),"-").concat(o.slice(20))}function Ot(t){Tt=t;try{y.set({name:St,value:JSON.stringify(t),expires:"1800s"})}catch(b){}}function kt(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=Date.now(),n=function(){var t=null;try{t=y.get(St)}catch(n){return Tt}if(null==t)return Tt;var e=I(t);return function(t){return!!(w(t)&&"string"==typeof t.session_id&&t.session_id&&"number"==typeof t.first_session_time&&Number.isFinite(t.first_session_time)&&"number"==typeof t.latest_session_time&&Number.isFinite(t.latest_session_time))}(e)?e:null}();if(!n||n.first_session_time>e||n.latest_session_time>e||e-n.first_session_time>432e5||e-n.latest_session_time>18e5){var r={session_id:At(),first_session_time:e,latest_session_time:e};return Ot(r),r.session_id}return t||Ot(m(m({},n),{},{latest_session_time:e})),n.session_id}function Ct(){var t=F.instance;return!(!t||!t.__innerInited)||(console.warn("[SensorsWave] SDK is not initialized. Please call init() first."),!1)}function Pt(){var t=F.instance;return!t||"function"!=typeof t.hasOptedOutCapturing||!t.hasOptedOutCapturing()}var It=null;function Dt(){return B.isSupport()?(It||(wt||(wt=new bt({maxBatchSize:20,flushInterval:5e3})),It=wt),It):null}function Nt(t,e,n){if(Pt())return Q({url:t,method:"POST",data:e.data,headers:e.headers,callback:function(t){if(200!==t.statusCode){if(!z(t.statusCode))return void(n&&yt.dequeue(n));if(n&&yt.incrementRetryCount(n)){var r=yt.getItemById(n);if(r){var i=Math.min(1e3*Math.pow(2,r.retryCount),3e4);setTimeout((function(){Nt(r.url,{data:r.data,headers:r.headers},r.id)}),i)}}}else n&&yt.dequeue(n),e.callback&&e.callback(t.json)}})}function Lt(t){return"".concat(t.apiHost,"/in/track")}function Rt(t){return"".concat(t.apiHost,"/ab/evalall")}function xt(t){return{"Content-Type":"application/json",SourceToken:t.sourceToken}}function Ht(t,e,n){F.instance&&F.instance.config.debug&&console.log(JSON.stringify(e.data,null,2));var r=yt.enqueue(t,e.data,e.headers);return Nt(t,m(m({},e),{},{callback:void 0}),r)}function Bt(){try{var t=sessionStorage.getItem("sensorswave_utm");if(!t)return{};var e=JSON.parse(t),n={};return Object.entries(e).forEach((function(t){var e=(0,a.A)(t,2),r=e[0],i=e[1];null!=i&&""!==i&&(n["$".concat(r)]=i)})),n}catch(v){return{}}}function Mt(t){var e={};return Object.entries(t).forEach((function(t){var n=(0,a.A)(t,2),r=n[0],i=n[1];if("function"==typeof i)try{var o=i();e[r]=o}catch(w){console.warn("[SensorsWave] Failed to resolve dynamic property:",r,w)}else e[r]=i})),e}function jt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return m(m(m(m({},!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?vt():{}),Mt(q.getCommonProps())),t),{},(0,o.A)({},Et,kt()))}function Ft(){var t=jt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},!(arguments.length>1&&void 0!==arguments[1])||arguments[1]),e=Bt();return Object.keys(e).length>0&&Object.assign(t,e),t}function Ut(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(Ct()&&Pt()){var r={time:Date.now(),trace_id:q.getTraceId(),event:t.event,properties:Ft(t.properties,n)},i=Bt();Object.keys(i).length>0&&(r.user_properties||(r.user_properties={}),r.user_properties.$set||(r.user_properties.$set={}),Object.assign(r.user_properties.$set,i)),t.user_properties&&(t.user_properties.$set&&(r.user_properties=r.user_properties||{},r.user_properties.$set=m(m({},r.user_properties.$set||{}),t.user_properties.$set),delete t.user_properties.$set),r.user_properties=m(m({},r.user_properties),t.user_properties));var a=q.getLoginId(),o=q.getAnonId();a&&(r.login_id=a),o&&(r.anon_id=o);var s=Lt(e),u=xt(e),c=!1!==e.batchSend&&Dt();c?(yt.enqueue(s,[r],u),c.add()):Ht(s,{data:[r],headers:u})}}function $t(t){var e=t.userProps,n=t.opts;
2if(Ct()&&Pt()){var r=q.getLoginId(),i=q.getAnonId();if(r||i){var a={time:Date.now(),trace_id:q.getTraceId(),event:"$UserSet",login_id:r,anon_id:i,user_properties:e,properties:Ft()},o=Lt(n),s=xt(n),u=Dt();if(!u)return Ht(o,{data:[a],headers:s});yt.enqueue(o,[a],s),u.add()}}}function Gt(t){return t.typ===J.FEATURE_GATE||t.typ===J.FEATURE_CONFIG?"$feature_".concat(t.id):t.typ===J.EXPERIMENT?"$exp_".concat(t.id):""}function Wt(t){var e=t.typ;return[J.FEATURE_GATE,J.EXPERIMENT,J.FEATURE_CONFIG].includes(e)?(0,o.A)({},Gt(t),t.vid):{}}function Vt(t){var e=t.typ;return e===J.FEATURE_GATE||e===J.FEATURE_CONFIG?{$feature_key:t.key,$feature_variant:t.vid}:e===J.EXPERIMENT?{$exp_key:t.key,$exp_variant:t.vid}:{}}function Xt(t){var e=t.isUnset,n=void 0!==e&&e,r=t.data,i=t.opts;if(Ct()&&Pt()&&r&&!k(r)&&!r.disable_impress){var a=q.getLoginId(),s=q.getAnonId();if(a||s){var u,c=r.typ===J.EXPERIMENT?"$ExpImpress":"$FeatureImpress";return u=n?{$unset:(0,o.A)({},Gt(r),null)}:{$set:m({},Wt(r))},Ut({event:c,properties:Vt(r),user_properties:u},i)}}}var Jt="sensorswave_opt_out",qt=function(){return l((function t(e){s(this,t),this.persist=e}),[{key:"read",value:function(){if(this.persist)try{var t=B.get(Jt);return"0"===t||"1"!==t&&void 0}catch(e){return}}},{key:"write",value:function(t){if(this.persist)try{B.set(Jt,t?"0":"1")}catch(e){}}}])}(),zt=function(){return l((function t(e){var n=this,r=e.plugins,i=e.emitter,a=e.config,o=e.sdk;s(this,t),this.plugins=[],this.pluginInsMap={},this.emitter=i,this.config=a,this.sdk=o,this.registerBuiltInPlugins(r),this.created(),this.emitter.on($,(function(){n.init()}))}),[{key:"registerBuiltInPlugins",value:function(t){for(var e=0,n=t.length;e<n;e++)this.registerPlugin(t[e])}},{key:"registerPlugin",value:function(t){this.plugins.push(t)}},{key:"getPlugins",value:function(){return this.plugins}},{key:"getPlugin",value:function(t){return this.pluginInsMap[t]}},{key:"created",value:function(){for(var t=0,e=this.plugins.length;t<e;t++){var n=this.plugins[t];if(!n.NAME)throw new Error('Plugin should be defined with "NAME"');var r=new n({emitter:this.emitter,config:this.config,sdk:this.sdk});this.pluginInsMap[n.NAME]=r}}},{key:"init",value:function(){for(var t=0,e=Object.keys(this.pluginInsMap);t<e.length;t++){var n=e[t],r=this.pluginInsMap[n];r.init&&r.init()}}},{key:"destroy",value:function(){for(var t=0,e=Object.keys(this.pluginInsMap);t<e.length;t++){var n=e[t],r=this.pluginInsMap[n];r.destroy&&"function"==typeof r.destroy&&r.destroy()}this.pluginInsMap={},this.plugins=[]}}])}(),Kt=function(){return l((function t(e){var n=e.emitter,r=e.config,i=e.sdk;s(this,t),this.boundSend=null,this.hashEvent=null,this.spaSwitchHandler=null,this.emitter=n,this.config=r,this.sdk=i}),[{key:"init",value:function(){var t=this,e=this.config;this.boundSend=function(){Ut({event:"$PageView",properties:{}},e)},this.sdk&&!0===this.sdk._postConsentInit||setTimeout((function(){t.boundSend()}),0),e.isSinglePageApp&&this.addSinglePageListener()}},{key:"addSinglePageListener",value:function(){var t=this;this.spaSwitchHandler=function(e){e!==location.href&&t.boundSend()},this.emitter.on(G,this.spaSwitchHandler)}},{key:"destroy",value:function(){this.spaSwitchHandler&&(this.emitter.off(G,this.spaSwitchHandler),this.spaSwitchHandler=null),this.hashEvent&&this.boundSend&&(window.removeEventListener(this.hashEvent,this.boundSend),this.hashEvent=null),this.boundSend=null}}])}();Kt.NAME="pageview";var Yt=Kt,Qt=function(){return l((function t(e){var n=e.emitter,r=e.config,i=e.sdk;s(this,t),this.startTime=Date.now(),this.pageShowStatus=!0,this.pageHiddenStatus=!1,this.timer=null,this.currentPageUrl=document.referrer,this.url=location.href,this.title=document.title||"",this.heartbeatIntervalTime=5e3,this.heartbeatIntervalTimer=null,this.pageId=null,this.storageName="sensorswavewebjssdkpageleave",this.maxDuration=432e3,this.eventListeners=[],this._skipFirstPageEnd=!1,this.emitter=n,this.config=r,this.sdk=i}),[{key:"__canCapture",value:function(){return!this.sdk||"function"!=typeof this.sdk.hasOptedOutCapturing||!this.sdk.hasOptedOutCapturing()}},{key:"init",value:function(){this.pageId=Number(String(N()).slice(2,5)+String(N()).slice(2,4)+String(Date.now()).slice(-4)),this.addEventListener(),this.sdk&&!0===this.sdk._postConsentInit&&(this._skipFirstPageEnd=!0),!0===document.hidden?this.pageShowStatus=!1:this.addHeartBeatInterval()}},{key:"log",value:function(t){console.log(t)}},{key:"refreshPageEndTimer",value:function(){var t=this;this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=setTimeout((function(){t.pageHiddenStatus=!1}),5e3)}},{key:"hiddenStatusHandler",value:function(){this.timer&&clearTimeout(this.timer),this.timer=null,this.pageHiddenStatus=!1}},{key:"pageStartHandler",value:function(){this.startTime=Date.now(),1==!document.hidden?this.pageShowStatus=!0:this.pageShowStatus=!1,this.url=location.href,this.title=document.title,this._skipFirstPageEnd=!1}},{key:"pageEndHandler",value:function(){if(!0!==this.pageHiddenStatus&&this.__canCapture()){var t=this.getPageLeaveProperties();!1===this.pageShowStatus&&delete t.$event_duration,this.pageShowStatus=!1,this.pageHiddenStatus=!0,Ut({event:V,properties:t},this.config),this.refreshPageEndTimer(),this.delHeartBeatData()}}},{key:"addEventListener",value:function(){this.addPageStartListener(),this.addPageSwitchListener(),this.addSinglePageListener(),this.addPageEndListener()}},{key:"addPageStartListener",value:function(){var t=this;if("onpageshow"in window){var e=function(){t.pageStartHandler(),t.hiddenStatusHandler()};window.addEventListener("pageshow",e),this.eventListeners.push({target:window,event:"pageshow",handler:e})}}},{key:"addSinglePageListener",value:function(){var t=this;this.config.isSinglePageApp&&this.emitter.on(G,(function(e){e!==location.href&&(t.url=e,t.pageEndHandler(),t.stopHeartBeatInterval(),t.currentPageUrl=t.url,t.pageStartHandler(),t.hiddenStatusHandler(),t.addHeartBeatInterval())}))}},{key:"addPageEndListener",value:function(){var t=this;["pagehide","beforeunload"].forEach((function(e){if("on".concat(e)in window){var n=function(){if(t._skipFirstPageEnd)return t._skipFirstPageEnd=!1,void t.stopHeartBeatInterval();t.pageEndHandler(),t.stopHeartBeatInterval()};window.addEventListener(e,n),t.eventListeners.push({target:window,event:e,handler:n})}}))}},{key:"addPageSwitchListener",value:function(){var t=this,e=function(){"visible"===document.visibilityState?(t.pageStartHandler(),t.hiddenStatusHandler(),t.addHeartBeatInterval()):(t.url=location.href,t.title=document.title,t.stopHeartBeatInterval(),t.delHeartBeatData())};document.addEventListener("visibilitychange",e),this.eventListeners.push({target:document,event:"visibilitychange",handler:e})}},{key:"addHeartBeatInterval",value:function(){B.isSupport()&&this.startHeartBeatInterval()}},{key:"startHeartBeatInterval",value:function(){var t=this;this.heartbeatIntervalTimer&&this.stopHeartBeatInterval(),this.sdk&&!0===this.sdk._postConsentInit&&!0===this._skipFirstPageEnd||(this.heartbeatIntervalTimer=setInterval((function(){t.saveHeartBeatData()}),this.heartbeatIntervalTime),this.saveHeartBeatData("is_first_heartbeat"),this.reissueHeartBeatData())}},{key:"stopHeartBeatInterval",value:function(){this.heartbeatIntervalTimer&&clearInterval(this.heartbeatIntervalTimer),this.heartbeatIntervalTimer=null}},{key:"saveHeartBeatData",value:function(t){if(this.__canCapture()){var e=this.getPageLeaveProperties();e.$time=Date.now(),"is_first_heartbeat"===t&&(e.$event_duration=3);var n={type:"track",event:V,properties:e,time:e.$time};n.heartbeat_interval_time=this.heartbeatIntervalTime,B.isSupport()&&B.set("".concat(this.storageName,"-").concat(this.pageId),JSON.stringify(n))}}},{key:"delHeartBeatData",value:function(t){B.isSupport()&&B.remove(t||"".concat(this.storageName,"-").concat(this.pageId))}},{key:"reissueHeartBeatData",value:function(){if(this.__canCapture())for(var t=window.localStorage.length-1;t>=0;t--){var e=window.localStorage.key(t);if(e&&e!=="".concat(this.storageName,"-").concat(this.pageId)&&0===e.indexOf("".concat(this.storageName,"-"))){var n=B.parse(e);w(n)&&Date.now()-n.time>n.heartbeat_interval_time+5e3&&(delete n.heartbeat_interval_time,n._flush_time=(new Date).getTime(),Ut({event:V,properties:null==n?void 0:n.properties},this.config),this.delHeartBeatData(e))}}}},{key:"getPageLeaveProperties",value:function(){var t,e=(Date.now()-this.startTime)/1e3;(isNaN(e)||e<0||e>this.maxDuration)&&(e=0),e=Number(e.toFixed(3));var n={$title:this.title,$url:null===(t=this.url)||void 0===t?void 0:t.substring(0,1e3),$pathname:j(this.url)};return 0!==e&&(n.$event_duration=e),n}}
2,{key:"destroy",value:function(){this.eventListeners.forEach((function(t){var e=t.target,n=t.event,r=t.handler;e.removeEventListener(n,r)})),this.eventListeners=[],this.timer&&(clearTimeout(this.timer),this.timer=null),this.heartbeatIntervalTimer&&(clearInterval(this.heartbeatIntervalTimer),this.heartbeatIntervalTimer=null)}}])}();Qt.NAME="pageleave";var Zt=Qt,te=function(){return l((function t(e){var n=e.emitter,r=e.config,i=e.sdk;s(this,t),this.eventSended=!1,this.emitter=n,this.config=r,this.sdk=i}),[{key:"init",value:function(){var t=this;if(!this.sdk||!0!==this.sdk._postConsentInit){var e=function e(){var n=0,r={};if(window.performance){n=function(){var t=0;if("function"==typeof performance.getEntriesByType){var e=performance.getEntriesByType("navigation");e.length>0&&(t=e[0].domContentLoadedEventEnd||0)}return t}();var i=function(){if(performance.getEntries&&"function"==typeof performance.getEntries){var t,e=0,n=d(performance.getEntries());try{for(n.s();!(t=n.n()).done;){var r=t.value;"transferSize"in r&&(e+=r.transferSize)}}catch(i){n.e(i)}finally{n.f()}if("number"==typeof e&&e>=0&&e<10737418240)return Number((e/1024).toFixed(3))}}();i&&(r.$page_resource_size=i)}else console.warn("Performance API is not supported.");n>0&&!Number.isFinite(n)&&(r.$event_duration=Number((n/1e3).toFixed(3))),t.eventSended||(t.eventSended=!0,Ut({event:"$PageLoad",properties:r},t.config)),window.removeEventListener("load",e)};"complete"===document.readyState?e():window.addEventListener&&window.addEventListener("load",e)}}}])}();te.NAME="pageload";var ee=te;function ne(t){if(!C(t))return!1;var e=T(t.tagName)?t.tagName.toLowerCase():"",n={};return n.$element_type=e,n.$element_name=t.getAttribute("name")||"",n.$element_id=t.getAttribute("id")||"",n.$element_class_name=T(t.className)?t.className:"",n.$element_target_url=t.getAttribute("href")||"",n.$element_content=function(t,e){return T(e)&&"input"===e.toLowerCase()?("button"===(n=t).type||"submit"===n.type)&&n.value||"":function(t,e){var n="",r="";return t.textContent?n=M(t.textContent):t.innerText&&(n=M(t.innerText)),n&&(n=n.replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)),r=n||"","input"!==e&&"INPUT"!==e||(r=t.value||""),r}(t,e);var n}(t,e)||"",n.$element_selector=re(t)||"",n.$element_path=function(t){for(var e=[];t.parentNode&&C(t);){if(!T(t.tagName))return"";if(t.id&&/^[A-Za-z][-A-Za-z0-9_:.]*$/.test(t.id)){e.unshift(t.tagName.toLowerCase()+"#"+t.id);break}if(t===document.body){e.unshift("body");break}e.unshift(t.tagName.toLowerCase()),t=t.parentNode}return e.join(" > ")}(t)||"",n}function re(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!(t&&t.parentNode&&t.parentNode.children&&T(t.tagName)))return"";e=Array.isArray(e)?e:[];var n=t.nodeName.toLowerCase();return t&&"body"!==n&&1==t.nodeType?(e.unshift(function(t){if(!t||!C(t)||!T(t.tagName))return"";var e=t.parentNode&&9==t.parentNode.nodeType?-1:function(t){if(!t.parentNode)return-1;for(var e=0,n=t.tagName,r=t.parentNode.children,i=0,a=r.length;i<a;i++)if(r[i].tagName===n){if(t===r[i])return e;e++}return-1}(t);return t.getAttribute&&t.getAttribute("id")&&/^[A-Za-z][-A-Za-z0-9_:.]*$/.test(t.getAttribute("id"))?"#"+t.getAttribute("id"):t.tagName.toLowerCase()+(~e?":nth-of-type("+(e+1)+")":"")}(t)),t.getAttribute&&t.getAttribute("id")&&/^[A-Za-z][-A-Za-z0-9_:.]*$/.test(t.getAttribute("id"))?e.join(" > "):re(t.parentNode,e)):(e.unshift("body"),e.join(" > "))}function ie(){return{scrollLeft:document.body.scrollLeft||document.documentElement.scrollLeft||0,scrollTop:document.body.scrollTop||document.documentElement.scrollTop||0}}function ae(t){if(document.documentElement.getBoundingClientRect){var e=t.getBoundingClientRect();return{targetEleX:e.left+ie().scrollLeft||0,targetEleY:e.top+ie().scrollTop||0}}return{targetEleX:0,targetEleY:0}}function oe(t){return Number(Number(t).toFixed(3))}var se=function(){return l((function t(e){var n=e.emitter,r=e.config;s(this,t),this.isInitialized=!1,this.boundHandleClick=null,this.emitter=n,this.config=r}),[{key:"init",value:function(){this.isInitialized||(this.boundHandleClick=this.handleClick.bind(this),document.addEventListener("click",this.boundHandleClick,!0),this.isInitialized=!0)}},{key:"handleClick",value:function(t){var e=t.target;if(e&&["A","INPUT","BUTTON","TEXTAREA"].includes(e.tagName)&&"true"!==e.getAttribute("sensorswave-disable")){var n=function(t,e){var n=ne(t);if(!n)return!1;var r=function(t,e){var n=e.pageX||e.clientX+ie().scrollLeft||e.offsetX+ae(t).targetEleX,r=e.pageY||e.clientY+ie().scrollTop||e.offsetY+ae(t).targetEleY;return{$page_x:oe(n),$page_y:oe(r)}}(t,e);return n.$page_x=r.$page_x,n.$page_y=r.$page_y,n}(e,t);Ut({event:"$WebClick",properties:n||{}},this.config)}}},{key:"destroy",value:function(){this.boundHandleClick&&(document.removeEventListener("click",this.boundHandleClick,!0),this.boundHandleClick=null),this.isInitialized=!1}}])}();se.NAME="webclick";var ue=se,ce=function(){return l((function t(e){var n=e.emitter,r=e.config,i=e.sdk;s(this,t),this.updateInterval=null,this.fetchingPromise=null,this.emitter=n,this.config=r,this.sdk=i}),[{key:"init",value:function(){var t=this,e=this.config;if(e.enableAB){if(this.sdk&&"function"==typeof this.sdk.hasOptedOutCapturing&&this.sdk.hasOptedOutCapturing())return;this.fastFetch().then((function(){t.emitter.emit(W)}
2)),e.abRefreshInterval<3e4&&(e.abRefreshInterval=3e4),this.updateInterval=setInterval((function(){t.fetchNewData().catch(console.warn)}),e.abRefreshInterval)}}},{key:"fastFetch",value:(o=(0,r.A)(f().mark((function t(){var e;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=q.getABData(this.config.abRefreshInterval),t.abrupt("return",e&&e.length?(this.emitter.emit(W),Promise.resolve(e)):this.fetchNewData());case 2:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"fetchNewData",value:(a=(0,r.A)(f().mark((function t(){var e=this;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(this.fetchingPromise||(this.fetchingPromise=new Promise((function(t){!function(t){var e=t.opts,n=t.cb;if(Ct())if(Pt()){var r=q.getLoginId(),i=q.getAnonId();if(r||i){var a={user:{login_id:r||"",anon_id:i||"",props:m(m({},vt()),Mt(q.getCommonProps()))},sdk:"webjs",sdk_version:U};Q({url:Rt(e),method:"POST",data:a,headers:xt(e),callback:function(t){200!==t.statusCode?(console.error("Failed to fetch feature flags"),n&&n({})):n&&n(t.json)}})}else n&&n({})}else n&&n({});else n&&n({})}({opts:e.config,cb:function(n){var r;q.saveABData((null==n||null===(r=n.data)||void 0===r?void 0:r.results)||[]),t(n),e.fetchingPromise=null}})}))),this.fetchingPromise));case 1:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"getFeatureGate",value:(i=(0,r.A)(f().mark((function t(e){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.fastFetch().catch(console.warn);case 2:return t.abrupt("return",q.getABData(this.config.abRefreshInterval).find((function(t){return t.typ===J.FEATURE_GATE&&t.key==e})));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"checkFeatureGate",value:(n=(0,r.A)(f().mark((function t(e){var n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getFeatureGate(e);case 2:return n=t.sent,t.abrupt("return",!!n&&(!n.hasOwnProperty("vid")&&n.key?(Xt({isUnset:!0,data:n,opts:this.config}),!1):(Xt({data:n,opts:this.config}),"fail"!==n.vid)));case 4:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"getExperiment",value:(e=(0,r.A)(f().mark((function t(e){var n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.fastFetch().catch(console.warn);case 2:return n=q.getABData(this.config.abRefreshInterval).find((function(t){return t.typ===J.EXPERIMENT&&t.key===e})),t.abrupt("return",n?!n.hasOwnProperty("vid")&&n.key?(Xt({isUnset:!0,data:n,opts:this.config}),{}):(Xt({data:n,opts:this.config}),(null==n?void 0:n.value)||{}):{});case 4:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"getFeatureConfig",value:(t=(0,r.A)(f().mark((function t(e){var n,r;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.fastFetch().catch(console.warn);case 2:if(n=q.getABData(this.config.abRefreshInterval).find((function(t){return t.typ===J.FEATURE_CONFIG&&t.key===e}))){t.next=5;break}return t.abrupt("return",{});case 5:if(n.hasOwnProperty("vid")||!n.key){t.next=7;break}return t.abrupt("return",(Xt({isUnset:!0,data:n,opts:this.config}),{}));case 7:if(Xt({data:n,opts:this.config}),!(r=null==n?void 0:n.value)){t.next=19;break}if(!w(r)){t.next=12;break}return t.abrupt("return",r);case 12:return t.prev=12,t.abrupt("return",JSON.parse(r));case 16:return t.prev=16,t.t0=t.catch(12),t.abrupt("return",r);case 19:return t.abrupt("return",{});case 20:case"end":return t.stop()}}),t,this,[[12,16]])}))),function(e){return t.apply(this,arguments)})},{key:"destroy",value:function(){this.updateInterval&&(clearInterval(this.updateInterval),this.updateInterval=null),this.fetchingPromise=null}}]);var t,e,n,i,a,o}();ce.NAME="abtest";var le=ce,pe=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],he="sensorswave_utm",fe=function(){function t(e){var n=e.sdk,r=e.emitter,i=e.config;s(this,t),this.sdk=n,this.emitter=r,this.config=i}return l(t,[{key:"init",value:function(){var e;if(this.sdk&&!0===this.sdk._postConsentInit){var n,r=t.readFromSessionStorage();return r&&0!==Object.keys(r).length||(r=t.captureAndStore(null===(n=this.config)||void 0===n?void 0:n.debug)),void this.scheduleInitialUTM(r)}var i=t.getUTMFromURL();t.saveToSessionStorage(i,null===(e=this.config)||void 0===e?void 0:e.debug),this.scheduleInitialUTM(i)}},{key:"scheduleInitialUTM",value:function(t){var e=this;setTimeout((function(){e.sendInitialUTM(t)}),0)}},{key:"sendInitialUTM",value:function(t){var e={};pe.forEach((function(n){e["$initial_".concat(n)]=null!=t[n]?t[n]:""}));try{this.sdk.profileSetOnce(e)}catch(b){this.config.debug&&console.warn("[SensorsWave UTM] Failed to send initial UTM:",b)}}},{key:"destroy",value:function(){}}],[{key:"getUTMFromURL",value:function(){try{var e=new URLSearchParams(window.location.search),n={};return pe.forEach((function(t){var r=e.get(t);r&&(n[t]=r)})),n}catch(y){return t.getUTMFromURLFallback()}}},{key:"getUTMFromURLFallback",value:function(){var t={};return window.location.search.substring(1).split("&").forEach((function(e){var n=e.split("="),r=(0,a.A)(n,2),i=r[0],o=r[1],s=decodeURIComponent(i),u=o?decodeURIComponent(o):"";pe.includes(s)&&(t[s]=u)})),t}},{key:"readFromSessionStorage",value:function(){try{var t=sessionStorage.getItem(he);if(!t)return{};var e=JSON.parse(t);return e&&"object"==typeof e?e:{}}catch(n){return{}}}},{key:"saveToSessionStorage",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{sessionStorage.setItem(he,JSON.stringify(t))}catch(b){e&&console.warn("[SensorsWave UTM] Failed to save to sessionStorage:",b)}}},{key:"captureAndStore",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=t.getUTMFromURL();return t.saveToSessionStorage(n,e),n}}])}();fe.NAME="UTM";var de=fe,ge=1e3,_e=/^\s*(?:async\s+)?at\s+(?:(.+)\s+\()?(.+?):(\d+):(\d+)\)?$/,me=/^(?:(.*)@)?(.+?):(\d+):(\d+)$/;function ve(t){var e=t;try{var n=location.origin;n&&0===e.indexOf(n)&&(e=e.substring(n.length))}catch(S){}var r=e.indexOf("?");r>-1&&(e=e.substring(0,r));var i=e.indexOf("#");return i>-1&&(e=e.substring(0,i)),e}function ye(t){return t.map((function(t){return{platform:"web:javascript",filename:ve(t.file),function:t.fn||"?",lineno:Number(t.line),colno:Number(t.col),abs_path:be(t.file,1e3)}}))}function be(t,e){return t.length>e?t.substring(0,e):t}function we(t){var e;if("string"==typeof t)e=t;else if(null!==t&&"object"==typeof t){try{e=JSON.stringify(t)}catch(b){e=Object.prototype.toString.call(t)}e||(e=Object.prototype.toString.call(t))}else e=String(t);return be(e,ge)}function Se(t){var e=function(t){var e=[],n="";if(!t||"string"!=typeof t)return{frames:e,headerType:n};for(var r=t.split(/\r?\n/),i=0;i<r.length;i++){var a=r[i];if(a&&!(a.length>1024)){var o=a.match(_e),s=o?null:a.match(me),u=o||s;if(u)e.push({fn:u[1]||"?",file:u[2],line:u[3],col:u[4]});else if(0===i){var c=a.indexOf(":");c>0&&(n=a.substring(0,c).trim())}if(e.length>=30)break}}return{frames:e,headerType:n}}(t&&t.stack),n=e.frames,r=e.headerType,i=t&&t.name||r||"Error";return{$exception_level:"error",$exception_type:i=be(String(i),200),$exception_message:be(String(t&&t.message||""),ge),$exception_frames:ye(n)}}function Ee(t,e,n,r){var i=[];return e&&(i=[{platform:"web:javascript",filename:ve(e),function:"?",lineno:n||0,colno:r||0,abs_path:be(e,1e3)}]),{$exception_level:"error",$exception_type:"Error",$exception_message:be(String(t||""),ge),$exception_frames:i}}var Te=function(){return l((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e4;s(this,t),this.buckets=new Map,this.bucketSize=e,this.refillRate=n,this.refillInterval=r}),[{key:"allow",value:function(t){var e=Date.now(),n=this.buckets.get(t);if(n){if(e>n.lastRefill){var r=Math.floor((e-n.lastRefill)/this.refillInterval)*this.refillRate;r>0&&(n.tokens=Math.min(this.bucketSize,n.tokens+r),n.lastRefill+=r/this.refillRate*this.refillInterval)}}else n={tokens:this.bucketSize,lastRefill:e},this.buckets.set(t,n);return n.tokens>=1&&(n.tokens-=1,!0)}},{key:"reset",value:function(){this.buckets.clear()}}])}(),Ae=function(){return l((function t(e){var n=e.emitter,r=e.config;s(this,t),this.isInitialized=!1,this.boundHandleError=null,this.boundHandleRejection=null,this.rateLimiter=new Te,this.emitter=n,this.config=r}),[{key:"init",value:function(){this.isInitialized||(this.boundHandleError=this.handleError.bind(this),this.boundHandleRejection=this.handleRejection.bind(this),window.addEventListener("error",this.boundHandleError,!0),window.addEventListener("unhandledrejection",this.boundHandleRejection),this.isInitialized=!0)}},{key:"handleError",value:function(t){try{var e,n=t.target;if(n&&n!==window&&n.tagName)e=function(t){var e=t,n=(e.tagName||"").toLowerCase(),r=be(String(e.src||e.href||""),ge);return{$exception_level:"error",$exception_type:"ResourceLoadError",$exception_message:"Failed to load <".concat(n,">").concat(r?" from ".concat(r):""),$exception_frames:[]}}(n);else{var r=t;e=r.error instanceof Error?Se(r.error):Ee(String(r.message||""),r.filename,r.lineno,r.colno)}this.send(e)}catch(y){}}},{key:"handleRejection",value:function(t){try{var e=t.reason;this.send(function(t){return t instanceof Error?Se(t):{$exception_level:"error",$exception_type:"UnhandledRejection",$exception_message:we(t),$exception_frames:[]}}(e))}catch(y){}}},{key:"send",value:function(t){t.$exception_message&&this.rateLimiter.allow(t.$exception_type)&&Ut({event:X,properties:t},this.config)}},{key:"destroy",value:function(){this.boundHandleError&&(window.removeEventListener("error",this.boundHandleError,!0),this.boundHandleError=null),this.boundHandleRejection&&(window.removeEventListener("unhandledrejection",this.boundHandleRejection),this.boundHandleRejection=null),this.rateLimiter.reset(),this.isInitialized=!1}}])}();Ae.NAME="exception";var Oe=Ae,ke="data-sw-exposure-event-name",Ce="data-sw-exposure-config-",Pe="[".concat(ke,"]"),Ie={visibleRatio:0,stayDuration:0,repeated:!0};function De(t,e){var n={};if(!w(t))return n;var r=t;if(void 0!==r.visibleRatio){var i=Number(r.visibleRatio);!isNaN(i)&&i>=0&&i<=1?n.visibleRatio=i:e&&e("[exposure] parameter config.visibleRatio 非法(值域 0~1),已忽略:",r.visibleRatio)}if(void 0!==r.stayDuration){var a=Number(r.stayDuration);!isNaN(a)&&a>=0?n.stayDuration=a:e&&e("[exposure] parameter config.stayDuration 非法(须 >= 0),已忽略:",r.stayDuration)}if(void 0!==r.repeated){var o=r.repeated;!0===o||"true"===o?n.repeated=!0:!1===o||"false"===o?n.repeated=!1:e&&e("[exposure] parameter config.repeated 非法(须为布尔),已忽略:",o)}return n}function Ne(){for(var t=m({},Ie),e=0;e<arguments.length;e++){var n=e<0||arguments.length<=e?void 0:arguments[e];if(w(n)){var r=n;void 0!==r.visibleRatio&&(t.visibleRatio=r.visibleRatio),void 0!==r.stayDuration&&(t.stayDuration=r.stayDuration),void 0!==r.repeated&&(t.repeated=r.repeated)}}return t}function Le(t){var e=(t.getAttribute(ke)||"").trim(),n={},r={},i=t.getAttribute("data-sw-exposure-option");if(i){var a=I(i);w(a)&&(w(a.config)&&(n=a.config),w(a.properties)&&(r=a.properties))}var o=t.getAttribute(Ce+"visible-ratio");null!==o&&(n.visibleRatio=o);var s=t.getAttribute(Ce+"stay-duration");null!==s&&(n.stayDuration=s);var u=t.getAttribute(Ce+"repeated");null!==u&&(n.repeated=u);for(var c=t.attributes,l=0;l<c.length;l++){var p=c[l],h=p.name;if(T(h)&&0===h.indexOf("data-sw-exposure-property-")){var f=h.substring(26);f&&(r[f]=p.value)}}return{eventName:e,config:De(n),properties:r}}var Re=function(){return l((function t(e){var n=e.emitter,r=e.config,i=e.sdk;s(this,t),this.isInitialized=!1,this.observers=new Map,this.records=new Map,this.mutationObserver=null,this.boundHandleIntersection=null,this.boundHandleMutation=null,this.boundHandleVisibility=null,this.boundHandleReady=null,this.boundHandleSpa=null,this.eventListeners=[],this.globalConfig=m({},Ie),this.log=function(){},this.emitter=n,this.config=r,this.sdk=i}),[{key:"init",value:function(){var t=this;this.isInitialized||(function(){try{return"undefined"!=typeof window&&"IntersectionObserver"in window&&"MutationObserver"in window}catch(v){return!1}}()?(this.log=1==(!0===this.config.debug)&&"undefined"!=typeof console&&console.log?function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];
2(t=console).log.apply(t,["[SensorsWave][exposure]"].concat(n))}:function(){},this.globalConfig=Ne(this.globalConfig,De(this.config.exposureConfig,this.log)),this.boundHandleIntersection=this.handleIntersection.bind(this),this.boundHandleMutation=this.handleMutation.bind(this),this.boundHandleVisibility=this.handleVisibility.bind(this),"loading"===document.readyState?(this.boundHandleReady=function(){t.scanDocument(),t.observeMutations()},document.addEventListener("DOMContentLoaded",this.boundHandleReady),this.eventListeners.push({target:document,event:"DOMContentLoaded",handler:this.boundHandleReady})):(this.scanDocument(),this.observeMutations()),!0===this.config.isSinglePageApp&&(this.boundHandleSpa=function(e){t.handleSpaSwitch(e)},this.emitter.on(G,this.boundHandleSpa)),document.addEventListener("visibilitychange",this.boundHandleVisibility),this.eventListeners.push({target:document,event:"visibilitychange",handler:this.boundHandleVisibility}),!0===document.hidden&&this.stop(),this.isInitialized=!0):console.warn("[SensorsWave][exposure] 当前浏览器不支持 IntersectionObserver / MutationObserver,曝光采集未初始化"))}},{key:"addExposureView",value:function(t,e){this.isInitialized?C(t)?w(e)&&T(e.eventName)&&e.eventName.trim()?this.addOrUpdateWatchEle(t,{eventName:e.eventName.trim(),config:w(e.config)?De(e.config,this.log):void 0,properties:w(e.properties)?m({},e.properties):{},listener:w(e.listener)?m({},e.listener):{}},"api"):this.log("addExposureView parameter option.eventName 缺失:",e):this.log("addExposureView parameter element 非法:",t):this.log("曝光插件未初始化(enableExposureTrack 未开启或浏览器不支持)")}},{key:"removeExposureView",value:function(t){this.isInitialized?C(t)?this.removeWatchEle(t):this.log("removeExposureView parameter element 非法:",t):this.log("曝光插件未初始化")}},{key:"scanDocument",value:function(t){try{var e=t||document;if(!e.querySelectorAll)return;for(var n=e.querySelectorAll(Pe),r=0;r<n.length;r++){var i=n[r];this.addOrUpdateWatchEle(i,Le(i),"attr")}}catch(y){}}},{key:"addOrUpdateWatchEle",value:function(t,e,n){if(t&&C(t))if(T(e.eventName)&&e.eventName.trim()){var r=this.records.get(t);if(r&&"api"===r.source&&"attr"===n)this.log("声明式属性变更被忽略:元素已由 addExposureView 注册",t);else{var i=Ne(this.globalConfig,r&&r.config,e.config);if(r&&r.config.visibleRatio===i.visibleRatio)return r.eventName=e.eventName,r.source=n,r.config=i,r.properties=m({},e.properties||{}),r.listener=e.listener||{},void(r.hasSent=!1);r&&this.removeWatchEle(t);var a={ele:t,eventName:e.eventName,source:n,config:i,properties:m({},e.properties||{}),listener:e.listener||{},timer:null,hasSent:!1};this.records.set(t,a),this.getIntersection(i.visibleRatio).observe(t)}}else this.log("parameter option.eventName error:",e);else this.log("parameter element error:",t)}},{key:"getIntersection",value:function(t){var e=this.observers.get(t);return!e&&this.boundHandleIntersection&&(e=new IntersectionObserver(this.boundHandleIntersection,{threshold:t}),this.observers.set(t,e)),e}},{key:"removeWatchEle",value:function(t){var e=this.records.get(t);if(e){var n=this.observers.get(e.config.visibleRatio);n&&C(t)&&n.unobserve(t),e.timer&&(clearTimeout(e.timer),e.timer=null),this.records.delete(t)}}},{key:"handleIntersection",value:function(t){var e=this;try{var n,r=d(t);try{var i=function(){var t=n.value,r=t.target,i=e.records.get(r);i&&(!0===t.isIntersecting&&t.intersectionRatio>=i.config.visibleRatio?!0!==document.hidden&&(i.timer&&clearTimeout(i.timer),i.timer=setTimeout((function(){e.fireExposure(r)}),1e3*i.config.stayDuration)):i.timer&&(clearTimeout(i.timer),i.timer=null))};for(r.s();!(n=r.n()).done;)i()}catch(a){r.e(a)}finally{r.f()}}catch(y){}}},{key:"fireExposure",value:function(t){try{var e=this.records.get(t);if(e&&(e.timer=null),!e||e.hasSent)return;var n={width:0,height:0};try{n=t.getBoundingClientRect()}catch(y){}if(!n.width||!n.height)return;if(!t.isConnected)return void this.removeWatchEle(t);if(this.sdk&&"function"==typeof this.sdk.hasOptedOutCapturing&&this.sdk.hasOptedOutCapturing())return;var r=m(m({},ne(t)),e.properties),i=e.listener||{},a=i.shouldExpose,o=i.didExpose;
2if(a&&S(a))try{if(!1===a(t,r))return}catch(y){return}if(Ut({event:e.eventName,properties:r},this.config),e.hasSent=!0,e.config.repeated&&(e.hasSent=!1),o&&S(o))try{o(t,r)}catch(y){}}catch(y){}}},{key:"observeMutations",value:function(){!this.mutationObserver&&this.boundHandleMutation&&(this.mutationObserver=new MutationObserver(this.boundHandleMutation),this.mutationObserver.observe(document.body,{attributes:!0,childList:!0,subtree:!0}))}},{key:"handleMutation",value:function(t){try{var e,n=d(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if("childList"===r.type){if(r.removedNodes.length>0)for(var i=0,a=Array.from(r.removedNodes);i<a.length;i++){var o=a[i];if(1===o.nodeType){this.removeWatchEle(o);for(var s=o.querySelectorAll(Pe),u=0;u<s.length;u++)this.removeWatchEle(s[u])}}if(r.addedNodes.length>0)for(var c=0,l=Array.from(r.addedNodes);c<l.length;c++){var p=l[c];1===p.nodeType&&(p.hasAttribute(ke)&&this.addOrUpdateWatchEle(p,Le(p),"attr"),this.scanDocument(p))}}else"attributes"===r.type&&this.handleAttrChange(r)}}catch(h){n.e(h)}finally{n.f()}}catch(y){}}},{key:"handleAttrChange",value:function(t){var e=t.attributeName;if(e&&0===e.indexOf("data-sw-exposure")){var n=t.target;e!==ke||(n.getAttribute(e)||"").trim()?(n.getAttribute(ke)||"").trim()&&this.addOrUpdateWatchEle(n,Le(n),"attr"):this.removeWatchEle(n)}}},{key:"handleSpaSwitch",value:function(t){try{if(t===location.href)return;this.stop();for(var e=0,n=Array.from(this.records);e<n.length;e++){var r=(0,a.A)(n[e],2),i=r[0];"attr"===r[1].source&&this.records.delete(i)}this.start(),this.scanDocument()}catch(y){}}},{key:"stop",value:function(){for(var t=0,e=Array.from(this.records.values());t<e.length;t++){var n=e[t],r=this.observers.get(n.config.visibleRatio);r&&r.unobserve(n.ele),n.timer&&(clearTimeout(n.timer),n.timer=null)}}},{key:"start",value:function(){for(var t=0,e=Array.from(this.records.values());t<e.length;t++){var n=e[t];if(n.ele.isConnected){var r=this.observers.get(n.config.visibleRatio);r&&r.observe(n.ele)}else this.records.delete(n.ele)}}},{key:"handleVisibility",value:function(){try{"visible"===document.visibilityState?this.start():this.stop()}catch(v){}}},{key:"destroy",value:function(){this.observers.forEach((function(t){try{t.disconnect()}catch(y){}})),this.observers.clear(),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null);for(var t=0,e=Array.from(this.records.values());t<e.length;t++){var n=e[t];n.timer&&(clearTimeout(n.timer),n.timer=null)}this.records.clear(),this.eventListeners.forEach((function(t){var e=t.target,n=t.event,r=t.handler;e.removeEventListener(n,r)})),this.eventListeners=[],this.boundHandleSpa&&(this.emitter.off(G,this.boundHandleSpa),this.boundHandleSpa=null),this.boundHandleIntersection=null,this.boundHandleMutation=null,this.boundHandleVisibility=null,this.boundHandleReady=null,this.globalConfig=m({},Ie),this.log=function(){},this.isInitialized=!1}}])}();Re.NAME="exposure";var xe=Re,He=[],Be={debug:!1,sourceToken:"",apiHost:"",autoCapture:!0,isSinglePageApp:!1,crossSubdomainCookie:!0,enableAB:!1,abRefreshInterval:6e5,enableClickTrack:!1,enableExposureTrack:!1,batchSend:!1,enableErrorTrack:!1,enableCrashTrack:!1,optOutCapturing:!1,persistOptOut:!1},Me=new(function(){return l((function t(){s(this,t),this.__innerInited=!1,this.inited=!1,this.config={},this.eventEmitter=new v,this.pluginCore={},this.commonProps={},this.spaCleanup=null,this._optOutCapturing=!1,this.consentStorage=new qt(!1),this._setupAfterConsentDone=!1,this._postConsentInit=!1,F.instance=this}),[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.inited?this:(F.instance=this,e.sourceToken=t,this.mergeConfig(e),this.consentStorage=new qt(!0===this.config.persistOptOut),this._optOutCapturing?this.consentStorage.write(!0):!0===this.config.optOutCapturing?(this._optOutCapturing=!0,this.consentStorage.write(!0)):!0===this.consentStorage.read()&&(this._optOutCapturing=!0),this.eventEmitter.emit("init-param",this.config),this.__innerInited=!0,this._optOutCapturing?(de.captureAndStore(this.config.debug),this.eventEmitter.emit($),this.inited=!0,this):(this.__setupAfterConsent(),this.eventEmitter.emit($),this.inited=!0,this))}},{key:"__setupAfterConsent",value:function(){var t=this;if(!this._setupAfterConsentDone){this._setupAfterConsentDone=!0;var e=this.config;He.length=0,q.init(e.crossSubdomainCookie),e.anonId&&q.setAnonId(e.anonId),function(){if(!window._swFailedRequestsInitialized){window._swFailedRequestsInitialized=!0;var t=F.instance;t&&"function"==typeof t.hasOptedOutCapturing&&t.hasOptedOutCapturing()||t&&!0===t._postConsentInit||function(){var t=yt.getAll();if(0!==t.length)for(var e=function(){var e=t.slice(n,n+10),r=[],a=[];
2e.forEach((function(t){Array.isArray(t.data)?r.push.apply(r,(0,i.A)(t.data)):r.push(t.data),a.push(t.id)}));var o=e[e.length-1],s=o.url,u=o.headers;Q({url:s,method:"POST",data:r,headers:u,callback:function(t){200!==t.statusCode?(console.error("Failed to send batch stored requests:",t),z(t.statusCode)||a.forEach((function(t){yt.dequeue(t)}))):a.forEach((function(t){yt.dequeue(t)}))}})},n=0,r=t.length;n<r;n+=10)e()}()}}(),He.push(de),e.autoCapture&&this.autoTrack(),e.enableAB&&He.push(le),e.enableClickTrack&&He.push(ue),e.enableCrashTrack&&e.debug&&console.warn("[SensorsWave] enableCrashTrack 仅在 app 宿主环境生效,当前 Web 环境不采集 crash"),e.enableErrorTrack&&He.push(Oe),e.enableExposureTrack&&He.push(xe),this.pluginCore=new zt({plugins:He,emitter:this.eventEmitter,config:e,sdk:this}),this.spaCleanup=function(t){var e=location.href,n=window.history.pushState,r=window.history.replaceState,i=function(){t(e),e=location.href};return S(window.history.pushState)&&(window.history.pushState=function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];n.apply(window.history,i),t(e),e=location.href}),S(window.history.replaceState)&&(window.history.replaceState=function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];r.apply(window.history,i),t(e),e=location.href}),window.addEventListener("popstate",i),function(){S(window.history.pushState)&&(window.history.pushState=n),S(window.history.replaceState)&&(window.history.replaceState=r),window.removeEventListener("popstate",i)}}((function(e){t.eventEmitter.emit(G,e)}))}}},{key:"mergeConfig",value:function(t){this.config=m(m({},Be),t)}},{key:"__canCapture",value:function(){return this.inited&&!this._optOutCapturing}},{key:"track",value:function(t){this.__canCapture()&&function(t,e){if(Ct()&&Pt()){var n=m({},t);n.time||(n.time=Date.now()),n.login_id||(n.login_id=q.getLoginId()),n.anon_id||(n.anon_id=q.getAnonId()),n.trace_id||(n.trace_id=q.getTraceId()),n.properties=jt(n.properties);var r=Lt(e),i=xt(e),a=!1!==e.batchSend&&Dt();if(!a)return Ht(r,{data:[n],headers:i});yt.enqueue(r,[n],i),a.add()}}(t,this.config)}},{key:"trackEvent",value:function(t,e){this.__canCapture()&&Ut({event:t,properties:e},this.config)}},{key:"trackException",value:function(t,e){if(this.__canCapture()){var n=m(m({},e||{}),t instanceof Error?Se(t):Ee(String(t)));Ut({event:X,properties:n},this.config)}}},{key:"addExposureView",value:function(t,e){if(this.__canCapture()){var n=this.pluginCore.getPlugin(xe.NAME);n?n.addExposureView(t,e):console.warn("[SensorsWave] addExposureView 需在 init 时配置 enableExposureTrack: true")}}},{key:"removeExposureView",value:function(t){if(this.__canCapture()){var e=this.pluginCore.getPlugin(xe.NAME);e&&e.removeExposureView(t)}}},{key:"autoTrack",value:function(){He.push(Yt,ee,Zt)}},{key:"profileSet",value:function(t){this.__canCapture()&&$t({userProps:{$set:t},opts:this.config})}},{key:"profileSetOnce",value:function(t){this.__canCapture()&&$t({userProps:{$set_once:t},opts:this.config})}},{key:"profileIncrement",value:function(t){this.__canCapture()&&$t({userProps:{$increment:t},opts:this.config})}},{key:"profileAppend",value:function(t){this.__canCapture()&&$t({userProps:{$append:t},opts:this.config})}},{key:"profileUnion",value:function(t){this.__canCapture()&&$t({userProps:{$union:t},opts:this.config})}},{key:"profileUnset",value:function(t){if(this.__canCapture()){var e={};E(t)?t.forEach((function(t){e[t]=null})):e[t]=null,$t({userProps:{$unset:e},opts:this.config})}}},{key:"profileDelete",value:function(){this.__canCapture()&&$t({userProps:{$delete:!0},opts:this.config})}},{key:"registerCommonProperties",value:function(t){if(!w(t))return console.warn("Commmon Properties must be an object!");this.commonProps=t,q.setCommonProps(this.commonProps)}},{key:"clearCommonProperties",value:function(t){var e=this;if(!E(t))return console.warn("Commmon Properties to be cleared must be an array!");t.forEach((function(t){delete e.commonProps[t]})),q.setCommonProps(this.commonProps)}}
2,{key:"identify",value:function(t){this.__canCapture()&&(q.setLoginId(t),function(t){if(Ct()&&Pt()){var e=q.getLoginId(),n=q.getAnonId();if(e&&n){var r={time:Date.now(),trace_id:q.getTraceId(),event:"$Identify",login_id:e,anon_id:n,properties:Ft()},i=Lt(t),a=xt(t),o=Dt();if(!o)return Ht(i,{data:[r],headers:a});yt.enqueue(i,[r],a),o.add()}}}(this.config))}},{key:"setLoginId",value:function(t){this.__canCapture()&&q.setLoginId(t)}},{key:"getAnonId",value:function(){return this.__canCapture()?q.getAnonId():""}},{key:"getSessionId",value:function(){return this.__canCapture()?kt(!0):""}},{key:"setAnonId",value:function(t){this.__canCapture()&&q.setAnonId(t)}},{key:"getLoginId",value:function(){return this.__canCapture()?q.getLoginId():""}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.__canCapture()&&(q.clearLoginId(),function(){Tt=null;try{y.remove(St)}catch(t){}}(),t&&q.resetAnonId())}},{key:"checkFeatureGate",value:function(t){if(!this.__canCapture())return Promise.resolve(!1);var e=this.pluginCore.getPlugin(le.NAME);return this.config.enableAB&&e?e.checkFeatureGate(t):Promise.reject("AB is disabled")}},{key:"getExperiment",value:function(t){if(!this.__canCapture())return Promise.resolve({});var e=this.pluginCore.getPlugin(le.NAME);return this.config.enableAB&&e?e.getExperiment(t):Promise.reject("AB is disabled")}},{key:"getFeatureConfig",value:function(t){if(!this.__canCapture())return Promise.resolve({});var e=this.pluginCore.getPlugin(le.NAME);
2return this.config.enableAB&&e?e.getFeatureConfig(t):Promise.reject("AB is disabled")}},{key:"optOutCapturing",value:function(){this._optOutCapturing=!0,this.consentStorage.write(!0),It&&It.pause()}},{key:"optInCapturing",value:function(){if(this._optOutCapturing=!1,this.consentStorage.write(!1),It&&It.resume(),this.inited&&!this._setupAfterConsentDone){this._postConsentInit=!0;try{this.__setupAfterConsent(),this.eventEmitter.emit($)}finally{this._postConsentInit=!1}}}},{key:"hasOptedOutCapturing",value:function(){return this._optOutCapturing}},{key:"destroy",value:function(){var t;It&&(It.destroy(),It=null),"undefined"!=typeof window&&(window._swFailedRequestsInitialized=!1),Tt=null,this.inited=!1,this.__innerInited=!1,this.spaCleanup&&"function"==typeof this.spaCleanup&&(this.spaCleanup(),this.spaCleanup=null),this.pluginCore&&"function"==typeof this.pluginCore.destroy&&this.pluginCore.destroy(),this.pluginCore={},this.eventEmitter&&this.eventEmitter.removeAllListeners(),this.consentStorage=new qt(!0===(null===(t=this.config)||void 0===t?void 0:t.persistOptOut)),this._optOutCapturing=!1,this._setupAfterConsentDone=!1,this._postConsentInit=!1,F.instance===this&&(F.instance=null)}}])}())},24077:function(t,e,n){"use strict";var r=n(74525),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(t){return r.isMemo(t)?o:s[t.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var c=Object.defineProperty,l=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,r){if("string"!=typeof n){if(d){var i=f(n);i&&i!==d&&t(e,i,r)}var o=l(n);p&&(o=o.concat(p(n)));for(var s=u(e),g=u(n),_=0;_<o.length;++_){var m=o[_];if(!(a[m]||r&&r[m]||g&&g[m]||s&&s[m])){var v=h(n,m);try{c(e,m,v)}catch(y){}}}}return e}},15937:function(t,e){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,d=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,_=n?Symbol.for("react.lazy"):60116,m=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function w(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case r:switch(t=t.type){case l:case p:case a:case s:case o:case f:return t;default:switch(t=t&&t.$$typeof){case c:case h:case _:case g:case u:return t;default:return e}}case i:return e}}}function S(t){return w(t)===p}e.AsyncMode=l,e.ConcurrentMode=p,e.ContextConsumer=c,e.ContextProvider=u,e.Element=r,e.ForwardRef=h,e.Fragment=a,e.Lazy=_,e.Memo=g,e.Portal=i,e.Profiler=s,e.StrictMode=o,e.Suspense=f,e.isAsyncMode=function(t){return S(t)||w(t)===l},e.isConcurrentMode=S,e.isContextConsumer=function(t){return w(t)===c},e.isContextProvider=function(t){return w(t)===u},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===r},e.isForwardRef=function(t){return w(t)===h},e.isFragment=function(t){return w(t)===a},e.isLazy=function(t){return w(t)===_},e.isMemo=function(t){return w(t)===g},e.isPortal=function(t){return w(t)===i},e.isProfiler=function(t){return w(t)===s},e.isStrictMode=function(t){return w(t)===o},e.isSuspense=function(t){return w(t)===f},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===a||t===p||t===s||t===o||t===f||t===d||"object"==typeof t&&null!==t&&(t.$$typeof===_||t.$$typeof===g||t.$$typeof===u||t.$$typeof===c||t.$$typeof===h||t.$$typeof===v||t.$$typeof===y||t.$$typeof===b||t.$$typeof===m)},e.typeOf=w},74525:function(t,e,n){"use strict";
2t.exports=n(15937)},86114:function(t,e,n){"use strict";n.d(e,{S:function(){return c}});var r=n(62449),i=n(9175),a=n(11996),o=n(18882);function s(t,e){return e?Object.keys(t).reduce((function(n,i){var a,o;return n[i]=(a=t[i],(o=e[i])?(0,r.Cl)((0,r.Cl)((0,r.Cl)({},a||{}),o||{}),Object.keys(a).reduce((function(t,e){return t[e]=(0,r.Cl)((0,r.Cl)({},a[e]),o[e]||{}),t}),{})):a),n}),(0,r.Cl)({},t)):t}function u(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,n){t[e]=n}}}}}var c=function(){function t(e,n,i,c){var l,p=this;if(void 0===n&&(n=t.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(t){var e=p.formatToParts(t);if(1===e.length)return e[0].value;var n=e.reduce((function(t,e){return t.length&&e.type===o.TT.literal&&"string"==typeof t[t.length-1]?t[t.length-1]+=e.value:t.push(e.value),t}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(t){return(0,o.hN)(p.ast,p.locales,p.formatters,p.formats,t,void 0,p.message)},this.resolvedOptions=function(){return{locale:p.resolvedLocale.toString()}},this.getAst=function(){return p.ast},this.locales=n,this.resolvedLocale=t.resolveLocale(n),"string"==typeof e){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=t.__parse(e,{ignoreTag:null==c?void 0:c.ignoreTag,locale:this.resolvedLocale})}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=s(t.formats,i),this.formatters=c&&c.formatters||(void 0===(l=this.formatterCache)&&(l={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:(0,a.A)((function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,(0,r.fX)([void 0],e,!1)))}),{cache:u(l.number),strategy:a.W.variadic}),getDateTimeFormat:(0,a.A)((function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,(0,r.fX)([void 0],e,!1)))}),{cache:u(l.dateTime),strategy:a.W.variadic}),getPluralRules:(0,a.A)((function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,(0,r.fX)([void 0],e,!1)))}),{cache:u(l.pluralRules),strategy:a.W.variadic})})}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(t){var e=Intl.NumberFormat.supportedLocalesOf(t);return e.length>0?new Intl.Locale(e[0]):new Intl.Locale("string"==typeof t?t:t[0])},t.__parse=i.qg,t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},t}()},59255:function(t,e,n){"use strict";n.d(e,{$x:function(){return o},Ei:function(){return u},IF:function(){return a},O4:function(){return r},Zo:function(){return s}});var r,i=n(62449);!function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"}(r||(r={}));var a=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.code=n,i.originalMessage=r,i}return(0,i.C6)(e,t),e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error),o=function(t){function e(e,n,i,a){return t.call(this,'Invalid values for "'.concat(e,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),r.INVALID_VALUE,a)||this}return(0,i.C6)(e,t),e}(a),s=function(t){function e(e,n,i){return t.call(this,'Value for "'.concat(e,'" must be of type ').concat(n),r.INVA
2LID_VALUE,i)||this}return(0,i.C6)(e,t),e}(a),u=function(t){function e(e,n){return t.call(this,'The intl string context variable "'.concat(e,'" was not provided to the string "').concat(n,'"'),r.MISSING_VALUE,n)||this}return(0,i.C6)(e,t),e}(a)},18882:function(t,e,n){"use strict";n.d(e,{RK:function(){return o},TT:function(){return r},hN:function(){return s}});var r,i=n(9175),a=n(59255);function o(t){return"function"==typeof t}function s(t,e,n,u,c,l,p){if(1===t.length&&(0,i.eW)(t[0]))return[{type:r.literal,value:t[0].value}];for(var h=[],f=0,d=t;f<d.length;f++){var g=d[f];if((0,i.eW)(g))h.push({type:r.literal,value:g.value});else if((0,i.jA)(g))"number"==typeof l&&h.push({type:r.literal,value:n.getNumberFormat(e).format(l)});else{var _=g.value;if(!c||!(_ in c))throw new a.Ei(_,p);var m=c[_];if((0,i.Im)(g))m&&"string"!=typeof m&&"number"!=typeof m||(m="string"==typeof m||"number"==typeof m?String(m):""),h.push({type:"string"==typeof m?r.literal:r.object,value:m});else if((0,i.tv)(g)){var v="string"==typeof g.style?u.date[g.style]:(0,i.Tu)(g.style)?g.style.parsedOptions:void 0;h.push({type:r.literal,value:n.getDateTimeFormat(e,v).format(m)})}else if((0,i.Qh)(g)){v="string"==typeof g.style?u.time[g.style]:(0,i.Tu)(g.style)?g.style.parsedOptions:u.time.medium;h.push({type:r.literal,value:n.getDateTimeFormat(e,v).format(m)})}else if((0,i.oF)(g)){(v="string"==typeof g.style?u.number[g.style]:(0,i.N1)(g.style)?g.style.parsedOptions:void 0)&&v.scale&&(m*=v.scale||1),h.push({type:r.literal,value:n.getNumberFormat(e,v).format(m)})}else{if((0,i.xm)(g)){var y=g.children,b=g.value,w=c[b];if(!o(w))throw new a.Zo(b,"function",p);var S=w(s(y,e,n,u,c,l).map((function(t){return t.value})));Array.isArray(S)||(S=[S]),h.push.apply(h,S.map((function(t){return{type:"string"==typeof t?r.literal:r.object,value:t}})))}if((0,i.Jp)(g)){if(!(E=g.options[m]||g.options.other))throw new a.$x(g.value,m,Object.keys(g.options),p);h.push.apply(h,s(E.value,e,n,u,c))}else if((0,i.N6)(g)){var E;if(!(E=g.options["=".concat(m)])){if(!Intl.PluralRules)throw new a.IF('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',a.O4.MISSING_INTL_API,p);var T=n.getPluralRules(e,{type:g.pluralType}).select(m-(g.offset||0));E=g.options[T]||g.options.other}if(!E)throw new a.$x(g.value,m,Object.keys(g.options),p);h.push.apply(h,s(E.value,e,n,u,c,m-(g.offset||0)))}else;}}}return function(t){return t.length<2?t:t.reduce((function(t,e){var n=t[t.length-1];return n&&n.type===r.literal&&e.type===r.literal?n.value+=e.value:t.push(e),t}),[])}(h)}!function(t){t[t.literal=0]="literal",t[t.object=1]="object"}(r||(r={}))},92808:function(t){var e="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,i="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function a(t,o){if(t===o)return!0;if(t&&o&&"object"==typeof t&&"object"==typeof o){if(t.constructor!==o.constructor)return!1;var s,u,c,l;if(Array.isArray(t)){if((s=t.length)!=o.length)return!1;for(u=s;0!=u--;)if(!a(t[u],o[u]))return!1;return!0}if(n&&t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(l=t.entries();!(u=l.next()).done;)if(!o.has(u.value[0]))return!1;for(l=t.entries();!(u=l.next()).done;)if(!a(u.value[1],o.get(u.value[0])))return!1;return!0}if(r&&t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(l=t.entries();!(u=l.next()).done;)if(!o.has(u.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(o)){if((s=t.length)!=o.length)return!1;for(u=s;0!=u--;)if(t[u]!==o[u])return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf&&"function"==typeof t.valueOf&&"function"==typeof o.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString&&"function"==typeof t.toString&&"function"==typeof o.toString)return t.toString()===o.toString();if((s=(c=Object.keys(t)).length)!==Object.keys(o).length)return!1;for(u=s;0!=u--;)if(!Object.prototype.hasOwnProperty.call(o,c[u]))return!1;if(e&&t instanceof Element)return!1;for(u=s;0!=u--;)if(("_owner"!==c[u]&&"__v"!==c[u]&&"__o"!==c[u]||!t.$$typeof)&&!a(t[c[u]],o[c[u]]))return!1;return!0}return t!=t&&o!=o}t.exports=function(t,e){try{return a(t,e)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},93673:function(t,e,n){"use strict";n.d(e,{m:function(){return ft}});var r,i,a,o,s=n(5556),u=n.n(s),c=n(66643),l=n.n(c),p=n(92808),h=n.n(p),f=n(96540),d=n(47325),g=n.n(d),_="bodyAttributes",m="htmlAttributes",v="titleAttributes",y={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},b=(Object.keys(y).map((function(t){return y[t]})),"charset"),w="cssText",S="href",E="http-equiv",T="innerHTML",A="itemprop",O="name",k="property",C="rel",P="src",I="target",D={accesskey:"accessKey",charset
2:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},N="defaultTitle",L="defer",R="encodeSpecialCharacters",x="onChangeClientState",H="titleTemplate",B=Object.keys(D).reduce((function(t,e){return t[D[e]]=e,t}),{}),M=[y.NOSCRIPT,y.SCRIPT,y.STYLE],j="data-react-helmet",F="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},U=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),$=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},G=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},W=function(t){return!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])?String(t):String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},V=function(t){var e=K(t,y.TITLE),n=K(t,H);if(n&&e)return n.replace(/%s/g,(function(){return Array.isArray(e)?e.join(""):e}));var r=K(t,N);return e||r||void 0},X=function(t){return K(t,x)||function(){}},J=function(t,e){return e.filter((function(e){return void 0!==e[t]})).map((function(e){return e[t]})).reduce((function(t,e){return $({},t,e)}),{})},q=function(t,e){return e.filter((function(t){return void 0!==t[y.BASE]})).map((function(t){return t[y.BASE]})).reverse().reduce((function(e,n){if(!e.length)for(var r=Object.keys(n),i=0;i<r.length;i++){var a=r[i].toLowerCase();if(-1!==t.indexOf(a)&&n[a])return e.concat(n)}return e}),[])},z=function(t,e,n){var r={};return n.filter((function(e){return!!Array.isArray(e[t])||(void 0!==e[t]&&et("Helmet: "+t+' should be of type "Array". Instead found type "'+F(e[t])+'"'),!1)})).map((function(e){return e[t]})).reverse().reduce((function(t,n){var i={};n.filter((function(t){for(var n=void 0,a=Object.keys(t),o=0;o<a.length;o++){var s=a[o],u=s.toLowerCase();-1===e.indexOf(u)||n===C&&"canonical"===t[n].toLowerCase()||u===C&&"stylesheet"===t[u].toLowerCase()||(n=u),-1===e.indexOf(s)||s!==T&&s!==w&&s!==A||(n=s)}if(!n||!t[n])return!1;var c=t[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),!r[n][c]&&(i[n][c]=!0,!0)})).reverse().forEach((function(e){return t.push(e)}));for(var a=Object.keys(i),o=0;o<a.length;o++){var s=a[o],u=g()({},r[s],i[s]);r[s]=u}return t}),[]).reverse()},K=function(t,e){for(var n=t.length-1;n>=0;n--){var r=t[n];if(r.hasOwnProperty(e))return r[e]}return null},Y=(r=Date.now(),function(t){var e=Date.now();e-r>16?(r=e,t(e)):setTimeout((function(){Y(t)}),0)}),Q=function(t){return clearTimeout(t)},Z="undefined"!=typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Y:n.g.requestAnimationFrame||Y,tt="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||Q:n.g.cancelAnimationFrame||Q,et=function(t){return console&&"function"==typeof console.warn&&console.warn(t)},nt=null,rt=function(t,e){var n=t.baseTag,r=t.bodyAttributes,i=t.htmlAttributes,a=t.linkTags,o=t.metaTags,s=t.noscriptTags,u=t.onChangeClientState,c=t.scriptTags,l=t.styleTags,p=t.title,h=t.titleAttributes;ot(y.BODY,r),ot(y.HTML,i),at(p,h);var f={baseTag:st(y.BASE,n),linkTags:st(y.LINK,a),metaTags:st(y.META,o),noscriptTags:st(y.NOSCRIPT,s),scriptTags:st(y.SCRIPT,c),styleTags:st(y.STYLE,l)},d={},g={};Object.keys(f).forEach((function(t){var e=f[t],n=e.newTags,r=e.oldTags;n.length&&(d[t]=n),r.length&&(g[t]=f[t].oldTags)})),e&&e(),u(t,d,g)},it=function(t){return Array.isArray(t)?t.join(""):t},at=function(t,e){void 0!==t&&document.title!==t&&(document.title=it(t)),ot(y.TITLE,e)},ot=function(t,e){var n=document.getElementsByTagName(t)[0];if(n){for(var r=n.getAttribute(j),i=r?r.split(","):[],a=[].concat(i),o=Object.keys(e),s=0;s<o.length;s++){var u=o[s],c=e[u]||"";n.getAttribute(u)!==c&&n.setAttribute(u,c),-1===i.indexOf(u)&&i.push(u);var l=a.indexOf(u);-1!==l&&a.splice(l,1)}for(var p=a.length-1;p>=0;p--)n.removeAttribute(a[p]);i.length===a.length?n.removeAttribute(j):n.getAttribute(j)!==o.join(",")&&n.setAttribute(j,o.join(","))}},st=function(t,e){var n=document.head||document.querySelector(y.HEAD),r=n.querySelectorAll(t+"["+j+"]"),i=Array.prototype.slice.call(r),a=[],o=void 0;return e&&e.length&&e.forEach((function(e){var n=document.createElement(t);for(var r in e)if(e.hasOwnProperty(r))if(r===T)n.innerHTML=e.innerHTML;else if(r===w)n.styleSheet?n.styleSheet.cssText=e.cssText:n.appendChild(document.createTextNode(e.cssText));else{var s=void 0===e[r]?"":e[r];n.setAttribute(r,s)}n.setAttribute(j,"true"),i.some((function(t,e){return o=e,n.isEqualNode(t)}))?i.splice(o,1):a.push(n)}
2)),i.forEach((function(t){return t.parentNode.removeChild(t)})),a.forEach((function(t){return n.appendChild(t)})),{oldTags:i,newTags:a}},ut=function(t){return Object.keys(t).reduce((function(e,n){var r=void 0!==t[n]?n+'="'+t[n]+'"':""+n;return e?e+" "+r:r}),"")},ct=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(e,n){return e[D[n]||n]=t[n],e}),e)},lt=function(t,e,n){switch(t){case y.TITLE:return{toComponent:function(){return t=e.title,n=e.titleAttributes,(r={key:t})[j]=!0,i=ct(n,r),[f.createElement(y.TITLE,i,t)];var t,n,r,i},toString:function(){return function(t,e,n,r){var i=ut(n),a=it(e);return i?"<"+t+" "+j+'="true" '+i+">"+W(a,r)+"</"+t+">":"<"+t+" "+j+'="true">'+W(a,r)+"</"+t+">"}(t,e.title,e.titleAttributes,n)}};case _:case m:return{toComponent:function(){return ct(e)},toString:function(){return ut(e)}};default:return{toComponent:function(){return function(t,e){return e.map((function(e,n){var r,i=((r={key:n})[j]=!0,r);return Object.keys(e).forEach((function(t){var n=D[t]||t;if(n===T||n===w){var r=e.innerHTML||e.cssText;i.dangerouslySetInnerHTML={__html:r}}else i[n]=e[t]})),f.createElement(t,i)}))}(t,e)},toString:function(){return function(t,e,n){return e.reduce((function(e,r){var i=Object.keys(r).filter((function(t){return!(t===T||t===w)})).reduce((function(t,e){var i=void 0===r[e]?e:e+'="'+W(r[e],n)+'"';return t?t+" "+i:i}),""),a=r.innerHTML||r.cssText||"",o=-1===M.indexOf(t);return e+"<"+t+" "+j+'="true" '+i+(o?"/>":">"+a+"</"+t+">")}),"")}(t,e,n)}}}},pt=function(t){var e=t.baseTag,n=t.bodyAttributes,r=t.encode,i=t.htmlAttributes,a=t.linkTags,o=t.metaTags,s=t.noscriptTags,u=t.scriptTags,c=t.styleTags,l=t.title,p=void 0===l?"":l,h=t.titleAttributes;return{base:lt(y.BASE,e,r),bodyAttributes:lt(_,n,r),htmlAttributes:lt(m,i,r),link:lt(y.LINK,a,r),meta:lt(y.META,o,r),noscript:lt(y.NOSCRIPT,s,r),script:lt(y.SCRIPT,u,r),style:lt(y.STYLE,c,r),title:lt(y.TITLE,{title:p,titleAttributes:h},r)}},ht=l()((function(t){return{baseTag:q([S,I],t),bodyAttributes:J(_,t),defer:K(t,L),encode:K(t,R),htmlAttributes:J(m,t),linkTags:z(y.LINK,[C,S],t),metaTags:z(y.META,[O,b,E,k,A],t),noscriptTags:z(y.NOSCRIPT,[T],t),onChangeClientState:X(t),scriptTags:z(y.SCRIPT,[P,T],t),styleTags:z(y.STYLE,[w],t),title:V(t),titleAttributes:J(v,t)}}),(function(t){nt&&tt(nt),t.defer?nt=Z((function(){rt(t,(function(){nt=null}))})):(rt(t),nt=null)}),pt)((function(){return null})),ft=(i=ht,o=a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.shouldComponentUpdate=function(t){return!h()(this.props,t)},e.prototype.mapNestedChildrenToProps=function(t,e){if(!e)return null;switch(t.type){case y.SCRIPT:case y.NOSCRIPT:return{innerHTML:e};case y.STYLE:return{cssText:e}}throw new Error("<"+t.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},e.prototype.flattenArrayTypeChildren=function(t){var e,n=t.child,r=t.arrayTypeChildren,i=t.newChildProps,a=t.nestedChildren;return $({},r,((e={})[n.type]=[].concat(r[n.type]||[],[$({},i,this.mapNestedChildrenToProps(n,a))]),e))},e.prototype.mapObjectTypeChildren=function(t){var e,n,r=t.child,i=t.newProps,a=t.newChildProps,o=t.nestedChildren;switch(r.type){case y.TITLE:return $({},i,((e={})[r.type]=o,e.titleAttributes=$({},a),e));case y.BODY:return $({},i,{bodyAttributes:$({},a)});case y.HTML:return $({},i,{htmlAttributes:$({},a)})}return $({},i,((n={})[r.type]=$({},a),n))},e.prototype.mapArrayTypeChildrenToProps=function(t,e){var n=$({},e);return Object.keys(t).forEach((function(e){var r;n=$({},n,((r={})[e]=t[e],r))})),n}
2,e.prototype.warnOnInvalidChildren=function(t,e){return!0},e.prototype.mapChildrenToProps=function(t,e){var n=this,r={};return f.Children.forEach(t,(function(t){if(t&&t.props){var i=t.props,a=i.children,o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(e,n){return e[B[n]||n]=t[n],e}),e)}(G(i,["children"]));switch(n.warnOnInvalidChildren(t,a),t.type){case y.LINK:case y.META:case y.NOSCRIPT:case y.SCRIPT:case y.STYLE:r=n.flattenArrayTypeChildren({child:t,arrayTypeChildren:r,newChildProps:o,nestedChildren:a});break;default:e=n.mapObjectTypeChildren({child:t,newProps:e,newChildProps:o,nestedChildren:a})}}})),e=this.mapArrayTypeChildrenToProps(r,e)},e.prototype.render=function(){var t=this.props,e=t.children,n=G(t,["children"]),r=$({},n);return e&&(r=this.mapChildrenToProps(e,r)),f.createElement(i,r)},U(e,null,[{key:"canUseDOM",set:function(t){i.canUseDOM=t}}]),e}(f.Component),a.propTypes={base:u().object,bodyAttributes:u().object,children:u().oneOfType([u().arrayOf(u().node),u().node]),defaultTitle:u().string,defer:u().bool,encodeSpecialCharacters:u().bool,htmlAttributes:u().object,link:u().arrayOf(u().object),meta:u().arrayOf(u().object),noscript:u().arrayOf(u().object),onChangeClientState:u().func,script:u().arrayOf(u().object),style:u().arrayOf(u().object),title:u().string,titleAttributes:u().object,titleTemplate:u().string},a.defaultProps={defer:!0,encodeSpecialCharacters:!0},a.peek=i.peek,a.rewind=function(){var t=i.rewind();return t||(t=pt({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),t},o);ft.renderStatic=ft.rewind},97933:function(t,e,n){"use strict";n.d(e,{Kq:function(){return a},ob:function(){return o}});var r=n(96540);n(24077);var i=r.createContext(null),a=(i.Consumer,i.Provider),o=i},67707:function(t,e,n){"use strict";n.d(e,{HM:function(){return s},JF:function(){return u},bN:function(){return l},yU:function(){return c}});var r=n(62449),i=n(96540),a=n(5851),o=n(3284);function s(t){(0,a.V1)(t,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var u=(0,r.Cl)((0,r.Cl)({},o.JF),{textComponent:i.Fragment});function c(t){return function(e){return t(i.Children.toArray(e))}}function l(t,e){if(t===e)return!0;if(!t||!e)return!1;var n=Object.keys(t),r=Object.keys(e),i=n.length;if(r.length!==i)return!1;for(var a=0;a<i;a++){var o=n[a];if(t[o]!==e[o]||!Object.prototype.hasOwnProperty.call(e,o))return!1}return!0}},66643:function(t,e,n){"use strict";var r,i=n(96540),a=(r=i)&&"object"==typeof r&&"default"in r?r.default:r;function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=!("undefined"==typeof window||!window.document||!window.document.createElement);t.exports=function(t,e,n){if("function"!=typeof t)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof e)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(r){if("function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var u,c=[];function l(){u=t(c.map((function(t){return t.props}))),p.canUseDOM?e(u):n&&(u=n(u))}var p=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i.peek=function(){return u},i.rewind=function(){if(i.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var t=u;return u=void 0,c=[],t};var o=i.prototype;return o.UNSAFE_componentWillMount=function(){c.push(this),l()},o.componentDidUpdate=function(){l()},o.componentWillUnmount=function(){var t=c.indexOf(this);c.splice(t,1),l()},o.render=function(){return a.createElement(r,this.props)},i}(i.PureComponent);return o(p,"displayName","SideEffect("+function(t){return t.displayName||t.name||"Component"}(r)+")"),o(p,"canUseDOM",s),p}}},80775:function(t,e){"use strict";var n,r,i;function a(t){var e=[];return r.each(t,(function(t){r.isArray(t)?e=e.concat(a(t)):e.push(r.optimizeServerUrl(t))})),e}function o(t,e){e=r.isArray(e)?e:[e];var n=!1;return r.isArray(t)?r.each(t,(function(t){r.indexOf(e,t)>-1&&(n=!0)})):r.indexOf(e,t)>-1&&(n=!0),n}function s(t,e){var r=n.kit.encodeTrackData(e);return-1!==t.indexOf("?")?t+"&"+r:t+"?"+r}var u,c,l,p={hookFn:null,init:function(t){this.hookFn=t,n.registerInterceptor("sendDataStage",{send:{priority:20,entry:function(t,e){return p.sendData(t,e),t}}})},sendData:function(t,e){var n=t.origin_data,i=n.event,s=t.server_url,u=t.callback,c=this,l=this.hookFn({event_name:i,data:r.extend2Lev({identities:{},lib:{},properties:{}},n),server_url:s});return r.isArray(l)&&l.length?(l=a(l),o(s,l)?u=null:e.cancellationToken.stop(),r.each(l,(function(e){if(e&&""!==e&&!o(e,s)){var r=(i=e,function(){c.sendCall({server_url:i,origin_data:n,data:t.data,config:null,callback:u}),u=null,t.callback=null});setTimeout(r)}var i})),t):(r.isFunction(u)&&u(),e.cancellationToken.stop(),t)},getInstance:function(t){return"beacon"===n.para.send_type&&r.isSupportBeaconSend()?(t.data=s(t.server_url,t.origin_data),new r.BeaconSend(t)):"ajax"===n.para.send_type&&r.isSupportCors()?(t.data=s(t.server_url,t.origin_data),new r.AjaxSend(t)):(t.origin_data._flush_time=(new Date).getTime(),t.data=s(t.server_url,t.origin_data),new r.ImageSend(t))},sendCall:function(t){this.getInstance(t).start()}},h={plugin_name:"CustomEventsSender",init:function(t,e){if(r=(n=t)._,i=n&&n.log||console&&console.log||function(){},r.isFunction(e)){if(n.readyState&&n.readyState.state>=3||!n.on)return p.init(e);n.on("sdkAfterInitPara",(function(){p.init(e)}))}else i("CustomEventsSender init failed,hookFn error. hookFn:",e)}},f=(function(t,e,n){if(e&&(t.plugin_name=e),n&&t.init){var r=t.init;t.init=function(i,a){if(function(t,e,n){function r(e,r){t.logger?t.logger.msg.apply(t.logger,r).module(n+""||"").level(e).log():t.log&&t.log.apply(t,r)}e.log=function(){r("log",arguments)},e.warn=function(){r("warn",arguments)},e.error=function(){r("error",arguments)}}(i,t,e),i.readyState&&i.readyState.state>=3||!i.on)return o();function o(){r.call(t,i,a)}i.on(n,o)}}}(u=h,c,l),u.plugin_version="1.27.11",u);e.A=f},62449:function(t,e,n){"use strict";n.d(e,{C6:function(){return i},Cl:function(){return a},Ju:function(){return c},Tt:function(){return o},YH:function(){return u},fX:function(){return p},sH:function(){return s},zs:function(){return l}});var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var a=function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},a.apply(this,arguments)};function o(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}
2function s(t,e,n,r){return new(n||(n=Promise))((function(i,a){function o(t){try{u(r.next(t))}catch(e){a(e)}}function s(t){try{u(r.throw(t))}catch(e){a(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}u((r=r.apply(t,e||[])).next())}))}function u(t,e){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(u){s=[6,u],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}Object.create;function c(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function p(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}Object.create;"function"==typeof SuppressedError&&SuppressedError},72950:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n.d(e,{A:function(){return r}})},35520:function(t,e,n){"use strict";function r(t,e,n,r,i,a,o){try{var s=t[a](o),u=s.value}catch(c){return void n(c)}s.done?e(u):Promise.resolve(u).then(r,i)}function i(t){return function(){var e=this,n=arguments;return new Promise((function(i,a){var o=t.apply(e,n);function s(t){r(o,i,a,s,u,"next",t)}function u(t){r(o,i,a,s,u,"throw",t)}s(void 0)}))}}n.d(e,{A:function(){return i}})},47728:function(t,e,n){"use strict";n.d(e,{A:function(){return i}});var r=n(67867);function i(t,e,n){return(e=(0,r.A)(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},71018:function(t,e,n){"use strict";n.d(e,{A:function(){return i}});var r=n(3623);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,a,o,s=[],u=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||(0,r.A)(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},57029:function(t,e,n){"use strict";n.d(e,{A:function(){return a}});var r=n(72950);var i=n(3623);function a(t){return function(t){if(Array.isArray(t))return(0,r.A)(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||(0,i.A)(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.")}()}},67867:function(t,e,n){"use strict";function r(t){return r="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},r(t)}function i(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}
vendor: 5,121 bytes, line 2
2(t,"string");return"symbol"==r(e)?e:e+""}n.d(e,{A:function(){return i}})},3623:function(t,e,n){"use strict";n.d(e,{A:function(){return i}});var r=n(72950);function i(t,e){if(t){if("string"==typeof t)return(0,r.A)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.A)(t,e):void 0}}},93904:function(t,e,n){var r=n(75895).default;function i(){"use strict";t.exports=i=function(){return n},t.exports.__esModule=!0,t.exports.default=t.exports;var e,n={},a=Object.prototype,o=a.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",p=u.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(e){h=function(t,e,n){return t[e]=n}}function f(t,e,n,r){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),o=new L(r||[]);return s(a,"_invoke",{value:P(t,n,o)}),a}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=f;var g="suspendedStart",_="suspendedYield",m="executing",v="completed",y={};function b(){}function w(){}function S(){}var E={};h(E,c,(function(){return this}));var T=Object.getPrototypeOf,A=T&&T(T(R([])));A&&A!==a&&o.call(A,c)&&(E=A);var O=S.prototype=b.prototype=Object.create(E);function k(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function n(i,a,s,u){var c=d(t[i],t,a);if("throw"!==c.type){var l=c.arg,p=l.value;return p&&"object"==r(p)&&o.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,s,u)}),(function(t){n("throw",t,s,u)})):e.resolve(p).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function a(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(a,a):a()}})}function P(t,n,r){var i=g;return function(a,o){if(i===m)throw Error("Generator is already running");if(i===v){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var u=I(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===g)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=m;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?v:_,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=v,r.method="throw",r.arg=c.arg)}}}function I(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var a=d(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function D(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(D,this),this.reset(!0)}function R(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(o.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(r(t)+" is not iterable")}return w.prototype=S,s(O,"constructor",{value:S,configurable:!0}),s(S,"constructor",{value:w,configurable:!0}),w.displayName=h(S,p,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,S):(t.__proto__=S,h(t,p,"GeneratorFunction")),t.prototype=Object.create(O),t},n.awrap=function(t){return{__await:t}},k(C.prototype),h(C.prototype,l,(function(){return this})),n.AsyncIterator=C,n.async=function(t,e,r,i,a){void 0===a&&(a=Promise);var o=new C(f(t,e,r,i),a);return n.isGeneratorFunction(e)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},k(O),h(O,p,"Generator"),h(O,c,(function(){return this})),h(O,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},n.values=R,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEac
2h(N),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),N(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;N(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:R(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},n}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},99199:function(t,e,n){n(62480);var r=n(93904)();t.exports=r;try{regeneratorRuntime=r}catch(i){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},38593:function(t,e){"use strict";var n={sd:null,lib_version:"0.0.10",para:{},default_para:{url:"",path:"",project_key:"",timeout_milliseconds:3e3,update_interval:6e5,collect_bridge_status:!0,session_limit:6e5,encrypt_cookie:!1},value_type_list:["Number","String","Object","Boolean"],state:{platform:"",storage:{isSupport:!0,name:"sawebjssdkabtest"}},bridgeState:"",localdata:{},originalData:[],triggerList:{},updateTime:null},r={},i=Array.prototype,a=Object.prototype,o=i.slice,s=a.toString,u=a.hasOwnProperty,c=i.forEach,l=Array.isArray,p={};r.each=function(t,e,n){if(null==t)return!1;if(c&&t.forEach===c)t.forEach(e,n);else if(r.isArray(t)&&t.length===+t.length){for(var i=0,a=t.length;i<a;i++)if(i in t&&e.call(n,t[i],i,t)===p)return!1}else for(var o in t)if(u.call(t,o)&&e.call(n,t[o],o,t)===p)return!1},r.extend=function(t){return r.each(o.call(arguments,1),(function(e){for(var n in e)u.call(e,n)&&void 0!==e[n]&&(t[n]=e[n])})),t},r.isArray=l||function(t){return"[object Array]"===s.call(t)},r.isObject=function(t){return null!=t&&"[object Object]"==s.call(t)},r.isElement=function(t){return!(!t||1!==t.nodeType)},r.isString=function(t){return"[object String]"==s.call(t)},r.isBoolean=function(t){return"[object Boolean]"==s.call(t)},r.isNumber=function(t){return"[object Number]"==s.call(t)&&/[\d\.]+/.test(String(t))},r.unique=function(t){for(var e,n=[],r={},i=0;i<t.length;i++)(e=t[i])in r||(r[e]=!0,n.push(e));return n},r.decodeURIComponent=function(t){var e=t;try{e=decodeURIComponent(t)}catch(n){e=t}return e},r.getQueryParam=function(t,e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),t=r.decode
2URIComponent(t);var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===n||n&&"string"!=typeof n[1]&&n[1].length?"":r.decodeURIComponent(n[1])},r.indexOf=function(t,e){var n=t.indexOf;if(n)return n.call(t,e);for(var r=0;r<t.length;r++)if(e===t[r])return r;return-1},r.isFunction=function(t){if(!t)return!1;var e=Object.prototype.toString.call(t);return"[object Function]"==e||"[object AsyncFunction]"==e},r.isEmptyObject=function(t){if(r.isObject(t)){for(var e in t)if(u.call(t,e))return!1;return!0}return!1},r.map=function(t,e){var n=[];return null==t?n:Array.prototype.map&&t.map===Array.prototype.map?t.map(e):(r.each(t,(function(t,r,i){n.push(e(t,r,i))})),n)},r.base64Decode=function(t){var e=r.map(atob(t).split(""),(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}));return decodeURIComponent(e.join(""))},r.getURLSearchParams=function(t){for(var e=function(t){return decodeURIComponent(t)},n={},r=(t=t||"").substring(1).split("&"),i=0;i<r.length;i++){var a=r[i].indexOf("=");if(-1!==a){var o=r[i].substring(0,a),s=r[i].substring(a+1);o=e(o),s=e(s),n[o]=s}}return n},r.urlParse=function(t){var e=function(t){this._fields={Username:4,Password:5,Port:7,Protocol:2,Host:6,Path:8,URL:0,QueryString:9,Fragment:10},this._values={},this._regex=null,this._regex=/^((\w+):\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/,void 0!==t&&this._parse(t)};return e.prototype.setUrl=function(t){this._parse(t)},e.prototype._initValues=function(){for(var t in this._fields)this._values[t]=""},e.prototype.addQueryString=function(t){if("object"!=typeof t)return!1;var e=this._values.QueryString||"";for(var n in t)e=new RegExp(n+"[^&]+").test(e)?e.replace(new RegExp(n+"[^&]+"),n+"="+t[n]):"&"===e.slice(-1)?e+n+"="+t[n]:""===e?n+"="+t[n]:e+"&"+n+"="+t[n];this._values.QueryString=e},e.prototype.getUrl=function(){var t="";return t+=this._values.Origin,t+=this._values.Port?":"+this._values.Port:"",t+=this._values.Path,(t+=this._values.QueryString?"?"+this._values.QueryString:"")+(this._values.Fragment?"#"+this._values.Fragment:"")},e.prototype.getUrl=function(){var t="";return t+=this._values.Origin,t+=this._values.Port?":"+this._values.Port:"",(t+=this._values.Path)+(this._values.QueryString?"?"+this._values.QueryString:"")},e.prototype._parse=function(t){this._initValues();var e=this._regex.exec(t);for(var n in e||r.log("DPURLParser::_parse -> Invalid URL"),this._fields)void 0!==e[this._fields[n]]&&(this._values[n]=e[this._fields[n]]);this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname},new e(t)},r.URL=function(t){var e,n={};if("function"==typeof window.URL&&function(){try{return"http://modernizr.com/"===new URL("http://modernizr.com/").href}catch(t){return!1}}())(n=new URL(t)).searchParams||(n.searchParams=(e=r.getURLSearchParams(n.search),{get:function(t){return e[t]}}));else{!1===/^https?:\/\/.+/.test(t)&&r.log("Invalid URL");var i=r.urlParse(t);n.hash="",n.host=i._values.Host?i._values.Host+(i._values.Port?":"+i._values.Port:""):"",n.href=i._values.URL,n.password=i._values.Password,n.pathname=i._values.Path,n.port=i._values.Port,n.search=i._values.QueryString?"?"+i._values.QueryString:"",n.username=i._values.Username,n.hostname=i._values.Hostname,n.protocol=i._values.Protocol?i._values.Protocol+":":"",n.origin=i._values.Origin?i._values.Origin+(i._values.Port?":"+i._values.Port:""):"",n.searchParams=function(){var t=r.getURLSearchParams("?"+i._values.QueryString);return{get:function(e){return t[e]}}}()}return n},r.getQueryParam=function(t,e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),t=r.decode
2URIComponent(t);var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===n||n&&"string"!=typeof n[1]&&n[1].length?"":r.decodeURIComponent(n[1])},r.isEmptyObject=function(t){if(r.isObject(t)){for(var e in t)if(u.call(t,e))return!1;return!0}return!1},r.contentLoaded=function(t,e){var n=!1,r=!0,i=t.document,a=i.documentElement,o=i.addEventListener,s=o?"addEventListener":"attachEvent",u=o?"removeEventListener":"detachEvent",c=o?"":"on",l=function(r){"readystatechange"==r.type&&"complete"!=i.readyState||(("load"==r.type?t:i)[u](c+r.type,l,!1),!n&&(n=!0)&&e.call(t,r.type||r))},p=function(){try{a.doScroll("left")}catch(t){return void setTimeout(p,50)}l("poll")};if("complete"==i.readyState)e.call(t,"lazy");else{if(!o&&a.doScroll){try{r=!t.frameElement}catch(h){}r&&p()}i[s](c+"DOMContentLoaded",l,!1),i[s](c+"readystatechange",l,!1),t[s](c+"load",l,!1)}},r.secCheck={isHttpUrl:function(t){return"string"==typeof t&&(!1!==/^https?:\/\/.+/.test(t)||(r.log("Invalid URL"),!1))},removeScriptProtocol:function(t){if("string"!=typeof t)return"";for(var e=/^\s*javascript/i;e.test(t);)t=t.replace(e,"");return t}},r.addEvent=function(){function t(e){return e&&(e.preventDefault=t.preventDefault,e.stopPropagation=t.stopPropagation,e._getPath=t._getPath),e}t._getPath=function(){var t=this;return this.path||this.composedPath&&this.composedPath()||function(){try{var e=t.target,n=[e];if(null===e||null===e.parentElement)return[];for(;null!==e.parentElement;)e=e.parentElement,n.unshift(e);return n}catch(r){return[]}}()},t.preventDefault=function(){this.returnValue=!1},t.stopPropagation=function(){this.cancelBubble=!0},function(e,n,r){if(e&&e.addEventListener)e.addEventListener(n,(function(e){e._getPath=t._getPath,r.call(this,e)}),!0);else{var i="on"+n,a=e[i];e[i]=function(e,n,r){return function(i){if(i=i||t(window.event)){i.target=i.srcElement;var a,o,s=!0;return"function"==typeof r&&(a=r(i)),o=n.call(e,i),!1!==a&&!1!==o||(s=!1),s}}}(e,r,a)}}.apply(null,arguments)},r.addSinglePageEvent=function(t){var e=location.href,n=window.history.pushState,i=window.history.replaceState;window.history.pushState=function(){n.apply(window.history,arguments),t(e),e=location.href},window.history.replaceState=function(){i.apply(window.history,arguments),t(e),e=location.href};var a=n?"popstate":"hashchange";r.addEvent(window,a,(function(){t(e),e=location.href}))},r.trim=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},r.checkUrlIsMatch=function(t,e){var n,i,a=r.URL(t);if("STRICT"===e)return location.href===a.href;if("FUZZY"===e){try{n=r.URL(location.href)}catch(o){return r.log("url 解析失败",o),!1}try{i=r.URL(t)}catch(o){return r.log("control_url 解析失败",o),!1}return n.host===i.host&&n.pathname===i.pathname}return r.log("link_match_type字段异常",e),!1},r.checkUrlIsRegexp=function(t,e){var n;try{n=r.URL(location.href)}catch(o){return r.log("url 解析失败",o),!1}try{var i=(e?new RegExp(t,e):new RegExp(t)).exec(n.href),a=!0;return!!i&&(r.each(i,(function(t){t||(a=!1)})),a)}catch(o){return r.log("control_link字段异常",o),!1}};var h="dfm-enc-";function f(t){var e="t6KJCZa5pDdQ9khoEM3Tj70fbP2eLSyc4BrsYugARqFIw1mzlGNVXOHiWvxUn8",n={},r=0;for(r=0;r<62;r++)n[e.charAt(r)]=e.charAt(61-r);var i="";for(r=0;r<t.length;r++)t.charAt(r)in n?i+=n[t.charAt(r)]:i+=t.charAt(r);return i}function d(t,e){t=t||window;var n=!1,r=!0,i=t.document,a=i.documentElement,o=i.addEventListener,s=o?"addEventListener":"attachEvent",u=o?"removeEventListener":"detachEvent",c=o?"":"on",l=function(r){"readystatechange"==r.type&&"complete"!=i.readyState||(("load"==r.type?t:i)[u](c+r.type,l,!1),!n&&(n=!0)&&e.call(t,r.type||r))},p=function(){try{a.doScroll("left")}catch(t){return void setTimeout(p,50)}l("poll")};if("complete"==i.readyState)e.call(t,"lazy");else{if(!o&&a.doScroll){try{r=!t.frameElement}catch(h){}r&&p()}i[s](c+"DOMContentLoaded",l,!1),i[s](c+"readystatechange",l,!1),t[s](c+"load",l,!1)}}function g(t,e){if(!t||!t.parentNode||!t.parentNode.children)return!1;e=e&&e.join?e:[];var n=t.nodeName.toLowerCase();return t&&"body"!==n&&1==t.nodeType?(e.unshift(function(t){var e=t.parentNode&&9==t.parentNode.nodeType?-1:function(t){if(!t.parentNode)return-1;for(var e=0,n=t.tagName,r=t.parentNode.children,i=0;i<r.length;i++)if(r[i].tagName===n){if(t===r[i])return e;e++}return-1}(t);return t.getAttribute&&t.getAttribute("id")&&/^[A-Za-z][-A-Za-z0-9_:.]*$/.test(t.getAttribute("id"))?"#"+t.getAttribute("id"):t.tagName.toLowerCase()+(~e?":nth-of-type("+(e+1)+")":"")}(t)),t.getAttribute&&t.getAttribute("id")&&/^[A-Za-z][-A-Za-z0-9_:.]*$/.test(t.getAttribute("id"))?e.join(" > "):g(t.parentNode,e)):(e.unshift("body"),e.join(" > "))}function _(t,e){return t.currentStyle?t.currentStyle[e]:t.ownerDocument.defaultView.getComputedStyle(t,null).getPropertyValue(e)}function m(t){var e=t.childNodes,n="",i=!1;return r.each(e,(function(t){!1===i&&3===t.nodeType&&(r.isString(t.textContent)||r.isString(t.innerText)||r.isString(t.nodeValue))&&(n=r.trim(t.textContent||t.innerText||t.nodeValue||""),i=!0)})),n}function v(t,e){var n=function(){var t,e={},n=navigator.userAgent.toLowerCase();return(t=n.match(/opera.([\d.]+)/))?e.opera=Number(t[1].split(".")[0]):(t=n.match(/msie ([\d.]+)/))?e.ie=Number(t[1].split(".")[0]):(t=n.match(/edge.([\d.]+)/))?e.edge=Number(t[1].split(".")[0]):(t=n.match(/firefox\/([\d.]+)/))?e.firefox=Number(t[1].split(".")[0]):(t=n.match(/chrome\/([\d.]+)/))?e.chrome=Number(t[1].split(".")[0]):(t=n.match(/version\/([\d.]+).*safari/))?e.safari=Number(t[1].match(/^\d*.\d*/)):(t=n.match(/trident\/([\d.]+)/))&&
2(e.ie=11),e}(),i=n.ie&&n.ie<9,a="";if(r.each(e,(function(t,e){i&&t.indexOf("rgba")>-1&&(t=function(t){var e=t.match(/[\d.]+/g);return e.length>=3?"rgb("+e[0]+","+e[1]+","+e[2]+")":""}(t));var n=e.replace(/[A-Z]+/g,(function(t){return"-"+t.toLowerCase()}));a+=";"+n+": "+t})),""!==a){var o,s,u=t.style,c=u.cssText||"";!c||(";",(s=(o=c).length-1)>=0&&o.indexOf(";",s)==s)||(c+=";"),u.cssText=c+a}}function y(t,e,n){if(n||(n=function(t,e){var n=e.originProps,i={attributes:{}},a=n.attributes;return r.each(a.style||{},(function(e,n){i.attributes.style[n]=_(t,n)})),Object.hasOwnProperty.call(n,"text")&&(i.attributes.text=m(t)),r.each(["src","href"],(function(e){Object.hasOwnProperty.call(a,e)&&(i.attributes[e]=t[e])})),Object.hasOwnProperty.call(a,"target")&&(i.attributes.target=t.getAttribute("target")),i}(t,e)),function(t,e){var n=t.originProps,i=e.originProps,a=n.attributes,o=i.attributes,s=!0;return n.text&&n.text!==i.text&&(s=!1),a&&r.each(["src","href","target"],(function(t){a[t]&&a[t]!==o[t]&&(s=!1)})),s}(e,n)){var i=e.props;r.isObject(i)&&b(t,i)}}function b(t,e){if(Object.hasOwnProperty.call(e,"attributes")){var n=e.attributes;Object.hasOwnProperty.call(n,"style")&&v(t,n.style),r.each(["href","target","src"],(function(e){Object.hasOwnProperty.call(n,e)&&function(t,e,n){t.setAttribute(e,n)}(t,e,n[e])}))}Object.hasOwnProperty.call(e,"text")&&function(t,e){var n=t.childNodes,i=!1;r.each(n,(function(t){3===t.nodeType&&(i||(t.textContent?t.textContent=e:t.innerText?t.innerText=e:t.nodeValue=e,i=!0))}))}(t,e.text)}function w(t){!function(t){t=r.extend({success:function(){},error:function(){},appendCall:function(t){document.getElementsByTagName("head")[0].appendChild(t)}},t);var e=null;"css"===t.type&&((e=document.createElement("link")).rel="stylesheet",e.href=t.url),"js"===t.type&&((e=document.createElement("script")).async="async",e.setAttribute("charset","UTF-8"),e.src=t.url,e.type="text/javascript"),e.onload=e.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(t.success(),e.onload=e.onreadystatechange=null)},e.onerror=function(){t.error(),e.onerror=null},t.appendCall(e)}({success:function(){},error:function(){},type:"js",url:t})}function S(t,e){var n=t.tagName.toLowerCase(),i=function(t,e){var n={};return r.each(e||[],(function(e){var r=e.replace(/[A-Z]+/g,(function(t){return"-"+t.toLowerCase()}));n[e]=_(t,r)})),n}(t,e),a={selector:g(t),originProps:{attributes:{style:i},text:m(t)},type:"text",tagName:n};return"a"===n&&(a.originProps.attributes.href=t.href,t.getAttribute("target")&&(a.originProps.attributes.target=t.getAttribute("target")),a.type="link"),"img"===n&&(a.originProps.attributes.src=t.src,a.type="img"),{originStyle:t.getAttribute("style"),eleInfo:a,ele:t}}function E(t){var e=t.eleInfo,n=t.ele;if(n){var r=t.originStyle;b(n,e.originProps),n.style.cssText=r||""}}function T(){this.enable_visualize=!1,this.vabtest_url=location.protocol+"//static.sensorsdata.cn/sdk/plugin/vabtest/"+n.lib_version+"/vabtest.min.js",this.timeout=500,this.is_editor=!1,this.use_mask=!0,this.originData=[],this.visualExp=null,this.isFirst=!0,this.start_time=null,this.is_have_observer=!1,this.imgLoadingList=[]}n.verifyStore={valueType:function(t,e){switch(e){case"Number":if(r.isNumber(t))return!0;break;case"String":if(r.isString(t))return!0;break;case"Object":if(r.isObject(t))return!0;break;case"Boolean":if(!0===t||!1===t)return!0;break;default:return!1}return!1},para:function(t,e,i){var a={verify_success:!0,para:null};return r.each(i,(function(i,o){if("essential"===i)switch(o){case"param_name":r.isString(e.param_name)&&e.param_name.length>0||(n.error(t+"方法调用失败,param_name参数未正确配置!param_name:",e.param_name),a.verify_success=!1);break;case"value_type":r.isString(e.value_type)&&-1!==r.indexOf(n.value_type_list,e.value_type)||(n.error(t+"方法调用失败,value_type配置错误",e.value_type),a.verify_success=!1);break;case"default_value":void 0===e.default_value?(n.error(t+"方法调用失败,default_value参数未配置"),a.verify_success=!1):n.verifyStore.valueType(e.default_value,e.value_type)||(n.error(t+"方法调用失败,default_value类型必须与value_type一致!",e.default_value,e.value_type),a.verify_success=!1);break;
2case"callback":r.isFunction(e.callback)||(n.error(t+"方法调用失败,callback参数未正确配置"),a.verify_success=!1);break;default:a.verify_success=!1}else if("not_essential"===i)switch(o){case"timeout_milliseconds":e.timeout_milliseconds=e.timeout_milliseconds||n.para.timeout_milliseconds||n.default_para.timeout_milliseconds,(!r.isNumber(e.timeout_milliseconds)||r.isNumber(e.timeout_milliseconds)&&e.timeout_milliseconds<=0)&&(r.log("timeout_milliseconds 参数错误",e.timeout_milliseconds),e.timeout_milliseconds=n.para.timeout_milliseconds),e.timeout_milliseconds<200&&(e.timeout_milliseconds=200);break;case"properties":e.properties=r.isObject(e.properties)?e.properties:{}}})),a.para=e,a}},n.getSA=function(t){return!!(r.isObject(t)&&r.isObject(t.readyState)&&t.readyState.state>=3)&&(this.sd=t,!0)},n.log=function(){if("object"==typeof console&&console.log){r.isString(arguments[0])&&(arguments[0]="sensorsabtest————"+arguments[0]);try{return console.log.apply(console,arguments)}catch(t){console.log(arguments[0])}}},n.error=function(){if("object"==typeof console&&console.error)try{return console.error.apply(console,arguments)}catch(t){console.error(arguments[0])}},n.listenPageState=function(t){({visibleHandle:r.isFunction(t.visible)?t.visible:function(){},hiddenHandler:r.isFunction(t.hidden)?t.hidden:function(){},visibilityChange:null,hidden:null,isSupport:function(){return void 0!==document[this.hidden]},init:function(){void 0!==document.hidden?(this.hidden="hidden",this.visibilityChange="visibilitychange"):void 0!==document.mozHidden?(this.hidden="mozHidden",this.visibilityChange="mozvisibilitychange"):void 0!==document.msHidden?(this.hidden="msHidden",this.visibilityChange="msvisibilitychange"):void 0!==document.webkitHidden&&(this.hidden="webkitHidden",this.visibilityChange="webkitvisibilitychange"),this.listen()},listen:function(){if(this.isSupport()){var t=this;document.addEventListener(t.visibilityChange,(function(){document[t.hidden]?t.hiddenHandler():t.visibleHandle()}),1)}else document.addEventListener?(window.addEventListener("focus",this.visibleHandle,1),window.addEventListener("blur",this.hiddenHandler,1)):(document.attachEvent("onfocusin",this.visibleHandle),document.attachEvent("onfocusout",this.hiddenHandler))}}).init()},n.storage={set:function(t,e){n.state.storage.isSupport&&window.localStorage.setItem(e,t)},get:function(t){var e=null;return n.state.storage.isSupport&&(e=window.localStorage.getItem(t)),e}},n.getStorageData=function(){var t=this.storage.get(n.state.storage.name);r.isString(t)&&(t=function(t){return 0===t.indexOf(h)&&(t=f(t=t.substring(8))),t}(t));try{t=JSON.parse(t)}catch(e){r.log(e)}return t},n.setStorageData=function(t){t=JSON.stringify(t),n.para.encrypt_c
2ookie&&(t=function(t){return h+f(t)}(t)),this.storage.set(t,n.state.storage.name)},n.Mask=function(t){this.attr_name="sa-abtest-"+t,this.remove_timer=null,this.is_added=!1,this.is_abort=!1,this.is_timeout=!1,this.createMaskStyle()},n.Mask.prototype={createMaskStyle:function(){var t="["+this.attr_name+"],["+this.attr_name+"] body{opacity:0 !important;-khtml-opacity:0 !important;-moz-opacity:0;filter:alpha(opacity=0);}",e=document.createElement("style");e.type="text/css";try{e.appendChild(document.createTextNode(t))}catch(r){e.styleSheet.cssText=t}try{document.getElementsByTagName("head")[0].appendChild(e)}catch(r){n.log("error when create calls")}},show:function(t){try{var e=this;if(this.is_abort)return!1;var i=null;if(i=document.getElementsByTagName("html")[0],!r.isElement(i))return;i.setAttribute(this.attr_name,"1"),this.is_added=!0,r.isNumber(t)&&(this.remove_timer=setTimeout((function(){e.is_timeout=!0,e.remove()}),t))}catch(a){n.log("error when show calls")}},remove:function(){try{if(this.is_abort||(this.is_abort=!0),this.is_added){this.is_added=!1;var t=null;if(t=document.getElementsByTagName("html")[0],!r.isElement(t))return;t.removeAttribute(this.attr_name)}this.remove_timer&&(clearTimeout(this.remove_timer),this.remove_timer=null)}catch(e){n.log("error when remove calls")}}},n.asyncFetchABTest=function(){n.error("asyncFetchABTest调用失败,A/B Testing未初始化")},n.fastFetchABTest=function(){n.error("fastFetchABTest调用失败,A/B Testing未初始化")},n.fetchCacheABTest=function(){n.error("fetchCacheABTest调用失败,A/B Testing未初始化")},n.searchLocalExp=function(t){return n.localdata[t]?n.localdata[t]:null},n.getExpResult=function(t,e){var i=t.default_value,a=e||n.searchLocalExp(t.param_name);return r.isObject(a)?r.isObject(a.js_config)&&(a.js_config.type===t.value_type?(i=a.js_config.value,this.triggerHandle(a,t)):r.log("试验结果类型与代码期望类型不一致,param_name:"+t.param_name+",当前返回类型为:"+a.js_config.type+",代码期望类型为:"+t.value_type)):r.log("localdata未查询到试验数据,试验参数名称:"+t.param_name),i},n.resolveVariables=function(t){this.localdata={};var e=this;r.each(t,(function(t){if(r.isObject(t)&&t.variables&&r.isArray(t.variables)){if(t.experiment_type&&"CODE"!==t.experiment_type)return!1;r.each(t.variables,(function(i){r.isObject(i)&&!e.localdata[i.name]&&(e.localdata[i.name]={abtest_experiment_id:t.abtest_experiment_id,abtest_experiment_group_id:t.abtest_experiment_group_id,is_control_group:t.is_control_group,is_white_list:t.is_white_list,value:i.value,type:i.type,js_config:n.getRelativeValue(i.value,i.type),experiment_type:t.experiment_type})}))}}))},n.getRelativeValue=function(t,e){var n={},i={INTEGER:function(t){var e=parseFloat(t);isNaN(e)?r.log("原始数据 INTEGER 类型解析异常",t):(n.value=e,n.type="Number")},STRING:function(t){r.isString(t)?(n.value=t,n.type="String"):r.log("原始数据 STRING 类型解析异常",t)},JSON:function(t){var e=JSON.parse(t);r.isObject(e)?(n.value=e,n.type="Object"):r.log("原始数据 JSON 类型解析异常",t)},BOOLEAN:function(t){"true"===t?(n.value=!0,n.type="Boolean"):"false"===t?(n.value=!1,n.type="Boolean"):r.log("原始数据 BOOLEAN 类型解析异常",t)}};try{i[e]?i[e](t):r.log("试验数据类型解析失败",e,t)}catch(a){r.log(a,t,e)}return n},n.link={isFirst:!0,start_time:null,mask_instance:null,is_filtered_out:!1,para:{timeout:500,use_mask:!0,pass_params:!0,control_link_search:"default",experiment_link_search:"default"},init:function(t){return this.initPara(t),this.para?r.getQueryParam(location.href,"saSDKMultilink")?(this.is_filtered_out=!0,!1):(this.start_time=(new Date).getTime(),this.para.use_mask&&this.initMask(),void this.addSinglePageListener()):(r.log("multilink is closed"),!1)},addSinglePageListener:function(){var t=this;r.addSinglePageEvent((function(e){return e!==location.href&&(t.is_filtered_out=!1,t.isFirst=!0,t.mask_instance&&t.mask_instance.remove(),r.getQueryParam(location.href,"saSDKMultilink")?(t.is_filtered_out=!0,!1):(t.start_time=(new Date).getTime(),t.para.use_mask&&t.initMask(),void t.resolve(n.originalData)))}))},initMask:function(){this.mask_instance=new n.Mask("link"),this.mask_instance.show(this.para.timeout)},initPara:function(t){if(r.isFunction(t))try{t=t()}catch(e){return r.log("link para error!"),void(this.para=!1)}!1===t?this.para=!1:r.isObject(t)&&(this.para.timeout=r.isNumber(t.timeout)&&t.timeout>=0?t.timeout:500,this.para.use_mask=r.isBoolean(t.use_mask)?t.use_mask:this.para.use_mask,this.para.control_link_search=r.isString(t.control_link_search)?t.control_link_search:"default",this.para.experiment_link_search=r.isString(t.experiment_link_search)?t.experiment_link_search:"default",this.para.pass_params=!r.isBoolean(t.pass_params)||t.pass_params)},resolve:function(t){var e=this;if(!this.para)return!1;if(!r.isArray(t))return!1;if(this.is_filtered_out)return!1;if(!this.isFirst)return!1;if(this.isFirst=!1,0===this.para.timeout)return!1;if((new Date).getTime()-this.start_time>this.para.timeout)return r.log("The multilink was stopped because the request timeout"),!1;var n=!1;r.each(t,(function(t){return!!r.isObject(t)&&!n&&"LINK"===t.experiment_type&&void(e.isTriggerLinkExp(t)&&(n=!0,e.redirectUrl(t)))})),!n&&this.para.use_mask&&this.mask_instance&&this.mask_instance.remove()},stopTrigger:function(){this.isFirst=!1,r.log("The multilink was stopped because the request failed"),this.para.use_mask&&this.mask_instance&&this.mask_instance.remove()},isTriggerLinkExp:function(t){return r.isString(t.control_link)&&r.isString(t.link_match_type)?"REGEXP"===t.link_match_type?!!r.checkUrlIsRegexp(t.control_link,t.regexp_flags)||(r.log("多链接试验匹配失败",t.abtest_experiment_id),!1):!!r.checkUrlIsMatch(t.control_link,t.link_match_type)||(r.log("多链接试验匹配失败",t.abtest_experiment_id),!1):(r.log("多链接试验数据异常",t.abtest_experiment_id),!1)},redirectUrl:function(t){if(t.experiment_link&&r.isString(t.experiment_link))if(!0!==t.is_control_group||"STRICT"!==t.link_match_type&&"REGEXP"!==t.link_match_type){var e,i,a=location.href,o=t.experiment_link;if("REGEXP"===t.link_match_type&&/\$\d+/.test(o)){var s=t.regexp_flags?new RegExp(t.control_link,t.regexp_flags):new RegExp(t.control_link);o=a.replace(s,o)}this.para.pass_params?(i=this.getMergedUrl(t.is_control_group,o,a),e=u(i)):(i=this.getMergedUrl(t.is_control_group,o),e=u(i)),e&&(n.triggerHandle(t)?setTimeout((function(){location.href=e}),80):setTimeout((function(){location.href=e}),0),this.mask_instance&&this.mask_instance.remove_timer&&clearTimeout(this.mask_instance.remove_timer))}else n.triggerHandle(t);else r.log("页面跳转失败,experiment_link字段异常",t.abtest_experiment_id);function u(t){return r.secCheck.isHttpUrl(t)?r.secCheck.removeScriptProtocol(t):(r.log("非法URL"),!1)}},getMergedUrl:function(t,e,n){var i="",a="",o="",s={parse_url:null,search:""},u={parse_url:null,search:"",hash:""};function c(t){var e=/([^?#]+)(\?[^#]*)?(#.*)?/.exec(t);if(e)return{host:e[1]||"",search:e[2]||"",hash:e[3]||""}}if(!n||(s.parse_url=c(n),s.parse_url)){if(u.parse_url=c(e),u.parse_url)return n&&("after_hash"===this.para.control_link_search?s.search=l(s.parse_url.hash).search:s.search=s.parse_url.search),t?"after_hash"===this.para.control_link_search?(u.search=l(u.parse_url.hash).search,u.hash=l(u.parse_url.hash).hash):u.search=u.parse_url.search:"after_hash"===this.para.experiment_link_search?(u.search=l(u.parse_url.hash).search,u.hash=l(u.parse_url.hash).hash):u.search=u.parse_url.search,a=n?this.get
2SearchStr(s.search,u.search):this.getSearchStr(u.search),t&&"after_hash"===this.para.control_link_search||!t&&"after_hash"===this.para.experiment_link_search?i=u.hash.length>0?u.parse_url.host+u.parse_url.search+u.hash+a:u.parse_url.search.length>0?u.parse_url.host+u.parse_url.search+"&"+a.substring(1):u.parse_url.host+a:(o="after_hash"===this.para.control_link_search?u.parse_url.hash:n?u.parse_url.hash||s.parse_url.hash:u.parse_url.hash,i=u.parse_url.host+a+o),i;r.log("url 解析失败",e)}else r.log("url 解析失败",n);function l(t){var e={hash:"",search:""};if(!r.isString(t))return e;var n=t.indexOf("?");return n>-1?(e.search=t.slice(n),e.hash=t.slice(0,n)):e.hash=t,e}},getSearchStr:function(t,e){function n(t){var e={};if(!t||!t.length||0!==t.indexOf("?"))return e;if(!(t=t.slice(1)).length)return e;for(var n=t.split("&"),r=0;r<n.length;r++)if(n[r].indexOf("=")<0)e[n[r]]=null;else{var i=n[r].split("=");e[i[0]]=i[1]}return e}var i=n(t),a=n(e),o=r.extend(i,a),s="";if(r.isEmptyObject(o))return"?saSDKMultilink=true";var u=!0;for(var c in o)u?(s+="?",u=!1):s+="&",null!==o[c]?s=s+c+"="+o[c]:s+=c;return s+"&saSDKMultilink=true"}},n.bridgeStore={init:function(t){if(!this.setPara(t))return!1;r.log("A/B Testing SDK 初始化成功"),n.state.storage.name="sawebjssdkabtest_bridge",n.abBridge=new n.sd.JSBridge({type:"abtest",app_call_js:function(t){try{t=r.base64Decode(t)}catch(e){r.log("App数据base64解码异常",t)}try{(t=JSON.parse(t)).message_id&&this.double(t)}catch(e){r.log("App数据解析异常",t)}}}),r.isObject(window.SensorsData_iOS_JS_Bridge)&&window.SensorsData_iOS_JS_Bridge.sensorsdata_abtest_module&&n.abBridge.hasAppBridge()||r.isObject(window.SensorsData_APP_New_H5_Bridge)&&r.isFunction(window.SensorsData_APP_New_H5_Bridge.sensorsdata_abtest_module)&&window.SensorsData_APP_New_H5_Bridge.sensorsdata_abtest_module()&&n.abBridge.hasAppBridge()?n.bridgeState="ab_bridge_ok":n.bridgeState="ab_no_abtest_bridge",n.store.init(this.getResultFromApp,this)},setPara:function(t){var e=n.verifyStore.para("打通初始化",t,{timeout_milliseconds:"not_essential"});return n.para=r.extend({},n.default_para,e.para),r.isBoolean(n.para.collect_bridge_status)||(n.para.collect_bridge_status=!0),r.isNumber(n.para.update_interval)||(n.para.update_interval=6e5),!0===n.sd.para.encrypt_c
2ookie&&(n.para.encrypt_cookie=!0),!0},getResultFromApp:function(t){var e=(t=r.isObject(t)?t:{}).para||{},i=t.suc,a=t.err,o=e.timeout_milliseconds||n.para.timeout_milliseconds;r.log("向App发起试验请求"),"ab_bridge_ok"===n.bridgeState?n.abBridge.requestToApp({data:{properties:e.properties,timeout:o,request_body:{origin_platform:"H5"}},callback:function(t){r.isObject(t)&&r.isObject(t.data)?(r.log("成功获取到 App 端返回的试验数据","data:",t),n.dealResponseData(t.data),i&&i(t)):(r.log("App 端请求失败"),a&&a()),n.fetchData.setNextFetch()},timeout:{time:o,callback:function(){r.log("获取App端数据失败"),a&&a(),n.fetchData.setNextFetch()}}}):a&&(r.log("A/B Testing 打通失败,",n.bridgeState),a())},asyncFetch:function(t){n.bridgeStore.getResultFromApp({para:t,suc:function(e){if(r.isObject(e.properties)&&(t.properties=r.extend(e.properties,t.properties)),"SUCCESS"===e.data.status){var i=n.getExpResult(t);t.callback(i)}else t.callback(t.default_value)},err:function(){t.callback(t.default_value)}})}},n.bridgeStore.methods={asyncFetchABTest:function(t){if(!r.isObject(t))return n.error("asyncFetchABTest调用失败,参数未正确配置"),!1;var e=n.verifyStore.para("asyncFetchABTest",t,{param_name:"essential",value_type:"essential",default_value:"essential",callback:"essential",timeout_milliseconds:"not_essential",properties:"not_essential"});e.verify_success&&(t=e.para,"ab_bridge_ok"===n.bridgeState?n.bridgeStore.asyncFetch(t):t.callback(t.default_value))},fastFetchABTest:function(t){if(!r.isObject(t))return n.error("fastFetchABTest调用失败,参数未正确配置"),!1;var e=n.verifyStore.para("fastFetchABTest",t,{param_name:"essential",value_type:"essential",default_value:"essential",callback:"essential",timeout_milliseconds:"not_essential",properties:"not_essential"});if(e.verify_success){t=e.para;var i=n.searchLocalExp(t.param_name);if(r.isObject(i)){var a=n.getExpResult(t,i);t.callback(a)}else r.log("fastFetchABTest缓存中未读取到数据,发起请求"),"ab_bridge_ok"===n.bridgeState?n.bridgeStore.asyncFetch(t):t.callback(t.default_value)}},fetchCacheABTest:function(t){if(r.isObject(t)){var e=n.verifyStore.para("fetchCacheABTest",t,{param_name:"essential",value_type:"essential",default_value:"essential"});if(e.verify_success)return n.getExpResult(e.para)}else n.error("fetchCacheABTest调用失败,参数未正确配置")}},n.normalStore={init:function(t){if(!this.setPara(t))return!1;n.bridgeState="ab_no_host_bridge",/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)?n.state.platform="H5":n.state.platform="Web",r.log("A/B Testing SDK 初始化成功,试验 URL:",t.url),n.checkSADebug(),n.store.init(this.getResultFromServer,this)},setPara:function(t){if(!r.isString(t.url)||"http"!==t.url.slice(0,4))return r.log("A/B Testing SDK 初始化失败,请使用正确的 URL!"),!1;if("https"===location.protocol.slice(0,5)&&"http:"===t.url.slice(0,5))return r.log("A/B Testing SDK 初始化失败,https 页面必须使用 https 的 URL"),!1;var e=r.getQueryParam(t.url,"project-key");if(!e)return r.log("A/B Testing SDK 初始化失败,请使用正确的 URL(必须包含 project-key)!"),!1;t.project_key=e;var i=n.verifyStore.para("A/B Testing SDK 初始化",t,{timeout_milliseconds:"not_essential"});return n.para=r.extend({},n.default_para,i.para),r.isBoolean(n.para.collect_bridge_status)||(n.para.collect_bridge_status=!0),r.isNumber(n.para.update_interval)||(n.para.update_interval=6e5),!0===n.sd.para.encrypt_c
2ookie&&(n.para.encrypt_cookie=!0),!0},asyncFetch:function(t){n.normalStore.getResultFromServer({para:t,suc:function(e){if(r.isObject(e)&&"SUCCESS"===e.status){var i=n.getExpResult(t);t.callback(i)}else t.callback(t.default_value)},err:function(){t.callback(t.default_value)}})},creatRequestData:function(t){var e="";r.isEmptyObject(n.sd.store._state)||(e=n.sd.store._state._first_id||n.sd.store._state.first_id||n.sd.store._state._distinct_id||n.sd.store._state.distinct_id);var i={anonymous_id:e,platform:n.state.platform,abtest_lib_version:n.lib_version,properties:{$is_first_day:n.sd._.cookie.getNewUser()}};return r.isObject(t.properties)&&(i.properties=r.extend({},i.properties,t.properties)),n.sd.store._state.first_id&&(i.login_id=n.sd.store.getDistinctId()),i},getResultFromServer:function(t){var e,i=(t=r.isObject(t)?t:{}).para||{},a=t.suc,o=t.err,s=this.creatRequestData(i);r.log("向服务端发起试验请求"),e=n.sd.store.getDistinctId(),n.sd._.ajax({url:n.para.url,type:"POST",data:JSON.stringify(s),credentials:!1,contentType:"application/json",timeout:i.timeout_milliseconds||n.para.timeout_milliseconds,cors:!0,success:function(t){n.dealResponseData(t,e),a&&a(t),n.fetchData.setNextFetch()},error:function(t){r.log("服务端请求发送失败",t),o&&o(),n.fetchData.setNextFetch()}})}},n.normalStore.methods={asyncFetchABTest:function(t){if(!r.isObject(t))return n.error("asyncFetchABTest调用失败,参数未正确配置"),!1;var e=n.verifyStore.para("asyncFetchABTest",t,{param_name:"essential",value_type:"essential",default_value:"essential",callback:"essential",timeout_milliseconds:"not_essential",properties:"not_essential"});e.verify_success&&(t=e.para,n.normalStore.asyncFetch(t))},fastFetchABTest:function(t){if(!r.isObject(t))return n.error("fastFetchABTest调用失败,参数未正确配置"),!1;var e=n.verifyStore.para("fastFetchABTest",t,{param_name:"essential",value_type:"essential",default_value:"essential",callback:"essential",timeout_milliseconds:"not_essential",properties:"not_essential"});if(e.verify_success){t=e.para;var i=n.searchLocalExp(t.param_name);if(r.isObject(i)){var a=n.getExpResult(t,i);t.callback(a)}else r.log("fastFetchABTest缓存中未读取到数据,发起请求"),n.normalStore.asyncFetch(t)}},fetchCacheABTest:function(t){if(r.isObject(t)){var e=n.verifyStore.para("fetchCacheABTest",t,{param_name:"essential",value_type:"essential",default_value:"essential"});if(e.verify_success)return n.getExpResult(e.para)}else n.error("fetchCacheABTest调用失败,参数未正确配置")}},window.MutationObserver||(window.MutationObserver=function(t){function e(t){this._watched=[],this._listener=t}function n(e){var n={type:null,target:null,addedNodes:[],removedNodes:[],previousSibling:null,nextSibling:null,attributeName:null,attributeNamespace:null,oldValue:null};for(var r in e)d(n,r)&&e[r]!==t&&(n[r]=e[r]);return n}function r(e,r){var i=s(e,r);return function(a){var c,l=a.length;r.charData&&3===e.nodeType&&e.nodeValue!==i.charData&&a.push(new n({type:"characterData",target:e,oldValue:i.charData})),r.attr&&i.attr&&o(a,e,i.attr,r.afilter),(r.kids||r.descendents)&&(c=function(e,r,i,a){var s;function c(t,r,i,s,u){for(var c,p,h,f=t.length-1,d=-~((f-u)/2);h=t.pop();)c=i[h.i],p=s[h.j],a.kids&&d&&Math.abs(h.i-h.j)>=f&&(e.push(n({type:"childList",target:r,addedNodes:[c],removedNodes:[c],nextSibling:c.nextSibling,previousSibling:c.previousSibling})),d--),a.attr&&p.attr&&o(e,c,p.attr,a.afilter),a.charData&&3===c.nodeType&&c.nodeValue!==p.charData&&e.push(n({type:"characterData",target:c,oldValue:p.charData})),a.descendents&&l(c,p)}function l(r,i){for(var h,d,g,_,m,v,y,b=r.childNodes,w=i.kids,S=b.length,E=w?w.length:0,T=0,A=0,O=0;A<S||O<E;)(v=b[A])===(y=(m=w[O])&&m.node)?(a.attr&&m.attr&&o(e,v,m.attr,a.afilter),a.charData&&m.charData!==t&&v.nodeValue!==m.charData&&e.push(n({type:"characterData",target:v,oldValue:m.charData})),d&&c(d,r,b,w,T),a.descendents&&(v.childNodes.length||m.kids&&m.kids.length)&&l(v,m),A++,O++):(s=!0,h||(h={},d=[]),v&&(h[g=p(v)]||(h[g]=!0,-1===(_=u(w,v,O))?a.kids&&(e.push(n({type:"childList",target:r,addedNodes:[v],nextSibling:v.nextSibling,previousSibling:v.previousSibling})),T++):d.push({i:A,j:_})),A++),y&&y!==b[A]&&(h[g=p(y)]||(h[g]=!0,-1===(_=f(b,y,A))?a.kids&&(e.push(n({type:"childList",target:i.node,removedNodes:[y],nextSibling:w[O+1],previousSibling:w[O-1]})),T--):d.push({i:_,j:O})),O++));d&&c(d,r,b,w,T)}return l(r,i),s}(a,e,i,r)),(c||a.length!==l)&&(i=s(e,r))}}e._period=30,e.prototype={observe:function(t,n){for(var i,a={attr:!!(n.attributes||n.attributeFilter||n.attributeOldValue),kids:!!n.childList,descendents:!!n.subtree,charData:!(!n.characterData&&!n.characterDataOldValue)},o=this._watched,s=0;s<o.length;s++)o[s].tar===t&&o.splice(s,1);n.attributeFilter&&(a.afilter=h(n.attributeFilter,(function(t,e){return t[e]=!0,t}),{})),o.push({tar:t,fn:r(t,a)}),this._timeout||(i=this,function t(){var n=i.takeRecords();n.length&&i._listener(n,i),i._timeout=setTimeout(t,e._period)}())},takeRecords:function(){for(var t=[],e=this._watched,n=0;n<e.length;n++)e[n].fn(t);return t},disconnect:function(){this._watched=[],clearTimeout(this._timeout),this._timeout=null}};var i=document.createElement("i");i.style.top=0;var a=(i="null"!=i.attributes.style.value)?function(t,e){return e.value}:function(t,e){return"style"!==e.name?e.value:t.style.cssText};function o(t,e,r,i){for(var o,s,u={},c=e.attributes,l=c.length;l--;)s=(o=c[l]).name,i&&!d(i,s)||(a(e,o)!==r[s]&&t.push(n({type:"attributes",target:e,attributeName:s,oldValue:r[s],attributeNamespace:o.namespaceURI})),u[s]=!0);for(s in r)u[s]||t.push(n({target:e,type:"attributes",attributeName:s,oldValue:r[s]}))}function s(t,e){var n=!0;return function t(r){var i={node:r};return!e.charData||3!==r.nodeType&&8!==r.nodeType?(e.attr&&n&&1===r.nodeType&&(i.attr=h(r.attributes,(function(t,n){return e.afilter&&!e.afilter[n.name]||(t[n.name]=a(r,n)),t}),{})),n&&(e.kids||e.charData||e.attr&&e.descendents)&&(i.kids=function(t,e){for(var n=[],r=0;r<t.length;r++)n[r]=e(t[r],r,t);return n}
2(r.childNodes,t)),n=e.descendents):i.charData=r.nodeValue,i}(t)}function u(t,e,n){return f(t,e,n,"node")}var c=1,l="mo_id";function p(t){try{return t.id||(t[l]=t[l]||c++)}catch(e){try{return t.nodeValue}catch(n){return c++}}}function h(t,e,n){for(var r=0;r<t.length;r++)n=e(n,t[r],r,t);return n}function f(t,e,n,r){for(;n<t.length;n++)if((r?t[n][r]:t[n])===e)return n;return-1}function d(e,n){return e[n]!==t}return e}(void 0)),Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var e=Array.prototype.slice.call(arguments,1),n=this,r=function(){},i=function(){return n.apply(this instanceof r&&t?this:t,e.concat(Array.prototype.slice.call(arguments)))};return r.prototype=this.prototype,i.prototype=new r,i}),T.prototype.init=function(t){this.initPara(t),!1!==this.enable_visualize&&(window.self!==window.top&&function(){if(!window.name)return!1;try{var t=JSON.parse(decodeURIComponent(window.name||"")),e=t.is_vabtesting,n=t.source_url,i=t.link_match_type;return!(!0!==e||!r.checkUrlIsMatch(n,i))||(r.log("A/B Testing SDK 页面地址,与当前实验 URL 不匹配,请使用正确的 URL!"),!1)}catch(a){return!1}}()?(this.is_editor=!0,w(this.vabtest_url)):(this.start_time=(new Date).getTime(),this.use_mask&&this.initMask(),this.addSinglePageListener()))},T.prototype.initPara=function(t){if(r.isFunction(t))try{t=t()}catch(n){return r.log("ABTesting SDK  !"),void(this.para=!1)}if(r.isObject(t)){Object.prototype.hasOwnProperty.call(t,"enable_visualize")&&r.isBoolean(t.enable_visualize)?this.enable_visualize=t.enable_visualize:r.log("ABTesting SDK 初始化参数 enable_visualize 格式不正确。 类型应为 Boolean"),this.use_mask=r.isBoolean(t.use_mask)?t.use_mask:this.use_mask,this.timeout=r.isNumber(t.timeout)&&t.timeout>=0?t.timeout:this.timeout;var e=r.isString(t.vabtest_url)?t.vabtest_url:"";e&&("https:"===location.protocol?"https:"===e.slice(0,6)?this.vabtest_url=e:r.log("ABTesting SDK 初始化参数 vabtest_url 协议头应设置为 https"):"http:"===e.slice(0,5)||"https:"===e.slice(0,6)?this.vabtest_url=e:r.log("ABTesting SDK 初始化参数 vabtest_url 应设置为有效 URL"))}else this.para=!1},T.prototype.resolve=function(t){if(!1!==this.enable_visualize&&!0!==this.is_editor&&!1!==this.isFirst){if((new Date).getTime()-this.start_time>this.timeout)return r.log("请求实验结果超时,A/B 可视化实验失败!"),!1;var e=this;this.isFirst=!1;var n=!1;r.each(t,(function(t){if(!r.isObject(t)||"VISUAL"!==t.experiment_type)return!1;if(n)return!1;var i=t.experiment_value;if(!r.isArray(i))try{i=JSON.parse(t.experiment_value),t.experiment_value=i}catch(a){return!1}e.isTriggerVisualExp(t)&&(n=!0,e.prepareResource(t,e.render.bind(e)),e.visualExp=t)})),!n&&this.use_mask&&this.destroyMask(),d(window,(function(){!function(t){new(0,window.MutationObserver)(t).observe(document.body,{childList:!0,subtree:!0})}(e.observerCallback.bind(e))}))}},T.prototype.initMask=function(){this.mask_instance=new n.Mask("vabtest"),this.mask_instance.show(this.timeout)},T.prototype.destroyMask=function(){this.mask_instance&&this.mask_instance.remove()},T.prototype.prepareResource=function(t,e){var n=this,i=t.experiment_value;r.isArray(i)&&(r.each(i,(function(i){var a=i.tagName,o=i.props;if("img"===a&&o&&o.attributes&&r.isString(o.attributes.src)){var s=o.attributes.src;n.imgLoadingList.push(s);var u=document.createElement("img");u.width=1,u.height=1,u.onload=c,u.onerror=c,u.onabort=c,u.src=o.attributes.src}function c(){var r=n.imgLoadingList.indexOf(s);r>-1&&n.imgLoadingList.splice(r,1),0===n.imgLoadingList.length&&e(t)}})),0===this.imgLoadingList.length&&e(t))},T.prototype.render=function(t){var e=this;d(window,(function(){if(e.use_mask&&e.mask_instance&&!0===e.mask_instance.is_timeout)r.log("渲染实验结果超时,A/B 可视化实验失败!");else{n.triggerHandle(t);var i=t.experiment_value;r.isArray(i)&&r.each(i,(function(t){var n=function(t){if(!r.isString(t))return null;var e,n=t.split(">");return(e=function t(e){var i,a=n.shift();if(!a)return e;try{i=function(t,e){var n;if("body"===(t=r.trim(t)))return document.getElementsByTagName("body")[0];if(0===t.indexOf("#"))t=t.slice(1),n=document.getElementById(t);else if(t.indexOf(":nth-of-type")>
2-1){var i=t.split(":nth-of-type");if(!i[0]||!i[1])return null;var a=i[0],o=i[1].match(/\(([0-9]+)\)/);if(!o||!o[1])return null;var s=Number(o[1]);if(!(r.isElement(e)&&e.children&&e.children.length>0))return null;for(var u=e.children,c=0;c<u.length;c++)if(r.isElement(u[c])&&u[c].tagName.toLowerCase()===a&&0==--s){n=u[c];break}if(s>0)return null}return n||null}(a,e)}catch(o){i=null}return i&&r.isElement(i)?t(i):null}())&&r.isElement(e)?e:null}(t.selector);if(n)try{var i=S(n,[]);y(n,t,i.eleInfo),e.originData.push(i)}catch(a){}})),e.use_mask&&e.destroyMask()}}))},T.prototype.restoreElements=function(){r.each(this.originData,(function(t){E(t)})),this.visualExp=null,this.isFirst=!0,this.start_time=(new Date).getTime(),this.originData=[]},T.prototype.addSinglePageListener=function(){var t=this;r.addSinglePageEvent((function(e){if(e===location.href)return!1;t.isFirst=!0,t.mask_instance&&t.destroyMask(),t.start_time=(new Date).getTime(),t.use_mask&&t.initMask(),t.restoreElements(),t.resolve(n.originalData)}))},T.prototype.observerCallback=function(){this.visualExp&&(r.each(this.originData,(function(t){E(t)})),this.originData=[],this.render(this.visualExp))},T.prototype.stopTrigger=function(){this.isFirst=!1,r.log("请求实验结果失败,A/B 可视化实验失败!"),this.use_mask&&this.destroyMask()},T.prototype.isTriggerVisualExp=function(t){return r.isString(t.control_link)&&r.isString(t.link_match_type)?!!r.checkUrlIsMatch(t.control_link,t.link_match_type)||(r.log("可视化试验匹配失败",t.abtest_experiment_id),!1):(r.log("可视化试验数据异常",t.abtest_experiment_id),!1)};var A=new T;n.dealResponseData=function(t,e){r.isObject(t)?"SUCCESS"===t.status?r.isArray(t.results)&&(this.originalData=t.results,this.updateLocalData(t.results,e)):"FAILED"===t.status&&r.log("获取试验失败:error_type:"+t.error_type+",error:"+t.error):r.log("试验数据解析失败,response :",t)},n.updateLocalData=function(t,e){this.analyzeData(t),this.updateStorage(e),r.log("更新试验数据成功")},n.updateStorage=function(t){var e=(new Date).getTime(),r={data:this.originalData,updateTime:e,triggerList:this.triggerList,distinct_id:t||n.sd.store.getDistinctId()};this.setStorageData(r),this.updateTime=e},n.analyzeData=function(t){if(!r.isArray(t))return r.log("解析——数据格式错误",t),!1;n.link.resolve(t),A.resolve(t),n.resolveVariables(t)},n.triggerHandle=function(t,e){var i=r.isObject(e)&&r.isObject(e.properties)?e.properties:{},a=n.trackTestTrigger(t,i),o=t.abtest_experiment_id;if(r.isString(o)){var s=n.sd.store.getDistinctId();this.triggerList[s]&&r.isArray(this.triggerList[s])?(this.triggerList[s].push(o),this.triggerList[s]=r.unique(this.triggerList[s])):this.triggerList[s]=[o],this.updateStorage()}return a},n.trackTestTrigger=function(t,e){var i=n.sd.store.getDistinctId(),a=!0,o=!0;if(e=r.isObject(e)?e:{},!t.is_white_list){this.triggerList&&r.isObject(this.triggerList)&&("{}"!==JSON.stringify(this.triggerList)&&(o=!1),this.triggerList[i]&&r.isArray(this.triggerList[i])&&r.each(this.triggerList[i],(function(e){e===t.abtest_experiment_id&&(a=!1)})));var s={$abtest_experiment_id:t.abtest_experiment_id,$abtest_experiment_group_id:t.abtest_experiment_group_id};if(n.para.collect_bridge_status&&(s.$sdk_bridge_status=n.bridgeState),o){var u="web_abtesting:"+this.lib_version;s.$lib_plugin_version=[u]}var c=r.extend(s,e);return a&&this.sd.track("$ABTestTrigger",c),this.sd.track("WebABTestTrigger",c),a}},n.checkSADebug=function(){var t=r.getQueryParam(location.href,"sensors_abtest_url"),e=r.getQueryParam(location.href,"feature_code"),i=+r.getQueryParam(location.href,"account_id");if(t.length&&e.length&&r.isNumber(i)&&0!==i){var a={distinct_id:n.sd.store.getDistinctId(),feature_code:e,account_id:i};n.sd._.ajax({url:t,type:"POST",data:JSON.stringify(a),credentials:!1,contentType:"application/json",timeout:n.para.timeout_milliseconds,cors:!0,success:function(){},error:function(t){r.log("distinct_id发送失败,err:",t)}})}},n.initMethods=function(t){r.each(["asyncFetchABTest","fastFetchABTest","fetchCacheABTest"],(function(e){n[e]=t.methods[e]}))},n.fetchData={timer:null,method:null,context:null,init:function(t,e){this.method=t,this.context=e,this.start(!0)},getServerData:function(t){t?this.method.call(this.context,{suc:function(e){t&&("ab_bridge_ok"===n.bridgeState&&(e=e.data),r.isObject(e)&&"SUCCESS"===e.status&&r.isArray(e.results)||(n.link.stopTrigger(),A.stopTrigger()))},err:function(){t&&(n.link.stopTrigger(),A.stopTrigger())}}):this.method.call(this.context)},setNextFetch:function(t){var e=this,r=t||n.para.update_interval;this.clearFetchTimer(this.timer),this.timer=setTimeout((function(){e.getServerData()}),r)}
2,start:function(t){var e=null,i=(new Date).getTime(),a=n.getStorageData(),o=n.sd.store.getDistinctId();if(a&&r.isObject(a)&&a.distinct_id===o)if(e=a.updateTime,t&&(n.originalData=a.data,e&&r.isNumber(e)&&i-e>0&&i-e<n.para.session_limit&&r.isObject(a.triggerList)&&(n.triggerList=a.triggerList),n.analyzeData(a.data)),e&&r.isNumber(e)&&i-e>0&&i-e<n.para.update_interval){r.log("数据不更新",e,i);var s=i-e,u=n.para.update_interval-s;this.setNextFetch(u)}else r.log("缓存数据超时",e,i),this.getServerData(t);else(e=n.updateTime)&&r.isNumber(e)&&i-e>0&&i-e<n.para.update_interval?r.log("数据不更新",e,i):this.getServerData(t)},stop:function(){r.log("清空拉取定时器"),this.clearFetchTimer()},clearFetchTimer:function(){clearTimeout(this.timer),this.timer=null}},n.store={init:function(t,e){n.fetchData.init(t,e),n.initMethods(e),n.listenPageState({visible:function(){r.log("页面显示"),n.fetchData.start()},hidden:function(){n.fetchData.stop()}}),n.sd.events.on("changeDistinctId",(function(t){n.localdata={},n.originalData=[],A.restoreElements(),n.updateStorage(),n.fetchData.getServerData()})),n.sd.events.isReady()}},n.init=function(t,e){return this.sd?(this.log("A/B Testing SDK 重复初始化!只有第一次初始化有效!"),!1):(r.log=function(){return r.isString(arguments[0])&&(arguments[0]="sensorsabtest————"+arguments[0]),t.log.apply(this,arguments)},this.getSA(t)?r.isObject(e)?("object"==typeof localStorage&&this.sd._.localStorage.isSupport()||(r.log("localstorage异常"),this.state.storage.isSupport=!1),this.abtestingPara=e,void this.initTest()):(r.log("A/B Testing SDK 初始化失败,请传入正确的初始化参数!para:",e),!1):(this.log("A/B Testing 初始化失败,Web JS SDK 没有初始化完成"),!1))},n.initTest=function(){this.link.init(this.abtestingPara.multilink),A.init(this.abtestingPara.visualize),this.sd.bridge.is_verify_success?this.bridgeStore.init(this.abtestingPara):this.normalStore.init(this.abtestingPara)},window.SensorsDataWebJSSDKPlugin&&"[object Object]"==Object.prototype.toString.call(window.SensorsDataWebJSSDKPlugin)?window.SensorsDataWebJSSDKPlugin.SensorsABTest=window.SensorsDataWebJSSDKPlugin.SensorsABTest||n:window.SensorsDataWebJSSDKPlugin={SensorsABTest:n},e.A=n},32440:function(t,e,n){"use strict";n.r(e);var r={sa:{},info:{},lib_version:"0.4.3",defaultPara:{platform:"H5",preload_image:!0,encrypt_cookie:!1},serverData:{},localData:{global_popup_count:[],local_update_time:null,eventQueue:[],update_time:null},eventRule:{},convertPlans:[],isRun:!1,setArg:function(t){var e={};if(t&&"[object Object]"===Object.prototype.toString.call(t)){for(var n in t)n&&"popup_window_content"!==n&&(e[n]=t[n]);return JSON.stringify(e,null,"  ")}return t},log:function(){if(!0===r.info.show_log&&"object"==typeof console&&"function"==typeof console.log)try{return arguments[0]=r.setArg(arguments[0]),arguments[1]=r.setArg(arguments[1]),console.log.apply(console,arguments)}catch(t){console.log(arguments[0])}},config:{storageName:"sensorsdata202002-popupdata",loadedSign:"SensorsData2015JSSDKH5PopupIsLoad"}},i={visibility:function(t){var e={hidden:void 0,visibilityChange:void 0,isSupported:function(){return void 0!==this.hidden},_visible:(t=t||{}).onVisible,_hidden:t.onHidden,_nativeSwitch:function(){!0===document[this.hidden]?this._hidden():this._visible()},listen:function(){try{this.isSupported()?document.addEventListener(this.visibilityChange,(function(){e._nativeSwitch.apply(e,arguments)}),1):document.addEventListener?(window.addEventListener("focus",this._visible,1),window.addEventListener("blur",this._hidden,1)):(document.attachEvent("onfocusin",this._visible),document.attachEvent("onfocusout",this._hidden))}catch(t){}},init:function(){void 0!==document.hidden?(this.hidden="hidden",this.visibilityChange="visibilitychange"):void 0!==document.mozHidden?(this.hidden="mozHidden",this.visibilityChange="mozvisibilitychange"):void 0!==document.msHidden?(this.hidden="msHidden",this.visibilityChange="msvisibilitychange"):void 0!==document.webkitHidden&&(this.hidden="webkitHidden",this.visibilityChange="webkitvisibilitychange"),this.listen()}};e.init()},getRgba:function(t){return"object"!=typeof t?t:"rgba("+t.r+","+t.g+","+t.b+","+t.a+")"},conversionNum:function(t){if(t){if(/^[0|1]?\.\d+$/.test(t))return 100*Number(t)+"%";var e=/^(-?\d+(\.\d+)?)px$/.exec(t);return e?(Number(e[1])/375*window.screen.width).toFixed(2)+"px":t}},boxModel:function(t){return function(e){if("object"!=typeof e)return t+":"+e+";";var n="";for(var r in e)n+=t+"-"+r+":"+i.conversionNum(e[r])+";";return n}},localStorage:{get:function(t){return window.localStorage.getItem(t)},parse:function(t){var e=null;try{e=JSON.parse(i.localStorage.get(t))||null}catch(n){}return e},set:function(t,e){window.localStorage.setItem(t,e)},remove:function(t){window.localStorage.removeItem(t)},isSupport:function(){var t=!0;try{var e="__sensorsdatasupport__",n="testIsSupportStorage";i.localStorage.set(e,n),i.localStorage.get(e)!==n&&(t=!1),i.localStorage.remove(e)}catch(r){t=!1}return t}},addEvent:function(){function t(e){return e&&(e.preventDefault=t.preventDefault,e.stopPropagation=t.stopPropagation,e._getPath=t._getPath),e}t._getPath=function(){var t=this;return this.path||this.composedPath&&this.composedPath()||function(){try{var e=t.target,n=[e];if(null===e||null===e.parentElement)return[];for(;null!==e.parentElement;)e=e.parentElement,n.unshift(e);return n}catch(r){return[]}}()},t.preventDefault=function(){this.returnValue=!1},t.stopPropagation=function(){this.cancelBubble=!0},function(e,n,r){if(e&&e.addEventListener)e.addEventListener(n,(function(e){e._getPath=t._getPath,r.call(this,e)}),!1);else{var i="on"+n,a=e[i];e[i]=function(e,n,r){return function(i){if(i=i||t(window.event)){i.target=i.srcElement;var a,o,s=!0;return"function"==typeof r&&(a=r(i)),o=n.call(e,i),!1!==a&&!1!==o||(s=!1),s}}}(e,r,a)}}.apply(null,arguments)},extend:function(t){var e=Array.prototype.slice;
vendor: 8,653 bytes, line 2
2return i.each(e.call(arguments,1),(function(e){for(var n in e)void 0!==e[n]&&(t[n]=e[n])})),t},extend2Lev:function(t){return i.each(Array.prototype.slice.call(arguments,1),(function(e){for(var n in e)void 0!==e[n]&&(i.isObject(e[n])&&i.isObject(t[n])?i.extend(t[n],e[n]):t[n]=e[n])})),t},each:function(t,e,n){var r=Object.prototype.hasOwnProperty,i=Array.prototype.forEach,a={};if(null==t)return!1;if(i&&t.forEach===i)t.forEach(e,n);else if(t.length===+t.length){for(var o=0,s=t.length;o<s;o++)if(o in t&&e.call(n,t[o],o,t)===a)return!1}else for(var u in t)if(r.call(t,u)&&e.call(n,t[u],u,t)===a)return!1},xhr:function(t){if(t)return void 0!==window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest?new XMLHttpRequest:"undefined"!=typeof XDomainRequest?new XDomainRequest:null;if(void 0!==window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}},ajax:function(t){function e(t){if(!t)return"";try{return JSON.parse(t)}catch(e){return{}}}t.timeout=t.timeout||2e4,t.credentials=void 0===t.credentials||t.credentials;var n=i.xhr(t.cors);if(!n)return!1;t.type||(t.type=t.data?"POST":"GET");var r,a=(t=i.extend({success:function(){},error:function(){}},t)).success,o=t.error;t.success=function(t){a(t),r&&(clearTimeout(r),r=null)},t.error=function(t){o(t),r&&(clearTimeout(r),r=null)},r=setTimeout((function(){!function(){try{i.isObject(n)&&n.abort&&n.abort()}catch(e){sd.log(e)}r&&(clearTimeout(r),r=null,t.error&&t.error(),n.onreadystatechange=null,n.onload=null,n.onerror=null)}()}),t.timeout),"undefined"!=typeof XDomainRequest&&n instanceof XDomainRequest&&(n.onload=function(){t.success&&t.success(e(n.responseText)),n.onreadystatechange=null,n.onload=null,n.onerror=null},n.onerror=function(){t.error&&t.error(e(n.responseText),n.status),n.onreadystatechange=null,n.onerror=null,n.onload=null}),n.onreadystatechange=function(){try{4==n.readyState&&(n.status>=200&&n.status<300||304==n.status?t.success(e(n.responseText)):t.error(e(n.responseText),n.status),n.onreadystatechange=null,n.onload=null)}catch(r){n.onreadystatechange=null,n.onload=null}},n.open(t.type,t.url,!0);try{t.credentials&&(n.withCredentials=!0),i.isObject(t.header)&&i.each(t.header,(function(t,e){n.setRequestHeader&&n.setRequestHeader(e,t)})),t.data&&(t.cors||n.setRequestHeader&&n.setRequestHeader("X-Requested-With","XMLHttpRequest"),"application/json"===t.contentType?n.setRequestHeader&&n.setRequestHeader("Content-type","application/json; charset=UTF-8"):n.setRequestHeader&&n.setRequestHeader("Content-type","application/x-www-form-urlencoded"))}catch(s){sd.log(s)}n.send(t.data||null)},getUuid:function(){var t=function(){return Math.random().toString(16).replace(".","")};return function(){var e=function(){for(var t=1*new Date,e=0;t==1*new Date;)e++;return t.toString(16)+e.toString(16)}()+"-"+t()+"-"+t();return e||(String(Math.random())+String(Math.random())+String(Math.random())).slice(2,15)}},trim:function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},isEmptyObject:function(t){var e=Object.prototype.hasOwnProperty;if(i.isObject(t)){for(var n in t)if(e.call(t,n))return!1;return!0}return!1},filter:function(t,e,n){var r=Object.prototype.hasOwnProperty;if(t.filter)return t.filter(e);for(var i=[],a=0;a<t.length;a++)if(r.call(t,a)){var o=t[a];e.call(n,o,a,t)&&i.push(o)}return i},isObject:function(t){return null!=t&&"[object Object]"==Object.prototype.toString.call(t)},getConvertNumberValue:function(t){return i.isString(t)&&(t=Number(t)),Math.floor(1e3*t)/1e3},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},isString:function(t){return"[object String]"==Object.prototype.toString.call(t)},isDate:function(t){return"[object Date]"==Object.prototype.toString.call(t)},isBoolean:function(t){return"[object Boolean]"==Object.prototype.toString.call(t)},isNumber:function(t){return"[object Number]"==Object.prototype.toString.call(t)&&/[\d\.]+/.test(String(t))},isFunction:function(t){if(!t)return!1;var e=Object.prototype.toString.call(t);return"[object Function]"==e||"[object AsyncFunction]"==e},getURLSearchParams:function(t){for(var e=function(t){return decodeURIComponent(t)},n={},r=(t=t||"").substring(1).split("&"),i=0;i<r.length;i++){var a=r[i].indexOf("=");if(-1!==a){var o=r[i].substring(0,a),s=r[i].substring(a+1);o=e(o),s=e(s),n[o]=s}}return n},URL:function(t){var e,n={},r=["hash","host","hostname","href","origin","password","pathname","port","protocol","search","username"];if("function"==typeof window.URL&&function(){try{return"http://modernizr.com/"===new URL("http://modernizr.com/").href}catch(t){return!1}}())(n=new URL(t)).searchParams||(n.searchParams=(e=i.getURLSearchParams(n.search),{get:function(t){return e[t]}}));else{if(!1===/^https?:\/\/.+/.test(t))throw"Invalid URL";var a=document.createElement("a");a.href=t;for(var o=r.length-1;o>=0;o--){var s=r[o];n[s]=a[s]}n.hostname&&"string"==typeof n.pathname&&0!==n.pathname.indexOf("/")&&(n.pathname="/"+n.pathname),n.searchParams=function(){var t=i.getURLSearchParams(n.search);return{get:function(e){return t[e]}}}()}return n},contentLoaded:function(t,e){var n=!1,r=!0,a=t.document,o=a.documentElement,s=a.addEventListener,u=s?"addEventListener":"attachEvent",c=s?"removeEventListener":"detachEvent",l=s?"":"on",p=function(r){"readystatechange"==r.type&&"complete"!=a.readyState||(("load"==r.type?t:a)[c](l+r.type,p,!1),!n&&(n=!0)&&e.call(t,r.type||r))},h=function(){try{o.doScroll("left")}catch(t){return void setTimeout(h,50)}p("poll")};if("complete"==a.readyState)e.call(t,"lazy");else{if(!s&&o.doScroll){try{r=!t.frameElement}catch(i){}r&&h()}a[u](l+"DOMContentLoaded",p,!1),a[u](l+"readystatechange",p,!1),t[u](l+"load",p,!1)}},indexOf:function(t,e){var n=t.indexOf;if(n)return n.call(t,e);for(var r=0;r<t.length;r++)if(e===t[r])return r;return-1}};r._=i,r.isSupportPopup=function(){return i.localStorage.isSupport()},r.listenPageStateChange=function(){var t=!0;i.visibility({onVisible:function(){r.log("页面触发visible-",(new Date).getMinutes(),"分",(new Date).getSeconds()),!1===t&&(r.updateDataAndSetListen.startState(),t=!0)},onHidden:function(){r.log("页面触发hidden-",(new Date).getMinutes(),"分",(new Date).getSeconds()),!0===t&&(r.updateDataAndSetListen.stopAllState(),t=!1)}})},r.getWebSDK=function(){return!!(i.isObject(window.sensorsDataAnalytic201505)&&i.isObject(window.sensorsDataAnalytic201505.readyState)&&window.sensorsDataAnalytic201505.readyState.state>=3)&&window.sensorsDataAnalytic201505},r.getPopupInfo=function(t){if(!i.isObject(t)||!i.isObject(t.template))return{};var e={$sf_msg_title:"",$sf_msg_content:"",$sf_msg_image_url:""};return function t(n){i.each(n.subviews,(function(n){var r=n.properties||{};"title"===r.msgType?e.$sf_msg_title=r.text:"content"===r.msgType?e.$sf_msg_content=r.text:"image"===n.type&&(e.$sf_msg_image_url=r.image),n.subviews&&t(n)}))}(t.template),e},r.getSFCampaign=function(t){t=i.isObject(t)?t:{};var e={planId:"",name:"",content:null,type:""};return e.planId=t.plan_id||"",e.name=t.cname||"",e.content=i.isObject(t.popup_window_content)?t.popup_window_content.content:"",e.type=i.isObject(t.popup_window_content)&&t.popup_window_content.popup_type?t.popup_window_content.popup_type:"PRESET",e},r.getImageList=function(t){if(!i.isArray(t))return!1;for(var e,n,r=new RegExp('("(backgroundImage|image)":"(http(s)?://.[^"]*)")',"g"),a=new RegExp('http(s)?://.[^S^"]*'),o={},s=t.length,u=[],c=0;c<s;c++)if(i.isObject(t[c])&&"ACTIVE"===t[c].status.toLocaleUpperCase()&&!0===t[c].is_audience&&(t[c].strategy_id?!1!==t[c].is_trigger:!0!==t[c].is_control_group)&&t[c].popup_window_content&&t[c].popup_window_content.content&&(e=t[c].popup_window_content.content.match(r)))for(var l=0,p=e.length;l<p;l++)(n=e[l].match(a))&&n.length>0&&(o[n[0]]||(o[n[0]]=1));return i.each(o,(function(t,e){u.push(e)})),u},r.setIsLoad=function(){if(window.self===window.top){if(window[r.config.loadedSign])return!1;if(void 0===window[r.config.loadedSign])return window[r.config.loadedSign]=!0,!0}else try{return!window.top[r.config.loadedSign]&&(window.top[r.config.loadedSign]=!0,!0)}catch(t){return r.log("非同域名iframe内嵌不能获取父级窗体内容",t),!0}};var a={close:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAMAAAAPdrEwAAAAe1BMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////NgkbwAAAAKHRSTlMA5if6t/B0UjMSxpAtJB4MBfTr30oY6NjV0r2loZ6XkoaBenFp3UA/LNePaQAAAsxJREFUWMOsltlygzAMRRXMZsAsAZJmX9v6
2/7+wg1QXpjGxCDkvyWTIQZauDcCgzKLrPtnUSyGW9SbZX6OshDcQh36lH6j8MJ7pTZd6lGX6sr0IP7SDj7CA6chLoBkEFzm14nM1/P/2eGti1RZFq+LmdtwGw7afJ1Ue1dogcGCW4QptqCO2OPe1IbnL0Y7dE23wc2bJgSn44MFTvIMwLeMUXqZGfGKUkp+MPC2dwUjMGhWwUL7pnXRUsdbIIpow84VG1k9Xmf1e5U8Kq/R/68memAPqcggTCQUNc9SdL+iCL5jMd0B1j/RErh3LYrRyLa2po2x8KngJ9Uk5sWUwpZoVvIiiulNLhMwgHDhDED2MEH8X3zCDL4HV/R8lRTOEWYS0KWzt8GEm/mNLihpHKOeqJY6yLqDnbO42F1r9eXCzitMOfkuqfvkXTId6h1phSi5/ncbgneAtnDCAxTAzIn+POhfDFOObzAEsNLu0HXO06a4BCwd89wEk1h2ezdwl0rObvS5nNreHurg/lxKwsNPoHjXrHVhI+lMK3xjvMH4YelYzCSzc8V3zrx9CWtu5MG67eWEdhBSmI+GT7eIZt+Nny7YJ+y8ON9/cF1tWVL7LzTdTi6sSMtw9AE432wwl7u6MzqotMNwcM7Glc/TafRyB4+aa4dhdcoV993EDlptphlt3zZ72TgM8N88MDe3vDQWE5V6tWGaKyAbwqaiA5+aZQeETkk6QFtxuvhlaOkVwwxfgdq/IvHKbocBj6ac5OzYCIASBKGo10n+HBgakMswbaYDgTmX3fzgafhD4G+Hhg1cGXnT4PMFHVayCdVcBXGBu7cKwACOOC2YwTsIQ7KI7LBywJrlyByupK9Kw/lto4VFLAqLdmRwJiBDWwjDOI0QPPhPXRn3yTlyrILND4w7oOw3h5AlTPk5U/ddrZSk4RWW+C9hp2rgru6GiP/678n2UFPV1AAAAAElFTkSuQmCC"},o={row:"div",column:"div",label:"pre",image:"img",button:"button",link:"button",image_button:"img"},s={textAlign:"text-align",font:"font-size",backgroundColor:"background-color",borderWidth:function(t){return"border-width: "+t+";border-style: solid;"},borderColor:"border-color",cornerRadius:"border-radius",backgroundImage:function(t){return"background-image:url("+t+");background-repeat: no-repeat;background-size: 100% 100%;"},margin:i.boxModel("margin"),padding:i.boxModel("padding"),maxHeight:"max-height",maxWidth:"max-width",scrollableX:function(t){if(t)return"overflow-x:auto;"},scrollableY:function(t){if(t)return"overflow-y:auto;"}};function u(t){this.properties=t.properties,this.template=t.template,this.maskEle=null,this.containerEle=null,this.msg={$sf_msg_title:"",$sf_msg_content:"",$sf_msg_image_url:"",$sf_succeed:"",$sf_fail_reason:"",$sf_msg_id:"",plan:{}},this.popupCheckInstance=null}u.prototype={constructor:u,render:function(){var t=this;return!document.querySelector("div[data-sf-mask]")&&(t.template.isRoot=!0,t.containerEle=t.createView(t.template),t.maskEle=t.getElement({nodeName:"div",attr:{"data-sensors-click":!0},style:t.getStyle({position:"fixed",width:"100%",height:"100%",top:"0px",left:"0px",backgroundColor:i.getRgba(t.properties.maskColor),"z-index":999998})}),i.addEvent(t.maskEle,"click",(function(e){if(e.target.getAttribute("data-ele-mask")&&t.properties.maskCloseEnabled)return r.track.maskClick(t),!1;r.track.elementClickCallback(e,t)})),t.maskEle.setAttribute("data-sf-mask",!0),t.maskEle.appendChild(t.containerEle),i.contentLoaded(window,(function(){t.appendPopup()})),!0)},appendPopup:function(){if(window.self===window.top)document.body.appendChild(this.maskEle);else try{window.top.document.body.appendChild(this.maskEle)}catch(n){document.body.appendChild(this.maskEle)}var t=document.querySelector("[data-ele-mask] > div"),e=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;t&&t.offsetHeight>e&&(t.style.marginTop="auto")},getElement:function(t){var e=t.nodeName||"div",n=t.style,r=t.attr,a=t.prop,o=t.child,s=t.action,u=t.element_info,c=document.createElement(e);return n&&c.setAttribute("style",n),r&&i.each(r,(function(t,e){t&&c.setAttribute(e,t)})),a&&i.each(a,(function(t,e){t&&(c[e]=t)})),o&&o.length&&i.each(o,(function(t){if(!t)return!1;c.appendChild(t)})),s&&s.H5&&s.H5.length&&c.setAttribute("data-action",JSON.stringify(s.H5)),u&&c.setAttribute("data-info",JSON.stringify(u)),c},getStyle:function(t){var e="",n=["msgType","text","image","name","isHidden","align","localImageName"];return i.each(t,(function(t,r){t=i.conversionNum(t);var a=s[r];if(i.indexOf(n,r)>=0)return!1;i.isString(a)?e+=a+":"+i.getRgba(t)+";":i.isFunction(a)?e+=a(t)+";":e+=r+":"+i.getRgba(t)+";"})),e},createView:function(t){var e=[],n={"box-sizing":"border-box",display:"block","pointer-events":"auto",overflow:"hidden"},r={},s={},u=o[t.type]||null;t.properties=t.properties||{},t.layout=t.layout||{};var c=t.properties.font,l=c?1.7*parseInt(c)+"px":"normal";if(t.properties.isHidden)return!1;switch(t.properties.text?s.innerText=t.properties.text:t.properties.image&&(r["data-sensors-click"]=!0,t.properties.localImageName?r.src=a[t.properties.localImageName]:r.src=t.properties.image),t.isRoot&&(t.layout.margin.top="-40px",i.extend(n,{position:"relative","z-index":999999,"pointer-events":"none"})),t.type){case"row":n.display="flex";break;case"link":i.extend(n,{"text-decoration":"underline",outline:"none","letter-spacing":"1px","line-height":l});break;case"label":i.extend(n,{"white-space":"pre-wrap","word-wrap":"break-word","letter-spacing":"1px","line-height":l,"margin-top":"0px","margin-bottom":"0px"});break;case"button":i.extend(n,{outline:"none","letter-spacing":"1px","line-height":l})}i.extend(n,t.layout,t.properties),t.subviews&&t.subviews.length>0&&i.each(t.subviews,(function(t){e.push(this.createView(t))}),this);var p=this.getElement({element_info:{$sf_msg_element_type:t.type,$sf_msg_element_c
vendor: 15,829 bytes, line 2
2ontent:t.properties.text||""},nodeName:u,attr:r,prop:s,style:this.getStyle(n),child:e,action:t.action});if(t.layout.align){var h=document.createElement("div");return n="display:flex;justify-content:"+{center:"center",left:"flex-start",right:"flex-end"}[t.layout.align]+";",t.isRoot?(n+="width:100%;height:100%;overflow-y:auto;box-sizing: border-box;align-items:center;",h.setAttribute("style",n),h.setAttribute("data-ele-mask",!0)):h.setAttribute("style",n),h.appendChild(p),h}return p},destory:function(){var t=this.msg.plan.plan_id||"";if(window.self===window.top)document.body.removeChild(this.maskEle);else try{window.top.document.body.removeChild(this.maskEle)}catch(e){document.body.removeChild(this.maskEle)}r.info.popup_listener.onClose(t),r.info.popup_campaign_listener.onEnd(r.getSFCampaign(this.msg.plan)),this.popupCheckInstance&&this.popupCheckInstance.resetPopupIntervalWindow()}},r.ElementRender=u,r.handlerCampaign=function(t){var e,n=t,a=i.getUuid()(),o=n.plan.popup_window_content;if(!i.isObject(o))return n.popupFailed(1001,!1,{uuid:a,content:"",plan:n.plan}),!1;if(o.content)try{e=JSON.parse(o.content)}catch(p){r.log(p)}var s=r.getSFCampaign(n.plan),u={state:"",isCustom:!1},c=!0;try{c=r.info.popup_campaign_listener.shouldStart(s)}catch(p){c=!1,r.log(p)}var l={uuid:a,content:e,plan:n.plan};switch(n.plan.strategy_id?n.plan.is_trigger?c?"CUSTOMIZED"===o.popup_type?"withoutCampaignListener"===r.info.supportCustom?u.state="CAMPAIGN_CUSTOMIZED_NULL_LISTENER":"withoutStart"===r.info.supportCustom?u.state="CAMPAIGN_CUSTOMIZED_LISTENER_NULL_START":i.isString(o.content)?u.state="CAMPAIGN_TRIGGER_CUSTOMIZED_START":u.state="DIALOG_NOT_SHOW_JSON_FAILED":"PRESET"===o.popup_type&&i.isObject(e)&&i.isObject(e.properties)&&i.isObject(e.template)?u.state="DIALOG_SHOW":u.state="DIALOG_NOT_SHOW_JSON_FAILED":u.state="CAMPAIGN_NOT_START_LISTENER_START":u.state="CAMPAIGN_NOT_START_TRIGGER":n.plan.is_control_group?u.state="DIALOG_NOT_SHOW":c?i.isObject(e)&&e.properties&&e.template?u.state="DIALOG_SHOW":u.state="DIALOG_NOT_SHOW_JSON_FAILED":u.state="CAMPAIGN_NOT_START_LISTENER_START",u.isCustom=!(!o.popup_type||"CUSTOMIZED"!==o.popup_type),r.log("campaign:",u,"plan:",n.plan.cname),u.state){case"DIALOG_SHOW":n.showPopup(l);break;case"CAMPAIGN_TRIGGER_CUSTOMIZED_START":n.customCampaign(l);break;case"CAMPAIGN_NOT_START_LISTENER_START":n.popupFailed(1004,u.isCustom,l);break;case"CAMPAIGN_CUSTOMIZED_NULL_LISTENER":case"CAMPAIGN_CUSTOMIZED_LISTENER_NULL_START":n.popupFailed(1006,u.isCustom,l);break;case"DIALOG_NOT_SHOW_JSON_FAILED":n.popupFailed(1001,u.isCustom,l);break;case"CAMPAIGN_NOT_START_TRIGGER":n.popupFailed(1005,u.isCustom,l);break;case"DIALOG_NOT_SHOW":n.popupFailed(1003,u.isCustom,l);break;default:r.log("CampaignState异常")}},r.track={getPublicProps:function(t){var e=t.plan,n={$sf_lib_version:r.lib_version,$sf_plan_type:"运营计划",$sf_channel_service_name:"SENSORS_FOCUS",$sf_channel_category:"POPUP",$sf_platform_tag:r.info.platform,$sf_msg_id:t.$sf_msg_id};return i.isEmptyObject(e)||!i.isObject(e)||(n.$sf_plan_id=e.plan_id+"",n.$sf_plan_strategy_id=e.strategy_id?e.strategy_id:e.is_control_group?"-1":"0",e.audience_id&&(n.$sf_audience_id=e.audience_id+"")),n},popupDisplay:function(t){var e={$sf_msg_title:t.$sf_msg_title,$sf_msg_content:t.$sf_msg_content,$sf_msg_image_url:t.$sf_msg_image_url,$sf_succeed:t.$sf_succeed,$sf_fail_reason:t.$sf_fail_reason};this.trackEvent("$PlanPopupDisplay",e,t)},trackEvent:function(t,e,n){var a=r.track.getPublicProps(n);i.extend(e,a),i.each(e,(function(t,n){""!==t&&void 0!==t||delete e[n]})),r.sa.track(t,e)},maskClick:function(t){if(!t.msg)return!1;var e={$sf_close_type:"POPUP_CLOSE_MASK",$sf_msg_title:t.msg.$sf_msg_title,$sf_msg_content:t.msg.$sf_msg_content,$sf_msg_image_url:t.msg.$sf_msg_image_url,$sf_msg_element_type:"mask",$sf_msg_action_id:t.properties.maskActionId};this.trackEvent("$PlanPopupClick",e,t.msg),t.destory()},elementClickCallback:function(t,e){var n=t.target,a=n.getAttribute("data-action"),o=n.getAttribute("data-info"),s=e.msg||{};if(!a)return!1;try{var u=(JSON.parse(a)||{})[0],c=JSON.parse(o)||{}}catch(t){r.log("elementClickCallback error",t)}var l={type:u.type,value:i.isString(u.value)?u.value:"",extra:i.isObject(u.value)?u.value:""},p=e.msg.plan?e.msg.plan.plan_id:"",h={$sf_msg_title:s.$sf_msg_title,$sf_msg_content:s.$sf_msg_content,$sf_msg_image_url:s.$sf_msg_image_url,$sf_msg_element_type:c.$sf_msg_element_type,$sf_msg_element_content:c.$sf_msg_element_content,$sf_msg_element_action:u.type,$sf_msg_action_id:u.id,$sf_close_type:"close"===u.type?u.$sf_close_type:""};this.trackEvent("$PlanPopupClick",h,s);try{r.info.popup_listener.onClick(p,l)}catch(t){r.log("popup_listener.onClick error",t)}if("close"===u.type)e.destory();else if(u.closeable&&e.destory(),"auto"===r.info.popup_listener.openlink&&"openlink"===u.type){if("http"!==u.value.slice(0,4))return!1;window.location.href=u.value}}};var c=r.log;r.changeCovertStatus=function(t){var e=JSON.parse(JSON.stringify(r.convertPlans));i.each(e,(function(e,n){if(!e.is_in_convert_window)return!1;var a=e.is_in_convert_window.step,o=e.is_in_convert_window.uuid;if(r.convertPlans[n].is_in_convert_window.step=Math.min(2*a,6e5),!t)return!1;i.each(t,(function(t){t.popup_display_uuid===o&&t.convert_time&&(c("--转化窗口- 目标事件已经完成 - 满足",r.convertPlans[n].plan_id),delete r.convertPlans[n].is_in_convert_window,r.convertPlans.splice(n,1))}))})),r.updateDataAndSetListen.updateLocalData()},r.asyncConvert=function(t){var e=r.info.project,n=!1;if(!t&&0===r.convertPlans.length)return!1;t&&(i.each(r.convertPlans,(function(e){e.plan_id===t.plan_id&&(n=!0)})),n||r.convertPlans.push(t)),function t(){if(i.isEmptyObject(r.localData)||!i.isArray(r.convertPlans)||0===r.convertPlans.length)return!1;var n=JSON.parse(JSON.stringify(r.convertPlans)),a=n[0].is_in_convert_window&&n[0].is_in_convert_window.step||5e3,o=[];if(i.each(n,(function(t,e){return!!t.is_in_convert_window&&((new Date).getTime()>t.is_in_convert_window.expire_time?(c("--转化窗口超时已经过期 - 满足",r.convertPlans[e].plan_id),delete r.convertPlans[e].is_in_convert_window,r.convertPlans.splice(e,1),r.updateDataAndSetListen.updateLocalData(),!1):(o.push(t.is_in_convert_window.uuid),t.is_in_convert_window.step||(t.is_in_convert_window.step=5e3,r.convertPlans[e].is_in_convert_window.step=5e3),void(a>t.is_in_convert_window.step&&(a=t.is_in_convert_window.step))))})),!o.length)return!1;r.asyncConvert.timer&&clearTimeout(r.asyncConvert.timer),r.asyncConvert.timer=setTimeout((function(){i.ajax({url:r.info.api_base_url+"/sfo/popup_displays?project="+encodeURIComponent(e)+"&popup_display_uuids="+encodeURIComponent(o)+"&time="+(new Date).getTime(),type:"GET",cors:!0,credentials:!1,contentType:"application/json",success:function(e){r.changeCovertStatus(e),t()},error:function(){r.changeCovertStatus(),t()}})}),a)}()},r.ruleTime={getExpire:function(t,e){var n=e,r=Number(t.value)||0,i=Number(t.value)||0,a=String(t.unit).toLowerCase(),o=null,s={day:function(){return(o=new Date(n)).setHours(23),o.setMinutes(59),o.setSeconds(59),o.setMilliseconds(999),o=o.getTime()+864e5*(i-1)},week:function(){var t=(o=new Date(n)).getDay();0===t&&(t=7);var e=7-t;return o.setHours(23),o.setMinutes(59),o.setSeconds(59),o.setMilliseconds(999),o=o.getTime()+24*e*60*60*1e3+7*(i-1)*24*60*60*1e3},month:function(){var t=(o=new Date(n)).getMonth()+i;return t>=11?(o.setFullYear(o.getFullYear()+parseInt(t/12)),o.setMonth(t%12)):o.setMonth(t),o.setDate(1),o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0),o.getTime()},second:function(t){var e={month:2592e6,week:6048e5,day:864e5,hour:36e5,minute:6e4,second:1e3},i=null;return o=new Date(n),t in e&&(i=e[t]*r),o.getTime()+i}};return!0!==t.natural?s.second(a):a in s?s[a]():void 0},getLast:function(t,e){var n=Number(t.value)||0,r=Number(t.value)-1||0,i=String(t.unit).toLowerCase(),a=null,o={day:function(){return(a=new Date(e)).setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a=a.getTime()-864e5*r},week:function(){var t=(a=new Date(e)).getDay();return 0===t&&(t=7),--t,a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a=a.getTime()-(24*t*60*60*1e3+7*r*24*60*60*1e3)},month:function(){var t=(a=new Date(e)).getMonth()+1-r;return t<=0?(a.setFullYear(a.getFullYear()+(parseInt(t/12)-1)),a.setMonth(12+t%12-1)):a.setMonth(t-1),a.setDate(1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.getTime()},second:function(t){var r={month:2592e6,week:6048e5,day:864e5,hour:36e5,minute:6e4,second:1e3},i=null;return a=new Date(e),t in r&&(i=r[t]*n),a.getTime()-i}};return!0!==t.natural?o.second(i):i in o?o[i]():void 0},getArrMatchCount:function(t,e){var n=0;for(n=0;n<t.length;n++)if(e>=t[n])return n;return t.length}},r.eventTriggerProcess=function(){if(!r.updateDataAndSetListen.active_state)return!1;if(!i.isArray(r.localData.eventQueue))return!1;if(0===r.localData.eventQueue.length)return!1;if(r.isRun)return!1;c("事件队列---eventQueue",r.localData.eventQueue);var t=!1,e=r.localData.eventQueue[0],n=r.eventRule[e.event];r.isRun=!0,r.localData.eventQueue.shift(),r.updateDataAndSetListen.updateLocalData(),i.isArray(n)&&i.isObject(n[0])&&n.length>0&&(c("--------------------触发事件开始--------------------"),i.each(n,(function(t){i.isObject(t)&&void 0!==t.match_state&&delete t.match_state,new r.RuleCheck(t,e)})),i.each(n,(function(e){!0===e.match_state?!1===t?(t=!0,c("检查完毕-优先弹窗-开始",e.plan.cname),new r.PopupCheck(e,!0)):!0===t&&(c("检查完毕-非优先弹窗-不渲染",e.plan.cname),new r.PopupCheck(e,!1)):c("检查完毕-计划-不满足",e.plan.cname)})),t||r.completeWindowLifecycle(),c("--------------------触发事件结束--------------------"))},r.completeWindowLifecycle=function(){r.isRun=!1,r.eventTriggerProcess()},r.PopupCheck=function(t,e){this.plan=t.plan,this.current_time=(new Date).getTime(),e?this.renderPopup():this.hidePopup(),r.updateDataAndSetListen.updateLocalData()},r.PopupCheck.prototype.createPopupWindow=function(t,e){this.startConvertWindow(t),this.startPopupIntervalWindow(this.current_time),this.startPopupLimitWindow(),this.setGlobalLimit(),this.deletePlanAllWindow(),e&&r.completeWindowLifecycle()},r.PopupCheck.prototype.hidePopup=function(){this.deletePlanAllWindow()},r.PopupCheck.prototype.renderPopup=function(){r.handlerCampaign(this)},r.PopupCheck.prototype.popupFailed=function(t,e,n){var a={1001:"预览信息解析失败,请检查计划配置",1003:"对照组",1004:"campaignShouldStart 接口返回 false",1005:"计划下发 is_trigger 为 false",1006:"自定义触达计划未实现弹窗生命周期回调"}[t],o=r.getPopupInfo(n.content);o.$sf_msg_id=n.uuid,o.plan=n.plan,o.$sf_succeed=!1,o.$sf_fail_reason=a,r.track.popupDisplay(o),!e&&r.info.popup_listener&&i.isFunction(r.info.popup_listener.onLoadFailed)&&r.info.popup_listener.onLoadFailed(n.plan.plan_id,t,a),r.info.popup_campaign_listener.onFailed(r.getSFCampaign(n.plan),t,a),this.createPopupWindow(n.uuid,!0)},r.PopupCheck.prototype.customCampaign=function(t){var e=r.getSFCampaign(t.plan),n=r.getPopupInfo(t.content);n.$sf_msg_id=t.uuid,n.plan=t.plan,n.$sf_succeed=!0,r.track.popupDisplay(n),r.info.popup_campaign_listener.onStart(e),this.createPopupWindow(t.uuid,!0)},r.PopupCheck.prototype.showPopup=function(t){if(!r.ElementRender)return r.log("暂不支持预置弹窗UI"),!1;var e=new r.ElementRender(t.content),n=r.getPopupInfo(t.content);if(n.$sf_msg_id=t.uuid,n.plan=t.plan,n.$sf_succeed=!0,i.extend(e.msg,n),e.popupCheckInstance=this,r.track.popupDisplay(n),!e.render())return c("当前页面已有一个弹框正在渲染,本次弹框不渲染!"),!1;r.info.popup_campaign_listener.onStart(r.getSFCampaign(t.plan)),this.createPopupWindow(t.uuid),r.info.popup_listener.onLoadSuccess(t.plan.plan_id)},r.PopupCheck.prototype.startConvertWindow=function(t){c("--弹窗展示-转化窗口设置",this.plan.cname),i.isObject(this.plan.convert_window)&&this.plan.convert_window.value&&(this.plan.is_in_convert_window={expire_time:r.ruleTime.getExpire(this.plan.convert_window,this.current_time),start_time:this.current_time,uuid:t},r.asyncConvert(this.plan))},r.PopupCheck.prototype.startPopupIntervalWindow=function(t){i.isObject(this.plan.popup_interval)&&this.plan.popup_interval.value&&(this.plan.is_in_popup_interval_window=r.ruleTime.getExpire(this.plan.popup_interval,t))},r.PopupCheck.prototype.resetPopupIntervalWindow=function(){var t=(new Date).getTime();this.startPopupIntervalWindow(t),this.resetGlobalLimit(t),r.completeWindowLifecycle()},r.PopupCheck.prototype.startPopupLimitWindow=function(){c("--弹窗展示-参与限制窗口设置重置"),i.isObject(this.plan.re_enter)&&this.plan.re_enter.value&&(i.isObject(this.plan.is_in_popup_limit_window)?this.plan.is_in_popup_limit_window.count++:this.plan.is_in_popup_limit_window={expire_time:r.ruleTime.getExpire(this.plan.re_enter,this.current_time),count:1})},r.PopupCheck.prototype.setGlobalLimit=function(){c("--弹窗展示-全局弹窗次数设置"),i.isArray(r.localData.global_popup_count)||(r.localData.global_popup_count=[]),r.localData.global_popup_count.unshift(this.current_time);for(var t=r.localData.global_popup_count,e=t[t.length-1];e+7776e6<this.current_time||t.length>3e3;)t.pop(),e=t[t.length-1]},r.PopupCheck.prototype.resetGlobalLimit=function(t){i.isArray(r.localData.global_popup_count)&&r.localData.global_popup_count.length>0&&(r.localData.global_popup_count.shift(),r.localData.global_popup_count.unshift(t))},r.PopupCheck.prototype.deletePlanAllWindow=function(){var t=this.plan.pattern_popup.matcher_list;i.isArray(t)&&i.each(t,(function(t){t.is_in_window&&(c("--弹窗展示-重置各个规则的窗口计算-成功"),delete t.is_in_window)}))},r.RuleCheck=function(t,e){this.plan_match=t,this.plan=t.plan,this.rule_arr=t.rule,this.event_data=e,this.current_time=(new Date).getTime();var n="-------------检查-计划-("+this.plan.cname+")";i.each(this.rule_arr,(function(t){n+="--包含规则-("+t.event_name+")-触发"+t.params[0]+"次"})),c(n),c(this.plan),this.checkPlanIsExpire(),r.updateDataAndSetListen.updateLocalData()},r.RuleCheck.prototype.checkPlanIsExpire=function(){!this.plan.expire_at||i.isNumber(this.plan.expire_at)&&this.current_time<this.plan.expire_at?(c("--过期-满足",this.plan.cname),this.checkPlanIsAudience()):c("--过期-不满足",this.plan.cname)},r.RuleCheck.prototype.checkPlanIsAudience=function(){!0===this.plan.is_audience?(c("--是否受众-满足",this.plan.cname),this.checkPlanSuspend()):c("--是否受众-不满足",this.plan.cname)},r.RuleCheck.prototype.checkPlanSuspend=function(){this.plan.status&&"SUSPEND"===this.plan.status?c("--暂停-不满足",this.plan.cname):(c("--暂停-满足",this.plan.cname),this.checkConvert())},r.RuleCheck.prototype.checkConvert=function(){if(i.isObject(this.plan.is_in_convert_window)&&this.plan.is_in_convert_window.expire_time>this.current_time)c("--存在转化窗口 - 不满足",this.plan.is_in_convert_window);else if(i.isObject(this.plan.is_in_convert_window)&&this.current_time>this.plan.is_in_convert_window.expire_time){c("--转化窗口超时已经过期 - 满足",this.plan.plan_id),delete this.plan.is_in_convert_window;for(var t=0;t<r.convertPlans.length;t++)this.plan.plan_id===r.convertPlans[t].plan_id&&(r.convertPlans.splice(t,1),t--);this.checkGlobalPopupInterval()}else c("--不存在转化窗口 - 满足",this.plan.is_in_convert_window),this.checkGlobalPopupInterval()},r.RuleCheck.prototype.checkGlobalPopupInterval=function(){var t=r.localData.global_popup_count;if(i.isArray(t)&&t.length>=1){var e=r.ruleTime.getLast(r.localData.popup_interval_global,this.current_time);e>t[0]?(c("--全局弹窗间隔-满足-"+e+">上次弹窗时间"+t[0]),this.checkPopupInterval()):c("检查-全局弹窗间隔-不满足-"
2+e+"<上次弹窗时间"+t[0])}else c("--全局弹窗间隔-没有弹过窗-满足"),this.checkPopupInterval()},r.RuleCheck.prototype.checkPopupInterval=function(){i.isNumber(this.plan.is_in_popup_interval_window)?this.current_time>this.plan.is_in_popup_interval_window?(c("--弹窗间隔-当前时间大于固定弹窗间隔-满足"),this.plan.is_in_popup_interval_window=null,this.checkProperties()):c("--弹窗间隔-当前时间小于固定弹窗间隔-不满足"):(c("--弹窗间隔-窗口不存在-新开"),this.plan.is_in_popup_interval_window=null,this.checkProperties())},r.RuleCheck.prototype.checkProperties=function(){var t={equal:function(t,e){if(!i.isNumber(t)&&!i.isString(t))return!1;for(var n=0,r=e.length;n<r;n++){if(!i.isNumber(e[n])&&!i.isString(e[n]))return!1;if(i.isString(t)){if(t===(i.isString(e[n])?e[n]:String(e[n])))return!0}else if(i.getConvertNumberValue(t)===i.getConvertNumberValue(e[n]))return!0}return!1},notEqual:function(t,e){if(!i.isNumber(t)&&!i.isString(t))return!1;for(var n=0,r=e.length;n<r;n++){if(!i.isNumber(e[n])&&!i.isString(e[n]))return!1;if(i.isString(t)){if(t===(i.isString(e[n])?e[n]:String(e[n])))return!1}else if(i.getConvertNumberValue(t)===i.getConvertNumberValue(e[n]))return!1}return!0},contain:function(t,e){return!!i.isString(t)&&t.indexOf(e[0])>=0},notContain:function(t,e){return!!i.isString(t)&&-1===t.indexOf(e[0])},isTrue:function(t){return!0===t},isFalse:function(t){return!1===t},isSet:function(t){return void 0!==t},notSet:function(t){return void 0===t},isEmpty:function(t){if(!i.isString(t)&&!i.isArray(t))return!1;if(i.isString(t))return""===t;for(var e=0;e<t.length;e++)if(""!==t[e].replace(/^\s+|\s+$/g,""))return!1;return!0},isNotEmpty:function(t){if(!i.isString(t)&&!i.isArray(t))return!1;if(i.isString(t))return""!==t;for(var e=0;e<t.length;e++)if(""===t[e].replace(/^\s+|\s+$/g,""))return!1;return!0},less:function(t,e){return!!i.isNumber(t)&&void 0!==e[0]&&i.getConvertNumberValue(t)<i.getConvertNumberValue(e[0])},greater:function(t,e){return!!i.isNumber(t)&&void 0!==e[0]&&i.getConvertNumberValue(t)>i.getConvertNumberValue(e[0])},between:function(t,e){if(!i.isNumber(t))return!1;if(void 0===e[0]&&void 0===e[1])return!1;var n=i.getConvertNumberValue(t),r=i.getConvertNumberValue(e[0]),a=i.getConvertNumberValue(e[1]);return n>=r&&n<=a},isIn:function(t,e){if(!i.isArray(t))return!1;for(var n=0;n<t.length;n++)if(i.indexOf(e,t[n])>=0)return!0;return!1},notInclude:function(t,e){if(!i.isArray(t))return!1;for(var n=0;n<t.length;n++)if(-1===i.indexOf(e,t[n]))return!0;return!1},absolute_between:function(t,e){try{var n=new Date(e[0]),r=new Date(e[1]),i=new Date(t);return i>=n&&i<=r}catch(a){c("absolute_between Error",a)}},absoluteBetween:function(t,e){try{var n=new Date(e[0]),r=new Date(e[1]),i=new Date(t);return i>=n&&i<=r}catch(a){c("absolute_between Error",a)}}},e=this,n=i.filter(this.rule_arr,(function(n){if(!n.filter||n.filter.conditions&&0===n.filter.conditions.length)return!0;var r=n.filter,a=r.relation,o="or"===String(a).toLowerCase(),s="and"===String(a).toLowerCase(),u=!!s,c=!0;return i.each(r.conditions,(function(n){if(!c)return!1;if(!n.field)return!1;var r=n.field.lastIndexOf("."),i=n.params,a="in"===n.function?"isIn":n.function;if(!t[a])return u=!1,c=!1,!1;if(r<0)return!1;var l=n.field.slice(r+1),p=e.event_data.properties[l],h=t[a](p,i);o&&h&&(u=!0,c=!1),s&&!h&&(u=!1,c=!1)})),u}));i.isArray(n)&&n.length>0?(this.checkWindowAndMatch(n),c("--属性匹配-满足",n)):c("--属性匹配-不满足")},r.RuleCheck.prototype.checkWindowAndMatch=function(t){var e=this,n=[];i.each(t,(function(t){if(!t.params||!t.params[0])return c("--窗口期和次数-规则数据异常"),!1;var a=Number(t.params[0]);1===a?n.push(t):a>1&&i.isObject(t.window)&&t.window.value>0&&(!i.isObject(t.is_in_window)||!i.isNumber(t.is_in_window.expire_time)||t.is_in_window.expire_time<e.current_time?t.is_in_window={expire_time:r.ruleTime.getExpire(t.window,e.current_time),count:1}:t.is_in_window.count=t.is_in_window.count+1,t.is_in_window.count>=a?n.push(t):c("--窗口期和次数-规则数",t.is_in_window.count,"不匹配当前次数",a))})),n.length>0?(c("--窗口期和次数-有匹配成功的规则",n),this.checkGlobalPopupLimit()):c("--窗口期和次数-没有匹配成功的规则",n)},r.RuleCheck.prototype.checkGlobalPopupLimit=function(){var t=r.localData.msg_limit_global,e=!0,n=this;i.isObject(t)&&!0===t.is_in_use&&i.isArray(t.limits)&&i.isArray(r.localData.global_popup_count)&&!0===this.plan.global_msg_limit_enabled?(i.each(t.limits,(function(t){if(i.isObject(t)&&i.isNumber(t.limit)){var a=r.ruleTime.getLast(t,n.current_time),o=r.ruleTime.getArrMatchCount(r.localData.global_popup_count,a);c("--全局弹窗限制-已经弹窗次数-"+o+"-限制的次数"+t.limit+"-限制时间-"+a),e=o<t.limit?e&&!0:e&&!1}})),e?(c("--全局弹窗限制- 满足"),this.checkPopupLimit()):c("--全局弹窗限制-不满足")):(c("--全局弹窗限制- 满足"),this.checkPopupLimit())},r.RuleCheck.prototype.checkPopupLimit=function(){if(!i.isObject(this.plan.re_enter)||!i.isNumber(this.plan.re_enter.value)||!i.isNumber(this.plan.re_enter.limit))return this.plan_match.match_state=!0,!1;i.isObject(this.plan.is_in_popup_limit_window)&&i.isNumber(this.plan.is_in_popup_limit_window.expire_time)&&i.isNumber(this.plan.is_in_popup_limit_window.count)?this.plan.is_in_popup_limit_window.expire_time<this.current_time?(c("--参与限制-超过了参与限制窗口-开启新窗口-满足",this.plan.is_in_popup_limit_window),delete this.plan.is_in_popup_limit_window,this.plan_match.match_state=!0):this.plan.is_in_popup_limit_window.count<this.plan.re_enter.limit?(c("--参与限制-在窗口内且在参与限制次数内-满足",this.plan.is_in_popup_limit_window),this.plan_match.match_state=!0):c("--参与限制-在窗口内但是超过了参与限制-不满足",this.plan.is_in_popup_limit_window):(this.plan.is_in_popup_limit_window?(c("--参与限制-有窗口但是窗口数据异常-开新窗口-满足",this.plan.is_in_popup_limit_window),delete this.plan.is_in_popup_limit_window):c("--参与限制-不存在窗口-开新窗口-满足",this.plan.is_in_popup_limit_window),this.plan_match.match_state=!0)};var l="dfm-enc-";function p(t){var e="t6KJCZa5pDdQ9khoEM3Tj70fbP2eLSyc4BrsYugARqFIw1mzlGNVXOHiWvxUn8",n={},r=0;for(r=0;r<62;r++)n[e.charAt(r)]=e.charAt(61-r);var i="";for(r=0;r<t.length;r++)t.charAt(r)in n?i+=n[t.charAt(r)]:i+=t.charAt(r);return i}r.store={delete_time:2592e6,init:function(){this.migrateLocalData(),r.localData=this.getLocalData(),i.isNumber(r.localData.config_pull_interval_ms)&&r.localData.config_pull_interval_ms>0&&(r.updateDataAndSetListen.interval_time=r.localData.config_pull_interval_ms),this.removeLocalData(),r.log("初始化-获取-内存-localData")},getJSONData:function(){var t=i.localStorage.get(r.config.storageName);i.isString(t)&&(t=function(t){return 0===t.indexOf(l)&&(t=p(t=t.substring(8))),t}(t));try{t=JSON.parse(t)}catch(e){i.log(e)}return t}
2,saveJSONData:function(t){t=JSON.stringify(t),r.info.encrypt_cookie&&(t=function(t){return l+p(t)}(t)),i.localStorage.set(r.config.storageName,t)},migrateLocalData:function(){var t=this.getJSONData()||{},e=r.sa.store.getDistinctId();if(t.popup_sdk_users&&t.popup_sdk_plans)return!1;var n={popup_sdk_plans:{},popup_sdk_users:{}};n.popup_sdk_plans[e]=t,n.popup_sdk_users[e]={user_id:e},this.saveJSONData(n)},getLocalData:function(){var t=this.getJSONData(),e=r.sa.store.getDistinctId(),n=null;return t?(i.isObject(t.popup_sdk_users[e])&&t.popup_sdk_users[e].user_id&&(n=t.popup_sdk_users[e].user_id),n&&i.isObject(t.popup_sdk_plans[n])?(t.popup_sdk_plans[n].update_time=(new Date).getTime(),this.saveJSONData(t),t.popup_sdk_plans[n]):{}):{}},saveLocalData:function(){var t=this.getJSONData(),e=r.sa.store.getDistinctId(),n=null;if(!t)return!1;t.popup_sdk_users&&i.isObject(t.popup_sdk_users[e])&&t.popup_sdk_users[e].user_id&&(n=t.popup_sdk_users[e].user_id,t.popup_sdk_plans[n]=r.localData,this.saveJSONData(t))},removeLocalData:function(){var t=this.getJSONData(),e=this.delete_time;if(!t||!t.popup_sdk_plans||!t.popup_sdk_users)return!1;var n=JSON.parse(JSON.stringify(t.popup_sdk_plans)),r=JSON.parse(JSON.stringify(t.popup_sdk_users)),a=(new Date).getTime(),o=[];i.each(n,(function(n,r){a-n.update_time>e&&(delete t.popup_sdk_plans[r],o.push(r))})),i.each(r,(function(e,n){o.length>0&&i.each(o,(function(r){e.user_id&&r===e.user_id&&delete t.popup_sdk_users[n]}))})),this.saveJSONData(t)}},r.updateDataAndSetListen={active_state:!0,interval_time:6e5,save_interval:null,data_interval:null,image_list:null,local_data:null,filterConvertPlans:function(){var t=r.localData.popup_plans;if(!t||!i.isArray(t))return!1;var e=i.filter(t,(function(t){return!!t.convert_window&&!!t.is_in_convert_window}));r.convertPlans=e,r.log("初始化-异步的convertWindow",r.convertPlans),r.asyncConvert()},diffData:function(){var t=r.localData,e=JSON.parse(JSON.stringify(r.serverData)),n=(new Date).getTime();if(!e||i.isEmptyObject(e))return!1;var a=n-e.server_current_time;if(Math.abs(a)>=6e5)return!1;if(!t||i.isEmptyObject(t)||!t.popup_plans||0===t.popup_plans.length)return i.extend(r.localData,e),!1;var o=e.popup_plans;i.each(o,(function(e,n){var a=null;if(i.each(t.popup_plans,(function(t){t.plan_id===e.plan_id&&(a=t,e.audience_id||delete a.audience_id,i.isObject(e.window_update)&&i.each(e.window_update,(function(t,n){a.window_update&&a.window_update[n]===t||("trigger_window"===n?a.pattern_popup.matcher_list=e.pattern_popup.matcher_list:"convert_window"===n&&a.is_in_convert_window&&e.convert_window&&a.is_in_convert_window.start_time&&(a.is_in_convert_window.expire_time=r.ruleTime.getExpire(e.convert_window,a.is_in_convert_window.start_time)))})))})),!a)return!1;if(!e.window_update&&a.last_update_config_time!==e.last_update_config_time)return!1;var s=a.pattern_popup.matcher_list;i.extend2Lev(a,e),a.pattern_popup.matcher_list=s,o[n]=a})),i.extend(r.localData,e)},getEventRule:function(){var t=r.localData.popup_plans,e={};if(!t||!i.isArray(t))return!1;i.each(t,(function(t){var n=t.pattern_popup.matcher_list;i.each(n,(function(n){var r={plan:t,rule:[n]},a=n.event_name,o=!1;if(e[a]){if(i.each(e[a],(function(e){e.plan.plan_id===t.plan_id&&(e.rule.push(n),o=!0)})),o)return!1;e[a].push(r)}else e[a]=[r]}))})),i.each(e,(function(t){t.sort((function(t,e){var n=e.plan.absolute_priority-t.plan.absolute_priority;return 0===n?e.plan.plan_id-t.plan.plan_id:n}))})),r.eventRule=e,r.log("初始化-得到事件和计划的关系"),r.log("--------------------初始化完成--------------------等待事件触发计划--------------------")},registerListen:function(){var t=this;r.sa.events.on("send",(function(e){e.event&&r.eventRule[e.event]&&(i.isArray(r.localData.eventQueue)||(r.localData.eventQueue=[]),r.localData.eventQueue.push(e),t.updateLocalData(),r.eventTriggerProcess())})),r.sa.events.on("changeDistinctId",(function(e){t.changeId()})),r.sa.events.isReady()},setListenEvent:function(){this.diffData(),this.filterConvertPlans(),this.getEventRule(),this.updateLocalData()},loadImage:function(t){if(t.length<1)return!1;if(JSON.stringify(t)===JSON.stringify(this.image_list))return!1;this.image_list=t;for(var e=0;e<t.length;e++)n=t[e],(new Image).src=n;var n},getDataFromServer:function(t,e){var n=this,a=encodeURIComponent(r.sa.store.getDistinctId()),o=encodeURIComponent(r.info.platform),s=encodeURIComponent(r.info.project);t=i.isFunction(t)?t:function(){},e=i.isFunction(e)?e:function(){},i.ajax({url:r.info.api_base_url+"/sfo/user_popup_configs?distinct_id="+a+"&platform="+
vendor: 5,307 bytes, line 2
2o+"&project="+s+"&time="+(new Date).getTime()+"&sdk_version="+r.lib_version,type:"GET",cors:!0,credentials:!1,contentType:"application/json",success:function(a){if(!n.active_state)return e(),!1;r.log("初始化-修改-serverData-ajax获取"),i.isObject(a)&&a.server_current_time&&a.popup_plans&&/\d+\.\d+/.test(a.min_sdk_version_required)&&parseFloat(a.min_sdk_version_required)<=parseFloat(r.lib_version)?(r.serverData=a,i.isNumber(a.config_pull_interval_ms)&&a.config_pull_interval_ms>0&&(n.interval_time=a.config_pull_interval_ms),r.serverData.local_update_time=(new Date).getTime(),r.info.preload_image&&n.loadImage(r.getImageList(a.popup_plans)),n.updateUserPlans(),n.setListenEvent()):(r.log("初始化-数据异常-请求返回的数据错误-中止"),r.serverData={},r.localData={},n.updateLocalData()),t(),n.setIntervalTime(n.interval_time)},error:function(){if(!n.active_state)return e(),!1;r.log("初始化-数据异常-请求错误-中止"),r.serverData={},t(),n.setIntervalTime(n.interval_time)}})},updateUserPlans:function(){var t=r.store.getJSONData(),e=r.sa.store.getDistinctId(),n=r.serverData.user_id;t.popup_sdk_users[e]={user_id:n||e},n?t.popup_sdk_plans[n]?r.localData=t.popup_sdk_plans[n]:t.popup_sdk_plans[e]&&(r.localData=t.popup_sdk_plans[e],delete t.popup_sdk_plans[e]):t.popup_sdk_plans[e]&&(r.localData=t.popup_sdk_plans[e]),r.localData.update_time=(new Date).getTime(),r.store.saveJSONData(t)},setIntervalTime:function(t){var e=this;this.data_interval=setTimeout((function(){r.log("10分钟定时更新数据开始-------"),e.getDataFromServer()}),t)},setFirstListen:function(){var t=this;this.getDataFromServer((function(){t.registerListen()}))},updateLocalData:function(){var t=JSON.stringify(r.localData);this.local_data!==t&&(this.local_data=t,r.store.saveLocalData())},initial:function(){r.store.init();var t=r.localData.local_update_time,e=(new Date).getTime();if(i.isNumber(t)){var n=e-t;n<=0||n>=this.interval_time?this.setFirstListen():(this.setIntervalTime(this.interval_time-n),this.setListenEvent(),this.registerListen(),r.info.preload_image&&this.loadImage(r.getImageList(r.localData.popup_plans)))}else this.setFirstListen()},changeId:function(){this.stopAllState(),this.startState({getLocalData:!1})},stopAllState:function(){this.active_state=!1,r.eventRule={},this.data_interval&&window.clearTimeout(this.data_interval),this.save_interval&&window.clearInterval(this.save_interval),r.asyncConvert.timer&&window.clearTimeout(r.asyncConvert.timer),r.convertPlans=[],r.localData={},this.resetState()},resetState:function(){if("WEB"===r.info.platform)return!1;!document.querySelector("div[data-sf-mask]")&&r.isRun&&(r.isRun=!1)},startState:function(t){this.active_state=!0,(t=t||{getLocalData:!0}).getLocalData&&(this.resetState(),r.localData=r.store.getLocalData()),this.getDataFromServer()}},r.testSend={hasParam:function(){var t=i.URL(window.location.href).searchParams,e=t.get("sf_popup_test")||"",n=t.get("popup_window_id")||"",r=t.get("platform");return!(!e||!n)&&{sf_popup_test:e,popup_window_id:n,platform:r}},start:function(){var t=r.info.project,e=r.info.platform,n=this.hasParam().popup_window_id,a=this.hasParam().platform,o=encodeURIComponent(r.sa.store.getDistinctId());if("WEB"===a)return r.log("WEB端测试弹窗请在PC设备打开!"),!1;i.ajax({url:r.info.api_base_url+"/sfo/popup_windows/"+n+"?project="+encodeURIComponent(t)+"&time="+(new Date).getTime()+"&sdk_version="+r.lib_version+"&platform="+encodeURIComponent(e)+"&distinct_id="+o,type:"GET",credentials:!1,cors:!0,contentType:"application/json",success:function(t){var e,n=i.getUuid();i.isObject(t)||(r.sa.log("测试弹窗-服务端数据格式不合法",t),t={});try{e=JSON.parse(t.content)}catch(s){r.sa.log("测试弹窗-content解析失败,content:",t,s)}var a=r.getPopupInfo(e);a.$sf_msg_id=n;var o={content:t.content,type:t.popup_type||"PRESET"};t.popup_type&&"CUSTOMIZED"===t.popup_type?i.isString(t.content)?"withoutCampaignListener"===r.info.supportCustom||"withoutStart"===r.info.supportCustom?(a.$sf_succeed=!1,a.$sf_fail_reason="自定义触达计划未实现弹窗生命周期回调",r.track.popupDisplay(a),r.info.popup_campaign_listener.onFailed(o,1006,"自定义触达计划未实现弹窗生命周期回调")):(a.$sf_succeed=!0,r.track.popupDisplay(a),r.info.popup_campaign_listener.onStart(o)):(a.$sf_succeed=!1,a.$sf_fail_reason="预览信息解析失败,请检查计划配置",r.track.popupDisplay(a),r.info.popup_campaign_listener.onFailed(o,1001,"预览信息解析失败,请检查计划配置")):i.isObject(e)&&i.isObject(e.properties)&&i.isObject(e.template)?(new r.ElementRender(e).render(),a.$sf_succeed=!0,r.track.popupDisplay(a),r.info.popup_campaign_listener.onStart(o),r.info.popup_listener.onLoadSuccess()):(a.$sf_succeed=!1,a.$sf_fail_reason="预览信息解析失败,请检查计划配置",r.track.popupDisplay(a),r.info.popup_listener.onLoadFailed("",1001,"预览信息解析失败,请检查计划配置"),r.info.popup_campaign_listener.onFailed(o,1001,"预览信息解析失败,请检查计划配置"))},error:function(t){r.log("测试弹窗获取数据错误",t)}})}},r.setPara=function(t){i.isObject(t)||(t={}),r.info=i.extend({},r.defaultPara,t),r.sa=r.getWebSDK();var e=r.sa;if(!e)return r.log("web js sdk 还没有初始化完成"),!1;
2if(!0===e.para.encrypt_cookie&&(r.info.encrypt_cookie=!0),!i.isString(r.info.api_base_url)||"http"!==r.info.api_base_url.slice(0,4))return r.log("popup 必须填写有效 api_base_url"),!1;if("http:"===r.info.api_base_url.slice(0,5)&&"https:"===location.protocol)return r.log("您的当前页面是https的地址,api_base_url 也必须是https!"),!1;if(r.info.api_base_url="/"===r.info.api_base_url.slice(-1)?r.info.api_base_url.slice(0,-1):r.info.api_base_url,!i.isString(e.para.server_url)||"http"!==e.para.server_url.slice(0,4))return r.log("server_url 必须填写有效数据接收地址"),!1;if(r.info.project||(r.info.project=i.URL(e.para.server_url).searchParams.get("project")||"default"),i.isObject(r.info.popup_listener)){var n=r.info.popup_listener;i.isFunction(n.onClick)||(r.info.popup_listener.onClick=function(){}),i.isFunction(n.onLoadSuccess)||(r.info.popup_listener.onLoadSuccess=function(){}),i.isFunction(n.onLoadFailed)||(r.info.popup_listener.onLoadFailed=function(){}),i.isFunction(n.onClose)||(r.info.popup_listener.onClose=function(){}),i.isString(n.openlink)?"auto"!==n.openlink&&"customize"!==n.openlink&&(r.info.popup_listener.openlink="customize"):r.info.popup_listener.openlink="customize"}else r.info.popup_listener={onClick:function(){},onLoadSuccess:function(){},onLoadFailed:function(){},onClose:function(){},openlink:"customize"};return r.info.supportCustom=!0,i.isObject(r.info.popup_campaign_listener)?(i.isFunction(r.info.popup_campaign_listener.shouldStart)||(r.info.popup_campaign_listener.shouldStart=function(){return!0}),i.isFunction(r.info.popup_campaign_listener.onStart)||(r.info.supportCustom="withoutStart",r.info.popup_campaign_listener.onStart=function(){}),i.isFunction(r.info.popup_campaign_listener.onEnd)||(r.info.popup_campaign_listener.onEnd=function(){}),i.isFunction(r.info.popup_campaign_listener.onFailed)||(r.info.popup_campaign_listener.onFailed=function(){})):(r.info.supportCustom="withoutCampaignListener",r.info.popup_campaign_listener={shouldStart:function(){return!0},onStart:function(){},onEnd:function(){},onFailed:function(){}}),!0},r.getBridgeState=function(){return!(i.isObject(r.sa.para.app_js_bridge)&&(r.sa.para.app_js_bridge.is_mui||r.sa.bridge&&r.sa.bridge.is_verify_success))},r.init=function(){if(!r.isSupportPopup())return!1;if(window.screen.width&&Number(window.screen.width)>1024)return"object"==typeof console&&console.log&&console.log("H5 弹窗仅支持移动端和 ipad,或者屏幕宽度小于等于 1024。"),!1;var t={};return arguments.length>0&&(1===arguments.length&&i.isObject(arguments[0])?t=arguments[0]:arguments.length>=2&&i.isObject(arguments[1])&&(t=arguments[1])),!!this.setPara(t)&&(r.info.platform="H5",!!r.setIsLoad()&&!!this.getBridgeState()&&void(r.testSend.hasParam()?r.testSend.start():(r.listenPageStateChange(),r.updateDataAndSetListen.initial())))},window.SensorsDataWebJSSDKPlugin&&"[object Object]"==Object.prototype.toString.call(window.SensorsDataWebJSSDKPlugin)?(window.SensorsDataWebJSSDKPlugin.popup=window.SensorsDataWebJSSDKPlugin.popup||r,window.SensorsDataWebJSSDKPlugin.Popup=window.SensorsDataWebJSSDKPlugin.Popup||r):window.SensorsDataWebJSSDKPlugin={popup:r,Popup:r},e.default=r},58082:function(t,e,n){"use strict";n.d(e,{DP:function(){return g},Ev:function(){return l},L8:function(){return S},Ly:function(){return p},QW:function(){return O},UT:function(){return E},XB:function(){return h},YU:function(){return d},_0:function(){return w},aV:function(){return v},gN:function(){return m},kH:function(){return _},l0:function(){return A},l3:function(){return k},pU:function(){return y},sN:function(){return T},vP:function(){return b}});var r=n(45416);let i,a,o;const s="1jr_n7FPorbRL0MBV87cXpQhY",u="https://org-257.app.sensorswave.cn",c=["login","$SignUp","English_ClickLogin","English_ClickSignup","English_ClickContinue","English_FillinInformation","English_SignupSuccess","notification_formsubmit","Read_report","Democenter_button_click","AddAccount","gw_qddh_buttonclick","download_resource","formpageview","inputinfo","subformresult","sensors_error_report","open_console","verify_cellphone_code","click_send_cellphone","formSubmit","errorSubmit","ScanformQRcode","playVideo_success","playVideo_fail","click_send_email","English_ClickButton","
2navDemoClick","RecruitDetailPage","ClickButtonBack","PageView5year","English_Resend_Email_success","English_Resend_Email_fail"];if((0,r.Bd)()){let t=n(73564);o=n(76675).A,i={...t,track:(e,n)=>{try{t.track(e,n)}catch(r){console.warn("[Sensors] Track event failed:",e,r)}try{null!=o&&"function"==typeof o.trackEvent&&Array.isArray(c)&&c.includes(e)&&o.trackEvent(e,n)}catch(r){console.warn("[sensorsWave] Track event failed:",e,r)}}},a=n(38593).A,n(15742),n(32440)}i||(i={track:(t,e)=>{console.log("[Sensors] Non-browser environment, event tracked:",t,e)}});let l={getItem:function(t){return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(t).replace(/[-.+*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},setItem:function(t,e,n,r,i,a){if(!t||/^(?:expires|max\-age|path|domain|secure)$/i.test(t))return!1;var o="";if(n)switch(n.constructor){case Number:o=n===1/0?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+n;break;case String:o="; expires="+n;break;case Date:o="; expires="+n.toUTCString()}return document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)+o+(i?"; domain="+i:"")+(r?"; path="+r:"")+(a?"; secure":""),!0},removeItem:function(t,e,n){return!(!t||!this.hasItem(t))&&(document.cookie=encodeURIComponent(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain="+n:"")+(e?"; path="+e:""),!0)},hasItem:function(t){return new RegExp("(?:^|;\\s*)"+encodeURIComponent(t).replace(/[-.+*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},keys:function(){for(var t=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),e=0;e<t.length;e++)t[e]=decodeURIComponent(t[e]);return t}};const p=()=>{try{if(r.Bd){var t,e;let r=window.location.protocol||"https:";const a="//sensorswww.datasink.sensorsdata.cn/sa?token=6b551cb59b1c1973&project=default";let l=n(80775).A;i.use(l,(t=>{const e=null==t?void 0:t.event_name;return-1!==c.findIndex((t=>t===e))||e.startsWith("$")?["https://sensorswwwai.datasink.sensorsdata.cn/sa?project=production",a]:[a]})),null===(t=i)||void 0===t||t.init({show_log:!1,server_url:a,is_track_single_page:!1,use_client_time:!0,send_type:"beacon",heatmap:{clickmap:"default",scroll_notice_map:"not_collect"},preset_properties:{search_keyword_baidu:!0}}),null===(e=i)||void 0===e||e.use("SensorsABTest",{url:r+"//abtest-tx-beijing-01.saas.sensorsdata.cn/api/v2/abtest/online/results?project-key=E8F42894D788E51EDCD7530B7D32EB8130E3BD06"}),window.sa=i,o&&"function"==typeof o.init&&o.init(s,{apiHost:u,autoCapture:!0,batchSend:!1})}}catch(a){console.log(a.message)}},h=()=>{try{if(r.Bd){var t,e,n={which_sd_platform:"简体官网"},a=JSON.parse(l.getItem("_uq_")||"[]");function s(){var t;"miniprogram"===window.__wxjs_environment&&(n.page_open_environment="微信小程序"),null===(t=i)||void 0===t||t.quick("autoTrack",n)}if(a.length&&a.forEach((function(t,e){0===e?n.page_title=t:1===e?n.forward_first_title=t:2===e?n.forward_second_title=t:3===e&&(n.forward_third_title=t)})),r.hL)n.page_open_environment="微信",r.v8&&(n.page_open_environment="企业微信"),window.WeixinJSBridge&&null!==(t=window.WeixinJSBridge)&&void 0!==t&&t.invoke?s():document.addEventListener("WeixinJSBridgeReady",s,!1);else n.page_open_environment="浏览器",null===(e=i)||void 0===e||e.quick("autoTrack",n)}}catch(o){console.log(o.message)}};function f(t){var e=JSON.parse(l.getItem("_uq_")||"[]"),n=(document.getElementsByTagName("meta")["sa-title"]||{}).content;n||(n=document.title),n&&n!==e[0]&&(e.unshift(n),e.length>4&&(e.length=4),l.setItem("_uq_",JSON.stringify(e),!1,"/",t))}function d(){f(".sensorsdata.cn")}function g(){f(".sensorsdata.com")}let _=(t,e)=>{try{var n;if(r.Bd)null===(n=i)||void 0===n||n.track(t,e)}catch(a){console.log(a.message)}},m=(t,e)=>{try{var n;if(r.Bd)null===(n=i)||void 0===n||n.quick(t,e)}catch(a){console.log(a.message)}},v=t=>{try{var e;if(r.Bd)null===(e=i)||void 0===e||e.login(t)}catch(n){console.log(n.message)}};const y=t=>new Promise(((e,n)=>{try{var a;if(r.Bd)null===(a=i)||void 0===a||a.quick("isReady",(function(){var n;e(null===(n=i)||void 0===n?void 0:n.getPresetProperties()[t])}))}catch(o){console.log(o),n(o)}})),b=t=>{_("gw_qddh_buttonclick",{button_name:t,qddh_year:2022})},w=t=>{_("Democenter_button_click",{button_name:t})},S=t=>{_("AddAccount",{forward_first_title:t,requestBtn:"线上展区"})},E=t=>{_("AddAccount",{forward_first_title:t})},T=()=>{_("AddAccount",{forward_first_title:"首页-行业解决方案-总览"})},A=t=>{_("Read_report",{is_new_phone:t})},O=(t,e)=>{_(t,e)},k=t=>{var e;null===(e=i)||void 0===e||e.setProfile(t)}},15742:function(t,e,n){"use strict";n.r(e);var r={sa:{},info:{},lib_version:"0.4.3",defaultPara:{platform:"H5",preload_image:!0,encrypt_c
vendor: 13,664 bytes, line 2
2ookie:!1},serverData:{},localData:{global_popup_count:[],local_update_time:null,eventQueue:[],update_time:null},eventRule:{},convertPlans:[],isRun:!1,setArg:function(t){var e={};if(t&&"[object Object]"===Object.prototype.toString.call(t)){for(var n in t)n&&"popup_window_content"!==n&&(e[n]=t[n]);return JSON.stringify(e,null,"  ")}return t},log:function(){if(!0===r.info.show_log&&"object"==typeof console&&"function"==typeof console.log)try{return arguments[0]=r.setArg(arguments[0]),arguments[1]=r.setArg(arguments[1]),console.log.apply(console,arguments)}catch(t){console.log(arguments[0])}},config:{storageName:"sensorsdata202002-webpopupdata",loadedSign:"SensorsData2015JSSDKWebPopupIsLoad"}},i={visibility:function(t){var e={hidden:void 0,visibilityChange:void 0,isSupported:function(){return void 0!==this.hidden},_visible:(t=t||{}).onVisible,_hidden:t.onHidden,_nativeSwitch:function(){!0===document[this.hidden]?this._hidden():this._visible()},listen:function(){try{this.isSupported()?document.addEventListener(this.visibilityChange,(function(){e._nativeSwitch.apply(e,arguments)}),1):document.addEventListener?(window.addEventListener("focus",this._visible,1),window.addEventListener("blur",this._hidden,1)):(document.attachEvent("onfocusin",this._visible),document.attachEvent("onfocusout",this._hidden))}catch(t){}},init:function(){void 0!==document.hidden?(this.hidden="hidden",this.visibilityChange="visibilitychange"):void 0!==document.mozHidden?(this.hidden="mozHidden",this.visibilityChange="mozvisibilitychange"):void 0!==document.msHidden?(this.hidden="msHidden",this.visibilityChange="msvisibilitychange"):void 0!==document.webkitHidden&&(this.hidden="webkitHidden",this.visibilityChange="webkitvisibilitychange"),this.listen()}};e.init()},getRgba:function(t){return"object"!=typeof t?t:"rgba("+t.r+","+t.g+","+t.b+","+t.a+")"},conversionNum:function(t){if(t){if(/^[0|1]?\.\d+$/.test(t))return 100*Number(t)+"%";var e=/^(-?\d+(\.\d+)?)px$/.exec(t);return e?(Number(e[1])/375*window.screen.width).toFixed(2)+"px":t}},boxModel:function(t){return function(e){if("object"!=typeof e)return t+":"+e+";";var n="";for(var r in e)n+=t+"-"+r+":"+i.conversionNum(e[r])+";";return n}},localStorage:{get:function(t){return window.localStorage.getItem(t)},parse:function(t){var e=null;try{e=JSON.parse(i.localStorage.get(t))||null}catch(n){}return e},set:function(t,e){window.localStorage.setItem(t,e)},remove:function(t){window.localStorage.removeItem(t)},isSupport:function(){var t=!0;try{var e="__sensorsdatasupport__",n="testIsSupportStorage";i.localStorage.set(e,n),i.localStorage.get(e)!==n&&(t=!1),i.localStorage.remove(e)}catch(r){t=!1}return t}},addEvent:function(){function t(e){return e&&(e.preventDefault=t.preventDefault,e.stopPropagation=t.stopPropagation,e._getPath=t._getPath),e}t._getPath=function(){var t=this;return this.path||this.composedPath&&this.composedPath()||function(){try{var e=t.target,n=[e];if(null===e||null===e.parentElement)return[];for(;null!==e.parentElement;)e=e.parentElement,n.unshift(e);return n}catch(r){return[]}}()},t.preventDefault=function(){this.returnValue=!1},t.stopPropagation=function(){this.cancelBubble=!0},function(e,n,r){if(e&&e.addEventListener)e.addEventListener(n,(function(e){e._getPath=t._getPath,r.call(this,e)}),!1);else{var i="on"+n,a=e[i];e[i]=function(e,n,r){return function(i){if(i=i||t(window.event)){i.target=i.srcElement;var a,o,s=!0;return"function"==typeof r&&(a=r(i)),o=n.call(e,i),!1!==a&&!1!==o||(s=!1),s}}}(e,r,a)}}.apply(null,arguments)},extend:function(t){var e=Array.prototype.slice;return i.each(e.call(arguments,1),(function(e){for(var n in e)void 0!==e[n]&&(t[n]=e[n])})),t},extend2Lev:function(t){return i.each(Array.prototype.slice.call(arguments,1),(function(e){for(var n in e)void 0!==e[n]&&(i.isObject(e[n])&&i.isObject(t[n])?i.extend(t[n],e[n]):t[n]=e[n])})),t},each:function(t,e,n){var r=Object.prototype.hasOwnProperty,i=Array.prototype.forEach,a={};if(null==t)return!1;if(i&&t.forEach===i)t.forEach(e,n);else if(t.length===+t.length){for(var o=0,s=t.length;o<s;o++)if(o in t&&e.call(n,t[o],o,t)===a)return!1}else for(var u in t)if(r.call(t,u)&&e.call(n,t[u],u,t)===a)return!1},xhr:function(t){if(t)return void 0!==window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest?new XMLHttpRequest:"undefined"!=typeof XDomainRequest?new XDomainRequest:null;if(void 0!==window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}},ajax:function(t){function e(t){if(!t)return"";try{return JSON.parse(t)}catch(e){return{}}}t.timeout=t.timeout||2e4,t.credentials=void 0===t.credentials||t.credentials;var n=i.xhr(t.cors);if(!n)return!1;t.type||(t.type=t.data?"POST":"GET");var r,a=(t=i.extend({success:function(){},error:function(){}},t)).success,o=t.error;t.success=function(t){a(t),r&&(clearTimeout(r),r=null)},t.error=function(t){o(t),r&&(clearTimeout(r),r=null)},r=setTimeout((function(){!function(){try{i.isObject(n)&&n.abort&&n.abort()}catch(e){sd.log(e)}r&&(clearTimeout(r),r=null,t.error&&t.error(),n.onreadystatechange=null,n.onload=null,n.onerror=null)}()}),t.timeout),"undefined"!=typeof XDomainRequest&&n instanceof XDomainRequest&&(n.onload=function(){t.success&&t.success(e(n.responseText)),n.onreadystatechange=null,n.onload=null,n.onerror=null},n.onerror=function(){t.error&&t.error(e(n.responseText),n.status),n.onreadystatechange=null,n.onerror=null,n.onload=null}),n.onreadystatechange=function(){try{4==n.readyState&&(n.status>=200&&n.status<300||304==n.status?t.success(e(n.responseText)):t.error(e(n.responseText),n.status),n.onreadystatechange=null,n.onload=null)}catch(r){n.onreadystatechange=null,n.onload=null}},n.open(t.type,t.url,!0);try{t.credentials&&(n.withCredentials=!0),i.isObject(t.header)&&i.each(t.header,(function(t,e){n.setRequestHeader&&n.setRequestHeader(e,t)})),t.data&&(t.cors||n.setRequestHeader&&n.setRequestHeader("X-Requested-With","XMLHttpRequest"),"application/json"===t.contentType?n.setRequestHeader&&n.setRequestHeader("Content-type","application/json; charset=UTF-8"):n.setRequestHeader&&n.setRequestHeader("Content-type","application/x-www-form-urlencoded"))}catch(s){sd.log(s)}n.send(t.data||null)},getUuid:function(){var t=function(){return Math.random().toString(16).replace(".","")};return function(){var e=function(){for(var t=1*new Date,e=0;t==1*new Date;)e++;return t.toString(16)+e.toString(16)}()+"-"+t()+"-"+t();return e||(String(Math.random())+String(Math.random())+String(Math.random())).slice(2,15)}},trim:function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},isEmptyObject:function(t){var e=Object.prototype.hasOwnProperty;if(i.isObject(t)){for(var n in t)if(e.call(t,n))return!1;return!0}return!1},filter:function(t,e,n){var r=Object.prototype.hasOwnProperty;if(t.filter)return t.filter(e);for(var i=[],a=0;a<t.length;a++)if(r.call(t,a)){var o=t[a];e.call(n,o,a,t)&&i.push(o)}return i},isObject:function(t){return null!=t&&"[object Object]"==Object.prototype.toString.call(t)},getConvertNumberValue:function(t){return i.isString(t)&&(t=Number(t)),Math.floor(1e3*t)/1e3},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},isString:function(t){return"[object String]"==Object.prototype.toString.call(t)},isDate:function(t){return"[object Date]"==Object.prototype.toString.call(t)},isBoolean:function(t){return"[object Boolean]"==Object.prototype.toString.call(t)},isNumber:function(t){return"[object Number]"==Object.prototype.toString.call(t)&&/[\d\.]+/.test(String(t))},isFunction:function(t){if(!t)return!1;var e=Object.prototype.toString.call(t);return"[object Function]"==e||"[object AsyncFunction]"==e},getURLSearchParams:function(t){for(var e=function(t){return decodeURIComponent(t)},n={},r=(t=t||"").substring(1).split("&"),i=0;i<r.length;i++){var a=r[i].indexOf("=");if(-1!==a){var o=r[i].substring(0,a),s=r[i].substring(a+1);o=e(o),s=e(s),n[o]=s}}return n},URL:function(t){var e,n={},r=["hash","host","hostname","href","origin","password","pathname","port","protocol","search","username"];if("function"==typeof window.URL&&function(){try{return"http://modernizr.com/"===new URL("http://modernizr.com/").href}catch(t){return!1}}())(n=new URL(t)).searchParams||(n.searchParams=(e=i.getURLSearchParams(n.search),{get:function(t){return e[t]}}));else{if(!1===/^https?:\/\/.+/.test(t))throw"Invalid URL";var a=document.createElement("a");a.href=t;for(var o=r.length-1;o>=0;o--){var s=r[o];n[s]=a[s]}n.hostname&&"string"==typeof n.pathname&&0!==n.pathname.indexOf("/")&&(n.pathname="/"+n.pathname),n.searchParams=function(){var t=i.getURLSearchParams(n.search);return{get:function(e){return t[e]}}}()}return n},contentLoaded:function(t,e){var n=!1,r=!0,a=t.document,o=a.documentElement,s=a.addEventListener,u=s?"addEventListener":"attachEvent",c=s?"removeEventListener":"detachEvent",l=s?"":"on",p=function(r){"readystatechange"==r.type&&"complete"!=a.readyState||(("load"==r.type?t:a)[c](l+r.type,p,!1),!n&&(n=!0)&&e.call(t,r.type||r))},h=function(){try{o.doScroll("left")}catch(t){return void setTimeout(h,50)}p("poll")};if("complete"==a.readyState)e.call(t,"lazy");else{if(!s&&o.doScroll){try{r=!t.frameElement}catch(i){}r&&h()}a[u](l+"DOMContentLoaded",p,!1),a[u](l+"readystatechange",p,!1),t[u](l+"load",p,!1)}},indexOf:function(t,e){var n=t.indexOf;if(n)return n.call(t,e);for(var r=0;r<t.length;r++)if(e===t[r])return r;return-1}};r._=i,r.isSupportPopup=function(){return i.localStorage.isSupport()},r.listenPageStateChange=function(){var t=!0;i.visibility({onVisible:function(){r.log("页面触发visible-",(new Date).getMinutes(),"分",(new Date).getSeconds()),!1===t&&(r.updateDataAndSetListen.startState(),t=!0)},onHidden:function(){r.log("页面触发hidden-",(new Date).getMinutes(),"分",(new Date).getSeconds()),!0===t&&(r.updateDataAndSetListen.stopAllState(),t=!1)}})},r.getWebSDK=function(){return!!(i.isObject(window.sensorsDataAnalytic201505)&&i.isObject(window.sensorsDataAnalytic201505.readyState)&&window.sensorsDataAnalytic201505.readyState.state>=3)&&window.sensorsDataAnalytic201505},r.getPopupInfo=function(t){if(!i.isObject(t)||!i.isObject(t.template))return{};var e={$sf_msg_title:"",$sf_msg_content:"",$sf_msg_image_url:""};return function t(n){i.each(n.subviews,(function(n){var r=n.properties||{};"title"===r.msgType?e.$sf_msg_title=r.text:"content"===r.msgType?e.$sf_msg_content=r.text:"image"===n.type&&(e.$sf_msg_image_url=r.image),n.subviews&&t(n)}))}(t.template),e},r.getSFCampaign=function(t){t=i.isObject(t)?t:{};var e={planId:"",name:"",content:null,type:""};return e.planId=t.plan_id||"",e.name=t.cname||"",e.content=i.isObject(t.popup_window_content)?t.popup_window_content.content:"",e.type=i.isObject(t.popup_window_content)&&t.popup_window_content.popup_type?t.popup_window_content.popup_type:"PRESET",e},r.getImageList=function(t){if(!i.isArray(t))return!1;for(var e,n,r=new RegExp('("(backgroundImage|image)":"(http(s)?://.[^"]*)")',"g"),a=new RegExp('http(s)?://.[^S^"]*'),o={},s=t.length,u=[],c=0;c<s;c++)if(i.isObject(t[c])&&"ACTIVE"===t[c].status.toLocaleUpperCase()&&!0===t[c].is_audience&&(t[c].strategy_id?!1!==t[c].is_trigger:!0!==t[c].is_control_group)&&t[c].popup_window_content&&t[c].popup_window_content.content&&(e=t[c].popup_window_content.content.match(r)))for(var l=0,p=e.length;l<p;l++)(n=e[l].match(a))&&n.length>0&&(o[n[0]]||(o[n[0]]=1));return i.each(o,(function(t,e){u.push(e)})),u},r.setIsLoad=function(){if(window.self===window.top){if(window[r.config.loadedSign])return!1;if(void 0===window[r.config.loadedSign])return window[r.config.loadedSign]=!0,!0}else try{return!window.top[r.config.loadedSign]&&(window.top[r.config.loadedSign]=!0,!0)}catch(t){return r.log("非同域名iframe内嵌不能获取父级窗体内容",t),!0}},r.handlerCampaign=function(t){var e,n=t,a=i.getUuid()(),o=n.plan.popup_window_content;if(!i.isObject(o))return n.popupFailed(1001,!1,{uuid:a,content:"",plan:n.plan}),!1;if(o.content)try{e=JSON.parse(o.content)}catch(p){r.log(p)}var s=r.getSFCampaign(n.plan),u={state:"",isCustom:!1},c=!0;try{c=r.info.popup_campaign_listener.shouldStart(s)}catch(p){c=!1,r.log(p)}var l={uuid:a,content:e,plan:n.plan};switch(n.plan.is_trigger?c?"CUSTOMIZED"===o.popup_type?"withoutCampaignListener"===r.info.supportCustom?u.state="CAMPAIGN_CUSTOMIZED_NULL_LISTENER":"withoutStart"===r.info.supportCustom?u.state="CAMPAIGN_CUSTOMIZED_LISTENER_NULL_START":i.isString(o.content)?u.state="CAMPAIGN_TRIGGER_CUSTOMIZED_START":u.state="DIALOG_NOT_SHOW_JSON_FAILED":("PRESET"===o.popup_type&&r.log("此版本sdk不支持预置弹窗"),u.state="DIALOG_NOT_SHOW_JSON_FAILED"):u.state="CAMPAIGN_NOT_START_LISTENER_START":u.state="CAMPAIGN_NOT_START_TRIGGER",u.isCustom=!(!o.popup_type||"CUSTOMIZED"!==o.popup_type),r.log("campaign:",u,"plan:",n.plan.cname),u.state){case"CAMPAIGN_TRIGGER_CUSTOMIZED_START":n.customCampaign(l);break;case"CAMPAIGN_NOT_START_LISTENER_START":n.popupFailed(1004,u.isCustom,l);break;case"CAMPAIGN_CUSTOMIZED_NULL_LISTENER":case"CAMPAIGN_CUSTOMIZED_LISTENER_NULL_START":n.popupFailed(1006,u.isCustom,l);break;case"DIALOG_NOT_SHOW_JSON_FAILED":n.popupFailed(1001,u.isCustom,l);break;case"CAMPAIGN_NOT_START_TRIGGER":n.popupFailed(1005,u.isCustom,l);break;default:r.log("CampaignState异常")}},r.track={getPublicProps:function(t){var e=t.plan,n={$sf_lib_version:r.lib_version,$sf_plan_type:"运营计划",$sf_channel_service_name:"SENSORS_FOCUS",$sf_channel_category:"POPUP",$sf_platform_tag:r.info.platform,$sf_msg_id:t.$sf_msg_id};return i.isEmptyObject(e)||!i.isObject(e)||(n.$sf_plan_id=e.plan_id+"",n.$sf_plan_
vendor: 12,748 bytes, line 2
2strategy_id=e.strategy_id?e.strategy_id:e.is_control_group?"-1":"0",e.audience_id&&(n.$sf_audience_id=e.audience_id+"")),n},popupDisplay:function(t){var e={$sf_msg_title:t.$sf_msg_title,$sf_msg_content:t.$sf_msg_content,$sf_msg_image_url:t.$sf_msg_image_url,$sf_succeed:t.$sf_succeed,$sf_fail_reason:t.$sf_fail_reason};this.trackEvent("$PlanPopupDisplay",e,t)},trackEvent:function(t,e,n){var a=r.track.getPublicProps(n);i.extend(e,a),i.each(e,(function(t,n){""!==t&&void 0!==t||delete e[n]})),r.sa.track(t,e)},maskClick:function(t){if(!t.msg)return!1;var e={$sf_close_type:"POPUP_CLOSE_MASK",$sf_msg_title:t.msg.$sf_msg_title,$sf_msg_content:t.msg.$sf_msg_content,$sf_msg_image_url:t.msg.$sf_msg_image_url,$sf_msg_element_type:"mask",$sf_msg_action_id:t.properties.maskActionId};this.trackEvent("$PlanPopupClick",e,t.msg),t.destory()},elementClickCallback:function(t,e){var n=t.target,a=n.getAttribute("data-action"),o=n.getAttribute("data-info"),s=e.msg||{};if(!a)return!1;try{var u=(JSON.parse(a)||{})[0],c=JSON.parse(o)||{}}catch(t){r.log("elementClickCallback error",t)}var l={type:u.type,value:i.isString(u.value)?u.value:"",extra:i.isObject(u.value)?u.value:""},p=e.msg.plan?e.msg.plan.plan_id:"",h={$sf_msg_title:s.$sf_msg_title,$sf_msg_content:s.$sf_msg_content,$sf_msg_image_url:s.$sf_msg_image_url,$sf_msg_element_type:c.$sf_msg_element_type,$sf_msg_element_content:c.$sf_msg_element_content,$sf_msg_element_action:u.type,$sf_msg_action_id:u.id,$sf_close_type:"close"===u.type?u.$sf_close_type:""};this.trackEvent("$PlanPopupClick",h,s);try{r.info.popup_listener.onClick(p,l)}catch(t){r.log("popup_listener.onClick error",t)}if("close"===u.type)e.destory();else if(u.closeable&&e.destory(),"auto"===r.info.popup_listener.openlink&&"openlink"===u.type){if("http"!==u.value.slice(0,4))return!1;window.location.href=u.value}}};var a=r.log;r.changeCovertStatus=function(t){var e=JSON.parse(JSON.stringify(r.convertPlans));i.each(e,(function(e,n){if(!e.is_in_convert_window)return!1;var o=e.is_in_convert_window.step,s=e.is_in_convert_window.uuid;if(r.convertPlans[n].is_in_convert_window.step=Math.min(2*o,6e5),!t)return!1;i.each(t,(function(t){t.popup_display_uuid===s&&t.convert_time&&(a("--转化窗口- 目标事件已经完成 - 满足",r.convertPlans[n].plan_id),delete r.convertPlans[n].is_in_convert_window,r.convertPlans.splice(n,1))}))})),r.updateDataAndSetListen.updateLocalData()},r.asyncConvert=function(t){var e=r.info.project,n=!1;if(!t&&0===r.convertPlans.length)return!1;t&&(i.each(r.convertPlans,(function(e){e.plan_id===t.plan_id&&(n=!0)})),n||r.convertPlans.push(t)),function t(){if(i.isEmptyObject(r.localData)||!i.isArray(r.convertPlans)||0===r.convertPlans.length)return!1;var n=JSON.parse(JSON.stringify(r.convertPlans)),o=n[0].is_in_convert_window&&n[0].is_in_convert_window.step||5e3,s=[];if(i.each(n,(function(t,e){return!!t.is_in_convert_window&&((new Date).getTime()>t.is_in_convert_window.expire_time?(a("--转化窗口超时已经过期 - 满足",r.convertPlans[e].plan_id),delete r.convertPlans[e].is_in_convert_window,r.convertPlans.splice(e,1),r.updateDataAndSetListen.updateLocalData(),!1):(s.push(t.is_in_convert_window.uuid),t.is_in_convert_window.step||(t.is_in_convert_window.step=5e3,r.convertPlans[e].is_in_convert_window.step=5e3),void(o>t.is_in_convert_window.step&&(o=t.is_in_convert_window.step))))})),!s.length)return!1;r.asyncConvert.timer&&clearTimeout(r.asyncConvert.timer),r.asyncConvert.timer=setTimeout((function(){i.ajax({url:r.info.api_base_url+"/sfo/popup_displays?project="+encodeURIComponent(e)+"&popup_display_uuids="+encodeURIComponent(s)+"&time="+(new Date).getTime(),type:"GET",cors:!0,credentials:!1,contentType:"application/json",success:function(e){r.changeCovertStatus(e),t()},error:function(){r.changeCovertStatus(),t()}})}),o)}()},r.ruleTime={getExpire:function(t,e){var n=e,r=Number(t.value)||0,i=Number(t.value)||0,a=String(t.unit).toLowerCase(),o=null,s={day:function(){return(o=new Date(n)).setHours(23),o.setMinutes(59),o.setSeconds(59),o.setMilliseconds(999),o=o.getTime()+864e5*(i-1)},week:function(){var t=(o=new Date(n)).getDay();0===t&&(t=7);var e=7-t;return o.setHours(23),o.setMinutes(59),o.setSeconds(59),o.setMilliseconds(999),o=o.getTime()+24*e*60*60*1e3+7*(i-1)*24*60*60*1e3},month:function(){var t=(o=new Date(n)).getMonth()+i;return t>=11?(o.setFullYear(o.getFullYear()+parseInt(t/12)),o.setMonth(t%12)):o.setMonth(t),o.setDate(1),o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0),o.getTime()},second:function(t){var e={month:2592e6,week:6048e5,day:864e5,hour:36e5,minute:6e4,second:1e3},i=null;return o=new Date(n),t in e&&(i=e[t]*r),o.getTime()+i}};return!0!==t.natural?s.second(a):a in s?s[a]():void 0},getLast:function(t,e){var n=Number(t.value)||0,r=Number(t.value)-1||0,i=String(t.unit).toLowerCase(),a=null,o={day:function(){return(a=new Date(e)).setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a=a.getTime()-864e5*r},week:function(){var t=(a=new Date(e)).getDay();return 0===t&&(t=7),--t,a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a=a.getTime()-(24*t*60*60*1e3+7*r*24*60*60*1e3)},month:function(){var t=(a=new Date(e)).getMonth()+1-r;return t<=0?(a.setFullYear(a.getFullYear()+(parseInt(t/12)-1)),a.setMonth(12+t%12-1)):a.setMonth(t-1),a.setDate(1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.getTime()},second:function(t){var r={month:2592e6,week:6048e5,day:864e5,hour:36e5,minute:6e4,second:1e3},i=null;return a=new Date(e),t in r&&(i=r[t]*n),a.getTime()-i}};return!0!==t.natural?o.second(i):i in o?o[i]():void 0},getArrMatchCount:function(t,e){var n=0;for(n=0;n<t.length;n++)if(e>=t[n])return n;return t.length}},r.eventTriggerProcess=function(){if(!r.updateDataAndSetListen.active_state)return!1;if(!i.isArray(r.localData.eventQueue))return!1;if(0===r.localData.eventQueue.length)return!1;if(r.isRun)return!1;a("事件队列---eventQueue",r.localData.eventQueue);var t=!1,e=r.localData.eventQueue[0],n=r.eventRule[e.event];r.isRun=!0,r.localData.eventQueue.shift(),r.updateDataAndSetListen.updateLocalData(),i.isArray(n)&&i.isObject(n[0])&&n.length>0&&(a("--------------------触发事件开始--------------------"),i.each(n,(function(t){i.isObject(t)&&void 0!==t.match_state&&delete t.match_state,new r.RuleCheck(t,e)})),i.each(n,(function(e){!0===e.match_state?!1===t?(t=!0,a("检查完毕-优先弹窗-开始",e.plan.cname),new r.PopupCheck(e,!0)):!0===t&&(a("检查完毕-非优先弹窗-不渲染",e.plan.cname),new r.PopupCheck(e,!1)):a("检查完毕-计划-不满足",e.plan.cname)})),t||r.completeWindowLifecycle(),a("--------------------触发事件结束--------------------"))},r.completeWindowLifecycle=function(){r.isRun=!1,r.eventTriggerProcess()},r.PopupCheck=function(t,e){this.plan=t.plan,this.current_time=(new Date).getTime(),e?this.renderPopup():this.hidePopup(),r.updateDataAndSetListen.updateLocalData()},r.PopupCheck.prototype.createPopupWindow=function(t,e){this.startConvertWindow(t),this.startPopupIntervalWindow(this.current_time),this.startPopupLimitWindow(),this.setGlobalLimit(),this.deletePlanAllWindow(),e&&r.completeWindowLifecycle()},r.PopupCheck.prototype.hidePopup=function(){this.deletePlanAllWindow()},r.PopupCheck.prototype.renderPopup=function(){r.handlerCampaign(this)},r.PopupCheck.prototype.popupFailed=function(t,e,n){var a={1001:"预览信息解析失败,请检查计划配置",1003:"对照组",1004:"campaignShouldStart 接口返回 false",1005:"计划下发 is_trigger 为 false",1006:"自定义触达计划未实现弹窗生命周期回调"}[t],o=r.getPopupInfo(n.content);o.$sf_msg_id=n.uuid,o.plan=n.plan,o.$sf_succeed=!1,o.$sf_fail_reason=a,r.track.popupDisplay(o),!e&&r.info.popup_listener&&i.isFunction(r.info.popup_listener.onLoadFailed)&&r.info.popup_listener.onLoadFailed(n.plan.plan_id,t,a),r.info.popup_campaign_listener.onFailed(r.getSFCampaign(n.plan),t,a),this.createPopupWindow(n.uuid,!0)},r.PopupCheck.prototype.customCampaign=function(t){var e=r.getSFCampaign(t.plan),n=r.getPopupInfo(t.content);n.$sf_msg_id=t.uuid,n.plan=t.plan,n.$sf_succeed=!0,r.track.popupDisplay(n),r.info.popup_campaign_listener.onStart(e),this.createPopupWindow(t.uuid,!0)},r.PopupCheck.prototype.showPopup=function(t){if(!r.ElementRender)return r.log("暂不支持预置弹窗UI"),!1;var e=new r.ElementRender(t.content),n=r.getPopupInfo(t.content);if(n.$sf_msg_id=t.uuid,n.plan=t.plan,n.$sf_succeed=!0,i.extend(e.msg,n),e.popupCheckInstance=this,r.track.popupDisplay(n),!e.render())return a("当前页面已有一个弹框正在渲染,本次弹框不渲染!"),!1;r.info.popup_campaign_listener.onStart(r.getSFCampaign(t.plan)),this.createPopupWindow(t.uuid),r.info.popup_listener.onLoadSuccess(t.plan.plan_id)},r.PopupCheck.prototype.startConvertWindow=function(t){a("--弹窗展示-转化窗口设置",this.plan.cname),i.isObject(this.plan.convert_window)&&this.plan.convert_window.value&&(this.plan.is_in_convert_window={expire_time:r.ruleTime.getExpire(this.plan.convert_window,this.current_time),start_time:this.current_time,uuid:t},r.asyncConvert(this.plan))},r.PopupCheck.prototype.startPopupIntervalWindow=function(t){i.isObject(this.plan.popup_interval)&&this.plan.popup_interval.value&&(this.plan.is_in_popup_interval_window=r.ruleTime.getExpire(this.plan.popup_interval,t))},r.PopupCheck.prototype.resetPopupIntervalWindow=function(){var t=(new Date).getTime();this.startPopupIntervalWindow(t),this.resetGlobalLimit(t),r.completeWindowLifecycle()},r.PopupCheck.prototype.startPopupLimitWindow=function(){a("--弹窗展示-参与限制窗口设置重置"),i.isObject(this.plan.re_enter)&&this.plan.re_enter.value&&(i.isObject(this.plan.is_in_popup_limit_window)?this.plan.is_in_popup_limit_window.count++:this.plan.is_in_popup_limit_window={expire_time:r.ruleTime.getExpire(this.plan.re_enter,this.current_time),count:1})},r.PopupCheck.prototype.setGlobalLimit=function(){a("--弹窗展示-全局弹窗次数设置"),i.isArray(r.localData.global_popup_count)||(r.localData.global_popup_count=[]),r.localData.global_popup_count.unshift(this.current_time);for(var t=r.localData.global_popup_count,e=t[t.length-1];e+7776e6<this.current_time||t.length>3e3;)t.pop(),e=t[t.length-1]},r.PopupCheck.prototype.resetGlobalLimit=function(t){i.isArray(r.localData.global_popup_count)&&r.localData.global_popup_count.length>0&&(r.localData.global_popup_count.shift(),r.localData.global_popup_count.unshift(t))},r.PopupCheck.prototype.deletePlanAllWindow=function(){var t=this.plan.pattern_popup.matcher_list;i.isArray(t)&&i.each(t,(function(t){t.is_in_window&&(a("--弹窗展示-重置各个规则的窗口计算-成功"),delete t.is_in_window)}))},r.RuleCheck=function(t,e){this.plan_match=t,this.plan=t.plan,this.rule_arr=t.rule,this.event_data=e,this.current_time=(new Date).getTime();var n="-------------检查-计划-("+this.plan.cname+")";i.each(this.rule_arr,(function(t){n+="--包含规则-("+t.event_name+")-触发"+t.params[0]+"次"})),a(n),a(this.plan),this.checkPlanIsExpire(),r.updateDataAndSetListen.updateLocalData()},r.RuleCheck.prototype.checkPlanIsExpire=function(){!this.plan.expire_at||i.isNumber(this.plan.expire_at)&&this.current_time<this.plan.expire_at?(a("--过期-满足",this.plan.cname),this.checkPlanIsAudience()):a("--过期-不满足",this.plan.cname)},r.RuleCheck.prototype.checkPlanIsAudience=function(){!0===this.plan.is_audience?(a("--是否受众-满足",this.plan.cname),this.checkPlanSuspend()):a("--是否受众-不满足",this.plan.cname)},r.RuleCheck.prototype.checkPlanSuspend=function(){this.plan.status&&"SUSPEND"===this.plan.status?a("--暂停-不满足",this.plan.cname):(a("--暂停-满足",this.plan.cname),this.checkConvert())},r.RuleCheck.prototype.checkConvert=function(){if(i.isObject(this.plan.is_in_convert_window)&&this.plan.is_in_convert_window.expire_time>this.current_time)a("--存在转化窗口 - 不满足",this.plan.is_in_convert_window);else if(i.isObject(this.plan.is_in_convert_window)&&this.current_time>this.plan.is_in_convert_window.expire_time){a("--转化窗口超时已经过期 - 满足",this.plan.plan_id),delete this.plan.is_in_convert_window;for(var t=0;t<r.convertPlans.length;t++)this.plan.plan_id===r.convertPlans[t].plan_id&&(r.convertPlans.splice(t,1),t--);this.checkGlobalPopupInterval()}else a("--不存在转化窗口 - 满足",this.plan.is_in_convert_window),this.checkGlobalPopupInterval()},r.RuleCheck.prototype.checkGlobalPopupInterval=function(){var t=r.localData.global_popup_count;if(i.isArray(t)&&t.length>=1){var e=r.ruleTime.getLast(r.localData.popup_interval_global,this.current_time);e>t[0]?(a("--全局弹窗间隔-满足-"+e+">上次弹窗时间"+t[0]),this.checkPopupInterval()):a("检查-全局弹窗间隔-不满足-"
2+e+"<上次弹窗时间"+t[0])}else a("--全局弹窗间隔-没有弹过窗-满足"),this.checkPopupInterval()},r.RuleCheck.prototype.checkPopupInterval=function(){i.isNumber(this.plan.is_in_popup_interval_window)?this.current_time>this.plan.is_in_popup_interval_window?(a("--弹窗间隔-当前时间大于固定弹窗间隔-满足"),this.plan.is_in_popup_interval_window=null,this.checkProperties()):a("--弹窗间隔-当前时间小于固定弹窗间隔-不满足"):(a("--弹窗间隔-窗口不存在-新开"),this.plan.is_in_popup_interval_window=null,this.checkProperties())},r.RuleCheck.prototype.checkProperties=function(){var t={equal:function(t,e){if(!i.isNumber(t)&&!i.isString(t))return!1;for(var n=0,r=e.length;n<r;n++){if(!i.isNumber(e[n])&&!i.isString(e[n]))return!1;if(i.isString(t)){if(t===(i.isString(e[n])?e[n]:String(e[n])))return!0}else if(i.getConvertNumberValue(t)===i.getConvertNumberValue(e[n]))return!0}return!1},notEqual:function(t,e){if(!i.isNumber(t)&&!i.isString(t))return!1;for(var n=0,r=e.length;n<r;n++){if(!i.isNumber(e[n])&&!i.isString(e[n]))return!1;if(i.isString(t)){if(t===(i.isString(e[n])?e[n]:String(e[n])))return!1}else if(i.getConvertNumberValue(t)===i.getConvertNumberValue(e[n]))return!1}return!0},contain:function(t,e){return!!i.isString(t)&&t.indexOf(e[0])>=0},notContain:function(t,e){return!!i.isString(t)&&-1===t.indexOf(e[0])},isTrue:function(t){return!0===t},isFalse:function(t){return!1===t},isSet:function(t){return void 0!==t},notSet:function(t){return void 0===t},isEmpty:function(t){if(!i.isString(t)&&!i.isArray(t))return!1;if(i.isString(t))return""===t;for(var e=0;e<t.length;e++)if(""!==t[e].replace(/^\s+|\s+$/g,""))return!1;return!0},isNotEmpty:function(t){if(!i.isString(t)&&!i.isArray(t))return!1;if(i.isString(t))return""!==t;for(var e=0;e<t.length;e++)if(""===t[e].replace(/^\s+|\s+$/g,""))return!1;return!0},less:function(t,e){return!!i.isNumber(t)&&void 0!==e[0]&&i.getConvertNumberValue(t)<i.getConvertNumberValue(e[0])},greater:function(t,e){return!!i.isNumber(t)&&void 0!==e[0]&&i.getConvertNumberValue(t)>i.getConvertNumberValue(e[0])},between:function(t,e){if(!i.isNumber(t))return!1;if(void 0===e[0]&&void 0===e[1])return!1;var n=i.getConvertNumberValue(t),r=i.getConvertNumberValue(e[0]),a=i.getConvertNumberValue(e[1]);return n>=r&&n<=a},isIn:function(t,e){if(!i.isArray(t))return!1;for(var n=0;n<t.length;n++)if(i.indexOf(e,t[n])>=0)return!0;return!1},notInclude:function(t,e){if(!i.isArray(t))return!1;for(var n=0;n<t.length;n++)if(-1===i.indexOf(e,t[n]))return!0;return!1},absolute_between:function(t,e){try{var n=new Date(e[0]),r=new Date(e[1]),i=new Date(t);return i>=n&&i<=r}catch(o){a("absolute_between Error",o)}},absoluteBetween:function(t,e){try{var n=new Date(e[0]),r=new Date(e[1]),i=new Date(t);return i>=n&&i<=r}catch(o){a("absolute_between Error",o)}}},e=this,n=i.filter(this.rule_arr,(function(n){if(!n.filter||n.filter.conditions&&0===n.filter.conditions.length)return!0;var r=n.filter,a=r.relation,o="or"===String(a).toLowerCase(),s="and"===String(a).toLowerCase(),u=!!s,c=!0;return i.each(r.conditions,(function(n){if(!c)return!1;if(!n.field)return!1;var r=n.field.lastIndexOf("."),i=n.params,a="in"===n.function?"isIn":n.function;if(!t[a])return u=!1,c=!1,!1;if(r<0)return!1;var l=n.field.slice(r+1),p=e.event_data.properties[l],h=t[a](p,i);o&&h&&(u=!0,c=!1),s&&!h&&(u=!1,c=!1)})),u}));i.isArray(n)&&n.length>0?(this.checkWindowAndMatch(n),a("--属性匹配-满足",n)):a("--属性匹配-不满足")},r.RuleCheck.prototype.checkWindowAndMatch=function(t){var e=this,n=[];i.each(t,(function(t){if(!t.params||!t.params[0])return a("--窗口期和次数-规则数据异常"),!1;var o=Number(t.params[0]);1===o?n.push(t):o>1&&i.isObject(t.window)&&t.window.value>0&&(!i.isObject(t.is_in_window)||!i.isNumber(t.is_in_window.expire_time)||t.is_in_window.expire_time<e.current_time?t.is_in_window={expire_time:r.ruleTime.getExpire(t.window,e.current_time),count:1}:t.is_in_window.count=t.is_in_window.count+1,t.is_in_window.count>=o?n.push(t):a("--窗口期和次数-规则数",t.is_in_window.count,"不匹配当前次数",o))})),n.length>0?(a("--窗口期和次数-有匹配成功的规则",n),this.checkGlobalPopupLimit()):a("--窗口期和次数-没有匹配成功的规则",n)},r.RuleCheck.prototype.checkGlobalPopupLimit=function(){var t=r.localData.msg_limit_global,e=!0,n=this;i.isObject(t)&&!0===t.is_in_use&&i.isArray(t.limits)&&i.isArray(r.localData.global_popup_count)&&!0===this.plan.global_msg_limit_enabled?(i.each(t.limits,(function(t){if(i.isObject(t)&&i.isNumber(t.limit)){var o=r.ruleTime.getLast(t,n.current_time),s=r.ruleTime.getArrMatchCount(r.localData.global_popup_count,o);a("--全局弹窗限制-已经弹窗次数-"+s+"-限制的次数"+t.limit+"-限制时间-"+o),e=s<t.limit?e&&!0:e&&!1}})),e?(a("--全局弹窗限制- 满足"),this.checkPopupLimit()):a("--全局弹窗限制-不满足")):(a("--全局弹窗限制- 满足"),this.checkPopupLimit())},r.RuleCheck.prototype.checkPopupLimit=function(){if(!i.isObject(this.plan.re_enter)||!i.isNumber(this.plan.re_enter.value)||!i.isNumber(this.plan.re_enter.limit))return this.plan_match.match_state=!0,!1;i.isObject(this.plan.is_in_popup_limit_window)&&i.isNumber(this.plan.is_in_popup_limit_window.expire_time)&&i.isNumber(this.plan.is_in_popup_limit_window.count)?this.plan.is_in_popup_limit_window.expire_time<this.current_time?(a("--参与限制-超过了参与限制窗口-开启新窗口-满足",this.plan.is_in_popup_limit_window),delete this.plan.is_in_popup_limit_window,this.plan_match.match_state=!0):this.plan.is_in_popup_limit_window.count<this.plan.re_enter.limit?(a("--参与限制-在窗口内且在参与限制次数内-满足",this.plan.is_in_popup_limit_window),this.plan_match.match_state=!0):a("--参与限制-在窗口内但是超过了参与限制-不满足",this.plan.is_in_popup_limit_window):(this.plan.is_in_popup_limit_window?(a("--参与限制-有窗口但是窗口数据异常-开新窗口-满足",this.plan.is_in_popup_limit_window),delete this.plan.is_in_popup_limit_window):a("--参与限制-不存在窗口-开新窗口-满足",this.plan.is_in_popup_limit_window),this.plan_match.match_state=!0)};var o="dfm-enc-";function s(t){var e="t6KJCZa5pDdQ9khoEM3Tj70fbP2eLSyc4BrsYugARqFIw1mzlGNVXOHiWvxUn8",n={},r=0;for(r=0;r<62;r++)n[e.charAt(r)]=e.charAt(61-r);var i="";for(r=0;r<t.length;r++)t.charAt(r)in n?i+=n[t.charAt(r)]:i+=t.charAt(r);return i}r.store={delete_time:2592e6,init:function(){this.migrateLocalData(),r.localData=this.getLocalData(),i.isNumber(r.localData.config_pull_interval_ms)&&r.localData.config_pull_interval_ms>0&&(r.updateDataAndSetListen.interval_time=r.localData.config_pull_interval_ms),this.removeLocalData(),r.log("初始化-获取-内存-localData")},getJSONData:function(){var t=i.localStorage.get(r.config.storageName);i.isString(t)&&(t=function(t){return 0===t.indexOf(o)&&(t=s(t=t.substring(8))),t}(t));try{t=JSON.parse(t)}catch(e){i.log(e)}return t}
2,saveJSONData:function(t){t=JSON.stringify(t),r.info.encrypt_cookie&&(t=function(t){return o+s(t)}(t)),i.localStorage.set(r.config.storageName,t)},migrateLocalData:function(){var t=this.getJSONData()||{},e=r.sa.store.getDistinctId();if(t.popup_sdk_users&&t.popup_sdk_plans)return!1;var n={popup_sdk_plans:{},popup_sdk_users:{}};n.popup_sdk_plans[e]=t,n.popup_sdk_users[e]={user_id:e},this.saveJSONData(n)},getLocalData:function(){var t=this.getJSONData(),e=r.sa.store.getDistinctId(),n=null;return t?(i.isObject(t.popup_sdk_users[e])&&t.popup_sdk_users[e].user_id&&(n=t.popup_sdk_users[e].user_id),n&&i.isObject(t.popup_sdk_plans[n])?(t.popup_sdk_plans[n].update_time=(new Date).getTime(),this.saveJSONData(t),t.popup_sdk_plans[n]):{}):{}},saveLocalData:function(){var t=this.getJSONData(),e=r.sa.store.getDistinctId(),n=null;if(!t)return!1;t.popup_sdk_users&&i.isObject(t.popup_sdk_users[e])&&t.popup_sdk_users[e].user_id&&(n=t.popup_sdk_users[e].user_id,t.popup_sdk_plans[n]=r.localData,this.saveJSONData(t))},removeLocalData:function(){var t=this.getJSONData(),e=this.delete_time;if(!t||!t.popup_sdk_plans||!t.popup_sdk_users)return!1;var n=JSON.parse(JSON.stringify(t.popup_sdk_plans)),r=JSON.parse(JSON.stringify(t.popup_sdk_users)),a=(new Date).getTime(),o=[];i.each(n,(function(n,r){a-n.update_time>e&&(delete t.popup_sdk_plans[r],o.push(r))})),i.each(r,(function(e,n){o.length>0&&i.each(o,(function(r){e.user_id&&r===e.user_id&&delete t.popup_sdk_users[n]}))})),this.saveJSONData(t)}},r.updateDataAndSetListen={active_state:!0,interval_time:6e5,save_interval:null,data_interval:null,image_list:null,local_data:null,filterConvertPlans:function(){var t=r.localData.popup_plans;if(!t||!i.isArray(t))return!1;var e=i.filter(t,(function(t){return!!t.convert_window&&!!t.is_in_convert_window}));r.convertPlans=e,r.log("初始化-异步的convertWindow",r.convertPlans),r.asyncConvert()},diffData:function(){var t=r.localData,e=JSON.parse(JSON.stringify(r.serverData)),n=(new Date).getTime();if(!e||i.isEmptyObject(e))return!1;var a=n-e.server_current_time;if(Math.abs(a)>=6e5)return!1;if(!t||i.isEmptyObject(t)||!t.popup_plans||0===t.popup_plans.length)return i.extend(r.localData,e),!1;var o=e.popup_plans;i.each(o,(function(e,n){var a=null;if(i.each(t.popup_plans,(function(t){t.plan_id===e.plan_id&&(a=t,e.audience_id||delete a.audience_id,i.isObject(e.window_update)&&i.each(e.window_update,(function(t,n){a.window_update&&a.window_update[n]===t||("trigger_window"===n?a.pattern_popup.matcher_list=e.pattern_popup.matcher_list:"convert_window"===n&&a.is_in_convert_window&&e.convert_window&&a.is_in_convert_window.start_time&&(a.is_in_convert_window.expire_time=r.ruleTime.getExpire(e.convert_window,a.is_in_convert_window.start_time)))})))})),!a)return!1;if(!e.window_update&&a.last_update_config_time!==e.last_update_config_time)return!1;var s=a.pattern_popup.matcher_list;i.extend2Lev(a,e),a.pattern_popup.matcher_list=s,o[n]=a})),i.extend(r.localData,e)},getEventRule:function(){var t=r.localData.popup_plans,e={};if(!t||!i.isArray(t))return!1;i.each(t,(function(t){var n=t.pattern_popup.matcher_list;i.each(n,(function(n){var r={plan:t,rule:[n]},a=n.event_name,o=!1;if(e[a]){if(i.each(e[a],(function(e){e.plan.plan_id===t.plan_id&&(e.rule.push(n),o=!0)})),o)return!1;e[a].push(r)}else e[a]=[r]}))})),i.each(e,(function(t){t.sort((function(t,e){var n=e.plan.absolute_priority-t.plan.absolute_priority;return 0===n?e.plan.plan_id-t.plan.plan_id:n}))})),r.eventRule=e,r.log("初始化-得到事件和计划的关系"),r.log("--------------------初始化完成--------------------等待事件触发计划--------------------")},registerListen:function(){var t=this;r.sa.events.on("send",(function(e){e.event&&r.eventRule[e.event]&&(i.isArray(r.localData.eventQueue)||(r.localData.eventQueue=[]),r.localData.eventQueue.push(e),t.updateLocalData(),r.eventTriggerProcess())})),r.sa.events.on("changeDistinctId",(function(e){t.changeId()})),r.sa.events.isReady()},setListenEvent:function(){this.diffData(),this.filterConvertPlans(),this.getEventRule(),this.updateLocalData()},loadImage:function(t){if(t.length<1)return!1;if(JSON.stringify(t)===JSON.stringify(this.image_list))return!1;this.image_list=t;for(var e=0;e<t.length;e++)n=t[e],(new Image).src=n;var n},getDataFromServer:function(t,e){var n=this,a=encodeURIComponent(r.sa.store.getDistinctId()),o=encodeURIComponent(r.info.platform),s=encodeURIComponent(r.info.project);t=i.isFunction(t)?t:function(){},e=i.isFunction(e)?e:function(){},i.ajax({url:r.info.api_base_url+"/sfo/user_popup_configs?distinct_id="+a+"&platform="+
vendor: 4,719 bytes, line 2
2o+"&project="+s+"&time="+(new Date).getTime()+"&sdk_version="+r.lib_version,type:"GET",cors:!0,credentials:!1,contentType:"application/json",success:function(a){if(!n.active_state)return e(),!1;r.log("初始化-修改-serverData-ajax获取"),i.isObject(a)&&a.server_current_time&&a.popup_plans&&/\d+\.\d+/.test(a.min_sdk_version_required)&&parseFloat(a.min_sdk_version_required)<=parseFloat(r.lib_version)?(r.serverData=a,i.isNumber(a.config_pull_interval_ms)&&a.config_pull_interval_ms>0&&(n.interval_time=a.config_pull_interval_ms),r.serverData.local_update_time=(new Date).getTime(),r.info.preload_image&&n.loadImage(r.getImageList(a.popup_plans)),n.updateUserPlans(),n.setListenEvent()):(r.log("初始化-数据异常-请求返回的数据错误-中止"),r.serverData={},r.localData={},n.updateLocalData()),t(),n.setIntervalTime(n.interval_time)},error:function(){if(!n.active_state)return e(),!1;r.log("初始化-数据异常-请求错误-中止"),r.serverData={},t(),n.setIntervalTime(n.interval_time)}})},updateUserPlans:function(){var t=r.store.getJSONData(),e=r.sa.store.getDistinctId(),n=r.serverData.user_id;t.popup_sdk_users[e]={user_id:n||e},n?t.popup_sdk_plans[n]?r.localData=t.popup_sdk_plans[n]:t.popup_sdk_plans[e]&&(r.localData=t.popup_sdk_plans[e],delete t.popup_sdk_plans[e]):t.popup_sdk_plans[e]&&(r.localData=t.popup_sdk_plans[e]),r.localData.update_time=(new Date).getTime(),r.store.saveJSONData(t)},setIntervalTime:function(t){var e=this;this.data_interval=setTimeout((function(){r.log("10分钟定时更新数据开始-------"),e.getDataFromServer()}),t)},setFirstListen:function(){var t=this;this.getDataFromServer((function(){t.registerListen()}))},updateLocalData:function(){var t=JSON.stringify(r.localData);this.local_data!==t&&(this.local_data=t,r.store.saveLocalData())},initial:function(){r.store.init();var t=r.localData.local_update_time,e=(new Date).getTime();if(i.isNumber(t)){var n=e-t;n<=0||n>=this.interval_time?this.setFirstListen():(this.setIntervalTime(this.interval_time-n),this.setListenEvent(),this.registerListen(),r.info.preload_image&&this.loadImage(r.getImageList(r.localData.popup_plans)))}else this.setFirstListen()},changeId:function(){this.stopAllState(),this.startState({getLocalData:!1})},stopAllState:function(){this.active_state=!1,r.eventRule={},this.data_interval&&window.clearTimeout(this.data_interval),this.save_interval&&window.clearInterval(this.save_interval),r.asyncConvert.timer&&window.clearTimeout(r.asyncConvert.timer),r.convertPlans=[],r.localData={},this.resetState()},resetState:function(){if("WEB"===r.info.platform)return!1;!document.querySelector("div[data-sf-mask]")&&r.isRun&&(r.isRun=!1)},startState:function(t){this.active_state=!0,(t=t||{getLocalData:!0}).getLocalData&&(this.resetState(),r.localData=r.store.getLocalData()),this.getDataFromServer()}},r.testSend={hasParam:function(){var t=i.URL(window.location.href).searchParams,e=t.get("sf_popup_test")||"",n=t.get("popup_window_id")||"",r=t.get("platform");return!(!e||!n)&&{sf_popup_test:e,popup_window_id:n,platform:r}},start:function(){if("WEB"!==this.hasParam().platform)return r.log("H5测试弹窗请在移动端查看!"),!1;this.webCampaign()},webCampaign:function(){var t=r.info.project,e=r.info.platform,n=this.hasParam().popup_window_id,a=encodeURIComponent(r.sa.store.getDistinctId());i.ajax({url:r.info.api_base_url+"/sfo/popup_windows/"+n+"?project="+encodeURIComponent(t)+"&time="+(new Date).getTime()+"&sdk_version="+r.lib_version+"&platform="+encodeURIComponent(e)+"&distinct_id="+a,type:"GET",credentials:!1,cors:!0,contentType:"application/json",success:function(t){var e,n=i.getUuid();i.isObject(t)||(r.sa.log("测试弹窗-服务端数据格式不合法",t),t={});try{e=JSON.parse(t.content)}catch(s){r.sa.log("测试弹窗-content解析失败,content:",t,s)}var a=r.getPopupInfo(e);a.$sf_msg_id=n;var o={content:t.content,type:t.popup_type||"CUSTOMIZED"};i.isString(t.content)?"withoutCampaignListener"===r.info.supportCustom||"withoutStart"===r.info.supportCustom?(a.$sf_succeed=!1,a.$sf_fail_reason="自定义触达计划未实现弹窗生命周期回调",r.track.popupDisplay(a),r.info.popup_campaign_listener.onFailed(o,1006,"自定义触达计划未实现弹窗生命周期回调")):(a.$sf_succeed=!0,r.track.popupDisplay(a),r.info.popup_campaign_listener.onStart(o)):(a.$sf_succeed=!1,a.$sf_fail_reason="预览信息解析失败,请检查计划配置",r.track.popupDisplay(a),r.info.popup_campaign_listener.onFailed(o,1001,"预览信息解析失败,请检查计划配置"))},error:function(t){r.log("测试弹窗获取数据错误",t)}})}},r.setPara=function(t){i.isObject(t)||(t={}),r.info=i.extend({},r.defaultPara,t),r.sa=r.getWebSDK();var e=r.sa;
2return e?(!0===e.para.encrypt_cookie&&(r.info.encrypt_cookie=!0),i.isString(r.info.api_base_url)&&"http"===r.info.api_base_url.slice(0,4)?"http:"===r.info.api_base_url.slice(0,5)&&"https:"===location.protocol?(r.log("您的当前页面是https的地址,api_base_url 也必须是https!"),!1):(r.info.api_base_url="/"===r.info.api_base_url.slice(-1)?r.info.api_base_url.slice(0,-1):r.info.api_base_url,i.isString(e.para.server_url)&&"http"===e.para.server_url.slice(0,4)?(r.info.project||(r.info.project=i.URL(e.para.server_url).searchParams.get("project")||"default"),r.info.supportCustom=!0,i.isObject(r.info.popup_campaign_listener)?(i.isFunction(r.info.popup_campaign_listener.shouldStart)||(r.info.popup_campaign_listener.shouldStart=function(){return!0}),i.isFunction(r.info.popup_campaign_listener.onStart)||(r.info.supportCustom="withoutStart",r.info.popup_campaign_listener.onStart=function(){}),i.isFunction(r.info.popup_campaign_listener.onEnd)||(r.info.popup_campaign_listener.onEnd=function(){}),i.isFunction(r.info.popup_campaign_listener.onFailed)||(r.info.popup_campaign_listener.onFailed=function(){})):(r.info.supportCustom="withoutCampaignListener",r.info.popup_campaign_listener={shouldStart:function(){return!0},onStart:function(){},onEnd:function(){},onFailed:function(){}}),!0):(r.log("server_url 必须填写有效数据接收地址"),!1)):(r.log("popup 必须填写有效 api_base_url"),!1)):(r.log("web js sdk 还没有初始化完成"),!1)},r.init=function(){if(!r.isSupportPopup())return!1;if(window.screen.width&&Number(window.screen.width)<=1024)return"object"==typeof console&&console.log&&console.log("Web 弹窗仅支持 PC端,且屏幕宽度大于 1024"),!1;var t={};return arguments.length>0&&(1===arguments.length&&i.isObject(arguments[0])?t=arguments[0]:arguments.length>=2&&i.isObject(arguments[1])&&(t=arguments[1])),!!this.setPara(t)&&(r.info.platform="WEB",!!r.setIsLoad()&&void(r.testSend.hasParam()?r.testSend.start():(r.listenPageStateChange(),r.updateDataAndSetListen.initial())))},window.SensorsDataWebJSSDKPlugin&&"[object Object]"===Object.prototype.toString.call(window.SensorsDataWebJSSDKPlugin)?window.SensorsDataWebJSSDKPlugin.WebPopup=window.SensorsDataWebJSSDKPlugin.WebPopup||r:window.SensorsDataWebJSSDKPlugin={WebPopup:r},e.default=r},97040:function(t,e,n){"use strict";var r=n(43724),i=n(24913),a=n(6980);t.exports=function(t,e,n){r?i.f(t,e,a(0,n)):t[e]=n}},76080:function(t,e,n){"use strict";var r=n(27476),i=n(79306),a=n(40616),o=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:a?o(t,e):function(){return t.apply(e,arguments)}}},27476:function(t,e,n){"use strict";var r=n(44576),i=n(79504);t.exports=function(t){if("Function"===r(t))return i(t)}},50851:function(t,e,n){"use strict";var r=n(36955),i=n(55966),a=n(64117),o=n(26269),s=n(78227)("iterator");t.exports=function(t){if(!a(t))return i(t,s)||i(t,"@@iterator")||o[r(t)]}},70081:function(t,e,n){"use strict";var r=n(69565),i=n(79306),a=n(28551),o=n(16823),s=n(50851),u=TypeError;t.exports=function(t,e){var n=arguments.length<2?s(t):e;if(i(n))return a(r(n,t));throw new u(o(t)+" is not iterable")}},44209:function(t,e,n){"use strict";var r=n(78227),i=n(26269),a=r("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||o[a]===t)}},72652:function(t,e,n){"use strict";var r=n(76080),i=n(69565),a=n(28551),o=n(16823),s=n(44209),u=n(26198),c=n(1625),l=n(70081),p=n(50851),h=n(9539),f=TypeError,d=function(t,e){this.stopped=t,this.result=e},g=d.prototype;t.exports=function(t,e,n){var _,m,v,y,b,w,S,E=n&&n.that,T=!(!n||!n.AS_ENTRIES),A=!(!n||!n.IS_RECORD),O=!(!n||!n.IS_ITERATOR),k=!(!n||!n.INTERRUPTED),C=r(e,E),P=function(t){return _&&h(_,"normal",t),new d(!0,t)},I=function(t){return T?(a(t),k?C(t[0],t[1],P):C(t[0],t[1])):k?C(t,P):C(t)};if(A)_=t.iterator;else if(O)_=t;else{if(!(m=p(t)))throw new f(o(t)+" is not iterable");if(s(m)){for(v=0,y=u(t);y>v;v++)if((b=I(t[v]))&&c(g,b))return b;return new d(!1)}_=l(t,m)}for(w=A?t.next:_.next;!(S=i(w,_)).done;){try{b=I(S.value)}catch(D){h(_,"throw",D)}if("object"==typeof b&&b&&c(g,b))return b}return new d(!1)}},9539:function(t,e,n){"use strict";var r=n(69565),i=n(28551),a=n(55966);t.exports=function(t,e,n){var o,s;i(t);
vendor: 2,002 bytes, line 2
2try{if(!(o=a(t,"return"))){if("throw"===e)throw n;return n}o=r(o,t)}catch(u){s=!0,o=u}if("throw"===e)throw n;if(s)throw o;return i(o),n}},26269:function(t){"use strict";t.exports={}},18866:function(t,e,n){"use strict";var r=n(43802).end,i=n(60706);t.exports=i("trimEnd")?function(){return r(this)}:"".trimEnd},60706:function(t,e,n){"use strict";var r=n(10350).PROPER,i=n(79039),a=n(47452);t.exports=function(t){return i((function(){return!!a[t]()||"​…᠎"!=="​…᠎"[t]()||r&&a[t].name!==t}))}},53487:function(t,e,n){"use strict";var r=n(43802).start,i=n(60706);t.exports=i("trimStart")?function(){return r(this)}:"".trimStart},43802:function(t,e,n){"use strict";var r=n(79504),i=n(67750),a=n(655),o=n(47452),s=r("".replace),u=RegExp("^["+o+"]+"),c=RegExp("(^|[^"+o+"])["+o+"]+$"),l=function(t){return function(e){var n=a(i(e));return 1&t&&(n=s(n,u,"")),2&t&&(n=s(n,c,"$1")),n}};t.exports={start:l(1),end:l(2),trim:l(3)}},47452:function(t){"use strict";t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},55081:function(t,e,n){"use strict";var r=n(46518),i=n(24475);r({global:!0,forced:i.globalThis!==i},{globalThis:i})},53921:function(t,e,n){"use strict";var r=n(46518),i=n(72652),a=n(97040);r({target:"Object",stat:!0},{fromEntries:function(t){var e={};return i(t,(function(t,n){a(e,t,n)}),{AS_ENTRIES:!0}),e}})},39202:function(t,e,n){"use strict";n(33313);var r=n(46518),i=n(18866);r({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==i},{trimEnd:i})},58934:function(t,e,n){"use strict";var r=n(46518),i=n(53487);r({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==i},{trimLeft:i})},33313:function(t,e,n){"use strict";var r=n(46518),i=n(18866);r({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==i},{trimRight:i})},43359:function(t,e,n){"use strict";n(58934);var r=n(46518),i=n(53487);r({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==i},{trimStart:i})},62480:function(t,e,n){"use strict";n(55081)}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.