!function(e){"use strict";function t(e,t,i,n){return new(i||(i=Promise))((function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((n=n.apply(e,t||[])).next())}))}const i=(e,i)=>t(void 0,void 0,void 0,(function*(){return(yield fetch(`https://raven-edge.aditude.io/api/v1${i}`,{method:e,mode:"cors"})).json()})),n=e=>t(void 0,void 0,void 0,(function*(){const t=e.geo?`&geo=${encodeURIComponent(e.geo)}`:"";return yield i("GET",`/ravenconfig?ppid=${encodeURIComponent(e.propertyId)}${t}`)})),r="padding:1px 3px;font-size:0.75em;color:#ffffff;",s=`background-color:#000;margin-left:1px;${r}`,o=`background-color:#5D3FD3;${r}`,a="font-size:0.9em;",l=(e,t)=>[`%craven%c${e}%c ${t}`,s,o,a],u=function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"log";const r=i?l(i,e):(e=>[`%craven%c ${e}`,s,a])(e);t?console[n](...r,t):console[n](...r)},d=e=>{var t;const i=new URLSearchParams(window.location.search);let n=0;return i.has("ravenLogLevel")&&(n=parseInt(null!==(t=i.get("ravenLogLevel"))&&void 0!==t?t:"0")),n>=e},c=(e,t,i,n,r)=>d(e)&&u(t,i,n,r),p={always:u,debug:(e,t,i)=>c(3,e,t,i),enabled:()=>d(3),error:(e,t,i)=>{c(1,e,t,i,"error"),((e,t)=>{window.Raven=window.Raven||{cmd:[]},window.Raven.cmd=window.Raven.cmd||[],window.Raven.cmd.push((i=>{let{events:n}=i;const r=t?"string"==typeof t?t:JSON.stringify(t):null;n.send("ravenError",{code:null,message:`${e}${r||""}`})}))})(e,t)},verbose:(e,t,i)=>c(4,e,t,i),warn:(e,t,i)=>c(2,e,t,i,"warn")};let h;const f=new Uint8Array(16);function m(){if(!h&&(h="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!h))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return h(f)}const g=[];for(let e=0;e<256;++e)g.push((e+256).toString(16).slice(1));var v={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function b(e,t,i){if(v.randomUUID&&!t&&!e)return v.randomUUID();const n=(e=e||{}).random||(e.rng||m)();return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return g[e[t+0]]+g[e[t+1]]+g[e[t+2]]+g[e[t+3]]+"-"+g[e[t+4]]+g[e[t+5]]+"-"+g[e[t+6]]+g[e[t+7]]+"-"+g[e[t+8]]+g[e[t+9]]+"-"+g[e[t+10]]+g[e[t+11]]+g[e[t+12]]+g[e[t+13]]+g[e[t+14]]+g[e[t+15]]}(n)}var w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function x(e){this._maxSize=e,this.clear()}x.prototype.clear=function(){this._size=0,this._values=Object.create(null)},x.prototype.get=function(e){return this._values[e]},x.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var E=/[^.^\]^[]+|(?=\[\]|\.\.)/g,k=/^\d+$/,S=/^\d/,O=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,T=/^\s*(['"]?)(.*?)(\1)\s*$/,_=new x(512),I=new x(512),j=new x(512),A={Cache:x,split:$,normalizePath:F,setter:function(e){var t=F(e);return I.get(e)||I.set(e,(function(e,i){for(var n=0,r=t.length,s=e;ne.match(D)||[],C=(e,t)=>M(e).join(t).toLowerCase(),P=e=>M(e).reduce(((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`),"");var R=P,z=e=>C(e,"_"),q={exports:{}};function V(e,t){var i=e.length,n=new Array(i),r={},s=i,o=function(e){for(var t=new Map,i=0,n=e.length;i"",H=/^Symbol\((.*)\)(.*)$/;function J(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==e||!0===e||!1===e)return""+e;const i=typeof e;if("number"===i)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===i)return t?`"${e}"`:e;if("function"===i)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===i)return Z.call(e).replace(H,"Symbol($1)");const n=G.call(e).slice(8,-1);return"Date"===n?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===n||e instanceof Error?"["+B.call(e)+"]":"RegExp"===n?W.call(e):null}function Y(e,t){let i=J(e,t);return null!==i?i:JSON.stringify(e,(function(e,i){let n=J(this[e],t);return null!==n?n:i}),2)}function K(e){return null==e?[]:[].concat(e)}let Q,X,ee,te=/\$\{\s*(\w+)\s*\}/g;Q=Symbol.toStringTag;class ie{constructor(e,t,i,n){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Q]="Error",this.name="ValidationError",this.value=t,this.path=i,this.type=n,this.errors=[],this.inner=[],K(e).forEach((e=>{if(ne.isError(e)){this.errors.push(...e.errors);const t=e.inner.length?e.inner:[e];this.inner.push(...t)}else this.errors.push(e)})),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}X=Symbol.hasInstance,ee=Symbol.toStringTag;class ne extends Error{static formatError(e,t){const i=t.label||t.path||"this";return i!==t.path&&(t=Object.assign({},t,{path:i})),"string"==typeof e?e.replace(te,((e,i)=>Y(t[i]))):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,i,n,r){const s=new ie(e,t,i,n);if(r)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[ee]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ne)}static[X](e){return ie[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let re={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:e=>{let{path:t,type:i,value:n,originalValue:r}=e;const s=null!=r&&r!==n?` (cast from the value \`${Y(r,!0)}\`).`:".";return"mixed"!==i?`${t} must be a \`${i}\` type, but the final value was: \`${Y(n,!0)}\``+s:`${t} must match the configured type. The validated value was: \`${Y(n,!0)}\``+s}},se={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},oe={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},ae={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},le={isValue:"${path} field must be ${value}"},ue={noUnknown:"${path} field has unspecified keys: ${unknown}"},de={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},ce={notType:e=>{const{path:t,value:i,spec:n}=e,r=n.types.length;if(Array.isArray(i)){if(i.lengthr)return`${t} tuple value has too many items, expected a length of ${r} but got ${i.length} for value: \`${Y(i,!0)}\``}return ne.formatError(re.notType,e)}};Object.assign(Object.create(null),{mixed:re,string:se,number:oe,date:ae,object:ue,array:de,boolean:le,tuple:ce});const pe=e=>e&&e.__isYupSchema__;class he{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:i,then:n,otherwise:r}=t,s="function"==typeof i?i:function(){for(var e=arguments.length,t=new Array(e),n=0;ne===i))};return new he(e,((e,t)=>{var i;let o=s(...e)?n:r;return null!=(i=null==o?void 0:o(t))?i:t}))}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let i=this.refs.map((e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context))),n=this.fn(i,e,t);if(void 0===n||n===e)return e;if(!pe(n))throw new TypeError("conditions must return a schema object");return n.resolve(t)}}const fe="$",me=".";class ge{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===fe,this.isValue=this.key[0]===me,this.isSibling=!this.isContext&&!this.isValue;let i=this.isContext?fe:this.isValue?me:"";this.path=this.key.slice(i.length),this.getter=this.path&&A.getter(this.path,!0),this.map=t.map}getValue(e,t,i){let n=this.isContext?i:this.isValue?e:t;return this.getter&&(n=this.getter(n||{})),this.map&&(n=this.map(n)),n}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}ge.prototype.__isYupRef=!0;const ve=e=>null==e;function be(e){function t(t,i,n){let{value:r,path:s="",options:o,originalValue:a,schema:l}=t;const{name:u,test:d,params:c,message:p,skipAbsent:h}=e;let{parent:f,context:m,abortEarly:g=l.spec.abortEarly,disableStackTrace:v=l.spec.disableStackTrace}=o;function b(e){return ge.isRef(e)?e.getValue(r,f,m):e}function w(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Object.assign({value:r,originalValue:a,label:l.spec.label,path:e.path||s,spec:l.spec,disableStackTrace:e.disableStackTrace||v},c,e.params);for(const e of Object.keys(t))t[e]=b(t[e]);const i=new ne(ne.formatError(e.message||p,t),r,t.path,e.type||u,t.disableStackTrace);return i.params=t,i}const y=g?i:n;let x={path:s,parent:f,type:u,from:o.from,createError:w,resolve:b,options:o,originalValue:a,schema:l};const E=e=>{ne.isError(e)?y(e):e?n(null):y(w())},k=e=>{ne.isError(e)?y(e):i(e)};if(h&&ve(r))return E(!0);let S;try{var O;if(S=d.call(x,r,x),"function"==typeof(null==(O=S)?void 0:O.then)){if(o.sync)throw new Error(`Validation test of type: "${x.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(S).then(E,k)}}catch(e){return void k(e)}E(S)}return t.OPTIONS=e,t}function we(e,t,i){let n,r,s,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i;return t?(A.forEach(t,((a,l,u)=>{let d=l?a.slice(1,a.length-1):a,c="tuple"===(e=e.resolve({context:o,parent:n,value:i})).type,p=u?parseInt(d,10):0;if(e.innerType||c){if(c&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(i&&p>=i.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);n=i,i=i&&i[p],e=c?e.spec.types[p]:e.innerType}if(!u){if(!e.fields||!e.fields[d])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);n=i,i=i&&i[d],e=e.fields[d]}r=d,s=l?"["+a+"]":"."+a})),{schema:e,parent:n,parentPath:r}):{parent:n,parentPath:t,schema:e}}class ye extends Set{describe(){const e=[];for(const t of this.values())e.push(ge.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const i of this.values())t.push(e(i));return t}clone(){return new ye(this.values())}merge(e,t){const i=this.clone();return e.forEach((e=>i.add(e))),t.forEach((e=>i.delete(e))),i}}function xe(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map;if(pe(e)||!e||"object"!=typeof e)return e;if(i.has(e))return i.get(e);if(e instanceof Date)t=new Date(e.getTime()),i.set(e,t);else if(e instanceof RegExp)t=new RegExp(e),i.set(e,t);else if(Array.isArray(e)){t=new Array(e.length),i.set(e,t);for(let n=0;n{this.typeError(re.notType)})),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation((e=>{e.nonNullable()}))}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=xe(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(){if(0===arguments.length)return this.spec.meta;let e=this.clone();return e.spec.meta=Object.assign(e.spec.meta||{},arguments.length<=0?void 0:arguments[0]),e}withMutation(e){let t=this._mutate;this._mutate=!0;let i=e(this);return this._mutate=t,i}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,i=e.clone();const n=Object.assign({},t.spec,i.spec);return i.spec=n,i.internalTests=Object.assign({},t.internalTests,i.internalTests),i._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),i._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),i.tests=t.tests,i.exclusiveTests=t.exclusiveTests,i.withMutation((t=>{e.tests.forEach((e=>{t.test(e.OPTIONS)}))})),i.transforms=[...t.transforms,...i.transforms],i}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let i=t.conditions;t=t.clone(),t.conditions=[],t=i.reduce(((t,i)=>i.resolve(t,e)),t),t=t.resolve(e)}return t}resolveOptions(e){var t,i,n,r;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(i=e.abortEarly)?i:this.spec.abortEarly,recursive:null!=(n=e.recursive)?n:this.spec.recursive,disableStackTrace:null!=(r=e.disableStackTrace)?r:this.spec.disableStackTrace})}cast(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.resolve(Object.assign({value:e},t)),n="ignore-optionality"===t.assert,r=i._cast(e,t);if(!1!==t.assert&&!i.isType(r)){if(n&&ve(r))return r;let s=Y(e),o=Y(r);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${i.type}". \n\nattempted value: ${s} \n`+(o!==s?`result of cast: ${o}`:""))}return r}_cast(e,t){let i=void 0===e?e:this.transforms.reduce(((t,i)=>i.call(this,t,e,this)),e);return void 0===i&&(i=this.getDefault(t)),i}_validate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,{path:r,originalValue:s=e,strict:o=this.spec.strict}=t,a=e;o||(a=this._cast(a,Object.assign({assert:!1},t)));let l=[];for(let e of Object.values(this.internalTests))e&&l.push(e);this.runTests({path:r,value:a,originalValue:s,options:t,tests:l},i,(e=>{if(e.length)return n(e,a);this.runTests({path:r,value:a,originalValue:s,options:t,tests:this.tests},i,n)}))}runTests(e,t,i){let n=!1,{tests:r,value:s,originalValue:o,path:a,options:l}=e,u=e=>{n||(n=!0,t(e,s))},d=e=>{n||(n=!0,i(e,s))},c=r.length,p=[];if(!c)return d([]);let h={value:s,originalValue:o,path:a,options:l,schema:this};for(let e=0;ethis.resolve(d)._validate(u,d,t,i)}validate(e,t){var i;let n=this.resolve(Object.assign({},t,{value:e})),r=null!=(i=null==t?void 0:t.disableStackTrace)?i:n.spec.disableStackTrace;return new Promise(((i,s)=>n._validate(e,t,((e,t)=>{ne.isError(e)&&(e.value=t),s(e)}),((e,t)=>{e.length?s(new ne(e,t,void 0,void 0,r)):i(t)}))))}validateSync(e,t){var i;let n,r=this.resolve(Object.assign({},t,{value:e})),s=null!=(i=null==t?void 0:t.disableStackTrace)?i:r.spec.disableStackTrace;return r._validate(e,Object.assign({},t,{sync:!0}),((e,t)=>{throw ne.isError(e)&&(e.value=t),e}),((t,i)=>{if(t.length)throw new ne(t,e,void 0,void 0,s);n=i})),n}isValid(e,t){return this.validate(e,t).then((()=>!0),(e=>{if(ne.isError(e))return!1;throw e}))}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(ne.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):xe(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.clone({strict:e})}nullability(e,t){const i=this.clone({nullable:e});return i.internalTests.nullable=be({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),i}optionality(e,t){const i=this.clone({optional:e});return i.internalTests.optionality=be({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),i}optional(){return this.optionality(!0)}defined(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:re.defined;return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:re.notNull;return this.nullability(!1,e)}required(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:re.required;return this.clone().withMutation((t=>t.nonNullable(e).defined(e)))}notRequired(){return this.clone().withMutation((e=>e.nullable().optional()))}transform(e){let t=this.clone();return t.transforms.push(e),t}test(){let e;if(e=1===arguments.length?"function"==typeof(arguments.length<=0?void 0:arguments[0])?{test:arguments.length<=0?void 0:arguments[0]}:arguments.length<=0?void 0:arguments[0]:2===arguments.length?{name:arguments.length<=0?void 0:arguments[0],test:arguments.length<=1?void 0:arguments[1]}:{name:arguments.length<=0?void 0:arguments[0],message:arguments.length<=1?void 0:arguments[1],test:arguments.length<=2?void 0:arguments[2]},void 0===e.message&&(e.message=re.default),"function"!=typeof e.test)throw new TypeError("`test` is a required parameters");let t=this.clone(),i=be(e),n=e.exclusive||e.name&&!0===t.exclusiveTests[e.name];if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return e.name&&(t.exclusiveTests[e.name]=!!e.exclusive),t.tests=t.tests.filter((t=>{if(t.OPTIONS.name===e.name){if(n)return!1;if(t.OPTIONS.test===i.OPTIONS.test)return!1}return!0})),t.tests.push(i),t}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let i=this.clone(),n=K(e).map((e=>new ge(e)));return n.forEach((e=>{e.isSibling&&i.deps.push(e.key)})),i.conditions.push("function"==typeof t?new he(n,t):he.fromOptions(n,t)),i}typeError(e){let t=this.clone();return t.internalTests.typeError=be({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:re.oneOf,i=this.clone();return e.forEach((e=>{i._whitelist.add(e),i._blacklist.delete(e)})),i.internalTests.whiteList=be({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,i=t.resolveAll(this.resolve);return!!i.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:i}})}}),i}notOneOf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:re.notOneOf,i=this.clone();return e.forEach((e=>{i._blacklist.add(e),i._whitelist.delete(e)})),i.internalTests.blacklist=be({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,i=t.resolveAll(this.resolve);return!i.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:i}})}}),i}strip(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:i,meta:n,optional:r,nullable:s}=t.spec;return{meta:n,label:i,optional:r,nullable:s,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map((e=>({name:e.OPTIONS.name,params:e.OPTIONS.params}))).filter(((e,t,i)=>i.findIndex((t=>t.name===e.name))===t))}}}Ee.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Ee.prototype[`${e}At`]=function(t,i){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{parent:r,parentPath:s,schema:o}=we(this,t,i,n.context);return o[e](r&&r[s],Object.assign({},n,{parent:r,path:t}))};for(const e of["equals","is"])Ee.prototype[e]=Ee.prototype.oneOf;for(const e of["not","nope"])Ee.prototype[e]=Ee.prototype.notOneOf;function ke(){return new Se}class Se extends Ee{constructor(){super({type:"boolean",check:e=>(e instanceof Boolean&&(e=e.valueOf()),"boolean"==typeof e)}),this.withMutation((()=>{this.transform(((e,t,i)=>{if(i.spec.coerce&&!i.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e}))}))}isTrue(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:le.isValue;return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>ve(e)||!0===e})}isFalse(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:le.isValue;return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>ve(e)||!1===e})}default(e){return super.default(e)}defined(e){return super.defined(e)}optional(){return super.optional()}required(e){return super.required(e)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(e){return super.nonNullable(e)}strip(e){return super.strip(e)}}ke.prototype=Se.prototype;const Oe=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Te(e){var t,i;const n=Oe.exec(e);return n?{year:_e(n[1]),month:_e(n[2],1)-1,day:_e(n[3],1),hour:_e(n[4]),minute:_e(n[5]),second:_e(n[6]),millisecond:n[7]?_e(n[7].substring(0,3)):0,precision:null!=(t=null==(i=n[7])?void 0:i.length)?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:_e(n[10]),minuteOffset:_e(n[11])}:null}function _e(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Number(e)||t}let Ie=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,je=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Ae=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Fe=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),$e=e=>ve(e)||e===e.trim(),Ue={}.toString();function Ne(){return new De}class De extends Ee{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation((()=>{this.transform(((e,t,i)=>{if(!i.spec.coerce||i.isType(e))return e;if(Array.isArray(e))return e;const n=null!=e&&e.toString?e.toString():e;return n===Ue?e:n}))}))}required(e){return super.required(e).withMutation((t=>t.test({message:e||re.required,name:"required",skipAbsent:!0,test:e=>!!e.length})))}notRequired(){return super.notRequired().withMutation((e=>(e.tests=e.tests.filter((e=>"required"!==e.OPTIONS.name)),e)))}length(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:se.length;return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:se.min;return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:se.max;return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let i,n,r=!1;return t&&("object"==typeof t?({excludeEmptyString:r=!1,message:i,name:n}=t):i=t),this.test({name:n||"matches",message:i||se.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&r||-1!==t.search(e)})}email(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:se.email;return this.matches(Ie,{name:"email",message:e,excludeEmptyString:!0})}url(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:se.url;return this.matches(je,{name:"url",message:e,excludeEmptyString:!0})}uuid(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:se.uuid;return this.matches(Ae,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,i,n="";return e&&("object"==typeof e?({message:n="",allowOffset:t=!1,precision:i}=e):n=e),this.matches(Fe,{name:"datetime",message:n||se.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||se.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const i=Te(e);return!!i&&!!i.z}}).test({name:"datetime_precision",message:n||se.datetime_precision,params:{precision:i},skipAbsent:!0,test:e=>{if(!e||null==i)return!0;const t=Te(e);return!!t&&t.precision===i}})}ensure(){return this.default("").transform((e=>null===e?"":e))}trim(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:se.trim;return this.transform((e=>null!=e?e.trim():e)).test({message:e,name:"trim",test:$e})}lowercase(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:se.lowercase;return this.transform((e=>ve(e)?e:e.toLowerCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>ve(e)||e===e.toLowerCase()})}uppercase(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:se.uppercase;return this.transform((e=>ve(e)?e:e.toUpperCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>ve(e)||e===e.toUpperCase()})}}Ne.prototype=De.prototype;function Me(){return new Ce}class Ce extends Ee{constructor(){super({type:"number",check:e=>(e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!(e=>e!=+e)(e))}),this.withMutation((()=>{this.transform(((e,t,i)=>{if(!i.spec.coerce)return e;let n=e;if("string"==typeof n){if(n=n.replace(/\s/g,""),""===n)return NaN;n=+n}return i.isType(n)||null===n?n:parseFloat(n)}))}))}min(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oe.min;return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t>=this.resolve(e)}})}max(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oe.max;return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t<=this.resolve(e)}})}lessThan(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oe.lessThan;return this.test({message:t,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(t){return t1&&void 0!==arguments[1]?arguments[1]:oe.moreThan;return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(t){return t>this.resolve(e)}})}positive(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe.positive;return this.moreThan(0,e)}negative(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe.negative;return this.lessThan(0,e)}integer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe.integer;return this.test({name:"integer",message:e,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform((e=>ve(e)?e:0|e))}round(e){var t;let i=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===i.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+i.join(", "));return this.transform((t=>ve(t)?t:Math[e](t)))}}Me.prototype=Ce.prototype;let Pe=new Date("");class Re extends Ee{constructor(){super({type:"date",check(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}}),this.withMutation((()=>{this.transform(((e,t,i)=>!i.spec.coerce||i.isType(e)||null===e?e:(e=function(e){const t=Te(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let i=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(i=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(i=0-i)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+i,t.second,t.millisecond)}(e),isNaN(e)?Re.INVALID_DATE:new Date(e))))}))}prepareParam(e,t){let i;if(ge.isRef(e))i=e;else{let n=this.cast(e);if(!this._typeCheck(n))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);i=n}return i}min(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ae.min,i=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(i)}})}max(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ae.max,i=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(i)}})}}function ze(e,t){let i=1/0;return e.some(((e,n)=>{var r;if(null!=(r=t.path)&&r.includes(e))return i=n,!0})),i}function qe(e){return(t,i)=>ze(e,t)-ze(e,i)}Re.INVALID_DATE=Pe,Re.prototype;const Ve=(e,t,i)=>{if("string"!=typeof e)return e;let n=e;try{n=JSON.parse(e)}catch(e){}return i.isType(n)?n:e};function Le(e){if("fields"in e){const t={};for(const[i,n]of Object.entries(e.fields))t[i]=Le(n);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=Le(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(Le)}):"optional"in e?e.optional():e}let Ge=e=>"[object Object]"===Object.prototype.toString.call(e);const Be=qe([]);function We(e){return new Ze(e)}class Ze extends Ee{constructor(e){super({type:"object",check:e=>Ge(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=Be,this._nodes=[],this._excludedEdges=[],this.withMutation((()=>{e&&this.shape(e)}))}_cast(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i;let n=super._cast(e,t);if(void 0===n)return this.getDefault(t);if(!this._typeCheck(n))return n;let r=this.fields,s=null!=(i=t.stripUnknown)?i:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(n).filter((e=>!this._nodes.includes(e)))),a={},l=Object.assign({},t,{parent:a,__validating:t.__validating||!1}),u=!1;for(const e of o){let i=r[e],o=e in n;if(i){let r,s=n[e];l.path=(t.path?`${t.path}.`:"")+e,i=i.resolve({value:s,context:t.context,parent:a});let o=i instanceof Ee?i.spec:void 0,d=null==o?void 0:o.strict;if(null!=o&&o.strip){u=u||e in n;continue}r=t.__validating&&d?n[e]:i.cast(n[e],l),void 0!==r&&(a[e]=r)}else o&&!s&&(a[e]=n[e]);o===e in a&&a[e]===n[e]||(u=!0)}return u?a:n}_validate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,{from:r=[],originalValue:s=e,recursive:o=this.spec.recursive}=t;t.from=[{schema:this,value:s},...r],t.__validating=!0,t.originalValue=s,super._validate(e,t,i,((e,r)=>{if(!o||!Ge(r))return void n(e,r);s=s||r;let a=[];for(let e of this._nodes){let i=this.fields[e];i&&!ge.isRef(i)&&a.push(i.asNestedTest({options:t,key:e,parent:r,parentPath:t.path,originalParent:s}))}this.runTests({tests:a,value:r,originalValue:s,options:t},i,(t=>{n(t.sort(this._sortErrors).concat(e),r)}))}))}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),i=t.fields;for(let[e,t]of Object.entries(this.fields)){const n=i[e];i[e]=void 0===n?t:n}return t.withMutation((t=>t.setFields(i,[...this._excludedEdges,...e._excludedEdges])))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach((i=>{var n;const r=this.fields[i];let s=e;null!=(n=s)&&n.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[i]})),t[i]=r&&"getDefault"in r?r.getDefault(s):void 0})),t}setFields(e,t){let i=this.clone();return i.fields=e,i._nodes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=[],n=new Set,r=new Set(t.map((e=>{let[t,i]=e;return`${t}-${i}`})));function s(e,t){let s=A.split(e)[0];n.add(s),r.has(`${t}-${s}`)||i.push([t,s])}for(const t of Object.keys(e)){let i=e[t];n.add(t),ge.isRef(i)&&i.isSibling?s(i.path,t):pe(i)&&"deps"in i&&i.deps.forEach((e=>s(e,t)))}return L.array(Array.from(n),i).reverse()}(e,t),i._sortErrors=qe(Object.keys(e)),t&&(i._excludedEdges=t),i}shape(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.clone().withMutation((i=>{let n=i._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),n=[...i._excludedEdges,...t]),i.setFields(Object.assign(i.fields,e),n)}))}partial(){const e={};for(const[t,i]of Object.entries(this.fields))e[t]="optional"in i&&i.optional instanceof Function?i.optional():i;return this.setFields(e)}deepPartial(){return Le(this)}pick(e){const t={};for(const i of e)this.fields[i]&&(t[i]=this.fields[i]);return this.setFields(t,this._excludedEdges.filter((t=>{let[i,n]=t;return e.includes(i)&&e.includes(n)})))}omit(e){const t=[];for(const i of Object.keys(this.fields))e.includes(i)||t.push(i);return this.pick(t)}from(e,t,i){let n=A.getter(e,!0);return this.transform((r=>{if(!r)return r;let s=r;return((e,t)=>{const i=[...A.normalizePath(t)];if(1===i.length)return i[0]in e;let n=i.pop(),r=A.getter(A.join(i),!0)(e);return!(!r||!(n in r))})(r,e)&&(s=Object.assign({},r),i||delete s[e],s[t]=n(r)),s}))}json(){return this.transform(Ve)}noUnknown(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ue.noUnknown;"boolean"!=typeof e&&(t=e,e=!0);let i=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const i=function(e,t){let i=Object.keys(e.fields);return Object.keys(t).filter((e=>-1===i.indexOf(e)))}(this.schema,t);return!e||0===i.length||this.createError({params:{unknown:i.join(", ")}})}});return i.spec.noUnknown=e,i}unknown(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ue.noUnknown;return this.noUnknown(!e,t)}transformKeys(e){return this.transform((t=>{if(!t)return t;const i={};for(const n of Object.keys(t))i[e(n)]=t[n];return i}))}camelCase(){return this.transformKeys(R)}snakeCase(){return this.transformKeys(z)}constantCase(){return this.transformKeys((e=>z(e).toUpperCase()))}describe(e){const t=(e?this.resolve(e):this).clone(),i=super.describe(e);i.fields={};for(const[r,s]of Object.entries(t.fields)){var n;let t=e;null!=(n=t)&&n.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[r]})),i.fields[r]=s.describe(t)}return i}}function He(e){return new Je(e)}We.prototype=Ze.prototype;class Je extends Ee{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const i=super._cast(e,t);if(!this._typeCheck(i)||!this.innerType)return i;let n=!1;const r=i.map(((e,i)=>{const r=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${i}]`}));return r!==e&&(n=!0),r}));return n?r:i}_validate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;var r;let s=this.innerType,o=null!=(r=t.recursive)?r:this.spec.recursive;null!=t.originalValue&&t.originalValue,super._validate(e,t,i,((r,a)=>{var l;if(!o||!s||!this._typeCheck(a))return void n(r,a);let u=new Array(a.length);for(let i=0;in(e.concat(r),a)))}))}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(Ve)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!pe(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Y(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:de.length;return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t){return t=t||de.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t){return t=t||de.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default((()=>[])).transform(((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t)))}compact(e){let t=e?(t,i,n)=>!e(t,i,n):e=>!!e;return this.transform((e=>null!=e?e.filter(t):e))}describe(e){const t=(e?this.resolve(e):this).clone(),i=super.describe(e);if(t.innerType){var n;let r=e;null!=(n=r)&&n.value&&(r=Object.assign({},r,{parent:r.value,value:r.value[0]})),i.innerType=t.innerType.describe(r)}return i}}He.prototype=Je.prototype;class Ye{constructor(e){var t=this;this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.builder(e,i);if(!pe(n))throw new TypeError("lazy() functions must return a valid schema");return t.spec.optional&&(n=n.optional()),n.resolve(i)},this.builder=e,this.spec={meta:void 0,optional:!1}}clone(e){const t=new Ye(this.builder);return t.spec=Object.assign({},this.spec,e),t}optionality(e){return this.clone({optional:e})}optional(){return this.optionality(!0)}resolve(e){return this._resolve(e.value,e)}cast(e,t){return this._resolve(e,t).cast(e,t)}asNestedTest(e){let{key:t,index:i,parent:n,options:r}=e,s=n[null!=i?i:t];return this._resolve(s,Object.assign({},r,{value:s,parent:n})).asNestedTest(e)}validate(e,t){return this._resolve(e,t).validate(e,t)}validateSync(e,t){return this._resolve(e,t).validateSync(e,t)}validateAt(e,t,i){return this._resolve(t,i).validateAt(e,t,i)}validateSyncAt(e,t,i){return this._resolve(t,i).validateSyncAt(e,t,i)}isValid(e,t){return this._resolve(e,t).isValid(e,t)}isValidSync(e,t){return this._resolve(e,t).isValidSync(e,t)}describe(e){return e?this.resolve(e).describe(e):{type:"lazy",meta:this.spec.meta,label:void 0}}meta(){if(0===arguments.length)return this.spec.meta;let e=this.clone();return e.spec.meta=Object.assign(e.spec.meta||{},arguments.length<=0?void 0:arguments[0]),e}}const Ke="adId",Qe=Ne(),Xe="adServer",et=Ne(),tt="adUnitPath",it=Ne(),nt="advertiserId",rt=Me().nullable(),st="bidder",ot=Ne(),at="bidResponseTimeMs",lt=Me(),ut="bidTtl",dt=Me(),ct="browser",pt=Ne(),ht="browserDateBatched",ft=Me().default(Date.now),mt="browserMajor",gt=Ne(),vt="browserTzOffset",bt=Me(),wt="browserVersion",yt=Ne(),xt="campaignId",Et=Me().nullable(),kt="code",St=Me(),Ot="cookieDeprecationLabel",Tt=Ne(),_t="cpm",It=Me().transform(((e,t)=>{let i=t;return"string"==typeof i&&(i=parseFloat(i)),i=Math.min(Math.max(i,0),200),i})),jt="cpuArch",At=Ne(),Ft="creativeHeight",$t=Me(),Ut="creativeId",Nt=Me().nullable();Me().nullable();const Dt="creativeWidth",Mt=Me(),Ct="currency",Pt=Ne(),Rt="custom",zt=We({abtest1:Ne().optional(),abtest2:Ne().optional(),abtest3:Ne().optional(),abtest4:Ne().optional(),abtest5:Ne().optional(),param1:Ne().optional(),param2:Ne().optional(),param3:Ne().optional(),param4:Ne().optional(),param5:Ne().optional(),param6:Ne().optional(),param7:Ne().optional(),param8:Ne().optional(),param9:Ne().optional(),param10:Ne().optional()}).default({}),qt="dataSource",Vt=Ne().default("unknown"),Lt="deviceModel",Gt=Ne(),Bt="deviceType",Wt=Ne(),Zt="deviceVendor",Ht=Ne(),Jt="doNotTrack",Yt=ke().default(!1),Kt="eventType",Qt=Ne(),Xt="geo",ei=We({address:Ne().nullable().default(null),asn:Ne().nullable().default(null),city:Ne().nullable().default(null),country:Ne().nullable().default(null),"country-region":Ne().nullable().default(null),"postal-code":Ne().nullable().default(null),"time-zone":Ne().nullable().default(null)}),ti="hash",ii=Ne().default(window.location.hash),ni="host",ri=Ne().default(window.location.host),si="hostname",oi=Ne().default(window.location.hostname),ai="href",li=Ne().default(window.location.href),ui="identityProviders",di=Ne(),ci="lineItemId",pi=Me().nullable();Ne();const hi="mediaType",fi=Ne(),mi="message",gi=Ne(),vi="origin",bi=Ne().default(window.location.origin),wi="originalCpm",yi=Me().transform(((e,t)=>{let i=t;return"string"==typeof i&&(i=parseFloat(i)),i=Math.min(Math.max(i,0),200),i})),xi="os",Ei=Ne(),ki="osVersion",Si=Ne(),Oi="outOfPage",Ti=ke(),_i="pageviewId",Ii=Ne().nullable(),ji="pathname",Ai=Ne().default(window.location.pathname),Fi="pbCreativeId",$i=Ne(),Ui="pbDealId",Ni=Ne(),Di="pbTransactionId",Mi=Ne(),Ci="port",Pi=Ne().default(window.location.port),Ri="product",zi=Ne().default("cw"),qi="protocol",Vi=Ne().default(window.location.protocol),Li="publisher",Gi=Ne(),Bi="publisherId",Wi=Ne(),Zi="ravenId",Hi=Ne().default(b()),Ji="rcik",Yi=Ne(),Ki="rciv",Qi=Ne(),Xi="revenue",en=Me().transform(((e,t)=>{let i=t;return"string"==typeof i&&(i=parseFloat(i)),i=Math.min(Math.max(i,0),200),i})),tn="sampleRate",nn=Me(),rn="screenResolution",sn=Ne(),on="search",an=Ne().default(window.location.search),ln="searchParams",un=We({}),dn="sessionId",cn=Ne(),pn="size",hn=Ne(),fn="slotElementId",mn=Ne(),gn="slotId",vn=Ne(),bn="slotSizes",wn=new Ye((e=>"string"==typeof e?Ne():He().of(Me()).nullable()));const yn="source",xn=Ne(),En="targetingMap",kn=We(),Sn="thirdPartyCookies",On=ke(),Tn="tudeMeta",_n=Ne(),In="tudeTag",jn=Ne(),An="userAgent",Fn=Ne(),$n="userId",Un=Ne(),Nn="utmCampaign",Dn=Ne(),Mn="utmContent",Cn=Ne(),Pn="utmMedium",Rn=Ne(),zn="utmSource",qn=Ne(),Vn="utmTerm",Ln=Ne(),Gn="version",Bn=Ne(),Wn="wrapper",Zn=Ne(),Hn="wrapperId",Jn=Ne(),Yn=We({[ct]:pt,[mt]:gt,[vt]:bt,[wt]:yt,[Ot]:Tt.nullable().default(null),[jt]:At.nullable(),[Lt]:Gt.nullable(),[Bt]:Wt,[Zt]:Ht.nullable(),[Jt]:Yt.default(!1),[Xt]:ei,[xi]:Ei,[ki]:Si.nullable(),[rn]:sn.nullable(),[Sn]:On.default(!0),[An]:Fn,[$n]:Un}),Kn=We({[Ji]:Yi.nullable(),[Ki]:Qi.nullable(),[dn]:cn}),Qn=We({[ti]:ii.nullable(),[ni]:ri,[si]:oi,[ai]:li,[vi]:bi.nullable(),[_i]:Ii,[ji]:Ai,[Ci]:Pi.nullable(),[qi]:Vi,[tn]:nn.default(1),[on]:an.nullable(),[ln]:un,[Nn]:Dn.nullable().default(""),[Mn]:Cn.nullable().default(""),[Pn]:Rn.nullable().default(""),[zn]:qn.nullable().default(""),[Vn]:Ln.nullable().default("")}),Xn=We({[Xe]:et.default("googletag"),[ht]:ft,[kt]:St.nullable(),[Rt]:zt.optional(),[qt]:Vt.nullable().default(null),[ui]:di.nullable().default(null),[Ri]:zi.default("cw"),[Li]:Gi.required(),[Bi]:Wi.nullable(),[Zi]:Hi.required(),[Tn]:_n.nullable().default(null),[In]:jn.nullable().default(null),[Gn]:Bn.nullable().default(null),[Wn]:Zn.nullable().default(null),[Hn]:Jn.nullable().default(null)}),er=We({}).concat(Yn).concat(Kn).concat(Qn).concat(Xn),tr=We({[Xe]:et.default("googletag"),[In]:jn.nullable().default(null),[Wn]:Zn.optional(),[Hn]:Jn.optional()});class ir{}class nr{constructor(){this.listeners={}}on(e,t){this.listeners[e]&&void 0!==this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}dispatch(e,t){(this.listeners[e]||[]).forEach((e=>e(t)))}remove(e,t){const i=this.listeners[e]||[];i.length>0&&(this.listeners[e]=i.filter((e=>e===t)))}}const rr=new nr,sr=new nr;class or{constructor(){this.store={}}getAttributes(){return this.store}setAttribute(e,t){this.store[e]=t}setAttributes(e){Object.keys(e).forEach((t=>{this.store[t]=e[t]}))}getAttribute(e){return this.store[e]}removeAttribute(e){delete this.store[e]}hasAttribute(e){return e in this.store}clearAttributes(){this.store={}}}const ar=new or,lr=()=>ar.getAttributes(),ur=new or,dr=()=>ur.getAttributes();let cr={adServers:["googletag"],pbjsGlobals:["pbjs"],primaryAdServer:"googletag"};const pr=e=>{cr=Object.assign(Object.assign({},cr),e),p.verbose("Global state updated",cr,"State")},hr=()=>cr,fr=()=>{const e=b();return pr({pageviewId:e}),e};pr({pageviewId:fr()});let mr=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;return crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+=(t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_"),"")};const gr="ditu_user",vr="ditu_session",br=()=>{let e=JSON.parse(localStorage.getItem(gr)||"{}"),t=!1;return(null==e?void 0:e.id)||(e={id:mr(12),userAddedTimestamp:Date.now()},t=!0),e.lastPageload=Date.now(),(e=>{localStorage.setItem(gr,JSON.stringify(e))})(e),{isNewUser:t,user:e}},wr=()=>{let e=JSON.parse(localStorage.getItem(vr)||"{}"),t=!1;return(!(null==e?void 0:e.id)||((null==e?void 0:e.lastActivityTimestamp)||0){localStorage.setItem(vr,JSON.stringify(e))})(e),t&&sr.dispatch("create",{session:e}),{isNewSession:t,session:e}},{isNewUser:yr}=br(),{isNewSession:xr}=wr();rr.on("pushEvent",(()=>(()=>{const{session:e}=wr();sr.dispatch("update",{session:e})})()));const Er=["fbclid","tbclid","gclid","obclid","dicbo","ttclid","ScCid","twclid"],kr=()=>{window.localStorage.setItem("rcik","null"),window.localStorage.setItem("rciv","null")};var Sr={exports:{}};!function(e,t){!function(i,n){var r="function",s="undefined",o="object",a="string",l="major",u="model",d="name",c="type",p="vendor",h="version",f="architecture",m="console",g="mobile",v="tablet",b="smarttv",w="wearable",y="embedded",x="Amazon",E="Apple",k="ASUS",S="BlackBerry",O="Browser",T="Chrome",_="Firefox",I="Google",j="Huawei",A="LG",F="Microsoft",$="Motorola",U="Opera",N="Samsung",D="Sharp",M="Sony",C="Xiaomi",P="Zebra",R="Facebook",z="Chromium OS",q="Mac OS",V=" Browser",L=function(e){for(var t={},i=0;i0?2===l.length?typeof l[1]==r?this[l[0]]=l[1].call(this,d):this[l[0]]=l[1]:3===l.length?typeof l[1]!==r||l[1].exec&&l[1].test?this[l[0]]=d?d.replace(l[1],l[2]):n:this[l[0]]=d?l[1].call(this,d,l[2]):n:4===l.length&&(this[l[0]]=d?l[3].call(this,d.replace(l[1],l[2])):n):this[l]=d||n;c+=2}},H=function(e,t){for(var i in t)if(typeof t[i]===o&&t[i].length>0){for(var r=0;r2&&(e[u]="iPad",e[c]=v),e},this.getEngine=function(){var e={};return e[d]=n,e[h]=n,Z.call(e,b,y.engine),e},this.getOS=function(){var e={};return e[d]=n,e[h]=n,Z.call(e,b,y.os),x&&!e[d]&&w&&w.platform&&"Unknown"!=w.platform&&(e[d]=w.platform.replace(/chrome os/i,z).replace(/macos/i,q)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return b},this.setUA=function(e){return b=typeof e===a&&e.length>500?W(e,500):e,this},this.setUA(b),this};K.VERSION="1.0.39",K.BROWSER=L([d,h,l]),K.CPU=L([f]),K.DEVICE=L([u,p,c,m,g,b,v,w,y]),K.ENGINE=K.OS=L([d,h]),e.exports&&(t=e.exports=K),t.UAParser=K;var Q=typeof i!==s&&(i.jQuery||i.Zepto);if(Q&&!Q.ua){var X=new K;Q.ua=X.getResult(),Q.ua.get=function(){return X.getUA()},Q.ua.set=function(e){X.setUA(e);var t=X.getResult();for(var i in t)Q.ua[i]=t[i]}}}("object"==typeof window?window:w)}(Sr,Sr.exports);var Or=Sr.exports;let Tr;const _r=()=>{const{screen:e}=window;return`${e.width.toString()}x${e.height.toString()}`},Ir=()=>{const e=(new Or.UAParser).getResult(),{browser:t,cpu:i,device:n,os:r,ua:s}=e;Tr={browser:t.name,browserMajor:t.major||"",browserVersion:t.version,cpuArch:i.architecture||"",deviceModel:n.model,deviceType:n.type||"desktop",deviceVendor:n.vendor,os:r.name,osVersion:r.version,screenResolution:_r(),userAgent:s}};Ir(),window.addEventListener("resize",(()=>{Tr.screenResolution=_r()}));const jr=new or,Ar=()=>er.cast(Object.assign({},jr.getAttributes()),{stripUnknown:!0}),Fr=e=>jr.setAttributes(e);(()=>{try{const e=new URL(document.location.href).searchParams;let t=!1;Er.forEach((i=>{if(t)return;const n=e.get(i);n&&(window.localStorage.setItem("rcik",i),window.localStorage.setItem("rciv",n),t=!0)})),t||kr()}catch(e){let t="";e instanceof Error?t=e.message:"string"==typeof e?t=e:"object"==typeof e&&(t=JSON.stringify(e)),p.error("Error occurred setting click ids",t),kr()}})(),t(void 0,void 0,void 0,(function*(){var e;const{user:i}=br(),{session:n}=wr();jr.setAttributes(Object.assign(Object.assign(Object.assign(Object.assign({browserTzOffset:(new Date).getTimezoneOffset(),sessionId:n.id,userId:i.id,version:null!==(e="1.7.0")?e:"1.0.0"},(()=>{const e=window.localStorage.getItem("rcik"),t=window.localStorage.getItem("rciv"),i={rcik:"null"===e?null:e||null,rciv:"null"===t?null:t||null};return p.debug("getClickId from localstorage",{clickId:i,rcik:e,rciv:t}),i})()),(Tr||Ir(),Tr)),function(){const e="ditu_utms";let t={};try{const{utmParams:i}=JSON.parse(localStorage.getItem(e)||'{ "utmParams": {} }');t={utmCampaign:null==i?void 0:i.utmCampaign,utmContent:null==i?void 0:i.utmContent,utmMedium:null==i?void 0:i.utmMedium,utmSource:null==i?void 0:i.utmSource,utmTerm:null==i?void 0:i.utmTerm}}catch(e){}const i=new URL(window.location.href),n=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],r=n.map((e=>{return(t=e)&&0!==t.length?t.replace(/[-_](\w)/g,((e,t)=>t.toUpperCase())):t;var t}));let s=!1;if(n.forEach(((e,n)=>{if(i.searchParams.has(e)){const o=r[n],a=i.searchParams.get(e);a!==t[o]&&(s=!0,t[o]=a)}})),s&&"undefined"!=typeof Storage)try{localStorage.setItem(e,JSON.stringify({utmParams:t}))}catch(e){}return t}()),function(){const e=new URL(window.location.href),{hash:t,host:i,hostname:n,href:r,origin:s,pathname:o,port:a,protocol:l,search:u}=e;return{hash:t,host:i,hostname:n,href:r,origin:s,pathname:o,port:a,protocol:l,search:u,searchParams:Object.fromEntries(window.location.search.substring(1).split("&").filter((e=>!!e)).map((e=>e.split("=").map(decodeURIComponent))))}}()));const r=yield t(void 0,void 0,void 0,(function*(){let e=null,t=!0;if("cookieDeprecationLabel"in navigator){const i=yield navigator.cookieDeprecationLabel.getValue();i&&(e=i,t=!1)}return{cookieDeprecationLabel:e,doNotTrack:"1"===navigator.doNotTrack||"yes"===navigator.doNotTrack,thirdPartyCookies:t}}));jr.setAttributes(r),"true"===localStorage.getItem("ditu_identity_providers_sampled")&&function(){return t(this,void 0,void 0,(function*(){const{pbjsGlobals:e=["pbjs"]}=hr(),t=e[0];if(!t)return null;try{const e=window[t];if(null==e?void 0:e.getUserIdsAsync){const t=yield e.getUserIdsAsync();return t?JSON.stringify(t):null}return null}catch(e){return null}}))}().then((e=>jr.setAttributes({identityProviders:e})))})),sr.on("update",(e=>{let{session:t}=e;t&&t.id&&jr.setAttributes({sessionId:null==t?void 0:t.id})}));const $r=We({[tt]:it,[Oi]:Ti.optional(),[fn]:mn,[gn]:vn,[bn]:wn,[En]:kn}),Ur=$r.shape({[Ke]:Qe,[nt]:rt.optional(),[st]:ot,[xt]:Et.optional(),[_t]:It,[Ft]:$t.required(),[Ut]:Nt.optional(),[Dt]:Mt.required(),[Ct]:Pt.default("USD"),[Kt]:Qt.default("adClicked"),[ci]:pi.optional(),[hi]:fi,[wi]:yi.optional(),[Xi]:en.required(),[pn]:hn.optional(),[yn]:xn}),Nr=$r.shape({[Ke]:Qe.optional(),[st]:ot.required(),[at]:lt.nullable(),[ut]:dt.nullable(),[_t]:It.default(0),[Ft]:$t.nullable(),[Dt]:Mt.nullable(),[Ct]:Pt.default("USD"),[Kt]:Qt.default("bidWon"),[hi]:fi.required(),[Fi]:$i.nullable(),[Ui]:Ni.nullable(),[Di]:Mi.nullable(),[pn]:hn.required(),[yn]:xn.required()}),Dr=$r.shape({[Ke]:Qe.optional(),[nt]:rt.optional(),[st]:ot.required(),[xt]:Et.optional(),[_t]:It.required(),[Ft]:$t.required(),[Ut]:Nt.optional(),[Dt]:Mt.required(),[Ct]:Pt.required().default("USD"),[Kt]:Qt.default("impression"),[ci]:pi.optional(),[hi]:fi.required(),[mi]:gi.optional(),[wi]:yi.optional(),[Xi]:en.required(),[pn]:hn.required(),[yn]:xn.required()}),Mr=We({[Ke]:Qe,[nt]:rt.optional(),[st]:ot,[_t]:It,[Ct]:Pt,[Kt]:Qt.default("impressionViewable"),[hi]:fi,[wi]:yi.optional(),[pn]:hn.optional(),[yn]:xn}).concat($r),Cr=We({[Kt]:Qt.default("newSession")}),Pr=We({[Kt]:Qt.default("newUser")}),Rr=We({[Kt]:Qt.default("pageView")}),zr=We({[st]:ot.nullable(),[kt]:St.nullable(),[Kt]:Qt.default("pageView"),[mi]:gi.required(),[yn]:xn.nullable()}),qr=$r.shape({[Kt]:Qt.default("slotRequested")}),Vr=$r.shape({[Ct]:Pt,[Kt]:Qt.default("unfilledImpression"),[hi]:fi,[yn]:xn});var Lr;const Gr=We({[Kt]:Qt.default("userFeedback"),ctype:Ne().nullable(),cid:Ne().nullable(),subject:Ne().required(),action:Ne().required(),platform:Ne().oneOf(["web","app","custom"]).default("web"),app:Ne().nullable().default(null),feedbackAt:Me().required(),feedbackData:We().default({}),subjectData:We().default({}),meta:We().default({})}),Br=Gr.shape({user:We({browser:Ne().nullable(),country:Ne().nullable(),deviceType:Ne().nullable(),os:Ne().nullable(),sessionId:Ne().nullable(),userId:Ne().nullable()}).required(),page:We({custom:We().optional(),hostname:Ne().default(""),pageviewId:Ne().nullable(),pathname:Ne().default(""),url:Ne().nullable(),ravenVersion:Ne().default(null!==(Lr="1.7.0")?Lr:"unknown"),referrer:Ne().optional()}).required(),[Li]:Gi.required(),[Bi]:Wi.nullable()}),Wr=e=>(e=>{var t,i;const{browser:n,custom:r,deviceType:s,geo:o,hostname:a,href:l,os:u,pathname:d,publisher:c,publisherId:p,userId:h,sessionId:f}=Ar(),{country:m=null}=null!=o?o:{},{pageviewId:g}=hr();"pageviewId"in e&&delete e.pageviewId;const{feedbackData:v={},meta:b={},subjectData:w={}}=e,y=Br.cast(Object.assign(Object.assign({ctype:"p",cid:null!==(t=null!=c?c:p)&&void 0!==t?t:""},e),{user:{browser:n,country:m,deviceType:s,os:u,userId:h,sessionId:f},page:{custom:r,hostname:a,pathname:d,pageviewId:null!=g?g:"",url:l,referrer:null!==(i=document.referrer)&&void 0!==i?i:""},publisher:c,publisherId:null!=p?p:""}),{stripUnknown:!0});return Object.assign(Object.assign({},y),{feedbackData:v,meta:b,subjectData:w})})(e),Zr={adClicked:Ur,bidWon:Nr,impression:Dr,impressionViewable:Mr,newSession:Cr,newUser:Pr,pageView:Rr,ravenError:zr,slotRequested:qr,unfilledImpression:Vr,userFeedback:Gr},Hr=new Date,Jr=()=>"true"===localStorage.getItem("ditu_tude_meta_sampled"),Yr=(e,t)=>{if("userFeedback"===e)return Wr(t);const i=lr(),n=Ar(),r=Object.assign(Object.assign(Object.assign({},t),n),{custom:i});return Jr()?Object.assign(Object.assign({},r),{tudeMeta:JSON.stringify(dr())}):r};class Kr extends ir{constructor(e,t){super(),this.endpoints=e,this.globalAttrs={},this.beforeSendHandlers=[],this.queue=[],setTimeout((()=>{var e;setInterval((()=>{this.persistEvents()}),null!==(e=t.queueInterval)&&void 0!==e?e:1e3)}),3e3),document.addEventListener("visibilitychange",(()=>{p.debug("visibilitychange",document.visibilityState),"hidden"===document.visibilityState&&this.flushEvents()})),document.addEventListener("pagehide",(()=>{this.flushEvents()}))}onBeforeSend(e){this.beforeSendHandlers.push(e)}getGlobalAttribute(e){return this.globalAttrs[e]}setGlobalAttribute(e,t){this.globalAttrs[e]=t}setGlobalAttributes(e){this.globalAttrs=Object.assign(Object.assign({},this.globalAttrs),e)}createGlobalObject(){return er.cast(Object.assign({},this.globalAttrs),{stripUnknown:!0})}pushEvent(e,t){const{pageviewId:i}=hr(),n={eventType:e,data:Yr(e,t),ravenId:b(),pageviewId:i};p.debug("queued",n,e),this.queue.push(n),rr.dispatch("pushEvent",n)}flushEvents(){this.persistEvents(!0)}persistEvents(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.beforeSendHandlers.length>0&&this.beforeSendHandlers.forEach((e=>{e()}));const t=this.queue.splice(0,this.queue.length).map((e=>{const{eventType:t,data:i}=e,n=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r{if("userFeedback"===e)return t;if((new Date).getTime()-Hr.getTime()<1e4){const e=lr(),i=Object.assign(Object.assign({},t),{custom:e});return Jr()?Object.assign(Object.assign({},i),{tudeMeta:JSON.stringify(dr())}):i}return t})(t,i)),{eventType:t}),n)}));this.endpoints.forEach((i=>{i.batchAndSend(t,e)}))}setEndpoints(e){this.endpoints=e}pageview(e){e||fr(),this.pushEvent("pageView",{})}}class Qr{constructor(e){this.groupName=e,this.events=[],this.startTime=new Date}getPrefix(){return`${this.groupName}`}addEvent(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"log";p.enabled()&&("function"==typeof t&&(t=t()),this.events.push({data:t,event:e,type:i}))}flush(e){if(!p.enabled())return;const t=this.getPrefix();console.groupCollapsed(...l(t,e)),console.count(t),this.events.forEach((e=>{let{type:t}=e;const i=[];if(i.push(`%c${e.event}`),i.push("font-weight: bold;"),e.data&&("table"!==t||!Array.isArray(e.data)||e.data.length<1)&&(t="log",i.push(e.data)),"table"===t&&Array.isArray(e.data)&&e.data.length>0){const t=Object.keys(e.data[0]);console.log(...i),console.table(e.data,t)}else console.log(...i)})),console.log("%cDuration:","font-weight:bold;",(new Date).getTime()-this.startTime.getTime()+"ms"),console.groupEnd(),this.events=[]}}const Xr=(e,t)=>{const i=Zr[e];if(!i)return p.error(`No schema found for ${e} event`),t;try{i.validateSync(t)}catch(i){let n="";return i instanceof Error&&(n=i.message),p.error(`${e} event data failed to validate`,{data:t,error:n}),t}return i.cast(Object.assign({},t),{stripUnknown:!0})},es=e=>{if("string"!=typeof e)return null;const[t,i]=e.split("x");return isNaN(Number(t))||isNaN(Number(i))?null:e},ts=(e,t)=>{var i,n;if(Array.isArray(e)&&2===e.length){const[t,i]=e;return{width:t,height:i}}if("string"==typeof e){const[t,i]=e.split("x"),n=parseInt(t),r=parseInt(i);if(!isNaN(n)&&!isNaN(r))return{width:n,height:r}}const r=null!==(i=null==t?void 0:t.offsetWidth)&&void 0!==i?i:0,s=null!==(n=null==t?void 0:t.offsetHeight)&&void 0!==n?n:0;return r<=1||s<=1?{width:0,height:0}:{width:r,height:s}},is=e=>{const{width:t,height:i}=e;return 0===t&&0===i?"unknown":`${t}x${i}`};class ns extends ir{constructor(e){super(),this.props=e}get bidder(){var e;return null!==(e=this.props.bidder)&&void 0!==e?e:this.props.source}get source(){return this.props.source}get type(){return this.props.type}get value(){var e,t;return null!==(t=null===(e=this.props)||void 0===e?void 0:e.value)&&void 0!==t?t:0}toObject(){return Object.assign({},this.props)}}const rs=e=>{const{initialEvents:t=[]}=e||{};let i=t;return{add(e){i.push(e)},filter:e=>i.filter(e),find:e=>i.find(e),getEvents:()=>i,setEvents(e){i=e},update(e){i=e(i)}}},ss=rs({}),os=rs({}),as=e=>{var t;return{adUnitPath:e.getAdUnitPath(),contentUrl:e.getContentUrl(),escapedQemQueryId:e.getEscapedQemQueryId(),outOfPage:e.getOutOfPage(),responseInformation:e.getResponseInformation(),sizes:e.getSizes(),slotElementId:e.getSlotElementId(),slotId:null===(t=e.getSlotId())||void 0===t?void 0:t.getDomId(),targetingKeys:e.getTargetingKeys(),targetingMap:e.getTargetingMap()}},ls=e=>{let{slot:t}=e;return as(t)},us=(e,t)=>{window.googletag=window.googletag||{cmd:[]};let i=t[e];if(!i){if(!window.googletag||!window.googletag.apiReady)return;if(i=window.googletag.pubads().getTargeting(e),!i)return}return Array.isArray(i)?i.length>0?i[0]:void 0:i},ds=e=>{const t=e.getTargetingMap()||{},i=["cw_floor"];for(const e of i){const i=us(e,t);if(i)return parseFloat(i)}return 0},cs=e=>{const t={};return Object.keys(e).forEach((i=>{const n=e[i];Array.isArray(n)?n.length>0&&(t[i]=n[0]):t[i]=n})),t};let ps=[];const hs=e=>e?"^"+(e.replaceAll("*","(.*)+")+"$"):null,fs=(e,t,i)=>{var n;const r=null===(n=ps.find((e=>{if(e.bidder){if(!new RegExp(e.bidder).test(t))return!1;if(e.mediaType)return new RegExp(e.mediaType).test(i)}return!e.mediaType||new RegExp(e.mediaType).test(i)})))||void 0===n?void 0:n.modifier;if(r)try{return e*r}catch(e){p.error("Error applying bid modifier",{error:e,multiplier:r})}return e};window.googletag=window.googletag||{cmd:[]},window.googletag.cmd=window.googletag.cmd||[];const ms={bidder:"",cpm:0,creativeHeight:0,creativeWidth:0,currency:"USD",mediaType:"",revenue:0,size:"",source:""},gs=e=>{googletag.pubads().addEventListener("slotRequested",(t=>{const i=ls(t);var n;n=i.slotElementId,ss.update((e=>e.filter((e=>e.slotElementId!==n)))),(e=>{os.update((t=>t.filter((t=>t.slotElementId!==e))))})(i.slotElementId);const r=Xr("slotRequested",Object.assign({},i));e.pushEvent("slotRequested",Object.assign(Object.assign({},r),{adServer:"googletag",dataSource:"gpt"})),ss.add({adUnitPath:i.adUnitPath,slotElementId:i.slotElementId,targetingMap:i.targetingMap})}))};let vs=!1;const bs=(e,i,n)=>{let{bidEstModel:r,mappings:s}=n;googletag.pubads().addEventListener("slotRenderEnded",(i=>t(void 0,void 0,void 0,(function*(){var t,n,o,a,l,u,d,c,p,h,f,m,g;const v=new Qr("googletag.slotRenderEnded"),b=ls(i),{advertiserId:w,isEmpty:y}=i;if(y){v.addEvent("slotFields",b);const t=Xr("unfilledImpression",Object.assign({},b));return e.pushEvent("unfilledImpression",Object.assign(Object.assign({},t),{adServer:"googletag",dataSource:"gpt"})),void v.flush("unfilledImpression")}let x="openbidding",E="openbidding";if(w&&-1!==w){const{sources:e=[]}=s;if(Array.isArray(e)){const t=e.find((e=>{let{advertiserIds:t}=e;return(t||[]).includes(w.toString())}));x=(null==t?void 0:t.name)||"unmapped",E=(null==t?void 0:t.type)||"other"}}const{slot:k}=i,S=(e=>{const t=ss.find((t=>t.slotElementId===e));return t&&ss.update((t=>t.filter((t=>t.slotElementId!==e)))),t})(b.slotElementId),O=S&&S.targetingMap?S.targetingMap:b.targetingMap||{},T=[];let _=x;if("prebid"===x)_=null!==(n=null===(t=null==O?void 0:O.hb_bidder)||void 0===t?void 0:t[0])&&void 0!==n?n:_;v.addEvent("advertiserId",w),v.addEvent("adUnitPath",b.adUnitPath),v.addEvent("slotElementId",b.slotElementId),v.addEvent("targetingMap",(()=>Object.keys(O).map((e=>({key:e,value:O[e][0]})))),"table"),v.addEvent("source",x),v.addEvent("bidder",_);let I={};const j=us("hb_adid",O);if(j){const e=((e,t,i)=>{var n,r;const{pbjsGlobals:s=["pbjs"]}=hr();if(i){const t=[];s.forEach((e=>{var i,n;const r=null===(n=(i=window[e]).getAllWinningBids)||void 0===n?void 0:n.call(i);r&&t.push(...r)}));const i=t.find((t=>t.adId===e));if(i)return i}const o=s.find((e=>{var i,n;return null===(n=(i=window[e]).getBidResponsesForAdUnitCode)||void 0===n?void 0:n.call(i,t)}));if(!o)return;const a=null===(r=(n=window[o]).getBidResponsesForAdUnitCode)||void 0===r?void 0:r.call(n,t);if(a&&a.bids){const t=a.bids.find((t=>t.adId===e));if(t)return t}let l;return s.forEach((t=>{var i,n;const r=null===(n=(i=window[t]).getAllBidResponses)||void 0===n?void 0:n.call(i);if(l=r.find((t=>t.adId===e)),l)return!0})),l})(j,k.getSlotElementId(),"prebid"===x);(null==e?void 0:e.meta)&&(I=e.meta);const t=e&&e.cpm?e.cpm:parseFloat(us("hb_pb",O)||"0");T.push(new ns({source:"prebid",type:"prebid",value:t}))}const A=us("amznbid",O);if(A){const{amazon:e}=s,t=null!==(a=null===(o=e.find((e=>e.bidMap[A])))||void 0===o?void 0:o.bidMap[A])&&void 0!==a?a:1e-4;T.push(new ns({source:"amazon",type:"amazon",value:t}))}v.addEvent("competing bids",(()=>T.map((e=>e.toObject()))),"table");const{pbjsGlobals:F}=hr();F.forEach((e=>{const t=e;window[t]=window[t]||{},window[t].que=window[t].que||[]}));const $=k.getSlotElementId()||"",U=F.find((e=>{var t,i;return null===(i=null===(t=window[e])||void 0===t?void 0:t.adUnits)||void 0===i?void 0:i.find((e=>e.code===$))})),N=U?null===(u=null===(l=window[U])||void 0===l?void 0:l.adUnits)||void 0===u?void 0:u.filter((e=>e.code===$)):[],D=N.reduce(((e,t)=>(Object.entries(t.mediaTypes).forEach((t=>{let[i,n]=t;e.set(i,n)})),e)),new Map),M=D.has("video")&&D.has("banner");v.addEvent("isMultiFormat",M),v.addEvent("prebidAdUnit",N);let C="banner";switch(E){case"amazon":C=(null===(d=null==O?void 0:O.amzn_format)||void 0===d?void 0:d[0])||C,"video"===C&&(C="video_outstream_multiformat");break;case"prebid":C=(null===(c=null==O?void 0:O.hb_format)||void 0===c?void 0:c[0])||C,"video"===C&&M&&(C="video_outstream_multiformat");break;default:if(C=(null===(p=null==O?void 0:O.hb_format)||void 0===p?void 0:p[0])||C,D.has("video")&&!D.has("banner")){const e=D.get("video");"outstream"===e.context?C="video_outstream":"instream"===e.context&&(C="video_instream")}}v.addEvent("mediaType",C);const P=yield r.estimateCpm({competingBids:T,googleDemandFloor:ds(i.slot),wonSourceType:E}),R=fs(P,_,C);v.addEvent("cpm",P),R!==P&&v.addEvent("cpm (modified)",R);const z=document.getElementById(k.getSlotElementId()),q=ts(null==i?void 0:i.size,z),V=is(q);v.addEvent("size",V),v.flush("impression");const L=Object.assign(Object.assign({},b),{adId:j,advertiserId:w,bidder:_,campaignId:null===(h=b.responseInformation)||void 0===h?void 0:h.campaignId,cpm:R,originalCpm:P,creativeHeight:q.height,creativeId:null===(f=b.responseInformation)||void 0===f?void 0:f.creativeId,creativeWidth:q.width,currency:"USD",lineItemId:null===(m=b.responseInformation)||void 0===m?void 0:m.lineItemId,mediaType:C,meta:I,revenue:R/1e3,size:V,source:x,targetingMap:cs(O)}),G=Xr("impression",L);os.add(L);const{configId:B,googleFloorsEnabled:W}=r.config,{bmin:Z,bmax:H,bmult:J}=null!==(g=r.config.bidValueInputs)&&void 0!==g?g:{bmax:.01,bmin:.01,bmult:1},Y=JSON.stringify({cid:B,creativeId:L.creativeId,bmin:Z,bmax:H,bmult:J,gf:W?1:0,meta:L.meta});e.pushEvent("impression",Object.assign(Object.assign({},G),{adServer:"googletag",dataSource:"gpt",message:Y}))}))))},ws=(e,i,n)=>t(void 0,void 0,void 0,(function*(){i.trackGoogletag&&googletag.cmd.push((()=>{p.debug("adding event listeners",void 0,"googletag"),(e=>{document.addEventListener("visibilitychange",(()=>{var t,i,n,r;if(document.hidden&&"IFRAME"===(null===(t=document.activeElement)||void 0===t?void 0:t.tagName)&&(null===(i=document.activeElement)||void 0===i?void 0:i.id.startsWith("google_ads_iframe"))){if(Math.random()>1)return;if(vs)return;const t=null===(r=null===(n=document.activeElement.parentElement)||void 0===n?void 0:n.parentElement)||void 0===r?void 0:r.id;if(t){vs=!0,setTimeout((()=>{vs=!1}),5e3);const i=googletag.pubads().getSlots().find((e=>e.getSlotElementId()===t));if(!i)return;const n=ls({slot:i}),r=os.find((e=>e.slotElementId===n.slotElementId));if(r){const t=Xr("adClicked",Object.assign(Object.assign({},n),r));e.pushEvent("adClicked",Object.assign(Object.assign({},t),{adServer:"googletag",dataSource:"gpt"}))}}}}))})(e),(e=>{googletag.pubads().addEventListener("impressionViewable",(t=>{var i;const n=ls(t),r=null!==(i=os.find((e=>e.slotElementId===n.slotElementId)))&&void 0!==i?i:ms,s=Xr("impressionViewable",Object.assign(Object.assign({},n),r));e.pushEvent("impressionViewable",Object.assign(Object.assign({},s),{adServer:"googletag",dataSource:"gpt"}))}))})(e),gs(e),bs(e,0,n),p.debug("added event listeners",void 0,"googletag")}))})),ys=rs({}),xs={adServer:"tudeserve",dataSource:"tudeserve"};let Es=!1;const ks=(e,i)=>t(void 0,void 0,void 0,(function*(){i.trackTudeserve&&(p.debug("tracking",void 0,"tudeserve"),window.tudeserve=window.tudeserve||{cmd:[]},window.tudeserve.cmd.push((t=>{t.events().on("viewable",(t=>{let{bid:i,slot:n}=t;const r=i.amount,s=fs(r,i.bidder,i.mediaType),o=Xr("impressionViewable",{adUnitPath:n.adUnit,bidder:i.bidder,cpm:s,currency:i.currency,mediaType:i.mediaType,originalCpm:r,slotElementId:n.elementId,source:i.source,targetingMap:{}});e.pushEvent("impressionViewable",Object.assign(Object.assign({},o),xs))})),t.events().on("no_bid",(t=>{let{slot:i}=t;const n=Xr("unfilledImpression",{adUnitPath:i.adUnit,slotElementId:i.elementId,targetingMap:{}});e.pushEvent("unfilledImpression",Object.assign(Object.assign({},n),xs))})),t.events().on("bid_won",(t=>{let{bid:i,slot:n}=t;var r,s;if("prebid"===i.source)return;const o=fs(i.amount,i.bidder,i.mediaType),a=n.getElement(),l=ts(null,a),u=i.sourceData,d=null!==(s=null!==(r=es(null==u?void 0:u.size))&&void 0!==r?r:es(null==u?void 0:u.amznsz))&&void 0!==s?s:is(l),c=Xr("bidWon",{adUnitPath:n.adUnit,bidder:i.bidder,cpm:o,currency:i.currency,mediaType:i.mediaType,size:d,slotElementId:n.elementId,source:i.source,targetingMap:{}});e.pushEvent("bidWon",Object.assign(Object.assign({},c),xs))})),t.events().on("request",(t=>{let{slot:i}=t;const n=Xr("slotRequested",{adUnitPath:i.adUnit,slotElementId:i.elementId,targetingMap:{}});e.pushEvent("slotRequested",Object.assign(Object.assign({},n),xs))})),t.events().on("impression",(t=>{let{bid:i,slot:n}=t;var r,s,o,a;const l=i.amount,u=fs(l,i.bidder,i.mediaType),d=n.getElement(),c=i.sourceData,p=JSON.stringify({adId:null!==(r=null==c?void 0:c.adId)&&void 0!==r?r:null,creativeId:null!==(s=null==c?void 0:c.creativeId)&&void 0!==s?s:null,meta:null!==(o=null==c?void 0:c.meta)&&void 0!==o?o:{}}),h=null!==(a=es(null==c?void 0:c.size))&&void 0!==a?a:es(null==c?void 0:c.amznsz),f=ts(h,d),m=is(f),g={adId:null==c?void 0:c.adId,adUnitPath:n.adUnit,bidder:i.bidder,cpm:u,creativeHeight:f.height,creativeWidth:f.width,currency:i.currency,mediaType:i.mediaType,message:p,originalCpm:l,revenue:u/1e3,size:m,slotElementId:n.elementId,source:i.source,targetingMap:{}},v=Xr("impression",g);e.pushEvent("impression",Object.assign(Object.assign({},v),xs)),ys.add(g)})),(e=>{document.addEventListener("visibilitychange",(()=>{var t,i,n,r;if(document.hidden&&"IFRAME"===(null===(t=document.activeElement)||void 0===t?void 0:t.tagName)&&(null===(i=document.activeElement)||void 0===i?void 0:i.id.startsWith("tudeserve-frame"))){if(Math.random()>1)return;if(Es)return;const t=null===(r=null===(n=document.activeElement.closest(".tudeserve-wrap"))||void 0===n?void 0:n.parentElement)||void 0===r?void 0:r.id;t&&(Es=!0,setTimeout((()=>{Es=!1}),5e3),window.tudeserve=window.tudeserve||{cmd:[]},window.tudeserve.cmd=window.tudeserve.cmd||[],window.tudeserve.cmd.push((i=>{if(!i.ads().slots.getSlotByElementId(t))return;const n=ys.find((e=>e.slotElementId===t));if(n){const t=Xr("adClicked",Object.assign({},n));e.pushEvent("adClicked",Object.assign(Object.assign({},t),xs))}})))}}))})(e)})))})),Ss=We({[Ke]:Qe.optional(),[Xe]:et.default("googletag"),[tt]:it.optional(),[nt]:rt.optional(),[st]:ot.optional(),[xt]:Et.optional(),[kt]:St.optional(),[_t]:It.optional(),[Ut]:Nt.optional(),[Ct]:Pt.optional(),[Kt]:Qt.default("customEvent"),[ui]:di.optional(),[ci]:pi.optional(),[hi]:fi.optional(),[mi]:gi.optional(),[Fi]:$i.optional(),[Ui]:Ni.optional(),[Di]:Mi.optional(),[Ri]:zi.optional(),[pn]:hn.optional(),[fn]:mn.optional(),[yn]:xn.optional(),[En]:kn.optional(),[Tn]:_n.optional(),[In]:jn.optional(),[Wn]:Zn.optional()}),Os={"adx-ranger-v1":e=>Promise.resolve().then((function(){return Ls})).then((t=>{let{AdxRangerV1EstModel:i}=t;return new i(e)})),"one-cent-fallback":e=>Promise.resolve().then((function(){return Gs})).then((t=>{let{OneCentFallbackEstModel:i}=t;return new i(e)}))};function Ts(e,i){return t(this,void 0,void 0,(function*(){if(Os[e])return Os[e](i)}))}class _s{constructor(e,t){this.modelName=e,this.config=t}onLoad(){return t(this,void 0,void 0,(function*(){return new Promise((()=>({})))}))}}class Is extends ir{constructor(e){super(),this.props=e}get bidValueInputs(){return this.props.bval}get googleFloorsEnabled(){return this.props.gflr}get model(){return this.props.mid}get configId(){return this.props.cid}get pctTraffic(){return this.props.pct}}class js extends ir{constructor(e){super(),this.props=e}sendBatch(e){return t(this,arguments,void 0,(function(e){var t=this;let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function*(){var n;p.debug(`sendBatch attempt to ${t.ingressName}`,{batch:e,endpointId:t.id});try{let n=yield fetch(t.ingressUrl,{body:JSON.stringify({batch:e}),keepalive:i,method:t.ingressMethod,mode:"cors"});if(!n.ok)throw{statusText:n.statusText,code:n.status}}catch(r){let s=!1;t.onFailureHandler&&(p.debug(`Endpoint ${t.ingressName} failed. Trying failover.`,{batch:e,endpointId:t.id}),t.onFailureHandler(e,i),s=!0);const o={type:"EndpointError",subtype:"",id:t.id,name:t.ingressName,endpointType:t.ingressUrl.includes("judy")?"judy":"aws",msg:"",failedOver:s,trace:null};let a=500;r instanceof Error?(o.msg=r.message,o.subtype=r.name,o.trace=null!==(n=null==r?void 0:r.stack)&&void 0!==n?n:null):(o.msg="object"==typeof r&&null!==r&&"statusText"in r?r.statusText:"Unknown error.",o.subtype="unknown",a="object"==typeof r&&null!==r&&"code"in r?r.code:a),p.warn(`Endpoint ${t.ingressName} failed.`,Object.assign({},o))}}()}))}batchAndSend(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=[...e];do{const e=i.splice(0,this.batchSize);e.length>0&&this.sendBatch(e,t)}while(i.length>0)}onFailure(e){this.onFailureHandler=e}get batchSize(){return this.props.batchSize}get id(){return this.props.id}get ingressUrl(){return this.props.ingressUrl}get ingressName(){return this.props.ingressName}get ingressMethod(){return this.props.ingressMethod}}class As extends ir{constructor(e){super(),this.props=e}get id(){return this.props.id}get publisherId(){return this.props.publisherId}get name(){return this.props.name}get eventPublisherValue(){return this.props.eventPublisherValue}get identityProvidersSampleRate(){var e;return null!==(e=this.props.identityProvidersSampleRate)&&void 0!==e?e:0}get sampleRate(){var e;return null!==(e=this.props.sampleRate)&&void 0!==e?e:1}get trackGoogletag(){return this.props.trackGoogletag}get trackPrebid(){return this.props.trackPrimis}get trackPrimis(){return this.props.trackPrimis}get trackSession(){return this.props.trackSession}get trackTudeserve(){return this.props.trackTudeserve}get tudeMetaSampleRate(){var e;return null!==(e=this.props.tudeMetaSampleRate)&&void 0!==e?e:0}}const Fs="raven-rps",$s={count:0,cumulativeValue:0,currency:"USD",value:0},Us=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"USD";var i;const{count:n,cumulativeValue:r}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"USD",t=$s;if(!window.sessionStorage)return t;let i=window.sessionStorage.getItem(Fs);if(!i)return t;try{const n=JSON.parse(i);if(!n.t||!n.n||!n.c||n.c!==e)return t;t={count:n.n,cumulativeValue:n.t,currency:n.c,value:0}}catch(e){}return t}(t),s=n+1,o=r+e;return null===(i=window.sessionStorage)||void 0===i||i.setItem(Fs,JSON.stringify({c:t,h:100*Math.random(),n:s,t:o,x:Math.random()})),{count:s,cumulativeValue:o,currency:t,value:e}},Ns="Client RPS Events";function Ds(){return t(this,void 0,void 0,(function*(){p.debug("Enabling feature",void 0,Ns),window.sessionStorage?rr.on("pushEvent",(e=>{const{data:t,eventType:i}=e;if("impression"===i){const{cpm:e,currency:i="USD"}=t;if("number"==typeof e){const t=Us(e/1e3,i);t&&function(e,t){p.verbose(`dispatching -> ${e}`,null!=t?t:{}),window.dispatchEvent(new CustomEvent(e,{detail:t}))}("tudeSessionValueEstimate",t)}}"newSession"===i&&Us(0)})):p.warn("Session storage is not available",void 0,Ns)}))}p.always("Raven v1.7.0");const Ms={batchSize:20,strategyId:"fallback-aws-go",ingressMethod:"POST",ingressName:"fallback-aws-go",ingressUrl:"https://fixnlntptgvuwqeaqv7ij3bgoy0fyiho.lambda-url.us-east-1.on.aws/",failoverMethod:null,failoverName:null,failoverUrl:null,pagingInterval:1e3};let Cs,Ps=!1,Rs=!1;const zs=(e,t)=>{const i={config:{setCustom:e=>{p.debug("setCustom received",e);const t=lr();var i;i=Object.assign(Object.assign({},t),e),ar.setAttributes(i)},setTudeMeta:e=>{p.debug("setTudeMeta received",e);const t=dr();var i;i=Object.assign(Object.assign({},t),e),ur.setAttributes(i)},setGlobalParams:t=>{try{const i=tr.cast(t,{stripUnknown:!0});Fr(i),e.setGlobalAttributes(i)}catch(e){if(e instanceof Error)p.error(`SetGlobalParams: ${e.message}`,e.toString());else{let t="unknown";"string"==typeof e?t=e:"object"==typeof e&&(t=JSON.stringify(e)),p.error("SetGlobalParams: unknown",t)}}}},events:{pageview:()=>{e.pageview()},send:(i,n)=>{"userFeedback"!==i?e.pushEvent(i,n):t.pushEvent(i,n)},sendCustomEvent:(i,n)=>{p.debug(`sendCustomEvent.${i} received`,{eventData:n});try{const r=Ss.cast(Object.assign(Object.assign({},n),{eventType:i}));if("userFeedback"===i)return void t.pushEvent(i,r);e.pushEvent(i,r)}catch(e){if(e instanceof Error)p.error(`SendCustomEventError: ${e.message}`,e.toString());else{let t="unknown";"string"==typeof e?t=e:"object"==typeof e&&(t=JSON.stringify(e)),p.error("SendCustomEventError: unknown",t)}}}}},n={cmd:{push(e){e(i)}}};window.Raven=n},qs=e=>e.map((e=>{const t=new js({batchSize:e.batchSize,id:e.strategyId,ingressMethod:e.ingressMethod,ingressName:e.ingressName,ingressUrl:e.ingressUrl});if(e.failoverUrl){const{failoverUrl:i,failoverMethod:n,failoverName:r}=e,s=new js({batchSize:e.batchSize,id:e.strategyId,ingressMethod:null!=n?n:"POST",ingressName:null!=r?r:"failover",ingressUrl:i});t.onFailure(((e,t)=>s.sendBatch(e,t)))}return t})),Vs=function(e){for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var s,o,a;if(Rs||Ps)return;Rs=!0,p.debug("Raven booting",{propertyId:e});let l=0,u={address:null,asn:null,city:null,country:null,"country-region":null,"postal-code":null,"time-zone":null};for(;l<2;)try{const e=yield t(void 0,void 0,void 0,(function*(){return(yield fetch("https://geo.aditude.io/raven",{method:"GET",mode:"cors"})).json()}));e&&(u=e.geo),p.debug("geo fetched",e.geo);break}catch(e){l++,p.error("GeoFetchError: failed",{e:e,geoTries:l})}const d=yield n({geo:null!==(s=u.country)&&void 0!==s?s:void 0,propertyId:e}).catch((e=>p.error("Raven config fetch failed",e.toString())));if(!d)return;if(d.error)return void p.error("Raven config error",d.error);p.debug("Raven config fetched",d);const{endpoints:c}=d,h=qs(c),{property:f}=d,m=new As(f);if(!(m.trackGoogletag||m.trackPrebid||m.trackPrimis||m.trackSession||m.trackTudeserve))return p.debug("No tracking is enabled for property",{propertyId:m.id}),void(Rs=!1);["CLIENT_RPS_EVENTS"].forEach((e=>{"CLIENT_RPS_EVENTS"===e&&Ds()}));const{sampleRate:g}=m,v=(()=>{if(!Cs){const e=localStorage.getItem("tude-raven-sampling-bucket");e?Cs=e:(Cs=Math.random().toString(),localStorage.setItem("tude-raven-sampling-bucket",Cs))}return parseFloat(Cs)})();Cs=v.toString();const b=v<=g;b||p.debug("User not in current sample. Tracking disabled.",{sampleRate:g,userSampleRate:v}),pr({pbjsGlobals:null!==(o=null==r?void 0:r.pbjsGlobals)&&void 0!==o?o:["pbjs"],property:m}),Ps=!0;const w=new Kr(h,{queueInterval:2e3}),y=new Kr(h,{queueInterval:1e3});Fr({adServer:"googletag",geo:u,publisher:m.eventPublisherValue,publisherId:m.publisherId}),window.tudeserve=window.tudeserve||{cmd:[]},window.tudeserve.cmd=window.tudeserve.cmd||[],window.tudeserve.cmd.push((()=>{var e,t;pr({adServers:["tudeserve"],primaryAdServer:"tudeserve"}),e="adServer",t="tudeserve",jr.setAttribute(e,t)}));const{pageviewId:x}=hr();if(setTimeout((()=>{if(b){if(yr&&y.pushEvent("newUser",{}),xr&&m.trackSession){y.pushEvent("newSession",{});const{tudeMetaSampleRate:e}=m,t=Math.random(){let{session:t}=e;t&&y.pushEvent("newSession",{})})),d.customModifiers){const{customModifiers:e}=d;(e=>{const t=e.map((e=>{const t=["bidder","mediaType"].filter((t=>!e[t])).length,i=hs(e.bidder),n=hs(e.mediaType);return{modifier:e.modifier,bidder:i,mediaType:n,n:t}}));t.sort(((e,t)=>e.n-t.n)),ps=t,p.debug("Bidder modifiers set",t)})(e)}if(m.trackGoogletag&&b){const e=yield(E={publisherId:m.publisherId},t(void 0,void 0,void 0,(function*(){return yield i("GET",`/revenuesourcemaps/${E.publisherId}`)}))),{modelConfigs:n}=d,r=n.bid.models.map((e=>new Is(e)))[0],s=null!==(a=yield Ts(r.model,r))&&void 0!==a?a:yield Ts("one-cent-fallback",r);yield ws(y,m,{bidEstModel:s,mappings:e})}var E;m.trackTudeserve&&(yield ks(y,m)),m.trackPrebid&&b&&(yield((e,i)=>t(void 0,void 0,void 0,(function*(){if(!i.trackPrebid)return;const{pbjsGlobals:t=["pbjs","tudePbjs","owpbjs"]}=hr();t.forEach((t=>{const i=t;window[i]=window[i]||{},window[i].que=window[i].que||[],window[i].que.push((()=>{p.debug("adding event listeners",void 0,"prebid"),window[i].onEvent("bidWon",(t=>{var i,n,r,s;const{adServers:o,primaryAdServer:a}=hr(),l={bidder:t.bidder,cpm:t.cpm,creativeHeight:null!==(n=null!==(i=t.creativeHeight)&&void 0!==i?i:t.height)&&void 0!==n?n:0,creativeWidth:null!==(s=null!==(r=t.creativeWidth)&&void 0!==r?r:t.width)&&void 0!==s?s:0,currency:t.currency,mediaType:t.mediaType,size:`${t.width}x${t.height}`,source:"prebid"};(o.includes("googletag")||o.includes("google"))&&(window.googletag=window.googletag||{cmd:[]},window.googletag.cmd.push((()=>{const i=window.googletag.pubads().getSlots();let n=i.find((e=>e.getSlotElementId()===(null==t?void 0:t.adUnitCode)));if(n||(n=i.find((e=>e.getAdUnitPath()===(null==t?void 0:t.adUnitCode)))),!n&&"googletag"!==a)return;const r=n?as(n):{adUnitPath:"unknown",slotElementId:null==t?void 0:t.adUnitCode,slotId:null==t?void 0:t.adUnitCode,slotSizes:[],targetingMap:{}},s=Xr("bidWon",Object.assign(Object.assign({},r),l));e.pushEvent("bidWon",Object.assign(Object.assign({},s),{adServer:"googletag",dataSource:"prebid"}))}))),window.tudeserve=window.tudeserve||{cmd:[]},window.tudeserve.cmd=window.tudeserve.cmd||[],window.tudeserve.cmd.push((i=>{let n=i.ads().slots.getSlotByElementId(null==t?void 0:t.adUnitCode);if(n||(n=i.ads().slots.getSlotByAdUnit(null==t?void 0:t.adUnitCode)),!n&&"tudeserve"!==a)return;const r=n?Xr("bidWon",Object.assign({adUnitPath:n.adUnit,slotElementId:n.elementId,targetingMap:{}},l)):Object.assign({adUnitPath:"unknown",slotElementId:null==t?void 0:t.adUnitCode},l);e.pushEvent("bidWon",Object.assign(Object.assign({},r),{adServer:"tudeserve",dataSource:"prebid"}))}))})),p.debug("added event listeners",void 0,"prebid")}))}))})))(y,m)),m.trackPrimis&&b&&(yield((e,i)=>t(void 0,void 0,void 0,(function*(){i.trackPrimis&&(p.debug("tracking",void 0,"primis"),window.addEventListener("primisPlayerInit",(t=>{if(p.debug("primisPlayerInit",{e:t}),"detail"in t){const i=t.detail;i.addEventListener("adStarted",(t=>{var n,r,s,o,a,l,u,d;const c=t,p=Math.min(Math.max(0,null!==(n=c.impValue)&&void 0!==n?n:0),200)-Math.min(Math.max(0,null!==(r=c.servingFee)&&void 0!==r?r:0),200),h=Xr("impression",{adUnitPath:"primis_video",bidder:"primis",cpm:p,creativeHeight:null!==(o=null!==(s=c.playerHeight)&&void 0!==s?s:null==i?void 0:i.offsetHeight)&&void 0!==o?o:0,creativeWidth:null!==(l=null!==(a=c.playerWidth)&&void 0!==a?a:null==i?void 0:i.offsetWidth)&&void 0!==l?l:0,currency:"USD",mediaType:"video_primis",revenue:p/1e3,size:`${c.playerWidth}x${c.playerHeight}`,slotElementId:null!==(d=null!==(u=i.id)&&void 0!==u?u:i.playerApiId)&&void 0!==d?d:"primis",source:"primis",targetingMap:{}});e.pushEvent("impression",Object.assign(Object.assign({},h),{adServer:"primis",message:JSON.stringify({height:c.playerHeight,servingFee:c.servingFee,width:c.playerWidth})}))}))}})))})))(y,m));let k=[];void 0!==window.Raven&&("object"!=typeof window.Raven||Array.isArray(window.Raven)||void 0!==window.Raven.cmd&&Array.isArray(window.Raven.cmd)&&(k=[...window.Raven.cmd])),zs(y,w),k.forEach((e=>window.Raven.cmd.push(e))),setInterval((()=>t(void 0,void 0,void 0,(function*(){var t;if(document.hidden)return;let i=yield n({geo:null!==(t=u.country)&&void 0!==t?t:void 0,propertyId:e}).catch((e=>p.error("Raven config fetch failed",e.toString())));if(!i)return;const{endpoints:r}=i,s=qs(r&&r.length?r:[Ms]);y.setEndpoints(s)}))),18e5),Rs=!1}()}))};if(window.Raven=window.Raven||{cmd:[]},window.Raven.initialConfig){const{propertyId:e,pbjsGlobals:t}=window.Raven.initialConfig;Vs(e,{pbjsGlobals:t})}var Ls=Object.freeze({__proto__:null,AdxRangerV1EstModel:class extends _s{constructor(e){super("adx-ranger-v1",e)}onLoad(){return t(this,void 0,void 0,(function*(){return new Promise((()=>({})))}))}estimateCpm(e){return t(this,void 0,void 0,(function*(){var t,i,n;const{competingBids:r,googleDemandFloor:s,wonSourceType:o}=e;r.sort(((e,t)=>{var i,n;return(null!==(i=null==t?void 0:t.value)&&void 0!==i?i:0)-(null!==(n=null==e?void 0:e.value)&&void 0!==n?n:0)}));const{googleFloorsEnabled:a}=this.config,l=Math.max(a&&null!=s?s:0,r.length>0?null===(t=r[0])||void 0===t?void 0:t.value:0);if("adx"===o||"openbidding"===o){const{bmin:e,bmax:t,bmult:n}=null!==(i=this.config.bidValueInputs)&&void 0!==i?i:{bmax:.01,bmin:.01,bmult:1};if(l>t)return p.verbose(`${this.modelName}: highestOtherValue ${l} is greater than bmax ${t}`),l+.01;{const i=Math.random(),r=(e+Math.max(t-e,0)*i)*n;return p.verbose(`${this.modelName}: picked ${r} from range ${e} to ${t}`),r}}let u;switch(o){case"house":return 0;case"other":case"unmapped":return l+.01;default:return u=r.find((e=>e.source===o)),null!==(n=null==u?void 0:u.value)&&void 0!==n?n:.01}}))}}});var Gs=Object.freeze({__proto__:null,OneCentFallbackEstModel:class extends _s{constructor(e){super("one-cent-fallback",e)}onLoad(){return t(this,void 0,void 0,(function*(){return new Promise((()=>({})))}))}estimateCpm(e){return t(this,void 0,void 0,(function*(){var t;const{competingBids:i,googleDemandFloor:n,wonSourceType:r}=e;i.sort(((e,t)=>{var i,n;return(null!==(i=null==t?void 0:t.value)&&void 0!==i?i:0)-(null!==(n=null==e?void 0:e.value)&&void 0!==n?n:0)}));const{googleFloorsEnabled:s}=this.config,o=Math.max(s&&null!=n?n:0,i.length>0?i[0].value:0);let a;switch(r){case"house":return 0;case"adx":case"openbidding":case"other":case"unmapped":return o+.01;default:return a=i.find((e=>e.source===r)),null!==(t=null==a?void 0:a.value)&&void 0!==t?t:.01}}))}}});e.boot=Vs}({});